1 #!/bin/bash
   2 #
   3 # ##########################################################
   4 # ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
   5 # ##########################################################
   6 #
   7 #! /bin/sh
   8 # Guess values for system-dependent variables and create Makefiles.
   9 # Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
  10 #
  11 # Report bugs to <build-dev@openjdk.java.net>.
  12 #
  13 #
  14 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
  15 #
  16 #
  17 # This configure script is free software; the Free Software Foundation
  18 # gives unlimited permission to copy, distribute and modify it.
  19 ## -------------------- ##
  20 ## M4sh Initialization. ##
  21 ## -------------------- ##
  22 
  23 # Be more Bourne compatible
  24 DUALCASE=1; export DUALCASE # for MKS sh
  25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  26   emulate sh
  27   NULLCMD=:
  28   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  29   # is contrary to our usage.  Disable this feature.
  30   alias -g '${1+"$@"}'='"$@"'
  31   setopt NO_GLOB_SUBST
  32 else
  33   case `(set -o) 2>/dev/null` in #(
  34   *posix*) :
  35     set -o posix ;; #(
  36   *) :
  37      ;;
  38 esac
  39 fi
  40 
  41 
  42 as_nl='
  43 '
  44 export as_nl
  45 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  46 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  47 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  48 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  49 # Prefer a ksh shell builtin over an external printf program on Solaris,
  50 # but without wasting forks for bash or zsh.
  51 if test -z "$BASH_VERSION$ZSH_VERSION" \
  52     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  53   as_echo='print -r --'
  54   as_echo_n='print -rn --'
  55 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  56   as_echo='printf %s\n'
  57   as_echo_n='printf %s'
  58 else
  59   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  60     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  61     as_echo_n='/usr/ucb/echo -n'
  62   else
  63     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  64     as_echo_n_body='eval
  65       arg=$1;
  66       case $arg in #(
  67       *"$as_nl"*)
  68         expr "X$arg" : "X\\(.*\\)$as_nl";
  69         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  70       esac;
  71       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  72     '
  73     export as_echo_n_body
  74     as_echo_n='sh -c $as_echo_n_body as_echo'
  75   fi
  76   export as_echo_body
  77   as_echo='sh -c $as_echo_body as_echo'
  78 fi
  79 
  80 # The user is always right.
  81 if test "${PATH_SEPARATOR+set}" != set; then
  82   PATH_SEPARATOR=:
  83   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  84     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  85       PATH_SEPARATOR=';'
  86   }
  87 fi
  88 
  89 
  90 # IFS
  91 # We need space, tab and new line, in precisely that order.  Quoting is
  92 # there to prevent editors from complaining about space-tab.
  93 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  94 # splitting by setting IFS to empty value.)
  95 IFS=" ""        $as_nl"
  96 
  97 # Find who we are.  Look in the path if we contain no directory separator.
  98 as_myself=
  99 case $0 in #((
 100   *[\\/]* ) as_myself=$0 ;;
 101   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 102 for as_dir in $PATH
 103 do
 104   IFS=$as_save_IFS
 105   test -z "$as_dir" && as_dir=.
 106     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 107   done
 108 IFS=$as_save_IFS
 109 
 110      ;;
 111 esac
 112 # We did not find ourselves, most probably we were run as `sh COMMAND'
 113 # in which case we are not to be found in the path.
 114 if test "x$as_myself" = x; then
 115   as_myself=$0
 116 fi
 117 if test ! -f "$as_myself"; then
 118   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 119   exit 1
 120 fi
 121 
 122 # Unset variables that we do not need and which cause bugs (e.g. in
 123 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 124 # suppresses any "Segmentation fault" message there.  '((' could
 125 # trigger a bug in pdksh 5.2.14.
 126 for as_var in BASH_ENV ENV MAIL MAILPATH
 127 do eval test x\${$as_var+set} = xset \
 128   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 129 done
 130 PS1='$ '
 131 PS2='> '
 132 PS4='+ '
 133 
 134 # NLS nuisances.
 135 LC_ALL=C
 136 export LC_ALL
 137 LANGUAGE=C
 138 export LANGUAGE
 139 
 140 # CDPATH.
 141 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 142 
 143 # Use a proper internal environment variable to ensure we don't fall
 144   # into an infinite loop, continuously re-executing ourselves.
 145   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
 146     _as_can_reexec=no; export _as_can_reexec;
 147     # We cannot yet assume a decent shell, so we have to provide a
 148 # neutralization value for shells without unset; and this also
 149 # works around shells that cannot unset nonexistent variables.
 150 # Preserve -v and -x to the replacement shell.
 151 BASH_ENV=/dev/null
 152 ENV=/dev/null
 153 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 154 case $- in # ((((
 155   *v*x* | *x*v* ) as_opts=-vx ;;
 156   *v* ) as_opts=-v ;;
 157   *x* ) as_opts=-x ;;
 158   * ) as_opts= ;;
 159 esac
 160 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 161 # Admittedly, this is quite paranoid, since all the known shells bail
 162 # out after a failed `exec'.
 163 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 164 as_fn_exit 255
 165   fi
 166   # We don't want this to propagate to other subprocesses.
 167           { _as_can_reexec=; unset _as_can_reexec;}
 168 if test "x$CONFIG_SHELL" = x; then
 169   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 170   emulate sh
 171   NULLCMD=:
 172   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 173   # is contrary to our usage.  Disable this feature.
 174   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 175   setopt NO_GLOB_SUBST
 176 else
 177   case \`(set -o) 2>/dev/null\` in #(
 178   *posix*) :
 179     set -o posix ;; #(
 180   *) :
 181      ;;
 182 esac
 183 fi
 184 "
 185   as_required="as_fn_return () { (exit \$1); }
 186 as_fn_success () { as_fn_return 0; }
 187 as_fn_failure () { as_fn_return 1; }
 188 as_fn_ret_success () { return 0; }
 189 as_fn_ret_failure () { return 1; }
 190 
 191 exitcode=0
 192 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 193 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 194 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 195 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 196 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 197 
 198 else
 199   exitcode=1; echo positional parameters were not saved.
 200 fi
 201 test x\$exitcode = x0 || exit 1
 202 test -x / || exit 1"
 203   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 204   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 205   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 206   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 207 test \$(( 1 + 1 )) = 2 || exit 1"
 208   if (eval "$as_required") 2>/dev/null; then :
 209   as_have_required=yes
 210 else
 211   as_have_required=no
 212 fi
 213   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 214 
 215 else
 216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 217 as_found=false
 218 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 219 do
 220   IFS=$as_save_IFS
 221   test -z "$as_dir" && as_dir=.
 222   as_found=:
 223   case $as_dir in #(
 224          /*)
 225            for as_base in sh bash ksh sh5; do
 226              # Try only shells that exist, to save several forks.
 227              as_shell=$as_dir/$as_base
 228              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 229                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 230   CONFIG_SHELL=$as_shell as_have_required=yes
 231                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 232   break 2
 233 fi
 234 fi
 235            done;;
 236        esac
 237   as_found=false
 238 done
 239 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 240               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 241   CONFIG_SHELL=$SHELL as_have_required=yes
 242 fi; }
 243 IFS=$as_save_IFS
 244 
 245 
 246       if test "x$CONFIG_SHELL" != x; then :
 247   export CONFIG_SHELL
 248              # We cannot yet assume a decent shell, so we have to provide a
 249 # neutralization value for shells without unset; and this also
 250 # works around shells that cannot unset nonexistent variables.
 251 # Preserve -v and -x to the replacement shell.
 252 BASH_ENV=/dev/null
 253 ENV=/dev/null
 254 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 255 case $- in # ((((
 256   *v*x* | *x*v* ) as_opts=-vx ;;
 257   *v* ) as_opts=-v ;;
 258   *x* ) as_opts=-x ;;
 259   * ) as_opts= ;;
 260 esac
 261 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 262 # Admittedly, this is quite paranoid, since all the known shells bail
 263 # out after a failed `exec'.
 264 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 265 exit 255
 266 fi
 267 
 268     if test x$as_have_required = xno; then :
 269   $as_echo "$0: This script requires a shell more modern than all"
 270   $as_echo "$0: the shells that I found on your system."
 271   if test x${ZSH_VERSION+set} = xset ; then
 272     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 273     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 274   else
 275     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 276 $0: build-dev@openjdk.java.net about your system, including
 277 $0: any error possibly output before this message. Then
 278 $0: install a modern shell, or manually run the script
 279 $0: under such a shell if you do have one."
 280   fi
 281   exit 1
 282 fi
 283 fi
 284 fi
 285 SHELL=${CONFIG_SHELL-/bin/sh}
 286 export SHELL
 287 # Unset more variables known to interfere with behavior of common tools.
 288 CLICOLOR_FORCE= GREP_OPTIONS=
 289 unset CLICOLOR_FORCE GREP_OPTIONS
 290 
 291 ## --------------------- ##
 292 ## M4sh Shell Functions. ##
 293 ## --------------------- ##
 294 # as_fn_unset VAR
 295 # ---------------
 296 # Portably unset VAR.
 297 as_fn_unset ()
 298 {
 299   { eval $1=; unset $1;}
 300 }
 301 as_unset=as_fn_unset
 302 
 303 # as_fn_set_status STATUS
 304 # -----------------------
 305 # Set $? to STATUS, without forking.
 306 as_fn_set_status ()
 307 {
 308   return $1
 309 } # as_fn_set_status
 310 
 311 # as_fn_exit STATUS
 312 # -----------------
 313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 314 as_fn_exit ()
 315 {
 316   set +e
 317   as_fn_set_status $1
 318   exit $1
 319 } # as_fn_exit
 320 
 321 # as_fn_mkdir_p
 322 # -------------
 323 # Create "$as_dir" as a directory, including parents if necessary.
 324 as_fn_mkdir_p ()
 325 {
 326 
 327   case $as_dir in #(
 328   -*) as_dir=./$as_dir;;
 329   esac
 330   test -d "$as_dir" || eval $as_mkdir_p || {
 331     as_dirs=
 332     while :; do
 333       case $as_dir in #(
 334       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 335       *) as_qdir=$as_dir;;
 336       esac
 337       as_dirs="'$as_qdir' $as_dirs"
 338       as_dir=`$as_dirname -- "$as_dir" ||
 339 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 340          X"$as_dir" : 'X\(//\)[^/]' \| \
 341          X"$as_dir" : 'X\(//\)$' \| \
 342          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 343 $as_echo X"$as_dir" |
 344     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 345             s//\1/
 346             q
 347           }
 348           /^X\(\/\/\)[^/].*/{
 349             s//\1/
 350             q
 351           }
 352           /^X\(\/\/\)$/{
 353             s//\1/
 354             q
 355           }
 356           /^X\(\/\).*/{
 357             s//\1/
 358             q
 359           }
 360           s/.*/./; q'`
 361       test -d "$as_dir" && break
 362     done
 363     test -z "$as_dirs" || eval "mkdir $as_dirs"
 364   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 365 
 366 
 367 } # as_fn_mkdir_p
 368 
 369 # as_fn_executable_p FILE
 370 # -----------------------
 371 # Test if FILE is an executable regular file.
 372 as_fn_executable_p ()
 373 {
 374   test -f "$1" && test -x "$1"
 375 } # as_fn_executable_p
 376 # as_fn_append VAR VALUE
 377 # ----------------------
 378 # Append the text in VALUE to the end of the definition contained in VAR. Take
 379 # advantage of any shell optimizations that allow amortized linear growth over
 380 # repeated appends, instead of the typical quadratic growth present in naive
 381 # implementations.
 382 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 383   eval 'as_fn_append ()
 384   {
 385     eval $1+=\$2
 386   }'
 387 else
 388   as_fn_append ()
 389   {
 390     eval $1=\$$1\$2
 391   }
 392 fi # as_fn_append
 393 
 394 # as_fn_arith ARG...
 395 # ------------------
 396 # Perform arithmetic evaluation on the ARGs, and store the result in the
 397 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 398 # must be portable across $(()) and expr.
 399 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 400   eval 'as_fn_arith ()
 401   {
 402     as_val=$(( $* ))
 403   }'
 404 else
 405   as_fn_arith ()
 406   {
 407     as_val=`expr "$@" || test $? -eq 1`
 408   }
 409 fi # as_fn_arith
 410 
 411 
 412 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 413 # ----------------------------------------
 414 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 415 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 416 # script with STATUS, using 1 if that was 0.
 417 as_fn_error ()
 418 {
 419   as_status=$1; test $as_status -eq 0 && as_status=1
 420   if test "$4"; then
 421     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 422     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 423   fi
 424   $as_echo "$as_me: error: $2" >&2
 425   as_fn_exit $as_status
 426 } # as_fn_error
 427 
 428 if expr a : '\(a\)' >/dev/null 2>&1 &&
 429    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 430   as_expr=expr
 431 else
 432   as_expr=false
 433 fi
 434 
 435 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 436   as_basename=basename
 437 else
 438   as_basename=false
 439 fi
 440 
 441 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 442   as_dirname=dirname
 443 else
 444   as_dirname=false
 445 fi
 446 
 447 as_me=`$as_basename -- "$0" ||
 448 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 449          X"$0" : 'X\(//\)$' \| \
 450          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 451 $as_echo X/"$0" |
 452     sed '/^.*\/\([^/][^/]*\)\/*$/{
 453             s//\1/
 454             q
 455           }
 456           /^X\/\(\/\/\)$/{
 457             s//\1/
 458             q
 459           }
 460           /^X\/\(\/\).*/{
 461             s//\1/
 462             q
 463           }
 464           s/.*/./; q'`
 465 
 466 # Avoid depending upon Character Ranges.
 467 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 468 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 469 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 470 as_cr_digits='0123456789'
 471 as_cr_alnum=$as_cr_Letters$as_cr_digits
 472 
 473 
 474   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 475   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 476   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 477   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 478   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 479   sed -n '
 480     p
 481     /[$]LINENO/=
 482   ' <$as_myself |
 483     sed '
 484       s/[$]LINENO.*/&-/
 485       t lineno
 486       b
 487       :lineno
 488       N
 489       :loop
 490       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 491       t loop
 492       s/-\n.*//
 493     ' >$as_me.lineno &&
 494   chmod +x "$as_me.lineno" ||
 495     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 496 
 497   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
 498   # already done that, so ensure we don't try to do so again and fall
 499   # in an infinite loop.  This has already happened in practice.
 500   _as_can_reexec=no; export _as_can_reexec
 501   # Don't try to exec as it changes $[0], causing all sort of problems
 502   # (the dirname of $[0] is not the place where we might find the
 503   # original and so on.  Autoconf is especially sensitive to this).
 504   . "./$as_me.lineno"
 505   # Exit status is that of the last command.
 506   exit
 507 }
 508 
 509 ECHO_C= ECHO_N= ECHO_T=
 510 case `echo -n x` in #(((((
 511 -n*)
 512   case `echo 'xy\c'` in
 513   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 514   xy)  ECHO_C='\c';;
 515   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 516        ECHO_T=' ';;
 517   esac;;
 518 *)
 519   ECHO_N='-n';;
 520 esac
 521 
 522 rm -f conf$$ conf$$.exe conf$$.file
 523 if test -d conf$$.dir; then
 524   rm -f conf$$.dir/conf$$.file
 525 else
 526   rm -f conf$$.dir
 527   mkdir conf$$.dir 2>/dev/null
 528 fi
 529 if (echo >conf$$.file) 2>/dev/null; then
 530   if ln -s conf$$.file conf$$ 2>/dev/null; then
 531     as_ln_s='ln -s'
 532     # ... but there are two gotchas:
 533     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 534     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 535     # In both cases, we have to default to `cp -pR'.
 536     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 537       as_ln_s='cp -pR'
 538   elif ln conf$$.file conf$$ 2>/dev/null; then
 539     as_ln_s=ln
 540   else
 541     as_ln_s='cp -pR'
 542   fi
 543 else
 544   as_ln_s='cp -pR'
 545 fi
 546 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 547 rmdir conf$$.dir 2>/dev/null
 548 
 549 if mkdir -p . 2>/dev/null; then
 550   as_mkdir_p='mkdir -p "$as_dir"'
 551 else
 552   test -d ./-p && rmdir ./-p
 553   as_mkdir_p=false
 554 fi
 555 
 556 as_test_x='test -x'
 557 as_executable_p=as_fn_executable_p
 558 
 559 # Sed expression to map a string onto a valid CPP name.
 560 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 561 
 562 # Sed expression to map a string onto a valid variable name.
 563 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 564 
 565 
 566 test -n "$DJDIR" || exec 7<&0 </dev/null
 567 exec 6>&1
 568 
 569 # Name of the host.
 570 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 571 # so uname gets run too.
 572 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 573 
 574 #
 575 # Initializations.
 576 #
 577 ac_default_prefix=/usr/local
 578 ac_clean_files=
 579 ac_config_libobj_dir=.
 580 LIBOBJS=
 581 cross_compiling=no
 582 subdirs=
 583 MFLAGS=
 584 MAKEFLAGS=
 585 
 586 # Identity of this package.
 587 PACKAGE_NAME='OpenJDK'
 588 PACKAGE_TARNAME='openjdk'
 589 PACKAGE_VERSION='jdk9'
 590 PACKAGE_STRING='OpenJDK jdk9'
 591 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 592 PACKAGE_URL='http://openjdk.java.net'
 593 
 594 # Factoring default headers for most tests.
 595 ac_includes_default="\
 596 #include <stdio.h>
 597 #ifdef HAVE_SYS_TYPES_H
 598 # include <sys/types.h>
 599 #endif
 600 #ifdef HAVE_SYS_STAT_H
 601 # include <sys/stat.h>
 602 #endif
 603 #ifdef STDC_HEADERS
 604 # include <stdlib.h>
 605 # include <stddef.h>
 606 #else
 607 # ifdef HAVE_STDLIB_H
 608 #  include <stdlib.h>
 609 # endif
 610 #endif
 611 #ifdef HAVE_STRING_H
 612 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 613 #  include <memory.h>
 614 # endif
 615 # include <string.h>
 616 #endif
 617 #ifdef HAVE_STRINGS_H
 618 # include <strings.h>
 619 #endif
 620 #ifdef HAVE_INTTYPES_H
 621 # include <inttypes.h>
 622 #endif
 623 #ifdef HAVE_STDINT_H
 624 # include <stdint.h>
 625 #endif
 626 #ifdef HAVE_UNISTD_H
 627 # include <unistd.h>
 628 #endif"
 629 
 630 ac_subst_vars='LTLIBOBJS
 631 LIBOBJS
 632 CFLAGS_CCACHE
 633 CCACHE
 634 USE_PRECOMPILED_HEADER
 635 BUILD_ICECC
 636 ICECC
 637 ICECC_WRAPPER
 638 ICECC_CREATE_ENV
 639 ICECC_CMD
 640 ENABLE_JAVAC_SERVER
 641 ENABLE_SJAVAC
 642 SJAVAC_SERVER_JAVA_FLAGS
 643 SJAVAC_SERVER_JAVA
 644 JAVA_TOOL_FLAGS_SMALL
 645 JAVA_FLAGS_SMALL
 646 JAVA_FLAGS_JAVAC
 647 JAVA_FLAGS_BIG
 648 JAVA_FLAGS
 649 TEST_JOBS
 650 JOBS
 651 MEMORY_SIZE
 652 NUM_CORES
 653 ENABLE_INTREE_EC
 654 HOTSPOT_MAKE_ARGS
 655 LIBZIP_CAN_USE_MMAP
 656 LIBDL
 657 LIBM
 658 USE_EXTERNAL_LCMS
 659 LCMS_LIBS
 660 LCMS_CFLAGS
 661 USE_EXTERNAL_LIBZ
 662 USE_EXTERNAL_LIBPNG
 663 PNG_LIBS
 664 PNG_CFLAGS
 665 USE_EXTERNAL_LIBGIF
 666 USE_EXTERNAL_LIBJPEG
 667 LLVM_LIBS
 668 LLVM_LDFLAGS
 669 LLVM_CFLAGS
 670 LLVM_CONFIG
 671 LIBFFI_LIBS
 672 LIBFFI_CFLAGS
 673 ALSA_LIBS
 674 ALSA_CFLAGS
 675 FREETYPE_BUNDLE_LIB_PATH
 676 FREETYPE_LIBS
 677 FREETYPE_CFLAGS
 678 CUPS_CFLAGS
 679 X_EXTRA_LIBS
 680 X_LIBS
 681 X_PRE_LIBS
 682 X_CFLAGS
 683 XMKMF
 684 MSVCP_DLL
 685 MSVCR_DLL
 686 LIBCXX
 687 STATIC_CXX_SETTING
 688 FIXPATH_DETACH_FLAG
 689 FIXPATH
 690 GCOV_ENABLED
 691 STRIP_POLICY
 692 DEBUG_BINARIES
 693 ZIP_EXTERNAL_DEBUG_SYMBOLS
 694 COPY_DEBUG_SYMBOLS
 695 COMPILE_WITH_DEBUG_SYMBOLS
 696 CFLAGS_WARNINGS_ARE_ERRORS
 697 BUILD_CC_DISABLE_WARNING_PREFIX
 698 DISABLE_WARNING_PREFIX
 699 HOTSPOT_SET_WARNINGS_AS_ERRORS
 700 WARNINGS_AS_ERRORS
 701 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 702 ZERO_ARCHFLAG
 703 LDFLAGS_TESTEXE
 704 LDFLAGS_TESTLIB
 705 LDFLAGS_HASH_STYLE
 706 LDFLAGS_CXX_JDK
 707 JDKEXE_LIBS
 708 JDKLIB_LIBS
 709 OPENJDK_BUILD_LDFLAGS_JDKEXE
 710 OPENJDK_BUILD_LDFLAGS_JDKLIB
 711 LDFLAGS_JDKEXE
 712 LDFLAGS_JDKLIB
 713 CXXFLAGS_TESTEXE
 714 CXXFLAGS_TESTLIB
 715 CFLAGS_TESTEXE
 716 CFLAGS_TESTLIB
 717 OPENJDK_BUILD_CXXFLAGS_JDKEXE
 718 OPENJDK_BUILD_CXXFLAGS_JDKLIB
 719 OPENJDK_BUILD_CFLAGS_JDKEXE
 720 OPENJDK_BUILD_CFLAGS_JDKLIB
 721 CXXFLAGS_JDKEXE
 722 CXXFLAGS_JDKLIB
 723 CFLAGS_JDKEXE
 724 CFLAGS_JDKLIB
 725 MACOSX_VERSION_MIN
 726 NO_LIFETIME_DSE_CFLAG
 727 NO_NULL_POINTER_CHECK_CFLAG
 728 CXXSTD_CXXFLAG
 729 CXX_O_FLAG_NONE
 730 CXX_O_FLAG_DEBUG
 731 CXX_O_FLAG_NORM
 732 CXX_O_FLAG_HI
 733 CXX_O_FLAG_HIGHEST
 734 C_O_FLAG_NONE
 735 C_O_FLAG_DEBUG
 736 C_O_FLAG_NORM
 737 C_O_FLAG_HI
 738 C_O_FLAG_HIGHEST
 739 CXXFLAGS_DEBUG_SYMBOLS
 740 CFLAGS_DEBUG_SYMBOLS
 741 CXX_FLAG_DEPS
 742 C_FLAG_DEPS
 743 SHARED_LIBRARY_FLAGS
 744 SET_SHARED_LIBRARY_MAPFILE
 745 SET_SHARED_LIBRARY_NAME
 746 SET_SHARED_LIBRARY_ORIGIN
 747 SET_EXECUTABLE_ORIGIN
 748 CXX_FLAG_REORDER
 749 C_FLAG_REORDER
 750 RC_FLAGS
 751 AR_OUT_OPTION
 752 LD_OUT_OPTION
 753 EXE_OUT_OPTION
 754 CC_OUT_OPTION
 755 STRIPFLAGS
 756 ARFLAGS
 757 COMPILER_BINDCMD_FILE_FLAG
 758 COMPILER_COMMAND_FILE_FLAG
 759 COMPILER_TARGET_BITS_FLAG
 760 JT_HOME
 761 JTREGEXE
 762 USING_BROKEN_SUSE_LD
 763 PACKAGE_PATH
 764 USE_CLANG
 765 HOTSPOT_LD
 766 HOTSPOT_CXX
 767 HOTSPOT_RC
 768 HOTSPOT_MT
 769 BUILD_AS
 770 BUILD_LDCXX
 771 BUILD_LD
 772 BUILD_STRIP
 773 BUILD_OBJCOPY
 774 BUILD_AR
 775 BUILD_NM
 776 BUILD_CXX
 777 BUILD_CC
 778 BUILD_SYSROOT_LDFLAGS
 779 BUILD_SYSROOT_CFLAGS
 780 ac_ct_OBJDUMP
 781 OBJDUMP
 782 ac_ct_OBJCOPY
 783 OBJCOPY
 784 ac_ct_NM
 785 ac_ct_STRIP
 786 GNM
 787 NM
 788 STRIP
 789 MSBUILD
 790 DUMPBIN
 791 RC
 792 MT
 793 LIPO
 794 ac_ct_AR
 795 AR
 796 AS
 797 LDCXX
 798 LD
 799 CXXCPP
 800 CPP
 801 CXX_VERSION_NUMBER
 802 CC_VERSION_NUMBER
 803 ac_ct_CXX
 804 CXXFLAGS
 805 CXX
 806 TOOLCHAIN_PATH_CXX
 807 POTENTIAL_CXX
 808 OBJEXT
 809 EXEEXT
 810 ac_ct_CC
 811 CPPFLAGS
 812 LDFLAGS
 813 CFLAGS
 814 CC
 815 TOOLCHAIN_PATH_CC
 816 POTENTIAL_CC
 817 TOOLCHAIN_VERSION
 818 VS_LIB
 819 VS_INCLUDE
 820 VS_PATH
 821 CYGWIN_LINK
 822 SYSROOT_LDFLAGS
 823 SYSROOT_CFLAGS
 824 LEGACY_EXTRA_LDFLAGS
 825 LEGACY_EXTRA_CXXFLAGS
 826 LEGACY_EXTRA_CFLAGS
 827 EXE_SUFFIX
 828 OBJ_SUFFIX
 829 STATIC_LIBRARY
 830 SHARED_LIBRARY
 831 STATIC_LIBRARY_SUFFIX
 832 SHARED_LIBRARY_SUFFIX
 833 LIBRARY_PREFIX
 834 TOOLCHAIN_TYPE
 835 STATIC_BUILD
 836 IMPORT_MODULES_MAKE
 837 IMPORT_MODULES_SRC
 838 IMPORT_MODULES_CONF
 839 IMPORT_MODULES_LIBS
 840 IMPORT_MODULES_CMDS
 841 IMPORT_MODULES_CLASSES
 842 BUILD_HOTSPOT
 843 HOTSPOT_DIST
 844 BUILD_OUTPUT
 845 JDK_TOPDIR
 846 NASHORN_TOPDIR
 847 HOTSPOT_TOPDIR
 848 JAXWS_TOPDIR
 849 JAXP_TOPDIR
 850 CORBA_TOPDIR
 851 LANGTOOLS_TOPDIR
 852 BUILD_JDK
 853 CREATE_BUILDJDK
 854 BOOT_JDK_BITS
 855 JAVAC_FLAGS
 856 BOOT_JDK_MODULAR
 857 BOOT_JDK_SOURCETARGET
 858 JARSIGNER
 859 JAR
 860 JAVAH
 861 JAVAC
 862 JAVA
 863 BOOT_JDK
 864 JAVA_CHECK
 865 JAVAC_CHECK
 866 VERSION_IS_GA
 867 VERSION_SHORT
 868 VERSION_STRING
 869 VERSION_NUMBER_FOUR_POSITIONS
 870 VERSION_NUMBER
 871 VERSION_OPT
 872 VERSION_BUILD
 873 VERSION_PRE
 874 VERSION_PATCH
 875 VERSION_SECURITY
 876 VERSION_MINOR
 877 VERSION_MAJOR
 878 MACOSX_BUNDLE_ID_BASE
 879 MACOSX_BUNDLE_NAME_BASE
 880 COMPANY_NAME
 881 JDK_RC_PLATFORM_NAME
 882 PRODUCT_SUFFIX
 883 PRODUCT_NAME
 884 LAUNCHER_NAME
 885 TEST_IN_BUILD
 886 JLINK_KEEP_PACKAGED_MODULES
 887 COPYRIGHT_YEAR
 888 COMPRESS_JARS
 889 INCLUDE_SA
 890 UNLIMITED_CRYPTO
 891 CACERTS_FILE
 892 BUILD_HEADLESS
 893 SUPPORT_HEADFUL
 894 SUPPORT_HEADLESS
 895 DEFAULT_MAKE_TARGET
 896 OS_VERSION_MICRO
 897 OS_VERSION_MINOR
 898 OS_VERSION_MAJOR
 899 PKG_CONFIG
 900 BASH_ARGS
 901 SETFILE
 902 CODESIGN
 903 XATTR
 904 DSYMUTIL
 905 IS_GNU_TIME
 906 PATCH
 907 TIME
 908 STAT
 909 HG
 910 READELF
 911 OTOOL
 912 LDD
 913 ZIP
 914 UNZIP
 915 FIND_DELETE
 916 OUTPUT_SYNC
 917 OUTPUT_SYNC_SUPPORTED
 918 CHECK_TOOLSDIR_MAKE
 919 CHECK_TOOLSDIR_GMAKE
 920 CHECK_MAKE
 921 CHECK_GMAKE
 922 MAKE
 923 PKGHANDLER
 924 CONFIGURESUPPORT_OUTPUTDIR
 925 OUTPUT_ROOT
 926 CONF_NAME
 927 SPEC
 928 SDKROOT
 929 XCODEBUILD
 930 BUILD_VARIANT_RELEASE
 931 DEBUG_CLASSFILES
 932 FASTDEBUG
 933 VARIANT
 934 DEBUG_LEVEL
 935 MACOSX_UNIVERSAL
 936 JVM_VARIANT_CORE
 937 JVM_VARIANT_ZEROSHARK
 938 JVM_VARIANT_ZERO
 939 JVM_VARIANT_MINIMAL1
 940 JVM_VARIANT_CLIENT
 941 JVM_VARIANT_SERVER
 942 JVM_VARIANTS
 943 JVM_INTERPRETER
 944 JDK_VARIANT
 945 SET_OPENJDK
 946 USERNAME
 947 CANONICAL_TOPDIR
 948 ORIGINAL_TOPDIR
 949 TOPDIR
 950 PATH_SEP
 951 ZERO_ARCHDEF
 952 DEFINE_CROSS_COMPILE_ARCH
 953 LP64
 954 OPENJDK_TARGET_OS_EXPORT_DIR
 955 OPENJDK_BUILD_CPU_JLI_CFLAGS
 956 OPENJDK_TARGET_CPU_JLI_CFLAGS
 957 OPENJDK_TARGET_CPU_OSARCH
 958 OPENJDK_TARGET_CPU_ISADIR
 959 OPENJDK_BUILD_CPU_LIBDIR
 960 OPENJDK_BUILD_CPU_LEGACY_LIB
 961 OPENJDK_BUILD_CPU_LEGACY
 962 OPENJDK_TARGET_CPU_LIBDIR
 963 OPENJDK_TARGET_CPU_LEGACY_LIB
 964 OPENJDK_TARGET_CPU_LEGACY
 965 REQUIRED_OS_VERSION
 966 REQUIRED_OS_NAME
 967 COMPILE_TYPE
 968 OPENJDK_TARGET_CPU_ENDIAN
 969 OPENJDK_TARGET_CPU_BITS
 970 OPENJDK_TARGET_CPU_ARCH
 971 OPENJDK_TARGET_CPU
 972 OPENJDK_TARGET_OS_ENV
 973 OPENJDK_TARGET_OS_TYPE
 974 OPENJDK_TARGET_OS
 975 OPENJDK_BUILD_CPU_ENDIAN
 976 OPENJDK_BUILD_CPU_BITS
 977 OPENJDK_BUILD_CPU_ARCH
 978 OPENJDK_BUILD_CPU
 979 OPENJDK_BUILD_OS_ENV
 980 OPENJDK_BUILD_OS_TYPE
 981 OPENJDK_BUILD_OS
 982 OPENJDK_BUILD_AUTOCONF_NAME
 983 OPENJDK_TARGET_AUTOCONF_NAME
 984 target_os
 985 target_vendor
 986 target_cpu
 987 target
 988 host_os
 989 host_vendor
 990 host_cpu
 991 host
 992 build_os
 993 build_vendor
 994 build_cpu
 995 build
 996 NICE
 997 CPIO
 998 DF
 999 READLINK
1000 CYGPATH
1001 SED
1002 FGREP
1003 EGREP
1004 GREP
1005 AWK
1006 XARGS
1007 WHICH
1008 WC
1009 UNIQ
1010 UNAME
1011 TR
1012 TOUCH
1013 TEE
1014 TAR
1015 TAIL
1016 SORT
1017 SH
1018 RMDIR
1019 RM
1020 PRINTF
1021 NAWK
1022 MV
1023 MKTEMP
1024 MKDIR
1025 LS
1026 LN
1027 HEAD
1028 FIND
1029 FILE
1030 EXPR
1031 ECHO
1032 DIRNAME
1033 DIFF
1034 DATE
1035 CUT
1036 CP
1037 COMM
1038 CMP
1039 CHMOD
1040 CAT
1041 BASH
1042 BASENAME
1043 DATE_WHEN_CONFIGURED
1044 ORIGINAL_PATH
1045 CONFIGURE_COMMAND_LINE
1046 target_alias
1047 host_alias
1048 build_alias
1049 LIBS
1050 ECHO_T
1051 ECHO_N
1052 ECHO_C
1053 DEFS
1054 mandir
1055 localedir
1056 libdir
1057 psdir
1058 pdfdir
1059 dvidir
1060 htmldir
1061 infodir
1062 docdir
1063 oldincludedir
1064 includedir
1065 localstatedir
1066 sharedstatedir
1067 sysconfdir
1068 datadir
1069 datarootdir
1070 libexecdir
1071 sbindir
1072 bindir
1073 program_transform_name
1074 prefix
1075 exec_prefix
1076 PACKAGE_URL
1077 PACKAGE_BUGREPORT
1078 PACKAGE_STRING
1079 PACKAGE_VERSION
1080 PACKAGE_TARNAME
1081 PACKAGE_NAME
1082 PATH_SEPARATOR
1083 SHELL'
1084 ac_subst_files=''
1085 ac_user_opts='
1086 enable_option_checking
1087 with_target_bits
1088 enable_openjdk_only
1089 with_custom_make_dir
1090 with_jdk_variant
1091 with_jvm_interpreter
1092 with_jvm_variants
1093 enable_debug
1094 with_debug_level
1095 with_devkit
1096 with_sys_root
1097 with_sysroot
1098 with_tools_dir
1099 with_toolchain_path
1100 with_extra_path
1101 with_sdk_name
1102 with_conf_name
1103 with_output_sync
1104 with_default_make_target
1105 enable_headful
1106 with_cacerts_file
1107 enable_unlimited_crypto
1108 with_copyright_year
1109 enable_keep_packaged_modules
1110 enable_hotspot_test_in_build
1111 with_milestone
1112 with_update_version
1113 with_user_release_suffix
1114 with_build_number
1115 with_version_string
1116 with_version_pre
1117 with_version_opt
1118 with_version_build
1119 with_version_major
1120 with_version_minor
1121 with_version_security
1122 with_version_patch
1123 with_boot_jdk
1124 with_build_jdk
1125 with_add_source_root
1126 with_override_source_root
1127 with_adds_and_overrides
1128 with_override_langtools
1129 with_override_corba
1130 with_override_jaxp
1131 with_override_jaxws
1132 with_override_hotspot
1133 with_override_nashorn
1134 with_override_jdk
1135 with_import_hotspot
1136 with_import_modules
1137 enable_static_build
1138 with_toolchain_type
1139 with_extra_cflags
1140 with_extra_cxxflags
1141 with_extra_ldflags
1142 with_toolchain_version
1143 with_build_devkit
1144 with_jtreg
1145 enable_warnings_as_errors
1146 with_native_debug_symbols
1147 enable_debug_symbols
1148 enable_zip_debug_info
1149 enable_native_coverage
1150 with_stdc__lib
1151 with_msvcr_dll
1152 with_msvcp_dll
1153 with_x
1154 with_cups
1155 with_cups_include
1156 with_freetype
1157 with_freetype_include
1158 with_freetype_lib
1159 with_freetype_src
1160 enable_freetype_bundling
1161 with_alsa
1162 with_alsa_include
1163 with_alsa_lib
1164 with_libffi
1165 with_libffi_include
1166 with_libffi_lib
1167 with_libjpeg
1168 with_giflib
1169 with_libpng
1170 with_zlib
1171 with_lcms
1172 with_dxsdk
1173 with_dxsdk_lib
1174 with_dxsdk_include
1175 with_num_cores
1176 with_memory_size
1177 with_jobs
1178 with_test_jobs
1179 with_boot_jdk_jvmargs
1180 with_sjavac_server_java
1181 enable_sjavac
1182 enable_javac_server
1183 enable_icecc
1184 enable_precompiled_headers
1185 enable_ccache
1186 with_ccache_dir
1187 '
1188       ac_precious_vars='build_alias
1189 host_alias
1190 target_alias
1191 BASENAME
1192 BASH
1193 CAT
1194 CHMOD
1195 CMP
1196 COMM
1197 CP
1198 CUT
1199 DATE
1200 DIFF
1201 DIRNAME
1202 ECHO
1203 EXPR
1204 FILE
1205 FIND
1206 HEAD
1207 LN
1208 LS
1209 MKDIR
1210 MKTEMP
1211 MV
1212 NAWK
1213 PRINTF
1214 RM
1215 RMDIR
1216 SH
1217 SORT
1218 TAIL
1219 TAR
1220 TEE
1221 TOUCH
1222 TR
1223 UNAME
1224 UNIQ
1225 WC
1226 WHICH
1227 XARGS
1228 AWK
1229 GREP
1230 EGREP
1231 FGREP
1232 SED
1233 CYGPATH
1234 READLINK
1235 DF
1236 CPIO
1237 NICE
1238 MAKE
1239 UNZIP
1240 ZIP
1241 LDD
1242 OTOOL
1243 READELF
1244 HG
1245 STAT
1246 TIME
1247 PATCH
1248 DSYMUTIL
1249 XATTR
1250 CODESIGN
1251 SETFILE
1252 PKG_CONFIG
1253 JAVA
1254 JAVAC
1255 JAVAH
1256 JAR
1257 JARSIGNER
1258 CC
1259 CFLAGS
1260 LDFLAGS
1261 LIBS
1262 CPPFLAGS
1263 CXX
1264 CXXFLAGS
1265 CCC
1266 CPP
1267 CXXCPP
1268 AS
1269 AR
1270 LIPO
1271 STRIP
1272 NM
1273 GNM
1274 OBJCOPY
1275 OBJDUMP
1276 BUILD_CC
1277 BUILD_CXX
1278 BUILD_NM
1279 BUILD_AR
1280 BUILD_OBJCOPY
1281 BUILD_STRIP
1282 JTREGEXE
1283 XMKMF
1284 FREETYPE_CFLAGS
1285 FREETYPE_LIBS
1286 ALSA_CFLAGS
1287 ALSA_LIBS
1288 LIBFFI_CFLAGS
1289 LIBFFI_LIBS
1290 PNG_CFLAGS
1291 PNG_LIBS
1292 LCMS_CFLAGS
1293 LCMS_LIBS
1294 ICECC_CMD
1295 ICECC_CREATE_ENV
1296 ICECC_WRAPPER
1297 CCACHE'
1298 
1299 
1300 # Initialize some variables set by options.
1301 ac_init_help=
1302 ac_init_version=false
1303 ac_unrecognized_opts=
1304 ac_unrecognized_sep=
1305 # The variables have the same names as the options, with
1306 # dashes changed to underlines.
1307 cache_file=/dev/null
1308 exec_prefix=NONE
1309 no_create=
1310 no_recursion=
1311 prefix=NONE
1312 program_prefix=NONE
1313 program_suffix=NONE
1314 program_transform_name=s,x,x,
1315 silent=
1316 site=
1317 srcdir=
1318 verbose=
1319 x_includes=NONE
1320 x_libraries=NONE
1321 
1322 # Installation directory options.
1323 # These are left unexpanded so users can "make install exec_prefix=/foo"
1324 # and all the variables that are supposed to be based on exec_prefix
1325 # by default will actually change.
1326 # Use braces instead of parens because sh, perl, etc. also accept them.
1327 # (The list follows the same order as the GNU Coding Standards.)
1328 bindir='${exec_prefix}/bin'
1329 sbindir='${exec_prefix}/sbin'
1330 libexecdir='${exec_prefix}/libexec'
1331 datarootdir='${prefix}/share'
1332 datadir='${datarootdir}'
1333 sysconfdir='${prefix}/etc'
1334 sharedstatedir='${prefix}/com'
1335 localstatedir='${prefix}/var'
1336 includedir='${prefix}/include'
1337 oldincludedir='/usr/include'
1338 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1339 infodir='${datarootdir}/info'
1340 htmldir='${docdir}'
1341 dvidir='${docdir}'
1342 pdfdir='${docdir}'
1343 psdir='${docdir}'
1344 libdir='${exec_prefix}/lib'
1345 localedir='${datarootdir}/locale'
1346 mandir='${datarootdir}/man'
1347 
1348 ac_prev=
1349 ac_dashdash=
1350 for ac_option
1351 do
1352   # If the previous option needs an argument, assign it.
1353   if test -n "$ac_prev"; then
1354     eval $ac_prev=\$ac_option
1355     ac_prev=
1356     continue
1357   fi
1358 
1359   case $ac_option in
1360   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1361   *=)   ac_optarg= ;;
1362   *)    ac_optarg=yes ;;
1363   esac
1364 
1365   # Accept the important Cygnus configure options, so we can diagnose typos.
1366 
1367   case $ac_dashdash$ac_option in
1368   --)
1369     ac_dashdash=yes ;;
1370 
1371   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1372     ac_prev=bindir ;;
1373   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1374     bindir=$ac_optarg ;;
1375 
1376   -build | --build | --buil | --bui | --bu)
1377     ac_prev=build_alias ;;
1378   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1379     build_alias=$ac_optarg ;;
1380 
1381   -cache-file | --cache-file | --cache-fil | --cache-fi \
1382   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1383     ac_prev=cache_file ;;
1384   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1385   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1386     cache_file=$ac_optarg ;;
1387 
1388   --config-cache | -C)
1389     cache_file=config.cache ;;
1390 
1391   -datadir | --datadir | --datadi | --datad)
1392     ac_prev=datadir ;;
1393   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1394     datadir=$ac_optarg ;;
1395 
1396   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1397   | --dataroo | --dataro | --datar)
1398     ac_prev=datarootdir ;;
1399   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1400   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1401     datarootdir=$ac_optarg ;;
1402 
1403   -disable-* | --disable-*)
1404     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1405     # Reject names that are not valid shell variable names.
1406     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1407       as_fn_error $? "invalid feature name: $ac_useropt"
1408     ac_useropt_orig=$ac_useropt
1409     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1410     case $ac_user_opts in
1411       *"
1412 "enable_$ac_useropt"
1413 "*) ;;
1414       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1415          ac_unrecognized_sep=', ';;
1416     esac
1417     eval enable_$ac_useropt=no ;;
1418 
1419   -docdir | --docdir | --docdi | --doc | --do)
1420     ac_prev=docdir ;;
1421   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1422     docdir=$ac_optarg ;;
1423 
1424   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1425     ac_prev=dvidir ;;
1426   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1427     dvidir=$ac_optarg ;;
1428 
1429   -enable-* | --enable-*)
1430     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1431     # Reject names that are not valid shell variable names.
1432     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1433       as_fn_error $? "invalid feature name: $ac_useropt"
1434     ac_useropt_orig=$ac_useropt
1435     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1436     case $ac_user_opts in
1437       *"
1438 "enable_$ac_useropt"
1439 "*) ;;
1440       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1441          ac_unrecognized_sep=', ';;
1442     esac
1443     eval enable_$ac_useropt=\$ac_optarg ;;
1444 
1445   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1446   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1447   | --exec | --exe | --ex)
1448     ac_prev=exec_prefix ;;
1449   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1450   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1451   | --exec=* | --exe=* | --ex=*)
1452     exec_prefix=$ac_optarg ;;
1453 
1454   -gas | --gas | --ga | --g)
1455     # Obsolete; use --with-gas.
1456     with_gas=yes ;;
1457 
1458   -help | --help | --hel | --he | -h)
1459     ac_init_help=long ;;
1460   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1461     ac_init_help=recursive ;;
1462   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1463     ac_init_help=short ;;
1464 
1465   -host | --host | --hos | --ho)
1466     ac_prev=host_alias ;;
1467   -host=* | --host=* | --hos=* | --ho=*)
1468     host_alias=$ac_optarg ;;
1469 
1470   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1471     ac_prev=htmldir ;;
1472   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1473   | --ht=*)
1474     htmldir=$ac_optarg ;;
1475 
1476   -includedir | --includedir | --includedi | --included | --include \
1477   | --includ | --inclu | --incl | --inc)
1478     ac_prev=includedir ;;
1479   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1480   | --includ=* | --inclu=* | --incl=* | --inc=*)
1481     includedir=$ac_optarg ;;
1482 
1483   -infodir | --infodir | --infodi | --infod | --info | --inf)
1484     ac_prev=infodir ;;
1485   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1486     infodir=$ac_optarg ;;
1487 
1488   -libdir | --libdir | --libdi | --libd)
1489     ac_prev=libdir ;;
1490   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1491     libdir=$ac_optarg ;;
1492 
1493   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1494   | --libexe | --libex | --libe)
1495     ac_prev=libexecdir ;;
1496   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1497   | --libexe=* | --libex=* | --libe=*)
1498     libexecdir=$ac_optarg ;;
1499 
1500   -localedir | --localedir | --localedi | --localed | --locale)
1501     ac_prev=localedir ;;
1502   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1503     localedir=$ac_optarg ;;
1504 
1505   -localstatedir | --localstatedir | --localstatedi | --localstated \
1506   | --localstate | --localstat | --localsta | --localst | --locals)
1507     ac_prev=localstatedir ;;
1508   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1509   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1510     localstatedir=$ac_optarg ;;
1511 
1512   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1513     ac_prev=mandir ;;
1514   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1515     mandir=$ac_optarg ;;
1516 
1517   -nfp | --nfp | --nf)
1518     # Obsolete; use --without-fp.
1519     with_fp=no ;;
1520 
1521   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1522   | --no-cr | --no-c | -n)
1523     no_create=yes ;;
1524 
1525   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1526   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1527     no_recursion=yes ;;
1528 
1529   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1530   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1531   | --oldin | --oldi | --old | --ol | --o)
1532     ac_prev=oldincludedir ;;
1533   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1534   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1535   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1536     oldincludedir=$ac_optarg ;;
1537 
1538   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1539     ac_prev=prefix ;;
1540   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1541     prefix=$ac_optarg ;;
1542 
1543   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1544   | --program-pre | --program-pr | --program-p)
1545     ac_prev=program_prefix ;;
1546   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1547   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1548     program_prefix=$ac_optarg ;;
1549 
1550   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1551   | --program-suf | --program-su | --program-s)
1552     ac_prev=program_suffix ;;
1553   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1554   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1555     program_suffix=$ac_optarg ;;
1556 
1557   -program-transform-name | --program-transform-name \
1558   | --program-transform-nam | --program-transform-na \
1559   | --program-transform-n | --program-transform- \
1560   | --program-transform | --program-transfor \
1561   | --program-transfo | --program-transf \
1562   | --program-trans | --program-tran \
1563   | --progr-tra | --program-tr | --program-t)
1564     ac_prev=program_transform_name ;;
1565   -program-transform-name=* | --program-transform-name=* \
1566   | --program-transform-nam=* | --program-transform-na=* \
1567   | --program-transform-n=* | --program-transform-=* \
1568   | --program-transform=* | --program-transfor=* \
1569   | --program-transfo=* | --program-transf=* \
1570   | --program-trans=* | --program-tran=* \
1571   | --progr-tra=* | --program-tr=* | --program-t=*)
1572     program_transform_name=$ac_optarg ;;
1573 
1574   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1575     ac_prev=pdfdir ;;
1576   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1577     pdfdir=$ac_optarg ;;
1578 
1579   -psdir | --psdir | --psdi | --psd | --ps)
1580     ac_prev=psdir ;;
1581   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1582     psdir=$ac_optarg ;;
1583 
1584   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1585   | -silent | --silent | --silen | --sile | --sil)
1586     silent=yes ;;
1587 
1588   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1589     ac_prev=sbindir ;;
1590   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1591   | --sbi=* | --sb=*)
1592     sbindir=$ac_optarg ;;
1593 
1594   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1595   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1596   | --sharedst | --shareds | --shared | --share | --shar \
1597   | --sha | --sh)
1598     ac_prev=sharedstatedir ;;
1599   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1600   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1601   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1602   | --sha=* | --sh=*)
1603     sharedstatedir=$ac_optarg ;;
1604 
1605   -site | --site | --sit)
1606     ac_prev=site ;;
1607   -site=* | --site=* | --sit=*)
1608     site=$ac_optarg ;;
1609 
1610   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1611     ac_prev=srcdir ;;
1612   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1613     srcdir=$ac_optarg ;;
1614 
1615   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1616   | --syscon | --sysco | --sysc | --sys | --sy)
1617     ac_prev=sysconfdir ;;
1618   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1619   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1620     sysconfdir=$ac_optarg ;;
1621 
1622   -target | --target | --targe | --targ | --tar | --ta | --t)
1623     ac_prev=target_alias ;;
1624   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1625     target_alias=$ac_optarg ;;
1626 
1627   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1628     verbose=yes ;;
1629 
1630   -version | --version | --versio | --versi | --vers | -V)
1631     ac_init_version=: ;;
1632 
1633   -with-* | --with-*)
1634     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1635     # Reject names that are not valid shell variable names.
1636     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1637       as_fn_error $? "invalid package name: $ac_useropt"
1638     ac_useropt_orig=$ac_useropt
1639     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1640     case $ac_user_opts in
1641       *"
1642 "with_$ac_useropt"
1643 "*) ;;
1644       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1645          ac_unrecognized_sep=', ';;
1646     esac
1647     eval with_$ac_useropt=\$ac_optarg ;;
1648 
1649   -without-* | --without-*)
1650     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1651     # Reject names that are not valid shell variable names.
1652     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1653       as_fn_error $? "invalid package name: $ac_useropt"
1654     ac_useropt_orig=$ac_useropt
1655     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1656     case $ac_user_opts in
1657       *"
1658 "with_$ac_useropt"
1659 "*) ;;
1660       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1661          ac_unrecognized_sep=', ';;
1662     esac
1663     eval with_$ac_useropt=no ;;
1664 
1665   --x)
1666     # Obsolete; use --with-x.
1667     with_x=yes ;;
1668 
1669   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1670   | --x-incl | --x-inc | --x-in | --x-i)
1671     ac_prev=x_includes ;;
1672   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1673   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1674     x_includes=$ac_optarg ;;
1675 
1676   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1677   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1678     ac_prev=x_libraries ;;
1679   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1680   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1681     x_libraries=$ac_optarg ;;
1682 
1683   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1684 Try \`$0 --help' for more information"
1685     ;;
1686 
1687   *=*)
1688     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1689     # Reject names that are not valid shell variable names.
1690     case $ac_envvar in #(
1691       '' | [0-9]* | *[!_$as_cr_alnum]* )
1692       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1693     esac
1694     eval $ac_envvar=\$ac_optarg
1695     export $ac_envvar ;;
1696 
1697   *)
1698     # FIXME: should be removed in autoconf 3.0.
1699     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1700     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1701       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1702     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1703     ;;
1704 
1705   esac
1706 done
1707 
1708 if test -n "$ac_prev"; then
1709   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1710   as_fn_error $? "missing argument to $ac_option"
1711 fi
1712 
1713 if test -n "$ac_unrecognized_opts"; then
1714   case $enable_option_checking in
1715     no) ;;
1716     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1717     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1718   esac
1719 fi
1720 
1721 # Check all directory arguments for consistency.
1722 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1723                 datadir sysconfdir sharedstatedir localstatedir includedir \
1724                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1725                 libdir localedir mandir
1726 do
1727   eval ac_val=\$$ac_var
1728   # Remove trailing slashes.
1729   case $ac_val in
1730     */ )
1731       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1732       eval $ac_var=\$ac_val;;
1733   esac
1734   # Be sure to have absolute directory names.
1735   case $ac_val in
1736     [\\/$]* | ?:[\\/]* )  continue;;
1737     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1738   esac
1739   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1740 done
1741 
1742 # There might be people who depend on the old broken behavior: `$host'
1743 # used to hold the argument of --host etc.
1744 # FIXME: To remove some day.
1745 build=$build_alias
1746 host=$host_alias
1747 target=$target_alias
1748 
1749 # FIXME: To remove some day.
1750 if test "x$host_alias" != x; then
1751   if test "x$build_alias" = x; then
1752     cross_compiling=maybe
1753   elif test "x$build_alias" != "x$host_alias"; then
1754     cross_compiling=yes
1755   fi
1756 fi
1757 
1758 ac_tool_prefix=
1759 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1760 
1761 test "$silent" = yes && exec 6>/dev/null
1762 
1763 
1764 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1765 ac_ls_di=`ls -di .` &&
1766 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1767   as_fn_error $? "working directory cannot be determined"
1768 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1769   as_fn_error $? "pwd does not report name of working directory"
1770 
1771 
1772 # Find the source files, if location was not specified.
1773 if test -z "$srcdir"; then
1774   ac_srcdir_defaulted=yes
1775   # Try the directory containing this script, then the parent directory.
1776   ac_confdir=`$as_dirname -- "$as_myself" ||
1777 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1778          X"$as_myself" : 'X\(//\)[^/]' \| \
1779          X"$as_myself" : 'X\(//\)$' \| \
1780          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1781 $as_echo X"$as_myself" |
1782     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1783             s//\1/
1784             q
1785           }
1786           /^X\(\/\/\)[^/].*/{
1787             s//\1/
1788             q
1789           }
1790           /^X\(\/\/\)$/{
1791             s//\1/
1792             q
1793           }
1794           /^X\(\/\).*/{
1795             s//\1/
1796             q
1797           }
1798           s/.*/./; q'`
1799   srcdir=$ac_confdir
1800   if test ! -r "$srcdir/$ac_unique_file"; then
1801     srcdir=..
1802   fi
1803 else
1804   ac_srcdir_defaulted=no
1805 fi
1806 if test ! -r "$srcdir/$ac_unique_file"; then
1807   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1808   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1809 fi
1810 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1811 ac_abs_confdir=`(
1812         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1813         pwd)`
1814 # When building in place, set srcdir=.
1815 if test "$ac_abs_confdir" = "$ac_pwd"; then
1816   srcdir=.
1817 fi
1818 # Remove unnecessary trailing slashes from srcdir.
1819 # Double slashes in file names in object file debugging info
1820 # mess up M-x gdb in Emacs.
1821 case $srcdir in
1822 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1823 esac
1824 for ac_var in $ac_precious_vars; do
1825   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1826   eval ac_env_${ac_var}_value=\$${ac_var}
1827   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1828   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1829 done
1830 
1831 #
1832 # Report the --help message.
1833 #
1834 if test "$ac_init_help" = "long"; then
1835   # Omit some internal or obsolete options to make the list less imposing.
1836   # This message is too long to be a string in the A/UX 3.1 sh.
1837   cat <<_ACEOF
1838 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1839 
1840 Usage: $0 [OPTION]... [VAR=VALUE]...
1841 
1842 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1843 VAR=VALUE.  See below for descriptions of some of the useful variables.
1844 
1845 Defaults for the options are specified in brackets.
1846 
1847 Configuration:
1848   -h, --help              display this help and exit
1849       --help=short        display options specific to this package
1850       --help=recursive    display the short help of all the included packages
1851   -V, --version           display version information and exit
1852   -q, --quiet, --silent   do not print \`checking ...' messages
1853       --cache-file=FILE   cache test results in FILE [disabled]
1854   -C, --config-cache      alias for \`--cache-file=config.cache'
1855   -n, --no-create         do not create output files
1856       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1857 
1858 Installation directories:
1859   --prefix=PREFIX         install architecture-independent files in PREFIX
1860                           [$ac_default_prefix]
1861   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1862                           [PREFIX]
1863 
1864 By default, \`make install' will install all the files in
1865 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1866 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1867 for instance \`--prefix=\$HOME'.
1868 
1869 For better control, use the options below.
1870 
1871 Fine tuning of the installation directories:
1872   --bindir=DIR            user executables [EPREFIX/bin]
1873   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1874   --libexecdir=DIR        program executables [EPREFIX/libexec]
1875   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1876   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1877   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1878   --libdir=DIR            object code libraries [EPREFIX/lib]
1879   --includedir=DIR        C header files [PREFIX/include]
1880   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1881   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1882   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1883   --infodir=DIR           info documentation [DATAROOTDIR/info]
1884   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1885   --mandir=DIR            man documentation [DATAROOTDIR/man]
1886   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1887   --htmldir=DIR           html documentation [DOCDIR]
1888   --dvidir=DIR            dvi documentation [DOCDIR]
1889   --pdfdir=DIR            pdf documentation [DOCDIR]
1890   --psdir=DIR             ps documentation [DOCDIR]
1891 _ACEOF
1892 
1893   cat <<\_ACEOF
1894 
1895 X features:
1896   --x-includes=DIR    X include files are in DIR
1897   --x-libraries=DIR   X library files are in DIR
1898 
1899 System types:
1900   --build=BUILD     configure for building on BUILD [guessed]
1901   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1902   --target=TARGET   configure for building compilers for TARGET [HOST]
1903 _ACEOF
1904 fi
1905 
1906 if test -n "$ac_init_help"; then
1907   case $ac_init_help in
1908      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1909    esac
1910   cat <<\_ACEOF
1911 
1912 Optional Features:
1913   --disable-option-checking  ignore unrecognized --enable/--with options
1914   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1915   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1916   --enable-openjdk-only   suppress building custom source even if present
1917                           [disabled]
1918   --enable-debug          set the debug level to fastdebug (shorthand for
1919                           --with-debug-level=fastdebug) [disabled]
1920   --disable-headful       disable building headful support (graphical UI
1921                           support) [enabled]
1922   --enable-unlimited-crypto
1923                           Enable unlimited crypto policy [disabled]
1924   --disable-keep-packaged-modules
1925                           Do not keep packaged modules in jdk image [enable]
1926   --enable-hotspot-test-in-build
1927                           run the Queens test after Hotspot build [disabled]
1928   --enable-static-build   enable static library build [disabled]
1929   --disable-warnings-as-errors
1930                           do not consider native warnings to be an error
1931                           [enabled]
1932   --enable-debug-symbols  Deprecated. Option is kept for backwards
1933                           compatibility and is ignored
1934   --enable-zip-debug-info Deprecated. Option is kept for backwards
1935                           compatibility and is ignored
1936   --enable-native-coverage
1937                           enable native compilation with code coverage
1938                           data[disabled]
1939   --disable-freetype-bundling
1940                           disable bundling of the freetype library with the
1941                           build result [enabled on Windows or when using
1942                           --with-freetype, disabled otherwise]
1943   --enable-sjavac         use sjavac to do fast incremental compiles
1944                           [disabled]
1945   --disable-javac-server  disable javac server [enabled]
1946   --enable-icecc          enable distribted compilation of native code using
1947                           icecc/icecream [disabled]
1948   --disable-precompiled-headers
1949                           disable using precompiled headers when compiling C++
1950                           [enabled]
1951   --enable-ccache         enable using ccache to speed up recompilations
1952                           [disabled]
1953 
1954 Optional Packages:
1955   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1956   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1957   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1958                           support it), e.g. --with-target-bits=32 [guessed]
1959   --with-custom-make-dir  Deprecated. Option is kept for backwards
1960                           compatibility and is ignored
1961   --with-jdk-variant      JDK variant to build (normal) [normal]
1962   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1963   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1964                           client, minimal1, zero, zeroshark, core) [server]
1965   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1966                           optimized) [release]
1967   --with-devkit           use this devkit for compilers, tools and resources
1968   --with-sys-root         alias for --with-sysroot for backwards compatability
1969   --with-sysroot          use this directory as sysroot
1970   --with-tools-dir        alias for --with-toolchain-path for backwards
1971                           compatibility
1972   --with-toolchain-path   prepend these directories when searching for
1973                           toolchain binaries (compilers etc)
1974   --with-extra-path       prepend these directories to the default path
1975   --with-sdk-name         use the platform SDK of the given name. [macosx]
1976   --with-conf-name        use this as the name of the configuration [generated
1977                           from important configuration options]
1978   --with-output-sync      set make output sync type if supported by make.
1979                           [recurse]
1980   --with-default-make-target
1981                           set the default make target [exploded-image]
1982   --with-cacerts-file     specify alternative cacerts file
1983   --with-copyright-year   Set copyright year value for build [current year]
1984   --with-milestone        Deprecated. Option is kept for backwards
1985                           compatibility and is ignored
1986   --with-update-version   Deprecated. Option is kept for backwards
1987                           compatibility and is ignored
1988   --with-user-release-suffix
1989                           Deprecated. Option is kept for backwards
1990                           compatibility and is ignored
1991   --with-build-number     Deprecated. Option is kept for backwards
1992                           compatibility and is ignored
1993   --with-version-string   Set version string [calculated]
1994   --with-version-pre      Set the base part of the version 'PRE' field
1995                           (pre-release identifier) ['internal']
1996   --with-version-opt      Set version 'OPT' field (build metadata)
1997                           [<timestamp>.<user>.<dirname>]
1998   --with-version-build    Set version 'BUILD' field (build number) [not
1999                           specified]
2000   --with-version-major    Set version 'MAJOR' field (first number) [current
2001                           source value]
2002   --with-version-minor    Set version 'MINOR' field (second number) [current
2003                           source value]
2004   --with-version-security Set version 'SECURITY' field (third number) [current
2005                           source value]
2006   --with-version-patch    Set version 'PATCH' field (fourth number) [not
2007                           specified]
2008   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2009   --with-build-jdk        path to JDK of same version as is being built[the
2010                           newly built JDK]
2011   --with-add-source-root  Deprecated. Option is kept for backwards
2012                           compatibility and is ignored
2013   --with-override-source-root
2014                           Deprecated. Option is kept for backwards
2015                           compatibility and is ignored
2016   --with-adds-and-overrides
2017                           Deprecated. Option is kept for backwards
2018                           compatibility and is ignored
2019   --with-override-langtools
2020                           Deprecated. Option is kept for backwards
2021                           compatibility and is ignored
2022   --with-override-corba   Deprecated. Option is kept for backwards
2023                           compatibility and is ignored
2024   --with-override-jaxp    Deprecated. Option is kept for backwards
2025                           compatibility and is ignored
2026   --with-override-jaxws   Deprecated. Option is kept for backwards
2027                           compatibility and is ignored
2028   --with-override-hotspot Deprecated. Option is kept for backwards
2029                           compatibility and is ignored
2030   --with-override-nashorn Deprecated. Option is kept for backwards
2031                           compatibility and is ignored
2032   --with-override-jdk     Deprecated. Option is kept for backwards
2033                           compatibility and is ignored
2034   --with-import-hotspot   import hotspot binaries from this jdk image or
2035                           hotspot build dist dir instead of building from
2036                           source
2037   --with-import-modules   import a set of prebuilt modules either as a zip
2038                           file or an exploded directory
2039   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2040                           to show possible values [platform dependent]
2041   --with-extra-cflags     extra flags to be used when compiling jdk c-files
2042   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2043   --with-extra-ldflags    extra flags to be used when linking jdk
2044   --with-toolchain-version
2045                           the version of the toolchain to look for, use
2046                           '--help' to show possible values [platform
2047                           dependent]
2048   --with-build-devkit     Devkit to use for the build platform toolchain
2049   --with-jtreg            Regression Test Harness [probed]
2050   --with-native-debug-symbols
2051                           set the native debug symbol configuration (none,
2052                           internal, external, zipped) [varying]
2053   --with-stdc++lib=<static>,<dynamic>,<default>
2054                           force linking of the C++ runtime on Linux to either
2055                           static or dynamic, default is static with dynamic as
2056                           fallback
2057   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2058                           (Windows only) [probed]
2059   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2060                           (Windows only) [probed]
2061   --with-x                use the X Window System
2062   --with-cups             specify prefix directory for the cups package
2063                           (expecting the headers under PATH/include)
2064   --with-cups-include     specify directory for the cups include files
2065   --with-freetype         specify prefix directory for the freetype package
2066                           (expecting the libraries under PATH/lib and the
2067                           headers under PATH/include)
2068   --with-freetype-include specify directory for the freetype include files
2069   --with-freetype-lib     specify directory for the freetype library
2070   --with-freetype-src     specify directory with freetype sources to
2071                           automatically build the library (experimental,
2072                           Windows-only)
2073   --with-alsa             specify prefix directory for the alsa package
2074                           (expecting the libraries under PATH/lib and the
2075                           headers under PATH/include)
2076   --with-alsa-include     specify directory for the alsa include files
2077   --with-alsa-lib         specify directory for the alsa library
2078   --with-libffi           specify prefix directory for the libffi package
2079                           (expecting the libraries under PATH/lib and the
2080                           headers under PATH/include)
2081   --with-libffi-include   specify directory for the libffi include files
2082   --with-libffi-lib       specify directory for the libffi library
2083   --with-libjpeg          use libjpeg from build system or OpenJDK source
2084                           (system, bundled) [bundled]
2085   --with-giflib           use giflib from build system or OpenJDK source
2086                           (system, bundled) [bundled]
2087   --with-libpng           use libpng from build system or OpenJDK source
2088                           (system, bundled) [bundled]
2089   --with-zlib             use zlib from build system or OpenJDK source
2090                           (system, bundled) [bundled]
2091   --with-lcms             use lcms2 from build system or OpenJDK source
2092                           (system, bundled) [bundled]
2093   --with-dxsdk            Deprecated. Option is kept for backwards
2094                           compatibility and is ignored
2095   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2096                           compatibility and is ignored
2097   --with-dxsdk-include    Deprecated. Option is kept for backwards
2098                           compatibility and is ignored
2099   --with-num-cores        number of cores in the build system, e.g.
2100                           --with-num-cores=8 [probed]
2101   --with-memory-size      memory (in MB) available in the build system, e.g.
2102                           --with-memory-size=1024 [probed]
2103   --with-jobs             number of parallel jobs to let make run [calculated
2104                           based on cores and memory]
2105   --with-test-jobs        number of parallel tests jobs to run [based on build
2106                           jobs]
2107   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2108                           invocations of boot JDK, overriding the default
2109                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2110                           -enableassertions"
2111   --with-sjavac-server-java
2112                           use this java binary for running the sjavac
2113                           background server [Boot JDK java]
2114   --with-ccache-dir       where to store ccache files [~/.ccache]
2115 
2116 Some influential environment variables:
2117   BASENAME    Override default value for BASENAME
2118   BASH        Override default value for BASH
2119   CAT         Override default value for CAT
2120   CHMOD       Override default value for CHMOD
2121   CMP         Override default value for CMP
2122   COMM        Override default value for COMM
2123   CP          Override default value for CP
2124   CUT         Override default value for CUT
2125   DATE        Override default value for DATE
2126   DIFF        Override default value for DIFF
2127   DIRNAME     Override default value for DIRNAME
2128   ECHO        Override default value for ECHO
2129   EXPR        Override default value for EXPR
2130   FILE        Override default value for FILE
2131   FIND        Override default value for FIND
2132   HEAD        Override default value for HEAD
2133   LN          Override default value for LN
2134   LS          Override default value for LS
2135   MKDIR       Override default value for MKDIR
2136   MKTEMP      Override default value for MKTEMP
2137   MV          Override default value for MV
2138   NAWK        Override default value for NAWK
2139   PRINTF      Override default value for PRINTF
2140   RM          Override default value for RM
2141   RMDIR       Override default value for RMDIR
2142   SH          Override default value for SH
2143   SORT        Override default value for SORT
2144   TAIL        Override default value for TAIL
2145   TAR         Override default value for TAR
2146   TEE         Override default value for TEE
2147   TOUCH       Override default value for TOUCH
2148   TR          Override default value for TR
2149   UNAME       Override default value for UNAME
2150   UNIQ        Override default value for UNIQ
2151   WC          Override default value for WC
2152   WHICH       Override default value for WHICH
2153   XARGS       Override default value for XARGS
2154   AWK         Override default value for AWK
2155   GREP        Override default value for GREP
2156   EGREP       Override default value for EGREP
2157   FGREP       Override default value for FGREP
2158   SED         Override default value for SED
2159   CYGPATH     Override default value for CYGPATH
2160   READLINK    Override default value for READLINK
2161   DF          Override default value for DF
2162   CPIO        Override default value for CPIO
2163   NICE        Override default value for NICE
2164   MAKE        Override default value for MAKE
2165   UNZIP       Override default value for UNZIP
2166   ZIP         Override default value for ZIP
2167   LDD         Override default value for LDD
2168   OTOOL       Override default value for OTOOL
2169   READELF     Override default value for READELF
2170   HG          Override default value for HG
2171   STAT        Override default value for STAT
2172   TIME        Override default value for TIME
2173   PATCH       Override default value for PATCH
2174   DSYMUTIL    Override default value for DSYMUTIL
2175   XATTR       Override default value for XATTR
2176   CODESIGN    Override default value for CODESIGN
2177   SETFILE     Override default value for SETFILE
2178   PKG_CONFIG  path to pkg-config utility
2179   JAVA        Override default value for JAVA
2180   JAVAC       Override default value for JAVAC
2181   JAVAH       Override default value for JAVAH
2182   JAR         Override default value for JAR
2183   JARSIGNER   Override default value for JARSIGNER
2184   CC          C compiler command
2185   CFLAGS      C compiler flags
2186   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2187               nonstandard directory <lib dir>
2188   LIBS        libraries to pass to the linker, e.g. -l<library>
2189   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2190               you have headers in a nonstandard directory <include dir>
2191   CXX         C++ compiler command
2192   CXXFLAGS    C++ compiler flags
2193   CPP         C preprocessor
2194   CXXCPP      C++ preprocessor
2195   AS          Override default value for AS
2196   AR          Override default value for AR
2197   LIPO        Override default value for LIPO
2198   STRIP       Override default value for STRIP
2199   NM          Override default value for NM
2200   GNM         Override default value for GNM
2201   OBJCOPY     Override default value for OBJCOPY
2202   OBJDUMP     Override default value for OBJDUMP
2203   BUILD_CC    Override default value for BUILD_CC
2204   BUILD_CXX   Override default value for BUILD_CXX
2205   BUILD_NM    Override default value for BUILD_NM
2206   BUILD_AR    Override default value for BUILD_AR
2207   BUILD_OBJCOPY
2208               Override default value for BUILD_OBJCOPY
2209   BUILD_STRIP Override default value for BUILD_STRIP
2210   JTREGEXE    Override default value for JTREGEXE
2211   XMKMF       Path to xmkmf, Makefile generator for X Window System
2212   FREETYPE_CFLAGS
2213               C compiler flags for FREETYPE, overriding pkg-config
2214   FREETYPE_LIBS
2215               linker flags for FREETYPE, overriding pkg-config
2216   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2217   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2218   LIBFFI_CFLAGS
2219               C compiler flags for LIBFFI, overriding pkg-config
2220   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2221   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2222   PNG_LIBS    linker flags for PNG, overriding pkg-config
2223   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2224   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2225   ICECC_CMD   Override default value for ICECC_CMD
2226   ICECC_CREATE_ENV
2227               Override default value for ICECC_CREATE_ENV
2228   ICECC_WRAPPER
2229               Override default value for ICECC_WRAPPER
2230   CCACHE      Override default value for CCACHE
2231 
2232 Use these variables to override the choices made by `configure' or to help
2233 it to find libraries and programs with nonstandard names/locations.
2234 
2235 Report bugs to <build-dev@openjdk.java.net>.
2236 OpenJDK home page: <http://openjdk.java.net>.
2237 _ACEOF
2238 ac_status=$?
2239 fi
2240 
2241 if test "$ac_init_help" = "recursive"; then
2242   # If there are subdirs, report their specific --help.
2243   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2244     test -d "$ac_dir" ||
2245       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2246       continue
2247     ac_builddir=.
2248 
2249 case "$ac_dir" in
2250 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2251 *)
2252   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2253   # A ".." for each directory in $ac_dir_suffix.
2254   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2255   case $ac_top_builddir_sub in
2256   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2257   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2258   esac ;;
2259 esac
2260 ac_abs_top_builddir=$ac_pwd
2261 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2262 # for backward compatibility:
2263 ac_top_builddir=$ac_top_build_prefix
2264 
2265 case $srcdir in
2266   .)  # We are building in place.
2267     ac_srcdir=.
2268     ac_top_srcdir=$ac_top_builddir_sub
2269     ac_abs_top_srcdir=$ac_pwd ;;
2270   [\\/]* | ?:[\\/]* )  # Absolute name.
2271     ac_srcdir=$srcdir$ac_dir_suffix;
2272     ac_top_srcdir=$srcdir
2273     ac_abs_top_srcdir=$srcdir ;;
2274   *) # Relative name.
2275     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2276     ac_top_srcdir=$ac_top_build_prefix$srcdir
2277     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2278 esac
2279 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2280 
2281     cd "$ac_dir" || { ac_status=$?; continue; }
2282     # Check for guested configure.
2283     if test -f "$ac_srcdir/configure.gnu"; then
2284       echo &&
2285       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2286     elif test -f "$ac_srcdir/configure"; then
2287       echo &&
2288       $SHELL "$ac_srcdir/configure" --help=recursive
2289     else
2290       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2291     fi || ac_status=$?
2292     cd "$ac_pwd" || { ac_status=$?; break; }
2293   done
2294 fi
2295 
2296 test -n "$ac_init_help" && exit $ac_status
2297 if $ac_init_version; then
2298   cat <<\_ACEOF
2299 OpenJDK configure jdk9
2300 generated by GNU Autoconf 2.69
2301 
2302 Copyright (C) 2012 Free Software Foundation, Inc.
2303 This configure script is free software; the Free Software Foundation
2304 gives unlimited permission to copy, distribute and modify it.
2305 _ACEOF
2306   exit
2307 fi
2308 
2309 ## ------------------------ ##
2310 ## Autoconf initialization. ##
2311 ## ------------------------ ##
2312 
2313 # ac_fn_c_try_compile LINENO
2314 # --------------------------
2315 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2316 ac_fn_c_try_compile ()
2317 {
2318   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2319   rm -f conftest.$ac_objext
2320   if { { ac_try="$ac_compile"
2321 case "(($ac_try" in
2322   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2323   *) ac_try_echo=$ac_try;;
2324 esac
2325 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2326 $as_echo "$ac_try_echo"; } >&5
2327   (eval "$ac_compile") 2>conftest.err
2328   ac_status=$?
2329   if test -s conftest.err; then
2330     grep -v '^ *+' conftest.err >conftest.er1
2331     cat conftest.er1 >&5
2332     mv -f conftest.er1 conftest.err
2333   fi
2334   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2335   test $ac_status = 0; } && {
2336          test -z "$ac_c_werror_flag" ||
2337          test ! -s conftest.err
2338        } && test -s conftest.$ac_objext; then :
2339   ac_retval=0
2340 else
2341   $as_echo "$as_me: failed program was:" >&5
2342 sed 's/^/| /' conftest.$ac_ext >&5
2343 
2344         ac_retval=1
2345 fi
2346   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2347   as_fn_set_status $ac_retval
2348 
2349 } # ac_fn_c_try_compile
2350 
2351 # ac_fn_cxx_try_compile LINENO
2352 # ----------------------------
2353 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2354 ac_fn_cxx_try_compile ()
2355 {
2356   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2357   rm -f conftest.$ac_objext
2358   if { { ac_try="$ac_compile"
2359 case "(($ac_try" in
2360   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2361   *) ac_try_echo=$ac_try;;
2362 esac
2363 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2364 $as_echo "$ac_try_echo"; } >&5
2365   (eval "$ac_compile") 2>conftest.err
2366   ac_status=$?
2367   if test -s conftest.err; then
2368     grep -v '^ *+' conftest.err >conftest.er1
2369     cat conftest.er1 >&5
2370     mv -f conftest.er1 conftest.err
2371   fi
2372   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2373   test $ac_status = 0; } && {
2374          test -z "$ac_cxx_werror_flag" ||
2375          test ! -s conftest.err
2376        } && test -s conftest.$ac_objext; then :
2377   ac_retval=0
2378 else
2379   $as_echo "$as_me: failed program was:" >&5
2380 sed 's/^/| /' conftest.$ac_ext >&5
2381 
2382         ac_retval=1
2383 fi
2384   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2385   as_fn_set_status $ac_retval
2386 
2387 } # ac_fn_cxx_try_compile
2388 
2389 # ac_fn_c_try_cpp LINENO
2390 # ----------------------
2391 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2392 ac_fn_c_try_cpp ()
2393 {
2394   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2395   if { { ac_try="$ac_cpp conftest.$ac_ext"
2396 case "(($ac_try" in
2397   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2398   *) ac_try_echo=$ac_try;;
2399 esac
2400 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2401 $as_echo "$ac_try_echo"; } >&5
2402   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2403   ac_status=$?
2404   if test -s conftest.err; then
2405     grep -v '^ *+' conftest.err >conftest.er1
2406     cat conftest.er1 >&5
2407     mv -f conftest.er1 conftest.err
2408   fi
2409   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2410   test $ac_status = 0; } > conftest.i && {
2411          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2412          test ! -s conftest.err
2413        }; then :
2414   ac_retval=0
2415 else
2416   $as_echo "$as_me: failed program was:" >&5
2417 sed 's/^/| /' conftest.$ac_ext >&5
2418 
2419     ac_retval=1
2420 fi
2421   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2422   as_fn_set_status $ac_retval
2423 
2424 } # ac_fn_c_try_cpp
2425 
2426 # ac_fn_cxx_try_cpp LINENO
2427 # ------------------------
2428 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2429 ac_fn_cxx_try_cpp ()
2430 {
2431   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2432   if { { ac_try="$ac_cpp conftest.$ac_ext"
2433 case "(($ac_try" in
2434   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2435   *) ac_try_echo=$ac_try;;
2436 esac
2437 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2438 $as_echo "$ac_try_echo"; } >&5
2439   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2440   ac_status=$?
2441   if test -s conftest.err; then
2442     grep -v '^ *+' conftest.err >conftest.er1
2443     cat conftest.er1 >&5
2444     mv -f conftest.er1 conftest.err
2445   fi
2446   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2447   test $ac_status = 0; } > conftest.i && {
2448          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2449          test ! -s conftest.err
2450        }; then :
2451   ac_retval=0
2452 else
2453   $as_echo "$as_me: failed program was:" >&5
2454 sed 's/^/| /' conftest.$ac_ext >&5
2455 
2456     ac_retval=1
2457 fi
2458   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2459   as_fn_set_status $ac_retval
2460 
2461 } # ac_fn_cxx_try_cpp
2462 
2463 # ac_fn_c_try_link LINENO
2464 # -----------------------
2465 # Try to link conftest.$ac_ext, and return whether this succeeded.
2466 ac_fn_c_try_link ()
2467 {
2468   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2469   rm -f conftest.$ac_objext conftest$ac_exeext
2470   if { { ac_try="$ac_link"
2471 case "(($ac_try" in
2472   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2473   *) ac_try_echo=$ac_try;;
2474 esac
2475 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2476 $as_echo "$ac_try_echo"; } >&5
2477   (eval "$ac_link") 2>conftest.err
2478   ac_status=$?
2479   if test -s conftest.err; then
2480     grep -v '^ *+' conftest.err >conftest.er1
2481     cat conftest.er1 >&5
2482     mv -f conftest.er1 conftest.err
2483   fi
2484   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2485   test $ac_status = 0; } && {
2486          test -z "$ac_c_werror_flag" ||
2487          test ! -s conftest.err
2488        } && test -s conftest$ac_exeext && {
2489          test "$cross_compiling" = yes ||
2490          test -x conftest$ac_exeext
2491        }; then :
2492   ac_retval=0
2493 else
2494   $as_echo "$as_me: failed program was:" >&5
2495 sed 's/^/| /' conftest.$ac_ext >&5
2496 
2497         ac_retval=1
2498 fi
2499   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2500   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2501   # interfere with the next link command; also delete a directory that is
2502   # left behind by Apple's compiler.  We do this before executing the actions.
2503   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2504   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2505   as_fn_set_status $ac_retval
2506 
2507 } # ac_fn_c_try_link
2508 
2509 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2510 # ---------------------------------------------------------
2511 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2512 # the include files in INCLUDES and setting the cache variable VAR
2513 # accordingly.
2514 ac_fn_cxx_check_header_mongrel ()
2515 {
2516   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2517   if eval \${$3+:} false; then :
2518   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2519 $as_echo_n "checking for $2... " >&6; }
2520 if eval \${$3+:} false; then :
2521   $as_echo_n "(cached) " >&6
2522 fi
2523 eval ac_res=\$$3
2524                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2525 $as_echo "$ac_res" >&6; }
2526 else
2527   # Is the header compilable?
2528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2529 $as_echo_n "checking $2 usability... " >&6; }
2530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2531 /* end confdefs.h.  */
2532 $4
2533 #include <$2>
2534 _ACEOF
2535 if ac_fn_cxx_try_compile "$LINENO"; then :
2536   ac_header_compiler=yes
2537 else
2538   ac_header_compiler=no
2539 fi
2540 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2542 $as_echo "$ac_header_compiler" >&6; }
2543 
2544 # Is the header present?
2545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2546 $as_echo_n "checking $2 presence... " >&6; }
2547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2548 /* end confdefs.h.  */
2549 #include <$2>
2550 _ACEOF
2551 if ac_fn_cxx_try_cpp "$LINENO"; then :
2552   ac_header_preproc=yes
2553 else
2554   ac_header_preproc=no
2555 fi
2556 rm -f conftest.err conftest.i conftest.$ac_ext
2557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2558 $as_echo "$ac_header_preproc" >&6; }
2559 
2560 # So?  What about this header?
2561 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2562   yes:no: )
2563     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2564 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2565     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2566 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2567     ;;
2568   no:yes:* )
2569     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2570 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2571     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2572 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2573     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2574 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2575     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2576 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2577     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2578 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2579 ( $as_echo "## ----------------------------------------- ##
2580 ## Report this to build-dev@openjdk.java.net ##
2581 ## ----------------------------------------- ##"
2582      ) | sed "s/^/$as_me: WARNING:     /" >&2
2583     ;;
2584 esac
2585   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2586 $as_echo_n "checking for $2... " >&6; }
2587 if eval \${$3+:} false; then :
2588   $as_echo_n "(cached) " >&6
2589 else
2590   eval "$3=\$ac_header_compiler"
2591 fi
2592 eval ac_res=\$$3
2593                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2594 $as_echo "$ac_res" >&6; }
2595 fi
2596   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2597 
2598 } # ac_fn_cxx_check_header_mongrel
2599 
2600 # ac_fn_cxx_try_run LINENO
2601 # ------------------------
2602 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2603 # that executables *can* be run.
2604 ac_fn_cxx_try_run ()
2605 {
2606   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2607   if { { ac_try="$ac_link"
2608 case "(($ac_try" in
2609   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2610   *) ac_try_echo=$ac_try;;
2611 esac
2612 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2613 $as_echo "$ac_try_echo"; } >&5
2614   (eval "$ac_link") 2>&5
2615   ac_status=$?
2616   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2617   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2618   { { case "(($ac_try" in
2619   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2620   *) ac_try_echo=$ac_try;;
2621 esac
2622 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2623 $as_echo "$ac_try_echo"; } >&5
2624   (eval "$ac_try") 2>&5
2625   ac_status=$?
2626   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2627   test $ac_status = 0; }; }; then :
2628   ac_retval=0
2629 else
2630   $as_echo "$as_me: program exited with status $ac_status" >&5
2631        $as_echo "$as_me: failed program was:" >&5
2632 sed 's/^/| /' conftest.$ac_ext >&5
2633 
2634        ac_retval=$ac_status
2635 fi
2636   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2637   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2638   as_fn_set_status $ac_retval
2639 
2640 } # ac_fn_cxx_try_run
2641 
2642 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2643 # ---------------------------------------------------------
2644 # Tests whether HEADER exists and can be compiled using the include files in
2645 # INCLUDES, setting the cache variable VAR accordingly.
2646 ac_fn_cxx_check_header_compile ()
2647 {
2648   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2649   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2650 $as_echo_n "checking for $2... " >&6; }
2651 if eval \${$3+:} false; then :
2652   $as_echo_n "(cached) " >&6
2653 else
2654   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2655 /* end confdefs.h.  */
2656 $4
2657 #include <$2>
2658 _ACEOF
2659 if ac_fn_cxx_try_compile "$LINENO"; then :
2660   eval "$3=yes"
2661 else
2662   eval "$3=no"
2663 fi
2664 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2665 fi
2666 eval ac_res=\$$3
2667                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2668 $as_echo "$ac_res" >&6; }
2669   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2670 
2671 } # ac_fn_cxx_check_header_compile
2672 
2673 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2674 # ----------------------------------------------
2675 # Tries to find the compile-time value of EXPR in a program that includes
2676 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2677 # computed
2678 ac_fn_cxx_compute_int ()
2679 {
2680   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2681   if test "$cross_compiling" = yes; then
2682     # Depending upon the size, compute the lo and hi bounds.
2683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2684 /* end confdefs.h.  */
2685 $4
2686 int
2687 main ()
2688 {
2689 static int test_array [1 - 2 * !(($2) >= 0)];
2690 test_array [0] = 0;
2691 return test_array [0];
2692 
2693   ;
2694   return 0;
2695 }
2696 _ACEOF
2697 if ac_fn_cxx_try_compile "$LINENO"; then :
2698   ac_lo=0 ac_mid=0
2699   while :; do
2700     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2701 /* end confdefs.h.  */
2702 $4
2703 int
2704 main ()
2705 {
2706 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2707 test_array [0] = 0;
2708 return test_array [0];
2709 
2710   ;
2711   return 0;
2712 }
2713 _ACEOF
2714 if ac_fn_cxx_try_compile "$LINENO"; then :
2715   ac_hi=$ac_mid; break
2716 else
2717   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2718                         if test $ac_lo -le $ac_mid; then
2719                           ac_lo= ac_hi=
2720                           break
2721                         fi
2722                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2723 fi
2724 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2725   done
2726 else
2727   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2728 /* end confdefs.h.  */
2729 $4
2730 int
2731 main ()
2732 {
2733 static int test_array [1 - 2 * !(($2) < 0)];
2734 test_array [0] = 0;
2735 return test_array [0];
2736 
2737   ;
2738   return 0;
2739 }
2740 _ACEOF
2741 if ac_fn_cxx_try_compile "$LINENO"; then :
2742   ac_hi=-1 ac_mid=-1
2743   while :; do
2744     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2745 /* end confdefs.h.  */
2746 $4
2747 int
2748 main ()
2749 {
2750 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2751 test_array [0] = 0;
2752 return test_array [0];
2753 
2754   ;
2755   return 0;
2756 }
2757 _ACEOF
2758 if ac_fn_cxx_try_compile "$LINENO"; then :
2759   ac_lo=$ac_mid; break
2760 else
2761   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2762                         if test $ac_mid -le $ac_hi; then
2763                           ac_lo= ac_hi=
2764                           break
2765                         fi
2766                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2767 fi
2768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2769   done
2770 else
2771   ac_lo= ac_hi=
2772 fi
2773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2774 fi
2775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2776 # Binary search between lo and hi bounds.
2777 while test "x$ac_lo" != "x$ac_hi"; do
2778   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2779   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2780 /* end confdefs.h.  */
2781 $4
2782 int
2783 main ()
2784 {
2785 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2786 test_array [0] = 0;
2787 return test_array [0];
2788 
2789   ;
2790   return 0;
2791 }
2792 _ACEOF
2793 if ac_fn_cxx_try_compile "$LINENO"; then :
2794   ac_hi=$ac_mid
2795 else
2796   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2797 fi
2798 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2799 done
2800 case $ac_lo in #((
2801 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2802 '') ac_retval=1 ;;
2803 esac
2804   else
2805     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2806 /* end confdefs.h.  */
2807 $4
2808 static long int longval () { return $2; }
2809 static unsigned long int ulongval () { return $2; }
2810 #include <stdio.h>
2811 #include <stdlib.h>
2812 int
2813 main ()
2814 {
2815 
2816   FILE *f = fopen ("conftest.val", "w");
2817   if (! f)
2818     return 1;
2819   if (($2) < 0)
2820     {
2821       long int i = longval ();
2822       if (i != ($2))
2823         return 1;
2824       fprintf (f, "%ld", i);
2825     }
2826   else
2827     {
2828       unsigned long int i = ulongval ();
2829       if (i != ($2))
2830         return 1;
2831       fprintf (f, "%lu", i);
2832     }
2833   /* Do not output a trailing newline, as this causes \r\n confusion
2834      on some platforms.  */
2835   return ferror (f) || fclose (f) != 0;
2836 
2837   ;
2838   return 0;
2839 }
2840 _ACEOF
2841 if ac_fn_cxx_try_run "$LINENO"; then :
2842   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2843 else
2844   ac_retval=1
2845 fi
2846 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2847   conftest.$ac_objext conftest.beam conftest.$ac_ext
2848 rm -f conftest.val
2849 
2850   fi
2851   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2852   as_fn_set_status $ac_retval
2853 
2854 } # ac_fn_cxx_compute_int
2855 
2856 # ac_fn_cxx_try_link LINENO
2857 # -------------------------
2858 # Try to link conftest.$ac_ext, and return whether this succeeded.
2859 ac_fn_cxx_try_link ()
2860 {
2861   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2862   rm -f conftest.$ac_objext conftest$ac_exeext
2863   if { { ac_try="$ac_link"
2864 case "(($ac_try" in
2865   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2866   *) ac_try_echo=$ac_try;;
2867 esac
2868 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2869 $as_echo "$ac_try_echo"; } >&5
2870   (eval "$ac_link") 2>conftest.err
2871   ac_status=$?
2872   if test -s conftest.err; then
2873     grep -v '^ *+' conftest.err >conftest.er1
2874     cat conftest.er1 >&5
2875     mv -f conftest.er1 conftest.err
2876   fi
2877   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2878   test $ac_status = 0; } && {
2879          test -z "$ac_cxx_werror_flag" ||
2880          test ! -s conftest.err
2881        } && test -s conftest$ac_exeext && {
2882          test "$cross_compiling" = yes ||
2883          test -x conftest$ac_exeext
2884        }; then :
2885   ac_retval=0
2886 else
2887   $as_echo "$as_me: failed program was:" >&5
2888 sed 's/^/| /' conftest.$ac_ext >&5
2889 
2890         ac_retval=1
2891 fi
2892   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2893   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2894   # interfere with the next link command; also delete a directory that is
2895   # left behind by Apple's compiler.  We do this before executing the actions.
2896   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2897   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2898   as_fn_set_status $ac_retval
2899 
2900 } # ac_fn_cxx_try_link
2901 
2902 # ac_fn_cxx_check_func LINENO FUNC VAR
2903 # ------------------------------------
2904 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2905 ac_fn_cxx_check_func ()
2906 {
2907   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2908   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2909 $as_echo_n "checking for $2... " >&6; }
2910 if eval \${$3+:} false; then :
2911   $as_echo_n "(cached) " >&6
2912 else
2913   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2914 /* end confdefs.h.  */
2915 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2916    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2917 #define $2 innocuous_$2
2918 
2919 /* System header to define __stub macros and hopefully few prototypes,
2920     which can conflict with char $2 (); below.
2921     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2922     <limits.h> exists even on freestanding compilers.  */
2923 
2924 #ifdef __STDC__
2925 # include <limits.h>
2926 #else
2927 # include <assert.h>
2928 #endif
2929 
2930 #undef $2
2931 
2932 /* Override any GCC internal prototype to avoid an error.
2933    Use char because int might match the return type of a GCC
2934    builtin and then its argument prototype would still apply.  */
2935 #ifdef __cplusplus
2936 extern "C"
2937 #endif
2938 char $2 ();
2939 /* The GNU C library defines this for functions which it implements
2940     to always fail with ENOSYS.  Some functions are actually named
2941     something starting with __ and the normal name is an alias.  */
2942 #if defined __stub_$2 || defined __stub___$2
2943 choke me
2944 #endif
2945 
2946 int
2947 main ()
2948 {
2949 return $2 ();
2950   ;
2951   return 0;
2952 }
2953 _ACEOF
2954 if ac_fn_cxx_try_link "$LINENO"; then :
2955   eval "$3=yes"
2956 else
2957   eval "$3=no"
2958 fi
2959 rm -f core conftest.err conftest.$ac_objext \
2960     conftest$ac_exeext conftest.$ac_ext
2961 fi
2962 eval ac_res=\$$3
2963                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2964 $as_echo "$ac_res" >&6; }
2965   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2966 
2967 } # ac_fn_cxx_check_func
2968 
2969 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2970 # -------------------------------------------------------
2971 # Tests whether HEADER exists and can be compiled using the include files in
2972 # INCLUDES, setting the cache variable VAR accordingly.
2973 ac_fn_c_check_header_compile ()
2974 {
2975   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2976   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2977 $as_echo_n "checking for $2... " >&6; }
2978 if eval \${$3+:} false; then :
2979   $as_echo_n "(cached) " >&6
2980 else
2981   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2982 /* end confdefs.h.  */
2983 $4
2984 #include <$2>
2985 _ACEOF
2986 if ac_fn_c_try_compile "$LINENO"; then :
2987   eval "$3=yes"
2988 else
2989   eval "$3=no"
2990 fi
2991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2992 fi
2993 eval ac_res=\$$3
2994                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2995 $as_echo "$ac_res" >&6; }
2996   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2997 
2998 } # ac_fn_c_check_header_compile
2999 cat >config.log <<_ACEOF
3000 This file contains any messages produced by compilers while
3001 running configure, to aid debugging if configure makes a mistake.
3002 
3003 It was created by OpenJDK $as_me jdk9, which was
3004 generated by GNU Autoconf 2.69.  Invocation command line was
3005 
3006   $ $0 $@
3007 
3008 _ACEOF
3009 exec 5>>config.log
3010 {
3011 cat <<_ASUNAME
3012 ## --------- ##
3013 ## Platform. ##
3014 ## --------- ##
3015 
3016 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3017 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3018 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3019 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3020 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3021 
3022 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3023 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3024 
3025 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3026 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3027 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3028 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3029 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3030 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3031 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3032 
3033 _ASUNAME
3034 
3035 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3036 for as_dir in $PATH
3037 do
3038   IFS=$as_save_IFS
3039   test -z "$as_dir" && as_dir=.
3040     $as_echo "PATH: $as_dir"
3041   done
3042 IFS=$as_save_IFS
3043 
3044 } >&5
3045 
3046 cat >&5 <<_ACEOF
3047 
3048 
3049 ## ----------- ##
3050 ## Core tests. ##
3051 ## ----------- ##
3052 
3053 _ACEOF
3054 
3055 
3056 # Keep a trace of the command line.
3057 # Strip out --no-create and --no-recursion so they do not pile up.
3058 # Strip out --silent because we don't want to record it for future runs.
3059 # Also quote any args containing shell meta-characters.
3060 # Make two passes to allow for proper duplicate-argument suppression.
3061 ac_configure_args=
3062 ac_configure_args0=
3063 ac_configure_args1=
3064 ac_must_keep_next=false
3065 for ac_pass in 1 2
3066 do
3067   for ac_arg
3068   do
3069     case $ac_arg in
3070     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3071     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3072     | -silent | --silent | --silen | --sile | --sil)
3073       continue ;;
3074     *\'*)
3075       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3076     esac
3077     case $ac_pass in
3078     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3079     2)
3080       as_fn_append ac_configure_args1 " '$ac_arg'"
3081       if test $ac_must_keep_next = true; then
3082         ac_must_keep_next=false # Got value, back to normal.
3083       else
3084         case $ac_arg in
3085           *=* | --config-cache | -C | -disable-* | --disable-* \
3086           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3087           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3088           | -with-* | --with-* | -without-* | --without-* | --x)
3089             case "$ac_configure_args0 " in
3090               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3091             esac
3092             ;;
3093           -* ) ac_must_keep_next=true ;;
3094         esac
3095       fi
3096       as_fn_append ac_configure_args " '$ac_arg'"
3097       ;;
3098     esac
3099   done
3100 done
3101 { ac_configure_args0=; unset ac_configure_args0;}
3102 { ac_configure_args1=; unset ac_configure_args1;}
3103 
3104 # When interrupted or exit'd, cleanup temporary files, and complete
3105 # config.log.  We remove comments because anyway the quotes in there
3106 # would cause problems or look ugly.
3107 # WARNING: Use '\'' to represent an apostrophe within the trap.
3108 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3109 trap 'exit_status=$?
3110   # Save into config.log some information that might help in debugging.
3111   {
3112     echo
3113 
3114     $as_echo "## ---------------- ##
3115 ## Cache variables. ##
3116 ## ---------------- ##"
3117     echo
3118     # The following way of writing the cache mishandles newlines in values,
3119 (
3120   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3121     eval ac_val=\$$ac_var
3122     case $ac_val in #(
3123     *${as_nl}*)
3124       case $ac_var in #(
3125       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3126 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3127       esac
3128       case $ac_var in #(
3129       _ | IFS | as_nl) ;; #(
3130       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3131       *) { eval $ac_var=; unset $ac_var;} ;;
3132       esac ;;
3133     esac
3134   done
3135   (set) 2>&1 |
3136     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3137     *${as_nl}ac_space=\ *)
3138       sed -n \
3139         "s/'\''/'\''\\\\'\'''\''/g;
3140           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3141       ;; #(
3142     *)
3143       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3144       ;;
3145     esac |
3146     sort
3147 )
3148     echo
3149 
3150     $as_echo "## ----------------- ##
3151 ## Output variables. ##
3152 ## ----------------- ##"
3153     echo
3154     for ac_var in $ac_subst_vars
3155     do
3156       eval ac_val=\$$ac_var
3157       case $ac_val in
3158       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3159       esac
3160       $as_echo "$ac_var='\''$ac_val'\''"
3161     done | sort
3162     echo
3163 
3164     if test -n "$ac_subst_files"; then
3165       $as_echo "## ------------------- ##
3166 ## File substitutions. ##
3167 ## ------------------- ##"
3168       echo
3169       for ac_var in $ac_subst_files
3170       do
3171         eval ac_val=\$$ac_var
3172         case $ac_val in
3173         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3174         esac
3175         $as_echo "$ac_var='\''$ac_val'\''"
3176       done | sort
3177       echo
3178     fi
3179 
3180     if test -s confdefs.h; then
3181       $as_echo "## ----------- ##
3182 ## confdefs.h. ##
3183 ## ----------- ##"
3184       echo
3185       cat confdefs.h
3186       echo
3187     fi
3188     test "$ac_signal" != 0 &&
3189       $as_echo "$as_me: caught signal $ac_signal"
3190     $as_echo "$as_me: exit $exit_status"
3191   } >&5
3192   rm -f core *.core core.conftest.* &&
3193     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3194     exit $exit_status
3195 ' 0
3196 for ac_signal in 1 2 13 15; do
3197   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3198 done
3199 ac_signal=0
3200 
3201 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3202 rm -f -r conftest* confdefs.h
3203 
3204 $as_echo "/* confdefs.h */" > confdefs.h
3205 
3206 # Predefined preprocessor variables.
3207 
3208 cat >>confdefs.h <<_ACEOF
3209 #define PACKAGE_NAME "$PACKAGE_NAME"
3210 _ACEOF
3211 
3212 cat >>confdefs.h <<_ACEOF
3213 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3214 _ACEOF
3215 
3216 cat >>confdefs.h <<_ACEOF
3217 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3218 _ACEOF
3219 
3220 cat >>confdefs.h <<_ACEOF
3221 #define PACKAGE_STRING "$PACKAGE_STRING"
3222 _ACEOF
3223 
3224 cat >>confdefs.h <<_ACEOF
3225 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3226 _ACEOF
3227 
3228 cat >>confdefs.h <<_ACEOF
3229 #define PACKAGE_URL "$PACKAGE_URL"
3230 _ACEOF
3231 
3232 
3233 # Let the site file select an alternate cache file if it wants to.
3234 # Prefer an explicitly selected file to automatically selected ones.
3235 ac_site_file1=NONE
3236 ac_site_file2=NONE
3237 if test -n "$CONFIG_SITE"; then
3238   # We do not want a PATH search for config.site.
3239   case $CONFIG_SITE in #((
3240     -*)  ac_site_file1=./$CONFIG_SITE;;
3241     */*) ac_site_file1=$CONFIG_SITE;;
3242     *)   ac_site_file1=./$CONFIG_SITE;;
3243   esac
3244 elif test "x$prefix" != xNONE; then
3245   ac_site_file1=$prefix/share/config.site
3246   ac_site_file2=$prefix/etc/config.site
3247 else
3248   ac_site_file1=$ac_default_prefix/share/config.site
3249   ac_site_file2=$ac_default_prefix/etc/config.site
3250 fi
3251 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3252 do
3253   test "x$ac_site_file" = xNONE && continue
3254   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3255     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3256 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3257     sed 's/^/| /' "$ac_site_file" >&5
3258     . "$ac_site_file" \
3259       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3260 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3261 as_fn_error $? "failed to load site script $ac_site_file
3262 See \`config.log' for more details" "$LINENO" 5; }
3263   fi
3264 done
3265 
3266 if test -r "$cache_file"; then
3267   # Some versions of bash will fail to source /dev/null (special files
3268   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3269   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3270     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3271 $as_echo "$as_me: loading cache $cache_file" >&6;}
3272     case $cache_file in
3273       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3274       *)                      . "./$cache_file";;
3275     esac
3276   fi
3277 else
3278   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3279 $as_echo "$as_me: creating cache $cache_file" >&6;}
3280   >$cache_file
3281 fi
3282 
3283 # Check that the precious variables saved in the cache have kept the same
3284 # value.
3285 ac_cache_corrupted=false
3286 for ac_var in $ac_precious_vars; do
3287   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3288   eval ac_new_set=\$ac_env_${ac_var}_set
3289   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3290   eval ac_new_val=\$ac_env_${ac_var}_value
3291   case $ac_old_set,$ac_new_set in
3292     set,)
3293       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3294 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3295       ac_cache_corrupted=: ;;
3296     ,set)
3297       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3298 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3299       ac_cache_corrupted=: ;;
3300     ,);;
3301     *)
3302       if test "x$ac_old_val" != "x$ac_new_val"; then
3303         # differences in whitespace do not lead to failure.
3304         ac_old_val_w=`echo x $ac_old_val`
3305         ac_new_val_w=`echo x $ac_new_val`
3306         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3307           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3308 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3309           ac_cache_corrupted=:
3310         else
3311           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3312 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3313           eval $ac_var=\$ac_old_val
3314         fi
3315         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3316 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3317         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3318 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3319       fi;;
3320   esac
3321   # Pass precious variables to config.status.
3322   if test "$ac_new_set" = set; then
3323     case $ac_new_val in
3324     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3325     *) ac_arg=$ac_var=$ac_new_val ;;
3326     esac
3327     case " $ac_configure_args " in
3328       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3329       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3330     esac
3331   fi
3332 done
3333 if $ac_cache_corrupted; then
3334   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3335 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3336   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3337 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3338   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3339 fi
3340 ## -------------------- ##
3341 ## Main body of script. ##
3342 ## -------------------- ##
3343 
3344 ac_ext=c
3345 ac_cpp='$CPP $CPPFLAGS'
3346 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3347 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3348 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3349 
3350 
3351 
3352 ac_aux_dir=
3353 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3354   if test -f "$ac_dir/install-sh"; then
3355     ac_aux_dir=$ac_dir
3356     ac_install_sh="$ac_aux_dir/install-sh -c"
3357     break
3358   elif test -f "$ac_dir/install.sh"; then
3359     ac_aux_dir=$ac_dir
3360     ac_install_sh="$ac_aux_dir/install.sh -c"
3361     break
3362   elif test -f "$ac_dir/shtool"; then
3363     ac_aux_dir=$ac_dir
3364     ac_install_sh="$ac_aux_dir/shtool install -c"
3365     break
3366   fi
3367 done
3368 if test -z "$ac_aux_dir"; then
3369   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
3370 fi
3371 
3372 # These three variables are undocumented and unsupported,
3373 # and are intended to be withdrawn in a future Autoconf release.
3374 # They can cause serious problems if a builder's source tree is in a directory
3375 # whose full name contains unusual characters.
3376 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3377 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3378 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3379 
3380 
3381 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3382 
3383 #
3384 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3385 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3386 #
3387 # This code is free software; you can redistribute it and/or modify it
3388 # under the terms of the GNU General Public License version 2 only, as
3389 # published by the Free Software Foundation.  Oracle designates this
3390 # particular file as subject to the "Classpath" exception as provided
3391 # by Oracle in the LICENSE file that accompanied this code.
3392 #
3393 # This code is distributed in the hope that it will be useful, but WITHOUT
3394 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3395 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3396 # version 2 for more details (a copy is included in the LICENSE file that
3397 # accompanied this code).
3398 #
3399 # You should have received a copy of the GNU General Public License version
3400 # 2 along with this work; if not, write to the Free Software Foundation,
3401 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3402 #
3403 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3404 # or visit www.oracle.com if you need additional information or have any
3405 # questions.
3406 #
3407 
3408 #
3409 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3410 #
3411 # This program is free software; you can redistribute it and/or modify
3412 # it under the terms of the GNU General Public License as published by
3413 # the Free Software Foundation; either version 2 of the License, or
3414 # (at your option) any later version.
3415 #
3416 # This program is distributed in the hope that it will be useful, but
3417 # WITHOUT ANY WARRANTY; without even the implied warranty of
3418 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3419 # General Public License for more details.
3420 #
3421 # You should have received a copy of the GNU General Public License
3422 # along with this program; if not, write to the Free Software
3423 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3424 #
3425 # As a special exception to the GNU General Public License, if you
3426 # distribute this file as part of a program that contains a
3427 # configuration script generated by Autoconf, you may include it under
3428 # the same distribution terms that you use for the rest of that program.
3429 
3430 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3431 # ----------------------------------
3432 # PKG_PROG_PKG_CONFIG
3433 
3434 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3435 #
3436 # Check to see whether a particular set of modules exists.  Similar
3437 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3438 #
3439 #
3440 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3441 # this or PKG_CHECK_MODULES is called, or make sure to call
3442 # PKG_CHECK_EXISTS manually
3443 # --------------------------------------------------------------
3444 
3445 
3446 
3447 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3448 # ---------------------------------------------
3449 # _PKG_CONFIG
3450 
3451 # _PKG_SHORT_ERRORS_SUPPORTED
3452 # -----------------------------
3453 # _PKG_SHORT_ERRORS_SUPPORTED
3454 
3455 
3456 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3457 # [ACTION-IF-NOT-FOUND])
3458 #
3459 #
3460 # Note that if there is a possibility the first call to
3461 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3462 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3463 #
3464 #
3465 # --------------------------------------------------------------
3466 # PKG_CHECK_MODULES
3467 
3468 
3469 # Include these first...
3470 #
3471 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3472 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3473 #
3474 # This code is free software; you can redistribute it and/or modify it
3475 # under the terms of the GNU General Public License version 2 only, as
3476 # published by the Free Software Foundation.  Oracle designates this
3477 # particular file as subject to the "Classpath" exception as provided
3478 # by Oracle in the LICENSE file that accompanied this code.
3479 #
3480 # This code is distributed in the hope that it will be useful, but WITHOUT
3481 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3482 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3483 # version 2 for more details (a copy is included in the LICENSE file that
3484 # accompanied this code).
3485 #
3486 # You should have received a copy of the GNU General Public License version
3487 # 2 along with this work; if not, write to the Free Software Foundation,
3488 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3489 #
3490 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3491 # or visit www.oracle.com if you need additional information or have any
3492 # questions.
3493 #
3494 
3495 # Create a function/macro that takes a series of named arguments. The call is
3496 # similar to AC_DEFUN, but the setup of the function looks like this:
3497 # BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3498 # ... do something
3499 #   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3500 # ])
3501 # A star (*) in front of a named argument means that it is required and it's
3502 # presence will be verified. To pass e.g. the first value as a normal indexed
3503 # argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3504 # arguments are referenced in the function by their name prefixed by ARG_, e.g.
3505 # "ARG_FOO".
3506 #
3507 # The generated function can be called like this:
3508 # MYFUNC(FOO: [foo-val],
3509 #     BAR: [
3510 #         $ECHO hello world
3511 #     ])
3512 # Note that the argument value must start on the same line as the argument name.
3513 #
3514 # Argument 1: Name of the function to define
3515 # Argument 2: List of legal named arguments, with a * prefix for required arguments
3516 # Argument 3: Argument array to treat as named, typically $@
3517 # Argument 4: The main function body
3518 
3519 
3520 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3521 # If so, then append $1 to $2 \
3522 # Also set JVM_ARG_OK to true/false depending on outcome.
3523 
3524 
3525 # Appends a string to a path variable, only adding the : when needed.
3526 
3527 
3528 # Prepends a string to a path variable, only adding the : when needed.
3529 
3530 
3531 # This will make sure the given variable points to a full and proper
3532 # path. This means:
3533 # 1) There will be no spaces in the path. On unix platforms,
3534 #    spaces in the path will result in an error. On Windows,
3535 #    the path will be rewritten using short-style to be space-free.
3536 # 2) The path will be absolute, and it will be in unix-style (on
3537 #     cygwin).
3538 # $1: The name of the variable to fix
3539 
3540 
3541 # This will make sure the given variable points to a executable
3542 # with a full and proper path. This means:
3543 # 1) There will be no spaces in the path. On unix platforms,
3544 #    spaces in the path will result in an error. On Windows,
3545 #    the path will be rewritten using short-style to be space-free.
3546 # 2) The path will be absolute, and it will be in unix-style (on
3547 #     cygwin).
3548 # Any arguments given to the executable is preserved.
3549 # If the input variable does not have a directory specification, then
3550 # it need to be in the PATH.
3551 # $1: The name of the variable to fix
3552 
3553 
3554 
3555 
3556 # Register a --with argument but mark it as deprecated
3557 # $1: The name of the with argument to deprecate, not including --with-
3558 
3559 
3560 # Register a --enable argument but mark it as deprecated
3561 # $1: The name of the with argument to deprecate, not including --enable-
3562 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3563 # $3: Messages to user.
3564 
3565 
3566 
3567 
3568 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3569 # $1: variable to check
3570 
3571 
3572 # Check that there are no unprocessed overridden variables left.
3573 # If so, they are an incorrect argument and we will exit with an error.
3574 
3575 
3576 # Setup a tool for the given variable. If correctly specified by the user,
3577 # use that value, otherwise search for the tool using the supplied code snippet.
3578 # $1: variable to set
3579 # $2: code snippet to call to look for the tool
3580 # $3: code snippet to call if variable was used to find tool
3581 
3582 
3583 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3584 # $1: variable to set
3585 # $2: executable name (or list of names) to look for
3586 
3587 
3588 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3589 # $1: variable to set
3590 # $2: executable name (or list of names) to look for
3591 
3592 
3593 # Like BASIC_PATH_PROGS but fails if no tool was found.
3594 # $1: variable to set
3595 # $2: executable name (or list of names) to look for
3596 
3597 
3598 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3599 # $1: variable to set
3600 # $2: autoconf macro to call to look for the special tool
3601 
3602 
3603 # Setup the most fundamental tools that relies on not much else to set up,
3604 # but is used by much of the early bootstrap code.
3605 
3606 
3607 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3608 
3609 
3610 # Evaluates platform specific overrides for devkit variables.
3611 # $1: Name of variable
3612 
3613 
3614 
3615 
3616 
3617 
3618 #%%% Simple tools %%%
3619 
3620 # Check if we have found a usable version of make
3621 # $1: the path to a potential make binary (or empty)
3622 # $2: the description on how we found this
3623 
3624 
3625 
3626 
3627 # Goes looking for a usable version of GNU make.
3628 
3629 
3630 
3631 
3632 
3633 
3634 # Check if build directory is on local disk. If not possible to determine,
3635 # we prefer to claim it's local.
3636 # Argument 1: directory to test
3637 # Argument 2: what to do if it is on local disk
3638 # Argument 3: what to do otherwise (remote disk or failure)
3639 
3640 
3641 # Check that source files have basic read permissions set. This might
3642 # not be the case in cygwin in certain conditions.
3643 
3644 
3645 
3646 
3647 # Check for support for specific options in bash
3648 
3649 
3650 ################################################################################
3651 #
3652 # Default make target
3653 #
3654 
3655 
3656 # Code to run after AC_OUTPUT
3657 
3658 
3659 #
3660 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3661 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3662 #
3663 # This code is free software; you can redistribute it and/or modify it
3664 # under the terms of the GNU General Public License version 2 only, as
3665 # published by the Free Software Foundation.  Oracle designates this
3666 # particular file as subject to the "Classpath" exception as provided
3667 # by Oracle in the LICENSE file that accompanied this code.
3668 #
3669 # This code is distributed in the hope that it will be useful, but WITHOUT
3670 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3671 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3672 # version 2 for more details (a copy is included in the LICENSE file that
3673 # accompanied this code).
3674 #
3675 # You should have received a copy of the GNU General Public License version
3676 # 2 along with this work; if not, write to the Free Software Foundation,
3677 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3678 #
3679 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3680 # or visit www.oracle.com if you need additional information or have any
3681 # questions.
3682 #
3683 
3684 
3685 
3686 
3687 
3688 # Helper function which possibly converts a path using DOS-style short mode.
3689 # If so, the updated path is stored in $new_path.
3690 # $1: The path to check
3691 
3692 
3693 # Helper function which possibly converts a path using DOS-style short mode.
3694 # If so, the updated path is stored in $new_path.
3695 # $1: The path to check
3696 
3697 
3698 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3699 # and could probably be heavily simplified. However, all changes in this
3700 # area tend to need lot of testing in different scenarios, and in lack of
3701 # proper unit testing, cleaning this up has not been deemed worth the effort
3702 # at the moment.
3703 
3704 
3705 
3706 
3707 
3708 
3709 
3710 
3711 
3712 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3713 
3714 
3715 
3716 
3717 # ... then the rest
3718 #
3719 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3720 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3721 #
3722 # This code is free software; you can redistribute it and/or modify it
3723 # under the terms of the GNU General Public License version 2 only, as
3724 # published by the Free Software Foundation.  Oracle designates this
3725 # particular file as subject to the "Classpath" exception as provided
3726 # by Oracle in the LICENSE file that accompanied this code.
3727 #
3728 # This code is distributed in the hope that it will be useful, but WITHOUT
3729 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3730 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3731 # version 2 for more details (a copy is included in the LICENSE file that
3732 # accompanied this code).
3733 #
3734 # You should have received a copy of the GNU General Public License version
3735 # 2 along with this work; if not, write to the Free Software Foundation,
3736 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3737 #
3738 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3739 # or visit www.oracle.com if you need additional information or have any
3740 # questions.
3741 #
3742 
3743 ########################################################################
3744 # This file handles detection of the Boot JDK. The Boot JDK detection
3745 # process has been developed as a response to solve a complex real-world
3746 # problem. Initially, it was simple, but it has grown as platform after
3747 # platform, idiosyncracy after idiosyncracy has been supported.
3748 #
3749 # The basic idea is this:
3750 # 1) You need an acceptable *) JDK to use as a Boot JDK
3751 # 2) There are several ways to locate a JDK, that are mostly platform
3752 #    dependent **)
3753 # 3) You can have multiple JDKs installed
3754 # 4) If possible, configure should try to dig out an acceptable JDK
3755 #    automatically, without having to resort to command-line options
3756 #
3757 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3758 #     javac) and not a JRE, etc.
3759 #
3760 # **) On Windows we typically use a well-known path.
3761 #     On MacOSX we typically use the tool java_home.
3762 #     On Linux we typically find javac in the $PATH, and then follow a
3763 #     chain of symlinks that often ends up in a real JDK.
3764 #
3765 # This leads to the code where we check in different ways to locate a
3766 # JDK, and if one is found, check if it is acceptable. If not, we print
3767 # our reasons for rejecting it (useful when debugging non-working
3768 # configure situations) and continue checking the next one.
3769 ########################################################################
3770 
3771 # Execute the check given as argument, and verify the result
3772 # If the Boot JDK was previously found, do nothing
3773 # $1 A command line (typically autoconf macro) to execute
3774 
3775 
3776 # Test: Is bootjdk explicitely set by command line arguments?
3777 
3778 
3779 # Test: Is $JAVA_HOME set?
3780 
3781 
3782 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3783 
3784 
3785 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3786 # $1: Argument to the java_home binary (optional)
3787 
3788 
3789 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3790 
3791 
3792 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3793 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3794 # $1 = Path to directory containing jdk installations.
3795 # $2 = String to append to the found JDK directory to get the proper JDK home
3796 
3797 
3798 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3799 # environmental variable as base for where to look.
3800 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3801 
3802 
3803 # Test: Is there a JDK installed in default, well-known locations?
3804 
3805 
3806 # Check that a command-line tool in the Boot JDK is correct
3807 # $1 = name of variable to assign
3808 # $2 = name of binary
3809 
3810 
3811 ###############################################################################
3812 #
3813 # We need a Boot JDK to bootstrap the build.
3814 #
3815 
3816 
3817 
3818 
3819 
3820 # BUILD_JDK: the location of the latest JDK that can run
3821 #   on the host system and supports the target class file version
3822 #   generated in this JDK build.  This variable should only be
3823 #   used after the launchers are built.
3824 #
3825 
3826 # Execute the check given as argument, and verify the result.
3827 # If the JDK was previously found, do nothing.
3828 # $1 A command line (typically autoconf macro) to execute
3829 
3830 
3831 # By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3832 # is different than the host system doing the build (e.g. cross-compilation),
3833 # a special BUILD_JDK is built as part of the build process.  An external
3834 # prebuilt BUILD_JDK can also be supplied.
3835 
3836 
3837 #
3838 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3839 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3840 #
3841 # This code is free software; you can redistribute it and/or modify it
3842 # under the terms of the GNU General Public License version 2 only, as
3843 # published by the Free Software Foundation.  Oracle designates this
3844 # particular file as subject to the "Classpath" exception as provided
3845 # by Oracle in the LICENSE file that accompanied this code.
3846 #
3847 # This code is distributed in the hope that it will be useful, but WITHOUT
3848 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3849 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3850 # version 2 for more details (a copy is included in the LICENSE file that
3851 # accompanied this code).
3852 #
3853 # You should have received a copy of the GNU General Public License version
3854 # 2 along with this work; if not, write to the Free Software Foundation,
3855 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3856 #
3857 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3858 # or visit www.oracle.com if you need additional information or have any
3859 # questions.
3860 #
3861 
3862 
3863 
3864 
3865 
3866 
3867 
3868 
3869 
3870 
3871 
3872 
3873 
3874 
3875 
3876 
3877 
3878 ################################################################################
3879 #
3880 # Runs icecc-create-env once and prints the error if it fails
3881 #
3882 # $1: arguments to icecc-create-env
3883 # $2: log file
3884 #
3885 
3886 
3887 ################################################################################
3888 #
3889 # Optionally enable distributed compilation of native code using icecc/icecream
3890 #
3891 
3892 
3893 
3894 
3895 
3896 
3897 
3898 #
3899 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3900 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3901 #
3902 # This code is free software; you can redistribute it and/or modify it
3903 # under the terms of the GNU General Public License version 2 only, as
3904 # published by the Free Software Foundation.  Oracle designates this
3905 # particular file as subject to the "Classpath" exception as provided
3906 # by Oracle in the LICENSE file that accompanied this code.
3907 #
3908 # This code is distributed in the hope that it will be useful, but WITHOUT
3909 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3910 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3911 # version 2 for more details (a copy is included in the LICENSE file that
3912 # accompanied this code).
3913 #
3914 # You should have received a copy of the GNU General Public License version
3915 # 2 along with this work; if not, write to the Free Software Foundation,
3916 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3917 #
3918 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3919 # or visit www.oracle.com if you need additional information or have any
3920 # questions.
3921 #
3922 
3923 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3924 # corresponding configure arguments instead
3925 
3926 
3927 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3928 # that configure can use them while detecting compilers.
3929 # TOOLCHAIN_TYPE is available here.
3930 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
3931 
3932 
3933 
3934 
3935 
3936 
3937 # Documentation on common flags used for solstudio in HIGHEST.
3938 #
3939 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3940 #          done with care, there are some assumptions below that need to
3941 #          be understood about the use of pointers, and IEEE behavior.
3942 #
3943 # -fns: Use non-standard floating point mode (not IEEE 754)
3944 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3945 # -fsingle: Use single precision floating point with 'float'
3946 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3947 #   (Source with excessing pointer casting and data access with mixed
3948 #    pointer types are not recommended)
3949 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3950 #   (If you expect perfect errno behavior, do not use this)
3951 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3952 # -xrestrict: Pointer parameters to functions do not overlap
3953 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3954 #    If you pass in multiple pointers to the same data, do not use this)
3955 # -xlibmil: Inline some library routines
3956 #   (If you expect perfect errno behavior, do not use this)
3957 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3958 #   (If you expect perfect errno behavior, do not use this)
3959 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3960 
3961     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3962     # Bug?
3963     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3964     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3965     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3966     #fi
3967 
3968 
3969 
3970 
3971 
3972 # FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3973 #                                  IF_FALSE: [RUN-IF-FALSE])
3974 # ------------------------------------------------------------
3975 # Check that the C compiler supports an argument
3976 
3977 
3978 
3979 
3980 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3981 #                                    IF_FALSE: [RUN-IF-FALSE])
3982 # ------------------------------------------------------------
3983 # Check that the C++ compiler supports an argument
3984 
3985 
3986 
3987 
3988 # FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3989 #                                IF_FALSE: [RUN-IF-FALSE])
3990 # ------------------------------------------------------------
3991 # Check that the C and C++ compilers support an argument
3992 
3993 
3994 
3995 
3996 # FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3997 #                                   IF_FALSE: [RUN-IF-FALSE])
3998 # ------------------------------------------------------------
3999 # Check that the linker support an argument
4000 
4001 
4002 
4003 
4004 
4005 
4006 
4007 
4008 #
4009 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4010 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4011 #
4012 # This code is free software; you can redistribute it and/or modify it
4013 # under the terms of the GNU General Public License version 2 only, as
4014 # published by the Free Software Foundation.  Oracle designates this
4015 # particular file as subject to the "Classpath" exception as provided
4016 # by Oracle in the LICENSE file that accompanied this code.
4017 #
4018 # This code is distributed in the hope that it will be useful, but WITHOUT
4019 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4020 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4021 # version 2 for more details (a copy is included in the LICENSE file that
4022 # accompanied this code).
4023 #
4024 # You should have received a copy of the GNU General Public License version
4025 # 2 along with this work; if not, write to the Free Software Foundation,
4026 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4027 #
4028 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4029 # or visit www.oracle.com if you need additional information or have any
4030 # questions.
4031 #
4032 
4033 
4034 
4035 
4036 
4037 cygwin_help() {
4038   case $1 in
4039     unzip)
4040       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4041       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4042       ;;
4043     zip)
4044       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4045       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4046       ;;
4047     make)
4048       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4049       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4050       ;;
4051     freetype)
4052       HELP_MSG="
4053 The freetype library can now be build during the configure process.
4054 Download the freetype sources and unpack them into an arbitrary directory:
4055 
4056 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4057 tar -xzf freetype-2.5.3.tar.gz
4058 
4059 Then run configure with '--with-freetype-src=<freetype_src>'. This will
4060 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4061 builds or into '<freetype_src>/lib32' for 32-bit builds.
4062 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4063 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4064 
4065 Alternatively you can unpack the sources like this to use the default directory:
4066 
4067 tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4068       ;;
4069   esac
4070 }
4071 
4072 msys_help() {
4073   PKGHANDLER_COMMAND=""
4074 }
4075 
4076 apt_help() {
4077   case $1 in
4078     reduced)
4079       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4080     devkit)
4081       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4082     openjdk)
4083       PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4084     alsa)
4085       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4086     cups)
4087       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4088     freetype)
4089       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4090     ffi)
4091       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4092     x11)
4093       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4094     ccache)
4095       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4096   esac
4097 }
4098 
4099 yum_help() {
4100   case $1 in
4101     devkit)
4102       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4103     openjdk)
4104       PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4105     alsa)
4106       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4107     cups)
4108       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4109     freetype)
4110       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4111     x11)
4112       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4113     ccache)
4114       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4115   esac
4116 }
4117 
4118 port_help() {
4119   PKGHANDLER_COMMAND=""
4120 }
4121 
4122 pkgutil_help() {
4123   PKGHANDLER_COMMAND=""
4124 }
4125 
4126 pkgadd_help() {
4127   PKGHANDLER_COMMAND=""
4128 }
4129 
4130 # This function will check if we're called from the "configure" wrapper while
4131 # printing --help. If so, we will print out additional information that can
4132 # only be extracted within the autoconf script, and then exit. This must be
4133 # called at the very beginning in configure.ac.
4134 
4135 
4136 
4137 
4138 
4139 
4140 #
4141 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4142 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4143 #
4144 # This code is free software; you can redistribute it and/or modify it
4145 # under the terms of the GNU General Public License version 2 only, as
4146 # published by the Free Software Foundation.  Oracle designates this
4147 # particular file as subject to the "Classpath" exception as provided
4148 # by Oracle in the LICENSE file that accompanied this code.
4149 #
4150 # This code is distributed in the hope that it will be useful, but WITHOUT
4151 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4152 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4153 # version 2 for more details (a copy is included in the LICENSE file that
4154 # accompanied this code).
4155 #
4156 # You should have received a copy of the GNU General Public License version
4157 # 2 along with this work; if not, write to the Free Software Foundation,
4158 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4159 #
4160 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4161 # or visit www.oracle.com if you need additional information or have any
4162 # questions.
4163 #
4164 
4165 ###############################################################################
4166 # Check which interpreter of the JVM we want to build.
4167 # Currently we have:
4168 #    template: Template interpreter (the default)
4169 #    cpp     : C++ interpreter
4170 
4171 
4172 ###############################################################################
4173 # Check which variants of the JVM that we want to build.
4174 # Currently we have:
4175 #    server: normal interpreter and a C2 or tiered C1/C2 compiler
4176 #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
4177 #    minimal1: reduced form of client with optional VM services and features stripped out
4178 #    zero: no machine code interpreter, no compiler
4179 #    zeroshark: zero interpreter and shark/llvm compiler backend
4180 #    core: interpreter only, no compiler (only works on some platforms)
4181 
4182 
4183 
4184 ###############################################################################
4185 # Setup legacy vars/targets and new vars to deal with different debug levels.
4186 #
4187 #    release: no debug information, all optimizations, no asserts.
4188 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4189 #    fastdebug: debug information (-g), all optimizations, all asserts
4190 #    slowdebug: debug information (-g), no optimizations, all asserts
4191 #
4192 
4193 
4194 
4195 
4196 
4197 
4198 #
4199 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4200 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4201 #
4202 # This code is free software; you can redistribute it and/or modify it
4203 # under the terms of the GNU General Public License version 2 only, as
4204 # published by the Free Software Foundation.  Oracle designates this
4205 # particular file as subject to the "Classpath" exception as provided
4206 # by Oracle in the LICENSE file that accompanied this code.
4207 #
4208 # This code is distributed in the hope that it will be useful, but WITHOUT
4209 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4210 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4211 # version 2 for more details (a copy is included in the LICENSE file that
4212 # accompanied this code).
4213 #
4214 # You should have received a copy of the GNU General Public License version
4215 # 2 along with this work; if not, write to the Free Software Foundation,
4216 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4217 #
4218 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4219 # or visit www.oracle.com if you need additional information or have any
4220 # questions.
4221 #
4222 
4223 ###############################################################################
4224 # Check which variant of the JDK that we want to build.
4225 # Currently we have:
4226 #    normal:   standard edition
4227 # but the custom make system may add other variants
4228 #
4229 # Effectively the JDK variant gives a name to a specific set of
4230 # modules to compile into the JDK.
4231 
4232 
4233 ###############################################################################
4234 # Set the debug level
4235 #    release: no debug information, all optimizations, no asserts.
4236 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4237 #    fastdebug: debug information (-g), all optimizations, all asserts
4238 #    slowdebug: debug information (-g), no optimizations, all asserts
4239 
4240 
4241 ###############################################################################
4242 #
4243 # Should we build only OpenJDK even if closed sources are present?
4244 #
4245 
4246 
4247 
4248 
4249 ###############################################################################
4250 #
4251 # Enable or disable the elliptic curve crypto implementation
4252 #
4253 
4254 
4255 
4256 
4257 ################################################################################
4258 #
4259 # Gcov coverage data for hotspot
4260 #
4261 
4262 
4263 ################################################################################
4264 #
4265 # Static build support.  When enabled will generate static
4266 # libraries instead of shared libraries for all JDK libs.
4267 #
4268 
4269 
4270 ################################################################################
4271 #
4272 # jlink options.
4273 # We always keep packaged modules in JDK image.
4274 #
4275 
4276 
4277 #
4278 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4279 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4280 #
4281 # This code is free software; you can redistribute it and/or modify it
4282 # under the terms of the GNU General Public License version 2 only, as
4283 # published by the Free Software Foundation.  Oracle designates this
4284 # particular file as subject to the "Classpath" exception as provided
4285 # by Oracle in the LICENSE file that accompanied this code.
4286 #
4287 # This code is distributed in the hope that it will be useful, but WITHOUT
4288 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4289 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4290 # version 2 for more details (a copy is included in the LICENSE file that
4291 # accompanied this code).
4292 #
4293 # You should have received a copy of the GNU General Public License version
4294 # 2 along with this work; if not, write to the Free Software Foundation,
4295 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4296 #
4297 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4298 # or visit www.oracle.com if you need additional information or have any
4299 # questions.
4300 #
4301 
4302 ###############################################################################
4303 #
4304 # Setup version numbers
4305 #
4306 
4307 # Verify that a given string represents a valid version number, and assign it
4308 # to a variable.
4309 
4310 # Argument 1: the variable to assign to
4311 # Argument 2: the value given by the user
4312 
4313 
4314 
4315 
4316 #
4317 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4318 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4319 #
4320 # This code is free software; you can redistribute it and/or modify it
4321 # under the terms of the GNU General Public License version 2 only, as
4322 # published by the Free Software Foundation.  Oracle designates this
4323 # particular file as subject to the "Classpath" exception as provided
4324 # by Oracle in the LICENSE file that accompanied this code.
4325 #
4326 # This code is distributed in the hope that it will be useful, but WITHOUT
4327 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4328 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4329 # version 2 for more details (a copy is included in the LICENSE file that
4330 # accompanied this code).
4331 #
4332 # You should have received a copy of the GNU General Public License version
4333 # 2 along with this work; if not, write to the Free Software Foundation,
4334 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4335 #
4336 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4337 # or visit www.oracle.com if you need additional information or have any
4338 # questions.
4339 #
4340 
4341 # Major library component reside in separate files.
4342 #
4343 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4344 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4345 #
4346 # This code is free software; you can redistribute it and/or modify it
4347 # under the terms of the GNU General Public License version 2 only, as
4348 # published by the Free Software Foundation.  Oracle designates this
4349 # particular file as subject to the "Classpath" exception as provided
4350 # by Oracle in the LICENSE file that accompanied this code.
4351 #
4352 # This code is distributed in the hope that it will be useful, but WITHOUT
4353 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4354 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4355 # version 2 for more details (a copy is included in the LICENSE file that
4356 # accompanied this code).
4357 #
4358 # You should have received a copy of the GNU General Public License version
4359 # 2 along with this work; if not, write to the Free Software Foundation,
4360 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4361 #
4362 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4363 # or visit www.oracle.com if you need additional information or have any
4364 # questions.
4365 #
4366 
4367 ################################################################################
4368 # Setup alsa (Advanced Linux Sound Architecture)
4369 ################################################################################
4370 
4371 
4372 #
4373 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4374 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4375 #
4376 # This code is free software; you can redistribute it and/or modify it
4377 # under the terms of the GNU General Public License version 2 only, as
4378 # published by the Free Software Foundation.  Oracle designates this
4379 # particular file as subject to the "Classpath" exception as provided
4380 # by Oracle in the LICENSE file that accompanied this code.
4381 #
4382 # This code is distributed in the hope that it will be useful, but WITHOUT
4383 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4384 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4385 # version 2 for more details (a copy is included in the LICENSE file that
4386 # accompanied this code).
4387 #
4388 # You should have received a copy of the GNU General Public License version
4389 # 2 along with this work; if not, write to the Free Software Foundation,
4390 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4391 #
4392 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4393 # or visit www.oracle.com if you need additional information or have any
4394 # questions.
4395 #
4396 
4397 ################################################################################
4398 # Setup bundled libraries.
4399 #
4400 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4401 # OpenJDK repository. Default is to use these libraries as bundled, but they
4402 # might be replaced by en external version by the user.
4403 ################################################################################
4404 
4405 
4406 ################################################################################
4407 # Setup libjpeg
4408 ################################################################################
4409 
4410 
4411 ################################################################################
4412 # Setup giflib
4413 ################################################################################
4414 
4415 
4416 ################################################################################
4417 # Setup libpng
4418 ################################################################################
4419 
4420 
4421 ################################################################################
4422 # Setup zlib
4423 ################################################################################
4424 
4425 
4426 ################################################################################
4427 # Setup lcms (Little CMS)
4428 ################################################################################
4429 
4430 
4431 #
4432 # Copyright (c) 2011, 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 # Setup cups (Common Unix Printing System)
4458 ################################################################################
4459 
4460 
4461 #
4462 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4463 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4464 #
4465 # This code is free software; you can redistribute it and/or modify it
4466 # under the terms of the GNU General Public License version 2 only, as
4467 # published by the Free Software Foundation.  Oracle designates this
4468 # particular file as subject to the "Classpath" exception as provided
4469 # by Oracle in the LICENSE file that accompanied this code.
4470 #
4471 # This code is distributed in the hope that it will be useful, but WITHOUT
4472 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4473 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4474 # version 2 for more details (a copy is included in the LICENSE file that
4475 # accompanied this code).
4476 #
4477 # You should have received a copy of the GNU General Public License version
4478 # 2 along with this work; if not, write to the Free Software Foundation,
4479 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4480 #
4481 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4482 # or visit www.oracle.com if you need additional information or have any
4483 # questions.
4484 #
4485 
4486 ################################################################################
4487 # Setup libffi (Foreign Function Interface)
4488 ################################################################################
4489 
4490 
4491 #
4492 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4493 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4494 #
4495 # This code is free software; you can redistribute it and/or modify it
4496 # under the terms of the GNU General Public License version 2 only, as
4497 # published by the Free Software Foundation.  Oracle designates this
4498 # particular file as subject to the "Classpath" exception as provided
4499 # by Oracle in the LICENSE file that accompanied this code.
4500 #
4501 # This code is distributed in the hope that it will be useful, but WITHOUT
4502 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4503 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4504 # version 2 for more details (a copy is included in the LICENSE file that
4505 # accompanied this code).
4506 #
4507 # You should have received a copy of the GNU General Public License version
4508 # 2 along with this work; if not, write to the Free Software Foundation,
4509 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4510 #
4511 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4512 # or visit www.oracle.com if you need additional information or have any
4513 # questions.
4514 #
4515 
4516 ################################################################################
4517 # Build the freetype lib from source
4518 ################################################################################
4519 
4520 
4521 ################################################################################
4522 # Check if a potential freeype library match is correct and usable
4523 ################################################################################
4524 
4525 
4526 ################################################################################
4527 # Setup freetype (The FreeType2 font rendering library)
4528 ################################################################################
4529 
4530 
4531 #
4532 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4533 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4534 #
4535 # This code is free software; you can redistribute it and/or modify it
4536 # under the terms of the GNU General Public License version 2 only, as
4537 # published by the Free Software Foundation.  Oracle designates this
4538 # particular file as subject to the "Classpath" exception as provided
4539 # by Oracle in the LICENSE file that accompanied this code.
4540 #
4541 # This code is distributed in the hope that it will be useful, but WITHOUT
4542 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4543 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4544 # version 2 for more details (a copy is included in the LICENSE file that
4545 # accompanied this code).
4546 #
4547 # You should have received a copy of the GNU General Public License version
4548 # 2 along with this work; if not, write to the Free Software Foundation,
4549 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4550 #
4551 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4552 # or visit www.oracle.com if you need additional information or have any
4553 # questions.
4554 #
4555 
4556 ################################################################################
4557 # Setup the standard C/C++ runtime libraries.
4558 #
4559 # Most importantly, determine if stdc++ should be linked statically or
4560 # dynamically.
4561 ################################################################################
4562 
4563 
4564 #
4565 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4566 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4567 #
4568 # This code is free software; you can redistribute it and/or modify it
4569 # under the terms of the GNU General Public License version 2 only, as
4570 # published by the Free Software Foundation.  Oracle designates this
4571 # particular file as subject to the "Classpath" exception as provided
4572 # by Oracle in the LICENSE file that accompanied this code.
4573 #
4574 # This code is distributed in the hope that it will be useful, but WITHOUT
4575 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4576 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4577 # version 2 for more details (a copy is included in the LICENSE file that
4578 # accompanied this code).
4579 #
4580 # You should have received a copy of the GNU General Public License version
4581 # 2 along with this work; if not, write to the Free Software Foundation,
4582 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4583 #
4584 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4585 # or visit www.oracle.com if you need additional information or have any
4586 # questions.
4587 #
4588 
4589 ################################################################################
4590 # Setup X11 Windows system
4591 ################################################################################
4592 
4593 
4594 
4595 ################################################################################
4596 # Determine which libraries are needed for this configuration
4597 ################################################################################
4598 
4599 
4600 ################################################################################
4601 # Parse library options, and setup needed libraries
4602 ################################################################################
4603 
4604 
4605 ################################################################################
4606 # Setup llvm (Low-Level VM)
4607 ################################################################################
4608 
4609 
4610 ################################################################################
4611 # Setup various libraries, typically small system libraries
4612 ################################################################################
4613 
4614 
4615 #
4616 # Copyright (c) 2011, 2012, 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 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4641 # Converts autoconf style CPU name to OpenJDK style, into
4642 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4643 
4644 
4645 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4646 # Converts autoconf style OS name to OpenJDK style, into
4647 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4648 
4649 
4650 # Expects $host_os $host_cpu $build_os and $build_cpu
4651 # and $with_target_bits to have been setup!
4652 #
4653 # Translate the standard triplet(quadruplet) definition
4654 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4655 # OPENJDK_BUILD_OS, etc.
4656 
4657 
4658 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4659 # accordingly. Must be done after setting up build and target system, but before
4660 # doing anything else with these values.
4661 
4662 
4663 # Setup the legacy variables, for controlling the old makefiles.
4664 #
4665 
4666 
4667 
4668 
4669 #%%% Build and target systems %%%
4670 
4671 
4672 
4673 
4674 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4675 # Add -mX to various FLAGS variables.
4676 
4677 
4678 
4679 
4680 
4681 
4682 #
4683 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4684 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4685 #
4686 # This code is free software; you can redistribute it and/or modify it
4687 # under the terms of the GNU General Public License version 2 only, as
4688 # published by the Free Software Foundation.  Oracle designates this
4689 # particular file as subject to the "Classpath" exception as provided
4690 # by Oracle in the LICENSE file that accompanied this code.
4691 #
4692 # This code is distributed in the hope that it will be useful, but WITHOUT
4693 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4694 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4695 # version 2 for more details (a copy is included in the LICENSE file that
4696 # accompanied this code).
4697 #
4698 # You should have received a copy of the GNU General Public License version
4699 # 2 along with this work; if not, write to the Free Software Foundation,
4700 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4701 #
4702 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4703 # or visit www.oracle.com if you need additional information or have any
4704 # questions.
4705 #
4706 
4707 
4708 
4709 
4710 
4711 
4712 
4713 ################################################################################
4714 # Define a mechanism for importing extra prebuilt modules
4715 #
4716 
4717 
4718 
4719 #
4720 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4721 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4722 #
4723 # This code is free software; you can redistribute it and/or modify it
4724 # under the terms of the GNU General Public License version 2 only, as
4725 # published by the Free Software Foundation.  Oracle designates this
4726 # particular file as subject to the "Classpath" exception as provided
4727 # by Oracle in the LICENSE file that accompanied this code.
4728 #
4729 # This code is distributed in the hope that it will be useful, but WITHOUT
4730 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4731 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4732 # version 2 for more details (a copy is included in the LICENSE file that
4733 # accompanied this code).
4734 #
4735 # You should have received a copy of the GNU General Public License version
4736 # 2 along with this work; if not, write to the Free Software Foundation,
4737 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4738 #
4739 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4740 # or visit www.oracle.com if you need additional information or have any
4741 # questions.
4742 #
4743 
4744 ########################################################################
4745 # This file is responsible for detecting, verifying and setting up the
4746 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4747 # proper paths to the binaries, but it will not setup any flags.
4748 #
4749 # The binaries used is determined by the toolchain type, which is the family of
4750 # compilers and related tools that are used.
4751 ########################################################################
4752 
4753 
4754 # All valid toolchains, regardless of platform (used by help.m4)
4755 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4756 
4757 # These toolchains are valid on different platforms
4758 VALID_TOOLCHAINS_linux="gcc clang"
4759 VALID_TOOLCHAINS_solaris="solstudio"
4760 VALID_TOOLCHAINS_macosx="gcc clang"
4761 VALID_TOOLCHAINS_aix="xlc"
4762 VALID_TOOLCHAINS_windows="microsoft"
4763 
4764 # Toolchain descriptions
4765 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4766 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4767 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4768 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4769 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4770 
4771 # Minimum supported versions, empty means unspecified
4772 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4773 TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4774 TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4775 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4776 TOOLCHAIN_MINIMUM_VERSION_xlc=""
4777 
4778 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4779 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4780 
4781 
4782 # Check if the configured compiler (C and C++) is of a specific version or
4783 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4784 #
4785 # Arguments:
4786 #   VERSION:   The version string to check against the found version
4787 #   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4788 #   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4789 
4790 
4791 
4792 
4793 # Setup a number of variables describing how native output files are
4794 # named on this platform/toolchain.
4795 
4796 
4797 # Determine which toolchain type to use, and make sure it is valid for this
4798 # platform. Setup various information about the selected toolchain.
4799 
4800 
4801 # Before we start detecting the toolchain executables, we might need some
4802 # special setup, e.g. additional paths etc.
4803 
4804 
4805 # Restore path, etc
4806 
4807 
4808 # Check if a compiler is of the toolchain type we expect, and save the version
4809 # information from it. If the compiler does not match the expected type,
4810 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4811 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4812 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4813 #
4814 # $1 = compiler to test (CC or CXX)
4815 # $2 = human readable name of compiler (C or C++)
4816 
4817 
4818 # Try to locate the given C or C++ compiler in the path, or otherwise.
4819 #
4820 # $1 = compiler to test (CC or CXX)
4821 # $2 = human readable name of compiler (C or C++)
4822 # $3 = list of compiler names to search for
4823 
4824 
4825 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4826 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4827 # archiver (AR). Verify that the compilers are correct according to the
4828 # toolchain type.
4829 
4830 
4831 # Setup additional tools that is considered a part of the toolchain, but not the
4832 # core part. Many of these are highly platform-specific and do not exist,
4833 # and/or are not needed on all platforms.
4834 
4835 
4836 # Setup the build tools (i.e, the compiler and linker used to build programs
4837 # that should be run on the build platform, not the target platform, as a build
4838 # helper). Since the non-cross-compile case uses the normal, target compilers
4839 # for this, we can only do this after these have been setup.
4840 
4841 
4842 # Setup legacy variables that are still needed as alternative ways to refer to
4843 # parts of the toolchain.
4844 
4845 
4846 # Do some additional checks on the detected tools.
4847 
4848 
4849 # Setup the JTReg Regression Test Harness.
4850 
4851 
4852 #
4853 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4854 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4855 #
4856 # This code is free software; you can redistribute it and/or modify it
4857 # under the terms of the GNU General Public License version 2 only, as
4858 # published by the Free Software Foundation.  Oracle designates this
4859 # particular file as subject to the "Classpath" exception as provided
4860 # by Oracle in the LICENSE file that accompanied this code.
4861 #
4862 # This code is distributed in the hope that it will be useful, but WITHOUT
4863 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4864 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4865 # version 2 for more details (a copy is included in the LICENSE file that
4866 # accompanied this code).
4867 #
4868 # You should have received a copy of the GNU General Public License version
4869 # 2 along with this work; if not, write to the Free Software Foundation,
4870 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4871 #
4872 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4873 # or visit www.oracle.com if you need additional information or have any
4874 # questions.
4875 #
4876 
4877 ################################################################################
4878 # The order of these defines the priority by which we try to find them.
4879 VALID_VS_VERSIONS="2013 2012 2010"
4880 
4881 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4882 VS_VERSION_INTERNAL_2010=100
4883 VS_MSVCR_2010=msvcr100.dll
4884 # We don't use msvcp on Visual Studio 2010
4885 #VS_MSVCP_2010=msvcp100.dll
4886 VS_ENVVAR_2010="VS100COMNTOOLS"
4887 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4888 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4889 VS_VS_PLATFORM_NAME_2010="v100"
4890 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4891 
4892 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4893 VS_VERSION_INTERNAL_2012=110
4894 VS_MSVCR_2012=msvcr110.dll
4895 VS_MSVCP_2012=msvcp110.dll
4896 VS_ENVVAR_2012="VS110COMNTOOLS"
4897 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4898 VS_SDK_INSTALLDIR_2012=
4899 VS_VS_PLATFORM_NAME_2012="v110"
4900 VS_SDK_PLATFORM_NAME_2012=
4901 
4902 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4903 VS_VERSION_INTERNAL_2013=120
4904 VS_MSVCR_2013=msvcr120.dll
4905 VS_MSVCP_2013=msvcp120.dll
4906 VS_ENVVAR_2013="VS120COMNTOOLS"
4907 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4908 VS_SDK_INSTALLDIR_2013=
4909 VS_VS_PLATFORM_NAME_2013="v120"
4910 VS_SDK_PLATFORM_NAME_2013=
4911 
4912 ################################################################################
4913 
4914 
4915 
4916 ################################################################################
4917 
4918 
4919 
4920 ################################################################################
4921 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4922 # build environment and assigns it to VS_ENV_CMD
4923 
4924 
4925 ################################################################################
4926 
4927 
4928 
4929 ################################################################################
4930 # Check if the VS env variables were setup prior to running configure.
4931 # If not, then find vcvarsall.bat and run it automatically, and integrate
4932 # the set env variables into the spec file.
4933 
4934 
4935 
4936 
4937 
4938 
4939 
4940 
4941 
4942 
4943 
4944 
4945 
4946 
4947 # This line needs to be here, verbatim, after all includes and the dummy hook
4948 # definitions. It is replaced with custom functionality when building
4949 # custom sources.
4950 #CUSTOM_AUTOCONF_INCLUDE
4951 
4952 # Do not change or remove the following line, it is needed for consistency checks:
4953 DATE_WHEN_GENERATED=1460464859
4954 
4955 ###############################################################################
4956 #
4957 # Initialization / Boot-strapping
4958 #
4959 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4960 # thus it jumps back and forth, each time gaining something needed later on.
4961 #
4962 ###############################################################################
4963 
4964 # If we are requested to print additional help, do that and then exit.
4965 # This must be the very first call.
4966 
4967   if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
4968 
4969     # Print available toolchains
4970     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4971     $PRINTF "Which are valid to use depends on the build platform.\n"
4972     for toolchain in $VALID_TOOLCHAINS_all; do
4973       # Use indirect variable referencing
4974       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4975       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4976       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4977     done
4978 
4979     # And now exit directly
4980     exit 0
4981   fi
4982 
4983 
4984 # Basic initialization that must happen first of all in the normal process.
4985 
4986   # Save the original command line. This is passed to us by the wrapper configure script.
4987 
4988   # Save the path variable before it gets changed
4989   ORIGINAL_PATH="$PATH"
4990 
4991   DATE_WHEN_CONFIGURED=`LANG=C date`
4992 
4993   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4994 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4995   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4996 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4997 
4998 
4999   # Start with tools that do not need have cross compilation support
5000   # and can be expected to be found in the default PATH. These tools are
5001   # used by configure.
5002 
5003   # First are all the simple required tools.
5004 
5005 
5006 
5007   # Publish this variable in the help.
5008 
5009 
5010   if [ -z "${BASENAME+x}" ]; then
5011     # The variable is not set by user, try to locate tool using the code snippet
5012     for ac_prog in basename
5013 do
5014   # Extract the first word of "$ac_prog", so it can be a program name with args.
5015 set dummy $ac_prog; ac_word=$2
5016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5017 $as_echo_n "checking for $ac_word... " >&6; }
5018 if ${ac_cv_path_BASENAME+:} false; then :
5019   $as_echo_n "(cached) " >&6
5020 else
5021   case $BASENAME in
5022   [\\/]* | ?:[\\/]*)
5023   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5024   ;;
5025   *)
5026   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5027 for as_dir in $PATH
5028 do
5029   IFS=$as_save_IFS
5030   test -z "$as_dir" && as_dir=.
5031     for ac_exec_ext in '' $ac_executable_extensions; do
5032   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5033     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5034     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5035     break 2
5036   fi
5037 done
5038   done
5039 IFS=$as_save_IFS
5040 
5041   ;;
5042 esac
5043 fi
5044 BASENAME=$ac_cv_path_BASENAME
5045 if test -n "$BASENAME"; then
5046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5047 $as_echo "$BASENAME" >&6; }
5048 else
5049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5050 $as_echo "no" >&6; }
5051 fi
5052 
5053 
5054   test -n "$BASENAME" && break
5055 done
5056 
5057   else
5058     # The variable is set, but is it from the command line or the environment?
5059 
5060     # Try to remove the string !BASENAME! from our list.
5061     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5062     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5063       # If it failed, the variable was not from the command line. Ignore it,
5064       # but warn the user (except for BASH, which is always set by the calling BASH).
5065       if test "xBASENAME" != xBASH; then
5066         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5067 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5068       fi
5069       # Try to locate tool using the code snippet
5070       for ac_prog in basename
5071 do
5072   # Extract the first word of "$ac_prog", so it can be a program name with args.
5073 set dummy $ac_prog; ac_word=$2
5074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5075 $as_echo_n "checking for $ac_word... " >&6; }
5076 if ${ac_cv_path_BASENAME+:} false; then :
5077   $as_echo_n "(cached) " >&6
5078 else
5079   case $BASENAME in
5080   [\\/]* | ?:[\\/]*)
5081   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5082   ;;
5083   *)
5084   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5085 for as_dir in $PATH
5086 do
5087   IFS=$as_save_IFS
5088   test -z "$as_dir" && as_dir=.
5089     for ac_exec_ext in '' $ac_executable_extensions; do
5090   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5091     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5092     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5093     break 2
5094   fi
5095 done
5096   done
5097 IFS=$as_save_IFS
5098 
5099   ;;
5100 esac
5101 fi
5102 BASENAME=$ac_cv_path_BASENAME
5103 if test -n "$BASENAME"; then
5104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5105 $as_echo "$BASENAME" >&6; }
5106 else
5107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5108 $as_echo "no" >&6; }
5109 fi
5110 
5111 
5112   test -n "$BASENAME" && break
5113 done
5114 
5115     else
5116       # If it succeeded, then it was overridden by the user. We will use it
5117       # for the tool.
5118 
5119       # First remove it from the list of overridden variables, so we can test
5120       # for unknown variables in the end.
5121       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5122 
5123       # Check if we try to supply an empty value
5124       if test "x$BASENAME" = x; then
5125         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5126 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5127         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5128 $as_echo_n "checking for BASENAME... " >&6; }
5129         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5130 $as_echo "disabled" >&6; }
5131       else
5132         # Check if the provided tool contains a complete path.
5133         tool_specified="$BASENAME"
5134         tool_basename="${tool_specified##*/}"
5135         if test "x$tool_basename" = "x$tool_specified"; then
5136           # A command without a complete path is provided, search $PATH.
5137           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5138 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5139           # Extract the first word of "$tool_basename", so it can be a program name with args.
5140 set dummy $tool_basename; ac_word=$2
5141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5142 $as_echo_n "checking for $ac_word... " >&6; }
5143 if ${ac_cv_path_BASENAME+:} false; then :
5144   $as_echo_n "(cached) " >&6
5145 else
5146   case $BASENAME in
5147   [\\/]* | ?:[\\/]*)
5148   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5149   ;;
5150   *)
5151   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5152 for as_dir in $PATH
5153 do
5154   IFS=$as_save_IFS
5155   test -z "$as_dir" && as_dir=.
5156     for ac_exec_ext in '' $ac_executable_extensions; do
5157   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5158     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5160     break 2
5161   fi
5162 done
5163   done
5164 IFS=$as_save_IFS
5165 
5166   ;;
5167 esac
5168 fi
5169 BASENAME=$ac_cv_path_BASENAME
5170 if test -n "$BASENAME"; then
5171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5172 $as_echo "$BASENAME" >&6; }
5173 else
5174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5175 $as_echo "no" >&6; }
5176 fi
5177 
5178 
5179           if test "x$BASENAME" = x; then
5180             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5181           fi
5182         else
5183           # Otherwise we believe it is a complete path. Use it as it is.
5184           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5185 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5186           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5187 $as_echo_n "checking for BASENAME... " >&6; }
5188           if test ! -x "$tool_specified"; then
5189             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5190 $as_echo "not found" >&6; }
5191             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5192           fi
5193           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5194 $as_echo "$tool_specified" >&6; }
5195         fi
5196       fi
5197     fi
5198 
5199   fi
5200 
5201 
5202 
5203   if test "x$BASENAME" = x; then
5204     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5205   fi
5206 
5207 
5208 
5209 
5210 
5211   # Publish this variable in the help.
5212 
5213 
5214   if [ -z "${BASH+x}" ]; then
5215     # The variable is not set by user, try to locate tool using the code snippet
5216     for ac_prog in bash
5217 do
5218   # Extract the first word of "$ac_prog", so it can be a program name with args.
5219 set dummy $ac_prog; ac_word=$2
5220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5221 $as_echo_n "checking for $ac_word... " >&6; }
5222 if ${ac_cv_path_BASH+:} false; then :
5223   $as_echo_n "(cached) " >&6
5224 else
5225   case $BASH in
5226   [\\/]* | ?:[\\/]*)
5227   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5228   ;;
5229   *)
5230   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5231 for as_dir in $PATH
5232 do
5233   IFS=$as_save_IFS
5234   test -z "$as_dir" && as_dir=.
5235     for ac_exec_ext in '' $ac_executable_extensions; do
5236   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5237     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5238     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5239     break 2
5240   fi
5241 done
5242   done
5243 IFS=$as_save_IFS
5244 
5245   ;;
5246 esac
5247 fi
5248 BASH=$ac_cv_path_BASH
5249 if test -n "$BASH"; then
5250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5251 $as_echo "$BASH" >&6; }
5252 else
5253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5254 $as_echo "no" >&6; }
5255 fi
5256 
5257 
5258   test -n "$BASH" && break
5259 done
5260 
5261   else
5262     # The variable is set, but is it from the command line or the environment?
5263 
5264     # Try to remove the string !BASH! from our list.
5265     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5266     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5267       # If it failed, the variable was not from the command line. Ignore it,
5268       # but warn the user (except for BASH, which is always set by the calling BASH).
5269       if test "xBASH" != xBASH; then
5270         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5271 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5272       fi
5273       # Try to locate tool using the code snippet
5274       for ac_prog in bash
5275 do
5276   # Extract the first word of "$ac_prog", so it can be a program name with args.
5277 set dummy $ac_prog; ac_word=$2
5278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5279 $as_echo_n "checking for $ac_word... " >&6; }
5280 if ${ac_cv_path_BASH+:} false; then :
5281   $as_echo_n "(cached) " >&6
5282 else
5283   case $BASH in
5284   [\\/]* | ?:[\\/]*)
5285   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5286   ;;
5287   *)
5288   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5289 for as_dir in $PATH
5290 do
5291   IFS=$as_save_IFS
5292   test -z "$as_dir" && as_dir=.
5293     for ac_exec_ext in '' $ac_executable_extensions; do
5294   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5295     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5296     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5297     break 2
5298   fi
5299 done
5300   done
5301 IFS=$as_save_IFS
5302 
5303   ;;
5304 esac
5305 fi
5306 BASH=$ac_cv_path_BASH
5307 if test -n "$BASH"; then
5308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5309 $as_echo "$BASH" >&6; }
5310 else
5311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5312 $as_echo "no" >&6; }
5313 fi
5314 
5315 
5316   test -n "$BASH" && break
5317 done
5318 
5319     else
5320       # If it succeeded, then it was overridden by the user. We will use it
5321       # for the tool.
5322 
5323       # First remove it from the list of overridden variables, so we can test
5324       # for unknown variables in the end.
5325       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5326 
5327       # Check if we try to supply an empty value
5328       if test "x$BASH" = x; then
5329         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5330 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5331         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5332 $as_echo_n "checking for BASH... " >&6; }
5333         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5334 $as_echo "disabled" >&6; }
5335       else
5336         # Check if the provided tool contains a complete path.
5337         tool_specified="$BASH"
5338         tool_basename="${tool_specified##*/}"
5339         if test "x$tool_basename" = "x$tool_specified"; then
5340           # A command without a complete path is provided, search $PATH.
5341           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5342 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5343           # Extract the first word of "$tool_basename", so it can be a program name with args.
5344 set dummy $tool_basename; ac_word=$2
5345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5346 $as_echo_n "checking for $ac_word... " >&6; }
5347 if ${ac_cv_path_BASH+:} false; then :
5348   $as_echo_n "(cached) " >&6
5349 else
5350   case $BASH in
5351   [\\/]* | ?:[\\/]*)
5352   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5353   ;;
5354   *)
5355   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5356 for as_dir in $PATH
5357 do
5358   IFS=$as_save_IFS
5359   test -z "$as_dir" && as_dir=.
5360     for ac_exec_ext in '' $ac_executable_extensions; do
5361   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5362     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5363     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5364     break 2
5365   fi
5366 done
5367   done
5368 IFS=$as_save_IFS
5369 
5370   ;;
5371 esac
5372 fi
5373 BASH=$ac_cv_path_BASH
5374 if test -n "$BASH"; then
5375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5376 $as_echo "$BASH" >&6; }
5377 else
5378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5379 $as_echo "no" >&6; }
5380 fi
5381 
5382 
5383           if test "x$BASH" = x; then
5384             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5385           fi
5386         else
5387           # Otherwise we believe it is a complete path. Use it as it is.
5388           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5389 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5390           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5391 $as_echo_n "checking for BASH... " >&6; }
5392           if test ! -x "$tool_specified"; then
5393             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5394 $as_echo "not found" >&6; }
5395             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5396           fi
5397           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5398 $as_echo "$tool_specified" >&6; }
5399         fi
5400       fi
5401     fi
5402 
5403   fi
5404 
5405 
5406 
5407   if test "x$BASH" = x; then
5408     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5409   fi
5410 
5411 
5412 
5413 
5414 
5415   # Publish this variable in the help.
5416 
5417 
5418   if [ -z "${CAT+x}" ]; then
5419     # The variable is not set by user, try to locate tool using the code snippet
5420     for ac_prog in cat
5421 do
5422   # Extract the first word of "$ac_prog", so it can be a program name with args.
5423 set dummy $ac_prog; ac_word=$2
5424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5425 $as_echo_n "checking for $ac_word... " >&6; }
5426 if ${ac_cv_path_CAT+:} false; then :
5427   $as_echo_n "(cached) " >&6
5428 else
5429   case $CAT in
5430   [\\/]* | ?:[\\/]*)
5431   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5432   ;;
5433   *)
5434   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5435 for as_dir in $PATH
5436 do
5437   IFS=$as_save_IFS
5438   test -z "$as_dir" && as_dir=.
5439     for ac_exec_ext in '' $ac_executable_extensions; do
5440   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5441     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5442     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5443     break 2
5444   fi
5445 done
5446   done
5447 IFS=$as_save_IFS
5448 
5449   ;;
5450 esac
5451 fi
5452 CAT=$ac_cv_path_CAT
5453 if test -n "$CAT"; then
5454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5455 $as_echo "$CAT" >&6; }
5456 else
5457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5458 $as_echo "no" >&6; }
5459 fi
5460 
5461 
5462   test -n "$CAT" && break
5463 done
5464 
5465   else
5466     # The variable is set, but is it from the command line or the environment?
5467 
5468     # Try to remove the string !CAT! from our list.
5469     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5470     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5471       # If it failed, the variable was not from the command line. Ignore it,
5472       # but warn the user (except for BASH, which is always set by the calling BASH).
5473       if test "xCAT" != xBASH; then
5474         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5475 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5476       fi
5477       # Try to locate tool using the code snippet
5478       for ac_prog in cat
5479 do
5480   # Extract the first word of "$ac_prog", so it can be a program name with args.
5481 set dummy $ac_prog; ac_word=$2
5482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5483 $as_echo_n "checking for $ac_word... " >&6; }
5484 if ${ac_cv_path_CAT+:} false; then :
5485   $as_echo_n "(cached) " >&6
5486 else
5487   case $CAT in
5488   [\\/]* | ?:[\\/]*)
5489   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5490   ;;
5491   *)
5492   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5493 for as_dir in $PATH
5494 do
5495   IFS=$as_save_IFS
5496   test -z "$as_dir" && as_dir=.
5497     for ac_exec_ext in '' $ac_executable_extensions; do
5498   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5499     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5500     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5501     break 2
5502   fi
5503 done
5504   done
5505 IFS=$as_save_IFS
5506 
5507   ;;
5508 esac
5509 fi
5510 CAT=$ac_cv_path_CAT
5511 if test -n "$CAT"; then
5512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5513 $as_echo "$CAT" >&6; }
5514 else
5515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5516 $as_echo "no" >&6; }
5517 fi
5518 
5519 
5520   test -n "$CAT" && break
5521 done
5522 
5523     else
5524       # If it succeeded, then it was overridden by the user. We will use it
5525       # for the tool.
5526 
5527       # First remove it from the list of overridden variables, so we can test
5528       # for unknown variables in the end.
5529       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5530 
5531       # Check if we try to supply an empty value
5532       if test "x$CAT" = x; then
5533         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5534 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5535         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5536 $as_echo_n "checking for CAT... " >&6; }
5537         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5538 $as_echo "disabled" >&6; }
5539       else
5540         # Check if the provided tool contains a complete path.
5541         tool_specified="$CAT"
5542         tool_basename="${tool_specified##*/}"
5543         if test "x$tool_basename" = "x$tool_specified"; then
5544           # A command without a complete path is provided, search $PATH.
5545           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5546 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5547           # Extract the first word of "$tool_basename", so it can be a program name with args.
5548 set dummy $tool_basename; ac_word=$2
5549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5550 $as_echo_n "checking for $ac_word... " >&6; }
5551 if ${ac_cv_path_CAT+:} false; then :
5552   $as_echo_n "(cached) " >&6
5553 else
5554   case $CAT in
5555   [\\/]* | ?:[\\/]*)
5556   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5557   ;;
5558   *)
5559   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5560 for as_dir in $PATH
5561 do
5562   IFS=$as_save_IFS
5563   test -z "$as_dir" && as_dir=.
5564     for ac_exec_ext in '' $ac_executable_extensions; do
5565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5566     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5568     break 2
5569   fi
5570 done
5571   done
5572 IFS=$as_save_IFS
5573 
5574   ;;
5575 esac
5576 fi
5577 CAT=$ac_cv_path_CAT
5578 if test -n "$CAT"; then
5579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5580 $as_echo "$CAT" >&6; }
5581 else
5582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5583 $as_echo "no" >&6; }
5584 fi
5585 
5586 
5587           if test "x$CAT" = x; then
5588             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5589           fi
5590         else
5591           # Otherwise we believe it is a complete path. Use it as it is.
5592           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5593 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5594           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5595 $as_echo_n "checking for CAT... " >&6; }
5596           if test ! -x "$tool_specified"; then
5597             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5598 $as_echo "not found" >&6; }
5599             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5600           fi
5601           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5602 $as_echo "$tool_specified" >&6; }
5603         fi
5604       fi
5605     fi
5606 
5607   fi
5608 
5609 
5610 
5611   if test "x$CAT" = x; then
5612     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5613   fi
5614 
5615 
5616 
5617 
5618 
5619   # Publish this variable in the help.
5620 
5621 
5622   if [ -z "${CHMOD+x}" ]; then
5623     # The variable is not set by user, try to locate tool using the code snippet
5624     for ac_prog in chmod
5625 do
5626   # Extract the first word of "$ac_prog", so it can be a program name with args.
5627 set dummy $ac_prog; ac_word=$2
5628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5629 $as_echo_n "checking for $ac_word... " >&6; }
5630 if ${ac_cv_path_CHMOD+:} false; then :
5631   $as_echo_n "(cached) " >&6
5632 else
5633   case $CHMOD in
5634   [\\/]* | ?:[\\/]*)
5635   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5636   ;;
5637   *)
5638   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5639 for as_dir in $PATH
5640 do
5641   IFS=$as_save_IFS
5642   test -z "$as_dir" && as_dir=.
5643     for ac_exec_ext in '' $ac_executable_extensions; do
5644   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5645     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5647     break 2
5648   fi
5649 done
5650   done
5651 IFS=$as_save_IFS
5652 
5653   ;;
5654 esac
5655 fi
5656 CHMOD=$ac_cv_path_CHMOD
5657 if test -n "$CHMOD"; then
5658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5659 $as_echo "$CHMOD" >&6; }
5660 else
5661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5662 $as_echo "no" >&6; }
5663 fi
5664 
5665 
5666   test -n "$CHMOD" && break
5667 done
5668 
5669   else
5670     # The variable is set, but is it from the command line or the environment?
5671 
5672     # Try to remove the string !CHMOD! from our list.
5673     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5674     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5675       # If it failed, the variable was not from the command line. Ignore it,
5676       # but warn the user (except for BASH, which is always set by the calling BASH).
5677       if test "xCHMOD" != xBASH; then
5678         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5679 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5680       fi
5681       # Try to locate tool using the code snippet
5682       for ac_prog in chmod
5683 do
5684   # Extract the first word of "$ac_prog", so it can be a program name with args.
5685 set dummy $ac_prog; ac_word=$2
5686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5687 $as_echo_n "checking for $ac_word... " >&6; }
5688 if ${ac_cv_path_CHMOD+:} false; then :
5689   $as_echo_n "(cached) " >&6
5690 else
5691   case $CHMOD in
5692   [\\/]* | ?:[\\/]*)
5693   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5694   ;;
5695   *)
5696   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5697 for as_dir in $PATH
5698 do
5699   IFS=$as_save_IFS
5700   test -z "$as_dir" && as_dir=.
5701     for ac_exec_ext in '' $ac_executable_extensions; do
5702   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5703     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5704     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5705     break 2
5706   fi
5707 done
5708   done
5709 IFS=$as_save_IFS
5710 
5711   ;;
5712 esac
5713 fi
5714 CHMOD=$ac_cv_path_CHMOD
5715 if test -n "$CHMOD"; then
5716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5717 $as_echo "$CHMOD" >&6; }
5718 else
5719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5720 $as_echo "no" >&6; }
5721 fi
5722 
5723 
5724   test -n "$CHMOD" && break
5725 done
5726 
5727     else
5728       # If it succeeded, then it was overridden by the user. We will use it
5729       # for the tool.
5730 
5731       # First remove it from the list of overridden variables, so we can test
5732       # for unknown variables in the end.
5733       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5734 
5735       # Check if we try to supply an empty value
5736       if test "x$CHMOD" = x; then
5737         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5738 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5739         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5740 $as_echo_n "checking for CHMOD... " >&6; }
5741         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5742 $as_echo "disabled" >&6; }
5743       else
5744         # Check if the provided tool contains a complete path.
5745         tool_specified="$CHMOD"
5746         tool_basename="${tool_specified##*/}"
5747         if test "x$tool_basename" = "x$tool_specified"; then
5748           # A command without a complete path is provided, search $PATH.
5749           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5750 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5751           # Extract the first word of "$tool_basename", so it can be a program name with args.
5752 set dummy $tool_basename; ac_word=$2
5753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5754 $as_echo_n "checking for $ac_word... " >&6; }
5755 if ${ac_cv_path_CHMOD+:} false; then :
5756   $as_echo_n "(cached) " >&6
5757 else
5758   case $CHMOD in
5759   [\\/]* | ?:[\\/]*)
5760   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5761   ;;
5762   *)
5763   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5764 for as_dir in $PATH
5765 do
5766   IFS=$as_save_IFS
5767   test -z "$as_dir" && as_dir=.
5768     for ac_exec_ext in '' $ac_executable_extensions; do
5769   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5770     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5771     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5772     break 2
5773   fi
5774 done
5775   done
5776 IFS=$as_save_IFS
5777 
5778   ;;
5779 esac
5780 fi
5781 CHMOD=$ac_cv_path_CHMOD
5782 if test -n "$CHMOD"; then
5783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5784 $as_echo "$CHMOD" >&6; }
5785 else
5786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5787 $as_echo "no" >&6; }
5788 fi
5789 
5790 
5791           if test "x$CHMOD" = x; then
5792             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5793           fi
5794         else
5795           # Otherwise we believe it is a complete path. Use it as it is.
5796           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5797 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5798           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5799 $as_echo_n "checking for CHMOD... " >&6; }
5800           if test ! -x "$tool_specified"; then
5801             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5802 $as_echo "not found" >&6; }
5803             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5804           fi
5805           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5806 $as_echo "$tool_specified" >&6; }
5807         fi
5808       fi
5809     fi
5810 
5811   fi
5812 
5813 
5814 
5815   if test "x$CHMOD" = x; then
5816     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5817   fi
5818 
5819 
5820 
5821 
5822 
5823   # Publish this variable in the help.
5824 
5825 
5826   if [ -z "${CMP+x}" ]; then
5827     # The variable is not set by user, try to locate tool using the code snippet
5828     for ac_prog in cmp
5829 do
5830   # Extract the first word of "$ac_prog", so it can be a program name with args.
5831 set dummy $ac_prog; ac_word=$2
5832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5833 $as_echo_n "checking for $ac_word... " >&6; }
5834 if ${ac_cv_path_CMP+:} false; then :
5835   $as_echo_n "(cached) " >&6
5836 else
5837   case $CMP in
5838   [\\/]* | ?:[\\/]*)
5839   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5840   ;;
5841   *)
5842   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5843 for as_dir in $PATH
5844 do
5845   IFS=$as_save_IFS
5846   test -z "$as_dir" && as_dir=.
5847     for ac_exec_ext in '' $ac_executable_extensions; do
5848   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5849     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5850     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5851     break 2
5852   fi
5853 done
5854   done
5855 IFS=$as_save_IFS
5856 
5857   ;;
5858 esac
5859 fi
5860 CMP=$ac_cv_path_CMP
5861 if test -n "$CMP"; then
5862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5863 $as_echo "$CMP" >&6; }
5864 else
5865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5866 $as_echo "no" >&6; }
5867 fi
5868 
5869 
5870   test -n "$CMP" && break
5871 done
5872 
5873   else
5874     # The variable is set, but is it from the command line or the environment?
5875 
5876     # Try to remove the string !CMP! from our list.
5877     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5878     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5879       # If it failed, the variable was not from the command line. Ignore it,
5880       # but warn the user (except for BASH, which is always set by the calling BASH).
5881       if test "xCMP" != xBASH; then
5882         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5883 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5884       fi
5885       # Try to locate tool using the code snippet
5886       for ac_prog in cmp
5887 do
5888   # Extract the first word of "$ac_prog", so it can be a program name with args.
5889 set dummy $ac_prog; ac_word=$2
5890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5891 $as_echo_n "checking for $ac_word... " >&6; }
5892 if ${ac_cv_path_CMP+:} false; then :
5893   $as_echo_n "(cached) " >&6
5894 else
5895   case $CMP in
5896   [\\/]* | ?:[\\/]*)
5897   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5898   ;;
5899   *)
5900   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5901 for as_dir in $PATH
5902 do
5903   IFS=$as_save_IFS
5904   test -z "$as_dir" && as_dir=.
5905     for ac_exec_ext in '' $ac_executable_extensions; do
5906   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5907     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5908     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5909     break 2
5910   fi
5911 done
5912   done
5913 IFS=$as_save_IFS
5914 
5915   ;;
5916 esac
5917 fi
5918 CMP=$ac_cv_path_CMP
5919 if test -n "$CMP"; then
5920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5921 $as_echo "$CMP" >&6; }
5922 else
5923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5924 $as_echo "no" >&6; }
5925 fi
5926 
5927 
5928   test -n "$CMP" && break
5929 done
5930 
5931     else
5932       # If it succeeded, then it was overridden by the user. We will use it
5933       # for the tool.
5934 
5935       # First remove it from the list of overridden variables, so we can test
5936       # for unknown variables in the end.
5937       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5938 
5939       # Check if we try to supply an empty value
5940       if test "x$CMP" = x; then
5941         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5942 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5943         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5944 $as_echo_n "checking for CMP... " >&6; }
5945         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5946 $as_echo "disabled" >&6; }
5947       else
5948         # Check if the provided tool contains a complete path.
5949         tool_specified="$CMP"
5950         tool_basename="${tool_specified##*/}"
5951         if test "x$tool_basename" = "x$tool_specified"; then
5952           # A command without a complete path is provided, search $PATH.
5953           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5954 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5955           # Extract the first word of "$tool_basename", so it can be a program name with args.
5956 set dummy $tool_basename; ac_word=$2
5957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5958 $as_echo_n "checking for $ac_word... " >&6; }
5959 if ${ac_cv_path_CMP+:} false; then :
5960   $as_echo_n "(cached) " >&6
5961 else
5962   case $CMP in
5963   [\\/]* | ?:[\\/]*)
5964   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5965   ;;
5966   *)
5967   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5968 for as_dir in $PATH
5969 do
5970   IFS=$as_save_IFS
5971   test -z "$as_dir" && as_dir=.
5972     for ac_exec_ext in '' $ac_executable_extensions; do
5973   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5974     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5975     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5976     break 2
5977   fi
5978 done
5979   done
5980 IFS=$as_save_IFS
5981 
5982   ;;
5983 esac
5984 fi
5985 CMP=$ac_cv_path_CMP
5986 if test -n "$CMP"; then
5987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5988 $as_echo "$CMP" >&6; }
5989 else
5990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5991 $as_echo "no" >&6; }
5992 fi
5993 
5994 
5995           if test "x$CMP" = x; then
5996             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5997           fi
5998         else
5999           # Otherwise we believe it is a complete path. Use it as it is.
6000           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6001 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6002           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6003 $as_echo_n "checking for CMP... " >&6; }
6004           if test ! -x "$tool_specified"; then
6005             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6006 $as_echo "not found" >&6; }
6007             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6008           fi
6009           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6010 $as_echo "$tool_specified" >&6; }
6011         fi
6012       fi
6013     fi
6014 
6015   fi
6016 
6017 
6018 
6019   if test "x$CMP" = x; then
6020     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6021   fi
6022 
6023 
6024 
6025 
6026 
6027   # Publish this variable in the help.
6028 
6029 
6030   if [ -z "${COMM+x}" ]; then
6031     # The variable is not set by user, try to locate tool using the code snippet
6032     for ac_prog in comm
6033 do
6034   # Extract the first word of "$ac_prog", so it can be a program name with args.
6035 set dummy $ac_prog; ac_word=$2
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6037 $as_echo_n "checking for $ac_word... " >&6; }
6038 if ${ac_cv_path_COMM+:} false; then :
6039   $as_echo_n "(cached) " >&6
6040 else
6041   case $COMM in
6042   [\\/]* | ?:[\\/]*)
6043   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6044   ;;
6045   *)
6046   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6047 for as_dir in $PATH
6048 do
6049   IFS=$as_save_IFS
6050   test -z "$as_dir" && as_dir=.
6051     for ac_exec_ext in '' $ac_executable_extensions; do
6052   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6053     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6054     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6055     break 2
6056   fi
6057 done
6058   done
6059 IFS=$as_save_IFS
6060 
6061   ;;
6062 esac
6063 fi
6064 COMM=$ac_cv_path_COMM
6065 if test -n "$COMM"; then
6066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6067 $as_echo "$COMM" >&6; }
6068 else
6069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6070 $as_echo "no" >&6; }
6071 fi
6072 
6073 
6074   test -n "$COMM" && break
6075 done
6076 
6077   else
6078     # The variable is set, but is it from the command line or the environment?
6079 
6080     # Try to remove the string !COMM! from our list.
6081     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6082     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6083       # If it failed, the variable was not from the command line. Ignore it,
6084       # but warn the user (except for BASH, which is always set by the calling BASH).
6085       if test "xCOMM" != xBASH; then
6086         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6087 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6088       fi
6089       # Try to locate tool using the code snippet
6090       for ac_prog in comm
6091 do
6092   # Extract the first word of "$ac_prog", so it can be a program name with args.
6093 set dummy $ac_prog; ac_word=$2
6094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6095 $as_echo_n "checking for $ac_word... " >&6; }
6096 if ${ac_cv_path_COMM+:} false; then :
6097   $as_echo_n "(cached) " >&6
6098 else
6099   case $COMM in
6100   [\\/]* | ?:[\\/]*)
6101   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6102   ;;
6103   *)
6104   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6105 for as_dir in $PATH
6106 do
6107   IFS=$as_save_IFS
6108   test -z "$as_dir" && as_dir=.
6109     for ac_exec_ext in '' $ac_executable_extensions; do
6110   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6111     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6112     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6113     break 2
6114   fi
6115 done
6116   done
6117 IFS=$as_save_IFS
6118 
6119   ;;
6120 esac
6121 fi
6122 COMM=$ac_cv_path_COMM
6123 if test -n "$COMM"; then
6124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6125 $as_echo "$COMM" >&6; }
6126 else
6127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6128 $as_echo "no" >&6; }
6129 fi
6130 
6131 
6132   test -n "$COMM" && break
6133 done
6134 
6135     else
6136       # If it succeeded, then it was overridden by the user. We will use it
6137       # for the tool.
6138 
6139       # First remove it from the list of overridden variables, so we can test
6140       # for unknown variables in the end.
6141       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6142 
6143       # Check if we try to supply an empty value
6144       if test "x$COMM" = x; then
6145         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6146 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6147         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6148 $as_echo_n "checking for COMM... " >&6; }
6149         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6150 $as_echo "disabled" >&6; }
6151       else
6152         # Check if the provided tool contains a complete path.
6153         tool_specified="$COMM"
6154         tool_basename="${tool_specified##*/}"
6155         if test "x$tool_basename" = "x$tool_specified"; then
6156           # A command without a complete path is provided, search $PATH.
6157           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6158 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6159           # Extract the first word of "$tool_basename", so it can be a program name with args.
6160 set dummy $tool_basename; ac_word=$2
6161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6162 $as_echo_n "checking for $ac_word... " >&6; }
6163 if ${ac_cv_path_COMM+:} false; then :
6164   $as_echo_n "(cached) " >&6
6165 else
6166   case $COMM in
6167   [\\/]* | ?:[\\/]*)
6168   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6169   ;;
6170   *)
6171   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6172 for as_dir in $PATH
6173 do
6174   IFS=$as_save_IFS
6175   test -z "$as_dir" && as_dir=.
6176     for ac_exec_ext in '' $ac_executable_extensions; do
6177   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6178     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6179     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6180     break 2
6181   fi
6182 done
6183   done
6184 IFS=$as_save_IFS
6185 
6186   ;;
6187 esac
6188 fi
6189 COMM=$ac_cv_path_COMM
6190 if test -n "$COMM"; then
6191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6192 $as_echo "$COMM" >&6; }
6193 else
6194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6195 $as_echo "no" >&6; }
6196 fi
6197 
6198 
6199           if test "x$COMM" = x; then
6200             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6201           fi
6202         else
6203           # Otherwise we believe it is a complete path. Use it as it is.
6204           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6205 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6206           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6207 $as_echo_n "checking for COMM... " >&6; }
6208           if test ! -x "$tool_specified"; then
6209             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6210 $as_echo "not found" >&6; }
6211             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6212           fi
6213           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6214 $as_echo "$tool_specified" >&6; }
6215         fi
6216       fi
6217     fi
6218 
6219   fi
6220 
6221 
6222 
6223   if test "x$COMM" = x; then
6224     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6225   fi
6226 
6227 
6228 
6229 
6230 
6231   # Publish this variable in the help.
6232 
6233 
6234   if [ -z "${CP+x}" ]; then
6235     # The variable is not set by user, try to locate tool using the code snippet
6236     for ac_prog in cp
6237 do
6238   # Extract the first word of "$ac_prog", so it can be a program name with args.
6239 set dummy $ac_prog; ac_word=$2
6240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6241 $as_echo_n "checking for $ac_word... " >&6; }
6242 if ${ac_cv_path_CP+:} false; then :
6243   $as_echo_n "(cached) " >&6
6244 else
6245   case $CP in
6246   [\\/]* | ?:[\\/]*)
6247   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6248   ;;
6249   *)
6250   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6251 for as_dir in $PATH
6252 do
6253   IFS=$as_save_IFS
6254   test -z "$as_dir" && as_dir=.
6255     for ac_exec_ext in '' $ac_executable_extensions; do
6256   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6257     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6258     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6259     break 2
6260   fi
6261 done
6262   done
6263 IFS=$as_save_IFS
6264 
6265   ;;
6266 esac
6267 fi
6268 CP=$ac_cv_path_CP
6269 if test -n "$CP"; then
6270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6271 $as_echo "$CP" >&6; }
6272 else
6273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6274 $as_echo "no" >&6; }
6275 fi
6276 
6277 
6278   test -n "$CP" && break
6279 done
6280 
6281   else
6282     # The variable is set, but is it from the command line or the environment?
6283 
6284     # Try to remove the string !CP! from our list.
6285     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6286     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6287       # If it failed, the variable was not from the command line. Ignore it,
6288       # but warn the user (except for BASH, which is always set by the calling BASH).
6289       if test "xCP" != xBASH; then
6290         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6291 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6292       fi
6293       # Try to locate tool using the code snippet
6294       for ac_prog in cp
6295 do
6296   # Extract the first word of "$ac_prog", so it can be a program name with args.
6297 set dummy $ac_prog; ac_word=$2
6298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6299 $as_echo_n "checking for $ac_word... " >&6; }
6300 if ${ac_cv_path_CP+:} false; then :
6301   $as_echo_n "(cached) " >&6
6302 else
6303   case $CP in
6304   [\\/]* | ?:[\\/]*)
6305   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6306   ;;
6307   *)
6308   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6309 for as_dir in $PATH
6310 do
6311   IFS=$as_save_IFS
6312   test -z "$as_dir" && as_dir=.
6313     for ac_exec_ext in '' $ac_executable_extensions; do
6314   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6315     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6316     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6317     break 2
6318   fi
6319 done
6320   done
6321 IFS=$as_save_IFS
6322 
6323   ;;
6324 esac
6325 fi
6326 CP=$ac_cv_path_CP
6327 if test -n "$CP"; then
6328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6329 $as_echo "$CP" >&6; }
6330 else
6331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6332 $as_echo "no" >&6; }
6333 fi
6334 
6335 
6336   test -n "$CP" && break
6337 done
6338 
6339     else
6340       # If it succeeded, then it was overridden by the user. We will use it
6341       # for the tool.
6342 
6343       # First remove it from the list of overridden variables, so we can test
6344       # for unknown variables in the end.
6345       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6346 
6347       # Check if we try to supply an empty value
6348       if test "x$CP" = x; then
6349         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6350 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6351         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6352 $as_echo_n "checking for CP... " >&6; }
6353         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6354 $as_echo "disabled" >&6; }
6355       else
6356         # Check if the provided tool contains a complete path.
6357         tool_specified="$CP"
6358         tool_basename="${tool_specified##*/}"
6359         if test "x$tool_basename" = "x$tool_specified"; then
6360           # A command without a complete path is provided, search $PATH.
6361           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6362 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6363           # Extract the first word of "$tool_basename", so it can be a program name with args.
6364 set dummy $tool_basename; ac_word=$2
6365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6366 $as_echo_n "checking for $ac_word... " >&6; }
6367 if ${ac_cv_path_CP+:} false; then :
6368   $as_echo_n "(cached) " >&6
6369 else
6370   case $CP in
6371   [\\/]* | ?:[\\/]*)
6372   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6373   ;;
6374   *)
6375   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6376 for as_dir in $PATH
6377 do
6378   IFS=$as_save_IFS
6379   test -z "$as_dir" && as_dir=.
6380     for ac_exec_ext in '' $ac_executable_extensions; do
6381   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6382     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6384     break 2
6385   fi
6386 done
6387   done
6388 IFS=$as_save_IFS
6389 
6390   ;;
6391 esac
6392 fi
6393 CP=$ac_cv_path_CP
6394 if test -n "$CP"; then
6395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6396 $as_echo "$CP" >&6; }
6397 else
6398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6399 $as_echo "no" >&6; }
6400 fi
6401 
6402 
6403           if test "x$CP" = x; then
6404             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6405           fi
6406         else
6407           # Otherwise we believe it is a complete path. Use it as it is.
6408           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6409 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6410           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6411 $as_echo_n "checking for CP... " >&6; }
6412           if test ! -x "$tool_specified"; then
6413             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6414 $as_echo "not found" >&6; }
6415             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6416           fi
6417           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6418 $as_echo "$tool_specified" >&6; }
6419         fi
6420       fi
6421     fi
6422 
6423   fi
6424 
6425 
6426 
6427   if test "x$CP" = x; then
6428     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6429   fi
6430 
6431 
6432 
6433 
6434 
6435   # Publish this variable in the help.
6436 
6437 
6438   if [ -z "${CUT+x}" ]; then
6439     # The variable is not set by user, try to locate tool using the code snippet
6440     for ac_prog in cut
6441 do
6442   # Extract the first word of "$ac_prog", so it can be a program name with args.
6443 set dummy $ac_prog; ac_word=$2
6444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6445 $as_echo_n "checking for $ac_word... " >&6; }
6446 if ${ac_cv_path_CUT+:} false; then :
6447   $as_echo_n "(cached) " >&6
6448 else
6449   case $CUT in
6450   [\\/]* | ?:[\\/]*)
6451   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6452   ;;
6453   *)
6454   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6455 for as_dir in $PATH
6456 do
6457   IFS=$as_save_IFS
6458   test -z "$as_dir" && as_dir=.
6459     for ac_exec_ext in '' $ac_executable_extensions; do
6460   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6461     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6462     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6463     break 2
6464   fi
6465 done
6466   done
6467 IFS=$as_save_IFS
6468 
6469   ;;
6470 esac
6471 fi
6472 CUT=$ac_cv_path_CUT
6473 if test -n "$CUT"; then
6474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6475 $as_echo "$CUT" >&6; }
6476 else
6477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6478 $as_echo "no" >&6; }
6479 fi
6480 
6481 
6482   test -n "$CUT" && break
6483 done
6484 
6485   else
6486     # The variable is set, but is it from the command line or the environment?
6487 
6488     # Try to remove the string !CUT! from our list.
6489     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6490     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6491       # If it failed, the variable was not from the command line. Ignore it,
6492       # but warn the user (except for BASH, which is always set by the calling BASH).
6493       if test "xCUT" != xBASH; then
6494         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6495 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6496       fi
6497       # Try to locate tool using the code snippet
6498       for ac_prog in cut
6499 do
6500   # Extract the first word of "$ac_prog", so it can be a program name with args.
6501 set dummy $ac_prog; ac_word=$2
6502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6503 $as_echo_n "checking for $ac_word... " >&6; }
6504 if ${ac_cv_path_CUT+:} false; then :
6505   $as_echo_n "(cached) " >&6
6506 else
6507   case $CUT in
6508   [\\/]* | ?:[\\/]*)
6509   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6510   ;;
6511   *)
6512   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6513 for as_dir in $PATH
6514 do
6515   IFS=$as_save_IFS
6516   test -z "$as_dir" && as_dir=.
6517     for ac_exec_ext in '' $ac_executable_extensions; do
6518   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6519     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6520     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6521     break 2
6522   fi
6523 done
6524   done
6525 IFS=$as_save_IFS
6526 
6527   ;;
6528 esac
6529 fi
6530 CUT=$ac_cv_path_CUT
6531 if test -n "$CUT"; then
6532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6533 $as_echo "$CUT" >&6; }
6534 else
6535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6536 $as_echo "no" >&6; }
6537 fi
6538 
6539 
6540   test -n "$CUT" && break
6541 done
6542 
6543     else
6544       # If it succeeded, then it was overridden by the user. We will use it
6545       # for the tool.
6546 
6547       # First remove it from the list of overridden variables, so we can test
6548       # for unknown variables in the end.
6549       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6550 
6551       # Check if we try to supply an empty value
6552       if test "x$CUT" = x; then
6553         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6554 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6555         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6556 $as_echo_n "checking for CUT... " >&6; }
6557         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6558 $as_echo "disabled" >&6; }
6559       else
6560         # Check if the provided tool contains a complete path.
6561         tool_specified="$CUT"
6562         tool_basename="${tool_specified##*/}"
6563         if test "x$tool_basename" = "x$tool_specified"; then
6564           # A command without a complete path is provided, search $PATH.
6565           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6566 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6567           # Extract the first word of "$tool_basename", so it can be a program name with args.
6568 set dummy $tool_basename; ac_word=$2
6569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6570 $as_echo_n "checking for $ac_word... " >&6; }
6571 if ${ac_cv_path_CUT+:} false; then :
6572   $as_echo_n "(cached) " >&6
6573 else
6574   case $CUT in
6575   [\\/]* | ?:[\\/]*)
6576   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6577   ;;
6578   *)
6579   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6580 for as_dir in $PATH
6581 do
6582   IFS=$as_save_IFS
6583   test -z "$as_dir" && as_dir=.
6584     for ac_exec_ext in '' $ac_executable_extensions; do
6585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6586     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6588     break 2
6589   fi
6590 done
6591   done
6592 IFS=$as_save_IFS
6593 
6594   ;;
6595 esac
6596 fi
6597 CUT=$ac_cv_path_CUT
6598 if test -n "$CUT"; then
6599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6600 $as_echo "$CUT" >&6; }
6601 else
6602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6603 $as_echo "no" >&6; }
6604 fi
6605 
6606 
6607           if test "x$CUT" = x; then
6608             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6609           fi
6610         else
6611           # Otherwise we believe it is a complete path. Use it as it is.
6612           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6613 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6614           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6615 $as_echo_n "checking for CUT... " >&6; }
6616           if test ! -x "$tool_specified"; then
6617             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6618 $as_echo "not found" >&6; }
6619             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6620           fi
6621           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6622 $as_echo "$tool_specified" >&6; }
6623         fi
6624       fi
6625     fi
6626 
6627   fi
6628 
6629 
6630 
6631   if test "x$CUT" = x; then
6632     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6633   fi
6634 
6635 
6636 
6637 
6638 
6639   # Publish this variable in the help.
6640 
6641 
6642   if [ -z "${DATE+x}" ]; then
6643     # The variable is not set by user, try to locate tool using the code snippet
6644     for ac_prog in date
6645 do
6646   # Extract the first word of "$ac_prog", so it can be a program name with args.
6647 set dummy $ac_prog; ac_word=$2
6648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6649 $as_echo_n "checking for $ac_word... " >&6; }
6650 if ${ac_cv_path_DATE+:} false; then :
6651   $as_echo_n "(cached) " >&6
6652 else
6653   case $DATE in
6654   [\\/]* | ?:[\\/]*)
6655   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6656   ;;
6657   *)
6658   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6659 for as_dir in $PATH
6660 do
6661   IFS=$as_save_IFS
6662   test -z "$as_dir" && as_dir=.
6663     for ac_exec_ext in '' $ac_executable_extensions; do
6664   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6665     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6666     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6667     break 2
6668   fi
6669 done
6670   done
6671 IFS=$as_save_IFS
6672 
6673   ;;
6674 esac
6675 fi
6676 DATE=$ac_cv_path_DATE
6677 if test -n "$DATE"; then
6678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6679 $as_echo "$DATE" >&6; }
6680 else
6681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6682 $as_echo "no" >&6; }
6683 fi
6684 
6685 
6686   test -n "$DATE" && break
6687 done
6688 
6689   else
6690     # The variable is set, but is it from the command line or the environment?
6691 
6692     # Try to remove the string !DATE! from our list.
6693     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6694     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6695       # If it failed, the variable was not from the command line. Ignore it,
6696       # but warn the user (except for BASH, which is always set by the calling BASH).
6697       if test "xDATE" != xBASH; then
6698         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6699 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6700       fi
6701       # Try to locate tool using the code snippet
6702       for ac_prog in date
6703 do
6704   # Extract the first word of "$ac_prog", so it can be a program name with args.
6705 set dummy $ac_prog; ac_word=$2
6706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6707 $as_echo_n "checking for $ac_word... " >&6; }
6708 if ${ac_cv_path_DATE+:} false; then :
6709   $as_echo_n "(cached) " >&6
6710 else
6711   case $DATE in
6712   [\\/]* | ?:[\\/]*)
6713   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6714   ;;
6715   *)
6716   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6717 for as_dir in $PATH
6718 do
6719   IFS=$as_save_IFS
6720   test -z "$as_dir" && as_dir=.
6721     for ac_exec_ext in '' $ac_executable_extensions; do
6722   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6723     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6725     break 2
6726   fi
6727 done
6728   done
6729 IFS=$as_save_IFS
6730 
6731   ;;
6732 esac
6733 fi
6734 DATE=$ac_cv_path_DATE
6735 if test -n "$DATE"; then
6736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6737 $as_echo "$DATE" >&6; }
6738 else
6739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6740 $as_echo "no" >&6; }
6741 fi
6742 
6743 
6744   test -n "$DATE" && break
6745 done
6746 
6747     else
6748       # If it succeeded, then it was overridden by the user. We will use it
6749       # for the tool.
6750 
6751       # First remove it from the list of overridden variables, so we can test
6752       # for unknown variables in the end.
6753       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6754 
6755       # Check if we try to supply an empty value
6756       if test "x$DATE" = x; then
6757         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6758 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6759         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6760 $as_echo_n "checking for DATE... " >&6; }
6761         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6762 $as_echo "disabled" >&6; }
6763       else
6764         # Check if the provided tool contains a complete path.
6765         tool_specified="$DATE"
6766         tool_basename="${tool_specified##*/}"
6767         if test "x$tool_basename" = "x$tool_specified"; then
6768           # A command without a complete path is provided, search $PATH.
6769           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6770 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6771           # Extract the first word of "$tool_basename", so it can be a program name with args.
6772 set dummy $tool_basename; ac_word=$2
6773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6774 $as_echo_n "checking for $ac_word... " >&6; }
6775 if ${ac_cv_path_DATE+:} false; then :
6776   $as_echo_n "(cached) " >&6
6777 else
6778   case $DATE in
6779   [\\/]* | ?:[\\/]*)
6780   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6781   ;;
6782   *)
6783   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6784 for as_dir in $PATH
6785 do
6786   IFS=$as_save_IFS
6787   test -z "$as_dir" && as_dir=.
6788     for ac_exec_ext in '' $ac_executable_extensions; do
6789   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6790     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6791     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6792     break 2
6793   fi
6794 done
6795   done
6796 IFS=$as_save_IFS
6797 
6798   ;;
6799 esac
6800 fi
6801 DATE=$ac_cv_path_DATE
6802 if test -n "$DATE"; then
6803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6804 $as_echo "$DATE" >&6; }
6805 else
6806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6807 $as_echo "no" >&6; }
6808 fi
6809 
6810 
6811           if test "x$DATE" = x; then
6812             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6813           fi
6814         else
6815           # Otherwise we believe it is a complete path. Use it as it is.
6816           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6817 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6818           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6819 $as_echo_n "checking for DATE... " >&6; }
6820           if test ! -x "$tool_specified"; then
6821             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6822 $as_echo "not found" >&6; }
6823             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6824           fi
6825           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6826 $as_echo "$tool_specified" >&6; }
6827         fi
6828       fi
6829     fi
6830 
6831   fi
6832 
6833 
6834 
6835   if test "x$DATE" = x; then
6836     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6837   fi
6838 
6839 
6840 
6841 
6842 
6843   # Publish this variable in the help.
6844 
6845 
6846   if [ -z "${DIFF+x}" ]; then
6847     # The variable is not set by user, try to locate tool using the code snippet
6848     for ac_prog in gdiff diff
6849 do
6850   # Extract the first word of "$ac_prog", so it can be a program name with args.
6851 set dummy $ac_prog; ac_word=$2
6852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6853 $as_echo_n "checking for $ac_word... " >&6; }
6854 if ${ac_cv_path_DIFF+:} false; then :
6855   $as_echo_n "(cached) " >&6
6856 else
6857   case $DIFF in
6858   [\\/]* | ?:[\\/]*)
6859   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6860   ;;
6861   *)
6862   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6863 for as_dir in $PATH
6864 do
6865   IFS=$as_save_IFS
6866   test -z "$as_dir" && as_dir=.
6867     for ac_exec_ext in '' $ac_executable_extensions; do
6868   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6869     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6870     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6871     break 2
6872   fi
6873 done
6874   done
6875 IFS=$as_save_IFS
6876 
6877   ;;
6878 esac
6879 fi
6880 DIFF=$ac_cv_path_DIFF
6881 if test -n "$DIFF"; then
6882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6883 $as_echo "$DIFF" >&6; }
6884 else
6885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6886 $as_echo "no" >&6; }
6887 fi
6888 
6889 
6890   test -n "$DIFF" && break
6891 done
6892 
6893   else
6894     # The variable is set, but is it from the command line or the environment?
6895 
6896     # Try to remove the string !DIFF! from our list.
6897     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6898     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6899       # If it failed, the variable was not from the command line. Ignore it,
6900       # but warn the user (except for BASH, which is always set by the calling BASH).
6901       if test "xDIFF" != xBASH; then
6902         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6903 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6904       fi
6905       # Try to locate tool using the code snippet
6906       for ac_prog in gdiff diff
6907 do
6908   # Extract the first word of "$ac_prog", so it can be a program name with args.
6909 set dummy $ac_prog; ac_word=$2
6910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6911 $as_echo_n "checking for $ac_word... " >&6; }
6912 if ${ac_cv_path_DIFF+:} false; then :
6913   $as_echo_n "(cached) " >&6
6914 else
6915   case $DIFF in
6916   [\\/]* | ?:[\\/]*)
6917   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6918   ;;
6919   *)
6920   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6921 for as_dir in $PATH
6922 do
6923   IFS=$as_save_IFS
6924   test -z "$as_dir" && as_dir=.
6925     for ac_exec_ext in '' $ac_executable_extensions; do
6926   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6927     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6929     break 2
6930   fi
6931 done
6932   done
6933 IFS=$as_save_IFS
6934 
6935   ;;
6936 esac
6937 fi
6938 DIFF=$ac_cv_path_DIFF
6939 if test -n "$DIFF"; then
6940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6941 $as_echo "$DIFF" >&6; }
6942 else
6943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6944 $as_echo "no" >&6; }
6945 fi
6946 
6947 
6948   test -n "$DIFF" && break
6949 done
6950 
6951     else
6952       # If it succeeded, then it was overridden by the user. We will use it
6953       # for the tool.
6954 
6955       # First remove it from the list of overridden variables, so we can test
6956       # for unknown variables in the end.
6957       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6958 
6959       # Check if we try to supply an empty value
6960       if test "x$DIFF" = x; then
6961         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6962 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6963         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6964 $as_echo_n "checking for DIFF... " >&6; }
6965         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6966 $as_echo "disabled" >&6; }
6967       else
6968         # Check if the provided tool contains a complete path.
6969         tool_specified="$DIFF"
6970         tool_basename="${tool_specified##*/}"
6971         if test "x$tool_basename" = "x$tool_specified"; then
6972           # A command without a complete path is provided, search $PATH.
6973           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6974 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6975           # Extract the first word of "$tool_basename", so it can be a program name with args.
6976 set dummy $tool_basename; ac_word=$2
6977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6978 $as_echo_n "checking for $ac_word... " >&6; }
6979 if ${ac_cv_path_DIFF+:} false; then :
6980   $as_echo_n "(cached) " >&6
6981 else
6982   case $DIFF in
6983   [\\/]* | ?:[\\/]*)
6984   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6985   ;;
6986   *)
6987   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6988 for as_dir in $PATH
6989 do
6990   IFS=$as_save_IFS
6991   test -z "$as_dir" && as_dir=.
6992     for ac_exec_ext in '' $ac_executable_extensions; do
6993   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6994     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6995     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6996     break 2
6997   fi
6998 done
6999   done
7000 IFS=$as_save_IFS
7001 
7002   ;;
7003 esac
7004 fi
7005 DIFF=$ac_cv_path_DIFF
7006 if test -n "$DIFF"; then
7007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7008 $as_echo "$DIFF" >&6; }
7009 else
7010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7011 $as_echo "no" >&6; }
7012 fi
7013 
7014 
7015           if test "x$DIFF" = x; then
7016             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7017           fi
7018         else
7019           # Otherwise we believe it is a complete path. Use it as it is.
7020           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7021 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7022           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7023 $as_echo_n "checking for DIFF... " >&6; }
7024           if test ! -x "$tool_specified"; then
7025             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7026 $as_echo "not found" >&6; }
7027             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7028           fi
7029           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7030 $as_echo "$tool_specified" >&6; }
7031         fi
7032       fi
7033     fi
7034 
7035   fi
7036 
7037 
7038 
7039   if test "x$DIFF" = x; then
7040     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7041   fi
7042 
7043 
7044 
7045 
7046 
7047   # Publish this variable in the help.
7048 
7049 
7050   if [ -z "${DIRNAME+x}" ]; then
7051     # The variable is not set by user, try to locate tool using the code snippet
7052     for ac_prog in dirname
7053 do
7054   # Extract the first word of "$ac_prog", so it can be a program name with args.
7055 set dummy $ac_prog; ac_word=$2
7056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7057 $as_echo_n "checking for $ac_word... " >&6; }
7058 if ${ac_cv_path_DIRNAME+:} false; then :
7059   $as_echo_n "(cached) " >&6
7060 else
7061   case $DIRNAME in
7062   [\\/]* | ?:[\\/]*)
7063   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7064   ;;
7065   *)
7066   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7067 for as_dir in $PATH
7068 do
7069   IFS=$as_save_IFS
7070   test -z "$as_dir" && as_dir=.
7071     for ac_exec_ext in '' $ac_executable_extensions; do
7072   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7073     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7074     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7075     break 2
7076   fi
7077 done
7078   done
7079 IFS=$as_save_IFS
7080 
7081   ;;
7082 esac
7083 fi
7084 DIRNAME=$ac_cv_path_DIRNAME
7085 if test -n "$DIRNAME"; then
7086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7087 $as_echo "$DIRNAME" >&6; }
7088 else
7089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7090 $as_echo "no" >&6; }
7091 fi
7092 
7093 
7094   test -n "$DIRNAME" && break
7095 done
7096 
7097   else
7098     # The variable is set, but is it from the command line or the environment?
7099 
7100     # Try to remove the string !DIRNAME! from our list.
7101     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7102     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7103       # If it failed, the variable was not from the command line. Ignore it,
7104       # but warn the user (except for BASH, which is always set by the calling BASH).
7105       if test "xDIRNAME" != xBASH; then
7106         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7107 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7108       fi
7109       # Try to locate tool using the code snippet
7110       for ac_prog in dirname
7111 do
7112   # Extract the first word of "$ac_prog", so it can be a program name with args.
7113 set dummy $ac_prog; ac_word=$2
7114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7115 $as_echo_n "checking for $ac_word... " >&6; }
7116 if ${ac_cv_path_DIRNAME+:} false; then :
7117   $as_echo_n "(cached) " >&6
7118 else
7119   case $DIRNAME in
7120   [\\/]* | ?:[\\/]*)
7121   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7122   ;;
7123   *)
7124   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7125 for as_dir in $PATH
7126 do
7127   IFS=$as_save_IFS
7128   test -z "$as_dir" && as_dir=.
7129     for ac_exec_ext in '' $ac_executable_extensions; do
7130   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7131     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7132     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7133     break 2
7134   fi
7135 done
7136   done
7137 IFS=$as_save_IFS
7138 
7139   ;;
7140 esac
7141 fi
7142 DIRNAME=$ac_cv_path_DIRNAME
7143 if test -n "$DIRNAME"; then
7144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7145 $as_echo "$DIRNAME" >&6; }
7146 else
7147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7148 $as_echo "no" >&6; }
7149 fi
7150 
7151 
7152   test -n "$DIRNAME" && break
7153 done
7154 
7155     else
7156       # If it succeeded, then it was overridden by the user. We will use it
7157       # for the tool.
7158 
7159       # First remove it from the list of overridden variables, so we can test
7160       # for unknown variables in the end.
7161       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7162 
7163       # Check if we try to supply an empty value
7164       if test "x$DIRNAME" = x; then
7165         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7166 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7167         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7168 $as_echo_n "checking for DIRNAME... " >&6; }
7169         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7170 $as_echo "disabled" >&6; }
7171       else
7172         # Check if the provided tool contains a complete path.
7173         tool_specified="$DIRNAME"
7174         tool_basename="${tool_specified##*/}"
7175         if test "x$tool_basename" = "x$tool_specified"; then
7176           # A command without a complete path is provided, search $PATH.
7177           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7178 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7179           # Extract the first word of "$tool_basename", so it can be a program name with args.
7180 set dummy $tool_basename; ac_word=$2
7181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7182 $as_echo_n "checking for $ac_word... " >&6; }
7183 if ${ac_cv_path_DIRNAME+:} false; then :
7184   $as_echo_n "(cached) " >&6
7185 else
7186   case $DIRNAME in
7187   [\\/]* | ?:[\\/]*)
7188   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7189   ;;
7190   *)
7191   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7192 for as_dir in $PATH
7193 do
7194   IFS=$as_save_IFS
7195   test -z "$as_dir" && as_dir=.
7196     for ac_exec_ext in '' $ac_executable_extensions; do
7197   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7198     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7199     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7200     break 2
7201   fi
7202 done
7203   done
7204 IFS=$as_save_IFS
7205 
7206   ;;
7207 esac
7208 fi
7209 DIRNAME=$ac_cv_path_DIRNAME
7210 if test -n "$DIRNAME"; then
7211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7212 $as_echo "$DIRNAME" >&6; }
7213 else
7214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7215 $as_echo "no" >&6; }
7216 fi
7217 
7218 
7219           if test "x$DIRNAME" = x; then
7220             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7221           fi
7222         else
7223           # Otherwise we believe it is a complete path. Use it as it is.
7224           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7225 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7226           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7227 $as_echo_n "checking for DIRNAME... " >&6; }
7228           if test ! -x "$tool_specified"; then
7229             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7230 $as_echo "not found" >&6; }
7231             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7232           fi
7233           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7234 $as_echo "$tool_specified" >&6; }
7235         fi
7236       fi
7237     fi
7238 
7239   fi
7240 
7241 
7242 
7243   if test "x$DIRNAME" = x; then
7244     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7245   fi
7246 
7247 
7248 
7249 
7250 
7251   # Publish this variable in the help.
7252 
7253 
7254   if [ -z "${ECHO+x}" ]; then
7255     # The variable is not set by user, try to locate tool using the code snippet
7256     for ac_prog in echo
7257 do
7258   # Extract the first word of "$ac_prog", so it can be a program name with args.
7259 set dummy $ac_prog; ac_word=$2
7260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7261 $as_echo_n "checking for $ac_word... " >&6; }
7262 if ${ac_cv_path_ECHO+:} false; then :
7263   $as_echo_n "(cached) " >&6
7264 else
7265   case $ECHO in
7266   [\\/]* | ?:[\\/]*)
7267   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7268   ;;
7269   *)
7270   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7271 for as_dir in $PATH
7272 do
7273   IFS=$as_save_IFS
7274   test -z "$as_dir" && as_dir=.
7275     for ac_exec_ext in '' $ac_executable_extensions; do
7276   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7277     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7278     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7279     break 2
7280   fi
7281 done
7282   done
7283 IFS=$as_save_IFS
7284 
7285   ;;
7286 esac
7287 fi
7288 ECHO=$ac_cv_path_ECHO
7289 if test -n "$ECHO"; then
7290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7291 $as_echo "$ECHO" >&6; }
7292 else
7293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7294 $as_echo "no" >&6; }
7295 fi
7296 
7297 
7298   test -n "$ECHO" && break
7299 done
7300 
7301   else
7302     # The variable is set, but is it from the command line or the environment?
7303 
7304     # Try to remove the string !ECHO! from our list.
7305     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7306     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7307       # If it failed, the variable was not from the command line. Ignore it,
7308       # but warn the user (except for BASH, which is always set by the calling BASH).
7309       if test "xECHO" != xBASH; then
7310         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7311 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7312       fi
7313       # Try to locate tool using the code snippet
7314       for ac_prog in echo
7315 do
7316   # Extract the first word of "$ac_prog", so it can be a program name with args.
7317 set dummy $ac_prog; ac_word=$2
7318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7319 $as_echo_n "checking for $ac_word... " >&6; }
7320 if ${ac_cv_path_ECHO+:} false; then :
7321   $as_echo_n "(cached) " >&6
7322 else
7323   case $ECHO in
7324   [\\/]* | ?:[\\/]*)
7325   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7326   ;;
7327   *)
7328   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7329 for as_dir in $PATH
7330 do
7331   IFS=$as_save_IFS
7332   test -z "$as_dir" && as_dir=.
7333     for ac_exec_ext in '' $ac_executable_extensions; do
7334   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7335     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7336     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7337     break 2
7338   fi
7339 done
7340   done
7341 IFS=$as_save_IFS
7342 
7343   ;;
7344 esac
7345 fi
7346 ECHO=$ac_cv_path_ECHO
7347 if test -n "$ECHO"; then
7348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7349 $as_echo "$ECHO" >&6; }
7350 else
7351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7352 $as_echo "no" >&6; }
7353 fi
7354 
7355 
7356   test -n "$ECHO" && break
7357 done
7358 
7359     else
7360       # If it succeeded, then it was overridden by the user. We will use it
7361       # for the tool.
7362 
7363       # First remove it from the list of overridden variables, so we can test
7364       # for unknown variables in the end.
7365       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7366 
7367       # Check if we try to supply an empty value
7368       if test "x$ECHO" = x; then
7369         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7370 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7371         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7372 $as_echo_n "checking for ECHO... " >&6; }
7373         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7374 $as_echo "disabled" >&6; }
7375       else
7376         # Check if the provided tool contains a complete path.
7377         tool_specified="$ECHO"
7378         tool_basename="${tool_specified##*/}"
7379         if test "x$tool_basename" = "x$tool_specified"; then
7380           # A command without a complete path is provided, search $PATH.
7381           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7382 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7383           # Extract the first word of "$tool_basename", so it can be a program name with args.
7384 set dummy $tool_basename; ac_word=$2
7385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7386 $as_echo_n "checking for $ac_word... " >&6; }
7387 if ${ac_cv_path_ECHO+:} false; then :
7388   $as_echo_n "(cached) " >&6
7389 else
7390   case $ECHO in
7391   [\\/]* | ?:[\\/]*)
7392   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7393   ;;
7394   *)
7395   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7396 for as_dir in $PATH
7397 do
7398   IFS=$as_save_IFS
7399   test -z "$as_dir" && as_dir=.
7400     for ac_exec_ext in '' $ac_executable_extensions; do
7401   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7402     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7404     break 2
7405   fi
7406 done
7407   done
7408 IFS=$as_save_IFS
7409 
7410   ;;
7411 esac
7412 fi
7413 ECHO=$ac_cv_path_ECHO
7414 if test -n "$ECHO"; then
7415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7416 $as_echo "$ECHO" >&6; }
7417 else
7418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7419 $as_echo "no" >&6; }
7420 fi
7421 
7422 
7423           if test "x$ECHO" = x; then
7424             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7425           fi
7426         else
7427           # Otherwise we believe it is a complete path. Use it as it is.
7428           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7429 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7430           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7431 $as_echo_n "checking for ECHO... " >&6; }
7432           if test ! -x "$tool_specified"; then
7433             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7434 $as_echo "not found" >&6; }
7435             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7436           fi
7437           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7438 $as_echo "$tool_specified" >&6; }
7439         fi
7440       fi
7441     fi
7442 
7443   fi
7444 
7445 
7446 
7447   if test "x$ECHO" = x; then
7448     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7449   fi
7450 
7451 
7452 
7453 
7454 
7455   # Publish this variable in the help.
7456 
7457 
7458   if [ -z "${EXPR+x}" ]; then
7459     # The variable is not set by user, try to locate tool using the code snippet
7460     for ac_prog in expr
7461 do
7462   # Extract the first word of "$ac_prog", so it can be a program name with args.
7463 set dummy $ac_prog; ac_word=$2
7464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7465 $as_echo_n "checking for $ac_word... " >&6; }
7466 if ${ac_cv_path_EXPR+:} false; then :
7467   $as_echo_n "(cached) " >&6
7468 else
7469   case $EXPR in
7470   [\\/]* | ?:[\\/]*)
7471   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7472   ;;
7473   *)
7474   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7475 for as_dir in $PATH
7476 do
7477   IFS=$as_save_IFS
7478   test -z "$as_dir" && as_dir=.
7479     for ac_exec_ext in '' $ac_executable_extensions; do
7480   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7481     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7482     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7483     break 2
7484   fi
7485 done
7486   done
7487 IFS=$as_save_IFS
7488 
7489   ;;
7490 esac
7491 fi
7492 EXPR=$ac_cv_path_EXPR
7493 if test -n "$EXPR"; then
7494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7495 $as_echo "$EXPR" >&6; }
7496 else
7497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7498 $as_echo "no" >&6; }
7499 fi
7500 
7501 
7502   test -n "$EXPR" && break
7503 done
7504 
7505   else
7506     # The variable is set, but is it from the command line or the environment?
7507 
7508     # Try to remove the string !EXPR! from our list.
7509     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7510     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7511       # If it failed, the variable was not from the command line. Ignore it,
7512       # but warn the user (except for BASH, which is always set by the calling BASH).
7513       if test "xEXPR" != xBASH; then
7514         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7515 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7516       fi
7517       # Try to locate tool using the code snippet
7518       for ac_prog in expr
7519 do
7520   # Extract the first word of "$ac_prog", so it can be a program name with args.
7521 set dummy $ac_prog; ac_word=$2
7522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7523 $as_echo_n "checking for $ac_word... " >&6; }
7524 if ${ac_cv_path_EXPR+:} false; then :
7525   $as_echo_n "(cached) " >&6
7526 else
7527   case $EXPR in
7528   [\\/]* | ?:[\\/]*)
7529   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7530   ;;
7531   *)
7532   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7533 for as_dir in $PATH
7534 do
7535   IFS=$as_save_IFS
7536   test -z "$as_dir" && as_dir=.
7537     for ac_exec_ext in '' $ac_executable_extensions; do
7538   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7539     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7541     break 2
7542   fi
7543 done
7544   done
7545 IFS=$as_save_IFS
7546 
7547   ;;
7548 esac
7549 fi
7550 EXPR=$ac_cv_path_EXPR
7551 if test -n "$EXPR"; then
7552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7553 $as_echo "$EXPR" >&6; }
7554 else
7555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7556 $as_echo "no" >&6; }
7557 fi
7558 
7559 
7560   test -n "$EXPR" && break
7561 done
7562 
7563     else
7564       # If it succeeded, then it was overridden by the user. We will use it
7565       # for the tool.
7566 
7567       # First remove it from the list of overridden variables, so we can test
7568       # for unknown variables in the end.
7569       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7570 
7571       # Check if we try to supply an empty value
7572       if test "x$EXPR" = x; then
7573         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7574 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7575         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7576 $as_echo_n "checking for EXPR... " >&6; }
7577         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7578 $as_echo "disabled" >&6; }
7579       else
7580         # Check if the provided tool contains a complete path.
7581         tool_specified="$EXPR"
7582         tool_basename="${tool_specified##*/}"
7583         if test "x$tool_basename" = "x$tool_specified"; then
7584           # A command without a complete path is provided, search $PATH.
7585           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7586 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7587           # Extract the first word of "$tool_basename", so it can be a program name with args.
7588 set dummy $tool_basename; ac_word=$2
7589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7590 $as_echo_n "checking for $ac_word... " >&6; }
7591 if ${ac_cv_path_EXPR+:} false; then :
7592   $as_echo_n "(cached) " >&6
7593 else
7594   case $EXPR in
7595   [\\/]* | ?:[\\/]*)
7596   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7597   ;;
7598   *)
7599   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7600 for as_dir in $PATH
7601 do
7602   IFS=$as_save_IFS
7603   test -z "$as_dir" && as_dir=.
7604     for ac_exec_ext in '' $ac_executable_extensions; do
7605   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7606     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7607     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7608     break 2
7609   fi
7610 done
7611   done
7612 IFS=$as_save_IFS
7613 
7614   ;;
7615 esac
7616 fi
7617 EXPR=$ac_cv_path_EXPR
7618 if test -n "$EXPR"; then
7619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7620 $as_echo "$EXPR" >&6; }
7621 else
7622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7623 $as_echo "no" >&6; }
7624 fi
7625 
7626 
7627           if test "x$EXPR" = x; then
7628             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7629           fi
7630         else
7631           # Otherwise we believe it is a complete path. Use it as it is.
7632           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7633 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7634           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7635 $as_echo_n "checking for EXPR... " >&6; }
7636           if test ! -x "$tool_specified"; then
7637             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7638 $as_echo "not found" >&6; }
7639             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7640           fi
7641           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7642 $as_echo "$tool_specified" >&6; }
7643         fi
7644       fi
7645     fi
7646 
7647   fi
7648 
7649 
7650 
7651   if test "x$EXPR" = x; then
7652     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7653   fi
7654 
7655 
7656 
7657 
7658 
7659   # Publish this variable in the help.
7660 
7661 
7662   if [ -z "${FILE+x}" ]; then
7663     # The variable is not set by user, try to locate tool using the code snippet
7664     for ac_prog in file
7665 do
7666   # Extract the first word of "$ac_prog", so it can be a program name with args.
7667 set dummy $ac_prog; ac_word=$2
7668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7669 $as_echo_n "checking for $ac_word... " >&6; }
7670 if ${ac_cv_path_FILE+:} false; then :
7671   $as_echo_n "(cached) " >&6
7672 else
7673   case $FILE in
7674   [\\/]* | ?:[\\/]*)
7675   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7676   ;;
7677   *)
7678   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7679 for as_dir in $PATH
7680 do
7681   IFS=$as_save_IFS
7682   test -z "$as_dir" && as_dir=.
7683     for ac_exec_ext in '' $ac_executable_extensions; do
7684   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7685     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7686     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7687     break 2
7688   fi
7689 done
7690   done
7691 IFS=$as_save_IFS
7692 
7693   ;;
7694 esac
7695 fi
7696 FILE=$ac_cv_path_FILE
7697 if test -n "$FILE"; then
7698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7699 $as_echo "$FILE" >&6; }
7700 else
7701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7702 $as_echo "no" >&6; }
7703 fi
7704 
7705 
7706   test -n "$FILE" && break
7707 done
7708 
7709   else
7710     # The variable is set, but is it from the command line or the environment?
7711 
7712     # Try to remove the string !FILE! from our list.
7713     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7714     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7715       # If it failed, the variable was not from the command line. Ignore it,
7716       # but warn the user (except for BASH, which is always set by the calling BASH).
7717       if test "xFILE" != xBASH; then
7718         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7719 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7720       fi
7721       # Try to locate tool using the code snippet
7722       for ac_prog in file
7723 do
7724   # Extract the first word of "$ac_prog", so it can be a program name with args.
7725 set dummy $ac_prog; ac_word=$2
7726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7727 $as_echo_n "checking for $ac_word... " >&6; }
7728 if ${ac_cv_path_FILE+:} false; then :
7729   $as_echo_n "(cached) " >&6
7730 else
7731   case $FILE in
7732   [\\/]* | ?:[\\/]*)
7733   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7734   ;;
7735   *)
7736   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7737 for as_dir in $PATH
7738 do
7739   IFS=$as_save_IFS
7740   test -z "$as_dir" && as_dir=.
7741     for ac_exec_ext in '' $ac_executable_extensions; do
7742   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7743     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7744     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7745     break 2
7746   fi
7747 done
7748   done
7749 IFS=$as_save_IFS
7750 
7751   ;;
7752 esac
7753 fi
7754 FILE=$ac_cv_path_FILE
7755 if test -n "$FILE"; then
7756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7757 $as_echo "$FILE" >&6; }
7758 else
7759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7760 $as_echo "no" >&6; }
7761 fi
7762 
7763 
7764   test -n "$FILE" && break
7765 done
7766 
7767     else
7768       # If it succeeded, then it was overridden by the user. We will use it
7769       # for the tool.
7770 
7771       # First remove it from the list of overridden variables, so we can test
7772       # for unknown variables in the end.
7773       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7774 
7775       # Check if we try to supply an empty value
7776       if test "x$FILE" = x; then
7777         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7778 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7779         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7780 $as_echo_n "checking for FILE... " >&6; }
7781         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7782 $as_echo "disabled" >&6; }
7783       else
7784         # Check if the provided tool contains a complete path.
7785         tool_specified="$FILE"
7786         tool_basename="${tool_specified##*/}"
7787         if test "x$tool_basename" = "x$tool_specified"; then
7788           # A command without a complete path is provided, search $PATH.
7789           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7790 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7791           # Extract the first word of "$tool_basename", so it can be a program name with args.
7792 set dummy $tool_basename; ac_word=$2
7793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7794 $as_echo_n "checking for $ac_word... " >&6; }
7795 if ${ac_cv_path_FILE+:} false; then :
7796   $as_echo_n "(cached) " >&6
7797 else
7798   case $FILE in
7799   [\\/]* | ?:[\\/]*)
7800   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7801   ;;
7802   *)
7803   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7804 for as_dir in $PATH
7805 do
7806   IFS=$as_save_IFS
7807   test -z "$as_dir" && as_dir=.
7808     for ac_exec_ext in '' $ac_executable_extensions; do
7809   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7810     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7811     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7812     break 2
7813   fi
7814 done
7815   done
7816 IFS=$as_save_IFS
7817 
7818   ;;
7819 esac
7820 fi
7821 FILE=$ac_cv_path_FILE
7822 if test -n "$FILE"; then
7823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7824 $as_echo "$FILE" >&6; }
7825 else
7826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7827 $as_echo "no" >&6; }
7828 fi
7829 
7830 
7831           if test "x$FILE" = x; then
7832             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7833           fi
7834         else
7835           # Otherwise we believe it is a complete path. Use it as it is.
7836           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7837 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7838           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7839 $as_echo_n "checking for FILE... " >&6; }
7840           if test ! -x "$tool_specified"; then
7841             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7842 $as_echo "not found" >&6; }
7843             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7844           fi
7845           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7846 $as_echo "$tool_specified" >&6; }
7847         fi
7848       fi
7849     fi
7850 
7851   fi
7852 
7853 
7854 
7855   if test "x$FILE" = x; then
7856     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7857   fi
7858 
7859 
7860 
7861 
7862 
7863   # Publish this variable in the help.
7864 
7865 
7866   if [ -z "${FIND+x}" ]; then
7867     # The variable is not set by user, try to locate tool using the code snippet
7868     for ac_prog in find
7869 do
7870   # Extract the first word of "$ac_prog", so it can be a program name with args.
7871 set dummy $ac_prog; ac_word=$2
7872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7873 $as_echo_n "checking for $ac_word... " >&6; }
7874 if ${ac_cv_path_FIND+:} false; then :
7875   $as_echo_n "(cached) " >&6
7876 else
7877   case $FIND in
7878   [\\/]* | ?:[\\/]*)
7879   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7880   ;;
7881   *)
7882   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7883 for as_dir in $PATH
7884 do
7885   IFS=$as_save_IFS
7886   test -z "$as_dir" && as_dir=.
7887     for ac_exec_ext in '' $ac_executable_extensions; do
7888   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7889     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7890     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7891     break 2
7892   fi
7893 done
7894   done
7895 IFS=$as_save_IFS
7896 
7897   ;;
7898 esac
7899 fi
7900 FIND=$ac_cv_path_FIND
7901 if test -n "$FIND"; then
7902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7903 $as_echo "$FIND" >&6; }
7904 else
7905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7906 $as_echo "no" >&6; }
7907 fi
7908 
7909 
7910   test -n "$FIND" && break
7911 done
7912 
7913   else
7914     # The variable is set, but is it from the command line or the environment?
7915 
7916     # Try to remove the string !FIND! from our list.
7917     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7918     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7919       # If it failed, the variable was not from the command line. Ignore it,
7920       # but warn the user (except for BASH, which is always set by the calling BASH).
7921       if test "xFIND" != xBASH; then
7922         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7923 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7924       fi
7925       # Try to locate tool using the code snippet
7926       for ac_prog in find
7927 do
7928   # Extract the first word of "$ac_prog", so it can be a program name with args.
7929 set dummy $ac_prog; ac_word=$2
7930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7931 $as_echo_n "checking for $ac_word... " >&6; }
7932 if ${ac_cv_path_FIND+:} false; then :
7933   $as_echo_n "(cached) " >&6
7934 else
7935   case $FIND in
7936   [\\/]* | ?:[\\/]*)
7937   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7938   ;;
7939   *)
7940   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7941 for as_dir in $PATH
7942 do
7943   IFS=$as_save_IFS
7944   test -z "$as_dir" && as_dir=.
7945     for ac_exec_ext in '' $ac_executable_extensions; do
7946   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7947     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7948     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7949     break 2
7950   fi
7951 done
7952   done
7953 IFS=$as_save_IFS
7954 
7955   ;;
7956 esac
7957 fi
7958 FIND=$ac_cv_path_FIND
7959 if test -n "$FIND"; then
7960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7961 $as_echo "$FIND" >&6; }
7962 else
7963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7964 $as_echo "no" >&6; }
7965 fi
7966 
7967 
7968   test -n "$FIND" && break
7969 done
7970 
7971     else
7972       # If it succeeded, then it was overridden by the user. We will use it
7973       # for the tool.
7974 
7975       # First remove it from the list of overridden variables, so we can test
7976       # for unknown variables in the end.
7977       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7978 
7979       # Check if we try to supply an empty value
7980       if test "x$FIND" = x; then
7981         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7982 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7983         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7984 $as_echo_n "checking for FIND... " >&6; }
7985         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7986 $as_echo "disabled" >&6; }
7987       else
7988         # Check if the provided tool contains a complete path.
7989         tool_specified="$FIND"
7990         tool_basename="${tool_specified##*/}"
7991         if test "x$tool_basename" = "x$tool_specified"; then
7992           # A command without a complete path is provided, search $PATH.
7993           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7994 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7995           # Extract the first word of "$tool_basename", so it can be a program name with args.
7996 set dummy $tool_basename; ac_word=$2
7997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7998 $as_echo_n "checking for $ac_word... " >&6; }
7999 if ${ac_cv_path_FIND+:} false; then :
8000   $as_echo_n "(cached) " >&6
8001 else
8002   case $FIND in
8003   [\\/]* | ?:[\\/]*)
8004   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8005   ;;
8006   *)
8007   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8008 for as_dir in $PATH
8009 do
8010   IFS=$as_save_IFS
8011   test -z "$as_dir" && as_dir=.
8012     for ac_exec_ext in '' $ac_executable_extensions; do
8013   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8014     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8015     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8016     break 2
8017   fi
8018 done
8019   done
8020 IFS=$as_save_IFS
8021 
8022   ;;
8023 esac
8024 fi
8025 FIND=$ac_cv_path_FIND
8026 if test -n "$FIND"; then
8027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8028 $as_echo "$FIND" >&6; }
8029 else
8030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8031 $as_echo "no" >&6; }
8032 fi
8033 
8034 
8035           if test "x$FIND" = x; then
8036             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8037           fi
8038         else
8039           # Otherwise we believe it is a complete path. Use it as it is.
8040           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8041 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8042           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8043 $as_echo_n "checking for FIND... " >&6; }
8044           if test ! -x "$tool_specified"; then
8045             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8046 $as_echo "not found" >&6; }
8047             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8048           fi
8049           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8050 $as_echo "$tool_specified" >&6; }
8051         fi
8052       fi
8053     fi
8054 
8055   fi
8056 
8057 
8058 
8059   if test "x$FIND" = x; then
8060     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8061   fi
8062 
8063 
8064 
8065 
8066 
8067   # Publish this variable in the help.
8068 
8069 
8070   if [ -z "${HEAD+x}" ]; then
8071     # The variable is not set by user, try to locate tool using the code snippet
8072     for ac_prog in head
8073 do
8074   # Extract the first word of "$ac_prog", so it can be a program name with args.
8075 set dummy $ac_prog; ac_word=$2
8076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8077 $as_echo_n "checking for $ac_word... " >&6; }
8078 if ${ac_cv_path_HEAD+:} false; then :
8079   $as_echo_n "(cached) " >&6
8080 else
8081   case $HEAD in
8082   [\\/]* | ?:[\\/]*)
8083   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8084   ;;
8085   *)
8086   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8087 for as_dir in $PATH
8088 do
8089   IFS=$as_save_IFS
8090   test -z "$as_dir" && as_dir=.
8091     for ac_exec_ext in '' $ac_executable_extensions; do
8092   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8093     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8094     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8095     break 2
8096   fi
8097 done
8098   done
8099 IFS=$as_save_IFS
8100 
8101   ;;
8102 esac
8103 fi
8104 HEAD=$ac_cv_path_HEAD
8105 if test -n "$HEAD"; then
8106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8107 $as_echo "$HEAD" >&6; }
8108 else
8109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8110 $as_echo "no" >&6; }
8111 fi
8112 
8113 
8114   test -n "$HEAD" && break
8115 done
8116 
8117   else
8118     # The variable is set, but is it from the command line or the environment?
8119 
8120     # Try to remove the string !HEAD! from our list.
8121     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8122     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8123       # If it failed, the variable was not from the command line. Ignore it,
8124       # but warn the user (except for BASH, which is always set by the calling BASH).
8125       if test "xHEAD" != xBASH; then
8126         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8127 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8128       fi
8129       # Try to locate tool using the code snippet
8130       for ac_prog in head
8131 do
8132   # Extract the first word of "$ac_prog", so it can be a program name with args.
8133 set dummy $ac_prog; ac_word=$2
8134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8135 $as_echo_n "checking for $ac_word... " >&6; }
8136 if ${ac_cv_path_HEAD+:} false; then :
8137   $as_echo_n "(cached) " >&6
8138 else
8139   case $HEAD in
8140   [\\/]* | ?:[\\/]*)
8141   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8142   ;;
8143   *)
8144   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8145 for as_dir in $PATH
8146 do
8147   IFS=$as_save_IFS
8148   test -z "$as_dir" && as_dir=.
8149     for ac_exec_ext in '' $ac_executable_extensions; do
8150   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8151     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8152     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8153     break 2
8154   fi
8155 done
8156   done
8157 IFS=$as_save_IFS
8158 
8159   ;;
8160 esac
8161 fi
8162 HEAD=$ac_cv_path_HEAD
8163 if test -n "$HEAD"; then
8164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8165 $as_echo "$HEAD" >&6; }
8166 else
8167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8168 $as_echo "no" >&6; }
8169 fi
8170 
8171 
8172   test -n "$HEAD" && break
8173 done
8174 
8175     else
8176       # If it succeeded, then it was overridden by the user. We will use it
8177       # for the tool.
8178 
8179       # First remove it from the list of overridden variables, so we can test
8180       # for unknown variables in the end.
8181       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8182 
8183       # Check if we try to supply an empty value
8184       if test "x$HEAD" = x; then
8185         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8186 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8187         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8188 $as_echo_n "checking for HEAD... " >&6; }
8189         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8190 $as_echo "disabled" >&6; }
8191       else
8192         # Check if the provided tool contains a complete path.
8193         tool_specified="$HEAD"
8194         tool_basename="${tool_specified##*/}"
8195         if test "x$tool_basename" = "x$tool_specified"; then
8196           # A command without a complete path is provided, search $PATH.
8197           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8198 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8199           # Extract the first word of "$tool_basename", so it can be a program name with args.
8200 set dummy $tool_basename; ac_word=$2
8201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8202 $as_echo_n "checking for $ac_word... " >&6; }
8203 if ${ac_cv_path_HEAD+:} false; then :
8204   $as_echo_n "(cached) " >&6
8205 else
8206   case $HEAD in
8207   [\\/]* | ?:[\\/]*)
8208   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8209   ;;
8210   *)
8211   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8212 for as_dir in $PATH
8213 do
8214   IFS=$as_save_IFS
8215   test -z "$as_dir" && as_dir=.
8216     for ac_exec_ext in '' $ac_executable_extensions; do
8217   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8218     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8219     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8220     break 2
8221   fi
8222 done
8223   done
8224 IFS=$as_save_IFS
8225 
8226   ;;
8227 esac
8228 fi
8229 HEAD=$ac_cv_path_HEAD
8230 if test -n "$HEAD"; then
8231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8232 $as_echo "$HEAD" >&6; }
8233 else
8234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8235 $as_echo "no" >&6; }
8236 fi
8237 
8238 
8239           if test "x$HEAD" = x; then
8240             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8241           fi
8242         else
8243           # Otherwise we believe it is a complete path. Use it as it is.
8244           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8245 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8246           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8247 $as_echo_n "checking for HEAD... " >&6; }
8248           if test ! -x "$tool_specified"; then
8249             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8250 $as_echo "not found" >&6; }
8251             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8252           fi
8253           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8254 $as_echo "$tool_specified" >&6; }
8255         fi
8256       fi
8257     fi
8258 
8259   fi
8260 
8261 
8262 
8263   if test "x$HEAD" = x; then
8264     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8265   fi
8266 
8267 
8268 
8269 
8270 
8271   # Publish this variable in the help.
8272 
8273 
8274   if [ -z "${LN+x}" ]; then
8275     # The variable is not set by user, try to locate tool using the code snippet
8276     for ac_prog in ln
8277 do
8278   # Extract the first word of "$ac_prog", so it can be a program name with args.
8279 set dummy $ac_prog; ac_word=$2
8280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8281 $as_echo_n "checking for $ac_word... " >&6; }
8282 if ${ac_cv_path_LN+:} false; then :
8283   $as_echo_n "(cached) " >&6
8284 else
8285   case $LN in
8286   [\\/]* | ?:[\\/]*)
8287   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8288   ;;
8289   *)
8290   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8291 for as_dir in $PATH
8292 do
8293   IFS=$as_save_IFS
8294   test -z "$as_dir" && as_dir=.
8295     for ac_exec_ext in '' $ac_executable_extensions; do
8296   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8297     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8299     break 2
8300   fi
8301 done
8302   done
8303 IFS=$as_save_IFS
8304 
8305   ;;
8306 esac
8307 fi
8308 LN=$ac_cv_path_LN
8309 if test -n "$LN"; then
8310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8311 $as_echo "$LN" >&6; }
8312 else
8313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8314 $as_echo "no" >&6; }
8315 fi
8316 
8317 
8318   test -n "$LN" && break
8319 done
8320 
8321   else
8322     # The variable is set, but is it from the command line or the environment?
8323 
8324     # Try to remove the string !LN! from our list.
8325     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8326     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8327       # If it failed, the variable was not from the command line. Ignore it,
8328       # but warn the user (except for BASH, which is always set by the calling BASH).
8329       if test "xLN" != xBASH; then
8330         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8331 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8332       fi
8333       # Try to locate tool using the code snippet
8334       for ac_prog in ln
8335 do
8336   # Extract the first word of "$ac_prog", so it can be a program name with args.
8337 set dummy $ac_prog; ac_word=$2
8338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8339 $as_echo_n "checking for $ac_word... " >&6; }
8340 if ${ac_cv_path_LN+:} false; then :
8341   $as_echo_n "(cached) " >&6
8342 else
8343   case $LN in
8344   [\\/]* | ?:[\\/]*)
8345   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8346   ;;
8347   *)
8348   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8349 for as_dir in $PATH
8350 do
8351   IFS=$as_save_IFS
8352   test -z "$as_dir" && as_dir=.
8353     for ac_exec_ext in '' $ac_executable_extensions; do
8354   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8355     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8356     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8357     break 2
8358   fi
8359 done
8360   done
8361 IFS=$as_save_IFS
8362 
8363   ;;
8364 esac
8365 fi
8366 LN=$ac_cv_path_LN
8367 if test -n "$LN"; then
8368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8369 $as_echo "$LN" >&6; }
8370 else
8371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8372 $as_echo "no" >&6; }
8373 fi
8374 
8375 
8376   test -n "$LN" && break
8377 done
8378 
8379     else
8380       # If it succeeded, then it was overridden by the user. We will use it
8381       # for the tool.
8382 
8383       # First remove it from the list of overridden variables, so we can test
8384       # for unknown variables in the end.
8385       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8386 
8387       # Check if we try to supply an empty value
8388       if test "x$LN" = x; then
8389         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8390 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8391         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8392 $as_echo_n "checking for LN... " >&6; }
8393         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8394 $as_echo "disabled" >&6; }
8395       else
8396         # Check if the provided tool contains a complete path.
8397         tool_specified="$LN"
8398         tool_basename="${tool_specified##*/}"
8399         if test "x$tool_basename" = "x$tool_specified"; then
8400           # A command without a complete path is provided, search $PATH.
8401           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8402 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8403           # Extract the first word of "$tool_basename", so it can be a program name with args.
8404 set dummy $tool_basename; ac_word=$2
8405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8406 $as_echo_n "checking for $ac_word... " >&6; }
8407 if ${ac_cv_path_LN+:} false; then :
8408   $as_echo_n "(cached) " >&6
8409 else
8410   case $LN in
8411   [\\/]* | ?:[\\/]*)
8412   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8413   ;;
8414   *)
8415   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8416 for as_dir in $PATH
8417 do
8418   IFS=$as_save_IFS
8419   test -z "$as_dir" && as_dir=.
8420     for ac_exec_ext in '' $ac_executable_extensions; do
8421   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8422     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8423     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8424     break 2
8425   fi
8426 done
8427   done
8428 IFS=$as_save_IFS
8429 
8430   ;;
8431 esac
8432 fi
8433 LN=$ac_cv_path_LN
8434 if test -n "$LN"; then
8435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8436 $as_echo "$LN" >&6; }
8437 else
8438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8439 $as_echo "no" >&6; }
8440 fi
8441 
8442 
8443           if test "x$LN" = x; then
8444             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8445           fi
8446         else
8447           # Otherwise we believe it is a complete path. Use it as it is.
8448           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8449 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8450           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8451 $as_echo_n "checking for LN... " >&6; }
8452           if test ! -x "$tool_specified"; then
8453             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8454 $as_echo "not found" >&6; }
8455             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8456           fi
8457           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8458 $as_echo "$tool_specified" >&6; }
8459         fi
8460       fi
8461     fi
8462 
8463   fi
8464 
8465 
8466 
8467   if test "x$LN" = x; then
8468     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8469   fi
8470 
8471 
8472 
8473 
8474 
8475   # Publish this variable in the help.
8476 
8477 
8478   if [ -z "${LS+x}" ]; then
8479     # The variable is not set by user, try to locate tool using the code snippet
8480     for ac_prog in ls
8481 do
8482   # Extract the first word of "$ac_prog", so it can be a program name with args.
8483 set dummy $ac_prog; ac_word=$2
8484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8485 $as_echo_n "checking for $ac_word... " >&6; }
8486 if ${ac_cv_path_LS+:} false; then :
8487   $as_echo_n "(cached) " >&6
8488 else
8489   case $LS in
8490   [\\/]* | ?:[\\/]*)
8491   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8492   ;;
8493   *)
8494   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8495 for as_dir in $PATH
8496 do
8497   IFS=$as_save_IFS
8498   test -z "$as_dir" && as_dir=.
8499     for ac_exec_ext in '' $ac_executable_extensions; do
8500   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8501     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8502     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8503     break 2
8504   fi
8505 done
8506   done
8507 IFS=$as_save_IFS
8508 
8509   ;;
8510 esac
8511 fi
8512 LS=$ac_cv_path_LS
8513 if test -n "$LS"; then
8514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8515 $as_echo "$LS" >&6; }
8516 else
8517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8518 $as_echo "no" >&6; }
8519 fi
8520 
8521 
8522   test -n "$LS" && break
8523 done
8524 
8525   else
8526     # The variable is set, but is it from the command line or the environment?
8527 
8528     # Try to remove the string !LS! from our list.
8529     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8530     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8531       # If it failed, the variable was not from the command line. Ignore it,
8532       # but warn the user (except for BASH, which is always set by the calling BASH).
8533       if test "xLS" != xBASH; then
8534         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8535 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8536       fi
8537       # Try to locate tool using the code snippet
8538       for ac_prog in ls
8539 do
8540   # Extract the first word of "$ac_prog", so it can be a program name with args.
8541 set dummy $ac_prog; ac_word=$2
8542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8543 $as_echo_n "checking for $ac_word... " >&6; }
8544 if ${ac_cv_path_LS+:} false; then :
8545   $as_echo_n "(cached) " >&6
8546 else
8547   case $LS in
8548   [\\/]* | ?:[\\/]*)
8549   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8550   ;;
8551   *)
8552   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8553 for as_dir in $PATH
8554 do
8555   IFS=$as_save_IFS
8556   test -z "$as_dir" && as_dir=.
8557     for ac_exec_ext in '' $ac_executable_extensions; do
8558   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8559     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8560     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8561     break 2
8562   fi
8563 done
8564   done
8565 IFS=$as_save_IFS
8566 
8567   ;;
8568 esac
8569 fi
8570 LS=$ac_cv_path_LS
8571 if test -n "$LS"; then
8572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8573 $as_echo "$LS" >&6; }
8574 else
8575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8576 $as_echo "no" >&6; }
8577 fi
8578 
8579 
8580   test -n "$LS" && break
8581 done
8582 
8583     else
8584       # If it succeeded, then it was overridden by the user. We will use it
8585       # for the tool.
8586 
8587       # First remove it from the list of overridden variables, so we can test
8588       # for unknown variables in the end.
8589       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8590 
8591       # Check if we try to supply an empty value
8592       if test "x$LS" = x; then
8593         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8594 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8595         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8596 $as_echo_n "checking for LS... " >&6; }
8597         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8598 $as_echo "disabled" >&6; }
8599       else
8600         # Check if the provided tool contains a complete path.
8601         tool_specified="$LS"
8602         tool_basename="${tool_specified##*/}"
8603         if test "x$tool_basename" = "x$tool_specified"; then
8604           # A command without a complete path is provided, search $PATH.
8605           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8606 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8607           # Extract the first word of "$tool_basename", so it can be a program name with args.
8608 set dummy $tool_basename; ac_word=$2
8609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8610 $as_echo_n "checking for $ac_word... " >&6; }
8611 if ${ac_cv_path_LS+:} false; then :
8612   $as_echo_n "(cached) " >&6
8613 else
8614   case $LS in
8615   [\\/]* | ?:[\\/]*)
8616   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8617   ;;
8618   *)
8619   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8620 for as_dir in $PATH
8621 do
8622   IFS=$as_save_IFS
8623   test -z "$as_dir" && as_dir=.
8624     for ac_exec_ext in '' $ac_executable_extensions; do
8625   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8626     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8627     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8628     break 2
8629   fi
8630 done
8631   done
8632 IFS=$as_save_IFS
8633 
8634   ;;
8635 esac
8636 fi
8637 LS=$ac_cv_path_LS
8638 if test -n "$LS"; then
8639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8640 $as_echo "$LS" >&6; }
8641 else
8642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8643 $as_echo "no" >&6; }
8644 fi
8645 
8646 
8647           if test "x$LS" = x; then
8648             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8649           fi
8650         else
8651           # Otherwise we believe it is a complete path. Use it as it is.
8652           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8653 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8654           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8655 $as_echo_n "checking for LS... " >&6; }
8656           if test ! -x "$tool_specified"; then
8657             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8658 $as_echo "not found" >&6; }
8659             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8660           fi
8661           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8662 $as_echo "$tool_specified" >&6; }
8663         fi
8664       fi
8665     fi
8666 
8667   fi
8668 
8669 
8670 
8671   if test "x$LS" = x; then
8672     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8673   fi
8674 
8675 
8676 
8677 
8678 
8679   # Publish this variable in the help.
8680 
8681 
8682   if [ -z "${MKDIR+x}" ]; then
8683     # The variable is not set by user, try to locate tool using the code snippet
8684     for ac_prog in mkdir
8685 do
8686   # Extract the first word of "$ac_prog", so it can be a program name with args.
8687 set dummy $ac_prog; ac_word=$2
8688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8689 $as_echo_n "checking for $ac_word... " >&6; }
8690 if ${ac_cv_path_MKDIR+:} false; then :
8691   $as_echo_n "(cached) " >&6
8692 else
8693   case $MKDIR in
8694   [\\/]* | ?:[\\/]*)
8695   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8696   ;;
8697   *)
8698   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8699 for as_dir in $PATH
8700 do
8701   IFS=$as_save_IFS
8702   test -z "$as_dir" && as_dir=.
8703     for ac_exec_ext in '' $ac_executable_extensions; do
8704   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8705     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8706     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8707     break 2
8708   fi
8709 done
8710   done
8711 IFS=$as_save_IFS
8712 
8713   ;;
8714 esac
8715 fi
8716 MKDIR=$ac_cv_path_MKDIR
8717 if test -n "$MKDIR"; then
8718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8719 $as_echo "$MKDIR" >&6; }
8720 else
8721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8722 $as_echo "no" >&6; }
8723 fi
8724 
8725 
8726   test -n "$MKDIR" && break
8727 done
8728 
8729   else
8730     # The variable is set, but is it from the command line or the environment?
8731 
8732     # Try to remove the string !MKDIR! from our list.
8733     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8734     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8735       # If it failed, the variable was not from the command line. Ignore it,
8736       # but warn the user (except for BASH, which is always set by the calling BASH).
8737       if test "xMKDIR" != xBASH; then
8738         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8739 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8740       fi
8741       # Try to locate tool using the code snippet
8742       for ac_prog in mkdir
8743 do
8744   # Extract the first word of "$ac_prog", so it can be a program name with args.
8745 set dummy $ac_prog; ac_word=$2
8746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8747 $as_echo_n "checking for $ac_word... " >&6; }
8748 if ${ac_cv_path_MKDIR+:} false; then :
8749   $as_echo_n "(cached) " >&6
8750 else
8751   case $MKDIR in
8752   [\\/]* | ?:[\\/]*)
8753   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8754   ;;
8755   *)
8756   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8757 for as_dir in $PATH
8758 do
8759   IFS=$as_save_IFS
8760   test -z "$as_dir" && as_dir=.
8761     for ac_exec_ext in '' $ac_executable_extensions; do
8762   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8763     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8764     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8765     break 2
8766   fi
8767 done
8768   done
8769 IFS=$as_save_IFS
8770 
8771   ;;
8772 esac
8773 fi
8774 MKDIR=$ac_cv_path_MKDIR
8775 if test -n "$MKDIR"; then
8776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8777 $as_echo "$MKDIR" >&6; }
8778 else
8779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8780 $as_echo "no" >&6; }
8781 fi
8782 
8783 
8784   test -n "$MKDIR" && break
8785 done
8786 
8787     else
8788       # If it succeeded, then it was overridden by the user. We will use it
8789       # for the tool.
8790 
8791       # First remove it from the list of overridden variables, so we can test
8792       # for unknown variables in the end.
8793       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8794 
8795       # Check if we try to supply an empty value
8796       if test "x$MKDIR" = x; then
8797         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8798 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8799         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8800 $as_echo_n "checking for MKDIR... " >&6; }
8801         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8802 $as_echo "disabled" >&6; }
8803       else
8804         # Check if the provided tool contains a complete path.
8805         tool_specified="$MKDIR"
8806         tool_basename="${tool_specified##*/}"
8807         if test "x$tool_basename" = "x$tool_specified"; then
8808           # A command without a complete path is provided, search $PATH.
8809           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8810 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8811           # Extract the first word of "$tool_basename", so it can be a program name with args.
8812 set dummy $tool_basename; ac_word=$2
8813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8814 $as_echo_n "checking for $ac_word... " >&6; }
8815 if ${ac_cv_path_MKDIR+:} false; then :
8816   $as_echo_n "(cached) " >&6
8817 else
8818   case $MKDIR in
8819   [\\/]* | ?:[\\/]*)
8820   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8821   ;;
8822   *)
8823   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8824 for as_dir in $PATH
8825 do
8826   IFS=$as_save_IFS
8827   test -z "$as_dir" && as_dir=.
8828     for ac_exec_ext in '' $ac_executable_extensions; do
8829   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8830     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8831     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8832     break 2
8833   fi
8834 done
8835   done
8836 IFS=$as_save_IFS
8837 
8838   ;;
8839 esac
8840 fi
8841 MKDIR=$ac_cv_path_MKDIR
8842 if test -n "$MKDIR"; then
8843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8844 $as_echo "$MKDIR" >&6; }
8845 else
8846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8847 $as_echo "no" >&6; }
8848 fi
8849 
8850 
8851           if test "x$MKDIR" = x; then
8852             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8853           fi
8854         else
8855           # Otherwise we believe it is a complete path. Use it as it is.
8856           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8857 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8858           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8859 $as_echo_n "checking for MKDIR... " >&6; }
8860           if test ! -x "$tool_specified"; then
8861             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8862 $as_echo "not found" >&6; }
8863             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8864           fi
8865           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8866 $as_echo "$tool_specified" >&6; }
8867         fi
8868       fi
8869     fi
8870 
8871   fi
8872 
8873 
8874 
8875   if test "x$MKDIR" = x; then
8876     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8877   fi
8878 
8879 
8880 
8881 
8882 
8883   # Publish this variable in the help.
8884 
8885 
8886   if [ -z "${MKTEMP+x}" ]; then
8887     # The variable is not set by user, try to locate tool using the code snippet
8888     for ac_prog in mktemp
8889 do
8890   # Extract the first word of "$ac_prog", so it can be a program name with args.
8891 set dummy $ac_prog; ac_word=$2
8892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8893 $as_echo_n "checking for $ac_word... " >&6; }
8894 if ${ac_cv_path_MKTEMP+:} false; then :
8895   $as_echo_n "(cached) " >&6
8896 else
8897   case $MKTEMP in
8898   [\\/]* | ?:[\\/]*)
8899   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8900   ;;
8901   *)
8902   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8903 for as_dir in $PATH
8904 do
8905   IFS=$as_save_IFS
8906   test -z "$as_dir" && as_dir=.
8907     for ac_exec_ext in '' $ac_executable_extensions; do
8908   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8909     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8910     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8911     break 2
8912   fi
8913 done
8914   done
8915 IFS=$as_save_IFS
8916 
8917   ;;
8918 esac
8919 fi
8920 MKTEMP=$ac_cv_path_MKTEMP
8921 if test -n "$MKTEMP"; then
8922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8923 $as_echo "$MKTEMP" >&6; }
8924 else
8925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8926 $as_echo "no" >&6; }
8927 fi
8928 
8929 
8930   test -n "$MKTEMP" && break
8931 done
8932 
8933   else
8934     # The variable is set, but is it from the command line or the environment?
8935 
8936     # Try to remove the string !MKTEMP! from our list.
8937     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8938     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8939       # If it failed, the variable was not from the command line. Ignore it,
8940       # but warn the user (except for BASH, which is always set by the calling BASH).
8941       if test "xMKTEMP" != xBASH; then
8942         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8943 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8944       fi
8945       # Try to locate tool using the code snippet
8946       for ac_prog in mktemp
8947 do
8948   # Extract the first word of "$ac_prog", so it can be a program name with args.
8949 set dummy $ac_prog; ac_word=$2
8950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8951 $as_echo_n "checking for $ac_word... " >&6; }
8952 if ${ac_cv_path_MKTEMP+:} false; then :
8953   $as_echo_n "(cached) " >&6
8954 else
8955   case $MKTEMP in
8956   [\\/]* | ?:[\\/]*)
8957   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8958   ;;
8959   *)
8960   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8961 for as_dir in $PATH
8962 do
8963   IFS=$as_save_IFS
8964   test -z "$as_dir" && as_dir=.
8965     for ac_exec_ext in '' $ac_executable_extensions; do
8966   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8967     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8968     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8969     break 2
8970   fi
8971 done
8972   done
8973 IFS=$as_save_IFS
8974 
8975   ;;
8976 esac
8977 fi
8978 MKTEMP=$ac_cv_path_MKTEMP
8979 if test -n "$MKTEMP"; then
8980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8981 $as_echo "$MKTEMP" >&6; }
8982 else
8983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8984 $as_echo "no" >&6; }
8985 fi
8986 
8987 
8988   test -n "$MKTEMP" && break
8989 done
8990 
8991     else
8992       # If it succeeded, then it was overridden by the user. We will use it
8993       # for the tool.
8994 
8995       # First remove it from the list of overridden variables, so we can test
8996       # for unknown variables in the end.
8997       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8998 
8999       # Check if we try to supply an empty value
9000       if test "x$MKTEMP" = x; then
9001         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9002 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9003         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9004 $as_echo_n "checking for MKTEMP... " >&6; }
9005         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9006 $as_echo "disabled" >&6; }
9007       else
9008         # Check if the provided tool contains a complete path.
9009         tool_specified="$MKTEMP"
9010         tool_basename="${tool_specified##*/}"
9011         if test "x$tool_basename" = "x$tool_specified"; then
9012           # A command without a complete path is provided, search $PATH.
9013           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9014 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9015           # Extract the first word of "$tool_basename", so it can be a program name with args.
9016 set dummy $tool_basename; ac_word=$2
9017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9018 $as_echo_n "checking for $ac_word... " >&6; }
9019 if ${ac_cv_path_MKTEMP+:} false; then :
9020   $as_echo_n "(cached) " >&6
9021 else
9022   case $MKTEMP in
9023   [\\/]* | ?:[\\/]*)
9024   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9025   ;;
9026   *)
9027   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9028 for as_dir in $PATH
9029 do
9030   IFS=$as_save_IFS
9031   test -z "$as_dir" && as_dir=.
9032     for ac_exec_ext in '' $ac_executable_extensions; do
9033   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9034     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9035     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9036     break 2
9037   fi
9038 done
9039   done
9040 IFS=$as_save_IFS
9041 
9042   ;;
9043 esac
9044 fi
9045 MKTEMP=$ac_cv_path_MKTEMP
9046 if test -n "$MKTEMP"; then
9047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9048 $as_echo "$MKTEMP" >&6; }
9049 else
9050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9051 $as_echo "no" >&6; }
9052 fi
9053 
9054 
9055           if test "x$MKTEMP" = x; then
9056             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9057           fi
9058         else
9059           # Otherwise we believe it is a complete path. Use it as it is.
9060           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9061 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9062           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9063 $as_echo_n "checking for MKTEMP... " >&6; }
9064           if test ! -x "$tool_specified"; then
9065             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9066 $as_echo "not found" >&6; }
9067             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9068           fi
9069           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9070 $as_echo "$tool_specified" >&6; }
9071         fi
9072       fi
9073     fi
9074 
9075   fi
9076 
9077 
9078 
9079   if test "x$MKTEMP" = x; then
9080     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9081   fi
9082 
9083 
9084 
9085 
9086 
9087   # Publish this variable in the help.
9088 
9089 
9090   if [ -z "${MV+x}" ]; then
9091     # The variable is not set by user, try to locate tool using the code snippet
9092     for ac_prog in mv
9093 do
9094   # Extract the first word of "$ac_prog", so it can be a program name with args.
9095 set dummy $ac_prog; ac_word=$2
9096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9097 $as_echo_n "checking for $ac_word... " >&6; }
9098 if ${ac_cv_path_MV+:} false; then :
9099   $as_echo_n "(cached) " >&6
9100 else
9101   case $MV in
9102   [\\/]* | ?:[\\/]*)
9103   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9104   ;;
9105   *)
9106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9107 for as_dir in $PATH
9108 do
9109   IFS=$as_save_IFS
9110   test -z "$as_dir" && as_dir=.
9111     for ac_exec_ext in '' $ac_executable_extensions; do
9112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9113     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9115     break 2
9116   fi
9117 done
9118   done
9119 IFS=$as_save_IFS
9120 
9121   ;;
9122 esac
9123 fi
9124 MV=$ac_cv_path_MV
9125 if test -n "$MV"; then
9126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9127 $as_echo "$MV" >&6; }
9128 else
9129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9130 $as_echo "no" >&6; }
9131 fi
9132 
9133 
9134   test -n "$MV" && break
9135 done
9136 
9137   else
9138     # The variable is set, but is it from the command line or the environment?
9139 
9140     # Try to remove the string !MV! from our list.
9141     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9142     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9143       # If it failed, the variable was not from the command line. Ignore it,
9144       # but warn the user (except for BASH, which is always set by the calling BASH).
9145       if test "xMV" != xBASH; then
9146         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9147 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9148       fi
9149       # Try to locate tool using the code snippet
9150       for ac_prog in mv
9151 do
9152   # Extract the first word of "$ac_prog", so it can be a program name with args.
9153 set dummy $ac_prog; ac_word=$2
9154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9155 $as_echo_n "checking for $ac_word... " >&6; }
9156 if ${ac_cv_path_MV+:} false; then :
9157   $as_echo_n "(cached) " >&6
9158 else
9159   case $MV in
9160   [\\/]* | ?:[\\/]*)
9161   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9162   ;;
9163   *)
9164   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9165 for as_dir in $PATH
9166 do
9167   IFS=$as_save_IFS
9168   test -z "$as_dir" && as_dir=.
9169     for ac_exec_ext in '' $ac_executable_extensions; do
9170   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9171     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9173     break 2
9174   fi
9175 done
9176   done
9177 IFS=$as_save_IFS
9178 
9179   ;;
9180 esac
9181 fi
9182 MV=$ac_cv_path_MV
9183 if test -n "$MV"; then
9184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9185 $as_echo "$MV" >&6; }
9186 else
9187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9188 $as_echo "no" >&6; }
9189 fi
9190 
9191 
9192   test -n "$MV" && break
9193 done
9194 
9195     else
9196       # If it succeeded, then it was overridden by the user. We will use it
9197       # for the tool.
9198 
9199       # First remove it from the list of overridden variables, so we can test
9200       # for unknown variables in the end.
9201       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9202 
9203       # Check if we try to supply an empty value
9204       if test "x$MV" = x; then
9205         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9206 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9207         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9208 $as_echo_n "checking for MV... " >&6; }
9209         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9210 $as_echo "disabled" >&6; }
9211       else
9212         # Check if the provided tool contains a complete path.
9213         tool_specified="$MV"
9214         tool_basename="${tool_specified##*/}"
9215         if test "x$tool_basename" = "x$tool_specified"; then
9216           # A command without a complete path is provided, search $PATH.
9217           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9218 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9219           # Extract the first word of "$tool_basename", so it can be a program name with args.
9220 set dummy $tool_basename; ac_word=$2
9221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9222 $as_echo_n "checking for $ac_word... " >&6; }
9223 if ${ac_cv_path_MV+:} false; then :
9224   $as_echo_n "(cached) " >&6
9225 else
9226   case $MV in
9227   [\\/]* | ?:[\\/]*)
9228   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9229   ;;
9230   *)
9231   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9232 for as_dir in $PATH
9233 do
9234   IFS=$as_save_IFS
9235   test -z "$as_dir" && as_dir=.
9236     for ac_exec_ext in '' $ac_executable_extensions; do
9237   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9238     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9240     break 2
9241   fi
9242 done
9243   done
9244 IFS=$as_save_IFS
9245 
9246   ;;
9247 esac
9248 fi
9249 MV=$ac_cv_path_MV
9250 if test -n "$MV"; then
9251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9252 $as_echo "$MV" >&6; }
9253 else
9254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9255 $as_echo "no" >&6; }
9256 fi
9257 
9258 
9259           if test "x$MV" = x; then
9260             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9261           fi
9262         else
9263           # Otherwise we believe it is a complete path. Use it as it is.
9264           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9265 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9266           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9267 $as_echo_n "checking for MV... " >&6; }
9268           if test ! -x "$tool_specified"; then
9269             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9270 $as_echo "not found" >&6; }
9271             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9272           fi
9273           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9274 $as_echo "$tool_specified" >&6; }
9275         fi
9276       fi
9277     fi
9278 
9279   fi
9280 
9281 
9282 
9283   if test "x$MV" = x; then
9284     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9285   fi
9286 
9287 
9288 
9289 
9290 
9291   # Publish this variable in the help.
9292 
9293 
9294   if [ -z "${NAWK+x}" ]; then
9295     # The variable is not set by user, try to locate tool using the code snippet
9296     for ac_prog in nawk gawk awk
9297 do
9298   # Extract the first word of "$ac_prog", so it can be a program name with args.
9299 set dummy $ac_prog; ac_word=$2
9300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9301 $as_echo_n "checking for $ac_word... " >&6; }
9302 if ${ac_cv_path_NAWK+:} false; then :
9303   $as_echo_n "(cached) " >&6
9304 else
9305   case $NAWK in
9306   [\\/]* | ?:[\\/]*)
9307   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9308   ;;
9309   *)
9310   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9311 for as_dir in $PATH
9312 do
9313   IFS=$as_save_IFS
9314   test -z "$as_dir" && as_dir=.
9315     for ac_exec_ext in '' $ac_executable_extensions; do
9316   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9317     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9318     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9319     break 2
9320   fi
9321 done
9322   done
9323 IFS=$as_save_IFS
9324 
9325   ;;
9326 esac
9327 fi
9328 NAWK=$ac_cv_path_NAWK
9329 if test -n "$NAWK"; then
9330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9331 $as_echo "$NAWK" >&6; }
9332 else
9333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9334 $as_echo "no" >&6; }
9335 fi
9336 
9337 
9338   test -n "$NAWK" && break
9339 done
9340 
9341   else
9342     # The variable is set, but is it from the command line or the environment?
9343 
9344     # Try to remove the string !NAWK! from our list.
9345     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9346     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9347       # If it failed, the variable was not from the command line. Ignore it,
9348       # but warn the user (except for BASH, which is always set by the calling BASH).
9349       if test "xNAWK" != xBASH; then
9350         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9351 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9352       fi
9353       # Try to locate tool using the code snippet
9354       for ac_prog in nawk gawk awk
9355 do
9356   # Extract the first word of "$ac_prog", so it can be a program name with args.
9357 set dummy $ac_prog; ac_word=$2
9358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9359 $as_echo_n "checking for $ac_word... " >&6; }
9360 if ${ac_cv_path_NAWK+:} false; then :
9361   $as_echo_n "(cached) " >&6
9362 else
9363   case $NAWK in
9364   [\\/]* | ?:[\\/]*)
9365   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9366   ;;
9367   *)
9368   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9369 for as_dir in $PATH
9370 do
9371   IFS=$as_save_IFS
9372   test -z "$as_dir" && as_dir=.
9373     for ac_exec_ext in '' $ac_executable_extensions; do
9374   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9375     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9376     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9377     break 2
9378   fi
9379 done
9380   done
9381 IFS=$as_save_IFS
9382 
9383   ;;
9384 esac
9385 fi
9386 NAWK=$ac_cv_path_NAWK
9387 if test -n "$NAWK"; then
9388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9389 $as_echo "$NAWK" >&6; }
9390 else
9391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9392 $as_echo "no" >&6; }
9393 fi
9394 
9395 
9396   test -n "$NAWK" && break
9397 done
9398 
9399     else
9400       # If it succeeded, then it was overridden by the user. We will use it
9401       # for the tool.
9402 
9403       # First remove it from the list of overridden variables, so we can test
9404       # for unknown variables in the end.
9405       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9406 
9407       # Check if we try to supply an empty value
9408       if test "x$NAWK" = x; then
9409         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9410 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9411         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9412 $as_echo_n "checking for NAWK... " >&6; }
9413         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9414 $as_echo "disabled" >&6; }
9415       else
9416         # Check if the provided tool contains a complete path.
9417         tool_specified="$NAWK"
9418         tool_basename="${tool_specified##*/}"
9419         if test "x$tool_basename" = "x$tool_specified"; then
9420           # A command without a complete path is provided, search $PATH.
9421           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9422 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9423           # Extract the first word of "$tool_basename", so it can be a program name with args.
9424 set dummy $tool_basename; ac_word=$2
9425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9426 $as_echo_n "checking for $ac_word... " >&6; }
9427 if ${ac_cv_path_NAWK+:} false; then :
9428   $as_echo_n "(cached) " >&6
9429 else
9430   case $NAWK in
9431   [\\/]* | ?:[\\/]*)
9432   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9433   ;;
9434   *)
9435   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9436 for as_dir in $PATH
9437 do
9438   IFS=$as_save_IFS
9439   test -z "$as_dir" && as_dir=.
9440     for ac_exec_ext in '' $ac_executable_extensions; do
9441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9442     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9444     break 2
9445   fi
9446 done
9447   done
9448 IFS=$as_save_IFS
9449 
9450   ;;
9451 esac
9452 fi
9453 NAWK=$ac_cv_path_NAWK
9454 if test -n "$NAWK"; then
9455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9456 $as_echo "$NAWK" >&6; }
9457 else
9458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9459 $as_echo "no" >&6; }
9460 fi
9461 
9462 
9463           if test "x$NAWK" = x; then
9464             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9465           fi
9466         else
9467           # Otherwise we believe it is a complete path. Use it as it is.
9468           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9469 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9470           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9471 $as_echo_n "checking for NAWK... " >&6; }
9472           if test ! -x "$tool_specified"; then
9473             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9474 $as_echo "not found" >&6; }
9475             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9476           fi
9477           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9478 $as_echo "$tool_specified" >&6; }
9479         fi
9480       fi
9481     fi
9482 
9483   fi
9484 
9485 
9486 
9487   if test "x$NAWK" = x; then
9488     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9489   fi
9490 
9491 
9492 
9493 
9494 
9495   # Publish this variable in the help.
9496 
9497 
9498   if [ -z "${PRINTF+x}" ]; then
9499     # The variable is not set by user, try to locate tool using the code snippet
9500     for ac_prog in printf
9501 do
9502   # Extract the first word of "$ac_prog", so it can be a program name with args.
9503 set dummy $ac_prog; ac_word=$2
9504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9505 $as_echo_n "checking for $ac_word... " >&6; }
9506 if ${ac_cv_path_PRINTF+:} false; then :
9507   $as_echo_n "(cached) " >&6
9508 else
9509   case $PRINTF in
9510   [\\/]* | ?:[\\/]*)
9511   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9512   ;;
9513   *)
9514   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9515 for as_dir in $PATH
9516 do
9517   IFS=$as_save_IFS
9518   test -z "$as_dir" && as_dir=.
9519     for ac_exec_ext in '' $ac_executable_extensions; do
9520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9521     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9523     break 2
9524   fi
9525 done
9526   done
9527 IFS=$as_save_IFS
9528 
9529   ;;
9530 esac
9531 fi
9532 PRINTF=$ac_cv_path_PRINTF
9533 if test -n "$PRINTF"; then
9534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9535 $as_echo "$PRINTF" >&6; }
9536 else
9537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9538 $as_echo "no" >&6; }
9539 fi
9540 
9541 
9542   test -n "$PRINTF" && break
9543 done
9544 
9545   else
9546     # The variable is set, but is it from the command line or the environment?
9547 
9548     # Try to remove the string !PRINTF! from our list.
9549     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9550     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9551       # If it failed, the variable was not from the command line. Ignore it,
9552       # but warn the user (except for BASH, which is always set by the calling BASH).
9553       if test "xPRINTF" != xBASH; then
9554         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9555 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9556       fi
9557       # Try to locate tool using the code snippet
9558       for ac_prog in printf
9559 do
9560   # Extract the first word of "$ac_prog", so it can be a program name with args.
9561 set dummy $ac_prog; ac_word=$2
9562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9563 $as_echo_n "checking for $ac_word... " >&6; }
9564 if ${ac_cv_path_PRINTF+:} false; then :
9565   $as_echo_n "(cached) " >&6
9566 else
9567   case $PRINTF in
9568   [\\/]* | ?:[\\/]*)
9569   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9570   ;;
9571   *)
9572   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9573 for as_dir in $PATH
9574 do
9575   IFS=$as_save_IFS
9576   test -z "$as_dir" && as_dir=.
9577     for ac_exec_ext in '' $ac_executable_extensions; do
9578   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9579     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9580     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9581     break 2
9582   fi
9583 done
9584   done
9585 IFS=$as_save_IFS
9586 
9587   ;;
9588 esac
9589 fi
9590 PRINTF=$ac_cv_path_PRINTF
9591 if test -n "$PRINTF"; then
9592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9593 $as_echo "$PRINTF" >&6; }
9594 else
9595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9596 $as_echo "no" >&6; }
9597 fi
9598 
9599 
9600   test -n "$PRINTF" && break
9601 done
9602 
9603     else
9604       # If it succeeded, then it was overridden by the user. We will use it
9605       # for the tool.
9606 
9607       # First remove it from the list of overridden variables, so we can test
9608       # for unknown variables in the end.
9609       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9610 
9611       # Check if we try to supply an empty value
9612       if test "x$PRINTF" = x; then
9613         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9614 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9615         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9616 $as_echo_n "checking for PRINTF... " >&6; }
9617         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9618 $as_echo "disabled" >&6; }
9619       else
9620         # Check if the provided tool contains a complete path.
9621         tool_specified="$PRINTF"
9622         tool_basename="${tool_specified##*/}"
9623         if test "x$tool_basename" = "x$tool_specified"; then
9624           # A command without a complete path is provided, search $PATH.
9625           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9626 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9627           # Extract the first word of "$tool_basename", so it can be a program name with args.
9628 set dummy $tool_basename; ac_word=$2
9629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9630 $as_echo_n "checking for $ac_word... " >&6; }
9631 if ${ac_cv_path_PRINTF+:} false; then :
9632   $as_echo_n "(cached) " >&6
9633 else
9634   case $PRINTF in
9635   [\\/]* | ?:[\\/]*)
9636   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9637   ;;
9638   *)
9639   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9640 for as_dir in $PATH
9641 do
9642   IFS=$as_save_IFS
9643   test -z "$as_dir" && as_dir=.
9644     for ac_exec_ext in '' $ac_executable_extensions; do
9645   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9646     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9647     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9648     break 2
9649   fi
9650 done
9651   done
9652 IFS=$as_save_IFS
9653 
9654   ;;
9655 esac
9656 fi
9657 PRINTF=$ac_cv_path_PRINTF
9658 if test -n "$PRINTF"; then
9659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9660 $as_echo "$PRINTF" >&6; }
9661 else
9662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9663 $as_echo "no" >&6; }
9664 fi
9665 
9666 
9667           if test "x$PRINTF" = x; then
9668             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9669           fi
9670         else
9671           # Otherwise we believe it is a complete path. Use it as it is.
9672           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9673 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9674           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9675 $as_echo_n "checking for PRINTF... " >&6; }
9676           if test ! -x "$tool_specified"; then
9677             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9678 $as_echo "not found" >&6; }
9679             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9680           fi
9681           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9682 $as_echo "$tool_specified" >&6; }
9683         fi
9684       fi
9685     fi
9686 
9687   fi
9688 
9689 
9690 
9691   if test "x$PRINTF" = x; then
9692     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9693   fi
9694 
9695 
9696 
9697 
9698 
9699   # Publish this variable in the help.
9700 
9701 
9702   if [ -z "${RM+x}" ]; then
9703     # The variable is not set by user, try to locate tool using the code snippet
9704     for ac_prog in rm
9705 do
9706   # Extract the first word of "$ac_prog", so it can be a program name with args.
9707 set dummy $ac_prog; ac_word=$2
9708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9709 $as_echo_n "checking for $ac_word... " >&6; }
9710 if ${ac_cv_path_RM+:} false; then :
9711   $as_echo_n "(cached) " >&6
9712 else
9713   case $RM in
9714   [\\/]* | ?:[\\/]*)
9715   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9716   ;;
9717   *)
9718   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9719 for as_dir in $PATH
9720 do
9721   IFS=$as_save_IFS
9722   test -z "$as_dir" && as_dir=.
9723     for ac_exec_ext in '' $ac_executable_extensions; do
9724   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9725     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9726     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9727     break 2
9728   fi
9729 done
9730   done
9731 IFS=$as_save_IFS
9732 
9733   ;;
9734 esac
9735 fi
9736 RM=$ac_cv_path_RM
9737 if test -n "$RM"; then
9738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9739 $as_echo "$RM" >&6; }
9740 else
9741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9742 $as_echo "no" >&6; }
9743 fi
9744 
9745 
9746   test -n "$RM" && break
9747 done
9748 
9749   else
9750     # The variable is set, but is it from the command line or the environment?
9751 
9752     # Try to remove the string !RM! from our list.
9753     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9754     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9755       # If it failed, the variable was not from the command line. Ignore it,
9756       # but warn the user (except for BASH, which is always set by the calling BASH).
9757       if test "xRM" != xBASH; then
9758         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9759 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9760       fi
9761       # Try to locate tool using the code snippet
9762       for ac_prog in rm
9763 do
9764   # Extract the first word of "$ac_prog", so it can be a program name with args.
9765 set dummy $ac_prog; ac_word=$2
9766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9767 $as_echo_n "checking for $ac_word... " >&6; }
9768 if ${ac_cv_path_RM+:} false; then :
9769   $as_echo_n "(cached) " >&6
9770 else
9771   case $RM in
9772   [\\/]* | ?:[\\/]*)
9773   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9774   ;;
9775   *)
9776   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9777 for as_dir in $PATH
9778 do
9779   IFS=$as_save_IFS
9780   test -z "$as_dir" && as_dir=.
9781     for ac_exec_ext in '' $ac_executable_extensions; do
9782   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9783     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9784     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9785     break 2
9786   fi
9787 done
9788   done
9789 IFS=$as_save_IFS
9790 
9791   ;;
9792 esac
9793 fi
9794 RM=$ac_cv_path_RM
9795 if test -n "$RM"; then
9796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9797 $as_echo "$RM" >&6; }
9798 else
9799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9800 $as_echo "no" >&6; }
9801 fi
9802 
9803 
9804   test -n "$RM" && break
9805 done
9806 
9807     else
9808       # If it succeeded, then it was overridden by the user. We will use it
9809       # for the tool.
9810 
9811       # First remove it from the list of overridden variables, so we can test
9812       # for unknown variables in the end.
9813       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9814 
9815       # Check if we try to supply an empty value
9816       if test "x$RM" = x; then
9817         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9818 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9819         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9820 $as_echo_n "checking for RM... " >&6; }
9821         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9822 $as_echo "disabled" >&6; }
9823       else
9824         # Check if the provided tool contains a complete path.
9825         tool_specified="$RM"
9826         tool_basename="${tool_specified##*/}"
9827         if test "x$tool_basename" = "x$tool_specified"; then
9828           # A command without a complete path is provided, search $PATH.
9829           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9830 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9831           # Extract the first word of "$tool_basename", so it can be a program name with args.
9832 set dummy $tool_basename; ac_word=$2
9833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9834 $as_echo_n "checking for $ac_word... " >&6; }
9835 if ${ac_cv_path_RM+:} false; then :
9836   $as_echo_n "(cached) " >&6
9837 else
9838   case $RM in
9839   [\\/]* | ?:[\\/]*)
9840   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9841   ;;
9842   *)
9843   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9844 for as_dir in $PATH
9845 do
9846   IFS=$as_save_IFS
9847   test -z "$as_dir" && as_dir=.
9848     for ac_exec_ext in '' $ac_executable_extensions; do
9849   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9850     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9851     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9852     break 2
9853   fi
9854 done
9855   done
9856 IFS=$as_save_IFS
9857 
9858   ;;
9859 esac
9860 fi
9861 RM=$ac_cv_path_RM
9862 if test -n "$RM"; then
9863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9864 $as_echo "$RM" >&6; }
9865 else
9866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9867 $as_echo "no" >&6; }
9868 fi
9869 
9870 
9871           if test "x$RM" = x; then
9872             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9873           fi
9874         else
9875           # Otherwise we believe it is a complete path. Use it as it is.
9876           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9877 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9878           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9879 $as_echo_n "checking for RM... " >&6; }
9880           if test ! -x "$tool_specified"; then
9881             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9882 $as_echo "not found" >&6; }
9883             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9884           fi
9885           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9886 $as_echo "$tool_specified" >&6; }
9887         fi
9888       fi
9889     fi
9890 
9891   fi
9892 
9893 
9894 
9895   if test "x$RM" = x; then
9896     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9897   fi
9898 
9899 
9900 
9901 
9902 
9903   # Publish this variable in the help.
9904 
9905 
9906   if [ -z "${RMDIR+x}" ]; then
9907     # The variable is not set by user, try to locate tool using the code snippet
9908     for ac_prog in rmdir
9909 do
9910   # Extract the first word of "$ac_prog", so it can be a program name with args.
9911 set dummy $ac_prog; ac_word=$2
9912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9913 $as_echo_n "checking for $ac_word... " >&6; }
9914 if ${ac_cv_path_RMDIR+:} false; then :
9915   $as_echo_n "(cached) " >&6
9916 else
9917   case $RMDIR in
9918   [\\/]* | ?:[\\/]*)
9919   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9920   ;;
9921   *)
9922   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9923 for as_dir in $PATH
9924 do
9925   IFS=$as_save_IFS
9926   test -z "$as_dir" && as_dir=.
9927     for ac_exec_ext in '' $ac_executable_extensions; do
9928   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9929     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9930     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9931     break 2
9932   fi
9933 done
9934   done
9935 IFS=$as_save_IFS
9936 
9937   ;;
9938 esac
9939 fi
9940 RMDIR=$ac_cv_path_RMDIR
9941 if test -n "$RMDIR"; then
9942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9943 $as_echo "$RMDIR" >&6; }
9944 else
9945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9946 $as_echo "no" >&6; }
9947 fi
9948 
9949 
9950   test -n "$RMDIR" && break
9951 done
9952 
9953   else
9954     # The variable is set, but is it from the command line or the environment?
9955 
9956     # Try to remove the string !RMDIR! from our list.
9957     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9958     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9959       # If it failed, the variable was not from the command line. Ignore it,
9960       # but warn the user (except for BASH, which is always set by the calling BASH).
9961       if test "xRMDIR" != xBASH; then
9962         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9963 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9964       fi
9965       # Try to locate tool using the code snippet
9966       for ac_prog in rmdir
9967 do
9968   # Extract the first word of "$ac_prog", so it can be a program name with args.
9969 set dummy $ac_prog; ac_word=$2
9970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9971 $as_echo_n "checking for $ac_word... " >&6; }
9972 if ${ac_cv_path_RMDIR+:} false; then :
9973   $as_echo_n "(cached) " >&6
9974 else
9975   case $RMDIR in
9976   [\\/]* | ?:[\\/]*)
9977   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9978   ;;
9979   *)
9980   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9981 for as_dir in $PATH
9982 do
9983   IFS=$as_save_IFS
9984   test -z "$as_dir" && as_dir=.
9985     for ac_exec_ext in '' $ac_executable_extensions; do
9986   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9987     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9988     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9989     break 2
9990   fi
9991 done
9992   done
9993 IFS=$as_save_IFS
9994 
9995   ;;
9996 esac
9997 fi
9998 RMDIR=$ac_cv_path_RMDIR
9999 if test -n "$RMDIR"; then
10000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10001 $as_echo "$RMDIR" >&6; }
10002 else
10003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10004 $as_echo "no" >&6; }
10005 fi
10006 
10007 
10008   test -n "$RMDIR" && break
10009 done
10010 
10011     else
10012       # If it succeeded, then it was overridden by the user. We will use it
10013       # for the tool.
10014 
10015       # First remove it from the list of overridden variables, so we can test
10016       # for unknown variables in the end.
10017       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10018 
10019       # Check if we try to supply an empty value
10020       if test "x$RMDIR" = x; then
10021         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10022 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10023         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10024 $as_echo_n "checking for RMDIR... " >&6; }
10025         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10026 $as_echo "disabled" >&6; }
10027       else
10028         # Check if the provided tool contains a complete path.
10029         tool_specified="$RMDIR"
10030         tool_basename="${tool_specified##*/}"
10031         if test "x$tool_basename" = "x$tool_specified"; then
10032           # A command without a complete path is provided, search $PATH.
10033           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10034 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10035           # Extract the first word of "$tool_basename", so it can be a program name with args.
10036 set dummy $tool_basename; ac_word=$2
10037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10038 $as_echo_n "checking for $ac_word... " >&6; }
10039 if ${ac_cv_path_RMDIR+:} false; then :
10040   $as_echo_n "(cached) " >&6
10041 else
10042   case $RMDIR in
10043   [\\/]* | ?:[\\/]*)
10044   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10045   ;;
10046   *)
10047   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10048 for as_dir in $PATH
10049 do
10050   IFS=$as_save_IFS
10051   test -z "$as_dir" && as_dir=.
10052     for ac_exec_ext in '' $ac_executable_extensions; do
10053   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10054     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10055     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10056     break 2
10057   fi
10058 done
10059   done
10060 IFS=$as_save_IFS
10061 
10062   ;;
10063 esac
10064 fi
10065 RMDIR=$ac_cv_path_RMDIR
10066 if test -n "$RMDIR"; then
10067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10068 $as_echo "$RMDIR" >&6; }
10069 else
10070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10071 $as_echo "no" >&6; }
10072 fi
10073 
10074 
10075           if test "x$RMDIR" = x; then
10076             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10077           fi
10078         else
10079           # Otherwise we believe it is a complete path. Use it as it is.
10080           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10081 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10082           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10083 $as_echo_n "checking for RMDIR... " >&6; }
10084           if test ! -x "$tool_specified"; then
10085             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10086 $as_echo "not found" >&6; }
10087             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10088           fi
10089           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10090 $as_echo "$tool_specified" >&6; }
10091         fi
10092       fi
10093     fi
10094 
10095   fi
10096 
10097 
10098 
10099   if test "x$RMDIR" = x; then
10100     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10101   fi
10102 
10103 
10104 
10105 
10106 
10107   # Publish this variable in the help.
10108 
10109 
10110   if [ -z "${SH+x}" ]; then
10111     # The variable is not set by user, try to locate tool using the code snippet
10112     for ac_prog in sh
10113 do
10114   # Extract the first word of "$ac_prog", so it can be a program name with args.
10115 set dummy $ac_prog; ac_word=$2
10116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10117 $as_echo_n "checking for $ac_word... " >&6; }
10118 if ${ac_cv_path_SH+:} false; then :
10119   $as_echo_n "(cached) " >&6
10120 else
10121   case $SH in
10122   [\\/]* | ?:[\\/]*)
10123   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10124   ;;
10125   *)
10126   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10127 for as_dir in $PATH
10128 do
10129   IFS=$as_save_IFS
10130   test -z "$as_dir" && as_dir=.
10131     for ac_exec_ext in '' $ac_executable_extensions; do
10132   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10133     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10134     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10135     break 2
10136   fi
10137 done
10138   done
10139 IFS=$as_save_IFS
10140 
10141   ;;
10142 esac
10143 fi
10144 SH=$ac_cv_path_SH
10145 if test -n "$SH"; then
10146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10147 $as_echo "$SH" >&6; }
10148 else
10149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10150 $as_echo "no" >&6; }
10151 fi
10152 
10153 
10154   test -n "$SH" && break
10155 done
10156 
10157   else
10158     # The variable is set, but is it from the command line or the environment?
10159 
10160     # Try to remove the string !SH! from our list.
10161     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10162     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10163       # If it failed, the variable was not from the command line. Ignore it,
10164       # but warn the user (except for BASH, which is always set by the calling BASH).
10165       if test "xSH" != xBASH; then
10166         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10167 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10168       fi
10169       # Try to locate tool using the code snippet
10170       for ac_prog in sh
10171 do
10172   # Extract the first word of "$ac_prog", so it can be a program name with args.
10173 set dummy $ac_prog; ac_word=$2
10174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10175 $as_echo_n "checking for $ac_word... " >&6; }
10176 if ${ac_cv_path_SH+:} false; then :
10177   $as_echo_n "(cached) " >&6
10178 else
10179   case $SH in
10180   [\\/]* | ?:[\\/]*)
10181   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10182   ;;
10183   *)
10184   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10185 for as_dir in $PATH
10186 do
10187   IFS=$as_save_IFS
10188   test -z "$as_dir" && as_dir=.
10189     for ac_exec_ext in '' $ac_executable_extensions; do
10190   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10191     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10192     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10193     break 2
10194   fi
10195 done
10196   done
10197 IFS=$as_save_IFS
10198 
10199   ;;
10200 esac
10201 fi
10202 SH=$ac_cv_path_SH
10203 if test -n "$SH"; then
10204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10205 $as_echo "$SH" >&6; }
10206 else
10207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10208 $as_echo "no" >&6; }
10209 fi
10210 
10211 
10212   test -n "$SH" && break
10213 done
10214 
10215     else
10216       # If it succeeded, then it was overridden by the user. We will use it
10217       # for the tool.
10218 
10219       # First remove it from the list of overridden variables, so we can test
10220       # for unknown variables in the end.
10221       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10222 
10223       # Check if we try to supply an empty value
10224       if test "x$SH" = x; then
10225         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10226 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10227         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10228 $as_echo_n "checking for SH... " >&6; }
10229         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10230 $as_echo "disabled" >&6; }
10231       else
10232         # Check if the provided tool contains a complete path.
10233         tool_specified="$SH"
10234         tool_basename="${tool_specified##*/}"
10235         if test "x$tool_basename" = "x$tool_specified"; then
10236           # A command without a complete path is provided, search $PATH.
10237           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10238 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10239           # Extract the first word of "$tool_basename", so it can be a program name with args.
10240 set dummy $tool_basename; ac_word=$2
10241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10242 $as_echo_n "checking for $ac_word... " >&6; }
10243 if ${ac_cv_path_SH+:} false; then :
10244   $as_echo_n "(cached) " >&6
10245 else
10246   case $SH in
10247   [\\/]* | ?:[\\/]*)
10248   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10249   ;;
10250   *)
10251   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10252 for as_dir in $PATH
10253 do
10254   IFS=$as_save_IFS
10255   test -z "$as_dir" && as_dir=.
10256     for ac_exec_ext in '' $ac_executable_extensions; do
10257   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10258     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10259     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10260     break 2
10261   fi
10262 done
10263   done
10264 IFS=$as_save_IFS
10265 
10266   ;;
10267 esac
10268 fi
10269 SH=$ac_cv_path_SH
10270 if test -n "$SH"; then
10271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10272 $as_echo "$SH" >&6; }
10273 else
10274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10275 $as_echo "no" >&6; }
10276 fi
10277 
10278 
10279           if test "x$SH" = x; then
10280             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10281           fi
10282         else
10283           # Otherwise we believe it is a complete path. Use it as it is.
10284           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10285 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10286           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10287 $as_echo_n "checking for SH... " >&6; }
10288           if test ! -x "$tool_specified"; then
10289             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10290 $as_echo "not found" >&6; }
10291             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10292           fi
10293           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10294 $as_echo "$tool_specified" >&6; }
10295         fi
10296       fi
10297     fi
10298 
10299   fi
10300 
10301 
10302 
10303   if test "x$SH" = x; then
10304     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10305   fi
10306 
10307 
10308 
10309 
10310 
10311   # Publish this variable in the help.
10312 
10313 
10314   if [ -z "${SORT+x}" ]; then
10315     # The variable is not set by user, try to locate tool using the code snippet
10316     for ac_prog in sort
10317 do
10318   # Extract the first word of "$ac_prog", so it can be a program name with args.
10319 set dummy $ac_prog; ac_word=$2
10320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10321 $as_echo_n "checking for $ac_word... " >&6; }
10322 if ${ac_cv_path_SORT+:} false; then :
10323   $as_echo_n "(cached) " >&6
10324 else
10325   case $SORT in
10326   [\\/]* | ?:[\\/]*)
10327   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10328   ;;
10329   *)
10330   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10331 for as_dir in $PATH
10332 do
10333   IFS=$as_save_IFS
10334   test -z "$as_dir" && as_dir=.
10335     for ac_exec_ext in '' $ac_executable_extensions; do
10336   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10337     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10338     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10339     break 2
10340   fi
10341 done
10342   done
10343 IFS=$as_save_IFS
10344 
10345   ;;
10346 esac
10347 fi
10348 SORT=$ac_cv_path_SORT
10349 if test -n "$SORT"; then
10350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10351 $as_echo "$SORT" >&6; }
10352 else
10353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10354 $as_echo "no" >&6; }
10355 fi
10356 
10357 
10358   test -n "$SORT" && break
10359 done
10360 
10361   else
10362     # The variable is set, but is it from the command line or the environment?
10363 
10364     # Try to remove the string !SORT! from our list.
10365     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10366     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10367       # If it failed, the variable was not from the command line. Ignore it,
10368       # but warn the user (except for BASH, which is always set by the calling BASH).
10369       if test "xSORT" != xBASH; then
10370         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10371 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10372       fi
10373       # Try to locate tool using the code snippet
10374       for ac_prog in sort
10375 do
10376   # Extract the first word of "$ac_prog", so it can be a program name with args.
10377 set dummy $ac_prog; ac_word=$2
10378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10379 $as_echo_n "checking for $ac_word... " >&6; }
10380 if ${ac_cv_path_SORT+:} false; then :
10381   $as_echo_n "(cached) " >&6
10382 else
10383   case $SORT in
10384   [\\/]* | ?:[\\/]*)
10385   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10386   ;;
10387   *)
10388   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10389 for as_dir in $PATH
10390 do
10391   IFS=$as_save_IFS
10392   test -z "$as_dir" && as_dir=.
10393     for ac_exec_ext in '' $ac_executable_extensions; do
10394   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10395     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10397     break 2
10398   fi
10399 done
10400   done
10401 IFS=$as_save_IFS
10402 
10403   ;;
10404 esac
10405 fi
10406 SORT=$ac_cv_path_SORT
10407 if test -n "$SORT"; then
10408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10409 $as_echo "$SORT" >&6; }
10410 else
10411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10412 $as_echo "no" >&6; }
10413 fi
10414 
10415 
10416   test -n "$SORT" && break
10417 done
10418 
10419     else
10420       # If it succeeded, then it was overridden by the user. We will use it
10421       # for the tool.
10422 
10423       # First remove it from the list of overridden variables, so we can test
10424       # for unknown variables in the end.
10425       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10426 
10427       # Check if we try to supply an empty value
10428       if test "x$SORT" = x; then
10429         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10430 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10431         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10432 $as_echo_n "checking for SORT... " >&6; }
10433         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10434 $as_echo "disabled" >&6; }
10435       else
10436         # Check if the provided tool contains a complete path.
10437         tool_specified="$SORT"
10438         tool_basename="${tool_specified##*/}"
10439         if test "x$tool_basename" = "x$tool_specified"; then
10440           # A command without a complete path is provided, search $PATH.
10441           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10442 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10443           # Extract the first word of "$tool_basename", so it can be a program name with args.
10444 set dummy $tool_basename; ac_word=$2
10445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10446 $as_echo_n "checking for $ac_word... " >&6; }
10447 if ${ac_cv_path_SORT+:} false; then :
10448   $as_echo_n "(cached) " >&6
10449 else
10450   case $SORT in
10451   [\\/]* | ?:[\\/]*)
10452   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10453   ;;
10454   *)
10455   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10456 for as_dir in $PATH
10457 do
10458   IFS=$as_save_IFS
10459   test -z "$as_dir" && as_dir=.
10460     for ac_exec_ext in '' $ac_executable_extensions; do
10461   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10462     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10463     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10464     break 2
10465   fi
10466 done
10467   done
10468 IFS=$as_save_IFS
10469 
10470   ;;
10471 esac
10472 fi
10473 SORT=$ac_cv_path_SORT
10474 if test -n "$SORT"; then
10475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10476 $as_echo "$SORT" >&6; }
10477 else
10478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10479 $as_echo "no" >&6; }
10480 fi
10481 
10482 
10483           if test "x$SORT" = x; then
10484             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10485           fi
10486         else
10487           # Otherwise we believe it is a complete path. Use it as it is.
10488           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10489 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10490           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10491 $as_echo_n "checking for SORT... " >&6; }
10492           if test ! -x "$tool_specified"; then
10493             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10494 $as_echo "not found" >&6; }
10495             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10496           fi
10497           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10498 $as_echo "$tool_specified" >&6; }
10499         fi
10500       fi
10501     fi
10502 
10503   fi
10504 
10505 
10506 
10507   if test "x$SORT" = x; then
10508     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10509   fi
10510 
10511 
10512 
10513 
10514 
10515   # Publish this variable in the help.
10516 
10517 
10518   if [ -z "${TAIL+x}" ]; then
10519     # The variable is not set by user, try to locate tool using the code snippet
10520     for ac_prog in tail
10521 do
10522   # Extract the first word of "$ac_prog", so it can be a program name with args.
10523 set dummy $ac_prog; ac_word=$2
10524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10525 $as_echo_n "checking for $ac_word... " >&6; }
10526 if ${ac_cv_path_TAIL+:} false; then :
10527   $as_echo_n "(cached) " >&6
10528 else
10529   case $TAIL in
10530   [\\/]* | ?:[\\/]*)
10531   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10532   ;;
10533   *)
10534   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10535 for as_dir in $PATH
10536 do
10537   IFS=$as_save_IFS
10538   test -z "$as_dir" && as_dir=.
10539     for ac_exec_ext in '' $ac_executable_extensions; do
10540   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10541     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10542     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10543     break 2
10544   fi
10545 done
10546   done
10547 IFS=$as_save_IFS
10548 
10549   ;;
10550 esac
10551 fi
10552 TAIL=$ac_cv_path_TAIL
10553 if test -n "$TAIL"; then
10554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10555 $as_echo "$TAIL" >&6; }
10556 else
10557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10558 $as_echo "no" >&6; }
10559 fi
10560 
10561 
10562   test -n "$TAIL" && break
10563 done
10564 
10565   else
10566     # The variable is set, but is it from the command line or the environment?
10567 
10568     # Try to remove the string !TAIL! from our list.
10569     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10570     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10571       # If it failed, the variable was not from the command line. Ignore it,
10572       # but warn the user (except for BASH, which is always set by the calling BASH).
10573       if test "xTAIL" != xBASH; then
10574         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10575 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10576       fi
10577       # Try to locate tool using the code snippet
10578       for ac_prog in tail
10579 do
10580   # Extract the first word of "$ac_prog", so it can be a program name with args.
10581 set dummy $ac_prog; ac_word=$2
10582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10583 $as_echo_n "checking for $ac_word... " >&6; }
10584 if ${ac_cv_path_TAIL+:} false; then :
10585   $as_echo_n "(cached) " >&6
10586 else
10587   case $TAIL in
10588   [\\/]* | ?:[\\/]*)
10589   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10590   ;;
10591   *)
10592   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10593 for as_dir in $PATH
10594 do
10595   IFS=$as_save_IFS
10596   test -z "$as_dir" && as_dir=.
10597     for ac_exec_ext in '' $ac_executable_extensions; do
10598   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10599     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10600     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10601     break 2
10602   fi
10603 done
10604   done
10605 IFS=$as_save_IFS
10606 
10607   ;;
10608 esac
10609 fi
10610 TAIL=$ac_cv_path_TAIL
10611 if test -n "$TAIL"; then
10612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10613 $as_echo "$TAIL" >&6; }
10614 else
10615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10616 $as_echo "no" >&6; }
10617 fi
10618 
10619 
10620   test -n "$TAIL" && break
10621 done
10622 
10623     else
10624       # If it succeeded, then it was overridden by the user. We will use it
10625       # for the tool.
10626 
10627       # First remove it from the list of overridden variables, so we can test
10628       # for unknown variables in the end.
10629       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10630 
10631       # Check if we try to supply an empty value
10632       if test "x$TAIL" = x; then
10633         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10634 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10635         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10636 $as_echo_n "checking for TAIL... " >&6; }
10637         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10638 $as_echo "disabled" >&6; }
10639       else
10640         # Check if the provided tool contains a complete path.
10641         tool_specified="$TAIL"
10642         tool_basename="${tool_specified##*/}"
10643         if test "x$tool_basename" = "x$tool_specified"; then
10644           # A command without a complete path is provided, search $PATH.
10645           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10646 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10647           # Extract the first word of "$tool_basename", so it can be a program name with args.
10648 set dummy $tool_basename; ac_word=$2
10649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10650 $as_echo_n "checking for $ac_word... " >&6; }
10651 if ${ac_cv_path_TAIL+:} false; then :
10652   $as_echo_n "(cached) " >&6
10653 else
10654   case $TAIL in
10655   [\\/]* | ?:[\\/]*)
10656   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10657   ;;
10658   *)
10659   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10660 for as_dir in $PATH
10661 do
10662   IFS=$as_save_IFS
10663   test -z "$as_dir" && as_dir=.
10664     for ac_exec_ext in '' $ac_executable_extensions; do
10665   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10666     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10667     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10668     break 2
10669   fi
10670 done
10671   done
10672 IFS=$as_save_IFS
10673 
10674   ;;
10675 esac
10676 fi
10677 TAIL=$ac_cv_path_TAIL
10678 if test -n "$TAIL"; then
10679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10680 $as_echo "$TAIL" >&6; }
10681 else
10682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10683 $as_echo "no" >&6; }
10684 fi
10685 
10686 
10687           if test "x$TAIL" = x; then
10688             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10689           fi
10690         else
10691           # Otherwise we believe it is a complete path. Use it as it is.
10692           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10693 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10694           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10695 $as_echo_n "checking for TAIL... " >&6; }
10696           if test ! -x "$tool_specified"; then
10697             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10698 $as_echo "not found" >&6; }
10699             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10700           fi
10701           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10702 $as_echo "$tool_specified" >&6; }
10703         fi
10704       fi
10705     fi
10706 
10707   fi
10708 
10709 
10710 
10711   if test "x$TAIL" = x; then
10712     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10713   fi
10714 
10715 
10716 
10717 
10718 
10719   # Publish this variable in the help.
10720 
10721 
10722   if [ -z "${TAR+x}" ]; then
10723     # The variable is not set by user, try to locate tool using the code snippet
10724     for ac_prog in tar
10725 do
10726   # Extract the first word of "$ac_prog", so it can be a program name with args.
10727 set dummy $ac_prog; ac_word=$2
10728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10729 $as_echo_n "checking for $ac_word... " >&6; }
10730 if ${ac_cv_path_TAR+:} false; then :
10731   $as_echo_n "(cached) " >&6
10732 else
10733   case $TAR in
10734   [\\/]* | ?:[\\/]*)
10735   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10736   ;;
10737   *)
10738   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10739 for as_dir in $PATH
10740 do
10741   IFS=$as_save_IFS
10742   test -z "$as_dir" && as_dir=.
10743     for ac_exec_ext in '' $ac_executable_extensions; do
10744   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10745     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10746     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10747     break 2
10748   fi
10749 done
10750   done
10751 IFS=$as_save_IFS
10752 
10753   ;;
10754 esac
10755 fi
10756 TAR=$ac_cv_path_TAR
10757 if test -n "$TAR"; then
10758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10759 $as_echo "$TAR" >&6; }
10760 else
10761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10762 $as_echo "no" >&6; }
10763 fi
10764 
10765 
10766   test -n "$TAR" && break
10767 done
10768 
10769   else
10770     # The variable is set, but is it from the command line or the environment?
10771 
10772     # Try to remove the string !TAR! from our list.
10773     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10774     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10775       # If it failed, the variable was not from the command line. Ignore it,
10776       # but warn the user (except for BASH, which is always set by the calling BASH).
10777       if test "xTAR" != xBASH; then
10778         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10779 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10780       fi
10781       # Try to locate tool using the code snippet
10782       for ac_prog in tar
10783 do
10784   # Extract the first word of "$ac_prog", so it can be a program name with args.
10785 set dummy $ac_prog; ac_word=$2
10786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10787 $as_echo_n "checking for $ac_word... " >&6; }
10788 if ${ac_cv_path_TAR+:} false; then :
10789   $as_echo_n "(cached) " >&6
10790 else
10791   case $TAR in
10792   [\\/]* | ?:[\\/]*)
10793   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10794   ;;
10795   *)
10796   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10797 for as_dir in $PATH
10798 do
10799   IFS=$as_save_IFS
10800   test -z "$as_dir" && as_dir=.
10801     for ac_exec_ext in '' $ac_executable_extensions; do
10802   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10803     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10804     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10805     break 2
10806   fi
10807 done
10808   done
10809 IFS=$as_save_IFS
10810 
10811   ;;
10812 esac
10813 fi
10814 TAR=$ac_cv_path_TAR
10815 if test -n "$TAR"; then
10816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10817 $as_echo "$TAR" >&6; }
10818 else
10819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10820 $as_echo "no" >&6; }
10821 fi
10822 
10823 
10824   test -n "$TAR" && break
10825 done
10826 
10827     else
10828       # If it succeeded, then it was overridden by the user. We will use it
10829       # for the tool.
10830 
10831       # First remove it from the list of overridden variables, so we can test
10832       # for unknown variables in the end.
10833       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10834 
10835       # Check if we try to supply an empty value
10836       if test "x$TAR" = x; then
10837         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10838 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10839         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10840 $as_echo_n "checking for TAR... " >&6; }
10841         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10842 $as_echo "disabled" >&6; }
10843       else
10844         # Check if the provided tool contains a complete path.
10845         tool_specified="$TAR"
10846         tool_basename="${tool_specified##*/}"
10847         if test "x$tool_basename" = "x$tool_specified"; then
10848           # A command without a complete path is provided, search $PATH.
10849           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10850 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10851           # Extract the first word of "$tool_basename", so it can be a program name with args.
10852 set dummy $tool_basename; ac_word=$2
10853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10854 $as_echo_n "checking for $ac_word... " >&6; }
10855 if ${ac_cv_path_TAR+:} false; then :
10856   $as_echo_n "(cached) " >&6
10857 else
10858   case $TAR in
10859   [\\/]* | ?:[\\/]*)
10860   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10861   ;;
10862   *)
10863   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10864 for as_dir in $PATH
10865 do
10866   IFS=$as_save_IFS
10867   test -z "$as_dir" && as_dir=.
10868     for ac_exec_ext in '' $ac_executable_extensions; do
10869   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10870     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10871     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10872     break 2
10873   fi
10874 done
10875   done
10876 IFS=$as_save_IFS
10877 
10878   ;;
10879 esac
10880 fi
10881 TAR=$ac_cv_path_TAR
10882 if test -n "$TAR"; then
10883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10884 $as_echo "$TAR" >&6; }
10885 else
10886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10887 $as_echo "no" >&6; }
10888 fi
10889 
10890 
10891           if test "x$TAR" = x; then
10892             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10893           fi
10894         else
10895           # Otherwise we believe it is a complete path. Use it as it is.
10896           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10897 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10898           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10899 $as_echo_n "checking for TAR... " >&6; }
10900           if test ! -x "$tool_specified"; then
10901             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10902 $as_echo "not found" >&6; }
10903             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10904           fi
10905           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10906 $as_echo "$tool_specified" >&6; }
10907         fi
10908       fi
10909     fi
10910 
10911   fi
10912 
10913 
10914 
10915   if test "x$TAR" = x; then
10916     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10917   fi
10918 
10919 
10920 
10921 
10922 
10923   # Publish this variable in the help.
10924 
10925 
10926   if [ -z "${TEE+x}" ]; then
10927     # The variable is not set by user, try to locate tool using the code snippet
10928     for ac_prog in tee
10929 do
10930   # Extract the first word of "$ac_prog", so it can be a program name with args.
10931 set dummy $ac_prog; ac_word=$2
10932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10933 $as_echo_n "checking for $ac_word... " >&6; }
10934 if ${ac_cv_path_TEE+:} false; then :
10935   $as_echo_n "(cached) " >&6
10936 else
10937   case $TEE in
10938   [\\/]* | ?:[\\/]*)
10939   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10940   ;;
10941   *)
10942   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10943 for as_dir in $PATH
10944 do
10945   IFS=$as_save_IFS
10946   test -z "$as_dir" && as_dir=.
10947     for ac_exec_ext in '' $ac_executable_extensions; do
10948   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10949     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10950     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10951     break 2
10952   fi
10953 done
10954   done
10955 IFS=$as_save_IFS
10956 
10957   ;;
10958 esac
10959 fi
10960 TEE=$ac_cv_path_TEE
10961 if test -n "$TEE"; then
10962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10963 $as_echo "$TEE" >&6; }
10964 else
10965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10966 $as_echo "no" >&6; }
10967 fi
10968 
10969 
10970   test -n "$TEE" && break
10971 done
10972 
10973   else
10974     # The variable is set, but is it from the command line or the environment?
10975 
10976     # Try to remove the string !TEE! from our list.
10977     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10978     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10979       # If it failed, the variable was not from the command line. Ignore it,
10980       # but warn the user (except for BASH, which is always set by the calling BASH).
10981       if test "xTEE" != xBASH; then
10982         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10983 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10984       fi
10985       # Try to locate tool using the code snippet
10986       for ac_prog in tee
10987 do
10988   # Extract the first word of "$ac_prog", so it can be a program name with args.
10989 set dummy $ac_prog; ac_word=$2
10990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10991 $as_echo_n "checking for $ac_word... " >&6; }
10992 if ${ac_cv_path_TEE+:} false; then :
10993   $as_echo_n "(cached) " >&6
10994 else
10995   case $TEE in
10996   [\\/]* | ?:[\\/]*)
10997   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10998   ;;
10999   *)
11000   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11001 for as_dir in $PATH
11002 do
11003   IFS=$as_save_IFS
11004   test -z "$as_dir" && as_dir=.
11005     for ac_exec_ext in '' $ac_executable_extensions; do
11006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11007     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11009     break 2
11010   fi
11011 done
11012   done
11013 IFS=$as_save_IFS
11014 
11015   ;;
11016 esac
11017 fi
11018 TEE=$ac_cv_path_TEE
11019 if test -n "$TEE"; then
11020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11021 $as_echo "$TEE" >&6; }
11022 else
11023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11024 $as_echo "no" >&6; }
11025 fi
11026 
11027 
11028   test -n "$TEE" && break
11029 done
11030 
11031     else
11032       # If it succeeded, then it was overridden by the user. We will use it
11033       # for the tool.
11034 
11035       # First remove it from the list of overridden variables, so we can test
11036       # for unknown variables in the end.
11037       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11038 
11039       # Check if we try to supply an empty value
11040       if test "x$TEE" = x; then
11041         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11042 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11043         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11044 $as_echo_n "checking for TEE... " >&6; }
11045         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11046 $as_echo "disabled" >&6; }
11047       else
11048         # Check if the provided tool contains a complete path.
11049         tool_specified="$TEE"
11050         tool_basename="${tool_specified##*/}"
11051         if test "x$tool_basename" = "x$tool_specified"; then
11052           # A command without a complete path is provided, search $PATH.
11053           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11054 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11055           # Extract the first word of "$tool_basename", so it can be a program name with args.
11056 set dummy $tool_basename; ac_word=$2
11057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11058 $as_echo_n "checking for $ac_word... " >&6; }
11059 if ${ac_cv_path_TEE+:} false; then :
11060   $as_echo_n "(cached) " >&6
11061 else
11062   case $TEE in
11063   [\\/]* | ?:[\\/]*)
11064   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11065   ;;
11066   *)
11067   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11068 for as_dir in $PATH
11069 do
11070   IFS=$as_save_IFS
11071   test -z "$as_dir" && as_dir=.
11072     for ac_exec_ext in '' $ac_executable_extensions; do
11073   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11074     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11075     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11076     break 2
11077   fi
11078 done
11079   done
11080 IFS=$as_save_IFS
11081 
11082   ;;
11083 esac
11084 fi
11085 TEE=$ac_cv_path_TEE
11086 if test -n "$TEE"; then
11087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11088 $as_echo "$TEE" >&6; }
11089 else
11090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11091 $as_echo "no" >&6; }
11092 fi
11093 
11094 
11095           if test "x$TEE" = x; then
11096             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11097           fi
11098         else
11099           # Otherwise we believe it is a complete path. Use it as it is.
11100           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11101 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11102           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11103 $as_echo_n "checking for TEE... " >&6; }
11104           if test ! -x "$tool_specified"; then
11105             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11106 $as_echo "not found" >&6; }
11107             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11108           fi
11109           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11110 $as_echo "$tool_specified" >&6; }
11111         fi
11112       fi
11113     fi
11114 
11115   fi
11116 
11117 
11118 
11119   if test "x$TEE" = x; then
11120     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11121   fi
11122 
11123 
11124 
11125 
11126 
11127   # Publish this variable in the help.
11128 
11129 
11130   if [ -z "${TOUCH+x}" ]; then
11131     # The variable is not set by user, try to locate tool using the code snippet
11132     for ac_prog in touch
11133 do
11134   # Extract the first word of "$ac_prog", so it can be a program name with args.
11135 set dummy $ac_prog; ac_word=$2
11136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11137 $as_echo_n "checking for $ac_word... " >&6; }
11138 if ${ac_cv_path_TOUCH+:} false; then :
11139   $as_echo_n "(cached) " >&6
11140 else
11141   case $TOUCH in
11142   [\\/]* | ?:[\\/]*)
11143   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11144   ;;
11145   *)
11146   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11147 for as_dir in $PATH
11148 do
11149   IFS=$as_save_IFS
11150   test -z "$as_dir" && as_dir=.
11151     for ac_exec_ext in '' $ac_executable_extensions; do
11152   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11153     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11154     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11155     break 2
11156   fi
11157 done
11158   done
11159 IFS=$as_save_IFS
11160 
11161   ;;
11162 esac
11163 fi
11164 TOUCH=$ac_cv_path_TOUCH
11165 if test -n "$TOUCH"; then
11166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11167 $as_echo "$TOUCH" >&6; }
11168 else
11169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11170 $as_echo "no" >&6; }
11171 fi
11172 
11173 
11174   test -n "$TOUCH" && break
11175 done
11176 
11177   else
11178     # The variable is set, but is it from the command line or the environment?
11179 
11180     # Try to remove the string !TOUCH! from our list.
11181     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11182     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11183       # If it failed, the variable was not from the command line. Ignore it,
11184       # but warn the user (except for BASH, which is always set by the calling BASH).
11185       if test "xTOUCH" != xBASH; then
11186         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11187 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11188       fi
11189       # Try to locate tool using the code snippet
11190       for ac_prog in touch
11191 do
11192   # Extract the first word of "$ac_prog", so it can be a program name with args.
11193 set dummy $ac_prog; ac_word=$2
11194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11195 $as_echo_n "checking for $ac_word... " >&6; }
11196 if ${ac_cv_path_TOUCH+:} false; then :
11197   $as_echo_n "(cached) " >&6
11198 else
11199   case $TOUCH in
11200   [\\/]* | ?:[\\/]*)
11201   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11202   ;;
11203   *)
11204   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11205 for as_dir in $PATH
11206 do
11207   IFS=$as_save_IFS
11208   test -z "$as_dir" && as_dir=.
11209     for ac_exec_ext in '' $ac_executable_extensions; do
11210   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11211     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11212     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11213     break 2
11214   fi
11215 done
11216   done
11217 IFS=$as_save_IFS
11218 
11219   ;;
11220 esac
11221 fi
11222 TOUCH=$ac_cv_path_TOUCH
11223 if test -n "$TOUCH"; then
11224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11225 $as_echo "$TOUCH" >&6; }
11226 else
11227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11228 $as_echo "no" >&6; }
11229 fi
11230 
11231 
11232   test -n "$TOUCH" && break
11233 done
11234 
11235     else
11236       # If it succeeded, then it was overridden by the user. We will use it
11237       # for the tool.
11238 
11239       # First remove it from the list of overridden variables, so we can test
11240       # for unknown variables in the end.
11241       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11242 
11243       # Check if we try to supply an empty value
11244       if test "x$TOUCH" = x; then
11245         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11246 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11247         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11248 $as_echo_n "checking for TOUCH... " >&6; }
11249         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11250 $as_echo "disabled" >&6; }
11251       else
11252         # Check if the provided tool contains a complete path.
11253         tool_specified="$TOUCH"
11254         tool_basename="${tool_specified##*/}"
11255         if test "x$tool_basename" = "x$tool_specified"; then
11256           # A command without a complete path is provided, search $PATH.
11257           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11258 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11259           # Extract the first word of "$tool_basename", so it can be a program name with args.
11260 set dummy $tool_basename; ac_word=$2
11261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11262 $as_echo_n "checking for $ac_word... " >&6; }
11263 if ${ac_cv_path_TOUCH+:} false; then :
11264   $as_echo_n "(cached) " >&6
11265 else
11266   case $TOUCH in
11267   [\\/]* | ?:[\\/]*)
11268   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11269   ;;
11270   *)
11271   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11272 for as_dir in $PATH
11273 do
11274   IFS=$as_save_IFS
11275   test -z "$as_dir" && as_dir=.
11276     for ac_exec_ext in '' $ac_executable_extensions; do
11277   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11278     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11279     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11280     break 2
11281   fi
11282 done
11283   done
11284 IFS=$as_save_IFS
11285 
11286   ;;
11287 esac
11288 fi
11289 TOUCH=$ac_cv_path_TOUCH
11290 if test -n "$TOUCH"; then
11291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11292 $as_echo "$TOUCH" >&6; }
11293 else
11294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11295 $as_echo "no" >&6; }
11296 fi
11297 
11298 
11299           if test "x$TOUCH" = x; then
11300             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11301           fi
11302         else
11303           # Otherwise we believe it is a complete path. Use it as it is.
11304           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11305 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11306           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11307 $as_echo_n "checking for TOUCH... " >&6; }
11308           if test ! -x "$tool_specified"; then
11309             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11310 $as_echo "not found" >&6; }
11311             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11312           fi
11313           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11314 $as_echo "$tool_specified" >&6; }
11315         fi
11316       fi
11317     fi
11318 
11319   fi
11320 
11321 
11322 
11323   if test "x$TOUCH" = x; then
11324     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11325   fi
11326 
11327 
11328 
11329 
11330 
11331   # Publish this variable in the help.
11332 
11333 
11334   if [ -z "${TR+x}" ]; then
11335     # The variable is not set by user, try to locate tool using the code snippet
11336     for ac_prog in tr
11337 do
11338   # Extract the first word of "$ac_prog", so it can be a program name with args.
11339 set dummy $ac_prog; ac_word=$2
11340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11341 $as_echo_n "checking for $ac_word... " >&6; }
11342 if ${ac_cv_path_TR+:} false; then :
11343   $as_echo_n "(cached) " >&6
11344 else
11345   case $TR in
11346   [\\/]* | ?:[\\/]*)
11347   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11348   ;;
11349   *)
11350   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11351 for as_dir in $PATH
11352 do
11353   IFS=$as_save_IFS
11354   test -z "$as_dir" && as_dir=.
11355     for ac_exec_ext in '' $ac_executable_extensions; do
11356   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11357     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11358     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11359     break 2
11360   fi
11361 done
11362   done
11363 IFS=$as_save_IFS
11364 
11365   ;;
11366 esac
11367 fi
11368 TR=$ac_cv_path_TR
11369 if test -n "$TR"; then
11370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11371 $as_echo "$TR" >&6; }
11372 else
11373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11374 $as_echo "no" >&6; }
11375 fi
11376 
11377 
11378   test -n "$TR" && break
11379 done
11380 
11381   else
11382     # The variable is set, but is it from the command line or the environment?
11383 
11384     # Try to remove the string !TR! from our list.
11385     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11386     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11387       # If it failed, the variable was not from the command line. Ignore it,
11388       # but warn the user (except for BASH, which is always set by the calling BASH).
11389       if test "xTR" != xBASH; then
11390         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11391 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11392       fi
11393       # Try to locate tool using the code snippet
11394       for ac_prog in tr
11395 do
11396   # Extract the first word of "$ac_prog", so it can be a program name with args.
11397 set dummy $ac_prog; ac_word=$2
11398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11399 $as_echo_n "checking for $ac_word... " >&6; }
11400 if ${ac_cv_path_TR+:} false; then :
11401   $as_echo_n "(cached) " >&6
11402 else
11403   case $TR in
11404   [\\/]* | ?:[\\/]*)
11405   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11406   ;;
11407   *)
11408   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11409 for as_dir in $PATH
11410 do
11411   IFS=$as_save_IFS
11412   test -z "$as_dir" && as_dir=.
11413     for ac_exec_ext in '' $ac_executable_extensions; do
11414   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11415     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11416     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11417     break 2
11418   fi
11419 done
11420   done
11421 IFS=$as_save_IFS
11422 
11423   ;;
11424 esac
11425 fi
11426 TR=$ac_cv_path_TR
11427 if test -n "$TR"; then
11428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11429 $as_echo "$TR" >&6; }
11430 else
11431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11432 $as_echo "no" >&6; }
11433 fi
11434 
11435 
11436   test -n "$TR" && break
11437 done
11438 
11439     else
11440       # If it succeeded, then it was overridden by the user. We will use it
11441       # for the tool.
11442 
11443       # First remove it from the list of overridden variables, so we can test
11444       # for unknown variables in the end.
11445       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11446 
11447       # Check if we try to supply an empty value
11448       if test "x$TR" = x; then
11449         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11450 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11451         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11452 $as_echo_n "checking for TR... " >&6; }
11453         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11454 $as_echo "disabled" >&6; }
11455       else
11456         # Check if the provided tool contains a complete path.
11457         tool_specified="$TR"
11458         tool_basename="${tool_specified##*/}"
11459         if test "x$tool_basename" = "x$tool_specified"; then
11460           # A command without a complete path is provided, search $PATH.
11461           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11462 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11463           # Extract the first word of "$tool_basename", so it can be a program name with args.
11464 set dummy $tool_basename; ac_word=$2
11465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11466 $as_echo_n "checking for $ac_word... " >&6; }
11467 if ${ac_cv_path_TR+:} false; then :
11468   $as_echo_n "(cached) " >&6
11469 else
11470   case $TR in
11471   [\\/]* | ?:[\\/]*)
11472   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11473   ;;
11474   *)
11475   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11476 for as_dir in $PATH
11477 do
11478   IFS=$as_save_IFS
11479   test -z "$as_dir" && as_dir=.
11480     for ac_exec_ext in '' $ac_executable_extensions; do
11481   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11482     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11483     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11484     break 2
11485   fi
11486 done
11487   done
11488 IFS=$as_save_IFS
11489 
11490   ;;
11491 esac
11492 fi
11493 TR=$ac_cv_path_TR
11494 if test -n "$TR"; then
11495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11496 $as_echo "$TR" >&6; }
11497 else
11498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11499 $as_echo "no" >&6; }
11500 fi
11501 
11502 
11503           if test "x$TR" = x; then
11504             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11505           fi
11506         else
11507           # Otherwise we believe it is a complete path. Use it as it is.
11508           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11509 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11510           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11511 $as_echo_n "checking for TR... " >&6; }
11512           if test ! -x "$tool_specified"; then
11513             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11514 $as_echo "not found" >&6; }
11515             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11516           fi
11517           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11518 $as_echo "$tool_specified" >&6; }
11519         fi
11520       fi
11521     fi
11522 
11523   fi
11524 
11525 
11526 
11527   if test "x$TR" = x; then
11528     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11529   fi
11530 
11531 
11532 
11533 
11534 
11535   # Publish this variable in the help.
11536 
11537 
11538   if [ -z "${UNAME+x}" ]; then
11539     # The variable is not set by user, try to locate tool using the code snippet
11540     for ac_prog in uname
11541 do
11542   # Extract the first word of "$ac_prog", so it can be a program name with args.
11543 set dummy $ac_prog; ac_word=$2
11544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11545 $as_echo_n "checking for $ac_word... " >&6; }
11546 if ${ac_cv_path_UNAME+:} false; then :
11547   $as_echo_n "(cached) " >&6
11548 else
11549   case $UNAME in
11550   [\\/]* | ?:[\\/]*)
11551   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11552   ;;
11553   *)
11554   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11555 for as_dir in $PATH
11556 do
11557   IFS=$as_save_IFS
11558   test -z "$as_dir" && as_dir=.
11559     for ac_exec_ext in '' $ac_executable_extensions; do
11560   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11561     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11562     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11563     break 2
11564   fi
11565 done
11566   done
11567 IFS=$as_save_IFS
11568 
11569   ;;
11570 esac
11571 fi
11572 UNAME=$ac_cv_path_UNAME
11573 if test -n "$UNAME"; then
11574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11575 $as_echo "$UNAME" >&6; }
11576 else
11577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11578 $as_echo "no" >&6; }
11579 fi
11580 
11581 
11582   test -n "$UNAME" && break
11583 done
11584 
11585   else
11586     # The variable is set, but is it from the command line or the environment?
11587 
11588     # Try to remove the string !UNAME! from our list.
11589     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11590     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11591       # If it failed, the variable was not from the command line. Ignore it,
11592       # but warn the user (except for BASH, which is always set by the calling BASH).
11593       if test "xUNAME" != xBASH; then
11594         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11595 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11596       fi
11597       # Try to locate tool using the code snippet
11598       for ac_prog in uname
11599 do
11600   # Extract the first word of "$ac_prog", so it can be a program name with args.
11601 set dummy $ac_prog; ac_word=$2
11602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11603 $as_echo_n "checking for $ac_word... " >&6; }
11604 if ${ac_cv_path_UNAME+:} false; then :
11605   $as_echo_n "(cached) " >&6
11606 else
11607   case $UNAME in
11608   [\\/]* | ?:[\\/]*)
11609   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11610   ;;
11611   *)
11612   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11613 for as_dir in $PATH
11614 do
11615   IFS=$as_save_IFS
11616   test -z "$as_dir" && as_dir=.
11617     for ac_exec_ext in '' $ac_executable_extensions; do
11618   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11619     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11620     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11621     break 2
11622   fi
11623 done
11624   done
11625 IFS=$as_save_IFS
11626 
11627   ;;
11628 esac
11629 fi
11630 UNAME=$ac_cv_path_UNAME
11631 if test -n "$UNAME"; then
11632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11633 $as_echo "$UNAME" >&6; }
11634 else
11635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11636 $as_echo "no" >&6; }
11637 fi
11638 
11639 
11640   test -n "$UNAME" && break
11641 done
11642 
11643     else
11644       # If it succeeded, then it was overridden by the user. We will use it
11645       # for the tool.
11646 
11647       # First remove it from the list of overridden variables, so we can test
11648       # for unknown variables in the end.
11649       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11650 
11651       # Check if we try to supply an empty value
11652       if test "x$UNAME" = x; then
11653         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11654 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11655         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11656 $as_echo_n "checking for UNAME... " >&6; }
11657         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11658 $as_echo "disabled" >&6; }
11659       else
11660         # Check if the provided tool contains a complete path.
11661         tool_specified="$UNAME"
11662         tool_basename="${tool_specified##*/}"
11663         if test "x$tool_basename" = "x$tool_specified"; then
11664           # A command without a complete path is provided, search $PATH.
11665           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11666 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11667           # Extract the first word of "$tool_basename", so it can be a program name with args.
11668 set dummy $tool_basename; ac_word=$2
11669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11670 $as_echo_n "checking for $ac_word... " >&6; }
11671 if ${ac_cv_path_UNAME+:} false; then :
11672   $as_echo_n "(cached) " >&6
11673 else
11674   case $UNAME in
11675   [\\/]* | ?:[\\/]*)
11676   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11677   ;;
11678   *)
11679   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11680 for as_dir in $PATH
11681 do
11682   IFS=$as_save_IFS
11683   test -z "$as_dir" && as_dir=.
11684     for ac_exec_ext in '' $ac_executable_extensions; do
11685   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11686     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11687     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11688     break 2
11689   fi
11690 done
11691   done
11692 IFS=$as_save_IFS
11693 
11694   ;;
11695 esac
11696 fi
11697 UNAME=$ac_cv_path_UNAME
11698 if test -n "$UNAME"; then
11699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11700 $as_echo "$UNAME" >&6; }
11701 else
11702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11703 $as_echo "no" >&6; }
11704 fi
11705 
11706 
11707           if test "x$UNAME" = x; then
11708             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11709           fi
11710         else
11711           # Otherwise we believe it is a complete path. Use it as it is.
11712           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11713 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11714           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11715 $as_echo_n "checking for UNAME... " >&6; }
11716           if test ! -x "$tool_specified"; then
11717             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11718 $as_echo "not found" >&6; }
11719             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11720           fi
11721           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11722 $as_echo "$tool_specified" >&6; }
11723         fi
11724       fi
11725     fi
11726 
11727   fi
11728 
11729 
11730 
11731   if test "x$UNAME" = x; then
11732     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11733   fi
11734 
11735 
11736 
11737 
11738 
11739   # Publish this variable in the help.
11740 
11741 
11742   if [ -z "${UNIQ+x}" ]; then
11743     # The variable is not set by user, try to locate tool using the code snippet
11744     for ac_prog in uniq
11745 do
11746   # Extract the first word of "$ac_prog", so it can be a program name with args.
11747 set dummy $ac_prog; ac_word=$2
11748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11749 $as_echo_n "checking for $ac_word... " >&6; }
11750 if ${ac_cv_path_UNIQ+:} false; then :
11751   $as_echo_n "(cached) " >&6
11752 else
11753   case $UNIQ in
11754   [\\/]* | ?:[\\/]*)
11755   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11756   ;;
11757   *)
11758   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11759 for as_dir in $PATH
11760 do
11761   IFS=$as_save_IFS
11762   test -z "$as_dir" && as_dir=.
11763     for ac_exec_ext in '' $ac_executable_extensions; do
11764   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11765     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11766     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11767     break 2
11768   fi
11769 done
11770   done
11771 IFS=$as_save_IFS
11772 
11773   ;;
11774 esac
11775 fi
11776 UNIQ=$ac_cv_path_UNIQ
11777 if test -n "$UNIQ"; then
11778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11779 $as_echo "$UNIQ" >&6; }
11780 else
11781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11782 $as_echo "no" >&6; }
11783 fi
11784 
11785 
11786   test -n "$UNIQ" && break
11787 done
11788 
11789   else
11790     # The variable is set, but is it from the command line or the environment?
11791 
11792     # Try to remove the string !UNIQ! from our list.
11793     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11794     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11795       # If it failed, the variable was not from the command line. Ignore it,
11796       # but warn the user (except for BASH, which is always set by the calling BASH).
11797       if test "xUNIQ" != xBASH; then
11798         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11799 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11800       fi
11801       # Try to locate tool using the code snippet
11802       for ac_prog in uniq
11803 do
11804   # Extract the first word of "$ac_prog", so it can be a program name with args.
11805 set dummy $ac_prog; ac_word=$2
11806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11807 $as_echo_n "checking for $ac_word... " >&6; }
11808 if ${ac_cv_path_UNIQ+:} false; then :
11809   $as_echo_n "(cached) " >&6
11810 else
11811   case $UNIQ in
11812   [\\/]* | ?:[\\/]*)
11813   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11814   ;;
11815   *)
11816   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11817 for as_dir in $PATH
11818 do
11819   IFS=$as_save_IFS
11820   test -z "$as_dir" && as_dir=.
11821     for ac_exec_ext in '' $ac_executable_extensions; do
11822   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11823     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11824     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11825     break 2
11826   fi
11827 done
11828   done
11829 IFS=$as_save_IFS
11830 
11831   ;;
11832 esac
11833 fi
11834 UNIQ=$ac_cv_path_UNIQ
11835 if test -n "$UNIQ"; then
11836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11837 $as_echo "$UNIQ" >&6; }
11838 else
11839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11840 $as_echo "no" >&6; }
11841 fi
11842 
11843 
11844   test -n "$UNIQ" && break
11845 done
11846 
11847     else
11848       # If it succeeded, then it was overridden by the user. We will use it
11849       # for the tool.
11850 
11851       # First remove it from the list of overridden variables, so we can test
11852       # for unknown variables in the end.
11853       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11854 
11855       # Check if we try to supply an empty value
11856       if test "x$UNIQ" = x; then
11857         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11858 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11859         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11860 $as_echo_n "checking for UNIQ... " >&6; }
11861         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11862 $as_echo "disabled" >&6; }
11863       else
11864         # Check if the provided tool contains a complete path.
11865         tool_specified="$UNIQ"
11866         tool_basename="${tool_specified##*/}"
11867         if test "x$tool_basename" = "x$tool_specified"; then
11868           # A command without a complete path is provided, search $PATH.
11869           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11870 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11871           # Extract the first word of "$tool_basename", so it can be a program name with args.
11872 set dummy $tool_basename; ac_word=$2
11873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11874 $as_echo_n "checking for $ac_word... " >&6; }
11875 if ${ac_cv_path_UNIQ+:} false; then :
11876   $as_echo_n "(cached) " >&6
11877 else
11878   case $UNIQ in
11879   [\\/]* | ?:[\\/]*)
11880   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11881   ;;
11882   *)
11883   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11884 for as_dir in $PATH
11885 do
11886   IFS=$as_save_IFS
11887   test -z "$as_dir" && as_dir=.
11888     for ac_exec_ext in '' $ac_executable_extensions; do
11889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11890     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11892     break 2
11893   fi
11894 done
11895   done
11896 IFS=$as_save_IFS
11897 
11898   ;;
11899 esac
11900 fi
11901 UNIQ=$ac_cv_path_UNIQ
11902 if test -n "$UNIQ"; then
11903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11904 $as_echo "$UNIQ" >&6; }
11905 else
11906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11907 $as_echo "no" >&6; }
11908 fi
11909 
11910 
11911           if test "x$UNIQ" = x; then
11912             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11913           fi
11914         else
11915           # Otherwise we believe it is a complete path. Use it as it is.
11916           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11917 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11918           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11919 $as_echo_n "checking for UNIQ... " >&6; }
11920           if test ! -x "$tool_specified"; then
11921             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11922 $as_echo "not found" >&6; }
11923             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11924           fi
11925           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11926 $as_echo "$tool_specified" >&6; }
11927         fi
11928       fi
11929     fi
11930 
11931   fi
11932 
11933 
11934 
11935   if test "x$UNIQ" = x; then
11936     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11937   fi
11938 
11939 
11940 
11941 
11942 
11943   # Publish this variable in the help.
11944 
11945 
11946   if [ -z "${WC+x}" ]; then
11947     # The variable is not set by user, try to locate tool using the code snippet
11948     for ac_prog in wc
11949 do
11950   # Extract the first word of "$ac_prog", so it can be a program name with args.
11951 set dummy $ac_prog; ac_word=$2
11952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11953 $as_echo_n "checking for $ac_word... " >&6; }
11954 if ${ac_cv_path_WC+:} false; then :
11955   $as_echo_n "(cached) " >&6
11956 else
11957   case $WC in
11958   [\\/]* | ?:[\\/]*)
11959   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11960   ;;
11961   *)
11962   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11963 for as_dir in $PATH
11964 do
11965   IFS=$as_save_IFS
11966   test -z "$as_dir" && as_dir=.
11967     for ac_exec_ext in '' $ac_executable_extensions; do
11968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11969     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11971     break 2
11972   fi
11973 done
11974   done
11975 IFS=$as_save_IFS
11976 
11977   ;;
11978 esac
11979 fi
11980 WC=$ac_cv_path_WC
11981 if test -n "$WC"; then
11982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11983 $as_echo "$WC" >&6; }
11984 else
11985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11986 $as_echo "no" >&6; }
11987 fi
11988 
11989 
11990   test -n "$WC" && break
11991 done
11992 
11993   else
11994     # The variable is set, but is it from the command line or the environment?
11995 
11996     # Try to remove the string !WC! from our list.
11997     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11998     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11999       # If it failed, the variable was not from the command line. Ignore it,
12000       # but warn the user (except for BASH, which is always set by the calling BASH).
12001       if test "xWC" != xBASH; then
12002         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12003 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12004       fi
12005       # Try to locate tool using the code snippet
12006       for ac_prog in wc
12007 do
12008   # Extract the first word of "$ac_prog", so it can be a program name with args.
12009 set dummy $ac_prog; ac_word=$2
12010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12011 $as_echo_n "checking for $ac_word... " >&6; }
12012 if ${ac_cv_path_WC+:} false; then :
12013   $as_echo_n "(cached) " >&6
12014 else
12015   case $WC in
12016   [\\/]* | ?:[\\/]*)
12017   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12018   ;;
12019   *)
12020   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12021 for as_dir in $PATH
12022 do
12023   IFS=$as_save_IFS
12024   test -z "$as_dir" && as_dir=.
12025     for ac_exec_ext in '' $ac_executable_extensions; do
12026   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12027     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12028     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12029     break 2
12030   fi
12031 done
12032   done
12033 IFS=$as_save_IFS
12034 
12035   ;;
12036 esac
12037 fi
12038 WC=$ac_cv_path_WC
12039 if test -n "$WC"; then
12040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12041 $as_echo "$WC" >&6; }
12042 else
12043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12044 $as_echo "no" >&6; }
12045 fi
12046 
12047 
12048   test -n "$WC" && break
12049 done
12050 
12051     else
12052       # If it succeeded, then it was overridden by the user. We will use it
12053       # for the tool.
12054 
12055       # First remove it from the list of overridden variables, so we can test
12056       # for unknown variables in the end.
12057       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12058 
12059       # Check if we try to supply an empty value
12060       if test "x$WC" = x; then
12061         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12062 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12063         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12064 $as_echo_n "checking for WC... " >&6; }
12065         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12066 $as_echo "disabled" >&6; }
12067       else
12068         # Check if the provided tool contains a complete path.
12069         tool_specified="$WC"
12070         tool_basename="${tool_specified##*/}"
12071         if test "x$tool_basename" = "x$tool_specified"; then
12072           # A command without a complete path is provided, search $PATH.
12073           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12074 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12075           # Extract the first word of "$tool_basename", so it can be a program name with args.
12076 set dummy $tool_basename; ac_word=$2
12077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12078 $as_echo_n "checking for $ac_word... " >&6; }
12079 if ${ac_cv_path_WC+:} false; then :
12080   $as_echo_n "(cached) " >&6
12081 else
12082   case $WC in
12083   [\\/]* | ?:[\\/]*)
12084   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12085   ;;
12086   *)
12087   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12088 for as_dir in $PATH
12089 do
12090   IFS=$as_save_IFS
12091   test -z "$as_dir" && as_dir=.
12092     for ac_exec_ext in '' $ac_executable_extensions; do
12093   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12094     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12096     break 2
12097   fi
12098 done
12099   done
12100 IFS=$as_save_IFS
12101 
12102   ;;
12103 esac
12104 fi
12105 WC=$ac_cv_path_WC
12106 if test -n "$WC"; then
12107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12108 $as_echo "$WC" >&6; }
12109 else
12110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12111 $as_echo "no" >&6; }
12112 fi
12113 
12114 
12115           if test "x$WC" = x; then
12116             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12117           fi
12118         else
12119           # Otherwise we believe it is a complete path. Use it as it is.
12120           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12121 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12122           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12123 $as_echo_n "checking for WC... " >&6; }
12124           if test ! -x "$tool_specified"; then
12125             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12126 $as_echo "not found" >&6; }
12127             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12128           fi
12129           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12130 $as_echo "$tool_specified" >&6; }
12131         fi
12132       fi
12133     fi
12134 
12135   fi
12136 
12137 
12138 
12139   if test "x$WC" = x; then
12140     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12141   fi
12142 
12143 
12144 
12145 
12146 
12147   # Publish this variable in the help.
12148 
12149 
12150   if [ -z "${WHICH+x}" ]; then
12151     # The variable is not set by user, try to locate tool using the code snippet
12152     for ac_prog in which
12153 do
12154   # Extract the first word of "$ac_prog", so it can be a program name with args.
12155 set dummy $ac_prog; ac_word=$2
12156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12157 $as_echo_n "checking for $ac_word... " >&6; }
12158 if ${ac_cv_path_WHICH+:} false; then :
12159   $as_echo_n "(cached) " >&6
12160 else
12161   case $WHICH in
12162   [\\/]* | ?:[\\/]*)
12163   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12164   ;;
12165   *)
12166   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12167 for as_dir in $PATH
12168 do
12169   IFS=$as_save_IFS
12170   test -z "$as_dir" && as_dir=.
12171     for ac_exec_ext in '' $ac_executable_extensions; do
12172   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12173     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12174     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12175     break 2
12176   fi
12177 done
12178   done
12179 IFS=$as_save_IFS
12180 
12181   ;;
12182 esac
12183 fi
12184 WHICH=$ac_cv_path_WHICH
12185 if test -n "$WHICH"; then
12186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12187 $as_echo "$WHICH" >&6; }
12188 else
12189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12190 $as_echo "no" >&6; }
12191 fi
12192 
12193 
12194   test -n "$WHICH" && break
12195 done
12196 
12197   else
12198     # The variable is set, but is it from the command line or the environment?
12199 
12200     # Try to remove the string !WHICH! from our list.
12201     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12202     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12203       # If it failed, the variable was not from the command line. Ignore it,
12204       # but warn the user (except for BASH, which is always set by the calling BASH).
12205       if test "xWHICH" != xBASH; then
12206         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12207 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12208       fi
12209       # Try to locate tool using the code snippet
12210       for ac_prog in which
12211 do
12212   # Extract the first word of "$ac_prog", so it can be a program name with args.
12213 set dummy $ac_prog; ac_word=$2
12214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12215 $as_echo_n "checking for $ac_word... " >&6; }
12216 if ${ac_cv_path_WHICH+:} false; then :
12217   $as_echo_n "(cached) " >&6
12218 else
12219   case $WHICH in
12220   [\\/]* | ?:[\\/]*)
12221   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12222   ;;
12223   *)
12224   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12225 for as_dir in $PATH
12226 do
12227   IFS=$as_save_IFS
12228   test -z "$as_dir" && as_dir=.
12229     for ac_exec_ext in '' $ac_executable_extensions; do
12230   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12231     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12232     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12233     break 2
12234   fi
12235 done
12236   done
12237 IFS=$as_save_IFS
12238 
12239   ;;
12240 esac
12241 fi
12242 WHICH=$ac_cv_path_WHICH
12243 if test -n "$WHICH"; then
12244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12245 $as_echo "$WHICH" >&6; }
12246 else
12247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12248 $as_echo "no" >&6; }
12249 fi
12250 
12251 
12252   test -n "$WHICH" && break
12253 done
12254 
12255     else
12256       # If it succeeded, then it was overridden by the user. We will use it
12257       # for the tool.
12258 
12259       # First remove it from the list of overridden variables, so we can test
12260       # for unknown variables in the end.
12261       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12262 
12263       # Check if we try to supply an empty value
12264       if test "x$WHICH" = x; then
12265         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12266 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12267         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12268 $as_echo_n "checking for WHICH... " >&6; }
12269         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12270 $as_echo "disabled" >&6; }
12271       else
12272         # Check if the provided tool contains a complete path.
12273         tool_specified="$WHICH"
12274         tool_basename="${tool_specified##*/}"
12275         if test "x$tool_basename" = "x$tool_specified"; then
12276           # A command without a complete path is provided, search $PATH.
12277           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12278 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12279           # Extract the first word of "$tool_basename", so it can be a program name with args.
12280 set dummy $tool_basename; ac_word=$2
12281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12282 $as_echo_n "checking for $ac_word... " >&6; }
12283 if ${ac_cv_path_WHICH+:} false; then :
12284   $as_echo_n "(cached) " >&6
12285 else
12286   case $WHICH in
12287   [\\/]* | ?:[\\/]*)
12288   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12289   ;;
12290   *)
12291   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12292 for as_dir in $PATH
12293 do
12294   IFS=$as_save_IFS
12295   test -z "$as_dir" && as_dir=.
12296     for ac_exec_ext in '' $ac_executable_extensions; do
12297   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12298     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12299     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12300     break 2
12301   fi
12302 done
12303   done
12304 IFS=$as_save_IFS
12305 
12306   ;;
12307 esac
12308 fi
12309 WHICH=$ac_cv_path_WHICH
12310 if test -n "$WHICH"; then
12311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12312 $as_echo "$WHICH" >&6; }
12313 else
12314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12315 $as_echo "no" >&6; }
12316 fi
12317 
12318 
12319           if test "x$WHICH" = x; then
12320             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12321           fi
12322         else
12323           # Otherwise we believe it is a complete path. Use it as it is.
12324           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12325 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12326           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12327 $as_echo_n "checking for WHICH... " >&6; }
12328           if test ! -x "$tool_specified"; then
12329             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12330 $as_echo "not found" >&6; }
12331             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12332           fi
12333           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12334 $as_echo "$tool_specified" >&6; }
12335         fi
12336       fi
12337     fi
12338 
12339   fi
12340 
12341 
12342 
12343   if test "x$WHICH" = x; then
12344     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12345   fi
12346 
12347 
12348 
12349 
12350 
12351   # Publish this variable in the help.
12352 
12353 
12354   if [ -z "${XARGS+x}" ]; then
12355     # The variable is not set by user, try to locate tool using the code snippet
12356     for ac_prog in xargs
12357 do
12358   # Extract the first word of "$ac_prog", so it can be a program name with args.
12359 set dummy $ac_prog; ac_word=$2
12360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12361 $as_echo_n "checking for $ac_word... " >&6; }
12362 if ${ac_cv_path_XARGS+:} false; then :
12363   $as_echo_n "(cached) " >&6
12364 else
12365   case $XARGS in
12366   [\\/]* | ?:[\\/]*)
12367   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12368   ;;
12369   *)
12370   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12371 for as_dir in $PATH
12372 do
12373   IFS=$as_save_IFS
12374   test -z "$as_dir" && as_dir=.
12375     for ac_exec_ext in '' $ac_executable_extensions; do
12376   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12377     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12378     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12379     break 2
12380   fi
12381 done
12382   done
12383 IFS=$as_save_IFS
12384 
12385   ;;
12386 esac
12387 fi
12388 XARGS=$ac_cv_path_XARGS
12389 if test -n "$XARGS"; then
12390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12391 $as_echo "$XARGS" >&6; }
12392 else
12393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12394 $as_echo "no" >&6; }
12395 fi
12396 
12397 
12398   test -n "$XARGS" && break
12399 done
12400 
12401   else
12402     # The variable is set, but is it from the command line or the environment?
12403 
12404     # Try to remove the string !XARGS! from our list.
12405     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12406     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12407       # If it failed, the variable was not from the command line. Ignore it,
12408       # but warn the user (except for BASH, which is always set by the calling BASH).
12409       if test "xXARGS" != xBASH; then
12410         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12411 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12412       fi
12413       # Try to locate tool using the code snippet
12414       for ac_prog in xargs
12415 do
12416   # Extract the first word of "$ac_prog", so it can be a program name with args.
12417 set dummy $ac_prog; ac_word=$2
12418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12419 $as_echo_n "checking for $ac_word... " >&6; }
12420 if ${ac_cv_path_XARGS+:} false; then :
12421   $as_echo_n "(cached) " >&6
12422 else
12423   case $XARGS in
12424   [\\/]* | ?:[\\/]*)
12425   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12426   ;;
12427   *)
12428   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12429 for as_dir in $PATH
12430 do
12431   IFS=$as_save_IFS
12432   test -z "$as_dir" && as_dir=.
12433     for ac_exec_ext in '' $ac_executable_extensions; do
12434   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12435     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12436     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12437     break 2
12438   fi
12439 done
12440   done
12441 IFS=$as_save_IFS
12442 
12443   ;;
12444 esac
12445 fi
12446 XARGS=$ac_cv_path_XARGS
12447 if test -n "$XARGS"; then
12448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12449 $as_echo "$XARGS" >&6; }
12450 else
12451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12452 $as_echo "no" >&6; }
12453 fi
12454 
12455 
12456   test -n "$XARGS" && break
12457 done
12458 
12459     else
12460       # If it succeeded, then it was overridden by the user. We will use it
12461       # for the tool.
12462 
12463       # First remove it from the list of overridden variables, so we can test
12464       # for unknown variables in the end.
12465       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12466 
12467       # Check if we try to supply an empty value
12468       if test "x$XARGS" = x; then
12469         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12470 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12471         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12472 $as_echo_n "checking for XARGS... " >&6; }
12473         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12474 $as_echo "disabled" >&6; }
12475       else
12476         # Check if the provided tool contains a complete path.
12477         tool_specified="$XARGS"
12478         tool_basename="${tool_specified##*/}"
12479         if test "x$tool_basename" = "x$tool_specified"; then
12480           # A command without a complete path is provided, search $PATH.
12481           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12482 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12483           # Extract the first word of "$tool_basename", so it can be a program name with args.
12484 set dummy $tool_basename; ac_word=$2
12485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12486 $as_echo_n "checking for $ac_word... " >&6; }
12487 if ${ac_cv_path_XARGS+:} false; then :
12488   $as_echo_n "(cached) " >&6
12489 else
12490   case $XARGS in
12491   [\\/]* | ?:[\\/]*)
12492   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12493   ;;
12494   *)
12495   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12496 for as_dir in $PATH
12497 do
12498   IFS=$as_save_IFS
12499   test -z "$as_dir" && as_dir=.
12500     for ac_exec_ext in '' $ac_executable_extensions; do
12501   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12502     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12503     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12504     break 2
12505   fi
12506 done
12507   done
12508 IFS=$as_save_IFS
12509 
12510   ;;
12511 esac
12512 fi
12513 XARGS=$ac_cv_path_XARGS
12514 if test -n "$XARGS"; then
12515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12516 $as_echo "$XARGS" >&6; }
12517 else
12518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12519 $as_echo "no" >&6; }
12520 fi
12521 
12522 
12523           if test "x$XARGS" = x; then
12524             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12525           fi
12526         else
12527           # Otherwise we believe it is a complete path. Use it as it is.
12528           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12529 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12530           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12531 $as_echo_n "checking for XARGS... " >&6; }
12532           if test ! -x "$tool_specified"; then
12533             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12534 $as_echo "not found" >&6; }
12535             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12536           fi
12537           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12538 $as_echo "$tool_specified" >&6; }
12539         fi
12540       fi
12541     fi
12542 
12543   fi
12544 
12545 
12546 
12547   if test "x$XARGS" = x; then
12548     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12549   fi
12550 
12551 
12552 
12553   # Then required tools that require some special treatment.
12554 
12555 
12556   # Publish this variable in the help.
12557 
12558 
12559   if [ -z "${AWK+x}" ]; then
12560     # The variable is not set by user, try to locate tool using the code snippet
12561     for ac_prog in gawk mawk nawk awk
12562 do
12563   # Extract the first word of "$ac_prog", so it can be a program name with args.
12564 set dummy $ac_prog; ac_word=$2
12565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12566 $as_echo_n "checking for $ac_word... " >&6; }
12567 if ${ac_cv_prog_AWK+:} false; then :
12568   $as_echo_n "(cached) " >&6
12569 else
12570   if test -n "$AWK"; then
12571   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12572 else
12573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12574 for as_dir in $PATH
12575 do
12576   IFS=$as_save_IFS
12577   test -z "$as_dir" && as_dir=.
12578     for ac_exec_ext in '' $ac_executable_extensions; do
12579   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12580     ac_cv_prog_AWK="$ac_prog"
12581     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12582     break 2
12583   fi
12584 done
12585   done
12586 IFS=$as_save_IFS
12587 
12588 fi
12589 fi
12590 AWK=$ac_cv_prog_AWK
12591 if test -n "$AWK"; then
12592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12593 $as_echo "$AWK" >&6; }
12594 else
12595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12596 $as_echo "no" >&6; }
12597 fi
12598 
12599 
12600   test -n "$AWK" && break
12601 done
12602 
12603   else
12604     # The variable is set, but is it from the command line or the environment?
12605 
12606     # Try to remove the string !AWK! from our list.
12607     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12608     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12609       # If it failed, the variable was not from the command line. Ignore it,
12610       # but warn the user (except for BASH, which is always set by the calling BASH).
12611       if test "xAWK" != xBASH; then
12612         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12613 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12614       fi
12615       # Try to locate tool using the code snippet
12616       for ac_prog in gawk mawk nawk awk
12617 do
12618   # Extract the first word of "$ac_prog", so it can be a program name with args.
12619 set dummy $ac_prog; ac_word=$2
12620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12621 $as_echo_n "checking for $ac_word... " >&6; }
12622 if ${ac_cv_prog_AWK+:} false; then :
12623   $as_echo_n "(cached) " >&6
12624 else
12625   if test -n "$AWK"; then
12626   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12627 else
12628 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12629 for as_dir in $PATH
12630 do
12631   IFS=$as_save_IFS
12632   test -z "$as_dir" && as_dir=.
12633     for ac_exec_ext in '' $ac_executable_extensions; do
12634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12635     ac_cv_prog_AWK="$ac_prog"
12636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12637     break 2
12638   fi
12639 done
12640   done
12641 IFS=$as_save_IFS
12642 
12643 fi
12644 fi
12645 AWK=$ac_cv_prog_AWK
12646 if test -n "$AWK"; then
12647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12648 $as_echo "$AWK" >&6; }
12649 else
12650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12651 $as_echo "no" >&6; }
12652 fi
12653 
12654 
12655   test -n "$AWK" && break
12656 done
12657 
12658     else
12659       # If it succeeded, then it was overridden by the user. We will use it
12660       # for the tool.
12661 
12662       # First remove it from the list of overridden variables, so we can test
12663       # for unknown variables in the end.
12664       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12665 
12666       # Check if we try to supply an empty value
12667       if test "x$AWK" = x; then
12668         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12669 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12670         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12671 $as_echo_n "checking for AWK... " >&6; }
12672         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12673 $as_echo "disabled" >&6; }
12674       else
12675         # Check if the provided tool contains a complete path.
12676         tool_specified="$AWK"
12677         tool_basename="${tool_specified##*/}"
12678         if test "x$tool_basename" = "x$tool_specified"; then
12679           # A command without a complete path is provided, search $PATH.
12680           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12681 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12682           # Extract the first word of "$tool_basename", so it can be a program name with args.
12683 set dummy $tool_basename; ac_word=$2
12684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12685 $as_echo_n "checking for $ac_word... " >&6; }
12686 if ${ac_cv_path_AWK+:} false; then :
12687   $as_echo_n "(cached) " >&6
12688 else
12689   case $AWK in
12690   [\\/]* | ?:[\\/]*)
12691   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12692   ;;
12693   *)
12694   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12695 for as_dir in $PATH
12696 do
12697   IFS=$as_save_IFS
12698   test -z "$as_dir" && as_dir=.
12699     for ac_exec_ext in '' $ac_executable_extensions; do
12700   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12701     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12702     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12703     break 2
12704   fi
12705 done
12706   done
12707 IFS=$as_save_IFS
12708 
12709   ;;
12710 esac
12711 fi
12712 AWK=$ac_cv_path_AWK
12713 if test -n "$AWK"; then
12714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12715 $as_echo "$AWK" >&6; }
12716 else
12717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12718 $as_echo "no" >&6; }
12719 fi
12720 
12721 
12722           if test "x$AWK" = x; then
12723             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12724           fi
12725         else
12726           # Otherwise we believe it is a complete path. Use it as it is.
12727           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12728 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12729           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12730 $as_echo_n "checking for AWK... " >&6; }
12731           if test ! -x "$tool_specified"; then
12732             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12733 $as_echo "not found" >&6; }
12734             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12735           fi
12736           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12737 $as_echo "$tool_specified" >&6; }
12738         fi
12739       fi
12740     fi
12741 
12742   fi
12743 
12744 
12745   if test "x$AWK" = x; then
12746     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12747   fi
12748 
12749 
12750 
12751 
12752   # Publish this variable in the help.
12753 
12754 
12755   if [ -z "${GREP+x}" ]; then
12756     # The variable is not set by user, try to locate tool using the code snippet
12757     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12758 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12759 if ${ac_cv_path_GREP+:} false; then :
12760   $as_echo_n "(cached) " >&6
12761 else
12762   if test -z "$GREP"; then
12763   ac_path_GREP_found=false
12764   # Loop through the user's path and test for each of PROGNAME-LIST
12765   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12766 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12767 do
12768   IFS=$as_save_IFS
12769   test -z "$as_dir" && as_dir=.
12770     for ac_prog in grep ggrep; do
12771     for ac_exec_ext in '' $ac_executable_extensions; do
12772       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12773       as_fn_executable_p "$ac_path_GREP" || continue
12774 # Check for GNU ac_path_GREP and select it if it is found.
12775   # Check for GNU $ac_path_GREP
12776 case `"$ac_path_GREP" --version 2>&1` in
12777 *GNU*)
12778   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12779 *)
12780   ac_count=0
12781   $as_echo_n 0123456789 >"conftest.in"
12782   while :
12783   do
12784     cat "conftest.in" "conftest.in" >"conftest.tmp"
12785     mv "conftest.tmp" "conftest.in"
12786     cp "conftest.in" "conftest.nl"
12787     $as_echo 'GREP' >> "conftest.nl"
12788     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12789     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12790     as_fn_arith $ac_count + 1 && ac_count=$as_val
12791     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12792       # Best one so far, save it but keep looking for a better one
12793       ac_cv_path_GREP="$ac_path_GREP"
12794       ac_path_GREP_max=$ac_count
12795     fi
12796     # 10*(2^10) chars as input seems more than enough
12797     test $ac_count -gt 10 && break
12798   done
12799   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12800 esac
12801 
12802       $ac_path_GREP_found && break 3
12803     done
12804   done
12805   done
12806 IFS=$as_save_IFS
12807   if test -z "$ac_cv_path_GREP"; then
12808     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12809   fi
12810 else
12811   ac_cv_path_GREP=$GREP
12812 fi
12813 
12814 fi
12815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12816 $as_echo "$ac_cv_path_GREP" >&6; }
12817  GREP="$ac_cv_path_GREP"
12818 
12819 
12820   else
12821     # The variable is set, but is it from the command line or the environment?
12822 
12823     # Try to remove the string !GREP! from our list.
12824     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12825     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12826       # If it failed, the variable was not from the command line. Ignore it,
12827       # but warn the user (except for BASH, which is always set by the calling BASH).
12828       if test "xGREP" != xBASH; then
12829         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12830 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12831       fi
12832       # Try to locate tool using the code snippet
12833       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12834 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12835 if ${ac_cv_path_GREP+:} false; then :
12836   $as_echo_n "(cached) " >&6
12837 else
12838   if test -z "$GREP"; then
12839   ac_path_GREP_found=false
12840   # Loop through the user's path and test for each of PROGNAME-LIST
12841   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12842 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12843 do
12844   IFS=$as_save_IFS
12845   test -z "$as_dir" && as_dir=.
12846     for ac_prog in grep ggrep; do
12847     for ac_exec_ext in '' $ac_executable_extensions; do
12848       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12849       as_fn_executable_p "$ac_path_GREP" || continue
12850 # Check for GNU ac_path_GREP and select it if it is found.
12851   # Check for GNU $ac_path_GREP
12852 case `"$ac_path_GREP" --version 2>&1` in
12853 *GNU*)
12854   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12855 *)
12856   ac_count=0
12857   $as_echo_n 0123456789 >"conftest.in"
12858   while :
12859   do
12860     cat "conftest.in" "conftest.in" >"conftest.tmp"
12861     mv "conftest.tmp" "conftest.in"
12862     cp "conftest.in" "conftest.nl"
12863     $as_echo 'GREP' >> "conftest.nl"
12864     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12865     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12866     as_fn_arith $ac_count + 1 && ac_count=$as_val
12867     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12868       # Best one so far, save it but keep looking for a better one
12869       ac_cv_path_GREP="$ac_path_GREP"
12870       ac_path_GREP_max=$ac_count
12871     fi
12872     # 10*(2^10) chars as input seems more than enough
12873     test $ac_count -gt 10 && break
12874   done
12875   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12876 esac
12877 
12878       $ac_path_GREP_found && break 3
12879     done
12880   done
12881   done
12882 IFS=$as_save_IFS
12883   if test -z "$ac_cv_path_GREP"; then
12884     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12885   fi
12886 else
12887   ac_cv_path_GREP=$GREP
12888 fi
12889 
12890 fi
12891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12892 $as_echo "$ac_cv_path_GREP" >&6; }
12893  GREP="$ac_cv_path_GREP"
12894 
12895 
12896     else
12897       # If it succeeded, then it was overridden by the user. We will use it
12898       # for the tool.
12899 
12900       # First remove it from the list of overridden variables, so we can test
12901       # for unknown variables in the end.
12902       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12903 
12904       # Check if we try to supply an empty value
12905       if test "x$GREP" = x; then
12906         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12907 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12908         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12909 $as_echo_n "checking for GREP... " >&6; }
12910         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12911 $as_echo "disabled" >&6; }
12912       else
12913         # Check if the provided tool contains a complete path.
12914         tool_specified="$GREP"
12915         tool_basename="${tool_specified##*/}"
12916         if test "x$tool_basename" = "x$tool_specified"; then
12917           # A command without a complete path is provided, search $PATH.
12918           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12919 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12920           # Extract the first word of "$tool_basename", so it can be a program name with args.
12921 set dummy $tool_basename; ac_word=$2
12922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12923 $as_echo_n "checking for $ac_word... " >&6; }
12924 if ${ac_cv_path_GREP+:} false; then :
12925   $as_echo_n "(cached) " >&6
12926 else
12927   case $GREP in
12928   [\\/]* | ?:[\\/]*)
12929   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12930   ;;
12931   *)
12932   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12933 for as_dir in $PATH
12934 do
12935   IFS=$as_save_IFS
12936   test -z "$as_dir" && as_dir=.
12937     for ac_exec_ext in '' $ac_executable_extensions; do
12938   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12939     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12940     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12941     break 2
12942   fi
12943 done
12944   done
12945 IFS=$as_save_IFS
12946 
12947   ;;
12948 esac
12949 fi
12950 GREP=$ac_cv_path_GREP
12951 if test -n "$GREP"; then
12952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12953 $as_echo "$GREP" >&6; }
12954 else
12955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12956 $as_echo "no" >&6; }
12957 fi
12958 
12959 
12960           if test "x$GREP" = x; then
12961             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12962           fi
12963         else
12964           # Otherwise we believe it is a complete path. Use it as it is.
12965           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12966 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12967           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12968 $as_echo_n "checking for GREP... " >&6; }
12969           if test ! -x "$tool_specified"; then
12970             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12971 $as_echo "not found" >&6; }
12972             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12973           fi
12974           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12975 $as_echo "$tool_specified" >&6; }
12976         fi
12977       fi
12978     fi
12979 
12980   fi
12981 
12982 
12983   if test "x$GREP" = x; then
12984     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12985   fi
12986 
12987 
12988 
12989 
12990   # Publish this variable in the help.
12991 
12992 
12993   if [ -z "${EGREP+x}" ]; then
12994     # The variable is not set by user, try to locate tool using the code snippet
12995     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12996 $as_echo_n "checking for egrep... " >&6; }
12997 if ${ac_cv_path_EGREP+:} false; then :
12998   $as_echo_n "(cached) " >&6
12999 else
13000   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13001    then ac_cv_path_EGREP="$GREP -E"
13002    else
13003      if test -z "$EGREP"; then
13004   ac_path_EGREP_found=false
13005   # Loop through the user's path and test for each of PROGNAME-LIST
13006   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13007 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13008 do
13009   IFS=$as_save_IFS
13010   test -z "$as_dir" && as_dir=.
13011     for ac_prog in egrep; do
13012     for ac_exec_ext in '' $ac_executable_extensions; do
13013       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13014       as_fn_executable_p "$ac_path_EGREP" || continue
13015 # Check for GNU ac_path_EGREP and select it if it is found.
13016   # Check for GNU $ac_path_EGREP
13017 case `"$ac_path_EGREP" --version 2>&1` in
13018 *GNU*)
13019   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13020 *)
13021   ac_count=0
13022   $as_echo_n 0123456789 >"conftest.in"
13023   while :
13024   do
13025     cat "conftest.in" "conftest.in" >"conftest.tmp"
13026     mv "conftest.tmp" "conftest.in"
13027     cp "conftest.in" "conftest.nl"
13028     $as_echo 'EGREP' >> "conftest.nl"
13029     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13030     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13031     as_fn_arith $ac_count + 1 && ac_count=$as_val
13032     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13033       # Best one so far, save it but keep looking for a better one
13034       ac_cv_path_EGREP="$ac_path_EGREP"
13035       ac_path_EGREP_max=$ac_count
13036     fi
13037     # 10*(2^10) chars as input seems more than enough
13038     test $ac_count -gt 10 && break
13039   done
13040   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13041 esac
13042 
13043       $ac_path_EGREP_found && break 3
13044     done
13045   done
13046   done
13047 IFS=$as_save_IFS
13048   if test -z "$ac_cv_path_EGREP"; then
13049     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13050   fi
13051 else
13052   ac_cv_path_EGREP=$EGREP
13053 fi
13054 
13055    fi
13056 fi
13057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13058 $as_echo "$ac_cv_path_EGREP" >&6; }
13059  EGREP="$ac_cv_path_EGREP"
13060 
13061 
13062   else
13063     # The variable is set, but is it from the command line or the environment?
13064 
13065     # Try to remove the string !EGREP! from our list.
13066     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13067     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13068       # If it failed, the variable was not from the command line. Ignore it,
13069       # but warn the user (except for BASH, which is always set by the calling BASH).
13070       if test "xEGREP" != xBASH; then
13071         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13072 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13073       fi
13074       # Try to locate tool using the code snippet
13075       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13076 $as_echo_n "checking for egrep... " >&6; }
13077 if ${ac_cv_path_EGREP+:} false; then :
13078   $as_echo_n "(cached) " >&6
13079 else
13080   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13081    then ac_cv_path_EGREP="$GREP -E"
13082    else
13083      if test -z "$EGREP"; then
13084   ac_path_EGREP_found=false
13085   # Loop through the user's path and test for each of PROGNAME-LIST
13086   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13087 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13088 do
13089   IFS=$as_save_IFS
13090   test -z "$as_dir" && as_dir=.
13091     for ac_prog in egrep; do
13092     for ac_exec_ext in '' $ac_executable_extensions; do
13093       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13094       as_fn_executable_p "$ac_path_EGREP" || continue
13095 # Check for GNU ac_path_EGREP and select it if it is found.
13096   # Check for GNU $ac_path_EGREP
13097 case `"$ac_path_EGREP" --version 2>&1` in
13098 *GNU*)
13099   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13100 *)
13101   ac_count=0
13102   $as_echo_n 0123456789 >"conftest.in"
13103   while :
13104   do
13105     cat "conftest.in" "conftest.in" >"conftest.tmp"
13106     mv "conftest.tmp" "conftest.in"
13107     cp "conftest.in" "conftest.nl"
13108     $as_echo 'EGREP' >> "conftest.nl"
13109     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13110     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13111     as_fn_arith $ac_count + 1 && ac_count=$as_val
13112     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13113       # Best one so far, save it but keep looking for a better one
13114       ac_cv_path_EGREP="$ac_path_EGREP"
13115       ac_path_EGREP_max=$ac_count
13116     fi
13117     # 10*(2^10) chars as input seems more than enough
13118     test $ac_count -gt 10 && break
13119   done
13120   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13121 esac
13122 
13123       $ac_path_EGREP_found && break 3
13124     done
13125   done
13126   done
13127 IFS=$as_save_IFS
13128   if test -z "$ac_cv_path_EGREP"; then
13129     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13130   fi
13131 else
13132   ac_cv_path_EGREP=$EGREP
13133 fi
13134 
13135    fi
13136 fi
13137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13138 $as_echo "$ac_cv_path_EGREP" >&6; }
13139  EGREP="$ac_cv_path_EGREP"
13140 
13141 
13142     else
13143       # If it succeeded, then it was overridden by the user. We will use it
13144       # for the tool.
13145 
13146       # First remove it from the list of overridden variables, so we can test
13147       # for unknown variables in the end.
13148       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13149 
13150       # Check if we try to supply an empty value
13151       if test "x$EGREP" = x; then
13152         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13153 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13154         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13155 $as_echo_n "checking for EGREP... " >&6; }
13156         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13157 $as_echo "disabled" >&6; }
13158       else
13159         # Check if the provided tool contains a complete path.
13160         tool_specified="$EGREP"
13161         tool_basename="${tool_specified##*/}"
13162         if test "x$tool_basename" = "x$tool_specified"; then
13163           # A command without a complete path is provided, search $PATH.
13164           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13165 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13166           # Extract the first word of "$tool_basename", so it can be a program name with args.
13167 set dummy $tool_basename; ac_word=$2
13168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13169 $as_echo_n "checking for $ac_word... " >&6; }
13170 if ${ac_cv_path_EGREP+:} false; then :
13171   $as_echo_n "(cached) " >&6
13172 else
13173   case $EGREP in
13174   [\\/]* | ?:[\\/]*)
13175   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13176   ;;
13177   *)
13178   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13179 for as_dir in $PATH
13180 do
13181   IFS=$as_save_IFS
13182   test -z "$as_dir" && as_dir=.
13183     for ac_exec_ext in '' $ac_executable_extensions; do
13184   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13185     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13186     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13187     break 2
13188   fi
13189 done
13190   done
13191 IFS=$as_save_IFS
13192 
13193   ;;
13194 esac
13195 fi
13196 EGREP=$ac_cv_path_EGREP
13197 if test -n "$EGREP"; then
13198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13199 $as_echo "$EGREP" >&6; }
13200 else
13201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13202 $as_echo "no" >&6; }
13203 fi
13204 
13205 
13206           if test "x$EGREP" = x; then
13207             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13208           fi
13209         else
13210           # Otherwise we believe it is a complete path. Use it as it is.
13211           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13212 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13213           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13214 $as_echo_n "checking for EGREP... " >&6; }
13215           if test ! -x "$tool_specified"; then
13216             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13217 $as_echo "not found" >&6; }
13218             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13219           fi
13220           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13221 $as_echo "$tool_specified" >&6; }
13222         fi
13223       fi
13224     fi
13225 
13226   fi
13227 
13228 
13229   if test "x$EGREP" = x; then
13230     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13231   fi
13232 
13233 
13234 
13235 
13236   # Publish this variable in the help.
13237 
13238 
13239   if [ -z "${FGREP+x}" ]; then
13240     # The variable is not set by user, try to locate tool using the code snippet
13241     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13242 $as_echo_n "checking for fgrep... " >&6; }
13243 if ${ac_cv_path_FGREP+:} false; then :
13244   $as_echo_n "(cached) " >&6
13245 else
13246   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13247    then ac_cv_path_FGREP="$GREP -F"
13248    else
13249      if test -z "$FGREP"; then
13250   ac_path_FGREP_found=false
13251   # Loop through the user's path and test for each of PROGNAME-LIST
13252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13253 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13254 do
13255   IFS=$as_save_IFS
13256   test -z "$as_dir" && as_dir=.
13257     for ac_prog in fgrep; do
13258     for ac_exec_ext in '' $ac_executable_extensions; do
13259       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13260       as_fn_executable_p "$ac_path_FGREP" || continue
13261 # Check for GNU ac_path_FGREP and select it if it is found.
13262   # Check for GNU $ac_path_FGREP
13263 case `"$ac_path_FGREP" --version 2>&1` in
13264 *GNU*)
13265   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13266 *)
13267   ac_count=0
13268   $as_echo_n 0123456789 >"conftest.in"
13269   while :
13270   do
13271     cat "conftest.in" "conftest.in" >"conftest.tmp"
13272     mv "conftest.tmp" "conftest.in"
13273     cp "conftest.in" "conftest.nl"
13274     $as_echo 'FGREP' >> "conftest.nl"
13275     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13276     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13277     as_fn_arith $ac_count + 1 && ac_count=$as_val
13278     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13279       # Best one so far, save it but keep looking for a better one
13280       ac_cv_path_FGREP="$ac_path_FGREP"
13281       ac_path_FGREP_max=$ac_count
13282     fi
13283     # 10*(2^10) chars as input seems more than enough
13284     test $ac_count -gt 10 && break
13285   done
13286   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13287 esac
13288 
13289       $ac_path_FGREP_found && break 3
13290     done
13291   done
13292   done
13293 IFS=$as_save_IFS
13294   if test -z "$ac_cv_path_FGREP"; then
13295     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13296   fi
13297 else
13298   ac_cv_path_FGREP=$FGREP
13299 fi
13300 
13301    fi
13302 fi
13303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13304 $as_echo "$ac_cv_path_FGREP" >&6; }
13305  FGREP="$ac_cv_path_FGREP"
13306 
13307 
13308   else
13309     # The variable is set, but is it from the command line or the environment?
13310 
13311     # Try to remove the string !FGREP! from our list.
13312     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13313     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13314       # If it failed, the variable was not from the command line. Ignore it,
13315       # but warn the user (except for BASH, which is always set by the calling BASH).
13316       if test "xFGREP" != xBASH; then
13317         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13318 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13319       fi
13320       # Try to locate tool using the code snippet
13321       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13322 $as_echo_n "checking for fgrep... " >&6; }
13323 if ${ac_cv_path_FGREP+:} false; then :
13324   $as_echo_n "(cached) " >&6
13325 else
13326   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13327    then ac_cv_path_FGREP="$GREP -F"
13328    else
13329      if test -z "$FGREP"; then
13330   ac_path_FGREP_found=false
13331   # Loop through the user's path and test for each of PROGNAME-LIST
13332   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13333 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13334 do
13335   IFS=$as_save_IFS
13336   test -z "$as_dir" && as_dir=.
13337     for ac_prog in fgrep; do
13338     for ac_exec_ext in '' $ac_executable_extensions; do
13339       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13340       as_fn_executable_p "$ac_path_FGREP" || continue
13341 # Check for GNU ac_path_FGREP and select it if it is found.
13342   # Check for GNU $ac_path_FGREP
13343 case `"$ac_path_FGREP" --version 2>&1` in
13344 *GNU*)
13345   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13346 *)
13347   ac_count=0
13348   $as_echo_n 0123456789 >"conftest.in"
13349   while :
13350   do
13351     cat "conftest.in" "conftest.in" >"conftest.tmp"
13352     mv "conftest.tmp" "conftest.in"
13353     cp "conftest.in" "conftest.nl"
13354     $as_echo 'FGREP' >> "conftest.nl"
13355     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13356     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13357     as_fn_arith $ac_count + 1 && ac_count=$as_val
13358     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13359       # Best one so far, save it but keep looking for a better one
13360       ac_cv_path_FGREP="$ac_path_FGREP"
13361       ac_path_FGREP_max=$ac_count
13362     fi
13363     # 10*(2^10) chars as input seems more than enough
13364     test $ac_count -gt 10 && break
13365   done
13366   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13367 esac
13368 
13369       $ac_path_FGREP_found && break 3
13370     done
13371   done
13372   done
13373 IFS=$as_save_IFS
13374   if test -z "$ac_cv_path_FGREP"; then
13375     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13376   fi
13377 else
13378   ac_cv_path_FGREP=$FGREP
13379 fi
13380 
13381    fi
13382 fi
13383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13384 $as_echo "$ac_cv_path_FGREP" >&6; }
13385  FGREP="$ac_cv_path_FGREP"
13386 
13387 
13388     else
13389       # If it succeeded, then it was overridden by the user. We will use it
13390       # for the tool.
13391 
13392       # First remove it from the list of overridden variables, so we can test
13393       # for unknown variables in the end.
13394       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13395 
13396       # Check if we try to supply an empty value
13397       if test "x$FGREP" = x; then
13398         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13399 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13400         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13401 $as_echo_n "checking for FGREP... " >&6; }
13402         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13403 $as_echo "disabled" >&6; }
13404       else
13405         # Check if the provided tool contains a complete path.
13406         tool_specified="$FGREP"
13407         tool_basename="${tool_specified##*/}"
13408         if test "x$tool_basename" = "x$tool_specified"; then
13409           # A command without a complete path is provided, search $PATH.
13410           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13411 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13412           # Extract the first word of "$tool_basename", so it can be a program name with args.
13413 set dummy $tool_basename; ac_word=$2
13414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13415 $as_echo_n "checking for $ac_word... " >&6; }
13416 if ${ac_cv_path_FGREP+:} false; then :
13417   $as_echo_n "(cached) " >&6
13418 else
13419   case $FGREP in
13420   [\\/]* | ?:[\\/]*)
13421   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13422   ;;
13423   *)
13424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13425 for as_dir in $PATH
13426 do
13427   IFS=$as_save_IFS
13428   test -z "$as_dir" && as_dir=.
13429     for ac_exec_ext in '' $ac_executable_extensions; do
13430   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13431     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13433     break 2
13434   fi
13435 done
13436   done
13437 IFS=$as_save_IFS
13438 
13439   ;;
13440 esac
13441 fi
13442 FGREP=$ac_cv_path_FGREP
13443 if test -n "$FGREP"; then
13444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13445 $as_echo "$FGREP" >&6; }
13446 else
13447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13448 $as_echo "no" >&6; }
13449 fi
13450 
13451 
13452           if test "x$FGREP" = x; then
13453             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13454           fi
13455         else
13456           # Otherwise we believe it is a complete path. Use it as it is.
13457           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13458 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13459           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13460 $as_echo_n "checking for FGREP... " >&6; }
13461           if test ! -x "$tool_specified"; then
13462             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13463 $as_echo "not found" >&6; }
13464             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13465           fi
13466           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13467 $as_echo "$tool_specified" >&6; }
13468         fi
13469       fi
13470     fi
13471 
13472   fi
13473 
13474 
13475   if test "x$FGREP" = x; then
13476     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13477   fi
13478 
13479 
13480 
13481 
13482   # Publish this variable in the help.
13483 
13484 
13485   if [ -z "${SED+x}" ]; then
13486     # The variable is not set by user, try to locate tool using the code snippet
13487     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13488 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13489 if ${ac_cv_path_SED+:} false; then :
13490   $as_echo_n "(cached) " >&6
13491 else
13492             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13493      for ac_i in 1 2 3 4 5 6 7; do
13494        ac_script="$ac_script$as_nl$ac_script"
13495      done
13496      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13497      { ac_script=; unset ac_script;}
13498      if test -z "$SED"; then
13499   ac_path_SED_found=false
13500   # Loop through the user's path and test for each of PROGNAME-LIST
13501   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13502 for as_dir in $PATH
13503 do
13504   IFS=$as_save_IFS
13505   test -z "$as_dir" && as_dir=.
13506     for ac_prog in sed gsed; do
13507     for ac_exec_ext in '' $ac_executable_extensions; do
13508       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13509       as_fn_executable_p "$ac_path_SED" || continue
13510 # Check for GNU ac_path_SED and select it if it is found.
13511   # Check for GNU $ac_path_SED
13512 case `"$ac_path_SED" --version 2>&1` in
13513 *GNU*)
13514   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13515 *)
13516   ac_count=0
13517   $as_echo_n 0123456789 >"conftest.in"
13518   while :
13519   do
13520     cat "conftest.in" "conftest.in" >"conftest.tmp"
13521     mv "conftest.tmp" "conftest.in"
13522     cp "conftest.in" "conftest.nl"
13523     $as_echo '' >> "conftest.nl"
13524     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13525     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13526     as_fn_arith $ac_count + 1 && ac_count=$as_val
13527     if test $ac_count -gt ${ac_path_SED_max-0}; then
13528       # Best one so far, save it but keep looking for a better one
13529       ac_cv_path_SED="$ac_path_SED"
13530       ac_path_SED_max=$ac_count
13531     fi
13532     # 10*(2^10) chars as input seems more than enough
13533     test $ac_count -gt 10 && break
13534   done
13535   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13536 esac
13537 
13538       $ac_path_SED_found && break 3
13539     done
13540   done
13541   done
13542 IFS=$as_save_IFS
13543   if test -z "$ac_cv_path_SED"; then
13544     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13545   fi
13546 else
13547   ac_cv_path_SED=$SED
13548 fi
13549 
13550 fi
13551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13552 $as_echo "$ac_cv_path_SED" >&6; }
13553  SED="$ac_cv_path_SED"
13554   rm -f conftest.sed
13555 
13556   else
13557     # The variable is set, but is it from the command line or the environment?
13558 
13559     # Try to remove the string !SED! from our list.
13560     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13561     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13562       # If it failed, the variable was not from the command line. Ignore it,
13563       # but warn the user (except for BASH, which is always set by the calling BASH).
13564       if test "xSED" != xBASH; then
13565         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13566 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13567       fi
13568       # Try to locate tool using the code snippet
13569       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13570 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13571 if ${ac_cv_path_SED+:} false; then :
13572   $as_echo_n "(cached) " >&6
13573 else
13574             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13575      for ac_i in 1 2 3 4 5 6 7; do
13576        ac_script="$ac_script$as_nl$ac_script"
13577      done
13578      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13579      { ac_script=; unset ac_script;}
13580      if test -z "$SED"; then
13581   ac_path_SED_found=false
13582   # Loop through the user's path and test for each of PROGNAME-LIST
13583   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13584 for as_dir in $PATH
13585 do
13586   IFS=$as_save_IFS
13587   test -z "$as_dir" && as_dir=.
13588     for ac_prog in sed gsed; do
13589     for ac_exec_ext in '' $ac_executable_extensions; do
13590       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13591       as_fn_executable_p "$ac_path_SED" || continue
13592 # Check for GNU ac_path_SED and select it if it is found.
13593   # Check for GNU $ac_path_SED
13594 case `"$ac_path_SED" --version 2>&1` in
13595 *GNU*)
13596   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13597 *)
13598   ac_count=0
13599   $as_echo_n 0123456789 >"conftest.in"
13600   while :
13601   do
13602     cat "conftest.in" "conftest.in" >"conftest.tmp"
13603     mv "conftest.tmp" "conftest.in"
13604     cp "conftest.in" "conftest.nl"
13605     $as_echo '' >> "conftest.nl"
13606     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13607     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13608     as_fn_arith $ac_count + 1 && ac_count=$as_val
13609     if test $ac_count -gt ${ac_path_SED_max-0}; then
13610       # Best one so far, save it but keep looking for a better one
13611       ac_cv_path_SED="$ac_path_SED"
13612       ac_path_SED_max=$ac_count
13613     fi
13614     # 10*(2^10) chars as input seems more than enough
13615     test $ac_count -gt 10 && break
13616   done
13617   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13618 esac
13619 
13620       $ac_path_SED_found && break 3
13621     done
13622   done
13623   done
13624 IFS=$as_save_IFS
13625   if test -z "$ac_cv_path_SED"; then
13626     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13627   fi
13628 else
13629   ac_cv_path_SED=$SED
13630 fi
13631 
13632 fi
13633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13634 $as_echo "$ac_cv_path_SED" >&6; }
13635  SED="$ac_cv_path_SED"
13636   rm -f conftest.sed
13637 
13638     else
13639       # If it succeeded, then it was overridden by the user. We will use it
13640       # for the tool.
13641 
13642       # First remove it from the list of overridden variables, so we can test
13643       # for unknown variables in the end.
13644       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13645 
13646       # Check if we try to supply an empty value
13647       if test "x$SED" = x; then
13648         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13649 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13650         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13651 $as_echo_n "checking for SED... " >&6; }
13652         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13653 $as_echo "disabled" >&6; }
13654       else
13655         # Check if the provided tool contains a complete path.
13656         tool_specified="$SED"
13657         tool_basename="${tool_specified##*/}"
13658         if test "x$tool_basename" = "x$tool_specified"; then
13659           # A command without a complete path is provided, search $PATH.
13660           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13661 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13662           # Extract the first word of "$tool_basename", so it can be a program name with args.
13663 set dummy $tool_basename; ac_word=$2
13664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13665 $as_echo_n "checking for $ac_word... " >&6; }
13666 if ${ac_cv_path_SED+:} false; then :
13667   $as_echo_n "(cached) " >&6
13668 else
13669   case $SED in
13670   [\\/]* | ?:[\\/]*)
13671   ac_cv_path_SED="$SED" # Let the user override the test with a path.
13672   ;;
13673   *)
13674   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13675 for as_dir in $PATH
13676 do
13677   IFS=$as_save_IFS
13678   test -z "$as_dir" && as_dir=.
13679     for ac_exec_ext in '' $ac_executable_extensions; do
13680   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13681     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13682     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13683     break 2
13684   fi
13685 done
13686   done
13687 IFS=$as_save_IFS
13688 
13689   ;;
13690 esac
13691 fi
13692 SED=$ac_cv_path_SED
13693 if test -n "$SED"; then
13694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13695 $as_echo "$SED" >&6; }
13696 else
13697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13698 $as_echo "no" >&6; }
13699 fi
13700 
13701 
13702           if test "x$SED" = x; then
13703             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13704           fi
13705         else
13706           # Otherwise we believe it is a complete path. Use it as it is.
13707           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13708 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13709           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13710 $as_echo_n "checking for SED... " >&6; }
13711           if test ! -x "$tool_specified"; then
13712             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13713 $as_echo "not found" >&6; }
13714             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13715           fi
13716           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13717 $as_echo "$tool_specified" >&6; }
13718         fi
13719       fi
13720     fi
13721 
13722   fi
13723 
13724 
13725   if test "x$SED" = x; then
13726     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13727   fi
13728 
13729 
13730 
13731   # Always force rm.
13732   RM="$RM -f"
13733 
13734   # pwd behaves differently on various platforms and some don't support the -L flag.
13735   # Always use the bash builtin pwd to get uniform behavior.
13736   THEPWDCMD=pwd
13737 
13738   # These are not required on all platforms
13739 
13740 
13741   # Publish this variable in the help.
13742 
13743 
13744   if [ -z "${CYGPATH+x}" ]; then
13745     # The variable is not set by user, try to locate tool using the code snippet
13746     for ac_prog in cygpath
13747 do
13748   # Extract the first word of "$ac_prog", so it can be a program name with args.
13749 set dummy $ac_prog; 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_CYGPATH+:} false; then :
13753   $as_echo_n "(cached) " >&6
13754 else
13755   case $CYGPATH in
13756   [\\/]* | ?:[\\/]*)
13757   ac_cv_path_CYGPATH="$CYGPATH" # 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_CYGPATH="$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 CYGPATH=$ac_cv_path_CYGPATH
13779 if test -n "$CYGPATH"; then
13780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13781 $as_echo "$CYGPATH" >&6; }
13782 else
13783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13784 $as_echo "no" >&6; }
13785 fi
13786 
13787 
13788   test -n "$CYGPATH" && break
13789 done
13790 
13791   else
13792     # The variable is set, but is it from the command line or the environment?
13793 
13794     # Try to remove the string !CYGPATH! from our list.
13795     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13796     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13797       # If it failed, the variable was not from the command line. Ignore it,
13798       # but warn the user (except for BASH, which is always set by the calling BASH).
13799       if test "xCYGPATH" != xBASH; then
13800         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13801 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13802       fi
13803       # Try to locate tool using the code snippet
13804       for ac_prog in cygpath
13805 do
13806   # Extract the first word of "$ac_prog", so it can be a program name with args.
13807 set dummy $ac_prog; ac_word=$2
13808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13809 $as_echo_n "checking for $ac_word... " >&6; }
13810 if ${ac_cv_path_CYGPATH+:} false; then :
13811   $as_echo_n "(cached) " >&6
13812 else
13813   case $CYGPATH in
13814   [\\/]* | ?:[\\/]*)
13815   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13816   ;;
13817   *)
13818   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13819 for as_dir in $PATH
13820 do
13821   IFS=$as_save_IFS
13822   test -z "$as_dir" && as_dir=.
13823     for ac_exec_ext in '' $ac_executable_extensions; do
13824   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13825     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13826     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13827     break 2
13828   fi
13829 done
13830   done
13831 IFS=$as_save_IFS
13832 
13833   ;;
13834 esac
13835 fi
13836 CYGPATH=$ac_cv_path_CYGPATH
13837 if test -n "$CYGPATH"; then
13838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13839 $as_echo "$CYGPATH" >&6; }
13840 else
13841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13842 $as_echo "no" >&6; }
13843 fi
13844 
13845 
13846   test -n "$CYGPATH" && break
13847 done
13848 
13849     else
13850       # If it succeeded, then it was overridden by the user. We will use it
13851       # for the tool.
13852 
13853       # First remove it from the list of overridden variables, so we can test
13854       # for unknown variables in the end.
13855       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13856 
13857       # Check if we try to supply an empty value
13858       if test "x$CYGPATH" = x; then
13859         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13860 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13861         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13862 $as_echo_n "checking for CYGPATH... " >&6; }
13863         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13864 $as_echo "disabled" >&6; }
13865       else
13866         # Check if the provided tool contains a complete path.
13867         tool_specified="$CYGPATH"
13868         tool_basename="${tool_specified##*/}"
13869         if test "x$tool_basename" = "x$tool_specified"; then
13870           # A command without a complete path is provided, search $PATH.
13871           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13872 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13873           # Extract the first word of "$tool_basename", so it can be a program name with args.
13874 set dummy $tool_basename; ac_word=$2
13875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13876 $as_echo_n "checking for $ac_word... " >&6; }
13877 if ${ac_cv_path_CYGPATH+:} false; then :
13878   $as_echo_n "(cached) " >&6
13879 else
13880   case $CYGPATH in
13881   [\\/]* | ?:[\\/]*)
13882   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13883   ;;
13884   *)
13885   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13886 for as_dir in $PATH
13887 do
13888   IFS=$as_save_IFS
13889   test -z "$as_dir" && as_dir=.
13890     for ac_exec_ext in '' $ac_executable_extensions; do
13891   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13892     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13893     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13894     break 2
13895   fi
13896 done
13897   done
13898 IFS=$as_save_IFS
13899 
13900   ;;
13901 esac
13902 fi
13903 CYGPATH=$ac_cv_path_CYGPATH
13904 if test -n "$CYGPATH"; then
13905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13906 $as_echo "$CYGPATH" >&6; }
13907 else
13908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13909 $as_echo "no" >&6; }
13910 fi
13911 
13912 
13913           if test "x$CYGPATH" = x; then
13914             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13915           fi
13916         else
13917           # Otherwise we believe it is a complete path. Use it as it is.
13918           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13919 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13920           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13921 $as_echo_n "checking for CYGPATH... " >&6; }
13922           if test ! -x "$tool_specified"; then
13923             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13924 $as_echo "not found" >&6; }
13925             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13926           fi
13927           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13928 $as_echo "$tool_specified" >&6; }
13929         fi
13930       fi
13931     fi
13932 
13933   fi
13934 
13935 
13936 
13937 
13938   # Publish this variable in the help.
13939 
13940 
13941   if [ -z "${READLINK+x}" ]; then
13942     # The variable is not set by user, try to locate tool using the code snippet
13943     for ac_prog in greadlink readlink
13944 do
13945   # Extract the first word of "$ac_prog", so it can be a program name with args.
13946 set dummy $ac_prog; ac_word=$2
13947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13948 $as_echo_n "checking for $ac_word... " >&6; }
13949 if ${ac_cv_path_READLINK+:} false; then :
13950   $as_echo_n "(cached) " >&6
13951 else
13952   case $READLINK in
13953   [\\/]* | ?:[\\/]*)
13954   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13955   ;;
13956   *)
13957   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13958 for as_dir in $PATH
13959 do
13960   IFS=$as_save_IFS
13961   test -z "$as_dir" && as_dir=.
13962     for ac_exec_ext in '' $ac_executable_extensions; do
13963   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13964     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13965     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13966     break 2
13967   fi
13968 done
13969   done
13970 IFS=$as_save_IFS
13971 
13972   ;;
13973 esac
13974 fi
13975 READLINK=$ac_cv_path_READLINK
13976 if test -n "$READLINK"; then
13977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13978 $as_echo "$READLINK" >&6; }
13979 else
13980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13981 $as_echo "no" >&6; }
13982 fi
13983 
13984 
13985   test -n "$READLINK" && break
13986 done
13987 
13988   else
13989     # The variable is set, but is it from the command line or the environment?
13990 
13991     # Try to remove the string !READLINK! from our list.
13992     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13993     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13994       # If it failed, the variable was not from the command line. Ignore it,
13995       # but warn the user (except for BASH, which is always set by the calling BASH).
13996       if test "xREADLINK" != xBASH; then
13997         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13998 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13999       fi
14000       # Try to locate tool using the code snippet
14001       for ac_prog in greadlink readlink
14002 do
14003   # Extract the first word of "$ac_prog", so it can be a program name with args.
14004 set dummy $ac_prog; ac_word=$2
14005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14006 $as_echo_n "checking for $ac_word... " >&6; }
14007 if ${ac_cv_path_READLINK+:} false; then :
14008   $as_echo_n "(cached) " >&6
14009 else
14010   case $READLINK in
14011   [\\/]* | ?:[\\/]*)
14012   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14013   ;;
14014   *)
14015   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14016 for as_dir in $PATH
14017 do
14018   IFS=$as_save_IFS
14019   test -z "$as_dir" && as_dir=.
14020     for ac_exec_ext in '' $ac_executable_extensions; do
14021   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14022     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14024     break 2
14025   fi
14026 done
14027   done
14028 IFS=$as_save_IFS
14029 
14030   ;;
14031 esac
14032 fi
14033 READLINK=$ac_cv_path_READLINK
14034 if test -n "$READLINK"; then
14035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14036 $as_echo "$READLINK" >&6; }
14037 else
14038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14039 $as_echo "no" >&6; }
14040 fi
14041 
14042 
14043   test -n "$READLINK" && break
14044 done
14045 
14046     else
14047       # If it succeeded, then it was overridden by the user. We will use it
14048       # for the tool.
14049 
14050       # First remove it from the list of overridden variables, so we can test
14051       # for unknown variables in the end.
14052       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14053 
14054       # Check if we try to supply an empty value
14055       if test "x$READLINK" = x; then
14056         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14057 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14058         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14059 $as_echo_n "checking for READLINK... " >&6; }
14060         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14061 $as_echo "disabled" >&6; }
14062       else
14063         # Check if the provided tool contains a complete path.
14064         tool_specified="$READLINK"
14065         tool_basename="${tool_specified##*/}"
14066         if test "x$tool_basename" = "x$tool_specified"; then
14067           # A command without a complete path is provided, search $PATH.
14068           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14069 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14070           # Extract the first word of "$tool_basename", so it can be a program name with args.
14071 set dummy $tool_basename; ac_word=$2
14072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14073 $as_echo_n "checking for $ac_word... " >&6; }
14074 if ${ac_cv_path_READLINK+:} false; then :
14075   $as_echo_n "(cached) " >&6
14076 else
14077   case $READLINK in
14078   [\\/]* | ?:[\\/]*)
14079   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14080   ;;
14081   *)
14082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14083 for as_dir in $PATH
14084 do
14085   IFS=$as_save_IFS
14086   test -z "$as_dir" && as_dir=.
14087     for ac_exec_ext in '' $ac_executable_extensions; do
14088   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14089     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14090     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14091     break 2
14092   fi
14093 done
14094   done
14095 IFS=$as_save_IFS
14096 
14097   ;;
14098 esac
14099 fi
14100 READLINK=$ac_cv_path_READLINK
14101 if test -n "$READLINK"; then
14102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14103 $as_echo "$READLINK" >&6; }
14104 else
14105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14106 $as_echo "no" >&6; }
14107 fi
14108 
14109 
14110           if test "x$READLINK" = x; then
14111             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14112           fi
14113         else
14114           # Otherwise we believe it is a complete path. Use it as it is.
14115           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14116 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14117           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14118 $as_echo_n "checking for READLINK... " >&6; }
14119           if test ! -x "$tool_specified"; then
14120             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14121 $as_echo "not found" >&6; }
14122             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14123           fi
14124           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14125 $as_echo "$tool_specified" >&6; }
14126         fi
14127       fi
14128     fi
14129 
14130   fi
14131 
14132 
14133 
14134 
14135   # Publish this variable in the help.
14136 
14137 
14138   if [ -z "${DF+x}" ]; then
14139     # The variable is not set by user, try to locate tool using the code snippet
14140     for ac_prog in df
14141 do
14142   # Extract the first word of "$ac_prog", so it can be a program name with args.
14143 set dummy $ac_prog; ac_word=$2
14144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14145 $as_echo_n "checking for $ac_word... " >&6; }
14146 if ${ac_cv_path_DF+:} false; then :
14147   $as_echo_n "(cached) " >&6
14148 else
14149   case $DF in
14150   [\\/]* | ?:[\\/]*)
14151   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14152   ;;
14153   *)
14154   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14155 for as_dir in $PATH
14156 do
14157   IFS=$as_save_IFS
14158   test -z "$as_dir" && as_dir=.
14159     for ac_exec_ext in '' $ac_executable_extensions; do
14160   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14161     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14162     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14163     break 2
14164   fi
14165 done
14166   done
14167 IFS=$as_save_IFS
14168 
14169   ;;
14170 esac
14171 fi
14172 DF=$ac_cv_path_DF
14173 if test -n "$DF"; then
14174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14175 $as_echo "$DF" >&6; }
14176 else
14177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14178 $as_echo "no" >&6; }
14179 fi
14180 
14181 
14182   test -n "$DF" && break
14183 done
14184 
14185   else
14186     # The variable is set, but is it from the command line or the environment?
14187 
14188     # Try to remove the string !DF! from our list.
14189     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14190     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14191       # If it failed, the variable was not from the command line. Ignore it,
14192       # but warn the user (except for BASH, which is always set by the calling BASH).
14193       if test "xDF" != xBASH; then
14194         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14195 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14196       fi
14197       # Try to locate tool using the code snippet
14198       for ac_prog in df
14199 do
14200   # Extract the first word of "$ac_prog", so it can be a program name with args.
14201 set dummy $ac_prog; ac_word=$2
14202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14203 $as_echo_n "checking for $ac_word... " >&6; }
14204 if ${ac_cv_path_DF+:} false; then :
14205   $as_echo_n "(cached) " >&6
14206 else
14207   case $DF in
14208   [\\/]* | ?:[\\/]*)
14209   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14210   ;;
14211   *)
14212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14213 for as_dir in $PATH
14214 do
14215   IFS=$as_save_IFS
14216   test -z "$as_dir" && as_dir=.
14217     for ac_exec_ext in '' $ac_executable_extensions; do
14218   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14219     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14220     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14221     break 2
14222   fi
14223 done
14224   done
14225 IFS=$as_save_IFS
14226 
14227   ;;
14228 esac
14229 fi
14230 DF=$ac_cv_path_DF
14231 if test -n "$DF"; then
14232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14233 $as_echo "$DF" >&6; }
14234 else
14235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14236 $as_echo "no" >&6; }
14237 fi
14238 
14239 
14240   test -n "$DF" && break
14241 done
14242 
14243     else
14244       # If it succeeded, then it was overridden by the user. We will use it
14245       # for the tool.
14246 
14247       # First remove it from the list of overridden variables, so we can test
14248       # for unknown variables in the end.
14249       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14250 
14251       # Check if we try to supply an empty value
14252       if test "x$DF" = x; then
14253         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14254 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14255         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14256 $as_echo_n "checking for DF... " >&6; }
14257         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14258 $as_echo "disabled" >&6; }
14259       else
14260         # Check if the provided tool contains a complete path.
14261         tool_specified="$DF"
14262         tool_basename="${tool_specified##*/}"
14263         if test "x$tool_basename" = "x$tool_specified"; then
14264           # A command without a complete path is provided, search $PATH.
14265           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14266 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14267           # Extract the first word of "$tool_basename", so it can be a program name with args.
14268 set dummy $tool_basename; ac_word=$2
14269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14270 $as_echo_n "checking for $ac_word... " >&6; }
14271 if ${ac_cv_path_DF+:} false; then :
14272   $as_echo_n "(cached) " >&6
14273 else
14274   case $DF in
14275   [\\/]* | ?:[\\/]*)
14276   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14277   ;;
14278   *)
14279   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14280 for as_dir in $PATH
14281 do
14282   IFS=$as_save_IFS
14283   test -z "$as_dir" && as_dir=.
14284     for ac_exec_ext in '' $ac_executable_extensions; do
14285   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14286     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14287     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14288     break 2
14289   fi
14290 done
14291   done
14292 IFS=$as_save_IFS
14293 
14294   ;;
14295 esac
14296 fi
14297 DF=$ac_cv_path_DF
14298 if test -n "$DF"; then
14299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14300 $as_echo "$DF" >&6; }
14301 else
14302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14303 $as_echo "no" >&6; }
14304 fi
14305 
14306 
14307           if test "x$DF" = x; then
14308             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14309           fi
14310         else
14311           # Otherwise we believe it is a complete path. Use it as it is.
14312           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14313 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14314           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14315 $as_echo_n "checking for DF... " >&6; }
14316           if test ! -x "$tool_specified"; then
14317             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14318 $as_echo "not found" >&6; }
14319             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14320           fi
14321           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14322 $as_echo "$tool_specified" >&6; }
14323         fi
14324       fi
14325     fi
14326 
14327   fi
14328 
14329 
14330 
14331 
14332   # Publish this variable in the help.
14333 
14334 
14335   if [ -z "${CPIO+x}" ]; then
14336     # The variable is not set by user, try to locate tool using the code snippet
14337     for ac_prog in cpio bsdcpio
14338 do
14339   # Extract the first word of "$ac_prog", so it can be a program name with args.
14340 set dummy $ac_prog; ac_word=$2
14341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14342 $as_echo_n "checking for $ac_word... " >&6; }
14343 if ${ac_cv_path_CPIO+:} false; then :
14344   $as_echo_n "(cached) " >&6
14345 else
14346   case $CPIO in
14347   [\\/]* | ?:[\\/]*)
14348   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14349   ;;
14350   *)
14351   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14352 for as_dir in $PATH
14353 do
14354   IFS=$as_save_IFS
14355   test -z "$as_dir" && as_dir=.
14356     for ac_exec_ext in '' $ac_executable_extensions; do
14357   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14358     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14359     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14360     break 2
14361   fi
14362 done
14363   done
14364 IFS=$as_save_IFS
14365 
14366   ;;
14367 esac
14368 fi
14369 CPIO=$ac_cv_path_CPIO
14370 if test -n "$CPIO"; then
14371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14372 $as_echo "$CPIO" >&6; }
14373 else
14374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14375 $as_echo "no" >&6; }
14376 fi
14377 
14378 
14379   test -n "$CPIO" && break
14380 done
14381 
14382   else
14383     # The variable is set, but is it from the command line or the environment?
14384 
14385     # Try to remove the string !CPIO! from our list.
14386     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14387     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14388       # If it failed, the variable was not from the command line. Ignore it,
14389       # but warn the user (except for BASH, which is always set by the calling BASH).
14390       if test "xCPIO" != xBASH; then
14391         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14392 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14393       fi
14394       # Try to locate tool using the code snippet
14395       for ac_prog in cpio bsdcpio
14396 do
14397   # Extract the first word of "$ac_prog", so it can be a program name with args.
14398 set dummy $ac_prog; ac_word=$2
14399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14400 $as_echo_n "checking for $ac_word... " >&6; }
14401 if ${ac_cv_path_CPIO+:} false; then :
14402   $as_echo_n "(cached) " >&6
14403 else
14404   case $CPIO in
14405   [\\/]* | ?:[\\/]*)
14406   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14407   ;;
14408   *)
14409   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14410 for as_dir in $PATH
14411 do
14412   IFS=$as_save_IFS
14413   test -z "$as_dir" && as_dir=.
14414     for ac_exec_ext in '' $ac_executable_extensions; do
14415   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14416     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14417     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14418     break 2
14419   fi
14420 done
14421   done
14422 IFS=$as_save_IFS
14423 
14424   ;;
14425 esac
14426 fi
14427 CPIO=$ac_cv_path_CPIO
14428 if test -n "$CPIO"; then
14429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14430 $as_echo "$CPIO" >&6; }
14431 else
14432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14433 $as_echo "no" >&6; }
14434 fi
14435 
14436 
14437   test -n "$CPIO" && break
14438 done
14439 
14440     else
14441       # If it succeeded, then it was overridden by the user. We will use it
14442       # for the tool.
14443 
14444       # First remove it from the list of overridden variables, so we can test
14445       # for unknown variables in the end.
14446       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14447 
14448       # Check if we try to supply an empty value
14449       if test "x$CPIO" = x; then
14450         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14451 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14452         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14453 $as_echo_n "checking for CPIO... " >&6; }
14454         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14455 $as_echo "disabled" >&6; }
14456       else
14457         # Check if the provided tool contains a complete path.
14458         tool_specified="$CPIO"
14459         tool_basename="${tool_specified##*/}"
14460         if test "x$tool_basename" = "x$tool_specified"; then
14461           # A command without a complete path is provided, search $PATH.
14462           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14463 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14464           # Extract the first word of "$tool_basename", so it can be a program name with args.
14465 set dummy $tool_basename; ac_word=$2
14466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14467 $as_echo_n "checking for $ac_word... " >&6; }
14468 if ${ac_cv_path_CPIO+:} false; then :
14469   $as_echo_n "(cached) " >&6
14470 else
14471   case $CPIO in
14472   [\\/]* | ?:[\\/]*)
14473   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14474   ;;
14475   *)
14476   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14477 for as_dir in $PATH
14478 do
14479   IFS=$as_save_IFS
14480   test -z "$as_dir" && as_dir=.
14481     for ac_exec_ext in '' $ac_executable_extensions; do
14482   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14483     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14484     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14485     break 2
14486   fi
14487 done
14488   done
14489 IFS=$as_save_IFS
14490 
14491   ;;
14492 esac
14493 fi
14494 CPIO=$ac_cv_path_CPIO
14495 if test -n "$CPIO"; then
14496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14497 $as_echo "$CPIO" >&6; }
14498 else
14499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14500 $as_echo "no" >&6; }
14501 fi
14502 
14503 
14504           if test "x$CPIO" = x; then
14505             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14506           fi
14507         else
14508           # Otherwise we believe it is a complete path. Use it as it is.
14509           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14510 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14511           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14512 $as_echo_n "checking for CPIO... " >&6; }
14513           if test ! -x "$tool_specified"; then
14514             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14515 $as_echo "not found" >&6; }
14516             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14517           fi
14518           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14519 $as_echo "$tool_specified" >&6; }
14520         fi
14521       fi
14522     fi
14523 
14524   fi
14525 
14526 
14527 
14528 
14529   # Publish this variable in the help.
14530 
14531 
14532   if [ -z "${NICE+x}" ]; then
14533     # The variable is not set by user, try to locate tool using the code snippet
14534     for ac_prog in nice
14535 do
14536   # Extract the first word of "$ac_prog", so it can be a program name with args.
14537 set dummy $ac_prog; ac_word=$2
14538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14539 $as_echo_n "checking for $ac_word... " >&6; }
14540 if ${ac_cv_path_NICE+:} false; then :
14541   $as_echo_n "(cached) " >&6
14542 else
14543   case $NICE in
14544   [\\/]* | ?:[\\/]*)
14545   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14546   ;;
14547   *)
14548   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14549 for as_dir in $PATH
14550 do
14551   IFS=$as_save_IFS
14552   test -z "$as_dir" && as_dir=.
14553     for ac_exec_ext in '' $ac_executable_extensions; do
14554   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14555     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14556     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14557     break 2
14558   fi
14559 done
14560   done
14561 IFS=$as_save_IFS
14562 
14563   ;;
14564 esac
14565 fi
14566 NICE=$ac_cv_path_NICE
14567 if test -n "$NICE"; then
14568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14569 $as_echo "$NICE" >&6; }
14570 else
14571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14572 $as_echo "no" >&6; }
14573 fi
14574 
14575 
14576   test -n "$NICE" && break
14577 done
14578 
14579   else
14580     # The variable is set, but is it from the command line or the environment?
14581 
14582     # Try to remove the string !NICE! from our list.
14583     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14584     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14585       # If it failed, the variable was not from the command line. Ignore it,
14586       # but warn the user (except for BASH, which is always set by the calling BASH).
14587       if test "xNICE" != xBASH; then
14588         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14589 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14590       fi
14591       # Try to locate tool using the code snippet
14592       for ac_prog in nice
14593 do
14594   # Extract the first word of "$ac_prog", so it can be a program name with args.
14595 set dummy $ac_prog; ac_word=$2
14596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14597 $as_echo_n "checking for $ac_word... " >&6; }
14598 if ${ac_cv_path_NICE+:} false; then :
14599   $as_echo_n "(cached) " >&6
14600 else
14601   case $NICE in
14602   [\\/]* | ?:[\\/]*)
14603   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14604   ;;
14605   *)
14606   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14607 for as_dir in $PATH
14608 do
14609   IFS=$as_save_IFS
14610   test -z "$as_dir" && as_dir=.
14611     for ac_exec_ext in '' $ac_executable_extensions; do
14612   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14613     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14615     break 2
14616   fi
14617 done
14618   done
14619 IFS=$as_save_IFS
14620 
14621   ;;
14622 esac
14623 fi
14624 NICE=$ac_cv_path_NICE
14625 if test -n "$NICE"; then
14626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14627 $as_echo "$NICE" >&6; }
14628 else
14629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14630 $as_echo "no" >&6; }
14631 fi
14632 
14633 
14634   test -n "$NICE" && break
14635 done
14636 
14637     else
14638       # If it succeeded, then it was overridden by the user. We will use it
14639       # for the tool.
14640 
14641       # First remove it from the list of overridden variables, so we can test
14642       # for unknown variables in the end.
14643       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14644 
14645       # Check if we try to supply an empty value
14646       if test "x$NICE" = x; then
14647         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14648 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14649         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14650 $as_echo_n "checking for NICE... " >&6; }
14651         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14652 $as_echo "disabled" >&6; }
14653       else
14654         # Check if the provided tool contains a complete path.
14655         tool_specified="$NICE"
14656         tool_basename="${tool_specified##*/}"
14657         if test "x$tool_basename" = "x$tool_specified"; then
14658           # A command without a complete path is provided, search $PATH.
14659           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14660 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14661           # Extract the first word of "$tool_basename", so it can be a program name with args.
14662 set dummy $tool_basename; ac_word=$2
14663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14664 $as_echo_n "checking for $ac_word... " >&6; }
14665 if ${ac_cv_path_NICE+:} false; then :
14666   $as_echo_n "(cached) " >&6
14667 else
14668   case $NICE in
14669   [\\/]* | ?:[\\/]*)
14670   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14671   ;;
14672   *)
14673   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14674 for as_dir in $PATH
14675 do
14676   IFS=$as_save_IFS
14677   test -z "$as_dir" && as_dir=.
14678     for ac_exec_ext in '' $ac_executable_extensions; do
14679   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14680     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14681     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14682     break 2
14683   fi
14684 done
14685   done
14686 IFS=$as_save_IFS
14687 
14688   ;;
14689 esac
14690 fi
14691 NICE=$ac_cv_path_NICE
14692 if test -n "$NICE"; then
14693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14694 $as_echo "$NICE" >&6; }
14695 else
14696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14697 $as_echo "no" >&6; }
14698 fi
14699 
14700 
14701           if test "x$NICE" = x; then
14702             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14703           fi
14704         else
14705           # Otherwise we believe it is a complete path. Use it as it is.
14706           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14707 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14708           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14709 $as_echo_n "checking for NICE... " >&6; }
14710           if test ! -x "$tool_specified"; then
14711             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14712 $as_echo "not found" >&6; }
14713             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14714           fi
14715           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14716 $as_echo "$tool_specified" >&6; }
14717         fi
14718       fi
14719     fi
14720 
14721   fi
14722 
14723 
14724 
14725 
14726 # Now we can determine OpenJDK build and target platforms. This is required to
14727 # have early on.
14728 # Make sure we can run config.sub.
14729 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14730   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14731 
14732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14733 $as_echo_n "checking build system type... " >&6; }
14734 if ${ac_cv_build+:} false; then :
14735   $as_echo_n "(cached) " >&6
14736 else
14737   ac_build_alias=$build_alias
14738 test "x$ac_build_alias" = x &&
14739   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14740 test "x$ac_build_alias" = x &&
14741   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14742 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14743   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14744 
14745 fi
14746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14747 $as_echo "$ac_cv_build" >&6; }
14748 case $ac_cv_build in
14749 *-*-*) ;;
14750 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14751 esac
14752 build=$ac_cv_build
14753 ac_save_IFS=$IFS; IFS='-'
14754 set x $ac_cv_build
14755 shift
14756 build_cpu=$1
14757 build_vendor=$2
14758 shift; shift
14759 # Remember, the first character of IFS is used to create $*,
14760 # except with old shells:
14761 build_os=$*
14762 IFS=$ac_save_IFS
14763 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14764 
14765 
14766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14767 $as_echo_n "checking host system type... " >&6; }
14768 if ${ac_cv_host+:} false; then :
14769   $as_echo_n "(cached) " >&6
14770 else
14771   if test "x$host_alias" = x; then
14772   ac_cv_host=$ac_cv_build
14773 else
14774   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14775     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14776 fi
14777 
14778 fi
14779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14780 $as_echo "$ac_cv_host" >&6; }
14781 case $ac_cv_host in
14782 *-*-*) ;;
14783 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14784 esac
14785 host=$ac_cv_host
14786 ac_save_IFS=$IFS; IFS='-'
14787 set x $ac_cv_host
14788 shift
14789 host_cpu=$1
14790 host_vendor=$2
14791 shift; shift
14792 # Remember, the first character of IFS is used to create $*,
14793 # except with old shells:
14794 host_os=$*
14795 IFS=$ac_save_IFS
14796 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14797 
14798 
14799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14800 $as_echo_n "checking target system type... " >&6; }
14801 if ${ac_cv_target+:} false; then :
14802   $as_echo_n "(cached) " >&6
14803 else
14804   if test "x$target_alias" = x; then
14805   ac_cv_target=$ac_cv_host
14806 else
14807   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14808     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14809 fi
14810 
14811 fi
14812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14813 $as_echo "$ac_cv_target" >&6; }
14814 case $ac_cv_target in
14815 *-*-*) ;;
14816 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14817 esac
14818 target=$ac_cv_target
14819 ac_save_IFS=$IFS; IFS='-'
14820 set x $ac_cv_target
14821 shift
14822 target_cpu=$1
14823 target_vendor=$2
14824 shift; shift
14825 # Remember, the first character of IFS is used to create $*,
14826 # except with old shells:
14827 target_os=$*
14828 IFS=$ac_save_IFS
14829 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14830 
14831 
14832 # The aliases save the names the user supplied, while $host etc.
14833 # will get canonicalized.
14834 test -n "$target_alias" &&
14835   test "$program_prefix$program_suffix$program_transform_name" = \
14836     NONENONEs,x,x, &&
14837   program_prefix=${target_alias}-
14838 
14839   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14840   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14841   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14842   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14843   # to use the configure naming style.
14844 
14845 
14846 
14847 
14848 
14849   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14850   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14851   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14852   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14853   OPENJDK_TARGET_AUTOCONF_NAME="$host"
14854   OPENJDK_BUILD_AUTOCONF_NAME="$build"
14855 
14856 
14857 
14858   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14859 
14860   case "$build_os" in
14861     *linux*)
14862       VAR_OS=linux
14863       VAR_OS_TYPE=unix
14864       ;;
14865     *solaris*)
14866       VAR_OS=solaris
14867       VAR_OS_TYPE=unix
14868       ;;
14869     *darwin*)
14870       VAR_OS=macosx
14871       VAR_OS_TYPE=unix
14872       ;;
14873     *bsd*)
14874       VAR_OS=bsd
14875       VAR_OS_TYPE=unix
14876       ;;
14877     *cygwin*)
14878       VAR_OS=windows
14879       VAR_OS_ENV=windows.cygwin
14880       ;;
14881     *mingw*)
14882       VAR_OS=windows
14883       VAR_OS_ENV=windows.msys
14884       ;;
14885     *aix*)
14886       VAR_OS=aix
14887       VAR_OS_TYPE=unix
14888       ;;
14889     *)
14890       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14891       ;;
14892   esac
14893 
14894 
14895   # First argument is the cpu name from the trip/quad
14896   case "$build_cpu" in
14897     x86_64)
14898       VAR_CPU=x86_64
14899       VAR_CPU_ARCH=x86
14900       VAR_CPU_BITS=64
14901       VAR_CPU_ENDIAN=little
14902       ;;
14903     i?86)
14904       VAR_CPU=x86
14905       VAR_CPU_ARCH=x86
14906       VAR_CPU_BITS=32
14907       VAR_CPU_ENDIAN=little
14908       ;;
14909     arm*)
14910       VAR_CPU=arm
14911       VAR_CPU_ARCH=arm
14912       VAR_CPU_BITS=32
14913       VAR_CPU_ENDIAN=little
14914       ;;
14915     aarch64)
14916       VAR_CPU=aarch64
14917       VAR_CPU_ARCH=aarch64
14918       VAR_CPU_BITS=64
14919       VAR_CPU_ENDIAN=little
14920       ;;
14921     powerpc)
14922       VAR_CPU=ppc
14923       VAR_CPU_ARCH=ppc
14924       VAR_CPU_BITS=32
14925       VAR_CPU_ENDIAN=big
14926       ;;
14927     powerpc64)
14928       VAR_CPU=ppc64
14929       VAR_CPU_ARCH=ppc
14930       VAR_CPU_BITS=64
14931       VAR_CPU_ENDIAN=big
14932       ;;
14933     powerpc64le)
14934       VAR_CPU=ppc64le
14935       VAR_CPU_ARCH=ppc
14936       VAR_CPU_BITS=64
14937       VAR_CPU_ENDIAN=little
14938       ;;
14939     s390)
14940       VAR_CPU=s390
14941       VAR_CPU_ARCH=s390
14942       VAR_CPU_BITS=32
14943       VAR_CPU_ENDIAN=big
14944       ;;
14945     s390x)
14946       VAR_CPU=s390x
14947       VAR_CPU_ARCH=s390
14948       VAR_CPU_BITS=64
14949       VAR_CPU_ENDIAN=big
14950       ;;
14951     sparc)
14952       VAR_CPU=sparc
14953       VAR_CPU_ARCH=sparc
14954       VAR_CPU_BITS=32
14955       VAR_CPU_ENDIAN=big
14956       ;;
14957     sparcv9|sparc64)
14958       VAR_CPU=sparcv9
14959       VAR_CPU_ARCH=sparc
14960       VAR_CPU_BITS=64
14961       VAR_CPU_ENDIAN=big
14962       ;;
14963     *)
14964       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14965       ;;
14966   esac
14967 
14968   # ..and setup our own variables. (Do this explicitely to facilitate searching)
14969   OPENJDK_BUILD_OS="$VAR_OS"
14970   if test "x$VAR_OS_TYPE" != x; then
14971     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14972   else
14973     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14974   fi
14975   if test "x$VAR_OS_ENV" != x; then
14976     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14977   else
14978     OPENJDK_BUILD_OS_ENV="$VAR_OS"
14979   fi
14980   OPENJDK_BUILD_CPU="$VAR_CPU"
14981   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14982   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14983   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14984 
14985 
14986 
14987 
14988 
14989 
14990 
14991 
14992   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14993 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
14994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14995 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14996 
14997   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14998 
14999   case "$host_os" in
15000     *linux*)
15001       VAR_OS=linux
15002       VAR_OS_TYPE=unix
15003       ;;
15004     *solaris*)
15005       VAR_OS=solaris
15006       VAR_OS_TYPE=unix
15007       ;;
15008     *darwin*)
15009       VAR_OS=macosx
15010       VAR_OS_TYPE=unix
15011       ;;
15012     *bsd*)
15013       VAR_OS=bsd
15014       VAR_OS_TYPE=unix
15015       ;;
15016     *cygwin*)
15017       VAR_OS=windows
15018       VAR_OS_ENV=windows.cygwin
15019       ;;
15020     *mingw*)
15021       VAR_OS=windows
15022       VAR_OS_ENV=windows.msys
15023       ;;
15024     *aix*)
15025       VAR_OS=aix
15026       VAR_OS_TYPE=unix
15027       ;;
15028     *)
15029       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15030       ;;
15031   esac
15032 
15033 
15034   # First argument is the cpu name from the trip/quad
15035   case "$host_cpu" in
15036     x86_64)
15037       VAR_CPU=x86_64
15038       VAR_CPU_ARCH=x86
15039       VAR_CPU_BITS=64
15040       VAR_CPU_ENDIAN=little
15041       ;;
15042     i?86)
15043       VAR_CPU=x86
15044       VAR_CPU_ARCH=x86
15045       VAR_CPU_BITS=32
15046       VAR_CPU_ENDIAN=little
15047       ;;
15048     arm*)
15049       VAR_CPU=arm
15050       VAR_CPU_ARCH=arm
15051       VAR_CPU_BITS=32
15052       VAR_CPU_ENDIAN=little
15053       ;;
15054     aarch64)
15055       VAR_CPU=aarch64
15056       VAR_CPU_ARCH=aarch64
15057       VAR_CPU_BITS=64
15058       VAR_CPU_ENDIAN=little
15059       ;;
15060     powerpc)
15061       VAR_CPU=ppc
15062       VAR_CPU_ARCH=ppc
15063       VAR_CPU_BITS=32
15064       VAR_CPU_ENDIAN=big
15065       ;;
15066     powerpc64)
15067       VAR_CPU=ppc64
15068       VAR_CPU_ARCH=ppc
15069       VAR_CPU_BITS=64
15070       VAR_CPU_ENDIAN=big
15071       ;;
15072     powerpc64le)
15073       VAR_CPU=ppc64le
15074       VAR_CPU_ARCH=ppc
15075       VAR_CPU_BITS=64
15076       VAR_CPU_ENDIAN=little
15077       ;;
15078     s390)
15079       VAR_CPU=s390
15080       VAR_CPU_ARCH=s390
15081       VAR_CPU_BITS=32
15082       VAR_CPU_ENDIAN=big
15083       ;;
15084     s390x)
15085       VAR_CPU=s390x
15086       VAR_CPU_ARCH=s390
15087       VAR_CPU_BITS=64
15088       VAR_CPU_ENDIAN=big
15089       ;;
15090     sparc)
15091       VAR_CPU=sparc
15092       VAR_CPU_ARCH=sparc
15093       VAR_CPU_BITS=32
15094       VAR_CPU_ENDIAN=big
15095       ;;
15096     sparcv9|sparc64)
15097       VAR_CPU=sparcv9
15098       VAR_CPU_ARCH=sparc
15099       VAR_CPU_BITS=64
15100       VAR_CPU_ENDIAN=big
15101       ;;
15102     *)
15103       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15104       ;;
15105   esac
15106 
15107   # ... and setup our own variables. (Do this explicitely to facilitate searching)
15108   OPENJDK_TARGET_OS="$VAR_OS"
15109   if test "x$VAR_OS_TYPE" != x; then
15110     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15111   else
15112     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15113   fi
15114   if test "x$VAR_OS_ENV" != x; then
15115     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15116   else
15117     OPENJDK_TARGET_OS_ENV="$VAR_OS"
15118   fi
15119   OPENJDK_TARGET_CPU="$VAR_CPU"
15120   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15121   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15122   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15123 
15124 
15125 
15126 
15127 
15128 
15129 
15130 
15131   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15132 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
15133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15134 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15135 
15136 
15137 
15138 # Check whether --with-target-bits was given.
15139 if test "${with_target_bits+set}" = set; then :
15140   withval=$with_target_bits;
15141 fi
15142 
15143 
15144   # We have three types of compiles:
15145   # native  == normal compilation, target system == build system
15146   # cross   == traditional cross compilation, target system != build system; special toolchain needed
15147   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15148   #
15149   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15150     # We're doing a proper cross-compilation
15151     COMPILE_TYPE="cross"
15152   else
15153     COMPILE_TYPE="native"
15154   fi
15155 
15156   if test "x$with_target_bits" != x; then
15157     if test "x$COMPILE_TYPE" = "xcross"; then
15158       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15159     fi
15160 
15161     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15162       # A reduced build is requested
15163       COMPILE_TYPE="reduced"
15164       OPENJDK_TARGET_CPU_BITS=32
15165       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15166         OPENJDK_TARGET_CPU=x86
15167       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15168         OPENJDK_TARGET_CPU=sparc
15169       else
15170         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15171       fi
15172     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15173       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
15174     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15175       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15176 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15177     else
15178       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15179     fi
15180   fi
15181 
15182 
15183   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15184 $as_echo_n "checking compilation type... " >&6; }
15185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15186 $as_echo "$COMPILE_TYPE" >&6; }
15187 
15188 
15189   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15190     REQUIRED_OS_NAME=SunOS
15191     REQUIRED_OS_VERSION=5.10
15192   fi
15193   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15194     REQUIRED_OS_NAME=Linux
15195     REQUIRED_OS_VERSION=2.6
15196   fi
15197   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15198     REQUIRED_OS_NAME=Windows
15199     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15200       REQUIRED_OS_VERSION=5.2
15201     else
15202       REQUIRED_OS_VERSION=5.1
15203     fi
15204   fi
15205   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15206     REQUIRED_OS_NAME=Darwin
15207     REQUIRED_OS_VERSION=11.2
15208   fi
15209   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15210     REQUIRED_OS_NAME=AIX
15211     REQUIRED_OS_VERSION=7.1
15212   fi
15213 
15214 
15215 
15216 
15217 
15218   # Also store the legacy naming of the cpu.
15219   # Ie i586 and amd64 instead of x86 and x86_64
15220   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15221   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15222     OPENJDK_TARGET_CPU_LEGACY="i586"
15223   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15224     # On all platforms except MacOSX replace x86_64 with amd64.
15225     OPENJDK_TARGET_CPU_LEGACY="amd64"
15226   fi
15227 
15228 
15229   # And the second legacy naming of the cpu.
15230   # Ie i386 and amd64 instead of x86 and x86_64.
15231   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15232   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15233     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15234   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15235     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15236   fi
15237 
15238 
15239   # This is the name of the cpu (but using i386 and amd64 instead of
15240   # x86 and x86_64, respectively), preceeded by a /, to be used when
15241   # locating libraries. On macosx, it's empty, though.
15242   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15243   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15244     OPENJDK_TARGET_CPU_LIBDIR=""
15245   fi
15246 
15247 
15248   # Now do the same for OPENJDK_BUILD_CPU...
15249   # Also store the legacy naming of the cpu.
15250   # Ie i586 and amd64 instead of x86 and x86_64
15251   OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15252   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15253     OPENJDK_BUILD_CPU_LEGACY="i586"
15254   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15255     # On all platforms except MacOSX replace x86_64 with amd64.
15256     OPENJDK_BUILD_CPU_LEGACY="amd64"
15257   fi
15258 
15259 
15260   # And the second legacy naming of the cpu.
15261   # Ie i386 and amd64 instead of x86 and x86_64.
15262   OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15263   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15264     OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15265   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15266     OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15267   fi
15268 
15269 
15270   # This is the name of the cpu (but using i386 and amd64 instead of
15271   # x86 and x86_64, respectively), preceeded by a /, to be used when
15272   # locating libraries. On macosx, it's empty, though.
15273   OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15274   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15275     OPENJDK_BUILD_CPU_LIBDIR=""
15276   fi
15277 
15278 
15279   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15280   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15281   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15282   OPENJDK_TARGET_CPU_ISADIR=""
15283   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15284     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15285       OPENJDK_TARGET_CPU_ISADIR="/amd64"
15286     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15287       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15288     fi
15289   fi
15290 
15291 
15292   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15293   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15294   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15295     # On linux only, we replace x86 with i386.
15296     OPENJDK_TARGET_CPU_OSARCH="i386"
15297   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15298     # On all platforms except macosx, we replace x86_64 with amd64.
15299     OPENJDK_TARGET_CPU_OSARCH="amd64"
15300   fi
15301 
15302 
15303   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15304   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15305     OPENJDK_TARGET_CPU_JLI="i386"
15306   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15307     # On all platforms except macosx, we replace x86_64 with amd64.
15308     OPENJDK_TARGET_CPU_JLI="amd64"
15309   fi
15310   # Now setup the -D flags for building libjli.
15311   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15312   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15313     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15314       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15315     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15316       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15317     fi
15318   fi
15319 
15320 
15321   OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15322   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15323     OPENJDK_BUILD_CPU_JLI="i386"
15324   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15325     # On all platforms except macosx, we replace x86_64 with amd64.
15326     OPENJDK_BUILD_CPU_JLI="amd64"
15327   fi
15328   # Now setup the -D flags for building libjli.
15329   OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
15330   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15331     if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
15332       OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15333     elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
15334       OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15335     fi
15336   fi
15337 
15338 
15339   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15340       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15341   else
15342       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15343   fi
15344 
15345 
15346   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15347     A_LP64="LP64:="
15348     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15349     # unpack200.exe
15350     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15351       ADD_LP64="-D_LP64=1"
15352     fi
15353   fi
15354   LP64=$A_LP64
15355 
15356   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
15357     if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
15358       OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
15359     fi
15360   fi
15361 
15362   if test "x$COMPILE_TYPE" = "xcross"; then
15363     # FIXME: ... or should this include reduced builds..?
15364     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15365   else
15366     DEFINE_CROSS_COMPILE_ARCH=""
15367   fi
15368 
15369 
15370   # ZERO_ARCHDEF is used to enable architecture-specific code
15371   case "${OPENJDK_TARGET_CPU}" in
15372     ppc)     ZERO_ARCHDEF=PPC32 ;;
15373     ppc64)   ZERO_ARCHDEF=PPC64 ;;
15374     s390*)   ZERO_ARCHDEF=S390  ;;
15375     sparc*)  ZERO_ARCHDEF=SPARC ;;
15376     x86_64*) ZERO_ARCHDEF=AMD64 ;;
15377     x86)     ZERO_ARCHDEF=IA32  ;;
15378     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15379   esac
15380 
15381 
15382 
15383 
15384 # Continue setting up basic stuff. Most remaining code require fundamental tools.
15385 
15386   # Save the current directory this script was started from
15387   CURDIR="$PWD"
15388 
15389   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15390   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15391   # was not available at that time.
15392   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15393   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15394     ORIGINAL_PATH="$REWRITTEN_PATH"
15395     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15396 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15397   fi
15398 
15399   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15400     PATH_SEP=";"
15401 
15402   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15403   if test $SRC_ROOT_LENGTH -gt 100; then
15404     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15405   fi
15406 
15407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15408     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15409 $as_echo_n "checking cygwin release... " >&6; }
15410     CYGWIN_VERSION=`$UNAME -r`
15411     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15412 $as_echo "$CYGWIN_VERSION" >&6; }
15413     WINDOWS_ENV_VENDOR='cygwin'
15414     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15415 
15416     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15417     if test "x$CYGWIN_VERSION_OLD" != x; then
15418       { $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
15419 $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;}
15420       as_fn_error $? "Cannot continue" "$LINENO" 5
15421     fi
15422     if test "x$CYGPATH" = x; then
15423       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15424     fi
15425     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15426 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15427     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15428     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15429     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15430     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15431     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15432 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
15433     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15434     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15435     if test "x$test_cygdrive_prefix" = x; then
15436       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15437     fi
15438   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15439     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15440 $as_echo_n "checking msys release... " >&6; }
15441     MSYS_VERSION=`$UNAME -r`
15442     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15443 $as_echo "$MSYS_VERSION" >&6; }
15444 
15445     WINDOWS_ENV_VENDOR='msys'
15446     WINDOWS_ENV_VERSION="$MSYS_VERSION"
15447 
15448     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15449 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
15450     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15451     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15452 
15453   windows_path="$MSYS_ROOT_PATH"
15454   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15455     unix_path=`$CYGPATH -u "$windows_path"`
15456     MSYS_ROOT_PATH="$unix_path"
15457   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15458     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15459     MSYS_ROOT_PATH="$unix_path"
15460   fi
15461 
15462     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15463 $as_echo "$MSYS_ROOT_PATH" >&6; }
15464     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15465   else
15466     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15467   fi
15468 
15469   # Test if windows or unix (cygwin/msys) find is first in path.
15470   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15471 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15472   FIND_BINARY_OUTPUT=`find --version 2>&1`
15473   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15474     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15475 $as_echo "unix style" >&6; }
15476   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15477     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15478 $as_echo "Windows" >&6; }
15479     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15480 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15481     { $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
15482 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15483     as_fn_error $? "Cannot continue" "$LINENO" 5
15484   else
15485     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15486 $as_echo "unknown" >&6; }
15487     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15488 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15489   fi
15490 
15491   else
15492     PATH_SEP=":"
15493   fi
15494 
15495 
15496   # We get the top-level directory from the supporting wrappers.
15497   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15498 $as_echo_n "checking for top-level directory... " >&6; }
15499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15500 $as_echo "$TOPDIR" >&6; }
15501 
15502 
15503   # Save the original version of TOPDIR for string comparisons
15504   ORIGINAL_TOPDIR="$TOPDIR"
15505 
15506 
15507   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15508 
15509   # Only process if variable expands to non-empty
15510 
15511   if test "x$CURDIR" != x; then
15512     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15513 
15514   # Input might be given as Windows format, start by converting to
15515   # unix format.
15516   path="$CURDIR"
15517   new_path=`$CYGPATH -u "$path"`
15518 
15519   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15520   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15521   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15522   # "foo.exe" is OK but "foo" is an error.
15523   #
15524   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15525   # It is also a way to make sure we got the proper file name for the real test later on.
15526   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15527   if test "x$test_shortpath" = x; then
15528     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15529 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15530     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15531   fi
15532 
15533   # Call helper function which possibly converts this using DOS-style short mode.
15534   # If so, the updated path is stored in $new_path.
15535 
15536   input_path="$new_path"
15537   # Check if we need to convert this using DOS-style short mode. If the path
15538   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15539   # take no chances and rewrite it.
15540   # Note: m4 eats our [], so we need to use [ and ] instead.
15541   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15542   if test "x$has_forbidden_chars" != x; then
15543     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15544     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15545     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15546     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15547       # Going to short mode and back again did indeed matter. Since short mode is
15548       # case insensitive, let's make it lowercase to improve readability.
15549       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15550       # Now convert it back to Unix-style (cygpath)
15551       input_path=`$CYGPATH -u "$shortmode_path"`
15552       new_path="$input_path"
15553     fi
15554   fi
15555 
15556   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15557   if test "x$test_cygdrive_prefix" = x; then
15558     # As a simple fix, exclude /usr/bin since it's not a real path.
15559     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15560       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15561       # a path prefixed by /cygdrive for fixpath to work.
15562       new_path="$CYGWIN_ROOT_PATH$input_path"
15563     fi
15564   fi
15565 
15566 
15567   if test "x$path" != "x$new_path"; then
15568     CURDIR="$new_path"
15569     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15570 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15571   fi
15572 
15573     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15574 
15575   path="$CURDIR"
15576   has_colon=`$ECHO $path | $GREP ^.:`
15577   new_path="$path"
15578   if test "x$has_colon" = x; then
15579     # Not in mixed or Windows style, start by that.
15580     new_path=`cmd //c echo $path`
15581   fi
15582 
15583 
15584   input_path="$new_path"
15585   # Check if we need to convert this using DOS-style short mode. If the path
15586   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15587   # take no chances and rewrite it.
15588   # Note: m4 eats our [], so we need to use [ and ] instead.
15589   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15590   if test "x$has_forbidden_chars" != x; then
15591     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15592     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15593   fi
15594 
15595 
15596   windows_path="$new_path"
15597   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15598     unix_path=`$CYGPATH -u "$windows_path"`
15599     new_path="$unix_path"
15600   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15601     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15602     new_path="$unix_path"
15603   fi
15604 
15605   if test "x$path" != "x$new_path"; then
15606     CURDIR="$new_path"
15607     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15608 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15609   fi
15610 
15611   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15612   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15613 
15614     else
15615       # We're on a unix platform. Hooray! :)
15616       path="$CURDIR"
15617       has_space=`$ECHO "$path" | $GREP " "`
15618       if test "x$has_space" != x; then
15619         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15620 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15621         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15622       fi
15623 
15624       # Use eval to expand a potential ~
15625       eval path="$path"
15626       if test ! -f "$path" && test ! -d "$path"; then
15627         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15628       fi
15629 
15630       if test -d "$path"; then
15631         CURDIR="`cd "$path"; $THEPWDCMD -L`"
15632       else
15633         dir="`$DIRNAME "$path"`"
15634         base="`$BASENAME "$path"`"
15635         CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15636       fi
15637     fi
15638   fi
15639 
15640 
15641   # Only process if variable expands to non-empty
15642 
15643   if test "x$TOPDIR" != x; then
15644     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15645 
15646   # Input might be given as Windows format, start by converting to
15647   # unix format.
15648   path="$TOPDIR"
15649   new_path=`$CYGPATH -u "$path"`
15650 
15651   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15652   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15653   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15654   # "foo.exe" is OK but "foo" is an error.
15655   #
15656   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15657   # It is also a way to make sure we got the proper file name for the real test later on.
15658   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15659   if test "x$test_shortpath" = x; then
15660     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15661 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15662     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15663   fi
15664 
15665   # Call helper function which possibly converts this using DOS-style short mode.
15666   # If so, the updated path is stored in $new_path.
15667 
15668   input_path="$new_path"
15669   # Check if we need to convert this using DOS-style short mode. If the path
15670   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15671   # take no chances and rewrite it.
15672   # Note: m4 eats our [], so we need to use [ and ] instead.
15673   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15674   if test "x$has_forbidden_chars" != x; then
15675     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15676     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15677     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15678     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15679       # Going to short mode and back again did indeed matter. Since short mode is
15680       # case insensitive, let's make it lowercase to improve readability.
15681       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15682       # Now convert it back to Unix-style (cygpath)
15683       input_path=`$CYGPATH -u "$shortmode_path"`
15684       new_path="$input_path"
15685     fi
15686   fi
15687 
15688   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15689   if test "x$test_cygdrive_prefix" = x; then
15690     # As a simple fix, exclude /usr/bin since it's not a real path.
15691     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15692       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15693       # a path prefixed by /cygdrive for fixpath to work.
15694       new_path="$CYGWIN_ROOT_PATH$input_path"
15695     fi
15696   fi
15697 
15698 
15699   if test "x$path" != "x$new_path"; then
15700     TOPDIR="$new_path"
15701     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15702 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15703   fi
15704 
15705     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15706 
15707   path="$TOPDIR"
15708   has_colon=`$ECHO $path | $GREP ^.:`
15709   new_path="$path"
15710   if test "x$has_colon" = x; then
15711     # Not in mixed or Windows style, start by that.
15712     new_path=`cmd //c echo $path`
15713   fi
15714 
15715 
15716   input_path="$new_path"
15717   # Check if we need to convert this using DOS-style short mode. If the path
15718   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15719   # take no chances and rewrite it.
15720   # Note: m4 eats our [], so we need to use [ and ] instead.
15721   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15722   if test "x$has_forbidden_chars" != x; then
15723     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15724     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15725   fi
15726 
15727 
15728   windows_path="$new_path"
15729   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15730     unix_path=`$CYGPATH -u "$windows_path"`
15731     new_path="$unix_path"
15732   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15733     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15734     new_path="$unix_path"
15735   fi
15736 
15737   if test "x$path" != "x$new_path"; then
15738     TOPDIR="$new_path"
15739     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15740 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15741   fi
15742 
15743   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15744   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15745 
15746     else
15747       # We're on a unix platform. Hooray! :)
15748       path="$TOPDIR"
15749       has_space=`$ECHO "$path" | $GREP " "`
15750       if test "x$has_space" != x; then
15751         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15752 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15753         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15754       fi
15755 
15756       # Use eval to expand a potential ~
15757       eval path="$path"
15758       if test ! -f "$path" && test ! -d "$path"; then
15759         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15760       fi
15761 
15762       if test -d "$path"; then
15763         TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15764       else
15765         dir="`$DIRNAME "$path"`"
15766         base="`$BASENAME "$path"`"
15767         TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15768       fi
15769     fi
15770   fi
15771 
15772   # SRC_ROOT is a traditional alias for TOPDIR.
15773   SRC_ROOT=$TOPDIR
15774 
15775   # Calculate a canonical version of TOPDIR for string comparisons
15776   CANONICAL_TOPDIR=$TOPDIR
15777 
15778   if test "x$OPENJDK_BUILD_OS" != xwindows; then
15779     # Follow a chain of symbolic links. Use readlink
15780     # where it exists, else fall back to horribly
15781     # complicated shell code.
15782     if test "x$READLINK_TESTED" != yes; then
15783       # On MacOSX there is a readlink tool with a different
15784       # purpose than the GNU readlink tool. Check the found readlink.
15785       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15786       if test "x$ISGNU" = x; then
15787         # A readlink that we do not know how to use.
15788         # Are there other non-GNU readlinks out there?
15789         READLINK_TESTED=yes
15790         READLINK=
15791       fi
15792     fi
15793 
15794     if test "x$READLINK" != x; then
15795       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15796     else
15797       # Save the current directory for restoring afterwards
15798       STARTDIR=$PWD
15799       COUNTER=0
15800       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15801       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15802       cd $sym_link_dir
15803       # Use -P flag to resolve symlinks in directories.
15804       cd `$THEPWDCMD -P`
15805       sym_link_dir=`$THEPWDCMD -P`
15806       # Resolve file symlinks
15807       while test $COUNTER -lt 20; do
15808         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15809         if test "x$ISLINK" == x; then
15810           # This is not a symbolic link! We are done!
15811           break
15812         fi
15813         # Again resolve directory symlinks since the target of the just found
15814         # link could be in a different directory
15815         cd `$DIRNAME $ISLINK`
15816         sym_link_dir=`$THEPWDCMD -P`
15817         sym_link_file=`$BASENAME $ISLINK`
15818         let COUNTER=COUNTER+1
15819       done
15820       cd $STARTDIR
15821       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15822     fi
15823   fi
15824 
15825 
15826 
15827   # Locate the directory of this script.
15828   AUTOCONF_DIR=$TOPDIR/common/autoconf
15829 
15830   # Setup username (for use in adhoc version strings etc)
15831   # Outer [ ] to quote m4.
15832    USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
15833 
15834 
15835 
15836 # Check if it's a pure open build or if custom sources are to be used.
15837 
15838   # Check whether --enable-openjdk-only was given.
15839 if test "${enable_openjdk_only+set}" = set; then :
15840   enableval=$enable_openjdk_only;
15841 else
15842   enable_openjdk_only="no"
15843 fi
15844 
15845 
15846   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15847 $as_echo_n "checking for presence of closed sources... " >&6; }
15848   if test -d "$SRC_ROOT/jdk/src/closed"; then
15849     CLOSED_SOURCE_PRESENT=yes
15850   else
15851     CLOSED_SOURCE_PRESENT=no
15852   fi
15853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15854 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15855 
15856   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15857 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15858   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15860 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15861 
15862   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15863     OPENJDK=true
15864     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15865       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15866 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15867     fi
15868   else
15869     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15870       OPENJDK=true
15871     else
15872       OPENJDK=false
15873     fi
15874   fi
15875 
15876   if test "x$OPENJDK" = "xtrue"; then
15877     SET_OPENJDK="OPENJDK=true"
15878   fi
15879 
15880 
15881 
15882   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15883   # the IncludeCustomExtension macro.
15884 
15885 
15886 # Check whether --with-custom-make-dir was given.
15887 if test "${with_custom_make_dir+set}" = set; then :
15888   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
15889 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15890 fi
15891 
15892 
15893 
15894 
15895 # These are needed to be able to create a configuration name (and thus the output directory)
15896 
15897   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15898 $as_echo_n "checking which variant of the JDK to build... " >&6; }
15899 
15900 # Check whether --with-jdk-variant was given.
15901 if test "${with_jdk_variant+set}" = set; then :
15902   withval=$with_jdk_variant;
15903 fi
15904 
15905 
15906   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15907     JDK_VARIANT="normal"
15908   else
15909     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15910   fi
15911 
15912 
15913 
15914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15915 $as_echo "$JDK_VARIANT" >&6; }
15916 
15917 
15918 
15919 # Check whether --with-jvm-interpreter was given.
15920 if test "${with_jvm_interpreter+set}" = set; then :
15921   withval=$with_jvm_interpreter;
15922 fi
15923 
15924 
15925   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15926 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15927   if test "x$with_jvm_interpreter" = x; then
15928     JVM_INTERPRETER="template"
15929   else
15930     JVM_INTERPRETER="$with_jvm_interpreter"
15931   fi
15932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_INTERPRETER" >&5
15933 $as_echo "$JVM_INTERPRETER" >&6; }
15934 
15935   if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15936     as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15937   fi
15938 
15939 
15940 
15941 
15942   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15943 $as_echo_n "checking which variants of the JVM to build... " >&6; }
15944 
15945 # Check whether --with-jvm-variants was given.
15946 if test "${with_jvm_variants+set}" = set; then :
15947   withval=$with_jvm_variants;
15948 fi
15949 
15950 
15951   if test "x$with_jvm_variants" = x; then
15952     with_jvm_variants="server"
15953   fi
15954 
15955   JVM_VARIANTS=",$with_jvm_variants,"
15956   TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
15957 
15958   if test "x$TEST_VARIANTS" != "x,"; then
15959     as_fn_error $? "The available JVM variants are: server, client, minimal1, zero, zeroshark, core" "$LINENO" 5
15960   fi
15961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15962 $as_echo "$with_jvm_variants" >&6; }
15963 
15964   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15965   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15966   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15967   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15968   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15969   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15970 
15971   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15972     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15973       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15974     fi
15975   fi
15976   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15977     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15978       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15979     fi
15980   fi
15981 
15982   # Replace the commas with AND for use in the build directory name.
15983   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15984   COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
15985   if test "x$COUNT_VARIANTS" != "x,1"; then
15986     BUILDING_MULTIPLE_JVM_VARIANTS=yes
15987   else
15988     BUILDING_MULTIPLE_JVM_VARIANTS=no
15989   fi
15990 
15991   if test "x$JVM_VARIANT_ZERO" = xtrue && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xyes; then
15992     as_fn_error $? "You cannot build multiple variants with zero." "$LINENO" 5
15993   fi
15994 
15995 
15996 
15997 
15998 
15999 
16000 
16001 
16002 
16003   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
16004     MACOSX_UNIVERSAL="true"
16005   fi
16006 
16007 
16008 
16009 
16010   DEBUG_LEVEL="release"
16011   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16012 $as_echo_n "checking which debug level to use... " >&6; }
16013   # Check whether --enable-debug was given.
16014 if test "${enable_debug+set}" = set; then :
16015   enableval=$enable_debug;
16016         ENABLE_DEBUG="${enableval}"
16017         DEBUG_LEVEL="fastdebug"
16018 
16019 else
16020   ENABLE_DEBUG="no"
16021 fi
16022 
16023 
16024 
16025 # Check whether --with-debug-level was given.
16026 if test "${with_debug_level+set}" = set; then :
16027   withval=$with_debug_level;
16028         DEBUG_LEVEL="${withval}"
16029         if test "x$ENABLE_DEBUG" = xyes; then
16030           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16031         fi
16032 
16033 fi
16034 
16035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16036 $as_echo "$DEBUG_LEVEL" >&6; }
16037 
16038   if test "x$DEBUG_LEVEL" != xrelease && \
16039       test "x$DEBUG_LEVEL" != xoptimized && \
16040       test "x$DEBUG_LEVEL" != xfastdebug && \
16041       test "x$DEBUG_LEVEL" != xslowdebug; then
16042     as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16043   fi
16044 
16045 
16046   case $DEBUG_LEVEL in
16047     release )
16048       VARIANT="OPT"
16049       FASTDEBUG="false"
16050       DEBUG_CLASSFILES="false"
16051       BUILD_VARIANT_RELEASE=""
16052       HOTSPOT_DEBUG_LEVEL="product"
16053       HOTSPOT_EXPORT="product"
16054       ;;
16055     fastdebug )
16056       VARIANT="DBG"
16057       FASTDEBUG="true"
16058       DEBUG_CLASSFILES="true"
16059       BUILD_VARIANT_RELEASE="-fastdebug"
16060       HOTSPOT_DEBUG_LEVEL="fastdebug"
16061       HOTSPOT_EXPORT="fastdebug"
16062       ;;
16063     slowdebug )
16064       VARIANT="DBG"
16065       FASTDEBUG="false"
16066       DEBUG_CLASSFILES="true"
16067       BUILD_VARIANT_RELEASE="-debug"
16068       HOTSPOT_DEBUG_LEVEL="debug"
16069       HOTSPOT_EXPORT="debug"
16070       ;;
16071     optimized )
16072       VARIANT="OPT"
16073       FASTDEBUG="false"
16074       DEBUG_CLASSFILES="false"
16075       BUILD_VARIANT_RELEASE="-optimized"
16076       HOTSPOT_DEBUG_LEVEL="optimized"
16077       HOTSPOT_EXPORT="optimized"
16078       ;;
16079   esac
16080 
16081   # The debug level 'optimized' is a little special because it is currently only
16082   # applicable to the HotSpot build where it means to build a completely
16083   # optimized version of the VM without any debugging code (like for the
16084   # 'release' debug level which is called 'product' in the HotSpot build) but
16085   # with the exception that it can contain additional code which is otherwise
16086   # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16087   # test new and/or experimental features which are not intended for customer
16088   # shipment. Because these new features need to be tested and benchmarked in
16089   # real world scenarios, we want to build the containing JDK at the 'release'
16090   # debug level.
16091   if test "x$DEBUG_LEVEL" = xoptimized; then
16092     DEBUG_LEVEL="release"
16093   fi
16094 
16095   #####
16096   # Generate the legacy makefile targets for hotspot.
16097   # The hotspot api for selecting the build artifacts, really, needs to be improved.
16098   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
16099   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
16100   # But until then ...
16101   HOTSPOT_TARGET=""
16102 
16103   if test "x$JVM_VARIANT_SERVER" = xtrue; then
16104     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
16105   fi
16106 
16107   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
16108     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
16109   fi
16110 
16111   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
16112     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
16113   fi
16114 
16115   if test "x$JVM_VARIANT_ZERO" = xtrue; then
16116     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
16117   fi
16118 
16119   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
16120     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
16121   fi
16122 
16123   if test "x$JVM_VARIANT_CORE" = xtrue; then
16124     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
16125   fi
16126 
16127   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
16128 
16129   # On Macosx universal binaries are produced, but they only contain
16130   # 64 bit intel. This invalidates control of which jvms are built
16131   # from configure, but only server is valid anyway. Fix this
16132   # when hotspot makefiles are rewritten.
16133   if test "x$MACOSX_UNIVERSAL" = xtrue; then
16134     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
16135   fi
16136 
16137   #####
16138 
16139 
16140 
16141 
16142 
16143 
16144 
16145 
16146 # With basic setup done, call the custom early hook.
16147 
16148 
16149 # Check if we have devkits, extra paths or sysroot set.
16150 
16151 
16152 # Check whether --with-devkit was given.
16153 if test "${with_devkit+set}" = set; then :
16154   withval=$with_devkit;
16155 
16156   # Only process if variable expands to non-empty
16157 
16158   if test "x$with_devkit" != x; then
16159     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16160 
16161   # Input might be given as Windows format, start by converting to
16162   # unix format.
16163   path="$with_devkit"
16164   new_path=`$CYGPATH -u "$path"`
16165 
16166   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16167   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16168   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16169   # "foo.exe" is OK but "foo" is an error.
16170   #
16171   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16172   # It is also a way to make sure we got the proper file name for the real test later on.
16173   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16174   if test "x$test_shortpath" = x; then
16175     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16176 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16177     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16178   fi
16179 
16180   # Call helper function which possibly converts this using DOS-style short mode.
16181   # If so, the updated path is stored in $new_path.
16182 
16183   input_path="$new_path"
16184   # Check if we need to convert this using DOS-style short mode. If the path
16185   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16186   # take no chances and rewrite it.
16187   # Note: m4 eats our [], so we need to use [ and ] instead.
16188   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16189   if test "x$has_forbidden_chars" != x; then
16190     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16191     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16192     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16193     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16194       # Going to short mode and back again did indeed matter. Since short mode is
16195       # case insensitive, let's make it lowercase to improve readability.
16196       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16197       # Now convert it back to Unix-style (cygpath)
16198       input_path=`$CYGPATH -u "$shortmode_path"`
16199       new_path="$input_path"
16200     fi
16201   fi
16202 
16203   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16204   if test "x$test_cygdrive_prefix" = x; then
16205     # As a simple fix, exclude /usr/bin since it's not a real path.
16206     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16207       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16208       # a path prefixed by /cygdrive for fixpath to work.
16209       new_path="$CYGWIN_ROOT_PATH$input_path"
16210     fi
16211   fi
16212 
16213 
16214   if test "x$path" != "x$new_path"; then
16215     with_devkit="$new_path"
16216     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16217 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16218   fi
16219 
16220     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16221 
16222   path="$with_devkit"
16223   has_colon=`$ECHO $path | $GREP ^.:`
16224   new_path="$path"
16225   if test "x$has_colon" = x; then
16226     # Not in mixed or Windows style, start by that.
16227     new_path=`cmd //c echo $path`
16228   fi
16229 
16230 
16231   input_path="$new_path"
16232   # Check if we need to convert this using DOS-style short mode. If the path
16233   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16234   # take no chances and rewrite it.
16235   # Note: m4 eats our [], so we need to use [ and ] instead.
16236   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16237   if test "x$has_forbidden_chars" != x; then
16238     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16239     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16240   fi
16241 
16242 
16243   windows_path="$new_path"
16244   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16245     unix_path=`$CYGPATH -u "$windows_path"`
16246     new_path="$unix_path"
16247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16248     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16249     new_path="$unix_path"
16250   fi
16251 
16252   if test "x$path" != "x$new_path"; then
16253     with_devkit="$new_path"
16254     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16255 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16256   fi
16257 
16258   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16259   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16260 
16261     else
16262       # We're on a unix platform. Hooray! :)
16263       path="$with_devkit"
16264       has_space=`$ECHO "$path" | $GREP " "`
16265       if test "x$has_space" != x; then
16266         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16267 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16268         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16269       fi
16270 
16271       # Use eval to expand a potential ~
16272       eval path="$path"
16273       if test ! -f "$path" && test ! -d "$path"; then
16274         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16275       fi
16276 
16277       if test -d "$path"; then
16278         with_devkit="`cd "$path"; $THEPWDCMD -L`"
16279       else
16280         dir="`$DIRNAME "$path"`"
16281         base="`$BASENAME "$path"`"
16282         with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16283       fi
16284     fi
16285   fi
16286 
16287         DEVKIT_ROOT="$with_devkit"
16288         # Check for a meta data info file in the root of the devkit
16289         if test -f "$DEVKIT_ROOT/devkit.info"; then
16290           . $DEVKIT_ROOT/devkit.info
16291           # This potentially sets the following:
16292           # A descriptive name of the devkit
16293 
16294   if test "x$DEVKIT_NAME" = x; then
16295     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16296   fi
16297 
16298           # Corresponds to --with-extra-path
16299 
16300   if test "x$DEVKIT_EXTRA_PATH" = x; then
16301     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16302   fi
16303 
16304           # Corresponds to --with-toolchain-path
16305 
16306   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16307     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16308   fi
16309 
16310           # Corresponds to --with-sysroot
16311 
16312   if test "x$DEVKIT_SYSROOT" = x; then
16313     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16314   fi
16315 
16316 
16317           # Identifies the Visual Studio version in the devkit
16318 
16319   if test "x$DEVKIT_VS_VERSION" = x; then
16320     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16321   fi
16322 
16323           # The Visual Studio include environment variable
16324 
16325   if test "x$DEVKIT_VS_INCLUDE" = x; then
16326     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16327   fi
16328 
16329           # The Visual Studio lib environment variable
16330 
16331   if test "x$DEVKIT_VS_LIB" = x; then
16332     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16333   fi
16334 
16335           # Corresponds to --with-msvcr-dll
16336 
16337   if test "x$DEVKIT_MSVCR_DLL" = x; then
16338     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16339   fi
16340 
16341           # Corresponds to --with-msvcp-dll
16342 
16343   if test "x$DEVKIT_MSVCP_DLL" = x; then
16344     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16345   fi
16346 
16347         fi
16348 
16349         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16350 $as_echo_n "checking for devkit... " >&6; }
16351         if test "x$DEVKIT_NAME" != x; then
16352           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16353 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16354         else
16355           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16356 $as_echo "$DEVKIT_ROOT" >&6; }
16357         fi
16358 
16359 
16360   if test "x$DEVKIT_EXTRA_PATH" != x; then
16361     if test "x$EXTRA_PATH" = x; then
16362       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16363     else
16364       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16365     fi
16366   fi
16367 
16368 
16369         # Fallback default of just /bin if DEVKIT_PATH is not defined
16370         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16371           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16372         fi
16373 
16374   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16375     if test "x$TOOLCHAIN_PATH" = x; then
16376       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16377     else
16378       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16379     fi
16380   fi
16381 
16382 
16383         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16384         # places for backwards compatiblity.
16385         if test "x$DEVKIT_SYSROOT" != x; then
16386           SYSROOT="$DEVKIT_SYSROOT"
16387         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16388           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16389         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16390           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16391         fi
16392 
16393 
16394 fi
16395 
16396 
16397   # You can force the sysroot if the sysroot encoded into the compiler tools
16398   # is not correct.
16399 
16400 # Check whether --with-sys-root was given.
16401 if test "${with_sys_root+set}" = set; then :
16402   withval=$with_sys_root; SYSROOT=$with_sys_root
16403 
16404 fi
16405 
16406 
16407 
16408 # Check whether --with-sysroot was given.
16409 if test "${with_sysroot+set}" = set; then :
16410   withval=$with_sysroot; SYSROOT=$with_sysroot
16411 
16412 fi
16413 
16414 
16415 
16416 # Check whether --with-tools-dir was given.
16417 if test "${with_tools_dir+set}" = set; then :
16418   withval=$with_tools_dir;
16419   if test "x$with_tools_dir" != x; then
16420     if test "x$TOOLCHAIN_PATH" = x; then
16421       TOOLCHAIN_PATH="$with_tools_dir"
16422     else
16423       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16424     fi
16425   fi
16426 
16427 
16428 fi
16429 
16430 
16431 
16432 # Check whether --with-toolchain-path was given.
16433 if test "${with_toolchain_path+set}" = set; then :
16434   withval=$with_toolchain_path;
16435   if test "x$with_toolchain_path" != x; then
16436     if test "x$TOOLCHAIN_PATH" = x; then
16437       TOOLCHAIN_PATH="$with_toolchain_path"
16438     else
16439       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16440     fi
16441   fi
16442 
16443 
16444 fi
16445 
16446 
16447 
16448 # Check whether --with-extra-path was given.
16449 if test "${with_extra_path+set}" = set; then :
16450   withval=$with_extra_path;
16451   if test "x$with_extra_path" != x; then
16452     if test "x$EXTRA_PATH" = x; then
16453       EXTRA_PATH="$with_extra_path"
16454     else
16455       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16456     fi
16457   fi
16458 
16459 
16460 fi
16461 
16462 
16463   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16464     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16465     # If not, detect if Xcode is installed by running xcodebuild -version
16466     # if no Xcode installed, xcodebuild exits with 1
16467     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16468     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16469       # We need to use xcodebuild in the toolchain dir provided by the user, this will
16470       # fall back on the stub binary in /usr/bin/xcodebuild
16471       # Extract the first word of "xcodebuild", so it can be a program name with args.
16472 set dummy xcodebuild; ac_word=$2
16473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16474 $as_echo_n "checking for $ac_word... " >&6; }
16475 if ${ac_cv_path_XCODEBUILD+:} false; then :
16476   $as_echo_n "(cached) " >&6
16477 else
16478   case $XCODEBUILD in
16479   [\\/]* | ?:[\\/]*)
16480   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16481   ;;
16482   *)
16483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16484 for as_dir in $TOOLCHAIN_PATH
16485 do
16486   IFS=$as_save_IFS
16487   test -z "$as_dir" && as_dir=.
16488     for ac_exec_ext in '' $ac_executable_extensions; do
16489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16490     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16492     break 2
16493   fi
16494 done
16495   done
16496 IFS=$as_save_IFS
16497 
16498   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16499   ;;
16500 esac
16501 fi
16502 XCODEBUILD=$ac_cv_path_XCODEBUILD
16503 if test -n "$XCODEBUILD"; then
16504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16505 $as_echo "$XCODEBUILD" >&6; }
16506 else
16507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16508 $as_echo "no" >&6; }
16509 fi
16510 
16511 
16512     else
16513       # this should result in SYSROOT being empty, unless --with-sysroot is provided
16514       # when only the command line tools are installed there are no SDKs, so headers
16515       # are copied into the system frameworks
16516       XCODEBUILD=
16517 
16518     fi
16519 
16520     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16521 $as_echo_n "checking for sdk name... " >&6; }
16522 
16523 # Check whether --with-sdk-name was given.
16524 if test "${with_sdk_name+set}" = set; then :
16525   withval=$with_sdk_name; SDKNAME=$with_sdk_name
16526 
16527 fi
16528 
16529     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16530 $as_echo "$SDKNAME" >&6; }
16531 
16532     # if toolchain path is specified then don't rely on system headers, they may not compile
16533     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16534     test -z "$TOOLCHAIN_PATH" && \
16535       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16536 
16537     if test -z "$SYSROOT"; then
16538       if test -n "$XCODEBUILD"; then
16539         # if we don't have system headers, use default SDK name (last resort)
16540         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16541           SDKNAME=${SDKNAME:-macosx}
16542         fi
16543 
16544         if test -n "$SDKNAME"; then
16545           # Call xcodebuild to determine SYSROOT
16546           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16547         fi
16548       else
16549         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16550           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
16551         fi
16552       fi
16553     else
16554       # warn user if --with-sdk-name was also set
16555       if test -n "$with_sdk_name"; then
16556         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16557 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16558       fi
16559     fi
16560 
16561     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16562       # If no system framework headers, then SYSROOT must be set, or we won't build
16563       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
16564     fi
16565 
16566     # Perform a basic sanity test
16567     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16568       if test -z "$SYSROOT"; then
16569         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
16570       else
16571         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16572       fi
16573     fi
16574 
16575     # set SDKROOT too, Xcode tools will pick it up
16576     SDKROOT=$SYSROOT
16577 
16578   fi
16579 
16580   # Prepend the extra path to the global path
16581 
16582   if test "x$EXTRA_PATH" != x; then
16583     if test "x$PATH" = x; then
16584       PATH="$EXTRA_PATH"
16585     else
16586       PATH="$EXTRA_PATH:$PATH"
16587     fi
16588   fi
16589 
16590 
16591   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16592     # Add extra search paths on solaris for utilities like ar and as etc...
16593     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16594   fi
16595 
16596   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16597 $as_echo_n "checking for sysroot... " >&6; }
16598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16599 $as_echo "$SYSROOT" >&6; }
16600   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16601 $as_echo_n "checking for toolchain path... " >&6; }
16602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16603 $as_echo "$TOOLCHAIN_PATH" >&6; }
16604   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16605 $as_echo_n "checking for extra path... " >&6; }
16606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16607 $as_echo "$EXTRA_PATH" >&6; }
16608 
16609 
16610 # To properly create a configuration name, we need to have the OpenJDK target
16611 # and options (variants and debug level) parsed.
16612 
16613 
16614 
16615 # Check whether --with-conf-name was given.
16616 if test "${with_conf_name+set}" = set; then :
16617   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16618 fi
16619 
16620 
16621   # Test from where we are running configure, in or outside of src root.
16622   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16623 $as_echo_n "checking where to store configuration... " >&6; }
16624   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16625       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16626       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16627     # We are running configure from the src root.
16628     # Create a default ./build/target-variant-debuglevel output root.
16629     if test "x${CONF_NAME}" = x; then
16630       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16631 $as_echo "in default location" >&6; }
16632       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16633     else
16634       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16635 $as_echo "in build directory with custom name" >&6; }
16636     fi
16637     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16638     $MKDIR -p "$OUTPUT_ROOT"
16639     if test ! -d "$OUTPUT_ROOT"; then
16640       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16641     fi
16642   else
16643     # We are running configure from outside of the src dir.
16644     # Then use the current directory as output dir!
16645     # If configuration is situated in normal build directory, just use the build
16646     # directory name as configuration name, otherwise use the complete path.
16647     if test "x${CONF_NAME}" = x; then
16648       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16649     fi
16650     OUTPUT_ROOT="$CURDIR"
16651     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16652 $as_echo "in current directory" >&6; }
16653 
16654     # WARNING: This might be a bad thing to do. You need to be sure you want to
16655     # have a configuration in this directory. Do some sanity checks!
16656 
16657     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16658       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16659       # other files
16660       files_present=`$LS $OUTPUT_ROOT`
16661       # Configure has already touched config.log and confdefs.h in the current dir when this check
16662       # is performed.
16663       filtered_files=`$ECHO "$files_present" \
16664           | $SED -e 's/config.log//g' \
16665               -e 's/configure.log//g' \
16666               -e 's/confdefs.h//g' \
16667               -e 's/ //g' \
16668           | $TR -d '\n'`
16669       if test "x$filtered_files" != x; then
16670         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16671 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
16672         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16673 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16674         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16675 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16676         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16677 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16678         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16679 $as_echo "$as_me: seriously mess up just about everything." >&6;}
16680         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16681 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16682         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16683 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16684         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16685       fi
16686     fi
16687   fi
16688   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16689 $as_echo_n "checking what configuration name to use... " >&6; }
16690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16691 $as_echo "$CONF_NAME" >&6; }
16692 
16693 
16694   # Only process if variable expands to non-empty
16695 
16696   if test "x$OUTPUT_ROOT" != x; then
16697     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16698 
16699   # Input might be given as Windows format, start by converting to
16700   # unix format.
16701   path="$OUTPUT_ROOT"
16702   new_path=`$CYGPATH -u "$path"`
16703 
16704   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16705   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16706   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16707   # "foo.exe" is OK but "foo" is an error.
16708   #
16709   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16710   # It is also a way to make sure we got the proper file name for the real test later on.
16711   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16712   if test "x$test_shortpath" = x; then
16713     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16714 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16715     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16716   fi
16717 
16718   # Call helper function which possibly converts this using DOS-style short mode.
16719   # If so, the updated path is stored in $new_path.
16720 
16721   input_path="$new_path"
16722   # Check if we need to convert this using DOS-style short mode. If the path
16723   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16724   # take no chances and rewrite it.
16725   # Note: m4 eats our [], so we need to use [ and ] instead.
16726   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16727   if test "x$has_forbidden_chars" != x; then
16728     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16729     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16730     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16731     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16732       # Going to short mode and back again did indeed matter. Since short mode is
16733       # case insensitive, let's make it lowercase to improve readability.
16734       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16735       # Now convert it back to Unix-style (cygpath)
16736       input_path=`$CYGPATH -u "$shortmode_path"`
16737       new_path="$input_path"
16738     fi
16739   fi
16740 
16741   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16742   if test "x$test_cygdrive_prefix" = x; then
16743     # As a simple fix, exclude /usr/bin since it's not a real path.
16744     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16745       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16746       # a path prefixed by /cygdrive for fixpath to work.
16747       new_path="$CYGWIN_ROOT_PATH$input_path"
16748     fi
16749   fi
16750 
16751 
16752   if test "x$path" != "x$new_path"; then
16753     OUTPUT_ROOT="$new_path"
16754     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16755 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16756   fi
16757 
16758     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16759 
16760   path="$OUTPUT_ROOT"
16761   has_colon=`$ECHO $path | $GREP ^.:`
16762   new_path="$path"
16763   if test "x$has_colon" = x; then
16764     # Not in mixed or Windows style, start by that.
16765     new_path=`cmd //c echo $path`
16766   fi
16767 
16768 
16769   input_path="$new_path"
16770   # Check if we need to convert this using DOS-style short mode. If the path
16771   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16772   # take no chances and rewrite it.
16773   # Note: m4 eats our [], so we need to use [ and ] instead.
16774   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16775   if test "x$has_forbidden_chars" != x; then
16776     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16777     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16778   fi
16779 
16780 
16781   windows_path="$new_path"
16782   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16783     unix_path=`$CYGPATH -u "$windows_path"`
16784     new_path="$unix_path"
16785   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16786     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16787     new_path="$unix_path"
16788   fi
16789 
16790   if test "x$path" != "x$new_path"; then
16791     OUTPUT_ROOT="$new_path"
16792     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16793 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16794   fi
16795 
16796   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16797   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16798 
16799     else
16800       # We're on a unix platform. Hooray! :)
16801       path="$OUTPUT_ROOT"
16802       has_space=`$ECHO "$path" | $GREP " "`
16803       if test "x$has_space" != x; then
16804         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16805 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16806         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16807       fi
16808 
16809       # Use eval to expand a potential ~
16810       eval path="$path"
16811       if test ! -f "$path" && test ! -d "$path"; then
16812         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16813       fi
16814 
16815       if test -d "$path"; then
16816         OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16817       else
16818         dir="`$DIRNAME "$path"`"
16819         base="`$BASENAME "$path"`"
16820         OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16821       fi
16822     fi
16823   fi
16824 
16825 
16826   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16827   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16828 
16829   SPEC=$OUTPUT_ROOT/spec.gmk
16830 
16831   CONF_NAME=$CONF_NAME
16832 
16833   OUTPUT_ROOT=$OUTPUT_ROOT
16834 
16835 
16836 
16837   # The spec.gmk file contains all variables for the make system.
16838   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16839 
16840   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16841   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16842 
16843   # The bootcycle-spec.gmk file contains support for boot cycle builds.
16844   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16845 
16846   # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
16847   ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
16848 
16849   # The compare.sh is used to compare the build output to other builds.
16850   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16851 
16852   # The generated Makefile knows where the spec.gmk is and where the source is.
16853   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16854   # which will look for generated configurations
16855   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16856 
16857 
16858 
16859 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16860 
16861   for ac_prog in apt-get yum port pkgutil pkgadd
16862 do
16863   # Extract the first word of "$ac_prog", so it can be a program name with args.
16864 set dummy $ac_prog; ac_word=$2
16865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16866 $as_echo_n "checking for $ac_word... " >&6; }
16867 if ${ac_cv_prog_PKGHANDLER+:} false; then :
16868   $as_echo_n "(cached) " >&6
16869 else
16870   if test -n "$PKGHANDLER"; then
16871   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16872 else
16873 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16874 for as_dir in $PATH
16875 do
16876   IFS=$as_save_IFS
16877   test -z "$as_dir" && as_dir=.
16878     for ac_exec_ext in '' $ac_executable_extensions; do
16879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16880     ac_cv_prog_PKGHANDLER="$ac_prog"
16881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16882     break 2
16883   fi
16884 done
16885   done
16886 IFS=$as_save_IFS
16887 
16888 fi
16889 fi
16890 PKGHANDLER=$ac_cv_prog_PKGHANDLER
16891 if test -n "$PKGHANDLER"; then
16892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16893 $as_echo "$PKGHANDLER" >&6; }
16894 else
16895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16896 $as_echo "no" >&6; }
16897 fi
16898 
16899 
16900   test -n "$PKGHANDLER" && break
16901 done
16902 
16903 
16904 
16905 # Setup tools that requires more complex handling, or that is not needed by the configure script.
16906 
16907 
16908 
16909   # Publish this variable in the help.
16910 
16911 
16912   if [ -z "${MAKE+x}" ]; then
16913     # The variable is not set by user, try to locate tool using the code snippet
16914 
16915     # Try our hardest to locate a correct version of GNU make
16916     for ac_prog in gmake
16917 do
16918   # Extract the first word of "$ac_prog", so it can be a program name with args.
16919 set dummy $ac_prog; ac_word=$2
16920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16921 $as_echo_n "checking for $ac_word... " >&6; }
16922 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16923   $as_echo_n "(cached) " >&6
16924 else
16925   case $CHECK_GMAKE in
16926   [\\/]* | ?:[\\/]*)
16927   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16928   ;;
16929   *)
16930   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16931 for as_dir in $PATH
16932 do
16933   IFS=$as_save_IFS
16934   test -z "$as_dir" && as_dir=.
16935     for ac_exec_ext in '' $ac_executable_extensions; do
16936   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16937     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16938     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16939     break 2
16940   fi
16941 done
16942   done
16943 IFS=$as_save_IFS
16944 
16945   ;;
16946 esac
16947 fi
16948 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16949 if test -n "$CHECK_GMAKE"; then
16950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16951 $as_echo "$CHECK_GMAKE" >&6; }
16952 else
16953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16954 $as_echo "no" >&6; }
16955 fi
16956 
16957 
16958   test -n "$CHECK_GMAKE" && break
16959 done
16960 
16961 
16962   MAKE_CANDIDATE=""$CHECK_GMAKE""
16963   DESCRIPTION="gmake in PATH"
16964 
16965   # On Cygwin, we require a newer version of make than on other platforms
16966   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16967     MAKE_VERSION_EXPR="-e 4\."
16968     MAKE_REQUIRED_VERSION="4.0"
16969    else
16970     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16971     MAKE_REQUIRED_VERSION="3.81"
16972   fi
16973 
16974   if test "x$MAKE_CANDIDATE" != x; then
16975     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16976 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16977     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16978     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16979     if test "x$IS_GNU_MAKE" = x; then
16980       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16981 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16982     else
16983       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16984       if test "x$IS_MODERN_MAKE" = x; then
16985         { $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
16986 $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;}
16987       else
16988         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16989           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16990             MAKE_EXPECTED_ENV='cygwin'
16991           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16992             MAKE_EXPECTED_ENV='msys'
16993           else
16994             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16995           fi
16996           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16997           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16998         else
16999           # Not relevant for non-Windows
17000           IS_MAKE_CORRECT_ENV=true
17001         fi
17002         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17003           { $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
17004 $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;}
17005         else
17006           FOUND_MAKE=$MAKE_CANDIDATE
17007 
17008   # Only process if variable expands to non-empty
17009 
17010   if test "x$FOUND_MAKE" != x; then
17011     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17012 
17013   # First separate the path from the arguments. This will split at the first
17014   # space.
17015   complete="$FOUND_MAKE"
17016   path="${complete%% *}"
17017   tmp="$complete EOL"
17018   arguments="${tmp#* }"
17019 
17020   # Input might be given as Windows format, start by converting to
17021   # unix format.
17022   new_path=`$CYGPATH -u "$path"`
17023 
17024   # Now try to locate executable using which
17025   new_path=`$WHICH "$new_path" 2> /dev/null`
17026   # bat and cmd files are not always considered executable in cygwin causing which
17027   # to not find them
17028   if test "x$new_path" = x \
17029       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17030       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17031     new_path=`$CYGPATH -u "$path"`
17032   fi
17033   if test "x$new_path" = x; then
17034     # Oops. Which didn't find the executable.
17035     # The splitting of arguments from the executable at a space might have been incorrect,
17036     # since paths with space are more likely in Windows. Give it another try with the whole
17037     # argument.
17038     path="$complete"
17039     arguments="EOL"
17040     new_path=`$CYGPATH -u "$path"`
17041     new_path=`$WHICH "$new_path" 2> /dev/null`
17042     # bat and cmd files are not always considered executable in cygwin causing which
17043     # to not find them
17044     if test "x$new_path" = x \
17045         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17046         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17047       new_path=`$CYGPATH -u "$path"`
17048     fi
17049     if test "x$new_path" = x; then
17050       # It's still not found. Now this is an unrecoverable error.
17051       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17052 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17053       has_space=`$ECHO "$complete" | $GREP " "`
17054       if test "x$has_space" != x; then
17055         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17056 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17057       fi
17058       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17059     fi
17060   fi
17061 
17062   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17063   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17064   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17065   # "foo.exe" is OK but "foo" is an error.
17066   #
17067   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17068   # It is also a way to make sure we got the proper file name for the real test later on.
17069   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17070   if test "x$test_shortpath" = x; then
17071     # Short path failed, file does not exist as specified.
17072     # Try adding .exe or .cmd
17073     if test -f "${new_path}.exe"; then
17074       input_to_shortpath="${new_path}.exe"
17075     elif test -f "${new_path}.cmd"; then
17076       input_to_shortpath="${new_path}.cmd"
17077     else
17078       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17079 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17080       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17081 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17082       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17083     fi
17084   else
17085     input_to_shortpath="$new_path"
17086   fi
17087 
17088   # Call helper function which possibly converts this using DOS-style short mode.
17089   # If so, the updated path is stored in $new_path.
17090   new_path="$input_to_shortpath"
17091 
17092   input_path="$input_to_shortpath"
17093   # Check if we need to convert this using DOS-style short mode. If the path
17094   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17095   # take no chances and rewrite it.
17096   # Note: m4 eats our [], so we need to use [ and ] instead.
17097   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17098   if test "x$has_forbidden_chars" != x; then
17099     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17100     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17101     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17102     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17103       # Going to short mode and back again did indeed matter. Since short mode is
17104       # case insensitive, let's make it lowercase to improve readability.
17105       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17106       # Now convert it back to Unix-style (cygpath)
17107       input_path=`$CYGPATH -u "$shortmode_path"`
17108       new_path="$input_path"
17109     fi
17110   fi
17111 
17112   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17113   if test "x$test_cygdrive_prefix" = x; then
17114     # As a simple fix, exclude /usr/bin since it's not a real path.
17115     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17116       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17117       # a path prefixed by /cygdrive for fixpath to work.
17118       new_path="$CYGWIN_ROOT_PATH$input_path"
17119     fi
17120   fi
17121 
17122   # remove trailing .exe if any
17123   new_path="${new_path/%.exe/}"
17124 
17125     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17126 
17127   # First separate the path from the arguments. This will split at the first
17128   # space.
17129   complete="$FOUND_MAKE"
17130   path="${complete%% *}"
17131   tmp="$complete EOL"
17132   arguments="${tmp#* }"
17133 
17134   # Input might be given as Windows format, start by converting to
17135   # unix format.
17136   new_path="$path"
17137 
17138   windows_path="$new_path"
17139   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17140     unix_path=`$CYGPATH -u "$windows_path"`
17141     new_path="$unix_path"
17142   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17143     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17144     new_path="$unix_path"
17145   fi
17146 
17147 
17148   # Now try to locate executable using which
17149   new_path=`$WHICH "$new_path" 2> /dev/null`
17150 
17151   if test "x$new_path" = x; then
17152     # Oops. Which didn't find the executable.
17153     # The splitting of arguments from the executable at a space might have been incorrect,
17154     # since paths with space are more likely in Windows. Give it another try with the whole
17155     # argument.
17156     path="$complete"
17157     arguments="EOL"
17158     new_path="$path"
17159 
17160   windows_path="$new_path"
17161   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17162     unix_path=`$CYGPATH -u "$windows_path"`
17163     new_path="$unix_path"
17164   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17165     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17166     new_path="$unix_path"
17167   fi
17168 
17169 
17170     new_path=`$WHICH "$new_path" 2> /dev/null`
17171     # bat and cmd files are not always considered executable in MSYS causing which
17172     # to not find them
17173     if test "x$new_path" = x \
17174         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17175         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17176       new_path="$path"
17177 
17178   windows_path="$new_path"
17179   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17180     unix_path=`$CYGPATH -u "$windows_path"`
17181     new_path="$unix_path"
17182   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17183     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17184     new_path="$unix_path"
17185   fi
17186 
17187     fi
17188 
17189     if test "x$new_path" = x; then
17190       # It's still not found. Now this is an unrecoverable error.
17191       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17192 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17193       has_space=`$ECHO "$complete" | $GREP " "`
17194       if test "x$has_space" != x; then
17195         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17196 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17197       fi
17198       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17199     fi
17200   fi
17201 
17202   # Now new_path has a complete unix path to the binary
17203   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17204     # Keep paths in /bin as-is, but remove trailing .exe if any
17205     new_path="${new_path/%.exe/}"
17206     # Do not save /bin paths to all_fixpath_prefixes!
17207   else
17208     # Not in mixed or Windows style, start by that.
17209     new_path=`cmd //c echo $new_path`
17210 
17211   input_path="$new_path"
17212   # Check if we need to convert this using DOS-style short mode. If the path
17213   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17214   # take no chances and rewrite it.
17215   # Note: m4 eats our [], so we need to use [ and ] instead.
17216   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17217   if test "x$has_forbidden_chars" != x; then
17218     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17219     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17220   fi
17221 
17222     # Output is in $new_path
17223 
17224   windows_path="$new_path"
17225   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17226     unix_path=`$CYGPATH -u "$windows_path"`
17227     new_path="$unix_path"
17228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17229     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17230     new_path="$unix_path"
17231   fi
17232 
17233     # remove trailing .exe if any
17234     new_path="${new_path/%.exe/}"
17235 
17236     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17237     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17238   fi
17239 
17240     else
17241       # We're on a unix platform. Hooray! :)
17242       # First separate the path from the arguments. This will split at the first
17243       # space.
17244       complete="$FOUND_MAKE"
17245       path="${complete%% *}"
17246       tmp="$complete EOL"
17247       arguments="${tmp#* }"
17248 
17249       # Cannot rely on the command "which" here since it doesn't always work.
17250       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17251       if test -z "$is_absolute_path"; then
17252         # Path to executable is not absolute. Find it.
17253         IFS_save="$IFS"
17254         IFS=:
17255         for p in $PATH; do
17256           if test -f "$p/$path" && test -x "$p/$path"; then
17257             new_path="$p/$path"
17258             break
17259           fi
17260         done
17261         IFS="$IFS_save"
17262       else
17263         # This is an absolute path, we can use it without further modifications.
17264         new_path="$path"
17265       fi
17266 
17267       if test "x$new_path" = x; then
17268         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17269 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17270         has_space=`$ECHO "$complete" | $GREP " "`
17271         if test "x$has_space" != x; then
17272           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17273 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17274         fi
17275         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17276       fi
17277     fi
17278 
17279     # Now join together the path and the arguments once again
17280     if test "x$arguments" != xEOL; then
17281       new_complete="$new_path ${arguments% *}"
17282     else
17283       new_complete="$new_path"
17284     fi
17285 
17286     if test "x$complete" != "x$new_complete"; then
17287       FOUND_MAKE="$new_complete"
17288       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17289 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17290     fi
17291   fi
17292 
17293         fi
17294       fi
17295     fi
17296   fi
17297 
17298 
17299     if test "x$FOUND_MAKE" = x; then
17300       for ac_prog in make
17301 do
17302   # Extract the first word of "$ac_prog", so it can be a program name with args.
17303 set dummy $ac_prog; ac_word=$2
17304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17305 $as_echo_n "checking for $ac_word... " >&6; }
17306 if ${ac_cv_path_CHECK_MAKE+:} false; then :
17307   $as_echo_n "(cached) " >&6
17308 else
17309   case $CHECK_MAKE in
17310   [\\/]* | ?:[\\/]*)
17311   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17312   ;;
17313   *)
17314   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17315 for as_dir in $PATH
17316 do
17317   IFS=$as_save_IFS
17318   test -z "$as_dir" && as_dir=.
17319     for ac_exec_ext in '' $ac_executable_extensions; do
17320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17321     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17323     break 2
17324   fi
17325 done
17326   done
17327 IFS=$as_save_IFS
17328 
17329   ;;
17330 esac
17331 fi
17332 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17333 if test -n "$CHECK_MAKE"; then
17334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17335 $as_echo "$CHECK_MAKE" >&6; }
17336 else
17337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17338 $as_echo "no" >&6; }
17339 fi
17340 
17341 
17342   test -n "$CHECK_MAKE" && break
17343 done
17344 
17345 
17346   MAKE_CANDIDATE=""$CHECK_MAKE""
17347   DESCRIPTION="make in PATH"
17348 
17349   # On Cygwin, we require a newer version of make than on other platforms
17350   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17351     MAKE_VERSION_EXPR="-e 4\."
17352     MAKE_REQUIRED_VERSION="4.0"
17353    else
17354     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17355     MAKE_REQUIRED_VERSION="3.81"
17356   fi
17357 
17358   if test "x$MAKE_CANDIDATE" != x; then
17359     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17360 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17361     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17362     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17363     if test "x$IS_GNU_MAKE" = x; then
17364       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17365 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17366     else
17367       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17368       if test "x$IS_MODERN_MAKE" = x; then
17369         { $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
17370 $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;}
17371       else
17372         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17373           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17374             MAKE_EXPECTED_ENV='cygwin'
17375           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17376             MAKE_EXPECTED_ENV='msys'
17377           else
17378             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17379           fi
17380           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17381           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17382         else
17383           # Not relevant for non-Windows
17384           IS_MAKE_CORRECT_ENV=true
17385         fi
17386         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17387           { $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
17388 $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;}
17389         else
17390           FOUND_MAKE=$MAKE_CANDIDATE
17391 
17392   # Only process if variable expands to non-empty
17393 
17394   if test "x$FOUND_MAKE" != x; then
17395     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17396 
17397   # First separate the path from the arguments. This will split at the first
17398   # space.
17399   complete="$FOUND_MAKE"
17400   path="${complete%% *}"
17401   tmp="$complete EOL"
17402   arguments="${tmp#* }"
17403 
17404   # Input might be given as Windows format, start by converting to
17405   # unix format.
17406   new_path=`$CYGPATH -u "$path"`
17407 
17408   # Now try to locate executable using which
17409   new_path=`$WHICH "$new_path" 2> /dev/null`
17410   # bat and cmd files are not always considered executable in cygwin causing which
17411   # to not find them
17412   if test "x$new_path" = x \
17413       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17414       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17415     new_path=`$CYGPATH -u "$path"`
17416   fi
17417   if test "x$new_path" = x; then
17418     # Oops. Which didn't find the executable.
17419     # The splitting of arguments from the executable at a space might have been incorrect,
17420     # since paths with space are more likely in Windows. Give it another try with the whole
17421     # argument.
17422     path="$complete"
17423     arguments="EOL"
17424     new_path=`$CYGPATH -u "$path"`
17425     new_path=`$WHICH "$new_path" 2> /dev/null`
17426     # bat and cmd files are not always considered executable in cygwin causing which
17427     # to not find them
17428     if test "x$new_path" = x \
17429         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17430         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17431       new_path=`$CYGPATH -u "$path"`
17432     fi
17433     if test "x$new_path" = x; then
17434       # It's still not found. Now this is an unrecoverable error.
17435       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17436 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17437       has_space=`$ECHO "$complete" | $GREP " "`
17438       if test "x$has_space" != x; then
17439         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17440 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17441       fi
17442       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17443     fi
17444   fi
17445 
17446   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17447   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17448   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17449   # "foo.exe" is OK but "foo" is an error.
17450   #
17451   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17452   # It is also a way to make sure we got the proper file name for the real test later on.
17453   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17454   if test "x$test_shortpath" = x; then
17455     # Short path failed, file does not exist as specified.
17456     # Try adding .exe or .cmd
17457     if test -f "${new_path}.exe"; then
17458       input_to_shortpath="${new_path}.exe"
17459     elif test -f "${new_path}.cmd"; then
17460       input_to_shortpath="${new_path}.cmd"
17461     else
17462       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17463 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17464       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17465 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17466       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17467     fi
17468   else
17469     input_to_shortpath="$new_path"
17470   fi
17471 
17472   # Call helper function which possibly converts this using DOS-style short mode.
17473   # If so, the updated path is stored in $new_path.
17474   new_path="$input_to_shortpath"
17475 
17476   input_path="$input_to_shortpath"
17477   # Check if we need to convert this using DOS-style short mode. If the path
17478   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17479   # take no chances and rewrite it.
17480   # Note: m4 eats our [], so we need to use [ and ] instead.
17481   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17482   if test "x$has_forbidden_chars" != x; then
17483     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17484     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17485     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17486     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17487       # Going to short mode and back again did indeed matter. Since short mode is
17488       # case insensitive, let's make it lowercase to improve readability.
17489       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17490       # Now convert it back to Unix-style (cygpath)
17491       input_path=`$CYGPATH -u "$shortmode_path"`
17492       new_path="$input_path"
17493     fi
17494   fi
17495 
17496   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17497   if test "x$test_cygdrive_prefix" = x; then
17498     # As a simple fix, exclude /usr/bin since it's not a real path.
17499     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17500       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17501       # a path prefixed by /cygdrive for fixpath to work.
17502       new_path="$CYGWIN_ROOT_PATH$input_path"
17503     fi
17504   fi
17505 
17506   # remove trailing .exe if any
17507   new_path="${new_path/%.exe/}"
17508 
17509     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17510 
17511   # First separate the path from the arguments. This will split at the first
17512   # space.
17513   complete="$FOUND_MAKE"
17514   path="${complete%% *}"
17515   tmp="$complete EOL"
17516   arguments="${tmp#* }"
17517 
17518   # Input might be given as Windows format, start by converting to
17519   # unix format.
17520   new_path="$path"
17521 
17522   windows_path="$new_path"
17523   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17524     unix_path=`$CYGPATH -u "$windows_path"`
17525     new_path="$unix_path"
17526   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17527     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17528     new_path="$unix_path"
17529   fi
17530 
17531 
17532   # Now try to locate executable using which
17533   new_path=`$WHICH "$new_path" 2> /dev/null`
17534 
17535   if test "x$new_path" = x; then
17536     # Oops. Which didn't find the executable.
17537     # The splitting of arguments from the executable at a space might have been incorrect,
17538     # since paths with space are more likely in Windows. Give it another try with the whole
17539     # argument.
17540     path="$complete"
17541     arguments="EOL"
17542     new_path="$path"
17543 
17544   windows_path="$new_path"
17545   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17546     unix_path=`$CYGPATH -u "$windows_path"`
17547     new_path="$unix_path"
17548   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17549     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17550     new_path="$unix_path"
17551   fi
17552 
17553 
17554     new_path=`$WHICH "$new_path" 2> /dev/null`
17555     # bat and cmd files are not always considered executable in MSYS causing which
17556     # to not find them
17557     if test "x$new_path" = x \
17558         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17559         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17560       new_path="$path"
17561 
17562   windows_path="$new_path"
17563   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17564     unix_path=`$CYGPATH -u "$windows_path"`
17565     new_path="$unix_path"
17566   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17567     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17568     new_path="$unix_path"
17569   fi
17570 
17571     fi
17572 
17573     if test "x$new_path" = x; then
17574       # It's still not found. Now this is an unrecoverable error.
17575       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17576 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17577       has_space=`$ECHO "$complete" | $GREP " "`
17578       if test "x$has_space" != x; then
17579         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17580 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17581       fi
17582       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17583     fi
17584   fi
17585 
17586   # Now new_path has a complete unix path to the binary
17587   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17588     # Keep paths in /bin as-is, but remove trailing .exe if any
17589     new_path="${new_path/%.exe/}"
17590     # Do not save /bin paths to all_fixpath_prefixes!
17591   else
17592     # Not in mixed or Windows style, start by that.
17593     new_path=`cmd //c echo $new_path`
17594 
17595   input_path="$new_path"
17596   # Check if we need to convert this using DOS-style short mode. If the path
17597   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17598   # take no chances and rewrite it.
17599   # Note: m4 eats our [], so we need to use [ and ] instead.
17600   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17601   if test "x$has_forbidden_chars" != x; then
17602     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17603     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17604   fi
17605 
17606     # Output is in $new_path
17607 
17608   windows_path="$new_path"
17609   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17610     unix_path=`$CYGPATH -u "$windows_path"`
17611     new_path="$unix_path"
17612   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17613     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17614     new_path="$unix_path"
17615   fi
17616 
17617     # remove trailing .exe if any
17618     new_path="${new_path/%.exe/}"
17619 
17620     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17621     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17622   fi
17623 
17624     else
17625       # We're on a unix platform. Hooray! :)
17626       # First separate the path from the arguments. This will split at the first
17627       # space.
17628       complete="$FOUND_MAKE"
17629       path="${complete%% *}"
17630       tmp="$complete EOL"
17631       arguments="${tmp#* }"
17632 
17633       # Cannot rely on the command "which" here since it doesn't always work.
17634       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17635       if test -z "$is_absolute_path"; then
17636         # Path to executable is not absolute. Find it.
17637         IFS_save="$IFS"
17638         IFS=:
17639         for p in $PATH; do
17640           if test -f "$p/$path" && test -x "$p/$path"; then
17641             new_path="$p/$path"
17642             break
17643           fi
17644         done
17645         IFS="$IFS_save"
17646       else
17647         # This is an absolute path, we can use it without further modifications.
17648         new_path="$path"
17649       fi
17650 
17651       if test "x$new_path" = x; then
17652         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17653 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17654         has_space=`$ECHO "$complete" | $GREP " "`
17655         if test "x$has_space" != x; then
17656           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17657 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17658         fi
17659         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17660       fi
17661     fi
17662 
17663     # Now join together the path and the arguments once again
17664     if test "x$arguments" != xEOL; then
17665       new_complete="$new_path ${arguments% *}"
17666     else
17667       new_complete="$new_path"
17668     fi
17669 
17670     if test "x$complete" != "x$new_complete"; then
17671       FOUND_MAKE="$new_complete"
17672       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17673 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17674     fi
17675   fi
17676 
17677         fi
17678       fi
17679     fi
17680   fi
17681 
17682     fi
17683 
17684     if test "x$FOUND_MAKE" = x; then
17685       if test "x$TOOLCHAIN_PATH" != x; then
17686         # We have a toolchain path, check that as well before giving up.
17687         OLD_PATH=$PATH
17688         PATH=$TOOLCHAIN_PATH:$PATH
17689         for ac_prog in gmake
17690 do
17691   # Extract the first word of "$ac_prog", so it can be a program name with args.
17692 set dummy $ac_prog; ac_word=$2
17693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17694 $as_echo_n "checking for $ac_word... " >&6; }
17695 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17696   $as_echo_n "(cached) " >&6
17697 else
17698   case $CHECK_TOOLSDIR_GMAKE in
17699   [\\/]* | ?:[\\/]*)
17700   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17701   ;;
17702   *)
17703   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17704 for as_dir in $PATH
17705 do
17706   IFS=$as_save_IFS
17707   test -z "$as_dir" && as_dir=.
17708     for ac_exec_ext in '' $ac_executable_extensions; do
17709   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17710     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17711     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17712     break 2
17713   fi
17714 done
17715   done
17716 IFS=$as_save_IFS
17717 
17718   ;;
17719 esac
17720 fi
17721 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17722 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17724 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17725 else
17726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17727 $as_echo "no" >&6; }
17728 fi
17729 
17730 
17731   test -n "$CHECK_TOOLSDIR_GMAKE" && break
17732 done
17733 
17734 
17735   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17736   DESCRIPTION="gmake in tools-dir"
17737 
17738   # On Cygwin, we require a newer version of make than on other platforms
17739   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17740     MAKE_VERSION_EXPR="-e 4\."
17741     MAKE_REQUIRED_VERSION="4.0"
17742    else
17743     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17744     MAKE_REQUIRED_VERSION="3.81"
17745   fi
17746 
17747   if test "x$MAKE_CANDIDATE" != x; then
17748     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17749 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17750     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17751     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17752     if test "x$IS_GNU_MAKE" = x; then
17753       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17754 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17755     else
17756       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17757       if test "x$IS_MODERN_MAKE" = x; then
17758         { $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
17759 $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;}
17760       else
17761         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17762           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17763             MAKE_EXPECTED_ENV='cygwin'
17764           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17765             MAKE_EXPECTED_ENV='msys'
17766           else
17767             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17768           fi
17769           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17770           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17771         else
17772           # Not relevant for non-Windows
17773           IS_MAKE_CORRECT_ENV=true
17774         fi
17775         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17776           { $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
17777 $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;}
17778         else
17779           FOUND_MAKE=$MAKE_CANDIDATE
17780 
17781   # Only process if variable expands to non-empty
17782 
17783   if test "x$FOUND_MAKE" != x; then
17784     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17785 
17786   # First separate the path from the arguments. This will split at the first
17787   # space.
17788   complete="$FOUND_MAKE"
17789   path="${complete%% *}"
17790   tmp="$complete EOL"
17791   arguments="${tmp#* }"
17792 
17793   # Input might be given as Windows format, start by converting to
17794   # unix format.
17795   new_path=`$CYGPATH -u "$path"`
17796 
17797   # Now try to locate executable using which
17798   new_path=`$WHICH "$new_path" 2> /dev/null`
17799   # bat and cmd files are not always considered executable in cygwin causing which
17800   # to not find them
17801   if test "x$new_path" = x \
17802       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17803       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17804     new_path=`$CYGPATH -u "$path"`
17805   fi
17806   if test "x$new_path" = x; then
17807     # Oops. Which didn't find the executable.
17808     # The splitting of arguments from the executable at a space might have been incorrect,
17809     # since paths with space are more likely in Windows. Give it another try with the whole
17810     # argument.
17811     path="$complete"
17812     arguments="EOL"
17813     new_path=`$CYGPATH -u "$path"`
17814     new_path=`$WHICH "$new_path" 2> /dev/null`
17815     # bat and cmd files are not always considered executable in cygwin causing which
17816     # to not find them
17817     if test "x$new_path" = x \
17818         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17819         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17820       new_path=`$CYGPATH -u "$path"`
17821     fi
17822     if test "x$new_path" = x; then
17823       # It's still not found. Now this is an unrecoverable error.
17824       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17825 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17826       has_space=`$ECHO "$complete" | $GREP " "`
17827       if test "x$has_space" != x; then
17828         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17829 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17830       fi
17831       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17832     fi
17833   fi
17834 
17835   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17836   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17837   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17838   # "foo.exe" is OK but "foo" is an error.
17839   #
17840   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17841   # It is also a way to make sure we got the proper file name for the real test later on.
17842   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17843   if test "x$test_shortpath" = x; then
17844     # Short path failed, file does not exist as specified.
17845     # Try adding .exe or .cmd
17846     if test -f "${new_path}.exe"; then
17847       input_to_shortpath="${new_path}.exe"
17848     elif test -f "${new_path}.cmd"; then
17849       input_to_shortpath="${new_path}.cmd"
17850     else
17851       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17852 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17853       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17854 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17855       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17856     fi
17857   else
17858     input_to_shortpath="$new_path"
17859   fi
17860 
17861   # Call helper function which possibly converts this using DOS-style short mode.
17862   # If so, the updated path is stored in $new_path.
17863   new_path="$input_to_shortpath"
17864 
17865   input_path="$input_to_shortpath"
17866   # Check if we need to convert this using DOS-style short mode. If the path
17867   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17868   # take no chances and rewrite it.
17869   # Note: m4 eats our [], so we need to use [ and ] instead.
17870   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17871   if test "x$has_forbidden_chars" != x; then
17872     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17873     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17874     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17875     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17876       # Going to short mode and back again did indeed matter. Since short mode is
17877       # case insensitive, let's make it lowercase to improve readability.
17878       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17879       # Now convert it back to Unix-style (cygpath)
17880       input_path=`$CYGPATH -u "$shortmode_path"`
17881       new_path="$input_path"
17882     fi
17883   fi
17884 
17885   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17886   if test "x$test_cygdrive_prefix" = x; then
17887     # As a simple fix, exclude /usr/bin since it's not a real path.
17888     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17889       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17890       # a path prefixed by /cygdrive for fixpath to work.
17891       new_path="$CYGWIN_ROOT_PATH$input_path"
17892     fi
17893   fi
17894 
17895   # remove trailing .exe if any
17896   new_path="${new_path/%.exe/}"
17897 
17898     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17899 
17900   # First separate the path from the arguments. This will split at the first
17901   # space.
17902   complete="$FOUND_MAKE"
17903   path="${complete%% *}"
17904   tmp="$complete EOL"
17905   arguments="${tmp#* }"
17906 
17907   # Input might be given as Windows format, start by converting to
17908   # unix format.
17909   new_path="$path"
17910 
17911   windows_path="$new_path"
17912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17913     unix_path=`$CYGPATH -u "$windows_path"`
17914     new_path="$unix_path"
17915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17917     new_path="$unix_path"
17918   fi
17919 
17920 
17921   # Now try to locate executable using which
17922   new_path=`$WHICH "$new_path" 2> /dev/null`
17923 
17924   if test "x$new_path" = x; then
17925     # Oops. Which didn't find the executable.
17926     # The splitting of arguments from the executable at a space might have been incorrect,
17927     # since paths with space are more likely in Windows. Give it another try with the whole
17928     # argument.
17929     path="$complete"
17930     arguments="EOL"
17931     new_path="$path"
17932 
17933   windows_path="$new_path"
17934   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17935     unix_path=`$CYGPATH -u "$windows_path"`
17936     new_path="$unix_path"
17937   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17938     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17939     new_path="$unix_path"
17940   fi
17941 
17942 
17943     new_path=`$WHICH "$new_path" 2> /dev/null`
17944     # bat and cmd files are not always considered executable in MSYS causing which
17945     # to not find them
17946     if test "x$new_path" = x \
17947         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17948         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17949       new_path="$path"
17950 
17951   windows_path="$new_path"
17952   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17953     unix_path=`$CYGPATH -u "$windows_path"`
17954     new_path="$unix_path"
17955   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17956     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17957     new_path="$unix_path"
17958   fi
17959 
17960     fi
17961 
17962     if test "x$new_path" = x; then
17963       # It's still not found. Now this is an unrecoverable error.
17964       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17965 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17966       has_space=`$ECHO "$complete" | $GREP " "`
17967       if test "x$has_space" != x; then
17968         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17969 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17970       fi
17971       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17972     fi
17973   fi
17974 
17975   # Now new_path has a complete unix path to the binary
17976   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17977     # Keep paths in /bin as-is, but remove trailing .exe if any
17978     new_path="${new_path/%.exe/}"
17979     # Do not save /bin paths to all_fixpath_prefixes!
17980   else
17981     # Not in mixed or Windows style, start by that.
17982     new_path=`cmd //c echo $new_path`
17983 
17984   input_path="$new_path"
17985   # Check if we need to convert this using DOS-style short mode. If the path
17986   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17987   # take no chances and rewrite it.
17988   # Note: m4 eats our [], so we need to use [ and ] instead.
17989   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17990   if test "x$has_forbidden_chars" != x; then
17991     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17992     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17993   fi
17994 
17995     # Output is in $new_path
17996 
17997   windows_path="$new_path"
17998   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17999     unix_path=`$CYGPATH -u "$windows_path"`
18000     new_path="$unix_path"
18001   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18002     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18003     new_path="$unix_path"
18004   fi
18005 
18006     # remove trailing .exe if any
18007     new_path="${new_path/%.exe/}"
18008 
18009     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18010     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18011   fi
18012 
18013     else
18014       # We're on a unix platform. Hooray! :)
18015       # First separate the path from the arguments. This will split at the first
18016       # space.
18017       complete="$FOUND_MAKE"
18018       path="${complete%% *}"
18019       tmp="$complete EOL"
18020       arguments="${tmp#* }"
18021 
18022       # Cannot rely on the command "which" here since it doesn't always work.
18023       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18024       if test -z "$is_absolute_path"; then
18025         # Path to executable is not absolute. Find it.
18026         IFS_save="$IFS"
18027         IFS=:
18028         for p in $PATH; do
18029           if test -f "$p/$path" && test -x "$p/$path"; then
18030             new_path="$p/$path"
18031             break
18032           fi
18033         done
18034         IFS="$IFS_save"
18035       else
18036         # This is an absolute path, we can use it without further modifications.
18037         new_path="$path"
18038       fi
18039 
18040       if test "x$new_path" = x; then
18041         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18042 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18043         has_space=`$ECHO "$complete" | $GREP " "`
18044         if test "x$has_space" != x; then
18045           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18046 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18047         fi
18048         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18049       fi
18050     fi
18051 
18052     # Now join together the path and the arguments once again
18053     if test "x$arguments" != xEOL; then
18054       new_complete="$new_path ${arguments% *}"
18055     else
18056       new_complete="$new_path"
18057     fi
18058 
18059     if test "x$complete" != "x$new_complete"; then
18060       FOUND_MAKE="$new_complete"
18061       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18062 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18063     fi
18064   fi
18065 
18066         fi
18067       fi
18068     fi
18069   fi
18070 
18071         if test "x$FOUND_MAKE" = x; then
18072           for ac_prog in make
18073 do
18074   # Extract the first word of "$ac_prog", so it can be a program name with args.
18075 set dummy $ac_prog; ac_word=$2
18076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18077 $as_echo_n "checking for $ac_word... " >&6; }
18078 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18079   $as_echo_n "(cached) " >&6
18080 else
18081   case $CHECK_TOOLSDIR_MAKE in
18082   [\\/]* | ?:[\\/]*)
18083   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18084   ;;
18085   *)
18086   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18087 for as_dir in $PATH
18088 do
18089   IFS=$as_save_IFS
18090   test -z "$as_dir" && as_dir=.
18091     for ac_exec_ext in '' $ac_executable_extensions; do
18092   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18093     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18094     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18095     break 2
18096   fi
18097 done
18098   done
18099 IFS=$as_save_IFS
18100 
18101   ;;
18102 esac
18103 fi
18104 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18105 if test -n "$CHECK_TOOLSDIR_MAKE"; then
18106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18107 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18108 else
18109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18110 $as_echo "no" >&6; }
18111 fi
18112 
18113 
18114   test -n "$CHECK_TOOLSDIR_MAKE" && break
18115 done
18116 
18117 
18118   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18119   DESCRIPTION="make in tools-dir"
18120 
18121   # On Cygwin, we require a newer version of make than on other platforms
18122   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18123     MAKE_VERSION_EXPR="-e 4\."
18124     MAKE_REQUIRED_VERSION="4.0"
18125    else
18126     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18127     MAKE_REQUIRED_VERSION="3.81"
18128   fi
18129 
18130   if test "x$MAKE_CANDIDATE" != x; then
18131     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18132 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18133     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18134     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18135     if test "x$IS_GNU_MAKE" = x; then
18136       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18137 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18138     else
18139       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18140       if test "x$IS_MODERN_MAKE" = x; then
18141         { $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
18142 $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;}
18143       else
18144         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18145           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18146             MAKE_EXPECTED_ENV='cygwin'
18147           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18148             MAKE_EXPECTED_ENV='msys'
18149           else
18150             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18151           fi
18152           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18153           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18154         else
18155           # Not relevant for non-Windows
18156           IS_MAKE_CORRECT_ENV=true
18157         fi
18158         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18159           { $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
18160 $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;}
18161         else
18162           FOUND_MAKE=$MAKE_CANDIDATE
18163 
18164   # Only process if variable expands to non-empty
18165 
18166   if test "x$FOUND_MAKE" != x; then
18167     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18168 
18169   # First separate the path from the arguments. This will split at the first
18170   # space.
18171   complete="$FOUND_MAKE"
18172   path="${complete%% *}"
18173   tmp="$complete EOL"
18174   arguments="${tmp#* }"
18175 
18176   # Input might be given as Windows format, start by converting to
18177   # unix format.
18178   new_path=`$CYGPATH -u "$path"`
18179 
18180   # Now try to locate executable using which
18181   new_path=`$WHICH "$new_path" 2> /dev/null`
18182   # bat and cmd files are not always considered executable in cygwin causing which
18183   # to not find them
18184   if test "x$new_path" = x \
18185       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18186       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18187     new_path=`$CYGPATH -u "$path"`
18188   fi
18189   if test "x$new_path" = x; then
18190     # Oops. Which didn't find the executable.
18191     # The splitting of arguments from the executable at a space might have been incorrect,
18192     # since paths with space are more likely in Windows. Give it another try with the whole
18193     # argument.
18194     path="$complete"
18195     arguments="EOL"
18196     new_path=`$CYGPATH -u "$path"`
18197     new_path=`$WHICH "$new_path" 2> /dev/null`
18198     # bat and cmd files are not always considered executable in cygwin causing which
18199     # to not find them
18200     if test "x$new_path" = x \
18201         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18202         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18203       new_path=`$CYGPATH -u "$path"`
18204     fi
18205     if test "x$new_path" = x; then
18206       # It's still not found. Now this is an unrecoverable error.
18207       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18208 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18209       has_space=`$ECHO "$complete" | $GREP " "`
18210       if test "x$has_space" != x; then
18211         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18212 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18213       fi
18214       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18215     fi
18216   fi
18217 
18218   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18219   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18220   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18221   # "foo.exe" is OK but "foo" is an error.
18222   #
18223   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18224   # It is also a way to make sure we got the proper file name for the real test later on.
18225   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18226   if test "x$test_shortpath" = x; then
18227     # Short path failed, file does not exist as specified.
18228     # Try adding .exe or .cmd
18229     if test -f "${new_path}.exe"; then
18230       input_to_shortpath="${new_path}.exe"
18231     elif test -f "${new_path}.cmd"; then
18232       input_to_shortpath="${new_path}.cmd"
18233     else
18234       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18235 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18236       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18237 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18238       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18239     fi
18240   else
18241     input_to_shortpath="$new_path"
18242   fi
18243 
18244   # Call helper function which possibly converts this using DOS-style short mode.
18245   # If so, the updated path is stored in $new_path.
18246   new_path="$input_to_shortpath"
18247 
18248   input_path="$input_to_shortpath"
18249   # Check if we need to convert this using DOS-style short mode. If the path
18250   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18251   # take no chances and rewrite it.
18252   # Note: m4 eats our [], so we need to use [ and ] instead.
18253   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18254   if test "x$has_forbidden_chars" != x; then
18255     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18256     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18257     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18258     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18259       # Going to short mode and back again did indeed matter. Since short mode is
18260       # case insensitive, let's make it lowercase to improve readability.
18261       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18262       # Now convert it back to Unix-style (cygpath)
18263       input_path=`$CYGPATH -u "$shortmode_path"`
18264       new_path="$input_path"
18265     fi
18266   fi
18267 
18268   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18269   if test "x$test_cygdrive_prefix" = x; then
18270     # As a simple fix, exclude /usr/bin since it's not a real path.
18271     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18272       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18273       # a path prefixed by /cygdrive for fixpath to work.
18274       new_path="$CYGWIN_ROOT_PATH$input_path"
18275     fi
18276   fi
18277 
18278   # remove trailing .exe if any
18279   new_path="${new_path/%.exe/}"
18280 
18281     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18282 
18283   # First separate the path from the arguments. This will split at the first
18284   # space.
18285   complete="$FOUND_MAKE"
18286   path="${complete%% *}"
18287   tmp="$complete EOL"
18288   arguments="${tmp#* }"
18289 
18290   # Input might be given as Windows format, start by converting to
18291   # unix format.
18292   new_path="$path"
18293 
18294   windows_path="$new_path"
18295   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18296     unix_path=`$CYGPATH -u "$windows_path"`
18297     new_path="$unix_path"
18298   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18299     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18300     new_path="$unix_path"
18301   fi
18302 
18303 
18304   # Now try to locate executable using which
18305   new_path=`$WHICH "$new_path" 2> /dev/null`
18306 
18307   if test "x$new_path" = x; then
18308     # Oops. Which didn't find the executable.
18309     # The splitting of arguments from the executable at a space might have been incorrect,
18310     # since paths with space are more likely in Windows. Give it another try with the whole
18311     # argument.
18312     path="$complete"
18313     arguments="EOL"
18314     new_path="$path"
18315 
18316   windows_path="$new_path"
18317   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18318     unix_path=`$CYGPATH -u "$windows_path"`
18319     new_path="$unix_path"
18320   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18321     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18322     new_path="$unix_path"
18323   fi
18324 
18325 
18326     new_path=`$WHICH "$new_path" 2> /dev/null`
18327     # bat and cmd files are not always considered executable in MSYS causing which
18328     # to not find them
18329     if test "x$new_path" = x \
18330         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18331         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18332       new_path="$path"
18333 
18334   windows_path="$new_path"
18335   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18336     unix_path=`$CYGPATH -u "$windows_path"`
18337     new_path="$unix_path"
18338   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18339     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18340     new_path="$unix_path"
18341   fi
18342 
18343     fi
18344 
18345     if test "x$new_path" = x; then
18346       # It's still not found. Now this is an unrecoverable error.
18347       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18348 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18349       has_space=`$ECHO "$complete" | $GREP " "`
18350       if test "x$has_space" != x; then
18351         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18352 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18353       fi
18354       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18355     fi
18356   fi
18357 
18358   # Now new_path has a complete unix path to the binary
18359   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18360     # Keep paths in /bin as-is, but remove trailing .exe if any
18361     new_path="${new_path/%.exe/}"
18362     # Do not save /bin paths to all_fixpath_prefixes!
18363   else
18364     # Not in mixed or Windows style, start by that.
18365     new_path=`cmd //c echo $new_path`
18366 
18367   input_path="$new_path"
18368   # Check if we need to convert this using DOS-style short mode. If the path
18369   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18370   # take no chances and rewrite it.
18371   # Note: m4 eats our [], so we need to use [ and ] instead.
18372   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18373   if test "x$has_forbidden_chars" != x; then
18374     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18375     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18376   fi
18377 
18378     # Output is in $new_path
18379 
18380   windows_path="$new_path"
18381   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18382     unix_path=`$CYGPATH -u "$windows_path"`
18383     new_path="$unix_path"
18384   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18385     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18386     new_path="$unix_path"
18387   fi
18388 
18389     # remove trailing .exe if any
18390     new_path="${new_path/%.exe/}"
18391 
18392     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18393     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18394   fi
18395 
18396     else
18397       # We're on a unix platform. Hooray! :)
18398       # First separate the path from the arguments. This will split at the first
18399       # space.
18400       complete="$FOUND_MAKE"
18401       path="${complete%% *}"
18402       tmp="$complete EOL"
18403       arguments="${tmp#* }"
18404 
18405       # Cannot rely on the command "which" here since it doesn't always work.
18406       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18407       if test -z "$is_absolute_path"; then
18408         # Path to executable is not absolute. Find it.
18409         IFS_save="$IFS"
18410         IFS=:
18411         for p in $PATH; do
18412           if test -f "$p/$path" && test -x "$p/$path"; then
18413             new_path="$p/$path"
18414             break
18415           fi
18416         done
18417         IFS="$IFS_save"
18418       else
18419         # This is an absolute path, we can use it without further modifications.
18420         new_path="$path"
18421       fi
18422 
18423       if test "x$new_path" = x; then
18424         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18425 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18426         has_space=`$ECHO "$complete" | $GREP " "`
18427         if test "x$has_space" != x; then
18428           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18429 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18430         fi
18431         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18432       fi
18433     fi
18434 
18435     # Now join together the path and the arguments once again
18436     if test "x$arguments" != xEOL; then
18437       new_complete="$new_path ${arguments% *}"
18438     else
18439       new_complete="$new_path"
18440     fi
18441 
18442     if test "x$complete" != "x$new_complete"; then
18443       FOUND_MAKE="$new_complete"
18444       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18445 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18446     fi
18447   fi
18448 
18449         fi
18450       fi
18451     fi
18452   fi
18453 
18454         fi
18455         PATH=$OLD_PATH
18456       fi
18457     fi
18458 
18459     if test "x$FOUND_MAKE" = x; then
18460       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
18461     fi
18462 
18463   else
18464     # The variable is set, but is it from the command line or the environment?
18465 
18466     # Try to remove the string !MAKE! from our list.
18467     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18468     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18469       # If it failed, the variable was not from the command line. Ignore it,
18470       # but warn the user (except for BASH, which is always set by the calling BASH).
18471       if test "xMAKE" != xBASH; then
18472         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18473 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18474       fi
18475       # Try to locate tool using the code snippet
18476 
18477     # Try our hardest to locate a correct version of GNU make
18478     for ac_prog in gmake
18479 do
18480   # Extract the first word of "$ac_prog", so it can be a program name with args.
18481 set dummy $ac_prog; ac_word=$2
18482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18483 $as_echo_n "checking for $ac_word... " >&6; }
18484 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18485   $as_echo_n "(cached) " >&6
18486 else
18487   case $CHECK_GMAKE in
18488   [\\/]* | ?:[\\/]*)
18489   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18490   ;;
18491   *)
18492   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18493 for as_dir in $PATH
18494 do
18495   IFS=$as_save_IFS
18496   test -z "$as_dir" && as_dir=.
18497     for ac_exec_ext in '' $ac_executable_extensions; do
18498   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18499     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18500     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18501     break 2
18502   fi
18503 done
18504   done
18505 IFS=$as_save_IFS
18506 
18507   ;;
18508 esac
18509 fi
18510 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18511 if test -n "$CHECK_GMAKE"; then
18512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18513 $as_echo "$CHECK_GMAKE" >&6; }
18514 else
18515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18516 $as_echo "no" >&6; }
18517 fi
18518 
18519 
18520   test -n "$CHECK_GMAKE" && break
18521 done
18522 
18523 
18524   MAKE_CANDIDATE=""$CHECK_GMAKE""
18525   DESCRIPTION="gmake in PATH"
18526 
18527   # On Cygwin, we require a newer version of make than on other platforms
18528   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18529     MAKE_VERSION_EXPR="-e 4\."
18530     MAKE_REQUIRED_VERSION="4.0"
18531    else
18532     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18533     MAKE_REQUIRED_VERSION="3.81"
18534   fi
18535 
18536   if test "x$MAKE_CANDIDATE" != x; then
18537     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18538 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18539     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18540     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18541     if test "x$IS_GNU_MAKE" = x; then
18542       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18543 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18544     else
18545       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18546       if test "x$IS_MODERN_MAKE" = x; then
18547         { $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
18548 $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;}
18549       else
18550         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18551           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18552             MAKE_EXPECTED_ENV='cygwin'
18553           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18554             MAKE_EXPECTED_ENV='msys'
18555           else
18556             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18557           fi
18558           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18559           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18560         else
18561           # Not relevant for non-Windows
18562           IS_MAKE_CORRECT_ENV=true
18563         fi
18564         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18565           { $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
18566 $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;}
18567         else
18568           FOUND_MAKE=$MAKE_CANDIDATE
18569 
18570   # Only process if variable expands to non-empty
18571 
18572   if test "x$FOUND_MAKE" != x; then
18573     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18574 
18575   # First separate the path from the arguments. This will split at the first
18576   # space.
18577   complete="$FOUND_MAKE"
18578   path="${complete%% *}"
18579   tmp="$complete EOL"
18580   arguments="${tmp#* }"
18581 
18582   # Input might be given as Windows format, start by converting to
18583   # unix format.
18584   new_path=`$CYGPATH -u "$path"`
18585 
18586   # Now try to locate executable using which
18587   new_path=`$WHICH "$new_path" 2> /dev/null`
18588   # bat and cmd files are not always considered executable in cygwin causing which
18589   # to not find them
18590   if test "x$new_path" = x \
18591       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18592       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18593     new_path=`$CYGPATH -u "$path"`
18594   fi
18595   if test "x$new_path" = x; then
18596     # Oops. Which didn't find the executable.
18597     # The splitting of arguments from the executable at a space might have been incorrect,
18598     # since paths with space are more likely in Windows. Give it another try with the whole
18599     # argument.
18600     path="$complete"
18601     arguments="EOL"
18602     new_path=`$CYGPATH -u "$path"`
18603     new_path=`$WHICH "$new_path" 2> /dev/null`
18604     # bat and cmd files are not always considered executable in cygwin causing which
18605     # to not find them
18606     if test "x$new_path" = x \
18607         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18608         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18609       new_path=`$CYGPATH -u "$path"`
18610     fi
18611     if test "x$new_path" = x; then
18612       # It's still not found. Now this is an unrecoverable error.
18613       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18614 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18615       has_space=`$ECHO "$complete" | $GREP " "`
18616       if test "x$has_space" != x; then
18617         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18618 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18619       fi
18620       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18621     fi
18622   fi
18623 
18624   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18625   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18626   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18627   # "foo.exe" is OK but "foo" is an error.
18628   #
18629   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18630   # It is also a way to make sure we got the proper file name for the real test later on.
18631   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18632   if test "x$test_shortpath" = x; then
18633     # Short path failed, file does not exist as specified.
18634     # Try adding .exe or .cmd
18635     if test -f "${new_path}.exe"; then
18636       input_to_shortpath="${new_path}.exe"
18637     elif test -f "${new_path}.cmd"; then
18638       input_to_shortpath="${new_path}.cmd"
18639     else
18640       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18641 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18642       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18643 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18644       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18645     fi
18646   else
18647     input_to_shortpath="$new_path"
18648   fi
18649 
18650   # Call helper function which possibly converts this using DOS-style short mode.
18651   # If so, the updated path is stored in $new_path.
18652   new_path="$input_to_shortpath"
18653 
18654   input_path="$input_to_shortpath"
18655   # Check if we need to convert this using DOS-style short mode. If the path
18656   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18657   # take no chances and rewrite it.
18658   # Note: m4 eats our [], so we need to use [ and ] instead.
18659   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18660   if test "x$has_forbidden_chars" != x; then
18661     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18662     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18663     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18664     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18665       # Going to short mode and back again did indeed matter. Since short mode is
18666       # case insensitive, let's make it lowercase to improve readability.
18667       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18668       # Now convert it back to Unix-style (cygpath)
18669       input_path=`$CYGPATH -u "$shortmode_path"`
18670       new_path="$input_path"
18671     fi
18672   fi
18673 
18674   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18675   if test "x$test_cygdrive_prefix" = x; then
18676     # As a simple fix, exclude /usr/bin since it's not a real path.
18677     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18678       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18679       # a path prefixed by /cygdrive for fixpath to work.
18680       new_path="$CYGWIN_ROOT_PATH$input_path"
18681     fi
18682   fi
18683 
18684   # remove trailing .exe if any
18685   new_path="${new_path/%.exe/}"
18686 
18687     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18688 
18689   # First separate the path from the arguments. This will split at the first
18690   # space.
18691   complete="$FOUND_MAKE"
18692   path="${complete%% *}"
18693   tmp="$complete EOL"
18694   arguments="${tmp#* }"
18695 
18696   # Input might be given as Windows format, start by converting to
18697   # unix format.
18698   new_path="$path"
18699 
18700   windows_path="$new_path"
18701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18702     unix_path=`$CYGPATH -u "$windows_path"`
18703     new_path="$unix_path"
18704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18705     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18706     new_path="$unix_path"
18707   fi
18708 
18709 
18710   # Now try to locate executable using which
18711   new_path=`$WHICH "$new_path" 2> /dev/null`
18712 
18713   if test "x$new_path" = x; then
18714     # Oops. Which didn't find the executable.
18715     # The splitting of arguments from the executable at a space might have been incorrect,
18716     # since paths with space are more likely in Windows. Give it another try with the whole
18717     # argument.
18718     path="$complete"
18719     arguments="EOL"
18720     new_path="$path"
18721 
18722   windows_path="$new_path"
18723   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18724     unix_path=`$CYGPATH -u "$windows_path"`
18725     new_path="$unix_path"
18726   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18727     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18728     new_path="$unix_path"
18729   fi
18730 
18731 
18732     new_path=`$WHICH "$new_path" 2> /dev/null`
18733     # bat and cmd files are not always considered executable in MSYS causing which
18734     # to not find them
18735     if test "x$new_path" = x \
18736         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18737         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18738       new_path="$path"
18739 
18740   windows_path="$new_path"
18741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18742     unix_path=`$CYGPATH -u "$windows_path"`
18743     new_path="$unix_path"
18744   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18745     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18746     new_path="$unix_path"
18747   fi
18748 
18749     fi
18750 
18751     if test "x$new_path" = x; then
18752       # It's still not found. Now this is an unrecoverable error.
18753       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18754 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18755       has_space=`$ECHO "$complete" | $GREP " "`
18756       if test "x$has_space" != x; then
18757         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18758 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18759       fi
18760       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18761     fi
18762   fi
18763 
18764   # Now new_path has a complete unix path to the binary
18765   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18766     # Keep paths in /bin as-is, but remove trailing .exe if any
18767     new_path="${new_path/%.exe/}"
18768     # Do not save /bin paths to all_fixpath_prefixes!
18769   else
18770     # Not in mixed or Windows style, start by that.
18771     new_path=`cmd //c echo $new_path`
18772 
18773   input_path="$new_path"
18774   # Check if we need to convert this using DOS-style short mode. If the path
18775   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18776   # take no chances and rewrite it.
18777   # Note: m4 eats our [], so we need to use [ and ] instead.
18778   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18779   if test "x$has_forbidden_chars" != x; then
18780     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18781     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18782   fi
18783 
18784     # Output is in $new_path
18785 
18786   windows_path="$new_path"
18787   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18788     unix_path=`$CYGPATH -u "$windows_path"`
18789     new_path="$unix_path"
18790   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18791     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18792     new_path="$unix_path"
18793   fi
18794 
18795     # remove trailing .exe if any
18796     new_path="${new_path/%.exe/}"
18797 
18798     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18799     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18800   fi
18801 
18802     else
18803       # We're on a unix platform. Hooray! :)
18804       # First separate the path from the arguments. This will split at the first
18805       # space.
18806       complete="$FOUND_MAKE"
18807       path="${complete%% *}"
18808       tmp="$complete EOL"
18809       arguments="${tmp#* }"
18810 
18811       # Cannot rely on the command "which" here since it doesn't always work.
18812       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18813       if test -z "$is_absolute_path"; then
18814         # Path to executable is not absolute. Find it.
18815         IFS_save="$IFS"
18816         IFS=:
18817         for p in $PATH; do
18818           if test -f "$p/$path" && test -x "$p/$path"; then
18819             new_path="$p/$path"
18820             break
18821           fi
18822         done
18823         IFS="$IFS_save"
18824       else
18825         # This is an absolute path, we can use it without further modifications.
18826         new_path="$path"
18827       fi
18828 
18829       if test "x$new_path" = x; then
18830         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18831 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18832         has_space=`$ECHO "$complete" | $GREP " "`
18833         if test "x$has_space" != x; then
18834           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18835 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18836         fi
18837         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18838       fi
18839     fi
18840 
18841     # Now join together the path and the arguments once again
18842     if test "x$arguments" != xEOL; then
18843       new_complete="$new_path ${arguments% *}"
18844     else
18845       new_complete="$new_path"
18846     fi
18847 
18848     if test "x$complete" != "x$new_complete"; then
18849       FOUND_MAKE="$new_complete"
18850       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18851 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18852     fi
18853   fi
18854 
18855         fi
18856       fi
18857     fi
18858   fi
18859 
18860 
18861     if test "x$FOUND_MAKE" = x; then
18862       for ac_prog in make
18863 do
18864   # Extract the first word of "$ac_prog", so it can be a program name with args.
18865 set dummy $ac_prog; ac_word=$2
18866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18867 $as_echo_n "checking for $ac_word... " >&6; }
18868 if ${ac_cv_path_CHECK_MAKE+:} false; then :
18869   $as_echo_n "(cached) " >&6
18870 else
18871   case $CHECK_MAKE in
18872   [\\/]* | ?:[\\/]*)
18873   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18874   ;;
18875   *)
18876   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18877 for as_dir in $PATH
18878 do
18879   IFS=$as_save_IFS
18880   test -z "$as_dir" && as_dir=.
18881     for ac_exec_ext in '' $ac_executable_extensions; do
18882   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18883     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18884     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18885     break 2
18886   fi
18887 done
18888   done
18889 IFS=$as_save_IFS
18890 
18891   ;;
18892 esac
18893 fi
18894 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18895 if test -n "$CHECK_MAKE"; then
18896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18897 $as_echo "$CHECK_MAKE" >&6; }
18898 else
18899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18900 $as_echo "no" >&6; }
18901 fi
18902 
18903 
18904   test -n "$CHECK_MAKE" && break
18905 done
18906 
18907 
18908   MAKE_CANDIDATE=""$CHECK_MAKE""
18909   DESCRIPTION="make in PATH"
18910 
18911   # On Cygwin, we require a newer version of make than on other platforms
18912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18913     MAKE_VERSION_EXPR="-e 4\."
18914     MAKE_REQUIRED_VERSION="4.0"
18915    else
18916     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18917     MAKE_REQUIRED_VERSION="3.81"
18918   fi
18919 
18920   if test "x$MAKE_CANDIDATE" != x; then
18921     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18922 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18923     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18924     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18925     if test "x$IS_GNU_MAKE" = x; then
18926       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18927 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18928     else
18929       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18930       if test "x$IS_MODERN_MAKE" = x; then
18931         { $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
18932 $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;}
18933       else
18934         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18935           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18936             MAKE_EXPECTED_ENV='cygwin'
18937           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18938             MAKE_EXPECTED_ENV='msys'
18939           else
18940             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18941           fi
18942           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18943           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18944         else
18945           # Not relevant for non-Windows
18946           IS_MAKE_CORRECT_ENV=true
18947         fi
18948         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18949           { $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
18950 $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;}
18951         else
18952           FOUND_MAKE=$MAKE_CANDIDATE
18953 
18954   # Only process if variable expands to non-empty
18955 
18956   if test "x$FOUND_MAKE" != x; then
18957     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; 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=`$CYGPATH -u "$path"`
18969 
18970   # Now try to locate executable using which
18971   new_path=`$WHICH "$new_path" 2> /dev/null`
18972   # bat and cmd files are not always considered executable in cygwin causing which
18973   # to not find them
18974   if test "x$new_path" = x \
18975       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18976       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18977     new_path=`$CYGPATH -u "$path"`
18978   fi
18979   if test "x$new_path" = x; then
18980     # Oops. Which didn't find the executable.
18981     # The splitting of arguments from the executable at a space might have been incorrect,
18982     # since paths with space are more likely in Windows. Give it another try with the whole
18983     # argument.
18984     path="$complete"
18985     arguments="EOL"
18986     new_path=`$CYGPATH -u "$path"`
18987     new_path=`$WHICH "$new_path" 2> /dev/null`
18988     # bat and cmd files are not always considered executable in cygwin causing which
18989     # to not find them
18990     if test "x$new_path" = x \
18991         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18992         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18993       new_path=`$CYGPATH -u "$path"`
18994     fi
18995     if test "x$new_path" = x; then
18996       # It's still not found. Now this is an unrecoverable error.
18997       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18998 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18999       has_space=`$ECHO "$complete" | $GREP " "`
19000       if test "x$has_space" != x; then
19001         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19002 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19003       fi
19004       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19005     fi
19006   fi
19007 
19008   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19009   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19010   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19011   # "foo.exe" is OK but "foo" is an error.
19012   #
19013   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19014   # It is also a way to make sure we got the proper file name for the real test later on.
19015   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19016   if test "x$test_shortpath" = x; then
19017     # Short path failed, file does not exist as specified.
19018     # Try adding .exe or .cmd
19019     if test -f "${new_path}.exe"; then
19020       input_to_shortpath="${new_path}.exe"
19021     elif test -f "${new_path}.cmd"; then
19022       input_to_shortpath="${new_path}.cmd"
19023     else
19024       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19025 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19026       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19027 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19028       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19029     fi
19030   else
19031     input_to_shortpath="$new_path"
19032   fi
19033 
19034   # Call helper function which possibly converts this using DOS-style short mode.
19035   # If so, the updated path is stored in $new_path.
19036   new_path="$input_to_shortpath"
19037 
19038   input_path="$input_to_shortpath"
19039   # Check if we need to convert this using DOS-style short mode. If the path
19040   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19041   # take no chances and rewrite it.
19042   # Note: m4 eats our [], so we need to use [ and ] instead.
19043   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19044   if test "x$has_forbidden_chars" != x; then
19045     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19046     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19047     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19048     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19049       # Going to short mode and back again did indeed matter. Since short mode is
19050       # case insensitive, let's make it lowercase to improve readability.
19051       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19052       # Now convert it back to Unix-style (cygpath)
19053       input_path=`$CYGPATH -u "$shortmode_path"`
19054       new_path="$input_path"
19055     fi
19056   fi
19057 
19058   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19059   if test "x$test_cygdrive_prefix" = x; then
19060     # As a simple fix, exclude /usr/bin since it's not a real path.
19061     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19062       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19063       # a path prefixed by /cygdrive for fixpath to work.
19064       new_path="$CYGWIN_ROOT_PATH$input_path"
19065     fi
19066   fi
19067 
19068   # remove trailing .exe if any
19069   new_path="${new_path/%.exe/}"
19070 
19071     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19072 
19073   # First separate the path from the arguments. This will split at the first
19074   # space.
19075   complete="$FOUND_MAKE"
19076   path="${complete%% *}"
19077   tmp="$complete EOL"
19078   arguments="${tmp#* }"
19079 
19080   # Input might be given as Windows format, start by converting to
19081   # unix format.
19082   new_path="$path"
19083 
19084   windows_path="$new_path"
19085   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19086     unix_path=`$CYGPATH -u "$windows_path"`
19087     new_path="$unix_path"
19088   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19089     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19090     new_path="$unix_path"
19091   fi
19092 
19093 
19094   # Now try to locate executable using which
19095   new_path=`$WHICH "$new_path" 2> /dev/null`
19096 
19097   if test "x$new_path" = x; then
19098     # Oops. Which didn't find the executable.
19099     # The splitting of arguments from the executable at a space might have been incorrect,
19100     # since paths with space are more likely in Windows. Give it another try with the whole
19101     # argument.
19102     path="$complete"
19103     arguments="EOL"
19104     new_path="$path"
19105 
19106   windows_path="$new_path"
19107   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19108     unix_path=`$CYGPATH -u "$windows_path"`
19109     new_path="$unix_path"
19110   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19111     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19112     new_path="$unix_path"
19113   fi
19114 
19115 
19116     new_path=`$WHICH "$new_path" 2> /dev/null`
19117     # bat and cmd files are not always considered executable in MSYS causing which
19118     # to not find them
19119     if test "x$new_path" = x \
19120         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19121         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19122       new_path="$path"
19123 
19124   windows_path="$new_path"
19125   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19126     unix_path=`$CYGPATH -u "$windows_path"`
19127     new_path="$unix_path"
19128   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19129     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19130     new_path="$unix_path"
19131   fi
19132 
19133     fi
19134 
19135     if test "x$new_path" = x; then
19136       # It's still not found. Now this is an unrecoverable error.
19137       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19138 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19139       has_space=`$ECHO "$complete" | $GREP " "`
19140       if test "x$has_space" != x; then
19141         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19142 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19143       fi
19144       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19145     fi
19146   fi
19147 
19148   # Now new_path has a complete unix path to the binary
19149   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19150     # Keep paths in /bin as-is, but remove trailing .exe if any
19151     new_path="${new_path/%.exe/}"
19152     # Do not save /bin paths to all_fixpath_prefixes!
19153   else
19154     # Not in mixed or Windows style, start by that.
19155     new_path=`cmd //c echo $new_path`
19156 
19157   input_path="$new_path"
19158   # Check if we need to convert this using DOS-style short mode. If the path
19159   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19160   # take no chances and rewrite it.
19161   # Note: m4 eats our [], so we need to use [ and ] instead.
19162   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19163   if test "x$has_forbidden_chars" != x; then
19164     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19165     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19166   fi
19167 
19168     # Output is in $new_path
19169 
19170   windows_path="$new_path"
19171   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19172     unix_path=`$CYGPATH -u "$windows_path"`
19173     new_path="$unix_path"
19174   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19175     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19176     new_path="$unix_path"
19177   fi
19178 
19179     # remove trailing .exe if any
19180     new_path="${new_path/%.exe/}"
19181 
19182     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19183     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19184   fi
19185 
19186     else
19187       # We're on a unix platform. Hooray! :)
19188       # First separate the path from the arguments. This will split at the first
19189       # space.
19190       complete="$FOUND_MAKE"
19191       path="${complete%% *}"
19192       tmp="$complete EOL"
19193       arguments="${tmp#* }"
19194 
19195       # Cannot rely on the command "which" here since it doesn't always work.
19196       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19197       if test -z "$is_absolute_path"; then
19198         # Path to executable is not absolute. Find it.
19199         IFS_save="$IFS"
19200         IFS=:
19201         for p in $PATH; do
19202           if test -f "$p/$path" && test -x "$p/$path"; then
19203             new_path="$p/$path"
19204             break
19205           fi
19206         done
19207         IFS="$IFS_save"
19208       else
19209         # This is an absolute path, we can use it without further modifications.
19210         new_path="$path"
19211       fi
19212 
19213       if test "x$new_path" = x; then
19214         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19215 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19216         has_space=`$ECHO "$complete" | $GREP " "`
19217         if test "x$has_space" != x; then
19218           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19219 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19220         fi
19221         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19222       fi
19223     fi
19224 
19225     # Now join together the path and the arguments once again
19226     if test "x$arguments" != xEOL; then
19227       new_complete="$new_path ${arguments% *}"
19228     else
19229       new_complete="$new_path"
19230     fi
19231 
19232     if test "x$complete" != "x$new_complete"; then
19233       FOUND_MAKE="$new_complete"
19234       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19235 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19236     fi
19237   fi
19238 
19239         fi
19240       fi
19241     fi
19242   fi
19243 
19244     fi
19245 
19246     if test "x$FOUND_MAKE" = x; then
19247       if test "x$TOOLCHAIN_PATH" != x; then
19248         # We have a toolchain path, check that as well before giving up.
19249         OLD_PATH=$PATH
19250         PATH=$TOOLCHAIN_PATH:$PATH
19251         for ac_prog in gmake
19252 do
19253   # Extract the first word of "$ac_prog", so it can be a program name with args.
19254 set dummy $ac_prog; ac_word=$2
19255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19256 $as_echo_n "checking for $ac_word... " >&6; }
19257 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19258   $as_echo_n "(cached) " >&6
19259 else
19260   case $CHECK_TOOLSDIR_GMAKE in
19261   [\\/]* | ?:[\\/]*)
19262   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19263   ;;
19264   *)
19265   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19266 for as_dir in $PATH
19267 do
19268   IFS=$as_save_IFS
19269   test -z "$as_dir" && as_dir=.
19270     for ac_exec_ext in '' $ac_executable_extensions; do
19271   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19272     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19273     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19274     break 2
19275   fi
19276 done
19277   done
19278 IFS=$as_save_IFS
19279 
19280   ;;
19281 esac
19282 fi
19283 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19284 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19286 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19287 else
19288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19289 $as_echo "no" >&6; }
19290 fi
19291 
19292 
19293   test -n "$CHECK_TOOLSDIR_GMAKE" && break
19294 done
19295 
19296 
19297   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19298   DESCRIPTION="gmake in tools-dir"
19299 
19300   # On Cygwin, we require a newer version of make than on other platforms
19301   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19302     MAKE_VERSION_EXPR="-e 4\."
19303     MAKE_REQUIRED_VERSION="4.0"
19304    else
19305     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19306     MAKE_REQUIRED_VERSION="3.81"
19307   fi
19308 
19309   if test "x$MAKE_CANDIDATE" != x; then
19310     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19311 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19312     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19313     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19314     if test "x$IS_GNU_MAKE" = x; then
19315       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19316 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19317     else
19318       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19319       if test "x$IS_MODERN_MAKE" = x; then
19320         { $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
19321 $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;}
19322       else
19323         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19324           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19325             MAKE_EXPECTED_ENV='cygwin'
19326           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19327             MAKE_EXPECTED_ENV='msys'
19328           else
19329             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19330           fi
19331           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19332           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19333         else
19334           # Not relevant for non-Windows
19335           IS_MAKE_CORRECT_ENV=true
19336         fi
19337         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19338           { $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
19339 $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;}
19340         else
19341           FOUND_MAKE=$MAKE_CANDIDATE
19342 
19343   # Only process if variable expands to non-empty
19344 
19345   if test "x$FOUND_MAKE" != x; then
19346     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19347 
19348   # First separate the path from the arguments. This will split at the first
19349   # space.
19350   complete="$FOUND_MAKE"
19351   path="${complete%% *}"
19352   tmp="$complete EOL"
19353   arguments="${tmp#* }"
19354 
19355   # Input might be given as Windows format, start by converting to
19356   # unix format.
19357   new_path=`$CYGPATH -u "$path"`
19358 
19359   # Now try to locate executable using which
19360   new_path=`$WHICH "$new_path" 2> /dev/null`
19361   # bat and cmd files are not always considered executable in cygwin causing which
19362   # to not find them
19363   if test "x$new_path" = x \
19364       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19365       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19366     new_path=`$CYGPATH -u "$path"`
19367   fi
19368   if test "x$new_path" = x; then
19369     # Oops. Which didn't find the executable.
19370     # The splitting of arguments from the executable at a space might have been incorrect,
19371     # since paths with space are more likely in Windows. Give it another try with the whole
19372     # argument.
19373     path="$complete"
19374     arguments="EOL"
19375     new_path=`$CYGPATH -u "$path"`
19376     new_path=`$WHICH "$new_path" 2> /dev/null`
19377     # bat and cmd files are not always considered executable in cygwin causing which
19378     # to not find them
19379     if test "x$new_path" = x \
19380         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19381         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19382       new_path=`$CYGPATH -u "$path"`
19383     fi
19384     if test "x$new_path" = x; then
19385       # It's still not found. Now this is an unrecoverable error.
19386       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19387 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19388       has_space=`$ECHO "$complete" | $GREP " "`
19389       if test "x$has_space" != x; then
19390         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19391 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19392       fi
19393       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19394     fi
19395   fi
19396 
19397   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19398   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19399   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19400   # "foo.exe" is OK but "foo" is an error.
19401   #
19402   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19403   # It is also a way to make sure we got the proper file name for the real test later on.
19404   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19405   if test "x$test_shortpath" = x; then
19406     # Short path failed, file does not exist as specified.
19407     # Try adding .exe or .cmd
19408     if test -f "${new_path}.exe"; then
19409       input_to_shortpath="${new_path}.exe"
19410     elif test -f "${new_path}.cmd"; then
19411       input_to_shortpath="${new_path}.cmd"
19412     else
19413       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19414 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19415       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19416 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19417       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19418     fi
19419   else
19420     input_to_shortpath="$new_path"
19421   fi
19422 
19423   # Call helper function which possibly converts this using DOS-style short mode.
19424   # If so, the updated path is stored in $new_path.
19425   new_path="$input_to_shortpath"
19426 
19427   input_path="$input_to_shortpath"
19428   # Check if we need to convert this using DOS-style short mode. If the path
19429   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19430   # take no chances and rewrite it.
19431   # Note: m4 eats our [], so we need to use [ and ] instead.
19432   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19433   if test "x$has_forbidden_chars" != x; then
19434     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19435     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19436     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19437     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19438       # Going to short mode and back again did indeed matter. Since short mode is
19439       # case insensitive, let's make it lowercase to improve readability.
19440       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19441       # Now convert it back to Unix-style (cygpath)
19442       input_path=`$CYGPATH -u "$shortmode_path"`
19443       new_path="$input_path"
19444     fi
19445   fi
19446 
19447   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19448   if test "x$test_cygdrive_prefix" = x; then
19449     # As a simple fix, exclude /usr/bin since it's not a real path.
19450     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19451       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19452       # a path prefixed by /cygdrive for fixpath to work.
19453       new_path="$CYGWIN_ROOT_PATH$input_path"
19454     fi
19455   fi
19456 
19457   # remove trailing .exe if any
19458   new_path="${new_path/%.exe/}"
19459 
19460     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19461 
19462   # First separate the path from the arguments. This will split at the first
19463   # space.
19464   complete="$FOUND_MAKE"
19465   path="${complete%% *}"
19466   tmp="$complete EOL"
19467   arguments="${tmp#* }"
19468 
19469   # Input might be given as Windows format, start by converting to
19470   # unix format.
19471   new_path="$path"
19472 
19473   windows_path="$new_path"
19474   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19475     unix_path=`$CYGPATH -u "$windows_path"`
19476     new_path="$unix_path"
19477   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19478     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19479     new_path="$unix_path"
19480   fi
19481 
19482 
19483   # Now try to locate executable using which
19484   new_path=`$WHICH "$new_path" 2> /dev/null`
19485 
19486   if test "x$new_path" = x; then
19487     # Oops. Which didn't find the executable.
19488     # The splitting of arguments from the executable at a space might have been incorrect,
19489     # since paths with space are more likely in Windows. Give it another try with the whole
19490     # argument.
19491     path="$complete"
19492     arguments="EOL"
19493     new_path="$path"
19494 
19495   windows_path="$new_path"
19496   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19497     unix_path=`$CYGPATH -u "$windows_path"`
19498     new_path="$unix_path"
19499   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19500     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19501     new_path="$unix_path"
19502   fi
19503 
19504 
19505     new_path=`$WHICH "$new_path" 2> /dev/null`
19506     # bat and cmd files are not always considered executable in MSYS causing which
19507     # to not find them
19508     if test "x$new_path" = x \
19509         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19510         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19511       new_path="$path"
19512 
19513   windows_path="$new_path"
19514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19515     unix_path=`$CYGPATH -u "$windows_path"`
19516     new_path="$unix_path"
19517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19518     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19519     new_path="$unix_path"
19520   fi
19521 
19522     fi
19523 
19524     if test "x$new_path" = x; then
19525       # It's still not found. Now this is an unrecoverable error.
19526       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19527 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19528       has_space=`$ECHO "$complete" | $GREP " "`
19529       if test "x$has_space" != x; then
19530         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19531 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19532       fi
19533       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19534     fi
19535   fi
19536 
19537   # Now new_path has a complete unix path to the binary
19538   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19539     # Keep paths in /bin as-is, but remove trailing .exe if any
19540     new_path="${new_path/%.exe/}"
19541     # Do not save /bin paths to all_fixpath_prefixes!
19542   else
19543     # Not in mixed or Windows style, start by that.
19544     new_path=`cmd //c echo $new_path`
19545 
19546   input_path="$new_path"
19547   # Check if we need to convert this using DOS-style short mode. If the path
19548   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19549   # take no chances and rewrite it.
19550   # Note: m4 eats our [], so we need to use [ and ] instead.
19551   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19552   if test "x$has_forbidden_chars" != x; then
19553     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19554     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19555   fi
19556 
19557     # Output is in $new_path
19558 
19559   windows_path="$new_path"
19560   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19561     unix_path=`$CYGPATH -u "$windows_path"`
19562     new_path="$unix_path"
19563   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19564     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19565     new_path="$unix_path"
19566   fi
19567 
19568     # remove trailing .exe if any
19569     new_path="${new_path/%.exe/}"
19570 
19571     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19572     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19573   fi
19574 
19575     else
19576       # We're on a unix platform. Hooray! :)
19577       # First separate the path from the arguments. This will split at the first
19578       # space.
19579       complete="$FOUND_MAKE"
19580       path="${complete%% *}"
19581       tmp="$complete EOL"
19582       arguments="${tmp#* }"
19583 
19584       # Cannot rely on the command "which" here since it doesn't always work.
19585       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19586       if test -z "$is_absolute_path"; then
19587         # Path to executable is not absolute. Find it.
19588         IFS_save="$IFS"
19589         IFS=:
19590         for p in $PATH; do
19591           if test -f "$p/$path" && test -x "$p/$path"; then
19592             new_path="$p/$path"
19593             break
19594           fi
19595         done
19596         IFS="$IFS_save"
19597       else
19598         # This is an absolute path, we can use it without further modifications.
19599         new_path="$path"
19600       fi
19601 
19602       if test "x$new_path" = x; then
19603         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19604 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19605         has_space=`$ECHO "$complete" | $GREP " "`
19606         if test "x$has_space" != x; then
19607           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19608 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19609         fi
19610         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19611       fi
19612     fi
19613 
19614     # Now join together the path and the arguments once again
19615     if test "x$arguments" != xEOL; then
19616       new_complete="$new_path ${arguments% *}"
19617     else
19618       new_complete="$new_path"
19619     fi
19620 
19621     if test "x$complete" != "x$new_complete"; then
19622       FOUND_MAKE="$new_complete"
19623       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19624 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19625     fi
19626   fi
19627 
19628         fi
19629       fi
19630     fi
19631   fi
19632 
19633         if test "x$FOUND_MAKE" = x; then
19634           for ac_prog in make
19635 do
19636   # Extract the first word of "$ac_prog", so it can be a program name with args.
19637 set dummy $ac_prog; ac_word=$2
19638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19639 $as_echo_n "checking for $ac_word... " >&6; }
19640 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19641   $as_echo_n "(cached) " >&6
19642 else
19643   case $CHECK_TOOLSDIR_MAKE in
19644   [\\/]* | ?:[\\/]*)
19645   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19646   ;;
19647   *)
19648   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19649 for as_dir in $PATH
19650 do
19651   IFS=$as_save_IFS
19652   test -z "$as_dir" && as_dir=.
19653     for ac_exec_ext in '' $ac_executable_extensions; do
19654   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19655     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19656     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19657     break 2
19658   fi
19659 done
19660   done
19661 IFS=$as_save_IFS
19662 
19663   ;;
19664 esac
19665 fi
19666 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19667 if test -n "$CHECK_TOOLSDIR_MAKE"; then
19668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19669 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19670 else
19671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19672 $as_echo "no" >&6; }
19673 fi
19674 
19675 
19676   test -n "$CHECK_TOOLSDIR_MAKE" && break
19677 done
19678 
19679 
19680   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19681   DESCRIPTION="make in tools-dir"
19682 
19683   # On Cygwin, we require a newer version of make than on other platforms
19684   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19685     MAKE_VERSION_EXPR="-e 4\."
19686     MAKE_REQUIRED_VERSION="4.0"
19687    else
19688     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19689     MAKE_REQUIRED_VERSION="3.81"
19690   fi
19691 
19692   if test "x$MAKE_CANDIDATE" != x; then
19693     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19694 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19695     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19696     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19697     if test "x$IS_GNU_MAKE" = x; then
19698       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19699 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19700     else
19701       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19702       if test "x$IS_MODERN_MAKE" = x; then
19703         { $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
19704 $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;}
19705       else
19706         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19707           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19708             MAKE_EXPECTED_ENV='cygwin'
19709           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19710             MAKE_EXPECTED_ENV='msys'
19711           else
19712             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19713           fi
19714           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19715           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19716         else
19717           # Not relevant for non-Windows
19718           IS_MAKE_CORRECT_ENV=true
19719         fi
19720         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19721           { $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
19722 $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;}
19723         else
19724           FOUND_MAKE=$MAKE_CANDIDATE
19725 
19726   # Only process if variable expands to non-empty
19727 
19728   if test "x$FOUND_MAKE" != x; then
19729     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19730 
19731   # First separate the path from the arguments. This will split at the first
19732   # space.
19733   complete="$FOUND_MAKE"
19734   path="${complete%% *}"
19735   tmp="$complete EOL"
19736   arguments="${tmp#* }"
19737 
19738   # Input might be given as Windows format, start by converting to
19739   # unix format.
19740   new_path=`$CYGPATH -u "$path"`
19741 
19742   # Now try to locate executable using which
19743   new_path=`$WHICH "$new_path" 2> /dev/null`
19744   # bat and cmd files are not always considered executable in cygwin causing which
19745   # to not find them
19746   if test "x$new_path" = x \
19747       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19748       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19749     new_path=`$CYGPATH -u "$path"`
19750   fi
19751   if test "x$new_path" = x; then
19752     # Oops. Which didn't find the executable.
19753     # The splitting of arguments from the executable at a space might have been incorrect,
19754     # since paths with space are more likely in Windows. Give it another try with the whole
19755     # argument.
19756     path="$complete"
19757     arguments="EOL"
19758     new_path=`$CYGPATH -u "$path"`
19759     new_path=`$WHICH "$new_path" 2> /dev/null`
19760     # bat and cmd files are not always considered executable in cygwin causing which
19761     # to not find them
19762     if test "x$new_path" = x \
19763         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19764         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19765       new_path=`$CYGPATH -u "$path"`
19766     fi
19767     if test "x$new_path" = x; then
19768       # It's still not found. Now this is an unrecoverable error.
19769       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19770 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19771       has_space=`$ECHO "$complete" | $GREP " "`
19772       if test "x$has_space" != x; then
19773         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19774 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19775       fi
19776       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19777     fi
19778   fi
19779 
19780   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19781   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19782   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19783   # "foo.exe" is OK but "foo" is an error.
19784   #
19785   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19786   # It is also a way to make sure we got the proper file name for the real test later on.
19787   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19788   if test "x$test_shortpath" = x; then
19789     # Short path failed, file does not exist as specified.
19790     # Try adding .exe or .cmd
19791     if test -f "${new_path}.exe"; then
19792       input_to_shortpath="${new_path}.exe"
19793     elif test -f "${new_path}.cmd"; then
19794       input_to_shortpath="${new_path}.cmd"
19795     else
19796       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19797 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19798       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19799 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19800       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19801     fi
19802   else
19803     input_to_shortpath="$new_path"
19804   fi
19805 
19806   # Call helper function which possibly converts this using DOS-style short mode.
19807   # If so, the updated path is stored in $new_path.
19808   new_path="$input_to_shortpath"
19809 
19810   input_path="$input_to_shortpath"
19811   # Check if we need to convert this using DOS-style short mode. If the path
19812   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19813   # take no chances and rewrite it.
19814   # Note: m4 eats our [], so we need to use [ and ] instead.
19815   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19816   if test "x$has_forbidden_chars" != x; then
19817     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19818     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19819     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19820     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19821       # Going to short mode and back again did indeed matter. Since short mode is
19822       # case insensitive, let's make it lowercase to improve readability.
19823       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19824       # Now convert it back to Unix-style (cygpath)
19825       input_path=`$CYGPATH -u "$shortmode_path"`
19826       new_path="$input_path"
19827     fi
19828   fi
19829 
19830   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19831   if test "x$test_cygdrive_prefix" = x; then
19832     # As a simple fix, exclude /usr/bin since it's not a real path.
19833     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19834       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19835       # a path prefixed by /cygdrive for fixpath to work.
19836       new_path="$CYGWIN_ROOT_PATH$input_path"
19837     fi
19838   fi
19839 
19840   # remove trailing .exe if any
19841   new_path="${new_path/%.exe/}"
19842 
19843     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19844 
19845   # First separate the path from the arguments. This will split at the first
19846   # space.
19847   complete="$FOUND_MAKE"
19848   path="${complete%% *}"
19849   tmp="$complete EOL"
19850   arguments="${tmp#* }"
19851 
19852   # Input might be given as Windows format, start by converting to
19853   # unix format.
19854   new_path="$path"
19855 
19856   windows_path="$new_path"
19857   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19858     unix_path=`$CYGPATH -u "$windows_path"`
19859     new_path="$unix_path"
19860   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19861     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19862     new_path="$unix_path"
19863   fi
19864 
19865 
19866   # Now try to locate executable using which
19867   new_path=`$WHICH "$new_path" 2> /dev/null`
19868 
19869   if test "x$new_path" = x; then
19870     # Oops. Which didn't find the executable.
19871     # The splitting of arguments from the executable at a space might have been incorrect,
19872     # since paths with space are more likely in Windows. Give it another try with the whole
19873     # argument.
19874     path="$complete"
19875     arguments="EOL"
19876     new_path="$path"
19877 
19878   windows_path="$new_path"
19879   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19880     unix_path=`$CYGPATH -u "$windows_path"`
19881     new_path="$unix_path"
19882   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19883     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19884     new_path="$unix_path"
19885   fi
19886 
19887 
19888     new_path=`$WHICH "$new_path" 2> /dev/null`
19889     # bat and cmd files are not always considered executable in MSYS causing which
19890     # to not find them
19891     if test "x$new_path" = x \
19892         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19893         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19894       new_path="$path"
19895 
19896   windows_path="$new_path"
19897   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19898     unix_path=`$CYGPATH -u "$windows_path"`
19899     new_path="$unix_path"
19900   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19901     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19902     new_path="$unix_path"
19903   fi
19904 
19905     fi
19906 
19907     if test "x$new_path" = x; then
19908       # It's still not found. Now this is an unrecoverable error.
19909       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19910 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19911       has_space=`$ECHO "$complete" | $GREP " "`
19912       if test "x$has_space" != x; then
19913         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19914 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19915       fi
19916       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19917     fi
19918   fi
19919 
19920   # Now new_path has a complete unix path to the binary
19921   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19922     # Keep paths in /bin as-is, but remove trailing .exe if any
19923     new_path="${new_path/%.exe/}"
19924     # Do not save /bin paths to all_fixpath_prefixes!
19925   else
19926     # Not in mixed or Windows style, start by that.
19927     new_path=`cmd //c echo $new_path`
19928 
19929   input_path="$new_path"
19930   # Check if we need to convert this using DOS-style short mode. If the path
19931   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19932   # take no chances and rewrite it.
19933   # Note: m4 eats our [], so we need to use [ and ] instead.
19934   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19935   if test "x$has_forbidden_chars" != x; then
19936     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19937     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19938   fi
19939 
19940     # Output is in $new_path
19941 
19942   windows_path="$new_path"
19943   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19944     unix_path=`$CYGPATH -u "$windows_path"`
19945     new_path="$unix_path"
19946   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19947     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19948     new_path="$unix_path"
19949   fi
19950 
19951     # remove trailing .exe if any
19952     new_path="${new_path/%.exe/}"
19953 
19954     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19955     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19956   fi
19957 
19958     else
19959       # We're on a unix platform. Hooray! :)
19960       # First separate the path from the arguments. This will split at the first
19961       # space.
19962       complete="$FOUND_MAKE"
19963       path="${complete%% *}"
19964       tmp="$complete EOL"
19965       arguments="${tmp#* }"
19966 
19967       # Cannot rely on the command "which" here since it doesn't always work.
19968       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19969       if test -z "$is_absolute_path"; then
19970         # Path to executable is not absolute. Find it.
19971         IFS_save="$IFS"
19972         IFS=:
19973         for p in $PATH; do
19974           if test -f "$p/$path" && test -x "$p/$path"; then
19975             new_path="$p/$path"
19976             break
19977           fi
19978         done
19979         IFS="$IFS_save"
19980       else
19981         # This is an absolute path, we can use it without further modifications.
19982         new_path="$path"
19983       fi
19984 
19985       if test "x$new_path" = x; then
19986         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19987 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19988         has_space=`$ECHO "$complete" | $GREP " "`
19989         if test "x$has_space" != x; then
19990           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19991 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19992         fi
19993         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19994       fi
19995     fi
19996 
19997     # Now join together the path and the arguments once again
19998     if test "x$arguments" != xEOL; then
19999       new_complete="$new_path ${arguments% *}"
20000     else
20001       new_complete="$new_path"
20002     fi
20003 
20004     if test "x$complete" != "x$new_complete"; then
20005       FOUND_MAKE="$new_complete"
20006       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20007 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20008     fi
20009   fi
20010 
20011         fi
20012       fi
20013     fi
20014   fi
20015 
20016         fi
20017         PATH=$OLD_PATH
20018       fi
20019     fi
20020 
20021     if test "x$FOUND_MAKE" = x; then
20022       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
20023     fi
20024 
20025     else
20026       # If it succeeded, then it was overridden by the user. We will use it
20027       # for the tool.
20028 
20029       # First remove it from the list of overridden variables, so we can test
20030       # for unknown variables in the end.
20031       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20032 
20033       # Check if we try to supply an empty value
20034       if test "x$MAKE" = x; then
20035         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20036 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20037         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20038 $as_echo_n "checking for MAKE... " >&6; }
20039         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20040 $as_echo "disabled" >&6; }
20041       else
20042         # Check if the provided tool contains a complete path.
20043         tool_specified="$MAKE"
20044         tool_basename="${tool_specified##*/}"
20045         if test "x$tool_basename" = "x$tool_specified"; then
20046           # A command without a complete path is provided, search $PATH.
20047           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20048 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20049           # Extract the first word of "$tool_basename", so it can be a program name with args.
20050 set dummy $tool_basename; ac_word=$2
20051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20052 $as_echo_n "checking for $ac_word... " >&6; }
20053 if ${ac_cv_path_MAKE+:} false; then :
20054   $as_echo_n "(cached) " >&6
20055 else
20056   case $MAKE in
20057   [\\/]* | ?:[\\/]*)
20058   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20059   ;;
20060   *)
20061   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20062 for as_dir in $PATH
20063 do
20064   IFS=$as_save_IFS
20065   test -z "$as_dir" && as_dir=.
20066     for ac_exec_ext in '' $ac_executable_extensions; do
20067   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20068     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20069     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20070     break 2
20071   fi
20072 done
20073   done
20074 IFS=$as_save_IFS
20075 
20076   ;;
20077 esac
20078 fi
20079 MAKE=$ac_cv_path_MAKE
20080 if test -n "$MAKE"; then
20081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20082 $as_echo "$MAKE" >&6; }
20083 else
20084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20085 $as_echo "no" >&6; }
20086 fi
20087 
20088 
20089           if test "x$MAKE" = x; then
20090             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20091           fi
20092         else
20093           # Otherwise we believe it is a complete path. Use it as it is.
20094           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20095 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20096           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20097 $as_echo_n "checking for MAKE... " >&6; }
20098           if test ! -x "$tool_specified"; then
20099             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20100 $as_echo "not found" >&6; }
20101             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20102           fi
20103           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20104 $as_echo "$tool_specified" >&6; }
20105         fi
20106       fi
20107     fi
20108 
20109     # If MAKE was set by user, verify the version
20110 
20111   MAKE_CANDIDATE=""$MAKE""
20112   DESCRIPTION="user supplied MAKE=$MAKE"
20113 
20114   # On Cygwin, we require a newer version of make than on other platforms
20115   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20116     MAKE_VERSION_EXPR="-e 4\."
20117     MAKE_REQUIRED_VERSION="4.0"
20118    else
20119     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20120     MAKE_REQUIRED_VERSION="3.81"
20121   fi
20122 
20123   if test "x$MAKE_CANDIDATE" != x; then
20124     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20125 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20126     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20127     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20128     if test "x$IS_GNU_MAKE" = x; then
20129       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20130 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20131     else
20132       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20133       if test "x$IS_MODERN_MAKE" = x; then
20134         { $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
20135 $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;}
20136       else
20137         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20138           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20139             MAKE_EXPECTED_ENV='cygwin'
20140           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20141             MAKE_EXPECTED_ENV='msys'
20142           else
20143             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20144           fi
20145           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20146           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20147         else
20148           # Not relevant for non-Windows
20149           IS_MAKE_CORRECT_ENV=true
20150         fi
20151         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20152           { $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
20153 $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;}
20154         else
20155           FOUND_MAKE=$MAKE_CANDIDATE
20156 
20157   # Only process if variable expands to non-empty
20158 
20159   if test "x$FOUND_MAKE" != x; then
20160     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20161 
20162   # First separate the path from the arguments. This will split at the first
20163   # space.
20164   complete="$FOUND_MAKE"
20165   path="${complete%% *}"
20166   tmp="$complete EOL"
20167   arguments="${tmp#* }"
20168 
20169   # Input might be given as Windows format, start by converting to
20170   # unix format.
20171   new_path=`$CYGPATH -u "$path"`
20172 
20173   # Now try to locate executable using which
20174   new_path=`$WHICH "$new_path" 2> /dev/null`
20175   # bat and cmd files are not always considered executable in cygwin causing which
20176   # to not find them
20177   if test "x$new_path" = x \
20178       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20179       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20180     new_path=`$CYGPATH -u "$path"`
20181   fi
20182   if test "x$new_path" = x; then
20183     # Oops. Which didn't find the executable.
20184     # The splitting of arguments from the executable at a space might have been incorrect,
20185     # since paths with space are more likely in Windows. Give it another try with the whole
20186     # argument.
20187     path="$complete"
20188     arguments="EOL"
20189     new_path=`$CYGPATH -u "$path"`
20190     new_path=`$WHICH "$new_path" 2> /dev/null`
20191     # bat and cmd files are not always considered executable in cygwin causing which
20192     # to not find them
20193     if test "x$new_path" = x \
20194         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20195         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20196       new_path=`$CYGPATH -u "$path"`
20197     fi
20198     if test "x$new_path" = x; then
20199       # It's still not found. Now this is an unrecoverable error.
20200       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20201 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20202       has_space=`$ECHO "$complete" | $GREP " "`
20203       if test "x$has_space" != x; then
20204         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20205 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20206       fi
20207       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20208     fi
20209   fi
20210 
20211   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20212   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20213   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20214   # "foo.exe" is OK but "foo" is an error.
20215   #
20216   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20217   # It is also a way to make sure we got the proper file name for the real test later on.
20218   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20219   if test "x$test_shortpath" = x; then
20220     # Short path failed, file does not exist as specified.
20221     # Try adding .exe or .cmd
20222     if test -f "${new_path}.exe"; then
20223       input_to_shortpath="${new_path}.exe"
20224     elif test -f "${new_path}.cmd"; then
20225       input_to_shortpath="${new_path}.cmd"
20226     else
20227       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20228 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20229       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20230 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20231       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20232     fi
20233   else
20234     input_to_shortpath="$new_path"
20235   fi
20236 
20237   # Call helper function which possibly converts this using DOS-style short mode.
20238   # If so, the updated path is stored in $new_path.
20239   new_path="$input_to_shortpath"
20240 
20241   input_path="$input_to_shortpath"
20242   # Check if we need to convert this using DOS-style short mode. If the path
20243   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20244   # take no chances and rewrite it.
20245   # Note: m4 eats our [], so we need to use [ and ] instead.
20246   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20247   if test "x$has_forbidden_chars" != x; then
20248     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20249     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20250     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20251     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20252       # Going to short mode and back again did indeed matter. Since short mode is
20253       # case insensitive, let's make it lowercase to improve readability.
20254       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20255       # Now convert it back to Unix-style (cygpath)
20256       input_path=`$CYGPATH -u "$shortmode_path"`
20257       new_path="$input_path"
20258     fi
20259   fi
20260 
20261   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20262   if test "x$test_cygdrive_prefix" = x; then
20263     # As a simple fix, exclude /usr/bin since it's not a real path.
20264     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20265       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20266       # a path prefixed by /cygdrive for fixpath to work.
20267       new_path="$CYGWIN_ROOT_PATH$input_path"
20268     fi
20269   fi
20270 
20271   # remove trailing .exe if any
20272   new_path="${new_path/%.exe/}"
20273 
20274     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20275 
20276   # First separate the path from the arguments. This will split at the first
20277   # space.
20278   complete="$FOUND_MAKE"
20279   path="${complete%% *}"
20280   tmp="$complete EOL"
20281   arguments="${tmp#* }"
20282 
20283   # Input might be given as Windows format, start by converting to
20284   # unix format.
20285   new_path="$path"
20286 
20287   windows_path="$new_path"
20288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20289     unix_path=`$CYGPATH -u "$windows_path"`
20290     new_path="$unix_path"
20291   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20292     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20293     new_path="$unix_path"
20294   fi
20295 
20296 
20297   # Now try to locate executable using which
20298   new_path=`$WHICH "$new_path" 2> /dev/null`
20299 
20300   if test "x$new_path" = x; then
20301     # Oops. Which didn't find the executable.
20302     # The splitting of arguments from the executable at a space might have been incorrect,
20303     # since paths with space are more likely in Windows. Give it another try with the whole
20304     # argument.
20305     path="$complete"
20306     arguments="EOL"
20307     new_path="$path"
20308 
20309   windows_path="$new_path"
20310   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20311     unix_path=`$CYGPATH -u "$windows_path"`
20312     new_path="$unix_path"
20313   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20314     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20315     new_path="$unix_path"
20316   fi
20317 
20318 
20319     new_path=`$WHICH "$new_path" 2> /dev/null`
20320     # bat and cmd files are not always considered executable in MSYS causing which
20321     # to not find them
20322     if test "x$new_path" = x \
20323         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20324         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20325       new_path="$path"
20326 
20327   windows_path="$new_path"
20328   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20329     unix_path=`$CYGPATH -u "$windows_path"`
20330     new_path="$unix_path"
20331   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20332     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20333     new_path="$unix_path"
20334   fi
20335 
20336     fi
20337 
20338     if test "x$new_path" = x; then
20339       # It's still not found. Now this is an unrecoverable error.
20340       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20341 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20342       has_space=`$ECHO "$complete" | $GREP " "`
20343       if test "x$has_space" != x; then
20344         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20345 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20346       fi
20347       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20348     fi
20349   fi
20350 
20351   # Now new_path has a complete unix path to the binary
20352   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20353     # Keep paths in /bin as-is, but remove trailing .exe if any
20354     new_path="${new_path/%.exe/}"
20355     # Do not save /bin paths to all_fixpath_prefixes!
20356   else
20357     # Not in mixed or Windows style, start by that.
20358     new_path=`cmd //c echo $new_path`
20359 
20360   input_path="$new_path"
20361   # Check if we need to convert this using DOS-style short mode. If the path
20362   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20363   # take no chances and rewrite it.
20364   # Note: m4 eats our [], so we need to use [ and ] instead.
20365   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20366   if test "x$has_forbidden_chars" != x; then
20367     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20368     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20369   fi
20370 
20371     # Output is in $new_path
20372 
20373   windows_path="$new_path"
20374   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20375     unix_path=`$CYGPATH -u "$windows_path"`
20376     new_path="$unix_path"
20377   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20378     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20379     new_path="$unix_path"
20380   fi
20381 
20382     # remove trailing .exe if any
20383     new_path="${new_path/%.exe/}"
20384 
20385     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20386     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20387   fi
20388 
20389     else
20390       # We're on a unix platform. Hooray! :)
20391       # First separate the path from the arguments. This will split at the first
20392       # space.
20393       complete="$FOUND_MAKE"
20394       path="${complete%% *}"
20395       tmp="$complete EOL"
20396       arguments="${tmp#* }"
20397 
20398       # Cannot rely on the command "which" here since it doesn't always work.
20399       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20400       if test -z "$is_absolute_path"; then
20401         # Path to executable is not absolute. Find it.
20402         IFS_save="$IFS"
20403         IFS=:
20404         for p in $PATH; do
20405           if test -f "$p/$path" && test -x "$p/$path"; then
20406             new_path="$p/$path"
20407             break
20408           fi
20409         done
20410         IFS="$IFS_save"
20411       else
20412         # This is an absolute path, we can use it without further modifications.
20413         new_path="$path"
20414       fi
20415 
20416       if test "x$new_path" = x; then
20417         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20418 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20419         has_space=`$ECHO "$complete" | $GREP " "`
20420         if test "x$has_space" != x; then
20421           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20422 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20423         fi
20424         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20425       fi
20426     fi
20427 
20428     # Now join together the path and the arguments once again
20429     if test "x$arguments" != xEOL; then
20430       new_complete="$new_path ${arguments% *}"
20431     else
20432       new_complete="$new_path"
20433     fi
20434 
20435     if test "x$complete" != "x$new_complete"; then
20436       FOUND_MAKE="$new_complete"
20437       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20438 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20439     fi
20440   fi
20441 
20442         fi
20443       fi
20444     fi
20445   fi
20446 
20447     if test "x$FOUND_MAKE" = x; then
20448       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20449     fi
20450 
20451   fi
20452 
20453 
20454   MAKE=$FOUND_MAKE
20455 
20456   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20457 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20458 
20459 
20460   # Check if make supports the output sync option and if so, setup using it.
20461   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20462 $as_echo_n "checking if make --output-sync is supported... " >&6; }
20463   if $MAKE --version -O > /dev/null 2>&1; then
20464     OUTPUT_SYNC_SUPPORTED=true
20465     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20466 $as_echo "yes" >&6; }
20467     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20468 $as_echo_n "checking for output-sync value... " >&6; }
20469 
20470 # Check whether --with-output-sync was given.
20471 if test "${with_output_sync+set}" = set; then :
20472   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20473 fi
20474 
20475     if test "x$OUTPUT_SYNC" = "x"; then
20476       OUTPUT_SYNC=none
20477     fi
20478     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20479 $as_echo "$OUTPUT_SYNC" >&6; }
20480     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20481       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20482     fi
20483   else
20484     OUTPUT_SYNC_SUPPORTED=false
20485     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20486 $as_echo "no" >&6; }
20487   fi
20488 
20489 
20490 
20491 
20492 
20493 
20494   # Test if find supports -delete
20495   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20496 $as_echo_n "checking if find supports -delete... " >&6; }
20497   FIND_DELETE="-delete"
20498 
20499   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20500 
20501   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20502 
20503   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20504   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20505     # No, it does not.
20506     rm $DELETEDIR/TestIfFindSupportsDelete
20507     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20508       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20509       FIND_DELETE="-print | xargs rm"
20510     else
20511       FIND_DELETE="-exec rm \{\} \+"
20512     fi
20513     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20514 $as_echo "no" >&6; }
20515   else
20516     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20517 $as_echo "yes" >&6; }
20518   fi
20519   rmdir $DELETEDIR
20520 
20521 
20522 
20523   # These tools might not be installed by default,
20524   # need hint on how to install them.
20525 
20526 
20527 
20528   # Publish this variable in the help.
20529 
20530 
20531   if [ -z "${UNZIP+x}" ]; then
20532     # The variable is not set by user, try to locate tool using the code snippet
20533     for ac_prog in unzip
20534 do
20535   # Extract the first word of "$ac_prog", so it can be a program name with args.
20536 set dummy $ac_prog; ac_word=$2
20537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20538 $as_echo_n "checking for $ac_word... " >&6; }
20539 if ${ac_cv_path_UNZIP+:} false; then :
20540   $as_echo_n "(cached) " >&6
20541 else
20542   case $UNZIP in
20543   [\\/]* | ?:[\\/]*)
20544   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20545   ;;
20546   *)
20547   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20548 for as_dir in $PATH
20549 do
20550   IFS=$as_save_IFS
20551   test -z "$as_dir" && as_dir=.
20552     for ac_exec_ext in '' $ac_executable_extensions; do
20553   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20554     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20555     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20556     break 2
20557   fi
20558 done
20559   done
20560 IFS=$as_save_IFS
20561 
20562   ;;
20563 esac
20564 fi
20565 UNZIP=$ac_cv_path_UNZIP
20566 if test -n "$UNZIP"; then
20567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20568 $as_echo "$UNZIP" >&6; }
20569 else
20570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20571 $as_echo "no" >&6; }
20572 fi
20573 
20574 
20575   test -n "$UNZIP" && break
20576 done
20577 
20578   else
20579     # The variable is set, but is it from the command line or the environment?
20580 
20581     # Try to remove the string !UNZIP! from our list.
20582     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20583     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20584       # If it failed, the variable was not from the command line. Ignore it,
20585       # but warn the user (except for BASH, which is always set by the calling BASH).
20586       if test "xUNZIP" != xBASH; then
20587         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20588 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20589       fi
20590       # Try to locate tool using the code snippet
20591       for ac_prog in unzip
20592 do
20593   # Extract the first word of "$ac_prog", so it can be a program name with args.
20594 set dummy $ac_prog; ac_word=$2
20595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20596 $as_echo_n "checking for $ac_word... " >&6; }
20597 if ${ac_cv_path_UNZIP+:} false; then :
20598   $as_echo_n "(cached) " >&6
20599 else
20600   case $UNZIP in
20601   [\\/]* | ?:[\\/]*)
20602   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20603   ;;
20604   *)
20605   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20606 for as_dir in $PATH
20607 do
20608   IFS=$as_save_IFS
20609   test -z "$as_dir" && as_dir=.
20610     for ac_exec_ext in '' $ac_executable_extensions; do
20611   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20612     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20613     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20614     break 2
20615   fi
20616 done
20617   done
20618 IFS=$as_save_IFS
20619 
20620   ;;
20621 esac
20622 fi
20623 UNZIP=$ac_cv_path_UNZIP
20624 if test -n "$UNZIP"; then
20625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20626 $as_echo "$UNZIP" >&6; }
20627 else
20628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20629 $as_echo "no" >&6; }
20630 fi
20631 
20632 
20633   test -n "$UNZIP" && break
20634 done
20635 
20636     else
20637       # If it succeeded, then it was overridden by the user. We will use it
20638       # for the tool.
20639 
20640       # First remove it from the list of overridden variables, so we can test
20641       # for unknown variables in the end.
20642       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20643 
20644       # Check if we try to supply an empty value
20645       if test "x$UNZIP" = x; then
20646         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20647 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20648         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20649 $as_echo_n "checking for UNZIP... " >&6; }
20650         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20651 $as_echo "disabled" >&6; }
20652       else
20653         # Check if the provided tool contains a complete path.
20654         tool_specified="$UNZIP"
20655         tool_basename="${tool_specified##*/}"
20656         if test "x$tool_basename" = "x$tool_specified"; then
20657           # A command without a complete path is provided, search $PATH.
20658           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20659 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20660           # Extract the first word of "$tool_basename", so it can be a program name with args.
20661 set dummy $tool_basename; ac_word=$2
20662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20663 $as_echo_n "checking for $ac_word... " >&6; }
20664 if ${ac_cv_path_UNZIP+:} false; then :
20665   $as_echo_n "(cached) " >&6
20666 else
20667   case $UNZIP in
20668   [\\/]* | ?:[\\/]*)
20669   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20670   ;;
20671   *)
20672   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20673 for as_dir in $PATH
20674 do
20675   IFS=$as_save_IFS
20676   test -z "$as_dir" && as_dir=.
20677     for ac_exec_ext in '' $ac_executable_extensions; do
20678   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20679     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20680     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20681     break 2
20682   fi
20683 done
20684   done
20685 IFS=$as_save_IFS
20686 
20687   ;;
20688 esac
20689 fi
20690 UNZIP=$ac_cv_path_UNZIP
20691 if test -n "$UNZIP"; then
20692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20693 $as_echo "$UNZIP" >&6; }
20694 else
20695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20696 $as_echo "no" >&6; }
20697 fi
20698 
20699 
20700           if test "x$UNZIP" = x; then
20701             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20702           fi
20703         else
20704           # Otherwise we believe it is a complete path. Use it as it is.
20705           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20706 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20707           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20708 $as_echo_n "checking for UNZIP... " >&6; }
20709           if test ! -x "$tool_specified"; then
20710             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20711 $as_echo "not found" >&6; }
20712             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20713           fi
20714           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20715 $as_echo "$tool_specified" >&6; }
20716         fi
20717       fi
20718     fi
20719 
20720   fi
20721 
20722 
20723 
20724   if test "x$UNZIP" = x; then
20725     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20726   fi
20727 
20728 
20729 
20730 
20731 
20732   # Publish this variable in the help.
20733 
20734 
20735   if [ -z "${ZIP+x}" ]; then
20736     # The variable is not set by user, try to locate tool using the code snippet
20737     for ac_prog in zip
20738 do
20739   # Extract the first word of "$ac_prog", so it can be a program name with args.
20740 set dummy $ac_prog; ac_word=$2
20741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20742 $as_echo_n "checking for $ac_word... " >&6; }
20743 if ${ac_cv_path_ZIP+:} false; then :
20744   $as_echo_n "(cached) " >&6
20745 else
20746   case $ZIP in
20747   [\\/]* | ?:[\\/]*)
20748   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20749   ;;
20750   *)
20751   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20752 for as_dir in $PATH
20753 do
20754   IFS=$as_save_IFS
20755   test -z "$as_dir" && as_dir=.
20756     for ac_exec_ext in '' $ac_executable_extensions; do
20757   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20758     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20759     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20760     break 2
20761   fi
20762 done
20763   done
20764 IFS=$as_save_IFS
20765 
20766   ;;
20767 esac
20768 fi
20769 ZIP=$ac_cv_path_ZIP
20770 if test -n "$ZIP"; then
20771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20772 $as_echo "$ZIP" >&6; }
20773 else
20774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20775 $as_echo "no" >&6; }
20776 fi
20777 
20778 
20779   test -n "$ZIP" && break
20780 done
20781 
20782   else
20783     # The variable is set, but is it from the command line or the environment?
20784 
20785     # Try to remove the string !ZIP! from our list.
20786     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20787     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20788       # If it failed, the variable was not from the command line. Ignore it,
20789       # but warn the user (except for BASH, which is always set by the calling BASH).
20790       if test "xZIP" != xBASH; then
20791         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20792 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20793       fi
20794       # Try to locate tool using the code snippet
20795       for ac_prog in zip
20796 do
20797   # Extract the first word of "$ac_prog", so it can be a program name with args.
20798 set dummy $ac_prog; ac_word=$2
20799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20800 $as_echo_n "checking for $ac_word... " >&6; }
20801 if ${ac_cv_path_ZIP+:} false; then :
20802   $as_echo_n "(cached) " >&6
20803 else
20804   case $ZIP in
20805   [\\/]* | ?:[\\/]*)
20806   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20807   ;;
20808   *)
20809   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20810 for as_dir in $PATH
20811 do
20812   IFS=$as_save_IFS
20813   test -z "$as_dir" && as_dir=.
20814     for ac_exec_ext in '' $ac_executable_extensions; do
20815   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20816     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20817     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20818     break 2
20819   fi
20820 done
20821   done
20822 IFS=$as_save_IFS
20823 
20824   ;;
20825 esac
20826 fi
20827 ZIP=$ac_cv_path_ZIP
20828 if test -n "$ZIP"; then
20829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20830 $as_echo "$ZIP" >&6; }
20831 else
20832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20833 $as_echo "no" >&6; }
20834 fi
20835 
20836 
20837   test -n "$ZIP" && break
20838 done
20839 
20840     else
20841       # If it succeeded, then it was overridden by the user. We will use it
20842       # for the tool.
20843 
20844       # First remove it from the list of overridden variables, so we can test
20845       # for unknown variables in the end.
20846       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20847 
20848       # Check if we try to supply an empty value
20849       if test "x$ZIP" = x; then
20850         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20851 $as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20852         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20853 $as_echo_n "checking for ZIP... " >&6; }
20854         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20855 $as_echo "disabled" >&6; }
20856       else
20857         # Check if the provided tool contains a complete path.
20858         tool_specified="$ZIP"
20859         tool_basename="${tool_specified##*/}"
20860         if test "x$tool_basename" = "x$tool_specified"; then
20861           # A command without a complete path is provided, search $PATH.
20862           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20863 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20864           # Extract the first word of "$tool_basename", so it can be a program name with args.
20865 set dummy $tool_basename; ac_word=$2
20866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20867 $as_echo_n "checking for $ac_word... " >&6; }
20868 if ${ac_cv_path_ZIP+:} false; then :
20869   $as_echo_n "(cached) " >&6
20870 else
20871   case $ZIP in
20872   [\\/]* | ?:[\\/]*)
20873   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20874   ;;
20875   *)
20876   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20877 for as_dir in $PATH
20878 do
20879   IFS=$as_save_IFS
20880   test -z "$as_dir" && as_dir=.
20881     for ac_exec_ext in '' $ac_executable_extensions; do
20882   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20883     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20884     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20885     break 2
20886   fi
20887 done
20888   done
20889 IFS=$as_save_IFS
20890 
20891   ;;
20892 esac
20893 fi
20894 ZIP=$ac_cv_path_ZIP
20895 if test -n "$ZIP"; then
20896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20897 $as_echo "$ZIP" >&6; }
20898 else
20899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20900 $as_echo "no" >&6; }
20901 fi
20902 
20903 
20904           if test "x$ZIP" = x; then
20905             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20906           fi
20907         else
20908           # Otherwise we believe it is a complete path. Use it as it is.
20909           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20910 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20911           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20912 $as_echo_n "checking for ZIP... " >&6; }
20913           if test ! -x "$tool_specified"; then
20914             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20915 $as_echo "not found" >&6; }
20916             as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20917           fi
20918           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20919 $as_echo "$tool_specified" >&6; }
20920         fi
20921       fi
20922     fi
20923 
20924   fi
20925 
20926 
20927 
20928   if test "x$ZIP" = x; then
20929     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20930   fi
20931 
20932 
20933 
20934   # Non-required basic tools
20935 
20936 
20937 
20938   # Publish this variable in the help.
20939 
20940 
20941   if [ -z "${LDD+x}" ]; then
20942     # The variable is not set by user, try to locate tool using the code snippet
20943     for ac_prog in ldd
20944 do
20945   # Extract the first word of "$ac_prog", so it can be a program name with args.
20946 set dummy $ac_prog; ac_word=$2
20947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20948 $as_echo_n "checking for $ac_word... " >&6; }
20949 if ${ac_cv_path_LDD+:} false; then :
20950   $as_echo_n "(cached) " >&6
20951 else
20952   case $LDD in
20953   [\\/]* | ?:[\\/]*)
20954   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20955   ;;
20956   *)
20957   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20958 for as_dir in $PATH
20959 do
20960   IFS=$as_save_IFS
20961   test -z "$as_dir" && as_dir=.
20962     for ac_exec_ext in '' $ac_executable_extensions; do
20963   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20964     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20965     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20966     break 2
20967   fi
20968 done
20969   done
20970 IFS=$as_save_IFS
20971 
20972   ;;
20973 esac
20974 fi
20975 LDD=$ac_cv_path_LDD
20976 if test -n "$LDD"; then
20977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20978 $as_echo "$LDD" >&6; }
20979 else
20980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20981 $as_echo "no" >&6; }
20982 fi
20983 
20984 
20985   test -n "$LDD" && break
20986 done
20987 
20988   else
20989     # The variable is set, but is it from the command line or the environment?
20990 
20991     # Try to remove the string !LDD! from our list.
20992     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20993     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20994       # If it failed, the variable was not from the command line. Ignore it,
20995       # but warn the user (except for BASH, which is always set by the calling BASH).
20996       if test "xLDD" != xBASH; then
20997         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20998 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20999       fi
21000       # Try to locate tool using the code snippet
21001       for ac_prog in ldd
21002 do
21003   # Extract the first word of "$ac_prog", so it can be a program name with args.
21004 set dummy $ac_prog; ac_word=$2
21005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21006 $as_echo_n "checking for $ac_word... " >&6; }
21007 if ${ac_cv_path_LDD+:} false; then :
21008   $as_echo_n "(cached) " >&6
21009 else
21010   case $LDD in
21011   [\\/]* | ?:[\\/]*)
21012   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21013   ;;
21014   *)
21015   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21016 for as_dir in $PATH
21017 do
21018   IFS=$as_save_IFS
21019   test -z "$as_dir" && as_dir=.
21020     for ac_exec_ext in '' $ac_executable_extensions; do
21021   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21022     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21024     break 2
21025   fi
21026 done
21027   done
21028 IFS=$as_save_IFS
21029 
21030   ;;
21031 esac
21032 fi
21033 LDD=$ac_cv_path_LDD
21034 if test -n "$LDD"; then
21035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21036 $as_echo "$LDD" >&6; }
21037 else
21038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21039 $as_echo "no" >&6; }
21040 fi
21041 
21042 
21043   test -n "$LDD" && break
21044 done
21045 
21046     else
21047       # If it succeeded, then it was overridden by the user. We will use it
21048       # for the tool.
21049 
21050       # First remove it from the list of overridden variables, so we can test
21051       # for unknown variables in the end.
21052       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21053 
21054       # Check if we try to supply an empty value
21055       if test "x$LDD" = x; then
21056         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21057 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21058         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21059 $as_echo_n "checking for LDD... " >&6; }
21060         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21061 $as_echo "disabled" >&6; }
21062       else
21063         # Check if the provided tool contains a complete path.
21064         tool_specified="$LDD"
21065         tool_basename="${tool_specified##*/}"
21066         if test "x$tool_basename" = "x$tool_specified"; then
21067           # A command without a complete path is provided, search $PATH.
21068           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21069 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21070           # Extract the first word of "$tool_basename", so it can be a program name with args.
21071 set dummy $tool_basename; ac_word=$2
21072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21073 $as_echo_n "checking for $ac_word... " >&6; }
21074 if ${ac_cv_path_LDD+:} false; then :
21075   $as_echo_n "(cached) " >&6
21076 else
21077   case $LDD in
21078   [\\/]* | ?:[\\/]*)
21079   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21080   ;;
21081   *)
21082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21083 for as_dir in $PATH
21084 do
21085   IFS=$as_save_IFS
21086   test -z "$as_dir" && as_dir=.
21087     for ac_exec_ext in '' $ac_executable_extensions; do
21088   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21089     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21090     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21091     break 2
21092   fi
21093 done
21094   done
21095 IFS=$as_save_IFS
21096 
21097   ;;
21098 esac
21099 fi
21100 LDD=$ac_cv_path_LDD
21101 if test -n "$LDD"; then
21102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21103 $as_echo "$LDD" >&6; }
21104 else
21105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21106 $as_echo "no" >&6; }
21107 fi
21108 
21109 
21110           if test "x$LDD" = x; then
21111             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21112           fi
21113         else
21114           # Otherwise we believe it is a complete path. Use it as it is.
21115           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21116 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21117           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21118 $as_echo_n "checking for LDD... " >&6; }
21119           if test ! -x "$tool_specified"; then
21120             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21121 $as_echo "not found" >&6; }
21122             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21123           fi
21124           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21125 $as_echo "$tool_specified" >&6; }
21126         fi
21127       fi
21128     fi
21129 
21130   fi
21131 
21132 
21133   if test "x$LDD" = "x"; then
21134     # List shared lib dependencies is used for
21135     # debug output and checking for forbidden dependencies.
21136     # We can build without it.
21137     LDD="true"
21138   fi
21139 
21140 
21141   # Publish this variable in the help.
21142 
21143 
21144   if [ -z "${OTOOL+x}" ]; then
21145     # The variable is not set by user, try to locate tool using the code snippet
21146     for ac_prog in otool
21147 do
21148   # Extract the first word of "$ac_prog", so it can be a program name with args.
21149 set dummy $ac_prog; ac_word=$2
21150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21151 $as_echo_n "checking for $ac_word... " >&6; }
21152 if ${ac_cv_path_OTOOL+:} false; then :
21153   $as_echo_n "(cached) " >&6
21154 else
21155   case $OTOOL in
21156   [\\/]* | ?:[\\/]*)
21157   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21158   ;;
21159   *)
21160   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21161 for as_dir in $PATH
21162 do
21163   IFS=$as_save_IFS
21164   test -z "$as_dir" && as_dir=.
21165     for ac_exec_ext in '' $ac_executable_extensions; do
21166   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21167     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21168     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21169     break 2
21170   fi
21171 done
21172   done
21173 IFS=$as_save_IFS
21174 
21175   ;;
21176 esac
21177 fi
21178 OTOOL=$ac_cv_path_OTOOL
21179 if test -n "$OTOOL"; then
21180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21181 $as_echo "$OTOOL" >&6; }
21182 else
21183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21184 $as_echo "no" >&6; }
21185 fi
21186 
21187 
21188   test -n "$OTOOL" && break
21189 done
21190 
21191   else
21192     # The variable is set, but is it from the command line or the environment?
21193 
21194     # Try to remove the string !OTOOL! from our list.
21195     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21196     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21197       # If it failed, the variable was not from the command line. Ignore it,
21198       # but warn the user (except for BASH, which is always set by the calling BASH).
21199       if test "xOTOOL" != xBASH; then
21200         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21201 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21202       fi
21203       # Try to locate tool using the code snippet
21204       for ac_prog in otool
21205 do
21206   # Extract the first word of "$ac_prog", so it can be a program name with args.
21207 set dummy $ac_prog; ac_word=$2
21208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21209 $as_echo_n "checking for $ac_word... " >&6; }
21210 if ${ac_cv_path_OTOOL+:} false; then :
21211   $as_echo_n "(cached) " >&6
21212 else
21213   case $OTOOL in
21214   [\\/]* | ?:[\\/]*)
21215   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21216   ;;
21217   *)
21218   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21219 for as_dir in $PATH
21220 do
21221   IFS=$as_save_IFS
21222   test -z "$as_dir" && as_dir=.
21223     for ac_exec_ext in '' $ac_executable_extensions; do
21224   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21225     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21226     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21227     break 2
21228   fi
21229 done
21230   done
21231 IFS=$as_save_IFS
21232 
21233   ;;
21234 esac
21235 fi
21236 OTOOL=$ac_cv_path_OTOOL
21237 if test -n "$OTOOL"; then
21238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21239 $as_echo "$OTOOL" >&6; }
21240 else
21241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21242 $as_echo "no" >&6; }
21243 fi
21244 
21245 
21246   test -n "$OTOOL" && break
21247 done
21248 
21249     else
21250       # If it succeeded, then it was overridden by the user. We will use it
21251       # for the tool.
21252 
21253       # First remove it from the list of overridden variables, so we can test
21254       # for unknown variables in the end.
21255       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21256 
21257       # Check if we try to supply an empty value
21258       if test "x$OTOOL" = x; then
21259         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21260 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21261         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21262 $as_echo_n "checking for OTOOL... " >&6; }
21263         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21264 $as_echo "disabled" >&6; }
21265       else
21266         # Check if the provided tool contains a complete path.
21267         tool_specified="$OTOOL"
21268         tool_basename="${tool_specified##*/}"
21269         if test "x$tool_basename" = "x$tool_specified"; then
21270           # A command without a complete path is provided, search $PATH.
21271           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21272 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21273           # Extract the first word of "$tool_basename", so it can be a program name with args.
21274 set dummy $tool_basename; ac_word=$2
21275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21276 $as_echo_n "checking for $ac_word... " >&6; }
21277 if ${ac_cv_path_OTOOL+:} false; then :
21278   $as_echo_n "(cached) " >&6
21279 else
21280   case $OTOOL in
21281   [\\/]* | ?:[\\/]*)
21282   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21283   ;;
21284   *)
21285   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21286 for as_dir in $PATH
21287 do
21288   IFS=$as_save_IFS
21289   test -z "$as_dir" && as_dir=.
21290     for ac_exec_ext in '' $ac_executable_extensions; do
21291   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21292     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21293     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21294     break 2
21295   fi
21296 done
21297   done
21298 IFS=$as_save_IFS
21299 
21300   ;;
21301 esac
21302 fi
21303 OTOOL=$ac_cv_path_OTOOL
21304 if test -n "$OTOOL"; then
21305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21306 $as_echo "$OTOOL" >&6; }
21307 else
21308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21309 $as_echo "no" >&6; }
21310 fi
21311 
21312 
21313           if test "x$OTOOL" = x; then
21314             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21315           fi
21316         else
21317           # Otherwise we believe it is a complete path. Use it as it is.
21318           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21319 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21320           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21321 $as_echo_n "checking for OTOOL... " >&6; }
21322           if test ! -x "$tool_specified"; then
21323             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21324 $as_echo "not found" >&6; }
21325             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21326           fi
21327           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21328 $as_echo "$tool_specified" >&6; }
21329         fi
21330       fi
21331     fi
21332 
21333   fi
21334 
21335 
21336   if test "x$OTOOL" = "x"; then
21337     OTOOL="true"
21338   fi
21339 
21340 
21341   # Publish this variable in the help.
21342 
21343 
21344   if [ -z "${READELF+x}" ]; then
21345     # The variable is not set by user, try to locate tool using the code snippet
21346     for ac_prog in greadelf readelf
21347 do
21348   # Extract the first word of "$ac_prog", so it can be a program name with args.
21349 set dummy $ac_prog; ac_word=$2
21350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21351 $as_echo_n "checking for $ac_word... " >&6; }
21352 if ${ac_cv_path_READELF+:} false; then :
21353   $as_echo_n "(cached) " >&6
21354 else
21355   case $READELF in
21356   [\\/]* | ?:[\\/]*)
21357   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21358   ;;
21359   *)
21360   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21361 for as_dir in $PATH
21362 do
21363   IFS=$as_save_IFS
21364   test -z "$as_dir" && as_dir=.
21365     for ac_exec_ext in '' $ac_executable_extensions; do
21366   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21367     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21368     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21369     break 2
21370   fi
21371 done
21372   done
21373 IFS=$as_save_IFS
21374 
21375   ;;
21376 esac
21377 fi
21378 READELF=$ac_cv_path_READELF
21379 if test -n "$READELF"; then
21380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21381 $as_echo "$READELF" >&6; }
21382 else
21383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21384 $as_echo "no" >&6; }
21385 fi
21386 
21387 
21388   test -n "$READELF" && break
21389 done
21390 
21391   else
21392     # The variable is set, but is it from the command line or the environment?
21393 
21394     # Try to remove the string !READELF! from our list.
21395     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21396     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21397       # If it failed, the variable was not from the command line. Ignore it,
21398       # but warn the user (except for BASH, which is always set by the calling BASH).
21399       if test "xREADELF" != xBASH; then
21400         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21401 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21402       fi
21403       # Try to locate tool using the code snippet
21404       for ac_prog in greadelf readelf
21405 do
21406   # Extract the first word of "$ac_prog", so it can be a program name with args.
21407 set dummy $ac_prog; ac_word=$2
21408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21409 $as_echo_n "checking for $ac_word... " >&6; }
21410 if ${ac_cv_path_READELF+:} false; then :
21411   $as_echo_n "(cached) " >&6
21412 else
21413   case $READELF in
21414   [\\/]* | ?:[\\/]*)
21415   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21416   ;;
21417   *)
21418   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21419 for as_dir in $PATH
21420 do
21421   IFS=$as_save_IFS
21422   test -z "$as_dir" && as_dir=.
21423     for ac_exec_ext in '' $ac_executable_extensions; do
21424   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21425     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21426     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21427     break 2
21428   fi
21429 done
21430   done
21431 IFS=$as_save_IFS
21432 
21433   ;;
21434 esac
21435 fi
21436 READELF=$ac_cv_path_READELF
21437 if test -n "$READELF"; then
21438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21439 $as_echo "$READELF" >&6; }
21440 else
21441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21442 $as_echo "no" >&6; }
21443 fi
21444 
21445 
21446   test -n "$READELF" && break
21447 done
21448 
21449     else
21450       # If it succeeded, then it was overridden by the user. We will use it
21451       # for the tool.
21452 
21453       # First remove it from the list of overridden variables, so we can test
21454       # for unknown variables in the end.
21455       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21456 
21457       # Check if we try to supply an empty value
21458       if test "x$READELF" = x; then
21459         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21460 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21461         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21462 $as_echo_n "checking for READELF... " >&6; }
21463         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21464 $as_echo "disabled" >&6; }
21465       else
21466         # Check if the provided tool contains a complete path.
21467         tool_specified="$READELF"
21468         tool_basename="${tool_specified##*/}"
21469         if test "x$tool_basename" = "x$tool_specified"; then
21470           # A command without a complete path is provided, search $PATH.
21471           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21472 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21473           # Extract the first word of "$tool_basename", so it can be a program name with args.
21474 set dummy $tool_basename; ac_word=$2
21475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21476 $as_echo_n "checking for $ac_word... " >&6; }
21477 if ${ac_cv_path_READELF+:} false; then :
21478   $as_echo_n "(cached) " >&6
21479 else
21480   case $READELF in
21481   [\\/]* | ?:[\\/]*)
21482   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21483   ;;
21484   *)
21485   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21486 for as_dir in $PATH
21487 do
21488   IFS=$as_save_IFS
21489   test -z "$as_dir" && as_dir=.
21490     for ac_exec_ext in '' $ac_executable_extensions; do
21491   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21492     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21493     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21494     break 2
21495   fi
21496 done
21497   done
21498 IFS=$as_save_IFS
21499 
21500   ;;
21501 esac
21502 fi
21503 READELF=$ac_cv_path_READELF
21504 if test -n "$READELF"; then
21505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21506 $as_echo "$READELF" >&6; }
21507 else
21508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21509 $as_echo "no" >&6; }
21510 fi
21511 
21512 
21513           if test "x$READELF" = x; then
21514             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21515           fi
21516         else
21517           # Otherwise we believe it is a complete path. Use it as it is.
21518           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21519 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21520           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21521 $as_echo_n "checking for READELF... " >&6; }
21522           if test ! -x "$tool_specified"; then
21523             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21524 $as_echo "not found" >&6; }
21525             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21526           fi
21527           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21528 $as_echo "$tool_specified" >&6; }
21529         fi
21530       fi
21531     fi
21532 
21533   fi
21534 
21535 
21536 
21537 
21538   # Publish this variable in the help.
21539 
21540 
21541   if [ -z "${HG+x}" ]; then
21542     # The variable is not set by user, try to locate tool using the code snippet
21543     for ac_prog in hg
21544 do
21545   # Extract the first word of "$ac_prog", so it can be a program name with args.
21546 set dummy $ac_prog; ac_word=$2
21547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21548 $as_echo_n "checking for $ac_word... " >&6; }
21549 if ${ac_cv_path_HG+:} false; then :
21550   $as_echo_n "(cached) " >&6
21551 else
21552   case $HG in
21553   [\\/]* | ?:[\\/]*)
21554   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21555   ;;
21556   *)
21557   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21558 for as_dir in $PATH
21559 do
21560   IFS=$as_save_IFS
21561   test -z "$as_dir" && as_dir=.
21562     for ac_exec_ext in '' $ac_executable_extensions; do
21563   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21564     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21565     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21566     break 2
21567   fi
21568 done
21569   done
21570 IFS=$as_save_IFS
21571 
21572   ;;
21573 esac
21574 fi
21575 HG=$ac_cv_path_HG
21576 if test -n "$HG"; then
21577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21578 $as_echo "$HG" >&6; }
21579 else
21580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21581 $as_echo "no" >&6; }
21582 fi
21583 
21584 
21585   test -n "$HG" && break
21586 done
21587 
21588   else
21589     # The variable is set, but is it from the command line or the environment?
21590 
21591     # Try to remove the string !HG! from our list.
21592     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21593     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21594       # If it failed, the variable was not from the command line. Ignore it,
21595       # but warn the user (except for BASH, which is always set by the calling BASH).
21596       if test "xHG" != xBASH; then
21597         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21598 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21599       fi
21600       # Try to locate tool using the code snippet
21601       for ac_prog in hg
21602 do
21603   # Extract the first word of "$ac_prog", so it can be a program name with args.
21604 set dummy $ac_prog; ac_word=$2
21605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21606 $as_echo_n "checking for $ac_word... " >&6; }
21607 if ${ac_cv_path_HG+:} false; then :
21608   $as_echo_n "(cached) " >&6
21609 else
21610   case $HG in
21611   [\\/]* | ?:[\\/]*)
21612   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21613   ;;
21614   *)
21615   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21616 for as_dir in $PATH
21617 do
21618   IFS=$as_save_IFS
21619   test -z "$as_dir" && as_dir=.
21620     for ac_exec_ext in '' $ac_executable_extensions; do
21621   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21622     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21623     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21624     break 2
21625   fi
21626 done
21627   done
21628 IFS=$as_save_IFS
21629 
21630   ;;
21631 esac
21632 fi
21633 HG=$ac_cv_path_HG
21634 if test -n "$HG"; then
21635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21636 $as_echo "$HG" >&6; }
21637 else
21638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21639 $as_echo "no" >&6; }
21640 fi
21641 
21642 
21643   test -n "$HG" && break
21644 done
21645 
21646     else
21647       # If it succeeded, then it was overridden by the user. We will use it
21648       # for the tool.
21649 
21650       # First remove it from the list of overridden variables, so we can test
21651       # for unknown variables in the end.
21652       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21653 
21654       # Check if we try to supply an empty value
21655       if test "x$HG" = x; then
21656         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21657 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21658         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21659 $as_echo_n "checking for HG... " >&6; }
21660         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21661 $as_echo "disabled" >&6; }
21662       else
21663         # Check if the provided tool contains a complete path.
21664         tool_specified="$HG"
21665         tool_basename="${tool_specified##*/}"
21666         if test "x$tool_basename" = "x$tool_specified"; then
21667           # A command without a complete path is provided, search $PATH.
21668           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21669 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21670           # Extract the first word of "$tool_basename", so it can be a program name with args.
21671 set dummy $tool_basename; ac_word=$2
21672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21673 $as_echo_n "checking for $ac_word... " >&6; }
21674 if ${ac_cv_path_HG+:} false; then :
21675   $as_echo_n "(cached) " >&6
21676 else
21677   case $HG in
21678   [\\/]* | ?:[\\/]*)
21679   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21680   ;;
21681   *)
21682   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21683 for as_dir in $PATH
21684 do
21685   IFS=$as_save_IFS
21686   test -z "$as_dir" && as_dir=.
21687     for ac_exec_ext in '' $ac_executable_extensions; do
21688   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21689     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21690     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21691     break 2
21692   fi
21693 done
21694   done
21695 IFS=$as_save_IFS
21696 
21697   ;;
21698 esac
21699 fi
21700 HG=$ac_cv_path_HG
21701 if test -n "$HG"; then
21702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21703 $as_echo "$HG" >&6; }
21704 else
21705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21706 $as_echo "no" >&6; }
21707 fi
21708 
21709 
21710           if test "x$HG" = x; then
21711             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21712           fi
21713         else
21714           # Otherwise we believe it is a complete path. Use it as it is.
21715           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21716 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21717           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21718 $as_echo_n "checking for HG... " >&6; }
21719           if test ! -x "$tool_specified"; then
21720             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21721 $as_echo "not found" >&6; }
21722             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21723           fi
21724           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21725 $as_echo "$tool_specified" >&6; }
21726         fi
21727       fi
21728     fi
21729 
21730   fi
21731 
21732 
21733 
21734 
21735   # Publish this variable in the help.
21736 
21737 
21738   if [ -z "${STAT+x}" ]; then
21739     # The variable is not set by user, try to locate tool using the code snippet
21740     for ac_prog in stat
21741 do
21742   # Extract the first word of "$ac_prog", so it can be a program name with args.
21743 set dummy $ac_prog; ac_word=$2
21744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21745 $as_echo_n "checking for $ac_word... " >&6; }
21746 if ${ac_cv_path_STAT+:} false; then :
21747   $as_echo_n "(cached) " >&6
21748 else
21749   case $STAT in
21750   [\\/]* | ?:[\\/]*)
21751   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21752   ;;
21753   *)
21754   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21755 for as_dir in $PATH
21756 do
21757   IFS=$as_save_IFS
21758   test -z "$as_dir" && as_dir=.
21759     for ac_exec_ext in '' $ac_executable_extensions; do
21760   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21761     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21762     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21763     break 2
21764   fi
21765 done
21766   done
21767 IFS=$as_save_IFS
21768 
21769   ;;
21770 esac
21771 fi
21772 STAT=$ac_cv_path_STAT
21773 if test -n "$STAT"; then
21774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21775 $as_echo "$STAT" >&6; }
21776 else
21777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21778 $as_echo "no" >&6; }
21779 fi
21780 
21781 
21782   test -n "$STAT" && break
21783 done
21784 
21785   else
21786     # The variable is set, but is it from the command line or the environment?
21787 
21788     # Try to remove the string !STAT! from our list.
21789     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21790     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21791       # If it failed, the variable was not from the command line. Ignore it,
21792       # but warn the user (except for BASH, which is always set by the calling BASH).
21793       if test "xSTAT" != xBASH; then
21794         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21795 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21796       fi
21797       # Try to locate tool using the code snippet
21798       for ac_prog in stat
21799 do
21800   # Extract the first word of "$ac_prog", so it can be a program name with args.
21801 set dummy $ac_prog; ac_word=$2
21802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21803 $as_echo_n "checking for $ac_word... " >&6; }
21804 if ${ac_cv_path_STAT+:} false; then :
21805   $as_echo_n "(cached) " >&6
21806 else
21807   case $STAT in
21808   [\\/]* | ?:[\\/]*)
21809   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21810   ;;
21811   *)
21812   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21813 for as_dir in $PATH
21814 do
21815   IFS=$as_save_IFS
21816   test -z "$as_dir" && as_dir=.
21817     for ac_exec_ext in '' $ac_executable_extensions; do
21818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21819     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21821     break 2
21822   fi
21823 done
21824   done
21825 IFS=$as_save_IFS
21826 
21827   ;;
21828 esac
21829 fi
21830 STAT=$ac_cv_path_STAT
21831 if test -n "$STAT"; then
21832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21833 $as_echo "$STAT" >&6; }
21834 else
21835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21836 $as_echo "no" >&6; }
21837 fi
21838 
21839 
21840   test -n "$STAT" && break
21841 done
21842 
21843     else
21844       # If it succeeded, then it was overridden by the user. We will use it
21845       # for the tool.
21846 
21847       # First remove it from the list of overridden variables, so we can test
21848       # for unknown variables in the end.
21849       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21850 
21851       # Check if we try to supply an empty value
21852       if test "x$STAT" = x; then
21853         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21854 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21855         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21856 $as_echo_n "checking for STAT... " >&6; }
21857         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21858 $as_echo "disabled" >&6; }
21859       else
21860         # Check if the provided tool contains a complete path.
21861         tool_specified="$STAT"
21862         tool_basename="${tool_specified##*/}"
21863         if test "x$tool_basename" = "x$tool_specified"; then
21864           # A command without a complete path is provided, search $PATH.
21865           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21866 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21867           # Extract the first word of "$tool_basename", so it can be a program name with args.
21868 set dummy $tool_basename; ac_word=$2
21869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21870 $as_echo_n "checking for $ac_word... " >&6; }
21871 if ${ac_cv_path_STAT+:} false; then :
21872   $as_echo_n "(cached) " >&6
21873 else
21874   case $STAT in
21875   [\\/]* | ?:[\\/]*)
21876   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21877   ;;
21878   *)
21879   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21880 for as_dir in $PATH
21881 do
21882   IFS=$as_save_IFS
21883   test -z "$as_dir" && as_dir=.
21884     for ac_exec_ext in '' $ac_executable_extensions; do
21885   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21886     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21887     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21888     break 2
21889   fi
21890 done
21891   done
21892 IFS=$as_save_IFS
21893 
21894   ;;
21895 esac
21896 fi
21897 STAT=$ac_cv_path_STAT
21898 if test -n "$STAT"; then
21899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21900 $as_echo "$STAT" >&6; }
21901 else
21902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21903 $as_echo "no" >&6; }
21904 fi
21905 
21906 
21907           if test "x$STAT" = x; then
21908             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21909           fi
21910         else
21911           # Otherwise we believe it is a complete path. Use it as it is.
21912           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21913 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21914           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21915 $as_echo_n "checking for STAT... " >&6; }
21916           if test ! -x "$tool_specified"; then
21917             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21918 $as_echo "not found" >&6; }
21919             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21920           fi
21921           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21922 $as_echo "$tool_specified" >&6; }
21923         fi
21924       fi
21925     fi
21926 
21927   fi
21928 
21929 
21930 
21931 
21932   # Publish this variable in the help.
21933 
21934 
21935   if [ -z "${TIME+x}" ]; then
21936     # The variable is not set by user, try to locate tool using the code snippet
21937     for ac_prog in time
21938 do
21939   # Extract the first word of "$ac_prog", so it can be a program name with args.
21940 set dummy $ac_prog; ac_word=$2
21941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21942 $as_echo_n "checking for $ac_word... " >&6; }
21943 if ${ac_cv_path_TIME+:} false; then :
21944   $as_echo_n "(cached) " >&6
21945 else
21946   case $TIME in
21947   [\\/]* | ?:[\\/]*)
21948   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21949   ;;
21950   *)
21951   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21952 for as_dir in $PATH
21953 do
21954   IFS=$as_save_IFS
21955   test -z "$as_dir" && as_dir=.
21956     for ac_exec_ext in '' $ac_executable_extensions; do
21957   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21958     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21959     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21960     break 2
21961   fi
21962 done
21963   done
21964 IFS=$as_save_IFS
21965 
21966   ;;
21967 esac
21968 fi
21969 TIME=$ac_cv_path_TIME
21970 if test -n "$TIME"; then
21971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21972 $as_echo "$TIME" >&6; }
21973 else
21974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21975 $as_echo "no" >&6; }
21976 fi
21977 
21978 
21979   test -n "$TIME" && break
21980 done
21981 
21982   else
21983     # The variable is set, but is it from the command line or the environment?
21984 
21985     # Try to remove the string !TIME! from our list.
21986     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21987     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21988       # If it failed, the variable was not from the command line. Ignore it,
21989       # but warn the user (except for BASH, which is always set by the calling BASH).
21990       if test "xTIME" != xBASH; then
21991         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21992 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21993       fi
21994       # Try to locate tool using the code snippet
21995       for ac_prog in time
21996 do
21997   # Extract the first word of "$ac_prog", so it can be a program name with args.
21998 set dummy $ac_prog; ac_word=$2
21999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22000 $as_echo_n "checking for $ac_word... " >&6; }
22001 if ${ac_cv_path_TIME+:} false; then :
22002   $as_echo_n "(cached) " >&6
22003 else
22004   case $TIME in
22005   [\\/]* | ?:[\\/]*)
22006   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22007   ;;
22008   *)
22009   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22010 for as_dir in $PATH
22011 do
22012   IFS=$as_save_IFS
22013   test -z "$as_dir" && as_dir=.
22014     for ac_exec_ext in '' $ac_executable_extensions; do
22015   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22016     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22017     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22018     break 2
22019   fi
22020 done
22021   done
22022 IFS=$as_save_IFS
22023 
22024   ;;
22025 esac
22026 fi
22027 TIME=$ac_cv_path_TIME
22028 if test -n "$TIME"; then
22029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22030 $as_echo "$TIME" >&6; }
22031 else
22032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22033 $as_echo "no" >&6; }
22034 fi
22035 
22036 
22037   test -n "$TIME" && break
22038 done
22039 
22040     else
22041       # If it succeeded, then it was overridden by the user. We will use it
22042       # for the tool.
22043 
22044       # First remove it from the list of overridden variables, so we can test
22045       # for unknown variables in the end.
22046       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22047 
22048       # Check if we try to supply an empty value
22049       if test "x$TIME" = x; then
22050         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22051 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22052         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22053 $as_echo_n "checking for TIME... " >&6; }
22054         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22055 $as_echo "disabled" >&6; }
22056       else
22057         # Check if the provided tool contains a complete path.
22058         tool_specified="$TIME"
22059         tool_basename="${tool_specified##*/}"
22060         if test "x$tool_basename" = "x$tool_specified"; then
22061           # A command without a complete path is provided, search $PATH.
22062           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22063 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22064           # Extract the first word of "$tool_basename", so it can be a program name with args.
22065 set dummy $tool_basename; ac_word=$2
22066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22067 $as_echo_n "checking for $ac_word... " >&6; }
22068 if ${ac_cv_path_TIME+:} false; then :
22069   $as_echo_n "(cached) " >&6
22070 else
22071   case $TIME in
22072   [\\/]* | ?:[\\/]*)
22073   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22074   ;;
22075   *)
22076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22077 for as_dir in $PATH
22078 do
22079   IFS=$as_save_IFS
22080   test -z "$as_dir" && as_dir=.
22081     for ac_exec_ext in '' $ac_executable_extensions; do
22082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22083     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22085     break 2
22086   fi
22087 done
22088   done
22089 IFS=$as_save_IFS
22090 
22091   ;;
22092 esac
22093 fi
22094 TIME=$ac_cv_path_TIME
22095 if test -n "$TIME"; then
22096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22097 $as_echo "$TIME" >&6; }
22098 else
22099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22100 $as_echo "no" >&6; }
22101 fi
22102 
22103 
22104           if test "x$TIME" = x; then
22105             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22106           fi
22107         else
22108           # Otherwise we believe it is a complete path. Use it as it is.
22109           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22110 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22111           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22112 $as_echo_n "checking for TIME... " >&6; }
22113           if test ! -x "$tool_specified"; then
22114             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22115 $as_echo "not found" >&6; }
22116             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22117           fi
22118           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22119 $as_echo "$tool_specified" >&6; }
22120         fi
22121       fi
22122     fi
22123 
22124   fi
22125 
22126 
22127 
22128 
22129   # Publish this variable in the help.
22130 
22131 
22132   if [ -z "${PATCH+x}" ]; then
22133     # The variable is not set by user, try to locate tool using the code snippet
22134     for ac_prog in gpatch patch
22135 do
22136   # Extract the first word of "$ac_prog", so it can be a program name with args.
22137 set dummy $ac_prog; ac_word=$2
22138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22139 $as_echo_n "checking for $ac_word... " >&6; }
22140 if ${ac_cv_path_PATCH+:} false; then :
22141   $as_echo_n "(cached) " >&6
22142 else
22143   case $PATCH in
22144   [\\/]* | ?:[\\/]*)
22145   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22146   ;;
22147   *)
22148   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22149 for as_dir in $PATH
22150 do
22151   IFS=$as_save_IFS
22152   test -z "$as_dir" && as_dir=.
22153     for ac_exec_ext in '' $ac_executable_extensions; do
22154   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22155     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22156     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22157     break 2
22158   fi
22159 done
22160   done
22161 IFS=$as_save_IFS
22162 
22163   ;;
22164 esac
22165 fi
22166 PATCH=$ac_cv_path_PATCH
22167 if test -n "$PATCH"; then
22168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22169 $as_echo "$PATCH" >&6; }
22170 else
22171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22172 $as_echo "no" >&6; }
22173 fi
22174 
22175 
22176   test -n "$PATCH" && break
22177 done
22178 
22179   else
22180     # The variable is set, but is it from the command line or the environment?
22181 
22182     # Try to remove the string !PATCH! from our list.
22183     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22184     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22185       # If it failed, the variable was not from the command line. Ignore it,
22186       # but warn the user (except for BASH, which is always set by the calling BASH).
22187       if test "xPATCH" != xBASH; then
22188         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22189 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22190       fi
22191       # Try to locate tool using the code snippet
22192       for ac_prog in gpatch patch
22193 do
22194   # Extract the first word of "$ac_prog", so it can be a program name with args.
22195 set dummy $ac_prog; ac_word=$2
22196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22197 $as_echo_n "checking for $ac_word... " >&6; }
22198 if ${ac_cv_path_PATCH+:} false; then :
22199   $as_echo_n "(cached) " >&6
22200 else
22201   case $PATCH in
22202   [\\/]* | ?:[\\/]*)
22203   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22204   ;;
22205   *)
22206   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22207 for as_dir in $PATH
22208 do
22209   IFS=$as_save_IFS
22210   test -z "$as_dir" && as_dir=.
22211     for ac_exec_ext in '' $ac_executable_extensions; do
22212   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22213     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22214     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22215     break 2
22216   fi
22217 done
22218   done
22219 IFS=$as_save_IFS
22220 
22221   ;;
22222 esac
22223 fi
22224 PATCH=$ac_cv_path_PATCH
22225 if test -n "$PATCH"; then
22226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22227 $as_echo "$PATCH" >&6; }
22228 else
22229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22230 $as_echo "no" >&6; }
22231 fi
22232 
22233 
22234   test -n "$PATCH" && break
22235 done
22236 
22237     else
22238       # If it succeeded, then it was overridden by the user. We will use it
22239       # for the tool.
22240 
22241       # First remove it from the list of overridden variables, so we can test
22242       # for unknown variables in the end.
22243       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22244 
22245       # Check if we try to supply an empty value
22246       if test "x$PATCH" = x; then
22247         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22248 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22249         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22250 $as_echo_n "checking for PATCH... " >&6; }
22251         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22252 $as_echo "disabled" >&6; }
22253       else
22254         # Check if the provided tool contains a complete path.
22255         tool_specified="$PATCH"
22256         tool_basename="${tool_specified##*/}"
22257         if test "x$tool_basename" = "x$tool_specified"; then
22258           # A command without a complete path is provided, search $PATH.
22259           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22260 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22261           # Extract the first word of "$tool_basename", so it can be a program name with args.
22262 set dummy $tool_basename; ac_word=$2
22263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22264 $as_echo_n "checking for $ac_word... " >&6; }
22265 if ${ac_cv_path_PATCH+:} false; then :
22266   $as_echo_n "(cached) " >&6
22267 else
22268   case $PATCH in
22269   [\\/]* | ?:[\\/]*)
22270   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22271   ;;
22272   *)
22273   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22274 for as_dir in $PATH
22275 do
22276   IFS=$as_save_IFS
22277   test -z "$as_dir" && as_dir=.
22278     for ac_exec_ext in '' $ac_executable_extensions; do
22279   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22280     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22281     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22282     break 2
22283   fi
22284 done
22285   done
22286 IFS=$as_save_IFS
22287 
22288   ;;
22289 esac
22290 fi
22291 PATCH=$ac_cv_path_PATCH
22292 if test -n "$PATCH"; then
22293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22294 $as_echo "$PATCH" >&6; }
22295 else
22296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22297 $as_echo "no" >&6; }
22298 fi
22299 
22300 
22301           if test "x$PATCH" = x; then
22302             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22303           fi
22304         else
22305           # Otherwise we believe it is a complete path. Use it as it is.
22306           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22307 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22308           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22309 $as_echo_n "checking for PATCH... " >&6; }
22310           if test ! -x "$tool_specified"; then
22311             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22312 $as_echo "not found" >&6; }
22313             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22314           fi
22315           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22316 $as_echo "$tool_specified" >&6; }
22317         fi
22318       fi
22319     fi
22320 
22321   fi
22322 
22323 
22324   # Check if it's GNU time
22325   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22326   if test "x$IS_GNU_TIME" != x; then
22327     IS_GNU_TIME=yes
22328   else
22329     IS_GNU_TIME=no
22330   fi
22331 
22332 
22333   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22334 
22335 
22336 
22337   # Publish this variable in the help.
22338 
22339 
22340   if [ -z "${DSYMUTIL+x}" ]; then
22341     # The variable is not set by user, try to locate tool using the code snippet
22342     for ac_prog in dsymutil
22343 do
22344   # Extract the first word of "$ac_prog", so it can be a program name with args.
22345 set dummy $ac_prog; ac_word=$2
22346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22347 $as_echo_n "checking for $ac_word... " >&6; }
22348 if ${ac_cv_path_DSYMUTIL+:} false; then :
22349   $as_echo_n "(cached) " >&6
22350 else
22351   case $DSYMUTIL in
22352   [\\/]* | ?:[\\/]*)
22353   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22354   ;;
22355   *)
22356   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22357 for as_dir in $PATH
22358 do
22359   IFS=$as_save_IFS
22360   test -z "$as_dir" && as_dir=.
22361     for ac_exec_ext in '' $ac_executable_extensions; do
22362   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22363     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22364     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22365     break 2
22366   fi
22367 done
22368   done
22369 IFS=$as_save_IFS
22370 
22371   ;;
22372 esac
22373 fi
22374 DSYMUTIL=$ac_cv_path_DSYMUTIL
22375 if test -n "$DSYMUTIL"; then
22376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22377 $as_echo "$DSYMUTIL" >&6; }
22378 else
22379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22380 $as_echo "no" >&6; }
22381 fi
22382 
22383 
22384   test -n "$DSYMUTIL" && break
22385 done
22386 
22387   else
22388     # The variable is set, but is it from the command line or the environment?
22389 
22390     # Try to remove the string !DSYMUTIL! from our list.
22391     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22392     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22393       # If it failed, the variable was not from the command line. Ignore it,
22394       # but warn the user (except for BASH, which is always set by the calling BASH).
22395       if test "xDSYMUTIL" != xBASH; then
22396         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22397 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22398       fi
22399       # Try to locate tool using the code snippet
22400       for ac_prog in dsymutil
22401 do
22402   # Extract the first word of "$ac_prog", so it can be a program name with args.
22403 set dummy $ac_prog; ac_word=$2
22404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22405 $as_echo_n "checking for $ac_word... " >&6; }
22406 if ${ac_cv_path_DSYMUTIL+:} false; then :
22407   $as_echo_n "(cached) " >&6
22408 else
22409   case $DSYMUTIL in
22410   [\\/]* | ?:[\\/]*)
22411   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22412   ;;
22413   *)
22414   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22415 for as_dir in $PATH
22416 do
22417   IFS=$as_save_IFS
22418   test -z "$as_dir" && as_dir=.
22419     for ac_exec_ext in '' $ac_executable_extensions; do
22420   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22421     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22422     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22423     break 2
22424   fi
22425 done
22426   done
22427 IFS=$as_save_IFS
22428 
22429   ;;
22430 esac
22431 fi
22432 DSYMUTIL=$ac_cv_path_DSYMUTIL
22433 if test -n "$DSYMUTIL"; then
22434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22435 $as_echo "$DSYMUTIL" >&6; }
22436 else
22437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22438 $as_echo "no" >&6; }
22439 fi
22440 
22441 
22442   test -n "$DSYMUTIL" && break
22443 done
22444 
22445     else
22446       # If it succeeded, then it was overridden by the user. We will use it
22447       # for the tool.
22448 
22449       # First remove it from the list of overridden variables, so we can test
22450       # for unknown variables in the end.
22451       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22452 
22453       # Check if we try to supply an empty value
22454       if test "x$DSYMUTIL" = x; then
22455         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22456 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22457         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22458 $as_echo_n "checking for DSYMUTIL... " >&6; }
22459         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22460 $as_echo "disabled" >&6; }
22461       else
22462         # Check if the provided tool contains a complete path.
22463         tool_specified="$DSYMUTIL"
22464         tool_basename="${tool_specified##*/}"
22465         if test "x$tool_basename" = "x$tool_specified"; then
22466           # A command without a complete path is provided, search $PATH.
22467           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22468 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22469           # Extract the first word of "$tool_basename", so it can be a program name with args.
22470 set dummy $tool_basename; ac_word=$2
22471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22472 $as_echo_n "checking for $ac_word... " >&6; }
22473 if ${ac_cv_path_DSYMUTIL+:} false; then :
22474   $as_echo_n "(cached) " >&6
22475 else
22476   case $DSYMUTIL in
22477   [\\/]* | ?:[\\/]*)
22478   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22479   ;;
22480   *)
22481   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22482 for as_dir in $PATH
22483 do
22484   IFS=$as_save_IFS
22485   test -z "$as_dir" && as_dir=.
22486     for ac_exec_ext in '' $ac_executable_extensions; do
22487   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22488     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22489     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22490     break 2
22491   fi
22492 done
22493   done
22494 IFS=$as_save_IFS
22495 
22496   ;;
22497 esac
22498 fi
22499 DSYMUTIL=$ac_cv_path_DSYMUTIL
22500 if test -n "$DSYMUTIL"; then
22501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22502 $as_echo "$DSYMUTIL" >&6; }
22503 else
22504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22505 $as_echo "no" >&6; }
22506 fi
22507 
22508 
22509           if test "x$DSYMUTIL" = x; then
22510             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22511           fi
22512         else
22513           # Otherwise we believe it is a complete path. Use it as it is.
22514           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22515 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22516           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22517 $as_echo_n "checking for DSYMUTIL... " >&6; }
22518           if test ! -x "$tool_specified"; then
22519             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22520 $as_echo "not found" >&6; }
22521             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22522           fi
22523           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22524 $as_echo "$tool_specified" >&6; }
22525         fi
22526       fi
22527     fi
22528 
22529   fi
22530 
22531 
22532 
22533   if test "x$DSYMUTIL" = x; then
22534     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22535   fi
22536 
22537 
22538 
22539 
22540 
22541   # Publish this variable in the help.
22542 
22543 
22544   if [ -z "${XATTR+x}" ]; then
22545     # The variable is not set by user, try to locate tool using the code snippet
22546     for ac_prog in xattr
22547 do
22548   # Extract the first word of "$ac_prog", so it can be a program name with args.
22549 set dummy $ac_prog; ac_word=$2
22550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22551 $as_echo_n "checking for $ac_word... " >&6; }
22552 if ${ac_cv_path_XATTR+:} false; then :
22553   $as_echo_n "(cached) " >&6
22554 else
22555   case $XATTR in
22556   [\\/]* | ?:[\\/]*)
22557   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22558   ;;
22559   *)
22560   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22561 for as_dir in $PATH
22562 do
22563   IFS=$as_save_IFS
22564   test -z "$as_dir" && as_dir=.
22565     for ac_exec_ext in '' $ac_executable_extensions; do
22566   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22567     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22569     break 2
22570   fi
22571 done
22572   done
22573 IFS=$as_save_IFS
22574 
22575   ;;
22576 esac
22577 fi
22578 XATTR=$ac_cv_path_XATTR
22579 if test -n "$XATTR"; then
22580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22581 $as_echo "$XATTR" >&6; }
22582 else
22583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22584 $as_echo "no" >&6; }
22585 fi
22586 
22587 
22588   test -n "$XATTR" && break
22589 done
22590 
22591   else
22592     # The variable is set, but is it from the command line or the environment?
22593 
22594     # Try to remove the string !XATTR! from our list.
22595     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22596     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22597       # If it failed, the variable was not from the command line. Ignore it,
22598       # but warn the user (except for BASH, which is always set by the calling BASH).
22599       if test "xXATTR" != xBASH; then
22600         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22601 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22602       fi
22603       # Try to locate tool using the code snippet
22604       for ac_prog in xattr
22605 do
22606   # Extract the first word of "$ac_prog", so it can be a program name with args.
22607 set dummy $ac_prog; ac_word=$2
22608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22609 $as_echo_n "checking for $ac_word... " >&6; }
22610 if ${ac_cv_path_XATTR+:} false; then :
22611   $as_echo_n "(cached) " >&6
22612 else
22613   case $XATTR in
22614   [\\/]* | ?:[\\/]*)
22615   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22616   ;;
22617   *)
22618   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22619 for as_dir in $PATH
22620 do
22621   IFS=$as_save_IFS
22622   test -z "$as_dir" && as_dir=.
22623     for ac_exec_ext in '' $ac_executable_extensions; do
22624   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22625     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22626     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22627     break 2
22628   fi
22629 done
22630   done
22631 IFS=$as_save_IFS
22632 
22633   ;;
22634 esac
22635 fi
22636 XATTR=$ac_cv_path_XATTR
22637 if test -n "$XATTR"; then
22638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22639 $as_echo "$XATTR" >&6; }
22640 else
22641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22642 $as_echo "no" >&6; }
22643 fi
22644 
22645 
22646   test -n "$XATTR" && break
22647 done
22648 
22649     else
22650       # If it succeeded, then it was overridden by the user. We will use it
22651       # for the tool.
22652 
22653       # First remove it from the list of overridden variables, so we can test
22654       # for unknown variables in the end.
22655       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22656 
22657       # Check if we try to supply an empty value
22658       if test "x$XATTR" = x; then
22659         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22660 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22661         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22662 $as_echo_n "checking for XATTR... " >&6; }
22663         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22664 $as_echo "disabled" >&6; }
22665       else
22666         # Check if the provided tool contains a complete path.
22667         tool_specified="$XATTR"
22668         tool_basename="${tool_specified##*/}"
22669         if test "x$tool_basename" = "x$tool_specified"; then
22670           # A command without a complete path is provided, search $PATH.
22671           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22672 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22673           # Extract the first word of "$tool_basename", so it can be a program name with args.
22674 set dummy $tool_basename; ac_word=$2
22675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22676 $as_echo_n "checking for $ac_word... " >&6; }
22677 if ${ac_cv_path_XATTR+:} false; then :
22678   $as_echo_n "(cached) " >&6
22679 else
22680   case $XATTR in
22681   [\\/]* | ?:[\\/]*)
22682   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22683   ;;
22684   *)
22685   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22686 for as_dir in $PATH
22687 do
22688   IFS=$as_save_IFS
22689   test -z "$as_dir" && as_dir=.
22690     for ac_exec_ext in '' $ac_executable_extensions; do
22691   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22692     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22693     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22694     break 2
22695   fi
22696 done
22697   done
22698 IFS=$as_save_IFS
22699 
22700   ;;
22701 esac
22702 fi
22703 XATTR=$ac_cv_path_XATTR
22704 if test -n "$XATTR"; then
22705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22706 $as_echo "$XATTR" >&6; }
22707 else
22708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22709 $as_echo "no" >&6; }
22710 fi
22711 
22712 
22713           if test "x$XATTR" = x; then
22714             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22715           fi
22716         else
22717           # Otherwise we believe it is a complete path. Use it as it is.
22718           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22719 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22720           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22721 $as_echo_n "checking for XATTR... " >&6; }
22722           if test ! -x "$tool_specified"; then
22723             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22724 $as_echo "not found" >&6; }
22725             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22726           fi
22727           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22728 $as_echo "$tool_specified" >&6; }
22729         fi
22730       fi
22731     fi
22732 
22733   fi
22734 
22735 
22736 
22737   if test "x$XATTR" = x; then
22738     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22739   fi
22740 
22741 
22742 
22743 
22744   # Publish this variable in the help.
22745 
22746 
22747   if [ -z "${CODESIGN+x}" ]; then
22748     # The variable is not set by user, try to locate tool using the code snippet
22749     for ac_prog in codesign
22750 do
22751   # Extract the first word of "$ac_prog", so it can be a program name with args.
22752 set dummy $ac_prog; ac_word=$2
22753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22754 $as_echo_n "checking for $ac_word... " >&6; }
22755 if ${ac_cv_path_CODESIGN+:} false; then :
22756   $as_echo_n "(cached) " >&6
22757 else
22758   case $CODESIGN in
22759   [\\/]* | ?:[\\/]*)
22760   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22761   ;;
22762   *)
22763   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22764 for as_dir in $PATH
22765 do
22766   IFS=$as_save_IFS
22767   test -z "$as_dir" && as_dir=.
22768     for ac_exec_ext in '' $ac_executable_extensions; do
22769   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22770     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22771     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22772     break 2
22773   fi
22774 done
22775   done
22776 IFS=$as_save_IFS
22777 
22778   ;;
22779 esac
22780 fi
22781 CODESIGN=$ac_cv_path_CODESIGN
22782 if test -n "$CODESIGN"; then
22783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22784 $as_echo "$CODESIGN" >&6; }
22785 else
22786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22787 $as_echo "no" >&6; }
22788 fi
22789 
22790 
22791   test -n "$CODESIGN" && break
22792 done
22793 
22794   else
22795     # The variable is set, but is it from the command line or the environment?
22796 
22797     # Try to remove the string !CODESIGN! from our list.
22798     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22799     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22800       # If it failed, the variable was not from the command line. Ignore it,
22801       # but warn the user (except for BASH, which is always set by the calling BASH).
22802       if test "xCODESIGN" != xBASH; then
22803         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22804 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22805       fi
22806       # Try to locate tool using the code snippet
22807       for ac_prog in codesign
22808 do
22809   # Extract the first word of "$ac_prog", so it can be a program name with args.
22810 set dummy $ac_prog; ac_word=$2
22811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22812 $as_echo_n "checking for $ac_word... " >&6; }
22813 if ${ac_cv_path_CODESIGN+:} false; then :
22814   $as_echo_n "(cached) " >&6
22815 else
22816   case $CODESIGN in
22817   [\\/]* | ?:[\\/]*)
22818   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22819   ;;
22820   *)
22821   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22822 for as_dir in $PATH
22823 do
22824   IFS=$as_save_IFS
22825   test -z "$as_dir" && as_dir=.
22826     for ac_exec_ext in '' $ac_executable_extensions; do
22827   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22828     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22829     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22830     break 2
22831   fi
22832 done
22833   done
22834 IFS=$as_save_IFS
22835 
22836   ;;
22837 esac
22838 fi
22839 CODESIGN=$ac_cv_path_CODESIGN
22840 if test -n "$CODESIGN"; then
22841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22842 $as_echo "$CODESIGN" >&6; }
22843 else
22844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22845 $as_echo "no" >&6; }
22846 fi
22847 
22848 
22849   test -n "$CODESIGN" && break
22850 done
22851 
22852     else
22853       # If it succeeded, then it was overridden by the user. We will use it
22854       # for the tool.
22855 
22856       # First remove it from the list of overridden variables, so we can test
22857       # for unknown variables in the end.
22858       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22859 
22860       # Check if we try to supply an empty value
22861       if test "x$CODESIGN" = x; then
22862         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22863 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22864         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22865 $as_echo_n "checking for CODESIGN... " >&6; }
22866         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22867 $as_echo "disabled" >&6; }
22868       else
22869         # Check if the provided tool contains a complete path.
22870         tool_specified="$CODESIGN"
22871         tool_basename="${tool_specified##*/}"
22872         if test "x$tool_basename" = "x$tool_specified"; then
22873           # A command without a complete path is provided, search $PATH.
22874           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22875 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22876           # Extract the first word of "$tool_basename", so it can be a program name with args.
22877 set dummy $tool_basename; ac_word=$2
22878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22879 $as_echo_n "checking for $ac_word... " >&6; }
22880 if ${ac_cv_path_CODESIGN+:} false; then :
22881   $as_echo_n "(cached) " >&6
22882 else
22883   case $CODESIGN in
22884   [\\/]* | ?:[\\/]*)
22885   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22886   ;;
22887   *)
22888   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22889 for as_dir in $PATH
22890 do
22891   IFS=$as_save_IFS
22892   test -z "$as_dir" && as_dir=.
22893     for ac_exec_ext in '' $ac_executable_extensions; do
22894   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22895     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22896     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22897     break 2
22898   fi
22899 done
22900   done
22901 IFS=$as_save_IFS
22902 
22903   ;;
22904 esac
22905 fi
22906 CODESIGN=$ac_cv_path_CODESIGN
22907 if test -n "$CODESIGN"; then
22908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22909 $as_echo "$CODESIGN" >&6; }
22910 else
22911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22912 $as_echo "no" >&6; }
22913 fi
22914 
22915 
22916           if test "x$CODESIGN" = x; then
22917             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22918           fi
22919         else
22920           # Otherwise we believe it is a complete path. Use it as it is.
22921           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22922 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22923           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22924 $as_echo_n "checking for CODESIGN... " >&6; }
22925           if test ! -x "$tool_specified"; then
22926             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22927 $as_echo "not found" >&6; }
22928             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22929           fi
22930           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22931 $as_echo "$tool_specified" >&6; }
22932         fi
22933       fi
22934     fi
22935 
22936   fi
22937 
22938 
22939     if test "x$CODESIGN" != "x"; then
22940       # Verify that the openjdk_codesign certificate is present
22941       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22942 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22943       rm -f codesign-testfile
22944       touch codesign-testfile
22945       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22946       rm -f codesign-testfile
22947       if test "x$CODESIGN" = x; then
22948         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22949 $as_echo "no" >&6; }
22950       else
22951         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22952 $as_echo "yes" >&6; }
22953       fi
22954     fi
22955 
22956 
22957 
22958   # Publish this variable in the help.
22959 
22960 
22961   if [ -z "${SETFILE+x}" ]; then
22962     # The variable is not set by user, try to locate tool using the code snippet
22963     for ac_prog in SetFile
22964 do
22965   # Extract the first word of "$ac_prog", so it can be a program name with args.
22966 set dummy $ac_prog; ac_word=$2
22967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22968 $as_echo_n "checking for $ac_word... " >&6; }
22969 if ${ac_cv_path_SETFILE+:} false; then :
22970   $as_echo_n "(cached) " >&6
22971 else
22972   case $SETFILE in
22973   [\\/]* | ?:[\\/]*)
22974   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22975   ;;
22976   *)
22977   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22978 for as_dir in $PATH
22979 do
22980   IFS=$as_save_IFS
22981   test -z "$as_dir" && as_dir=.
22982     for ac_exec_ext in '' $ac_executable_extensions; do
22983   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22984     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22985     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22986     break 2
22987   fi
22988 done
22989   done
22990 IFS=$as_save_IFS
22991 
22992   ;;
22993 esac
22994 fi
22995 SETFILE=$ac_cv_path_SETFILE
22996 if test -n "$SETFILE"; then
22997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22998 $as_echo "$SETFILE" >&6; }
22999 else
23000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23001 $as_echo "no" >&6; }
23002 fi
23003 
23004 
23005   test -n "$SETFILE" && break
23006 done
23007 
23008   else
23009     # The variable is set, but is it from the command line or the environment?
23010 
23011     # Try to remove the string !SETFILE! from our list.
23012     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23013     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23014       # If it failed, the variable was not from the command line. Ignore it,
23015       # but warn the user (except for BASH, which is always set by the calling BASH).
23016       if test "xSETFILE" != xBASH; then
23017         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23018 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23019       fi
23020       # Try to locate tool using the code snippet
23021       for ac_prog in SetFile
23022 do
23023   # Extract the first word of "$ac_prog", so it can be a program name with args.
23024 set dummy $ac_prog; ac_word=$2
23025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23026 $as_echo_n "checking for $ac_word... " >&6; }
23027 if ${ac_cv_path_SETFILE+:} false; then :
23028   $as_echo_n "(cached) " >&6
23029 else
23030   case $SETFILE in
23031   [\\/]* | ?:[\\/]*)
23032   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23033   ;;
23034   *)
23035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23036 for as_dir in $PATH
23037 do
23038   IFS=$as_save_IFS
23039   test -z "$as_dir" && as_dir=.
23040     for ac_exec_ext in '' $ac_executable_extensions; do
23041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23042     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23044     break 2
23045   fi
23046 done
23047   done
23048 IFS=$as_save_IFS
23049 
23050   ;;
23051 esac
23052 fi
23053 SETFILE=$ac_cv_path_SETFILE
23054 if test -n "$SETFILE"; then
23055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23056 $as_echo "$SETFILE" >&6; }
23057 else
23058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23059 $as_echo "no" >&6; }
23060 fi
23061 
23062 
23063   test -n "$SETFILE" && break
23064 done
23065 
23066     else
23067       # If it succeeded, then it was overridden by the user. We will use it
23068       # for the tool.
23069 
23070       # First remove it from the list of overridden variables, so we can test
23071       # for unknown variables in the end.
23072       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23073 
23074       # Check if we try to supply an empty value
23075       if test "x$SETFILE" = x; then
23076         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23077 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23078         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23079 $as_echo_n "checking for SETFILE... " >&6; }
23080         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23081 $as_echo "disabled" >&6; }
23082       else
23083         # Check if the provided tool contains a complete path.
23084         tool_specified="$SETFILE"
23085         tool_basename="${tool_specified##*/}"
23086         if test "x$tool_basename" = "x$tool_specified"; then
23087           # A command without a complete path is provided, search $PATH.
23088           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23089 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23090           # Extract the first word of "$tool_basename", so it can be a program name with args.
23091 set dummy $tool_basename; ac_word=$2
23092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23093 $as_echo_n "checking for $ac_word... " >&6; }
23094 if ${ac_cv_path_SETFILE+:} false; then :
23095   $as_echo_n "(cached) " >&6
23096 else
23097   case $SETFILE in
23098   [\\/]* | ?:[\\/]*)
23099   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23100   ;;
23101   *)
23102   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23103 for as_dir in $PATH
23104 do
23105   IFS=$as_save_IFS
23106   test -z "$as_dir" && as_dir=.
23107     for ac_exec_ext in '' $ac_executable_extensions; do
23108   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23109     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23110     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23111     break 2
23112   fi
23113 done
23114   done
23115 IFS=$as_save_IFS
23116 
23117   ;;
23118 esac
23119 fi
23120 SETFILE=$ac_cv_path_SETFILE
23121 if test -n "$SETFILE"; then
23122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23123 $as_echo "$SETFILE" >&6; }
23124 else
23125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23126 $as_echo "no" >&6; }
23127 fi
23128 
23129 
23130           if test "x$SETFILE" = x; then
23131             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23132           fi
23133         else
23134           # Otherwise we believe it is a complete path. Use it as it is.
23135           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23136 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23137           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23138 $as_echo_n "checking for SETFILE... " >&6; }
23139           if test ! -x "$tool_specified"; then
23140             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23141 $as_echo "not found" >&6; }
23142             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23143           fi
23144           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23145 $as_echo "$tool_specified" >&6; }
23146         fi
23147       fi
23148     fi
23149 
23150   fi
23151 
23152 
23153 
23154   if test "x$SETFILE" = x; then
23155     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23156   fi
23157 
23158 
23159   fi
23160 
23161 
23162   # Test if bash supports pipefail.
23163   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23164 $as_echo_n "checking if bash supports pipefail... " >&6; }
23165   if ${BASH} -c 'set -o pipefail'; then
23166     BASH_ARGS="$BASH_ARGS -o pipefail"
23167     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23168 $as_echo "yes" >&6; }
23169   else
23170     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23171 $as_echo "no" >&6; }
23172   fi
23173 
23174   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23175 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23176   if ${BASH} -e -c 'true'; then
23177     BASH_ARGS="$BASH_ARGS -e"
23178     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23179 $as_echo "yes" >&6; }
23180   else
23181     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23182 $as_echo "no" >&6; }
23183   fi
23184 
23185 
23186 
23187 
23188 # Check if pkg-config is available.
23189 
23190 
23191 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23192         if test -n "$ac_tool_prefix"; then
23193   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23194 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23196 $as_echo_n "checking for $ac_word... " >&6; }
23197 if ${ac_cv_path_PKG_CONFIG+:} false; then :
23198   $as_echo_n "(cached) " >&6
23199 else
23200   case $PKG_CONFIG in
23201   [\\/]* | ?:[\\/]*)
23202   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23203   ;;
23204   *)
23205   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23206 for as_dir in $PATH
23207 do
23208   IFS=$as_save_IFS
23209   test -z "$as_dir" && as_dir=.
23210     for ac_exec_ext in '' $ac_executable_extensions; do
23211   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23212     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23213     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23214     break 2
23215   fi
23216 done
23217   done
23218 IFS=$as_save_IFS
23219 
23220   ;;
23221 esac
23222 fi
23223 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23224 if test -n "$PKG_CONFIG"; then
23225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23226 $as_echo "$PKG_CONFIG" >&6; }
23227 else
23228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23229 $as_echo "no" >&6; }
23230 fi
23231 
23232 
23233 fi
23234 if test -z "$ac_cv_path_PKG_CONFIG"; then
23235   ac_pt_PKG_CONFIG=$PKG_CONFIG
23236   # Extract the first word of "pkg-config", so it can be a program name with args.
23237 set dummy pkg-config; ac_word=$2
23238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23239 $as_echo_n "checking for $ac_word... " >&6; }
23240 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23241   $as_echo_n "(cached) " >&6
23242 else
23243   case $ac_pt_PKG_CONFIG in
23244   [\\/]* | ?:[\\/]*)
23245   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23246   ;;
23247   *)
23248   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23249 for as_dir in $PATH
23250 do
23251   IFS=$as_save_IFS
23252   test -z "$as_dir" && as_dir=.
23253     for ac_exec_ext in '' $ac_executable_extensions; do
23254   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23255     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23256     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23257     break 2
23258   fi
23259 done
23260   done
23261 IFS=$as_save_IFS
23262 
23263   ;;
23264 esac
23265 fi
23266 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23267 if test -n "$ac_pt_PKG_CONFIG"; then
23268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23269 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
23270 else
23271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23272 $as_echo "no" >&6; }
23273 fi
23274 
23275   if test "x$ac_pt_PKG_CONFIG" = x; then
23276     PKG_CONFIG=""
23277   else
23278     case $cross_compiling:$ac_tool_warned in
23279 yes:)
23280 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23281 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23282 ac_tool_warned=yes ;;
23283 esac
23284     PKG_CONFIG=$ac_pt_PKG_CONFIG
23285   fi
23286 else
23287   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23288 fi
23289 
23290 fi
23291 if test -n "$PKG_CONFIG"; then
23292         _pkg_min_version=0.9.0
23293         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23294 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23295         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23296                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23297 $as_echo "yes" >&6; }
23298         else
23299                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23300 $as_echo "no" >&6; }
23301                 PKG_CONFIG=""
23302         fi
23303 
23304 fi
23305 
23306 # After basic tools have been setup, we can check build os specific details.
23307 
23308   ###############################################################################
23309 
23310   # Note that this is the build platform OS version!
23311 
23312   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23313   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23314   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23315   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23316 
23317 
23318 
23319 
23320 
23321 # Misc basic settings
23322 
23323 
23324 # Check whether --with-default-make-target was given.
23325 if test "${with_default_make_target+set}" = set; then :
23326   withval=$with_default_make_target;
23327 fi
23328 
23329   if test "x$with_default_make_target" = "x" \
23330       || test "x$with_default_make_target" = "xyes"; then
23331     DEFAULT_MAKE_TARGET="exploded-image"
23332   elif test "x$with_default_make_target" = "xno"; then
23333     as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23334   else
23335     DEFAULT_MAKE_TARGET="$with_default_make_target"
23336   fi
23337 
23338 
23339 
23340 
23341 ###############################################################################
23342 #
23343 # Determine OpenJDK variants, options and version numbers.
23344 #
23345 ###############################################################################
23346 
23347 # We need build & target for this.
23348 
23349   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23350   # We always build headless support.
23351   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23352 $as_echo_n "checking headful support... " >&6; }
23353   # Check whether --enable-headful was given.
23354 if test "${enable_headful+set}" = set; then :
23355   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23356 else
23357   SUPPORT_HEADFUL=yes
23358 fi
23359 
23360 
23361   SUPPORT_HEADLESS=yes
23362   BUILD_HEADLESS="BUILD_HEADLESS:=true"
23363 
23364   if test "x$SUPPORT_HEADFUL" = xyes; then
23365     # We are building both headful and headless.
23366     headful_msg="include support for both headful and headless"
23367   fi
23368 
23369   if test "x$SUPPORT_HEADFUL" = xno; then
23370     # Thus we are building headless only.
23371     BUILD_HEADLESS="BUILD_HEADLESS:=true"
23372     headful_msg="headless only"
23373   fi
23374 
23375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23376 $as_echo "$headful_msg" >&6; }
23377 
23378 
23379 
23380 
23381 
23382   # Choose cacerts source file
23383 
23384 # Check whether --with-cacerts-file was given.
23385 if test "${with_cacerts_file+set}" = set; then :
23386   withval=$with_cacerts_file;
23387 fi
23388 
23389   if test "x$with_cacerts_file" != x; then
23390     CACERTS_FILE=$with_cacerts_file
23391   fi
23392 
23393 
23394   # Enable or disable unlimited crypto
23395   # Check whether --enable-unlimited-crypto was given.
23396 if test "${enable_unlimited_crypto+set}" = set; then :
23397   enableval=$enable_unlimited_crypto;
23398 else
23399   enable_unlimited_crypto=no
23400 fi
23401 
23402   if test "x$enable_unlimited_crypto" = "xyes"; then
23403     UNLIMITED_CRYPTO=true
23404   else
23405     UNLIMITED_CRYPTO=false
23406   fi
23407 
23408 
23409   # Should we build the serviceability agent (SA)?
23410   INCLUDE_SA=true
23411   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
23412     INCLUDE_SA=false
23413   fi
23414   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
23415     INCLUDE_SA=false
23416   fi
23417   if test "x$OPENJDK_TARGET_OS" = xaix ; then
23418     INCLUDE_SA=false
23419   fi
23420   if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
23421     INCLUDE_SA=false
23422   fi
23423 
23424 
23425   # Compress jars
23426   COMPRESS_JARS=false
23427 
23428 
23429 
23430   # Setup default copyright year. Mostly overridden when building close to a new year.
23431 
23432 # Check whether --with-copyright-year was given.
23433 if test "${with_copyright_year+set}" = set; then :
23434   withval=$with_copyright_year;
23435 fi
23436 
23437   if test "x$with_copyright_year" = xyes; then
23438     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23439   elif test "x$with_copyright_year" != x; then
23440     COPYRIGHT_YEAR="$with_copyright_year"
23441   else
23442     COPYRIGHT_YEAR=`date +'%Y'`
23443   fi
23444 
23445 
23446 
23447   # Check whether --enable-keep-packaged-modules was given.
23448 if test "${enable_keep_packaged_modules+set}" = set; then :
23449   enableval=$enable_keep_packaged_modules;
23450 fi
23451 
23452 
23453   if test "x$enable_keep_packaged_modules" = "xyes"; then
23454     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23455 $as_echo_n "checking if packaged modules are kept... " >&6; }
23456     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23457 $as_echo "yes" >&6; }
23458     JLINK_KEEP_PACKAGED_MODULES=true
23459   elif test "x$enable_keep_packaged_modules" = "xno"; then
23460     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23461 $as_echo_n "checking if packaged modules are kept... " >&6; }
23462     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23463 $as_echo "no" >&6; }
23464     JLINK_KEEP_PACKAGED_MODULES=false
23465   elif test "x$enable_keep_packaged_modules" = "x"; then
23466     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
23467 $as_echo "yes (default)" >&6; }
23468     JLINK_KEEP_PACKAGED_MODULES=true
23469   else
23470     as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
23471   fi
23472 
23473 
23474 
23475 
23476   # Control wether Hotspot runs Queens test after build.
23477   # Check whether --enable-hotspot-test-in-build was given.
23478 if test "${enable_hotspot_test_in_build+set}" = set; then :
23479   enableval=$enable_hotspot_test_in_build;
23480 else
23481   enable_hotspot_test_in_build=no
23482 fi
23483 
23484   if test "x$enable_hotspot_test_in_build" = "xyes"; then
23485     TEST_IN_BUILD=true
23486   else
23487     TEST_IN_BUILD=false
23488   fi
23489 
23490 
23491 
23492   # Warn user that old version arguments are deprecated.
23493 
23494 
23495 # Check whether --with-milestone was given.
23496 if test "${with_milestone+set}" = set; then :
23497   withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23498 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23499 fi
23500 
23501 
23502 
23503 
23504 # Check whether --with-update-version was given.
23505 if test "${with_update_version+set}" = set; then :
23506   withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23507 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23508 fi
23509 
23510 
23511 
23512 
23513 # Check whether --with-user-release-suffix was given.
23514 if test "${with_user_release_suffix+set}" = set; then :
23515   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
23516 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23517 fi
23518 
23519 
23520 
23521 
23522 # Check whether --with-build-number was given.
23523 if test "${with_build_number+set}" = set; then :
23524   withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23525 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23526 fi
23527 
23528 
23529 
23530   # Source the version numbers file
23531   . $AUTOCONF_DIR/version-numbers
23532 
23533   # Some non-version number information is set in that file
23534 
23535 
23536 
23537 
23538 
23539 
23540 
23541 
23542   # Override version from arguments
23543 
23544   # If --with-version-string is set, process it first. It is possible to
23545   # override parts with more specific flags, since these are processed later.
23546 
23547 # Check whether --with-version-string was given.
23548 if test "${with_version_string+set}" = set; then :
23549   withval=$with_version_string;
23550 fi
23551 
23552   if test "x$with_version_string" = xyes; then
23553     as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23554   elif test "x$with_version_string" != x; then
23555     # Additional [] needed to keep m4 from mangling shell constructs.
23556     if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23557       VERSION_MAJOR=${BASH_REMATCH[1]}
23558       VERSION_MINOR=${BASH_REMATCH[3]}
23559       VERSION_SECURITY=${BASH_REMATCH[5]}
23560       VERSION_PATCH=${BASH_REMATCH[7]}
23561       VERSION_PRE=${BASH_REMATCH[9]}
23562       version_plus_separator=${BASH_REMATCH[11]}
23563       VERSION_BUILD=${BASH_REMATCH[12]}
23564       VERSION_OPT=${BASH_REMATCH[14]}
23565       # Unspecified numerical fields are interpreted as 0.
23566       if test "x$VERSION_MINOR" = x; then
23567         VERSION_MINOR=0
23568       fi
23569       if test "x$VERSION_SECURITY" = x; then
23570         VERSION_SECURITY=0
23571       fi
23572       if test "x$VERSION_PATCH" = x; then
23573         VERSION_PATCH=0
23574       fi
23575       if test "x$version_plus_separator" != x \
23576           && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23577         as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23578       fi
23579       # Stop the version part process from setting default values.
23580       # We still allow them to explicitely override though.
23581       NO_DEFAULT_VERSION_PARTS=true
23582     else
23583       as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23584     fi
23585   fi
23586 
23587 
23588 # Check whether --with-version-pre was given.
23589 if test "${with_version_pre+set}" = set; then :
23590   withval=$with_version_pre; with_version_pre_present=true
23591 else
23592   with_version_pre_present=false
23593 fi
23594 
23595 
23596   if test "x$with_version_pre_present" = xtrue; then
23597     if test "x$with_version_pre" = xyes; then
23598       as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23599     elif test "x$with_version_pre" = xno; then
23600       # Interpret --without-* as empty string instead of the literal "no"
23601       VERSION_PRE=
23602     else
23603       # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23604        VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23605       if test "x$VERSION_PRE" != "x$with_version_pre"; then
23606         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23607 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23608       fi
23609     fi
23610   else
23611     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23612       # Default is to use "internal" as pre
23613       VERSION_PRE="internal"
23614     fi
23615   fi
23616 
23617 
23618 # Check whether --with-version-opt was given.
23619 if test "${with_version_opt+set}" = set; then :
23620   withval=$with_version_opt; with_version_opt_present=true
23621 else
23622   with_version_opt_present=false
23623 fi
23624 
23625 
23626   if test "x$with_version_opt_present" = xtrue; then
23627     if test "x$with_version_opt" = xyes; then
23628       as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23629     elif test "x$with_version_opt" = xno; then
23630       # Interpret --without-* as empty string instead of the literal "no"
23631       VERSION_OPT=
23632     else
23633       # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23634        VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23635       if test "x$VERSION_OPT" != "x$with_version_opt"; then
23636         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23637 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23638       fi
23639     fi
23640   else
23641     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23642       # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23643       timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23644       # Outer [ ] to quote m4.
23645        basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23646       VERSION_OPT="$timestamp.$USERNAME.$basedirname"
23647     fi
23648   fi
23649 
23650 
23651 # Check whether --with-version-build was given.
23652 if test "${with_version_build+set}" = set; then :
23653   withval=$with_version_build; with_version_build_present=true
23654 else
23655   with_version_build_present=false
23656 fi
23657 
23658 
23659   if test "x$with_version_build_present" = xtrue; then
23660     if test "x$with_version_build" = xyes; then
23661       as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23662     elif test "x$with_version_build" = xno; then
23663       # Interpret --without-* as empty string instead of the literal "no"
23664       VERSION_BUILD=
23665     elif test "x$with_version_build" = x; then
23666       VERSION_BUILD=
23667     else
23668 
23669   # Additional [] needed to keep m4 from mangling shell constructs.
23670   if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23671     as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23672   fi
23673   # Extract the version number without leading zeros.
23674   cleaned_value=${BASH_REMATCH[1]}
23675   if test "x$cleaned_value" = x; then
23676     # Special case for zero
23677     cleaned_value=${BASH_REMATCH[2]}
23678   fi
23679 
23680   if test $cleaned_value -gt 255; then
23681     as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23682   fi
23683   if test "x$cleaned_value" != "x$with_version_build"; then
23684     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23685 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23686   fi
23687   VERSION_BUILD=$cleaned_value
23688 
23689     fi
23690   else
23691     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23692       # Default is to not have a build number.
23693       VERSION_BUILD=""
23694       # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23695       VERSION_BUILD=0
23696     fi
23697   fi
23698 
23699 
23700 # Check whether --with-version-major was given.
23701 if test "${with_version_major+set}" = set; then :
23702   withval=$with_version_major; with_version_major_present=true
23703 else
23704   with_version_major_present=false
23705 fi
23706 
23707 
23708   if test "x$with_version_major_present" = xtrue; then
23709     if test "x$with_version_major" = xyes; then
23710       as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23711     else
23712 
23713   # Additional [] needed to keep m4 from mangling shell constructs.
23714   if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23715     as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23716   fi
23717   # Extract the version number without leading zeros.
23718   cleaned_value=${BASH_REMATCH[1]}
23719   if test "x$cleaned_value" = x; then
23720     # Special case for zero
23721     cleaned_value=${BASH_REMATCH[2]}
23722   fi
23723 
23724   if test $cleaned_value -gt 255; then
23725     as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23726   fi
23727   if test "x$cleaned_value" != "x$with_version_major"; then
23728     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23729 $as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23730   fi
23731   VERSION_MAJOR=$cleaned_value
23732 
23733     fi
23734   else
23735     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23736       # Default is to get value from version-numbers
23737       VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23738     fi
23739   fi
23740 
23741 
23742 # Check whether --with-version-minor was given.
23743 if test "${with_version_minor+set}" = set; then :
23744   withval=$with_version_minor; with_version_minor_present=true
23745 else
23746   with_version_minor_present=false
23747 fi
23748 
23749 
23750   if test "x$with_version_minor_present" = xtrue; then
23751     if test "x$with_version_minor" = xyes; then
23752       as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23753     elif test "x$with_version_minor" = xno; then
23754       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23755       VERSION_MINOR=0
23756     elif test "x$with_version_minor" = x; then
23757       VERSION_MINOR=0
23758     else
23759 
23760   # Additional [] needed to keep m4 from mangling shell constructs.
23761   if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23762     as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23763   fi
23764   # Extract the version number without leading zeros.
23765   cleaned_value=${BASH_REMATCH[1]}
23766   if test "x$cleaned_value" = x; then
23767     # Special case for zero
23768     cleaned_value=${BASH_REMATCH[2]}
23769   fi
23770 
23771   if test $cleaned_value -gt 255; then
23772     as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23773   fi
23774   if test "x$cleaned_value" != "x$with_version_minor"; then
23775     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23776 $as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23777   fi
23778   VERSION_MINOR=$cleaned_value
23779 
23780     fi
23781   else
23782     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23783       # Default is 0, if unspecified
23784       VERSION_MINOR=0
23785     fi
23786   fi
23787 
23788 
23789 # Check whether --with-version-security was given.
23790 if test "${with_version_security+set}" = set; then :
23791   withval=$with_version_security; with_version_security_present=true
23792 else
23793   with_version_security_present=false
23794 fi
23795 
23796 
23797   if test "x$with_version_security_present" = xtrue; then
23798     if test "x$with_version_security" = xyes; then
23799       as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23800     elif test "x$with_version_security" = xno; then
23801       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23802       VERSION_SECURITY=0
23803     elif test "x$with_version_security" = x; then
23804       VERSION_SECURITY=0
23805     else
23806 
23807   # Additional [] needed to keep m4 from mangling shell constructs.
23808   if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23809     as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23810   fi
23811   # Extract the version number without leading zeros.
23812   cleaned_value=${BASH_REMATCH[1]}
23813   if test "x$cleaned_value" = x; then
23814     # Special case for zero
23815     cleaned_value=${BASH_REMATCH[2]}
23816   fi
23817 
23818   if test $cleaned_value -gt 255; then
23819     as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23820   fi
23821   if test "x$cleaned_value" != "x$with_version_security"; then
23822     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23823 $as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23824   fi
23825   VERSION_SECURITY=$cleaned_value
23826 
23827     fi
23828   else
23829     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23830       # Default is 0, if unspecified
23831       VERSION_SECURITY=0
23832     fi
23833   fi
23834 
23835 
23836 # Check whether --with-version-patch was given.
23837 if test "${with_version_patch+set}" = set; then :
23838   withval=$with_version_patch; with_version_patch_present=true
23839 else
23840   with_version_patch_present=false
23841 fi
23842 
23843 
23844   if test "x$with_version_patch_present" = xtrue; then
23845     if test "x$with_version_patch" = xyes; then
23846       as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23847     elif test "x$with_version_patch" = xno; then
23848       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23849       VERSION_PATCH=0
23850     elif test "x$with_version_patch" = x; then
23851       VERSION_PATCH=0
23852     else
23853 
23854   # Additional [] needed to keep m4 from mangling shell constructs.
23855   if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23856     as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23857   fi
23858   # Extract the version number without leading zeros.
23859   cleaned_value=${BASH_REMATCH[1]}
23860   if test "x$cleaned_value" = x; then
23861     # Special case for zero
23862     cleaned_value=${BASH_REMATCH[2]}
23863   fi
23864 
23865   if test $cleaned_value -gt 255; then
23866     as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23867   fi
23868   if test "x$cleaned_value" != "x$with_version_patch"; then
23869     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23870 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23871   fi
23872   VERSION_PATCH=$cleaned_value
23873 
23874     fi
23875   else
23876     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23877       # Default is 0, if unspecified
23878       VERSION_PATCH=0
23879     fi
23880   fi
23881 
23882   # Calculate derived version properties
23883 
23884   # Set VERSION_IS_GA based on if VERSION_PRE has a value
23885   if test "x$VERSION_PRE" = x; then
23886     VERSION_IS_GA=true
23887   else
23888     VERSION_IS_GA=false
23889   fi
23890 
23891   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23892   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23893 
23894   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23895   # Strip trailing zeroes from stripped_version_number
23896   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23897   VERSION_NUMBER=$stripped_version_number
23898 
23899   # The complete version string, with additional build information
23900   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23901     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23902   else
23903     # If either build or opt is set, we need a + separator
23904     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23905   fi
23906 
23907   # The short version string, just VERSION_NUMBER and PRE, if present.
23908   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23909 
23910   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23911 $as_echo_n "checking for version string... " >&6; }
23912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23913 $as_echo "$VERSION_STRING" >&6; }
23914 
23915 
23916 
23917 
23918 
23919 
23920 
23921 
23922 
23923 
23924 
23925 
23926 
23927 
23928 
23929 ###############################################################################
23930 #
23931 # Setup BootJDK, used to bootstrap the build.
23932 #
23933 ###############################################################################
23934 
23935 
23936   BOOT_JDK_FOUND=no
23937 
23938 # Check whether --with-boot-jdk was given.
23939 if test "${with_boot_jdk+set}" = set; then :
23940   withval=$with_boot_jdk;
23941 fi
23942 
23943 
23944   # We look for the Boot JDK through various means, going from more certain to
23945   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23946   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23947   # must check if this is indeed valid; otherwise we'll continue looking.
23948 
23949   # Test: Is bootjdk explicitely set by command line arguments?
23950 
23951   if test "x$BOOT_JDK_FOUND" = xno; then
23952     # Now execute the test
23953 
23954   if test "x$with_boot_jdk" != x; then
23955     BOOT_JDK=$with_boot_jdk
23956     BOOT_JDK_FOUND=maybe
23957     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23958 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23959   fi
23960 
23961 
23962     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23963     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23964       # Do we have a bin/java?
23965       if test ! -x "$BOOT_JDK/bin/java"; then
23966         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23967 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23968         BOOT_JDK_FOUND=no
23969       else
23970         # Do we have a bin/javac?
23971         if test ! -x "$BOOT_JDK/bin/javac"; then
23972           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23973 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23974           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23975 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23976           BOOT_JDK_FOUND=no
23977         else
23978           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23979           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23980 
23981           # Extra M4 quote needed to protect [] in grep expression.
23982           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23983           if test "x$FOUND_CORRECT_VERSION" = x; then
23984             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23985 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23986             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23987 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23988             BOOT_JDK_FOUND=no
23989           else
23990             # We're done! :-)
23991             BOOT_JDK_FOUND=yes
23992 
23993   # Only process if variable expands to non-empty
23994 
23995   if test "x$BOOT_JDK" != x; then
23996     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23997 
23998   # Input might be given as Windows format, start by converting to
23999   # unix format.
24000   path="$BOOT_JDK"
24001   new_path=`$CYGPATH -u "$path"`
24002 
24003   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24004   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24005   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24006   # "foo.exe" is OK but "foo" is an error.
24007   #
24008   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24009   # It is also a way to make sure we got the proper file name for the real test later on.
24010   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24011   if test "x$test_shortpath" = x; then
24012     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24013 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24014     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24015   fi
24016 
24017   # Call helper function which possibly converts this using DOS-style short mode.
24018   # If so, the updated path is stored in $new_path.
24019 
24020   input_path="$new_path"
24021   # Check if we need to convert this using DOS-style short mode. If the path
24022   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24023   # take no chances and rewrite it.
24024   # Note: m4 eats our [], so we need to use [ and ] instead.
24025   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24026   if test "x$has_forbidden_chars" != x; then
24027     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24028     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24029     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24030     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24031       # Going to short mode and back again did indeed matter. Since short mode is
24032       # case insensitive, let's make it lowercase to improve readability.
24033       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24034       # Now convert it back to Unix-style (cygpath)
24035       input_path=`$CYGPATH -u "$shortmode_path"`
24036       new_path="$input_path"
24037     fi
24038   fi
24039 
24040   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24041   if test "x$test_cygdrive_prefix" = x; then
24042     # As a simple fix, exclude /usr/bin since it's not a real path.
24043     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24044       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24045       # a path prefixed by /cygdrive for fixpath to work.
24046       new_path="$CYGWIN_ROOT_PATH$input_path"
24047     fi
24048   fi
24049 
24050 
24051   if test "x$path" != "x$new_path"; then
24052     BOOT_JDK="$new_path"
24053     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24054 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24055   fi
24056 
24057     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24058 
24059   path="$BOOT_JDK"
24060   has_colon=`$ECHO $path | $GREP ^.:`
24061   new_path="$path"
24062   if test "x$has_colon" = x; then
24063     # Not in mixed or Windows style, start by that.
24064     new_path=`cmd //c echo $path`
24065   fi
24066 
24067 
24068   input_path="$new_path"
24069   # Check if we need to convert this using DOS-style short mode. If the path
24070   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24071   # take no chances and rewrite it.
24072   # Note: m4 eats our [], so we need to use [ and ] instead.
24073   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24074   if test "x$has_forbidden_chars" != x; then
24075     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24076     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24077   fi
24078 
24079 
24080   windows_path="$new_path"
24081   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24082     unix_path=`$CYGPATH -u "$windows_path"`
24083     new_path="$unix_path"
24084   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24085     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24086     new_path="$unix_path"
24087   fi
24088 
24089   if test "x$path" != "x$new_path"; then
24090     BOOT_JDK="$new_path"
24091     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24092 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24093   fi
24094 
24095   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24096   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24097 
24098     else
24099       # We're on a unix platform. Hooray! :)
24100       path="$BOOT_JDK"
24101       has_space=`$ECHO "$path" | $GREP " "`
24102       if test "x$has_space" != x; then
24103         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24104 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24105         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24106       fi
24107 
24108       # Use eval to expand a potential ~
24109       eval path="$path"
24110       if test ! -f "$path" && test ! -d "$path"; then
24111         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24112       fi
24113 
24114       if test -d "$path"; then
24115         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24116       else
24117         dir="`$DIRNAME "$path"`"
24118         base="`$BASENAME "$path"`"
24119         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24120       fi
24121     fi
24122   fi
24123 
24124             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24125 $as_echo_n "checking for Boot JDK... " >&6; }
24126             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24127 $as_echo "$BOOT_JDK" >&6; }
24128             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24129 $as_echo_n "checking Boot JDK version... " >&6; }
24130             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24131             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24132 $as_echo "$BOOT_JDK_VERSION" >&6; }
24133           fi # end check jdk version
24134         fi # end check javac
24135       fi # end check java
24136     fi # end check boot jdk found
24137   fi
24138 
24139   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24140     # Having specified an argument which is incorrect will produce an instant failure;
24141     # we should not go on looking
24142     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24143   fi
24144 
24145   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24146 
24147   if test "x$BOOT_JDK_FOUND" = xno; then
24148     # Now execute the test
24149 
24150   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24151     # First check at user selected default
24152 
24153   if test "x$BOOT_JDK_FOUND" = xno; then
24154     # Now execute the test
24155 
24156   if test -x /usr/libexec/java_home; then
24157     BOOT_JDK=`/usr/libexec/java_home `
24158     BOOT_JDK_FOUND=maybe
24159     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24160 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24161   fi
24162 
24163 
24164     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24165     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24166       # Do we have a bin/java?
24167       if test ! -x "$BOOT_JDK/bin/java"; then
24168         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24169 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24170         BOOT_JDK_FOUND=no
24171       else
24172         # Do we have a bin/javac?
24173         if test ! -x "$BOOT_JDK/bin/javac"; then
24174           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24175 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24176           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24177 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24178           BOOT_JDK_FOUND=no
24179         else
24180           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24181           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24182 
24183           # Extra M4 quote needed to protect [] in grep expression.
24184           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24185           if test "x$FOUND_CORRECT_VERSION" = x; then
24186             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24187 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24188             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24189 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24190             BOOT_JDK_FOUND=no
24191           else
24192             # We're done! :-)
24193             BOOT_JDK_FOUND=yes
24194 
24195   # Only process if variable expands to non-empty
24196 
24197   if test "x$BOOT_JDK" != x; then
24198     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24199 
24200   # Input might be given as Windows format, start by converting to
24201   # unix format.
24202   path="$BOOT_JDK"
24203   new_path=`$CYGPATH -u "$path"`
24204 
24205   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24206   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24207   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24208   # "foo.exe" is OK but "foo" is an error.
24209   #
24210   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24211   # It is also a way to make sure we got the proper file name for the real test later on.
24212   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24213   if test "x$test_shortpath" = x; then
24214     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24215 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24216     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24217   fi
24218 
24219   # Call helper function which possibly converts this using DOS-style short mode.
24220   # If so, the updated path is stored in $new_path.
24221 
24222   input_path="$new_path"
24223   # Check if we need to convert this using DOS-style short mode. If the path
24224   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24225   # take no chances and rewrite it.
24226   # Note: m4 eats our [], so we need to use [ and ] instead.
24227   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24228   if test "x$has_forbidden_chars" != x; then
24229     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24230     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24231     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24232     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24233       # Going to short mode and back again did indeed matter. Since short mode is
24234       # case insensitive, let's make it lowercase to improve readability.
24235       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24236       # Now convert it back to Unix-style (cygpath)
24237       input_path=`$CYGPATH -u "$shortmode_path"`
24238       new_path="$input_path"
24239     fi
24240   fi
24241 
24242   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24243   if test "x$test_cygdrive_prefix" = x; then
24244     # As a simple fix, exclude /usr/bin since it's not a real path.
24245     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24246       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24247       # a path prefixed by /cygdrive for fixpath to work.
24248       new_path="$CYGWIN_ROOT_PATH$input_path"
24249     fi
24250   fi
24251 
24252 
24253   if test "x$path" != "x$new_path"; then
24254     BOOT_JDK="$new_path"
24255     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24256 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24257   fi
24258 
24259     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24260 
24261   path="$BOOT_JDK"
24262   has_colon=`$ECHO $path | $GREP ^.:`
24263   new_path="$path"
24264   if test "x$has_colon" = x; then
24265     # Not in mixed or Windows style, start by that.
24266     new_path=`cmd //c echo $path`
24267   fi
24268 
24269 
24270   input_path="$new_path"
24271   # Check if we need to convert this using DOS-style short mode. If the path
24272   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24273   # take no chances and rewrite it.
24274   # Note: m4 eats our [], so we need to use [ and ] instead.
24275   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24276   if test "x$has_forbidden_chars" != x; then
24277     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24278     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24279   fi
24280 
24281 
24282   windows_path="$new_path"
24283   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24284     unix_path=`$CYGPATH -u "$windows_path"`
24285     new_path="$unix_path"
24286   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24287     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24288     new_path="$unix_path"
24289   fi
24290 
24291   if test "x$path" != "x$new_path"; then
24292     BOOT_JDK="$new_path"
24293     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24294 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24295   fi
24296 
24297   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24298   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24299 
24300     else
24301       # We're on a unix platform. Hooray! :)
24302       path="$BOOT_JDK"
24303       has_space=`$ECHO "$path" | $GREP " "`
24304       if test "x$has_space" != x; then
24305         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24306 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24307         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24308       fi
24309 
24310       # Use eval to expand a potential ~
24311       eval path="$path"
24312       if test ! -f "$path" && test ! -d "$path"; then
24313         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24314       fi
24315 
24316       if test -d "$path"; then
24317         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24318       else
24319         dir="`$DIRNAME "$path"`"
24320         base="`$BASENAME "$path"`"
24321         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24322       fi
24323     fi
24324   fi
24325 
24326             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24327 $as_echo_n "checking for Boot JDK... " >&6; }
24328             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24329 $as_echo "$BOOT_JDK" >&6; }
24330             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24331 $as_echo_n "checking Boot JDK version... " >&6; }
24332             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24333             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24334 $as_echo "$BOOT_JDK_VERSION" >&6; }
24335           fi # end check jdk version
24336         fi # end check javac
24337       fi # end check java
24338     fi # end check boot jdk found
24339   fi
24340 
24341     # If that did not work out (e.g. too old), try explicit versions instead
24342 
24343   if test "x$BOOT_JDK_FOUND" = xno; then
24344     # Now execute the test
24345 
24346   if test -x /usr/libexec/java_home; then
24347     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24348     BOOT_JDK_FOUND=maybe
24349     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24350 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24351   fi
24352 
24353 
24354     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24355     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24356       # Do we have a bin/java?
24357       if test ! -x "$BOOT_JDK/bin/java"; then
24358         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24359 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24360         BOOT_JDK_FOUND=no
24361       else
24362         # Do we have a bin/javac?
24363         if test ! -x "$BOOT_JDK/bin/javac"; then
24364           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24365 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24366           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24367 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24368           BOOT_JDK_FOUND=no
24369         else
24370           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24371           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24372 
24373           # Extra M4 quote needed to protect [] in grep expression.
24374           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24375           if test "x$FOUND_CORRECT_VERSION" = x; then
24376             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24377 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24378             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24379 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24380             BOOT_JDK_FOUND=no
24381           else
24382             # We're done! :-)
24383             BOOT_JDK_FOUND=yes
24384 
24385   # Only process if variable expands to non-empty
24386 
24387   if test "x$BOOT_JDK" != x; then
24388     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24389 
24390   # Input might be given as Windows format, start by converting to
24391   # unix format.
24392   path="$BOOT_JDK"
24393   new_path=`$CYGPATH -u "$path"`
24394 
24395   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24396   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24397   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24398   # "foo.exe" is OK but "foo" is an error.
24399   #
24400   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24401   # It is also a way to make sure we got the proper file name for the real test later on.
24402   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24403   if test "x$test_shortpath" = x; then
24404     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24405 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24406     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24407   fi
24408 
24409   # Call helper function which possibly converts this using DOS-style short mode.
24410   # If so, the updated path is stored in $new_path.
24411 
24412   input_path="$new_path"
24413   # Check if we need to convert this using DOS-style short mode. If the path
24414   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24415   # take no chances and rewrite it.
24416   # Note: m4 eats our [], so we need to use [ and ] instead.
24417   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24418   if test "x$has_forbidden_chars" != x; then
24419     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24420     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24421     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24422     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24423       # Going to short mode and back again did indeed matter. Since short mode is
24424       # case insensitive, let's make it lowercase to improve readability.
24425       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24426       # Now convert it back to Unix-style (cygpath)
24427       input_path=`$CYGPATH -u "$shortmode_path"`
24428       new_path="$input_path"
24429     fi
24430   fi
24431 
24432   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24433   if test "x$test_cygdrive_prefix" = x; then
24434     # As a simple fix, exclude /usr/bin since it's not a real path.
24435     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24436       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24437       # a path prefixed by /cygdrive for fixpath to work.
24438       new_path="$CYGWIN_ROOT_PATH$input_path"
24439     fi
24440   fi
24441 
24442 
24443   if test "x$path" != "x$new_path"; then
24444     BOOT_JDK="$new_path"
24445     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24446 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24447   fi
24448 
24449     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24450 
24451   path="$BOOT_JDK"
24452   has_colon=`$ECHO $path | $GREP ^.:`
24453   new_path="$path"
24454   if test "x$has_colon" = x; then
24455     # Not in mixed or Windows style, start by that.
24456     new_path=`cmd //c echo $path`
24457   fi
24458 
24459 
24460   input_path="$new_path"
24461   # Check if we need to convert this using DOS-style short mode. If the path
24462   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24463   # take no chances and rewrite it.
24464   # Note: m4 eats our [], so we need to use [ and ] instead.
24465   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24466   if test "x$has_forbidden_chars" != x; then
24467     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24468     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24469   fi
24470 
24471 
24472   windows_path="$new_path"
24473   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24474     unix_path=`$CYGPATH -u "$windows_path"`
24475     new_path="$unix_path"
24476   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24477     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24478     new_path="$unix_path"
24479   fi
24480 
24481   if test "x$path" != "x$new_path"; then
24482     BOOT_JDK="$new_path"
24483     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24484 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24485   fi
24486 
24487   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24488   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24489 
24490     else
24491       # We're on a unix platform. Hooray! :)
24492       path="$BOOT_JDK"
24493       has_space=`$ECHO "$path" | $GREP " "`
24494       if test "x$has_space" != x; then
24495         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24496 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24497         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24498       fi
24499 
24500       # Use eval to expand a potential ~
24501       eval path="$path"
24502       if test ! -f "$path" && test ! -d "$path"; then
24503         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24504       fi
24505 
24506       if test -d "$path"; then
24507         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24508       else
24509         dir="`$DIRNAME "$path"`"
24510         base="`$BASENAME "$path"`"
24511         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24512       fi
24513     fi
24514   fi
24515 
24516             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24517 $as_echo_n "checking for Boot JDK... " >&6; }
24518             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24519 $as_echo "$BOOT_JDK" >&6; }
24520             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24521 $as_echo_n "checking Boot JDK version... " >&6; }
24522             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24523             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24524 $as_echo "$BOOT_JDK_VERSION" >&6; }
24525           fi # end check jdk version
24526         fi # end check javac
24527       fi # end check java
24528     fi # end check boot jdk found
24529   fi
24530 
24531 
24532   if test "x$BOOT_JDK_FOUND" = xno; then
24533     # Now execute the test
24534 
24535   if test -x /usr/libexec/java_home; then
24536     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24537     BOOT_JDK_FOUND=maybe
24538     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24539 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24540   fi
24541 
24542 
24543     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24544     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24545       # Do we have a bin/java?
24546       if test ! -x "$BOOT_JDK/bin/java"; then
24547         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24548 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24549         BOOT_JDK_FOUND=no
24550       else
24551         # Do we have a bin/javac?
24552         if test ! -x "$BOOT_JDK/bin/javac"; then
24553           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24554 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24555           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24556 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24557           BOOT_JDK_FOUND=no
24558         else
24559           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24560           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24561 
24562           # Extra M4 quote needed to protect [] in grep expression.
24563           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24564           if test "x$FOUND_CORRECT_VERSION" = x; then
24565             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24566 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24567             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24568 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24569             BOOT_JDK_FOUND=no
24570           else
24571             # We're done! :-)
24572             BOOT_JDK_FOUND=yes
24573 
24574   # Only process if variable expands to non-empty
24575 
24576   if test "x$BOOT_JDK" != x; then
24577     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24578 
24579   # Input might be given as Windows format, start by converting to
24580   # unix format.
24581   path="$BOOT_JDK"
24582   new_path=`$CYGPATH -u "$path"`
24583 
24584   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24585   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24586   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24587   # "foo.exe" is OK but "foo" is an error.
24588   #
24589   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24590   # It is also a way to make sure we got the proper file name for the real test later on.
24591   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24592   if test "x$test_shortpath" = x; then
24593     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24594 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24595     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24596   fi
24597 
24598   # Call helper function which possibly converts this using DOS-style short mode.
24599   # If so, the updated path is stored in $new_path.
24600 
24601   input_path="$new_path"
24602   # Check if we need to convert this using DOS-style short mode. If the path
24603   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24604   # take no chances and rewrite it.
24605   # Note: m4 eats our [], so we need to use [ and ] instead.
24606   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24607   if test "x$has_forbidden_chars" != x; then
24608     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24609     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24610     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24611     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24612       # Going to short mode and back again did indeed matter. Since short mode is
24613       # case insensitive, let's make it lowercase to improve readability.
24614       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24615       # Now convert it back to Unix-style (cygpath)
24616       input_path=`$CYGPATH -u "$shortmode_path"`
24617       new_path="$input_path"
24618     fi
24619   fi
24620 
24621   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24622   if test "x$test_cygdrive_prefix" = x; then
24623     # As a simple fix, exclude /usr/bin since it's not a real path.
24624     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24625       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24626       # a path prefixed by /cygdrive for fixpath to work.
24627       new_path="$CYGWIN_ROOT_PATH$input_path"
24628     fi
24629   fi
24630 
24631 
24632   if test "x$path" != "x$new_path"; then
24633     BOOT_JDK="$new_path"
24634     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24635 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24636   fi
24637 
24638     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24639 
24640   path="$BOOT_JDK"
24641   has_colon=`$ECHO $path | $GREP ^.:`
24642   new_path="$path"
24643   if test "x$has_colon" = x; then
24644     # Not in mixed or Windows style, start by that.
24645     new_path=`cmd //c echo $path`
24646   fi
24647 
24648 
24649   input_path="$new_path"
24650   # Check if we need to convert this using DOS-style short mode. If the path
24651   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24652   # take no chances and rewrite it.
24653   # Note: m4 eats our [], so we need to use [ and ] instead.
24654   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24655   if test "x$has_forbidden_chars" != x; then
24656     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24657     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24658   fi
24659 
24660 
24661   windows_path="$new_path"
24662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24663     unix_path=`$CYGPATH -u "$windows_path"`
24664     new_path="$unix_path"
24665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24666     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24667     new_path="$unix_path"
24668   fi
24669 
24670   if test "x$path" != "x$new_path"; then
24671     BOOT_JDK="$new_path"
24672     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24673 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24674   fi
24675 
24676   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24677   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24678 
24679     else
24680       # We're on a unix platform. Hooray! :)
24681       path="$BOOT_JDK"
24682       has_space=`$ECHO "$path" | $GREP " "`
24683       if test "x$has_space" != x; then
24684         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24685 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24686         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24687       fi
24688 
24689       # Use eval to expand a potential ~
24690       eval path="$path"
24691       if test ! -f "$path" && test ! -d "$path"; then
24692         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24693       fi
24694 
24695       if test -d "$path"; then
24696         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24697       else
24698         dir="`$DIRNAME "$path"`"
24699         base="`$BASENAME "$path"`"
24700         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24701       fi
24702     fi
24703   fi
24704 
24705             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24706 $as_echo_n "checking for Boot JDK... " >&6; }
24707             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24708 $as_echo "$BOOT_JDK" >&6; }
24709             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24710 $as_echo_n "checking Boot JDK version... " >&6; }
24711             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24712             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24713 $as_echo "$BOOT_JDK_VERSION" >&6; }
24714           fi # end check jdk version
24715         fi # end check javac
24716       fi # end check java
24717     fi # end check boot jdk found
24718   fi
24719 
24720 
24721   if test "x$BOOT_JDK_FOUND" = xno; then
24722     # Now execute the test
24723 
24724   if test -x /usr/libexec/java_home; then
24725     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24726     BOOT_JDK_FOUND=maybe
24727     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24728 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24729   fi
24730 
24731 
24732     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24733     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24734       # Do we have a bin/java?
24735       if test ! -x "$BOOT_JDK/bin/java"; then
24736         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24737 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24738         BOOT_JDK_FOUND=no
24739       else
24740         # Do we have a bin/javac?
24741         if test ! -x "$BOOT_JDK/bin/javac"; then
24742           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24743 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24744           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24745 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24746           BOOT_JDK_FOUND=no
24747         else
24748           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24749           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24750 
24751           # Extra M4 quote needed to protect [] in grep expression.
24752           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24753           if test "x$FOUND_CORRECT_VERSION" = x; then
24754             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24755 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24756             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24757 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24758             BOOT_JDK_FOUND=no
24759           else
24760             # We're done! :-)
24761             BOOT_JDK_FOUND=yes
24762 
24763   # Only process if variable expands to non-empty
24764 
24765   if test "x$BOOT_JDK" != x; then
24766     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24767 
24768   # Input might be given as Windows format, start by converting to
24769   # unix format.
24770   path="$BOOT_JDK"
24771   new_path=`$CYGPATH -u "$path"`
24772 
24773   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24774   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24775   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24776   # "foo.exe" is OK but "foo" is an error.
24777   #
24778   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24779   # It is also a way to make sure we got the proper file name for the real test later on.
24780   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24781   if test "x$test_shortpath" = x; then
24782     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24783 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24784     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24785   fi
24786 
24787   # Call helper function which possibly converts this using DOS-style short mode.
24788   # If so, the updated path is stored in $new_path.
24789 
24790   input_path="$new_path"
24791   # Check if we need to convert this using DOS-style short mode. If the path
24792   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24793   # take no chances and rewrite it.
24794   # Note: m4 eats our [], so we need to use [ and ] instead.
24795   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24796   if test "x$has_forbidden_chars" != x; then
24797     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24798     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24799     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24800     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24801       # Going to short mode and back again did indeed matter. Since short mode is
24802       # case insensitive, let's make it lowercase to improve readability.
24803       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24804       # Now convert it back to Unix-style (cygpath)
24805       input_path=`$CYGPATH -u "$shortmode_path"`
24806       new_path="$input_path"
24807     fi
24808   fi
24809 
24810   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24811   if test "x$test_cygdrive_prefix" = x; then
24812     # As a simple fix, exclude /usr/bin since it's not a real path.
24813     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24814       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24815       # a path prefixed by /cygdrive for fixpath to work.
24816       new_path="$CYGWIN_ROOT_PATH$input_path"
24817     fi
24818   fi
24819 
24820 
24821   if test "x$path" != "x$new_path"; then
24822     BOOT_JDK="$new_path"
24823     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24824 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24825   fi
24826 
24827     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24828 
24829   path="$BOOT_JDK"
24830   has_colon=`$ECHO $path | $GREP ^.:`
24831   new_path="$path"
24832   if test "x$has_colon" = x; then
24833     # Not in mixed or Windows style, start by that.
24834     new_path=`cmd //c echo $path`
24835   fi
24836 
24837 
24838   input_path="$new_path"
24839   # Check if we need to convert this using DOS-style short mode. If the path
24840   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24841   # take no chances and rewrite it.
24842   # Note: m4 eats our [], so we need to use [ and ] instead.
24843   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24844   if test "x$has_forbidden_chars" != x; then
24845     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24846     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24847   fi
24848 
24849 
24850   windows_path="$new_path"
24851   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24852     unix_path=`$CYGPATH -u "$windows_path"`
24853     new_path="$unix_path"
24854   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24855     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24856     new_path="$unix_path"
24857   fi
24858 
24859   if test "x$path" != "x$new_path"; then
24860     BOOT_JDK="$new_path"
24861     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24862 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24863   fi
24864 
24865   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24866   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24867 
24868     else
24869       # We're on a unix platform. Hooray! :)
24870       path="$BOOT_JDK"
24871       has_space=`$ECHO "$path" | $GREP " "`
24872       if test "x$has_space" != x; then
24873         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24874 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24875         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24876       fi
24877 
24878       # Use eval to expand a potential ~
24879       eval path="$path"
24880       if test ! -f "$path" && test ! -d "$path"; then
24881         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24882       fi
24883 
24884       if test -d "$path"; then
24885         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24886       else
24887         dir="`$DIRNAME "$path"`"
24888         base="`$BASENAME "$path"`"
24889         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24890       fi
24891     fi
24892   fi
24893 
24894             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24895 $as_echo_n "checking for Boot JDK... " >&6; }
24896             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24897 $as_echo "$BOOT_JDK" >&6; }
24898             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24899 $as_echo_n "checking Boot JDK version... " >&6; }
24900             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24901             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24902 $as_echo "$BOOT_JDK_VERSION" >&6; }
24903           fi # end check jdk version
24904         fi # end check javac
24905       fi # end check java
24906     fi # end check boot jdk found
24907   fi
24908 
24909   fi
24910 
24911 
24912     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24913     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24914       # Do we have a bin/java?
24915       if test ! -x "$BOOT_JDK/bin/java"; then
24916         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24917 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24918         BOOT_JDK_FOUND=no
24919       else
24920         # Do we have a bin/javac?
24921         if test ! -x "$BOOT_JDK/bin/javac"; then
24922           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24923 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24924           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24925 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24926           BOOT_JDK_FOUND=no
24927         else
24928           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24929           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24930 
24931           # Extra M4 quote needed to protect [] in grep expression.
24932           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24933           if test "x$FOUND_CORRECT_VERSION" = x; then
24934             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24935 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24936             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24937 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24938             BOOT_JDK_FOUND=no
24939           else
24940             # We're done! :-)
24941             BOOT_JDK_FOUND=yes
24942 
24943   # Only process if variable expands to non-empty
24944 
24945   if test "x$BOOT_JDK" != x; then
24946     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24947 
24948   # Input might be given as Windows format, start by converting to
24949   # unix format.
24950   path="$BOOT_JDK"
24951   new_path=`$CYGPATH -u "$path"`
24952 
24953   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24954   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24955   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24956   # "foo.exe" is OK but "foo" is an error.
24957   #
24958   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24959   # It is also a way to make sure we got the proper file name for the real test later on.
24960   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24961   if test "x$test_shortpath" = x; then
24962     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24963 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24964     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24965   fi
24966 
24967   # Call helper function which possibly converts this using DOS-style short mode.
24968   # If so, the updated path is stored in $new_path.
24969 
24970   input_path="$new_path"
24971   # Check if we need to convert this using DOS-style short mode. If the path
24972   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24973   # take no chances and rewrite it.
24974   # Note: m4 eats our [], so we need to use [ and ] instead.
24975   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24976   if test "x$has_forbidden_chars" != x; then
24977     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24978     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24979     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24980     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24981       # Going to short mode and back again did indeed matter. Since short mode is
24982       # case insensitive, let's make it lowercase to improve readability.
24983       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24984       # Now convert it back to Unix-style (cygpath)
24985       input_path=`$CYGPATH -u "$shortmode_path"`
24986       new_path="$input_path"
24987     fi
24988   fi
24989 
24990   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24991   if test "x$test_cygdrive_prefix" = x; then
24992     # As a simple fix, exclude /usr/bin since it's not a real path.
24993     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24994       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24995       # a path prefixed by /cygdrive for fixpath to work.
24996       new_path="$CYGWIN_ROOT_PATH$input_path"
24997     fi
24998   fi
24999 
25000 
25001   if test "x$path" != "x$new_path"; then
25002     BOOT_JDK="$new_path"
25003     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25004 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25005   fi
25006 
25007     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25008 
25009   path="$BOOT_JDK"
25010   has_colon=`$ECHO $path | $GREP ^.:`
25011   new_path="$path"
25012   if test "x$has_colon" = x; then
25013     # Not in mixed or Windows style, start by that.
25014     new_path=`cmd //c echo $path`
25015   fi
25016 
25017 
25018   input_path="$new_path"
25019   # Check if we need to convert this using DOS-style short mode. If the path
25020   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25021   # take no chances and rewrite it.
25022   # Note: m4 eats our [], so we need to use [ and ] instead.
25023   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25024   if test "x$has_forbidden_chars" != x; then
25025     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25026     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25027   fi
25028 
25029 
25030   windows_path="$new_path"
25031   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25032     unix_path=`$CYGPATH -u "$windows_path"`
25033     new_path="$unix_path"
25034   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25035     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25036     new_path="$unix_path"
25037   fi
25038 
25039   if test "x$path" != "x$new_path"; then
25040     BOOT_JDK="$new_path"
25041     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25042 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25043   fi
25044 
25045   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25046   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25047 
25048     else
25049       # We're on a unix platform. Hooray! :)
25050       path="$BOOT_JDK"
25051       has_space=`$ECHO "$path" | $GREP " "`
25052       if test "x$has_space" != x; then
25053         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25054 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25055         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25056       fi
25057 
25058       # Use eval to expand a potential ~
25059       eval path="$path"
25060       if test ! -f "$path" && test ! -d "$path"; then
25061         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25062       fi
25063 
25064       if test -d "$path"; then
25065         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25066       else
25067         dir="`$DIRNAME "$path"`"
25068         base="`$BASENAME "$path"`"
25069         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25070       fi
25071     fi
25072   fi
25073 
25074             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25075 $as_echo_n "checking for Boot JDK... " >&6; }
25076             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25077 $as_echo "$BOOT_JDK" >&6; }
25078             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25079 $as_echo_n "checking Boot JDK version... " >&6; }
25080             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25081             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25082 $as_echo "$BOOT_JDK_VERSION" >&6; }
25083           fi # end check jdk version
25084         fi # end check javac
25085       fi # end check java
25086     fi # end check boot jdk found
25087   fi
25088 
25089 
25090   # Test: Is $JAVA_HOME set?
25091 
25092   if test "x$BOOT_JDK_FOUND" = xno; then
25093     # Now execute the test
25094 
25095   if test "x$JAVA_HOME" != x; then
25096     JAVA_HOME_PROCESSED="$JAVA_HOME"
25097 
25098   # Only process if variable expands to non-empty
25099 
25100   if test "x$JAVA_HOME_PROCESSED" != x; then
25101     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25102 
25103   # Input might be given as Windows format, start by converting to
25104   # unix format.
25105   path="$JAVA_HOME_PROCESSED"
25106   new_path=`$CYGPATH -u "$path"`
25107 
25108   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25109   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25110   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25111   # "foo.exe" is OK but "foo" is an error.
25112   #
25113   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25114   # It is also a way to make sure we got the proper file name for the real test later on.
25115   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25116   if test "x$test_shortpath" = x; then
25117     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25118 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25119     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25120   fi
25121 
25122   # Call helper function which possibly converts this using DOS-style short mode.
25123   # If so, the updated path is stored in $new_path.
25124 
25125   input_path="$new_path"
25126   # Check if we need to convert this using DOS-style short mode. If the path
25127   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25128   # take no chances and rewrite it.
25129   # Note: m4 eats our [], so we need to use [ and ] instead.
25130   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25131   if test "x$has_forbidden_chars" != x; then
25132     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25133     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25134     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25135     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25136       # Going to short mode and back again did indeed matter. Since short mode is
25137       # case insensitive, let's make it lowercase to improve readability.
25138       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25139       # Now convert it back to Unix-style (cygpath)
25140       input_path=`$CYGPATH -u "$shortmode_path"`
25141       new_path="$input_path"
25142     fi
25143   fi
25144 
25145   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25146   if test "x$test_cygdrive_prefix" = x; then
25147     # As a simple fix, exclude /usr/bin since it's not a real path.
25148     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25149       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25150       # a path prefixed by /cygdrive for fixpath to work.
25151       new_path="$CYGWIN_ROOT_PATH$input_path"
25152     fi
25153   fi
25154 
25155 
25156   if test "x$path" != "x$new_path"; then
25157     JAVA_HOME_PROCESSED="$new_path"
25158     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25159 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25160   fi
25161 
25162     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25163 
25164   path="$JAVA_HOME_PROCESSED"
25165   has_colon=`$ECHO $path | $GREP ^.:`
25166   new_path="$path"
25167   if test "x$has_colon" = x; then
25168     # Not in mixed or Windows style, start by that.
25169     new_path=`cmd //c echo $path`
25170   fi
25171 
25172 
25173   input_path="$new_path"
25174   # Check if we need to convert this using DOS-style short mode. If the path
25175   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25176   # take no chances and rewrite it.
25177   # Note: m4 eats our [], so we need to use [ and ] instead.
25178   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25179   if test "x$has_forbidden_chars" != x; then
25180     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25181     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25182   fi
25183 
25184 
25185   windows_path="$new_path"
25186   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25187     unix_path=`$CYGPATH -u "$windows_path"`
25188     new_path="$unix_path"
25189   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25190     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25191     new_path="$unix_path"
25192   fi
25193 
25194   if test "x$path" != "x$new_path"; then
25195     JAVA_HOME_PROCESSED="$new_path"
25196     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25197 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25198   fi
25199 
25200   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25201   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25202 
25203     else
25204       # We're on a unix platform. Hooray! :)
25205       path="$JAVA_HOME_PROCESSED"
25206       has_space=`$ECHO "$path" | $GREP " "`
25207       if test "x$has_space" != x; then
25208         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25209 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25210         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25211       fi
25212 
25213       # Use eval to expand a potential ~
25214       eval path="$path"
25215       if test ! -f "$path" && test ! -d "$path"; then
25216         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25217       fi
25218 
25219       if test -d "$path"; then
25220         JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25221       else
25222         dir="`$DIRNAME "$path"`"
25223         base="`$BASENAME "$path"`"
25224         JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25225       fi
25226     fi
25227   fi
25228 
25229     if test ! -d "$JAVA_HOME_PROCESSED"; then
25230       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25231 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25232     else
25233       # Aha, the user has set a JAVA_HOME
25234       # let us use that as the Boot JDK.
25235       BOOT_JDK="$JAVA_HOME_PROCESSED"
25236       BOOT_JDK_FOUND=maybe
25237       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25238 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25239     fi
25240   fi
25241 
25242 
25243     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25244     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25245       # Do we have a bin/java?
25246       if test ! -x "$BOOT_JDK/bin/java"; then
25247         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25248 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25249         BOOT_JDK_FOUND=no
25250       else
25251         # Do we have a bin/javac?
25252         if test ! -x "$BOOT_JDK/bin/javac"; then
25253           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25254 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25255           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25256 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25257           BOOT_JDK_FOUND=no
25258         else
25259           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25260           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25261 
25262           # Extra M4 quote needed to protect [] in grep expression.
25263           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25264           if test "x$FOUND_CORRECT_VERSION" = x; then
25265             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25266 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25267             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25268 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25269             BOOT_JDK_FOUND=no
25270           else
25271             # We're done! :-)
25272             BOOT_JDK_FOUND=yes
25273 
25274   # Only process if variable expands to non-empty
25275 
25276   if test "x$BOOT_JDK" != x; then
25277     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25278 
25279   # Input might be given as Windows format, start by converting to
25280   # unix format.
25281   path="$BOOT_JDK"
25282   new_path=`$CYGPATH -u "$path"`
25283 
25284   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25285   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25286   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25287   # "foo.exe" is OK but "foo" is an error.
25288   #
25289   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25290   # It is also a way to make sure we got the proper file name for the real test later on.
25291   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25292   if test "x$test_shortpath" = x; then
25293     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25294 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25295     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25296   fi
25297 
25298   # Call helper function which possibly converts this using DOS-style short mode.
25299   # If so, the updated path is stored in $new_path.
25300 
25301   input_path="$new_path"
25302   # Check if we need to convert this using DOS-style short mode. If the path
25303   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25304   # take no chances and rewrite it.
25305   # Note: m4 eats our [], so we need to use [ and ] instead.
25306   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25307   if test "x$has_forbidden_chars" != x; then
25308     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25309     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25310     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25311     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25312       # Going to short mode and back again did indeed matter. Since short mode is
25313       # case insensitive, let's make it lowercase to improve readability.
25314       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25315       # Now convert it back to Unix-style (cygpath)
25316       input_path=`$CYGPATH -u "$shortmode_path"`
25317       new_path="$input_path"
25318     fi
25319   fi
25320 
25321   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25322   if test "x$test_cygdrive_prefix" = x; then
25323     # As a simple fix, exclude /usr/bin since it's not a real path.
25324     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25325       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25326       # a path prefixed by /cygdrive for fixpath to work.
25327       new_path="$CYGWIN_ROOT_PATH$input_path"
25328     fi
25329   fi
25330 
25331 
25332   if test "x$path" != "x$new_path"; then
25333     BOOT_JDK="$new_path"
25334     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25335 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25336   fi
25337 
25338     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25339 
25340   path="$BOOT_JDK"
25341   has_colon=`$ECHO $path | $GREP ^.:`
25342   new_path="$path"
25343   if test "x$has_colon" = x; then
25344     # Not in mixed or Windows style, start by that.
25345     new_path=`cmd //c echo $path`
25346   fi
25347 
25348 
25349   input_path="$new_path"
25350   # Check if we need to convert this using DOS-style short mode. If the path
25351   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25352   # take no chances and rewrite it.
25353   # Note: m4 eats our [], so we need to use [ and ] instead.
25354   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25355   if test "x$has_forbidden_chars" != x; then
25356     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25357     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25358   fi
25359 
25360 
25361   windows_path="$new_path"
25362   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25363     unix_path=`$CYGPATH -u "$windows_path"`
25364     new_path="$unix_path"
25365   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25366     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25367     new_path="$unix_path"
25368   fi
25369 
25370   if test "x$path" != "x$new_path"; then
25371     BOOT_JDK="$new_path"
25372     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25373 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25374   fi
25375 
25376   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25377   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25378 
25379     else
25380       # We're on a unix platform. Hooray! :)
25381       path="$BOOT_JDK"
25382       has_space=`$ECHO "$path" | $GREP " "`
25383       if test "x$has_space" != x; then
25384         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25385 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25386         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25387       fi
25388 
25389       # Use eval to expand a potential ~
25390       eval path="$path"
25391       if test ! -f "$path" && test ! -d "$path"; then
25392         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25393       fi
25394 
25395       if test -d "$path"; then
25396         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25397       else
25398         dir="`$DIRNAME "$path"`"
25399         base="`$BASENAME "$path"`"
25400         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25401       fi
25402     fi
25403   fi
25404 
25405             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25406 $as_echo_n "checking for Boot JDK... " >&6; }
25407             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25408 $as_echo "$BOOT_JDK" >&6; }
25409             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25410 $as_echo_n "checking Boot JDK version... " >&6; }
25411             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25412             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25413 $as_echo "$BOOT_JDK_VERSION" >&6; }
25414           fi # end check jdk version
25415         fi # end check javac
25416       fi # end check java
25417     fi # end check boot jdk found
25418   fi
25419 
25420 
25421   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25422 
25423   if test "x$BOOT_JDK_FOUND" = xno; then
25424     # Now execute the test
25425 
25426   # Extract the first word of "javac", so it can be a program name with args.
25427 set dummy javac; ac_word=$2
25428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25429 $as_echo_n "checking for $ac_word... " >&6; }
25430 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25431   $as_echo_n "(cached) " >&6
25432 else
25433   case $JAVAC_CHECK in
25434   [\\/]* | ?:[\\/]*)
25435   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25436   ;;
25437   *)
25438   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25439 for as_dir in $PATH
25440 do
25441   IFS=$as_save_IFS
25442   test -z "$as_dir" && as_dir=.
25443     for ac_exec_ext in '' $ac_executable_extensions; do
25444   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25445     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25446     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25447     break 2
25448   fi
25449 done
25450   done
25451 IFS=$as_save_IFS
25452 
25453   ;;
25454 esac
25455 fi
25456 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25457 if test -n "$JAVAC_CHECK"; then
25458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25459 $as_echo "$JAVAC_CHECK" >&6; }
25460 else
25461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25462 $as_echo "no" >&6; }
25463 fi
25464 
25465 
25466   # Extract the first word of "java", so it can be a program name with args.
25467 set dummy java; ac_word=$2
25468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25469 $as_echo_n "checking for $ac_word... " >&6; }
25470 if ${ac_cv_path_JAVA_CHECK+:} false; then :
25471   $as_echo_n "(cached) " >&6
25472 else
25473   case $JAVA_CHECK in
25474   [\\/]* | ?:[\\/]*)
25475   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25476   ;;
25477   *)
25478   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25479 for as_dir in $PATH
25480 do
25481   IFS=$as_save_IFS
25482   test -z "$as_dir" && as_dir=.
25483     for ac_exec_ext in '' $ac_executable_extensions; do
25484   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25485     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25486     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25487     break 2
25488   fi
25489 done
25490   done
25491 IFS=$as_save_IFS
25492 
25493   ;;
25494 esac
25495 fi
25496 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25497 if test -n "$JAVA_CHECK"; then
25498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25499 $as_echo "$JAVA_CHECK" >&6; }
25500 else
25501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25502 $as_echo "no" >&6; }
25503 fi
25504 
25505 
25506   BINARY="$JAVAC_CHECK"
25507   if test "x$JAVAC_CHECK" = x; then
25508     BINARY="$JAVA_CHECK"
25509   fi
25510   if test "x$BINARY" != x; then
25511     # So there is a java(c) binary, it might be part of a JDK.
25512     # Lets find the JDK/JRE directory by following symbolic links.
25513     # Linux/GNU systems often have links from /usr/bin/java to
25514     # /etc/alternatives/java to the real JDK binary.
25515 
25516   if test "x$OPENJDK_BUILD_OS" != xwindows; then
25517     # Follow a chain of symbolic links. Use readlink
25518     # where it exists, else fall back to horribly
25519     # complicated shell code.
25520     if test "x$READLINK_TESTED" != yes; then
25521       # On MacOSX there is a readlink tool with a different
25522       # purpose than the GNU readlink tool. Check the found readlink.
25523       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25524       if test "x$ISGNU" = x; then
25525         # A readlink that we do not know how to use.
25526         # Are there other non-GNU readlinks out there?
25527         READLINK_TESTED=yes
25528         READLINK=
25529       fi
25530     fi
25531 
25532     if test "x$READLINK" != x; then
25533       BINARY=`$READLINK -f $BINARY`
25534     else
25535       # Save the current directory for restoring afterwards
25536       STARTDIR=$PWD
25537       COUNTER=0
25538       sym_link_dir=`$DIRNAME $BINARY`
25539       sym_link_file=`$BASENAME $BINARY`
25540       cd $sym_link_dir
25541       # Use -P flag to resolve symlinks in directories.
25542       cd `$THEPWDCMD -P`
25543       sym_link_dir=`$THEPWDCMD -P`
25544       # Resolve file symlinks
25545       while test $COUNTER -lt 20; do
25546         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25547         if test "x$ISLINK" == x; then
25548           # This is not a symbolic link! We are done!
25549           break
25550         fi
25551         # Again resolve directory symlinks since the target of the just found
25552         # link could be in a different directory
25553         cd `$DIRNAME $ISLINK`
25554         sym_link_dir=`$THEPWDCMD -P`
25555         sym_link_file=`$BASENAME $ISLINK`
25556         let COUNTER=COUNTER+1
25557       done
25558       cd $STARTDIR
25559       BINARY=$sym_link_dir/$sym_link_file
25560     fi
25561   fi
25562 
25563     BOOT_JDK=`dirname "$BINARY"`
25564     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25565     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25566       # Looks like we found ourselves an JDK
25567       BOOT_JDK_FOUND=maybe
25568       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25569 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25570     fi
25571   fi
25572 
25573 
25574     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25575     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25576       # Do we have a bin/java?
25577       if test ! -x "$BOOT_JDK/bin/java"; then
25578         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25579 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25580         BOOT_JDK_FOUND=no
25581       else
25582         # Do we have a bin/javac?
25583         if test ! -x "$BOOT_JDK/bin/javac"; then
25584           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25585 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25586           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25587 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25588           BOOT_JDK_FOUND=no
25589         else
25590           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25591           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25592 
25593           # Extra M4 quote needed to protect [] in grep expression.
25594           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25595           if test "x$FOUND_CORRECT_VERSION" = x; then
25596             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25597 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25598             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25599 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25600             BOOT_JDK_FOUND=no
25601           else
25602             # We're done! :-)
25603             BOOT_JDK_FOUND=yes
25604 
25605   # Only process if variable expands to non-empty
25606 
25607   if test "x$BOOT_JDK" != x; then
25608     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25609 
25610   # Input might be given as Windows format, start by converting to
25611   # unix format.
25612   path="$BOOT_JDK"
25613   new_path=`$CYGPATH -u "$path"`
25614 
25615   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25616   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25617   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25618   # "foo.exe" is OK but "foo" is an error.
25619   #
25620   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25621   # It is also a way to make sure we got the proper file name for the real test later on.
25622   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25623   if test "x$test_shortpath" = x; then
25624     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25625 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25626     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25627   fi
25628 
25629   # Call helper function which possibly converts this using DOS-style short mode.
25630   # If so, the updated path is stored in $new_path.
25631 
25632   input_path="$new_path"
25633   # Check if we need to convert this using DOS-style short mode. If the path
25634   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25635   # take no chances and rewrite it.
25636   # Note: m4 eats our [], so we need to use [ and ] instead.
25637   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25638   if test "x$has_forbidden_chars" != x; then
25639     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25640     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25641     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25642     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25643       # Going to short mode and back again did indeed matter. Since short mode is
25644       # case insensitive, let's make it lowercase to improve readability.
25645       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25646       # Now convert it back to Unix-style (cygpath)
25647       input_path=`$CYGPATH -u "$shortmode_path"`
25648       new_path="$input_path"
25649     fi
25650   fi
25651 
25652   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25653   if test "x$test_cygdrive_prefix" = x; then
25654     # As a simple fix, exclude /usr/bin since it's not a real path.
25655     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25656       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25657       # a path prefixed by /cygdrive for fixpath to work.
25658       new_path="$CYGWIN_ROOT_PATH$input_path"
25659     fi
25660   fi
25661 
25662 
25663   if test "x$path" != "x$new_path"; then
25664     BOOT_JDK="$new_path"
25665     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25666 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25667   fi
25668 
25669     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25670 
25671   path="$BOOT_JDK"
25672   has_colon=`$ECHO $path | $GREP ^.:`
25673   new_path="$path"
25674   if test "x$has_colon" = x; then
25675     # Not in mixed or Windows style, start by that.
25676     new_path=`cmd //c echo $path`
25677   fi
25678 
25679 
25680   input_path="$new_path"
25681   # Check if we need to convert this using DOS-style short mode. If the path
25682   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25683   # take no chances and rewrite it.
25684   # Note: m4 eats our [], so we need to use [ and ] instead.
25685   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25686   if test "x$has_forbidden_chars" != x; then
25687     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25688     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25689   fi
25690 
25691 
25692   windows_path="$new_path"
25693   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25694     unix_path=`$CYGPATH -u "$windows_path"`
25695     new_path="$unix_path"
25696   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25697     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25698     new_path="$unix_path"
25699   fi
25700 
25701   if test "x$path" != "x$new_path"; then
25702     BOOT_JDK="$new_path"
25703     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25704 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25705   fi
25706 
25707   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25708   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25709 
25710     else
25711       # We're on a unix platform. Hooray! :)
25712       path="$BOOT_JDK"
25713       has_space=`$ECHO "$path" | $GREP " "`
25714       if test "x$has_space" != x; then
25715         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25716 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25717         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25718       fi
25719 
25720       # Use eval to expand a potential ~
25721       eval path="$path"
25722       if test ! -f "$path" && test ! -d "$path"; then
25723         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25724       fi
25725 
25726       if test -d "$path"; then
25727         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25728       else
25729         dir="`$DIRNAME "$path"`"
25730         base="`$BASENAME "$path"`"
25731         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25732       fi
25733     fi
25734   fi
25735 
25736             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25737 $as_echo_n "checking for Boot JDK... " >&6; }
25738             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25739 $as_echo "$BOOT_JDK" >&6; }
25740             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25741 $as_echo_n "checking Boot JDK version... " >&6; }
25742             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25743             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25744 $as_echo "$BOOT_JDK_VERSION" >&6; }
25745           fi # end check jdk version
25746         fi # end check javac
25747       fi # end check java
25748     fi # end check boot jdk found
25749   fi
25750 
25751 
25752   # Test: Is there a JDK installed in default, well-known locations?
25753 
25754   if test "x$BOOT_JDK_FOUND" = xno; then
25755     # Now execute the test
25756 
25757   if test "x$OPENJDK_TARGET_OS" = xwindows; then
25758 
25759   if test "x$BOOT_JDK_FOUND" = xno; then
25760     # Now execute the test
25761 
25762   if test "x$ProgramW6432" != x; then
25763     VIRTUAL_DIR="$ProgramW6432/Java"
25764 
25765   windows_path="$VIRTUAL_DIR"
25766   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25767     unix_path=`$CYGPATH -u "$windows_path"`
25768     VIRTUAL_DIR="$unix_path"
25769   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25770     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25771     VIRTUAL_DIR="$unix_path"
25772   fi
25773 
25774 
25775   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25776   BOOT_JDK_SUFFIX=""
25777   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25778   if test "x$ALL_JDKS_FOUND" != x; then
25779     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25780 
25781   if test "x$BOOT_JDK_FOUND" = xno; then
25782     # Now execute the test
25783 
25784         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25785         if test -d "$BOOT_JDK"; then
25786           BOOT_JDK_FOUND=maybe
25787           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25788 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25789         fi
25790 
25791 
25792     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25793     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25794       # Do we have a bin/java?
25795       if test ! -x "$BOOT_JDK/bin/java"; then
25796         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25797 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25798         BOOT_JDK_FOUND=no
25799       else
25800         # Do we have a bin/javac?
25801         if test ! -x "$BOOT_JDK/bin/javac"; then
25802           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25803 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25804           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25805 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25806           BOOT_JDK_FOUND=no
25807         else
25808           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25809           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25810 
25811           # Extra M4 quote needed to protect [] in grep expression.
25812           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25813           if test "x$FOUND_CORRECT_VERSION" = x; then
25814             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25815 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25816             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25817 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25818             BOOT_JDK_FOUND=no
25819           else
25820             # We're done! :-)
25821             BOOT_JDK_FOUND=yes
25822 
25823   # Only process if variable expands to non-empty
25824 
25825   if test "x$BOOT_JDK" != x; then
25826     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25827 
25828   # Input might be given as Windows format, start by converting to
25829   # unix format.
25830   path="$BOOT_JDK"
25831   new_path=`$CYGPATH -u "$path"`
25832 
25833   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25834   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25835   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25836   # "foo.exe" is OK but "foo" is an error.
25837   #
25838   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25839   # It is also a way to make sure we got the proper file name for the real test later on.
25840   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25841   if test "x$test_shortpath" = x; then
25842     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25843 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25844     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25845   fi
25846 
25847   # Call helper function which possibly converts this using DOS-style short mode.
25848   # If so, the updated path is stored in $new_path.
25849 
25850   input_path="$new_path"
25851   # Check if we need to convert this using DOS-style short mode. If the path
25852   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25853   # take no chances and rewrite it.
25854   # Note: m4 eats our [], so we need to use [ and ] instead.
25855   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25856   if test "x$has_forbidden_chars" != x; then
25857     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25858     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25859     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25860     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25861       # Going to short mode and back again did indeed matter. Since short mode is
25862       # case insensitive, let's make it lowercase to improve readability.
25863       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25864       # Now convert it back to Unix-style (cygpath)
25865       input_path=`$CYGPATH -u "$shortmode_path"`
25866       new_path="$input_path"
25867     fi
25868   fi
25869 
25870   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25871   if test "x$test_cygdrive_prefix" = x; then
25872     # As a simple fix, exclude /usr/bin since it's not a real path.
25873     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25874       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25875       # a path prefixed by /cygdrive for fixpath to work.
25876       new_path="$CYGWIN_ROOT_PATH$input_path"
25877     fi
25878   fi
25879 
25880 
25881   if test "x$path" != "x$new_path"; then
25882     BOOT_JDK="$new_path"
25883     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25884 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25885   fi
25886 
25887     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25888 
25889   path="$BOOT_JDK"
25890   has_colon=`$ECHO $path | $GREP ^.:`
25891   new_path="$path"
25892   if test "x$has_colon" = x; then
25893     # Not in mixed or Windows style, start by that.
25894     new_path=`cmd //c echo $path`
25895   fi
25896 
25897 
25898   input_path="$new_path"
25899   # Check if we need to convert this using DOS-style short mode. If the path
25900   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25901   # take no chances and rewrite it.
25902   # Note: m4 eats our [], so we need to use [ and ] instead.
25903   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25904   if test "x$has_forbidden_chars" != x; then
25905     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25906     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25907   fi
25908 
25909 
25910   windows_path="$new_path"
25911   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25912     unix_path=`$CYGPATH -u "$windows_path"`
25913     new_path="$unix_path"
25914   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25915     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25916     new_path="$unix_path"
25917   fi
25918 
25919   if test "x$path" != "x$new_path"; then
25920     BOOT_JDK="$new_path"
25921     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25922 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25923   fi
25924 
25925   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25926   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25927 
25928     else
25929       # We're on a unix platform. Hooray! :)
25930       path="$BOOT_JDK"
25931       has_space=`$ECHO "$path" | $GREP " "`
25932       if test "x$has_space" != x; then
25933         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25934 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25935         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25936       fi
25937 
25938       # Use eval to expand a potential ~
25939       eval path="$path"
25940       if test ! -f "$path" && test ! -d "$path"; then
25941         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25942       fi
25943 
25944       if test -d "$path"; then
25945         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25946       else
25947         dir="`$DIRNAME "$path"`"
25948         base="`$BASENAME "$path"`"
25949         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25950       fi
25951     fi
25952   fi
25953 
25954             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25955 $as_echo_n "checking for Boot JDK... " >&6; }
25956             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25957 $as_echo "$BOOT_JDK" >&6; }
25958             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25959 $as_echo_n "checking Boot JDK version... " >&6; }
25960             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25961             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25962 $as_echo "$BOOT_JDK_VERSION" >&6; }
25963           fi # end check jdk version
25964         fi # end check javac
25965       fi # end check java
25966     fi # end check boot jdk found
25967   fi
25968 
25969     done
25970   fi
25971 
25972   fi
25973 
25974 
25975     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25976     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25977       # Do we have a bin/java?
25978       if test ! -x "$BOOT_JDK/bin/java"; then
25979         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25980 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25981         BOOT_JDK_FOUND=no
25982       else
25983         # Do we have a bin/javac?
25984         if test ! -x "$BOOT_JDK/bin/javac"; then
25985           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25986 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25987           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25988 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25989           BOOT_JDK_FOUND=no
25990         else
25991           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25992           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25993 
25994           # Extra M4 quote needed to protect [] in grep expression.
25995           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25996           if test "x$FOUND_CORRECT_VERSION" = x; then
25997             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25998 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25999             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26000 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26001             BOOT_JDK_FOUND=no
26002           else
26003             # We're done! :-)
26004             BOOT_JDK_FOUND=yes
26005 
26006   # Only process if variable expands to non-empty
26007 
26008   if test "x$BOOT_JDK" != x; then
26009     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26010 
26011   # Input might be given as Windows format, start by converting to
26012   # unix format.
26013   path="$BOOT_JDK"
26014   new_path=`$CYGPATH -u "$path"`
26015 
26016   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26017   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26018   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26019   # "foo.exe" is OK but "foo" is an error.
26020   #
26021   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26022   # It is also a way to make sure we got the proper file name for the real test later on.
26023   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26024   if test "x$test_shortpath" = x; then
26025     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26026 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26027     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26028   fi
26029 
26030   # Call helper function which possibly converts this using DOS-style short mode.
26031   # If so, the updated path is stored in $new_path.
26032 
26033   input_path="$new_path"
26034   # Check if we need to convert this using DOS-style short mode. If the path
26035   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26036   # take no chances and rewrite it.
26037   # Note: m4 eats our [], so we need to use [ and ] instead.
26038   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26039   if test "x$has_forbidden_chars" != x; then
26040     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26041     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26042     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26043     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26044       # Going to short mode and back again did indeed matter. Since short mode is
26045       # case insensitive, let's make it lowercase to improve readability.
26046       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26047       # Now convert it back to Unix-style (cygpath)
26048       input_path=`$CYGPATH -u "$shortmode_path"`
26049       new_path="$input_path"
26050     fi
26051   fi
26052 
26053   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26054   if test "x$test_cygdrive_prefix" = x; then
26055     # As a simple fix, exclude /usr/bin since it's not a real path.
26056     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26057       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26058       # a path prefixed by /cygdrive for fixpath to work.
26059       new_path="$CYGWIN_ROOT_PATH$input_path"
26060     fi
26061   fi
26062 
26063 
26064   if test "x$path" != "x$new_path"; then
26065     BOOT_JDK="$new_path"
26066     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26067 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26068   fi
26069 
26070     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26071 
26072   path="$BOOT_JDK"
26073   has_colon=`$ECHO $path | $GREP ^.:`
26074   new_path="$path"
26075   if test "x$has_colon" = x; then
26076     # Not in mixed or Windows style, start by that.
26077     new_path=`cmd //c echo $path`
26078   fi
26079 
26080 
26081   input_path="$new_path"
26082   # Check if we need to convert this using DOS-style short mode. If the path
26083   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26084   # take no chances and rewrite it.
26085   # Note: m4 eats our [], so we need to use [ and ] instead.
26086   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26087   if test "x$has_forbidden_chars" != x; then
26088     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26089     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26090   fi
26091 
26092 
26093   windows_path="$new_path"
26094   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26095     unix_path=`$CYGPATH -u "$windows_path"`
26096     new_path="$unix_path"
26097   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26098     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26099     new_path="$unix_path"
26100   fi
26101 
26102   if test "x$path" != "x$new_path"; then
26103     BOOT_JDK="$new_path"
26104     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26105 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26106   fi
26107 
26108   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26109   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26110 
26111     else
26112       # We're on a unix platform. Hooray! :)
26113       path="$BOOT_JDK"
26114       has_space=`$ECHO "$path" | $GREP " "`
26115       if test "x$has_space" != x; then
26116         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26117 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26118         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26119       fi
26120 
26121       # Use eval to expand a potential ~
26122       eval path="$path"
26123       if test ! -f "$path" && test ! -d "$path"; then
26124         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26125       fi
26126 
26127       if test -d "$path"; then
26128         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26129       else
26130         dir="`$DIRNAME "$path"`"
26131         base="`$BASENAME "$path"`"
26132         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26133       fi
26134     fi
26135   fi
26136 
26137             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26138 $as_echo_n "checking for Boot JDK... " >&6; }
26139             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26140 $as_echo "$BOOT_JDK" >&6; }
26141             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26142 $as_echo_n "checking Boot JDK version... " >&6; }
26143             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26144             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26145 $as_echo "$BOOT_JDK_VERSION" >&6; }
26146           fi # end check jdk version
26147         fi # end check javac
26148       fi # end check java
26149     fi # end check boot jdk found
26150   fi
26151 
26152 
26153   if test "x$BOOT_JDK_FOUND" = xno; then
26154     # Now execute the test
26155 
26156   if test "x$PROGRAMW6432" != x; then
26157     VIRTUAL_DIR="$PROGRAMW6432/Java"
26158 
26159   windows_path="$VIRTUAL_DIR"
26160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26161     unix_path=`$CYGPATH -u "$windows_path"`
26162     VIRTUAL_DIR="$unix_path"
26163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26164     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26165     VIRTUAL_DIR="$unix_path"
26166   fi
26167 
26168 
26169   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26170   BOOT_JDK_SUFFIX=""
26171   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26172   if test "x$ALL_JDKS_FOUND" != x; then
26173     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26174 
26175   if test "x$BOOT_JDK_FOUND" = xno; then
26176     # Now execute the test
26177 
26178         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26179         if test -d "$BOOT_JDK"; then
26180           BOOT_JDK_FOUND=maybe
26181           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26182 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26183         fi
26184 
26185 
26186     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26187     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26188       # Do we have a bin/java?
26189       if test ! -x "$BOOT_JDK/bin/java"; then
26190         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26191 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26192         BOOT_JDK_FOUND=no
26193       else
26194         # Do we have a bin/javac?
26195         if test ! -x "$BOOT_JDK/bin/javac"; then
26196           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26197 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26198           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26199 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26200           BOOT_JDK_FOUND=no
26201         else
26202           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26203           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26204 
26205           # Extra M4 quote needed to protect [] in grep expression.
26206           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26207           if test "x$FOUND_CORRECT_VERSION" = x; then
26208             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26209 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26210             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26211 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26212             BOOT_JDK_FOUND=no
26213           else
26214             # We're done! :-)
26215             BOOT_JDK_FOUND=yes
26216 
26217   # Only process if variable expands to non-empty
26218 
26219   if test "x$BOOT_JDK" != x; then
26220     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26221 
26222   # Input might be given as Windows format, start by converting to
26223   # unix format.
26224   path="$BOOT_JDK"
26225   new_path=`$CYGPATH -u "$path"`
26226 
26227   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26228   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26229   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26230   # "foo.exe" is OK but "foo" is an error.
26231   #
26232   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26233   # It is also a way to make sure we got the proper file name for the real test later on.
26234   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26235   if test "x$test_shortpath" = x; then
26236     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26237 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26238     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26239   fi
26240 
26241   # Call helper function which possibly converts this using DOS-style short mode.
26242   # If so, the updated path is stored in $new_path.
26243 
26244   input_path="$new_path"
26245   # Check if we need to convert this using DOS-style short mode. If the path
26246   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26247   # take no chances and rewrite it.
26248   # Note: m4 eats our [], so we need to use [ and ] instead.
26249   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26250   if test "x$has_forbidden_chars" != x; then
26251     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26252     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26253     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26254     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26255       # Going to short mode and back again did indeed matter. Since short mode is
26256       # case insensitive, let's make it lowercase to improve readability.
26257       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26258       # Now convert it back to Unix-style (cygpath)
26259       input_path=`$CYGPATH -u "$shortmode_path"`
26260       new_path="$input_path"
26261     fi
26262   fi
26263 
26264   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26265   if test "x$test_cygdrive_prefix" = x; then
26266     # As a simple fix, exclude /usr/bin since it's not a real path.
26267     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26268       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26269       # a path prefixed by /cygdrive for fixpath to work.
26270       new_path="$CYGWIN_ROOT_PATH$input_path"
26271     fi
26272   fi
26273 
26274 
26275   if test "x$path" != "x$new_path"; then
26276     BOOT_JDK="$new_path"
26277     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26278 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26279   fi
26280 
26281     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26282 
26283   path="$BOOT_JDK"
26284   has_colon=`$ECHO $path | $GREP ^.:`
26285   new_path="$path"
26286   if test "x$has_colon" = x; then
26287     # Not in mixed or Windows style, start by that.
26288     new_path=`cmd //c echo $path`
26289   fi
26290 
26291 
26292   input_path="$new_path"
26293   # Check if we need to convert this using DOS-style short mode. If the path
26294   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26295   # take no chances and rewrite it.
26296   # Note: m4 eats our [], so we need to use [ and ] instead.
26297   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26298   if test "x$has_forbidden_chars" != x; then
26299     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26300     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26301   fi
26302 
26303 
26304   windows_path="$new_path"
26305   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26306     unix_path=`$CYGPATH -u "$windows_path"`
26307     new_path="$unix_path"
26308   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26309     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26310     new_path="$unix_path"
26311   fi
26312 
26313   if test "x$path" != "x$new_path"; then
26314     BOOT_JDK="$new_path"
26315     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26316 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26317   fi
26318 
26319   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26320   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26321 
26322     else
26323       # We're on a unix platform. Hooray! :)
26324       path="$BOOT_JDK"
26325       has_space=`$ECHO "$path" | $GREP " "`
26326       if test "x$has_space" != x; then
26327         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26328 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26329         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26330       fi
26331 
26332       # Use eval to expand a potential ~
26333       eval path="$path"
26334       if test ! -f "$path" && test ! -d "$path"; then
26335         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26336       fi
26337 
26338       if test -d "$path"; then
26339         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26340       else
26341         dir="`$DIRNAME "$path"`"
26342         base="`$BASENAME "$path"`"
26343         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26344       fi
26345     fi
26346   fi
26347 
26348             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26349 $as_echo_n "checking for Boot JDK... " >&6; }
26350             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26351 $as_echo "$BOOT_JDK" >&6; }
26352             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26353 $as_echo_n "checking Boot JDK version... " >&6; }
26354             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26355             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26356 $as_echo "$BOOT_JDK_VERSION" >&6; }
26357           fi # end check jdk version
26358         fi # end check javac
26359       fi # end check java
26360     fi # end check boot jdk found
26361   fi
26362 
26363     done
26364   fi
26365 
26366   fi
26367 
26368 
26369     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26370     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26371       # Do we have a bin/java?
26372       if test ! -x "$BOOT_JDK/bin/java"; then
26373         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26374 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26375         BOOT_JDK_FOUND=no
26376       else
26377         # Do we have a bin/javac?
26378         if test ! -x "$BOOT_JDK/bin/javac"; then
26379           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26380 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26381           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26382 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26383           BOOT_JDK_FOUND=no
26384         else
26385           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26386           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26387 
26388           # Extra M4 quote needed to protect [] in grep expression.
26389           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26390           if test "x$FOUND_CORRECT_VERSION" = x; then
26391             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26392 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26393             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26394 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26395             BOOT_JDK_FOUND=no
26396           else
26397             # We're done! :-)
26398             BOOT_JDK_FOUND=yes
26399 
26400   # Only process if variable expands to non-empty
26401 
26402   if test "x$BOOT_JDK" != x; then
26403     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26404 
26405   # Input might be given as Windows format, start by converting to
26406   # unix format.
26407   path="$BOOT_JDK"
26408   new_path=`$CYGPATH -u "$path"`
26409 
26410   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26411   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26412   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26413   # "foo.exe" is OK but "foo" is an error.
26414   #
26415   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26416   # It is also a way to make sure we got the proper file name for the real test later on.
26417   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26418   if test "x$test_shortpath" = x; then
26419     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26420 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26421     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26422   fi
26423 
26424   # Call helper function which possibly converts this using DOS-style short mode.
26425   # If so, the updated path is stored in $new_path.
26426 
26427   input_path="$new_path"
26428   # Check if we need to convert this using DOS-style short mode. If the path
26429   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26430   # take no chances and rewrite it.
26431   # Note: m4 eats our [], so we need to use [ and ] instead.
26432   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26433   if test "x$has_forbidden_chars" != x; then
26434     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26435     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26436     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26437     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26438       # Going to short mode and back again did indeed matter. Since short mode is
26439       # case insensitive, let's make it lowercase to improve readability.
26440       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26441       # Now convert it back to Unix-style (cygpath)
26442       input_path=`$CYGPATH -u "$shortmode_path"`
26443       new_path="$input_path"
26444     fi
26445   fi
26446 
26447   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26448   if test "x$test_cygdrive_prefix" = x; then
26449     # As a simple fix, exclude /usr/bin since it's not a real path.
26450     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26451       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26452       # a path prefixed by /cygdrive for fixpath to work.
26453       new_path="$CYGWIN_ROOT_PATH$input_path"
26454     fi
26455   fi
26456 
26457 
26458   if test "x$path" != "x$new_path"; then
26459     BOOT_JDK="$new_path"
26460     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26461 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26462   fi
26463 
26464     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26465 
26466   path="$BOOT_JDK"
26467   has_colon=`$ECHO $path | $GREP ^.:`
26468   new_path="$path"
26469   if test "x$has_colon" = x; then
26470     # Not in mixed or Windows style, start by that.
26471     new_path=`cmd //c echo $path`
26472   fi
26473 
26474 
26475   input_path="$new_path"
26476   # Check if we need to convert this using DOS-style short mode. If the path
26477   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26478   # take no chances and rewrite it.
26479   # Note: m4 eats our [], so we need to use [ and ] instead.
26480   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26481   if test "x$has_forbidden_chars" != x; then
26482     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26483     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26484   fi
26485 
26486 
26487   windows_path="$new_path"
26488   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26489     unix_path=`$CYGPATH -u "$windows_path"`
26490     new_path="$unix_path"
26491   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26492     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26493     new_path="$unix_path"
26494   fi
26495 
26496   if test "x$path" != "x$new_path"; then
26497     BOOT_JDK="$new_path"
26498     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26499 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26500   fi
26501 
26502   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26503   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26504 
26505     else
26506       # We're on a unix platform. Hooray! :)
26507       path="$BOOT_JDK"
26508       has_space=`$ECHO "$path" | $GREP " "`
26509       if test "x$has_space" != x; then
26510         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26511 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26512         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26513       fi
26514 
26515       # Use eval to expand a potential ~
26516       eval path="$path"
26517       if test ! -f "$path" && test ! -d "$path"; then
26518         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26519       fi
26520 
26521       if test -d "$path"; then
26522         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26523       else
26524         dir="`$DIRNAME "$path"`"
26525         base="`$BASENAME "$path"`"
26526         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26527       fi
26528     fi
26529   fi
26530 
26531             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26532 $as_echo_n "checking for Boot JDK... " >&6; }
26533             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26534 $as_echo "$BOOT_JDK" >&6; }
26535             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26536 $as_echo_n "checking Boot JDK version... " >&6; }
26537             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26538             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26539 $as_echo "$BOOT_JDK_VERSION" >&6; }
26540           fi # end check jdk version
26541         fi # end check javac
26542       fi # end check java
26543     fi # end check boot jdk found
26544   fi
26545 
26546 
26547   if test "x$BOOT_JDK_FOUND" = xno; then
26548     # Now execute the test
26549 
26550   if test "x$PROGRAMFILES" != x; then
26551     VIRTUAL_DIR="$PROGRAMFILES/Java"
26552 
26553   windows_path="$VIRTUAL_DIR"
26554   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26555     unix_path=`$CYGPATH -u "$windows_path"`
26556     VIRTUAL_DIR="$unix_path"
26557   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26558     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26559     VIRTUAL_DIR="$unix_path"
26560   fi
26561 
26562 
26563   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26564   BOOT_JDK_SUFFIX=""
26565   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26566   if test "x$ALL_JDKS_FOUND" != x; then
26567     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26568 
26569   if test "x$BOOT_JDK_FOUND" = xno; then
26570     # Now execute the test
26571 
26572         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26573         if test -d "$BOOT_JDK"; then
26574           BOOT_JDK_FOUND=maybe
26575           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26576 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26577         fi
26578 
26579 
26580     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26581     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26582       # Do we have a bin/java?
26583       if test ! -x "$BOOT_JDK/bin/java"; then
26584         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26585 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26586         BOOT_JDK_FOUND=no
26587       else
26588         # Do we have a bin/javac?
26589         if test ! -x "$BOOT_JDK/bin/javac"; then
26590           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26591 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26592           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26593 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26594           BOOT_JDK_FOUND=no
26595         else
26596           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26597           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26598 
26599           # Extra M4 quote needed to protect [] in grep expression.
26600           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26601           if test "x$FOUND_CORRECT_VERSION" = x; then
26602             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26603 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26604             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26605 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26606             BOOT_JDK_FOUND=no
26607           else
26608             # We're done! :-)
26609             BOOT_JDK_FOUND=yes
26610 
26611   # Only process if variable expands to non-empty
26612 
26613   if test "x$BOOT_JDK" != x; then
26614     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26615 
26616   # Input might be given as Windows format, start by converting to
26617   # unix format.
26618   path="$BOOT_JDK"
26619   new_path=`$CYGPATH -u "$path"`
26620 
26621   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26622   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26623   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26624   # "foo.exe" is OK but "foo" is an error.
26625   #
26626   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26627   # It is also a way to make sure we got the proper file name for the real test later on.
26628   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26629   if test "x$test_shortpath" = x; then
26630     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26631 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26632     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26633   fi
26634 
26635   # Call helper function which possibly converts this using DOS-style short mode.
26636   # If so, the updated path is stored in $new_path.
26637 
26638   input_path="$new_path"
26639   # Check if we need to convert this using DOS-style short mode. If the path
26640   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26641   # take no chances and rewrite it.
26642   # Note: m4 eats our [], so we need to use [ and ] instead.
26643   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26644   if test "x$has_forbidden_chars" != x; then
26645     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26646     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26647     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26648     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26649       # Going to short mode and back again did indeed matter. Since short mode is
26650       # case insensitive, let's make it lowercase to improve readability.
26651       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26652       # Now convert it back to Unix-style (cygpath)
26653       input_path=`$CYGPATH -u "$shortmode_path"`
26654       new_path="$input_path"
26655     fi
26656   fi
26657 
26658   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26659   if test "x$test_cygdrive_prefix" = x; then
26660     # As a simple fix, exclude /usr/bin since it's not a real path.
26661     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26662       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26663       # a path prefixed by /cygdrive for fixpath to work.
26664       new_path="$CYGWIN_ROOT_PATH$input_path"
26665     fi
26666   fi
26667 
26668 
26669   if test "x$path" != "x$new_path"; then
26670     BOOT_JDK="$new_path"
26671     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26672 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26673   fi
26674 
26675     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26676 
26677   path="$BOOT_JDK"
26678   has_colon=`$ECHO $path | $GREP ^.:`
26679   new_path="$path"
26680   if test "x$has_colon" = x; then
26681     # Not in mixed or Windows style, start by that.
26682     new_path=`cmd //c echo $path`
26683   fi
26684 
26685 
26686   input_path="$new_path"
26687   # Check if we need to convert this using DOS-style short mode. If the path
26688   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26689   # take no chances and rewrite it.
26690   # Note: m4 eats our [], so we need to use [ and ] instead.
26691   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26692   if test "x$has_forbidden_chars" != x; then
26693     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26694     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26695   fi
26696 
26697 
26698   windows_path="$new_path"
26699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26700     unix_path=`$CYGPATH -u "$windows_path"`
26701     new_path="$unix_path"
26702   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26703     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26704     new_path="$unix_path"
26705   fi
26706 
26707   if test "x$path" != "x$new_path"; then
26708     BOOT_JDK="$new_path"
26709     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26710 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26711   fi
26712 
26713   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26714   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26715 
26716     else
26717       # We're on a unix platform. Hooray! :)
26718       path="$BOOT_JDK"
26719       has_space=`$ECHO "$path" | $GREP " "`
26720       if test "x$has_space" != x; then
26721         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26722 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26723         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26724       fi
26725 
26726       # Use eval to expand a potential ~
26727       eval path="$path"
26728       if test ! -f "$path" && test ! -d "$path"; then
26729         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26730       fi
26731 
26732       if test -d "$path"; then
26733         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26734       else
26735         dir="`$DIRNAME "$path"`"
26736         base="`$BASENAME "$path"`"
26737         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26738       fi
26739     fi
26740   fi
26741 
26742             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26743 $as_echo_n "checking for Boot JDK... " >&6; }
26744             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26745 $as_echo "$BOOT_JDK" >&6; }
26746             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26747 $as_echo_n "checking Boot JDK version... " >&6; }
26748             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26749             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26750 $as_echo "$BOOT_JDK_VERSION" >&6; }
26751           fi # end check jdk version
26752         fi # end check javac
26753       fi # end check java
26754     fi # end check boot jdk found
26755   fi
26756 
26757     done
26758   fi
26759 
26760   fi
26761 
26762 
26763     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26764     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26765       # Do we have a bin/java?
26766       if test ! -x "$BOOT_JDK/bin/java"; then
26767         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26768 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26769         BOOT_JDK_FOUND=no
26770       else
26771         # Do we have a bin/javac?
26772         if test ! -x "$BOOT_JDK/bin/javac"; then
26773           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26774 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26775           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26776 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26777           BOOT_JDK_FOUND=no
26778         else
26779           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26780           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26781 
26782           # Extra M4 quote needed to protect [] in grep expression.
26783           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26784           if test "x$FOUND_CORRECT_VERSION" = x; then
26785             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26786 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26787             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26788 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26789             BOOT_JDK_FOUND=no
26790           else
26791             # We're done! :-)
26792             BOOT_JDK_FOUND=yes
26793 
26794   # Only process if variable expands to non-empty
26795 
26796   if test "x$BOOT_JDK" != x; then
26797     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26798 
26799   # Input might be given as Windows format, start by converting to
26800   # unix format.
26801   path="$BOOT_JDK"
26802   new_path=`$CYGPATH -u "$path"`
26803 
26804   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26805   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26806   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26807   # "foo.exe" is OK but "foo" is an error.
26808   #
26809   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26810   # It is also a way to make sure we got the proper file name for the real test later on.
26811   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26812   if test "x$test_shortpath" = x; then
26813     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26814 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26815     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26816   fi
26817 
26818   # Call helper function which possibly converts this using DOS-style short mode.
26819   # If so, the updated path is stored in $new_path.
26820 
26821   input_path="$new_path"
26822   # Check if we need to convert this using DOS-style short mode. If the path
26823   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26824   # take no chances and rewrite it.
26825   # Note: m4 eats our [], so we need to use [ and ] instead.
26826   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26827   if test "x$has_forbidden_chars" != x; then
26828     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26829     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26830     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26831     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26832       # Going to short mode and back again did indeed matter. Since short mode is
26833       # case insensitive, let's make it lowercase to improve readability.
26834       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26835       # Now convert it back to Unix-style (cygpath)
26836       input_path=`$CYGPATH -u "$shortmode_path"`
26837       new_path="$input_path"
26838     fi
26839   fi
26840 
26841   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26842   if test "x$test_cygdrive_prefix" = x; then
26843     # As a simple fix, exclude /usr/bin since it's not a real path.
26844     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26845       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26846       # a path prefixed by /cygdrive for fixpath to work.
26847       new_path="$CYGWIN_ROOT_PATH$input_path"
26848     fi
26849   fi
26850 
26851 
26852   if test "x$path" != "x$new_path"; then
26853     BOOT_JDK="$new_path"
26854     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26855 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26856   fi
26857 
26858     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26859 
26860   path="$BOOT_JDK"
26861   has_colon=`$ECHO $path | $GREP ^.:`
26862   new_path="$path"
26863   if test "x$has_colon" = x; then
26864     # Not in mixed or Windows style, start by that.
26865     new_path=`cmd //c echo $path`
26866   fi
26867 
26868 
26869   input_path="$new_path"
26870   # Check if we need to convert this using DOS-style short mode. If the path
26871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26872   # take no chances and rewrite it.
26873   # Note: m4 eats our [], so we need to use [ and ] instead.
26874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26875   if test "x$has_forbidden_chars" != x; then
26876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26877     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26878   fi
26879 
26880 
26881   windows_path="$new_path"
26882   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26883     unix_path=`$CYGPATH -u "$windows_path"`
26884     new_path="$unix_path"
26885   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26886     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26887     new_path="$unix_path"
26888   fi
26889 
26890   if test "x$path" != "x$new_path"; then
26891     BOOT_JDK="$new_path"
26892     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26893 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26894   fi
26895 
26896   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26897   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26898 
26899     else
26900       # We're on a unix platform. Hooray! :)
26901       path="$BOOT_JDK"
26902       has_space=`$ECHO "$path" | $GREP " "`
26903       if test "x$has_space" != x; then
26904         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26905 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26906         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26907       fi
26908 
26909       # Use eval to expand a potential ~
26910       eval path="$path"
26911       if test ! -f "$path" && test ! -d "$path"; then
26912         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26913       fi
26914 
26915       if test -d "$path"; then
26916         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26917       else
26918         dir="`$DIRNAME "$path"`"
26919         base="`$BASENAME "$path"`"
26920         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26921       fi
26922     fi
26923   fi
26924 
26925             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26926 $as_echo_n "checking for Boot JDK... " >&6; }
26927             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26928 $as_echo "$BOOT_JDK" >&6; }
26929             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26930 $as_echo_n "checking Boot JDK version... " >&6; }
26931             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26932             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26933 $as_echo "$BOOT_JDK_VERSION" >&6; }
26934           fi # end check jdk version
26935         fi # end check javac
26936       fi # end check java
26937     fi # end check boot jdk found
26938   fi
26939 
26940 
26941   if test "x$BOOT_JDK_FOUND" = xno; then
26942     # Now execute the test
26943 
26944   if test "x$ProgramFiles" != x; then
26945     VIRTUAL_DIR="$ProgramFiles/Java"
26946 
26947   windows_path="$VIRTUAL_DIR"
26948   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26949     unix_path=`$CYGPATH -u "$windows_path"`
26950     VIRTUAL_DIR="$unix_path"
26951   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26952     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26953     VIRTUAL_DIR="$unix_path"
26954   fi
26955 
26956 
26957   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26958   BOOT_JDK_SUFFIX=""
26959   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26960   if test "x$ALL_JDKS_FOUND" != x; then
26961     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26962 
26963   if test "x$BOOT_JDK_FOUND" = xno; then
26964     # Now execute the test
26965 
26966         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26967         if test -d "$BOOT_JDK"; then
26968           BOOT_JDK_FOUND=maybe
26969           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26970 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26971         fi
26972 
26973 
26974     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26975     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26976       # Do we have a bin/java?
26977       if test ! -x "$BOOT_JDK/bin/java"; then
26978         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26979 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26980         BOOT_JDK_FOUND=no
26981       else
26982         # Do we have a bin/javac?
26983         if test ! -x "$BOOT_JDK/bin/javac"; then
26984           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26985 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26986           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26987 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26988           BOOT_JDK_FOUND=no
26989         else
26990           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26991           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26992 
26993           # Extra M4 quote needed to protect [] in grep expression.
26994           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26995           if test "x$FOUND_CORRECT_VERSION" = x; then
26996             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26997 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26998             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26999 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27000             BOOT_JDK_FOUND=no
27001           else
27002             # We're done! :-)
27003             BOOT_JDK_FOUND=yes
27004 
27005   # Only process if variable expands to non-empty
27006 
27007   if test "x$BOOT_JDK" != x; then
27008     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27009 
27010   # Input might be given as Windows format, start by converting to
27011   # unix format.
27012   path="$BOOT_JDK"
27013   new_path=`$CYGPATH -u "$path"`
27014 
27015   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27016   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27017   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27018   # "foo.exe" is OK but "foo" is an error.
27019   #
27020   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27021   # It is also a way to make sure we got the proper file name for the real test later on.
27022   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27023   if test "x$test_shortpath" = x; then
27024     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27025 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27026     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27027   fi
27028 
27029   # Call helper function which possibly converts this using DOS-style short mode.
27030   # If so, the updated path is stored in $new_path.
27031 
27032   input_path="$new_path"
27033   # Check if we need to convert this using DOS-style short mode. If the path
27034   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27035   # take no chances and rewrite it.
27036   # Note: m4 eats our [], so we need to use [ and ] instead.
27037   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27038   if test "x$has_forbidden_chars" != x; then
27039     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27040     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27041     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27042     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27043       # Going to short mode and back again did indeed matter. Since short mode is
27044       # case insensitive, let's make it lowercase to improve readability.
27045       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27046       # Now convert it back to Unix-style (cygpath)
27047       input_path=`$CYGPATH -u "$shortmode_path"`
27048       new_path="$input_path"
27049     fi
27050   fi
27051 
27052   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27053   if test "x$test_cygdrive_prefix" = x; then
27054     # As a simple fix, exclude /usr/bin since it's not a real path.
27055     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27056       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27057       # a path prefixed by /cygdrive for fixpath to work.
27058       new_path="$CYGWIN_ROOT_PATH$input_path"
27059     fi
27060   fi
27061 
27062 
27063   if test "x$path" != "x$new_path"; then
27064     BOOT_JDK="$new_path"
27065     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27066 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27067   fi
27068 
27069     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27070 
27071   path="$BOOT_JDK"
27072   has_colon=`$ECHO $path | $GREP ^.:`
27073   new_path="$path"
27074   if test "x$has_colon" = x; then
27075     # Not in mixed or Windows style, start by that.
27076     new_path=`cmd //c echo $path`
27077   fi
27078 
27079 
27080   input_path="$new_path"
27081   # Check if we need to convert this using DOS-style short mode. If the path
27082   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27083   # take no chances and rewrite it.
27084   # Note: m4 eats our [], so we need to use [ and ] instead.
27085   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27086   if test "x$has_forbidden_chars" != x; then
27087     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27088     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27089   fi
27090 
27091 
27092   windows_path="$new_path"
27093   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27094     unix_path=`$CYGPATH -u "$windows_path"`
27095     new_path="$unix_path"
27096   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27097     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27098     new_path="$unix_path"
27099   fi
27100 
27101   if test "x$path" != "x$new_path"; then
27102     BOOT_JDK="$new_path"
27103     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27104 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27105   fi
27106 
27107   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27108   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27109 
27110     else
27111       # We're on a unix platform. Hooray! :)
27112       path="$BOOT_JDK"
27113       has_space=`$ECHO "$path" | $GREP " "`
27114       if test "x$has_space" != x; then
27115         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27116 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27117         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27118       fi
27119 
27120       # Use eval to expand a potential ~
27121       eval path="$path"
27122       if test ! -f "$path" && test ! -d "$path"; then
27123         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27124       fi
27125 
27126       if test -d "$path"; then
27127         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27128       else
27129         dir="`$DIRNAME "$path"`"
27130         base="`$BASENAME "$path"`"
27131         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27132       fi
27133     fi
27134   fi
27135 
27136             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27137 $as_echo_n "checking for Boot JDK... " >&6; }
27138             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27139 $as_echo "$BOOT_JDK" >&6; }
27140             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27141 $as_echo_n "checking Boot JDK version... " >&6; }
27142             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27143             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27144 $as_echo "$BOOT_JDK_VERSION" >&6; }
27145           fi # end check jdk version
27146         fi # end check javac
27147       fi # end check java
27148     fi # end check boot jdk found
27149   fi
27150 
27151     done
27152   fi
27153 
27154   fi
27155 
27156 
27157     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27158     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27159       # Do we have a bin/java?
27160       if test ! -x "$BOOT_JDK/bin/java"; then
27161         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27162 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27163         BOOT_JDK_FOUND=no
27164       else
27165         # Do we have a bin/javac?
27166         if test ! -x "$BOOT_JDK/bin/javac"; then
27167           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27168 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27169           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27170 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27171           BOOT_JDK_FOUND=no
27172         else
27173           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27174           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27175 
27176           # Extra M4 quote needed to protect [] in grep expression.
27177           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27178           if test "x$FOUND_CORRECT_VERSION" = x; then
27179             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27180 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27181             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27182 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27183             BOOT_JDK_FOUND=no
27184           else
27185             # We're done! :-)
27186             BOOT_JDK_FOUND=yes
27187 
27188   # Only process if variable expands to non-empty
27189 
27190   if test "x$BOOT_JDK" != x; then
27191     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27192 
27193   # Input might be given as Windows format, start by converting to
27194   # unix format.
27195   path="$BOOT_JDK"
27196   new_path=`$CYGPATH -u "$path"`
27197 
27198   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27199   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27200   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27201   # "foo.exe" is OK but "foo" is an error.
27202   #
27203   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27204   # It is also a way to make sure we got the proper file name for the real test later on.
27205   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27206   if test "x$test_shortpath" = x; then
27207     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27208 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27209     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27210   fi
27211 
27212   # Call helper function which possibly converts this using DOS-style short mode.
27213   # If so, the updated path is stored in $new_path.
27214 
27215   input_path="$new_path"
27216   # Check if we need to convert this using DOS-style short mode. If the path
27217   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27218   # take no chances and rewrite it.
27219   # Note: m4 eats our [], so we need to use [ and ] instead.
27220   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27221   if test "x$has_forbidden_chars" != x; then
27222     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27223     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27224     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27225     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27226       # Going to short mode and back again did indeed matter. Since short mode is
27227       # case insensitive, let's make it lowercase to improve readability.
27228       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27229       # Now convert it back to Unix-style (cygpath)
27230       input_path=`$CYGPATH -u "$shortmode_path"`
27231       new_path="$input_path"
27232     fi
27233   fi
27234 
27235   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27236   if test "x$test_cygdrive_prefix" = x; then
27237     # As a simple fix, exclude /usr/bin since it's not a real path.
27238     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27239       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27240       # a path prefixed by /cygdrive for fixpath to work.
27241       new_path="$CYGWIN_ROOT_PATH$input_path"
27242     fi
27243   fi
27244 
27245 
27246   if test "x$path" != "x$new_path"; then
27247     BOOT_JDK="$new_path"
27248     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27249 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27250   fi
27251 
27252     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27253 
27254   path="$BOOT_JDK"
27255   has_colon=`$ECHO $path | $GREP ^.:`
27256   new_path="$path"
27257   if test "x$has_colon" = x; then
27258     # Not in mixed or Windows style, start by that.
27259     new_path=`cmd //c echo $path`
27260   fi
27261 
27262 
27263   input_path="$new_path"
27264   # Check if we need to convert this using DOS-style short mode. If the path
27265   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27266   # take no chances and rewrite it.
27267   # Note: m4 eats our [], so we need to use [ and ] instead.
27268   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27269   if test "x$has_forbidden_chars" != x; then
27270     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27271     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27272   fi
27273 
27274 
27275   windows_path="$new_path"
27276   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27277     unix_path=`$CYGPATH -u "$windows_path"`
27278     new_path="$unix_path"
27279   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27280     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27281     new_path="$unix_path"
27282   fi
27283 
27284   if test "x$path" != "x$new_path"; then
27285     BOOT_JDK="$new_path"
27286     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27287 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27288   fi
27289 
27290   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27291   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27292 
27293     else
27294       # We're on a unix platform. Hooray! :)
27295       path="$BOOT_JDK"
27296       has_space=`$ECHO "$path" | $GREP " "`
27297       if test "x$has_space" != x; then
27298         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27299 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27300         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27301       fi
27302 
27303       # Use eval to expand a potential ~
27304       eval path="$path"
27305       if test ! -f "$path" && test ! -d "$path"; then
27306         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27307       fi
27308 
27309       if test -d "$path"; then
27310         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27311       else
27312         dir="`$DIRNAME "$path"`"
27313         base="`$BASENAME "$path"`"
27314         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27315       fi
27316     fi
27317   fi
27318 
27319             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27320 $as_echo_n "checking for Boot JDK... " >&6; }
27321             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27322 $as_echo "$BOOT_JDK" >&6; }
27323             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27324 $as_echo_n "checking Boot JDK version... " >&6; }
27325             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27326             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27327 $as_echo "$BOOT_JDK_VERSION" >&6; }
27328           fi # end check jdk version
27329         fi # end check javac
27330       fi # end check java
27331     fi # end check boot jdk found
27332   fi
27333 
27334 
27335   if test "x$BOOT_JDK_FOUND" = xno; then
27336     # Now execute the test
27337 
27338   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27339   BOOT_JDK_SUFFIX=""
27340   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27341   if test "x$ALL_JDKS_FOUND" != x; then
27342     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27343 
27344   if test "x$BOOT_JDK_FOUND" = xno; then
27345     # Now execute the test
27346 
27347         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27348         if test -d "$BOOT_JDK"; then
27349           BOOT_JDK_FOUND=maybe
27350           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27351 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27352         fi
27353 
27354 
27355     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27356     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27357       # Do we have a bin/java?
27358       if test ! -x "$BOOT_JDK/bin/java"; then
27359         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27360 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27361         BOOT_JDK_FOUND=no
27362       else
27363         # Do we have a bin/javac?
27364         if test ! -x "$BOOT_JDK/bin/javac"; then
27365           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27366 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27367           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27368 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27369           BOOT_JDK_FOUND=no
27370         else
27371           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27372           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27373 
27374           # Extra M4 quote needed to protect [] in grep expression.
27375           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27376           if test "x$FOUND_CORRECT_VERSION" = x; then
27377             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27378 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27379             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27380 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27381             BOOT_JDK_FOUND=no
27382           else
27383             # We're done! :-)
27384             BOOT_JDK_FOUND=yes
27385 
27386   # Only process if variable expands to non-empty
27387 
27388   if test "x$BOOT_JDK" != x; then
27389     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27390 
27391   # Input might be given as Windows format, start by converting to
27392   # unix format.
27393   path="$BOOT_JDK"
27394   new_path=`$CYGPATH -u "$path"`
27395 
27396   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27397   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27398   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27399   # "foo.exe" is OK but "foo" is an error.
27400   #
27401   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27402   # It is also a way to make sure we got the proper file name for the real test later on.
27403   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27404   if test "x$test_shortpath" = x; then
27405     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27406 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27407     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27408   fi
27409 
27410   # Call helper function which possibly converts this using DOS-style short mode.
27411   # If so, the updated path is stored in $new_path.
27412 
27413   input_path="$new_path"
27414   # Check if we need to convert this using DOS-style short mode. If the path
27415   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27416   # take no chances and rewrite it.
27417   # Note: m4 eats our [], so we need to use [ and ] instead.
27418   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27419   if test "x$has_forbidden_chars" != x; then
27420     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27421     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27422     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27423     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27424       # Going to short mode and back again did indeed matter. Since short mode is
27425       # case insensitive, let's make it lowercase to improve readability.
27426       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27427       # Now convert it back to Unix-style (cygpath)
27428       input_path=`$CYGPATH -u "$shortmode_path"`
27429       new_path="$input_path"
27430     fi
27431   fi
27432 
27433   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27434   if test "x$test_cygdrive_prefix" = x; then
27435     # As a simple fix, exclude /usr/bin since it's not a real path.
27436     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27437       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27438       # a path prefixed by /cygdrive for fixpath to work.
27439       new_path="$CYGWIN_ROOT_PATH$input_path"
27440     fi
27441   fi
27442 
27443 
27444   if test "x$path" != "x$new_path"; then
27445     BOOT_JDK="$new_path"
27446     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27447 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27448   fi
27449 
27450     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27451 
27452   path="$BOOT_JDK"
27453   has_colon=`$ECHO $path | $GREP ^.:`
27454   new_path="$path"
27455   if test "x$has_colon" = x; then
27456     # Not in mixed or Windows style, start by that.
27457     new_path=`cmd //c echo $path`
27458   fi
27459 
27460 
27461   input_path="$new_path"
27462   # Check if we need to convert this using DOS-style short mode. If the path
27463   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27464   # take no chances and rewrite it.
27465   # Note: m4 eats our [], so we need to use [ and ] instead.
27466   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27467   if test "x$has_forbidden_chars" != x; then
27468     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27469     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27470   fi
27471 
27472 
27473   windows_path="$new_path"
27474   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27475     unix_path=`$CYGPATH -u "$windows_path"`
27476     new_path="$unix_path"
27477   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27478     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27479     new_path="$unix_path"
27480   fi
27481 
27482   if test "x$path" != "x$new_path"; then
27483     BOOT_JDK="$new_path"
27484     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27485 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27486   fi
27487 
27488   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27489   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27490 
27491     else
27492       # We're on a unix platform. Hooray! :)
27493       path="$BOOT_JDK"
27494       has_space=`$ECHO "$path" | $GREP " "`
27495       if test "x$has_space" != x; then
27496         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27497 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27498         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27499       fi
27500 
27501       # Use eval to expand a potential ~
27502       eval path="$path"
27503       if test ! -f "$path" && test ! -d "$path"; then
27504         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27505       fi
27506 
27507       if test -d "$path"; then
27508         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27509       else
27510         dir="`$DIRNAME "$path"`"
27511         base="`$BASENAME "$path"`"
27512         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27513       fi
27514     fi
27515   fi
27516 
27517             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27518 $as_echo_n "checking for Boot JDK... " >&6; }
27519             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27520 $as_echo "$BOOT_JDK" >&6; }
27521             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27522 $as_echo_n "checking Boot JDK version... " >&6; }
27523             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27524             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27525 $as_echo "$BOOT_JDK_VERSION" >&6; }
27526           fi # end check jdk version
27527         fi # end check javac
27528       fi # end check java
27529     fi # end check boot jdk found
27530   fi
27531 
27532     done
27533   fi
27534 
27535 
27536     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27537     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27538       # Do we have a bin/java?
27539       if test ! -x "$BOOT_JDK/bin/java"; then
27540         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27541 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27542         BOOT_JDK_FOUND=no
27543       else
27544         # Do we have a bin/javac?
27545         if test ! -x "$BOOT_JDK/bin/javac"; then
27546           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27547 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27548           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27549 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27550           BOOT_JDK_FOUND=no
27551         else
27552           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27553           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27554 
27555           # Extra M4 quote needed to protect [] in grep expression.
27556           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27557           if test "x$FOUND_CORRECT_VERSION" = x; then
27558             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27559 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27560             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27561 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27562             BOOT_JDK_FOUND=no
27563           else
27564             # We're done! :-)
27565             BOOT_JDK_FOUND=yes
27566 
27567   # Only process if variable expands to non-empty
27568 
27569   if test "x$BOOT_JDK" != x; then
27570     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27571 
27572   # Input might be given as Windows format, start by converting to
27573   # unix format.
27574   path="$BOOT_JDK"
27575   new_path=`$CYGPATH -u "$path"`
27576 
27577   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27578   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27579   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27580   # "foo.exe" is OK but "foo" is an error.
27581   #
27582   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27583   # It is also a way to make sure we got the proper file name for the real test later on.
27584   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27585   if test "x$test_shortpath" = x; then
27586     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27587 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27588     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27589   fi
27590 
27591   # Call helper function which possibly converts this using DOS-style short mode.
27592   # If so, the updated path is stored in $new_path.
27593 
27594   input_path="$new_path"
27595   # Check if we need to convert this using DOS-style short mode. If the path
27596   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27597   # take no chances and rewrite it.
27598   # Note: m4 eats our [], so we need to use [ and ] instead.
27599   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27600   if test "x$has_forbidden_chars" != x; then
27601     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27602     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27603     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27604     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27605       # Going to short mode and back again did indeed matter. Since short mode is
27606       # case insensitive, let's make it lowercase to improve readability.
27607       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27608       # Now convert it back to Unix-style (cygpath)
27609       input_path=`$CYGPATH -u "$shortmode_path"`
27610       new_path="$input_path"
27611     fi
27612   fi
27613 
27614   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27615   if test "x$test_cygdrive_prefix" = x; then
27616     # As a simple fix, exclude /usr/bin since it's not a real path.
27617     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27618       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27619       # a path prefixed by /cygdrive for fixpath to work.
27620       new_path="$CYGWIN_ROOT_PATH$input_path"
27621     fi
27622   fi
27623 
27624 
27625   if test "x$path" != "x$new_path"; then
27626     BOOT_JDK="$new_path"
27627     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27628 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27629   fi
27630 
27631     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27632 
27633   path="$BOOT_JDK"
27634   has_colon=`$ECHO $path | $GREP ^.:`
27635   new_path="$path"
27636   if test "x$has_colon" = x; then
27637     # Not in mixed or Windows style, start by that.
27638     new_path=`cmd //c echo $path`
27639   fi
27640 
27641 
27642   input_path="$new_path"
27643   # Check if we need to convert this using DOS-style short mode. If the path
27644   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27645   # take no chances and rewrite it.
27646   # Note: m4 eats our [], so we need to use [ and ] instead.
27647   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27648   if test "x$has_forbidden_chars" != x; then
27649     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27650     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27651   fi
27652 
27653 
27654   windows_path="$new_path"
27655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27656     unix_path=`$CYGPATH -u "$windows_path"`
27657     new_path="$unix_path"
27658   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27659     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27660     new_path="$unix_path"
27661   fi
27662 
27663   if test "x$path" != "x$new_path"; then
27664     BOOT_JDK="$new_path"
27665     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27666 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27667   fi
27668 
27669   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27670   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27671 
27672     else
27673       # We're on a unix platform. Hooray! :)
27674       path="$BOOT_JDK"
27675       has_space=`$ECHO "$path" | $GREP " "`
27676       if test "x$has_space" != x; then
27677         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27678 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27679         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27680       fi
27681 
27682       # Use eval to expand a potential ~
27683       eval path="$path"
27684       if test ! -f "$path" && test ! -d "$path"; then
27685         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27686       fi
27687 
27688       if test -d "$path"; then
27689         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27690       else
27691         dir="`$DIRNAME "$path"`"
27692         base="`$BASENAME "$path"`"
27693         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27694       fi
27695     fi
27696   fi
27697 
27698             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27699 $as_echo_n "checking for Boot JDK... " >&6; }
27700             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27701 $as_echo "$BOOT_JDK" >&6; }
27702             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27703 $as_echo_n "checking Boot JDK version... " >&6; }
27704             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27705             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27706 $as_echo "$BOOT_JDK_VERSION" >&6; }
27707           fi # end check jdk version
27708         fi # end check javac
27709       fi # end check java
27710     fi # end check boot jdk found
27711   fi
27712 
27713   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27714 
27715   if test "x$BOOT_JDK_FOUND" = xno; then
27716     # Now execute the test
27717 
27718   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27719   BOOT_JDK_SUFFIX="/Contents/Home"
27720   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27721   if test "x$ALL_JDKS_FOUND" != x; then
27722     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27723 
27724   if test "x$BOOT_JDK_FOUND" = xno; then
27725     # Now execute the test
27726 
27727         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27728         if test -d "$BOOT_JDK"; then
27729           BOOT_JDK_FOUND=maybe
27730           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27731 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27732         fi
27733 
27734 
27735     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27736     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27737       # Do we have a bin/java?
27738       if test ! -x "$BOOT_JDK/bin/java"; then
27739         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27740 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27741         BOOT_JDK_FOUND=no
27742       else
27743         # Do we have a bin/javac?
27744         if test ! -x "$BOOT_JDK/bin/javac"; then
27745           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27746 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27747           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27748 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27749           BOOT_JDK_FOUND=no
27750         else
27751           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27752           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27753 
27754           # Extra M4 quote needed to protect [] in grep expression.
27755           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27756           if test "x$FOUND_CORRECT_VERSION" = x; then
27757             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27758 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27759             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27760 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27761             BOOT_JDK_FOUND=no
27762           else
27763             # We're done! :-)
27764             BOOT_JDK_FOUND=yes
27765 
27766   # Only process if variable expands to non-empty
27767 
27768   if test "x$BOOT_JDK" != x; then
27769     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27770 
27771   # Input might be given as Windows format, start by converting to
27772   # unix format.
27773   path="$BOOT_JDK"
27774   new_path=`$CYGPATH -u "$path"`
27775 
27776   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27777   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27778   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27779   # "foo.exe" is OK but "foo" is an error.
27780   #
27781   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27782   # It is also a way to make sure we got the proper file name for the real test later on.
27783   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27784   if test "x$test_shortpath" = x; then
27785     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27786 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27787     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27788   fi
27789 
27790   # Call helper function which possibly converts this using DOS-style short mode.
27791   # If so, the updated path is stored in $new_path.
27792 
27793   input_path="$new_path"
27794   # Check if we need to convert this using DOS-style short mode. If the path
27795   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27796   # take no chances and rewrite it.
27797   # Note: m4 eats our [], so we need to use [ and ] instead.
27798   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27799   if test "x$has_forbidden_chars" != x; then
27800     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27801     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27802     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27803     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27804       # Going to short mode and back again did indeed matter. Since short mode is
27805       # case insensitive, let's make it lowercase to improve readability.
27806       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27807       # Now convert it back to Unix-style (cygpath)
27808       input_path=`$CYGPATH -u "$shortmode_path"`
27809       new_path="$input_path"
27810     fi
27811   fi
27812 
27813   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27814   if test "x$test_cygdrive_prefix" = x; then
27815     # As a simple fix, exclude /usr/bin since it's not a real path.
27816     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27817       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27818       # a path prefixed by /cygdrive for fixpath to work.
27819       new_path="$CYGWIN_ROOT_PATH$input_path"
27820     fi
27821   fi
27822 
27823 
27824   if test "x$path" != "x$new_path"; then
27825     BOOT_JDK="$new_path"
27826     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27827 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27828   fi
27829 
27830     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27831 
27832   path="$BOOT_JDK"
27833   has_colon=`$ECHO $path | $GREP ^.:`
27834   new_path="$path"
27835   if test "x$has_colon" = x; then
27836     # Not in mixed or Windows style, start by that.
27837     new_path=`cmd //c echo $path`
27838   fi
27839 
27840 
27841   input_path="$new_path"
27842   # Check if we need to convert this using DOS-style short mode. If the path
27843   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27844   # take no chances and rewrite it.
27845   # Note: m4 eats our [], so we need to use [ and ] instead.
27846   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27847   if test "x$has_forbidden_chars" != x; then
27848     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27849     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27850   fi
27851 
27852 
27853   windows_path="$new_path"
27854   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27855     unix_path=`$CYGPATH -u "$windows_path"`
27856     new_path="$unix_path"
27857   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27858     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27859     new_path="$unix_path"
27860   fi
27861 
27862   if test "x$path" != "x$new_path"; then
27863     BOOT_JDK="$new_path"
27864     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27865 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27866   fi
27867 
27868   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27869   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27870 
27871     else
27872       # We're on a unix platform. Hooray! :)
27873       path="$BOOT_JDK"
27874       has_space=`$ECHO "$path" | $GREP " "`
27875       if test "x$has_space" != x; then
27876         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27877 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27878         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27879       fi
27880 
27881       # Use eval to expand a potential ~
27882       eval path="$path"
27883       if test ! -f "$path" && test ! -d "$path"; then
27884         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27885       fi
27886 
27887       if test -d "$path"; then
27888         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27889       else
27890         dir="`$DIRNAME "$path"`"
27891         base="`$BASENAME "$path"`"
27892         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27893       fi
27894     fi
27895   fi
27896 
27897             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27898 $as_echo_n "checking for Boot JDK... " >&6; }
27899             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27900 $as_echo "$BOOT_JDK" >&6; }
27901             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27902 $as_echo_n "checking Boot JDK version... " >&6; }
27903             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27904             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27905 $as_echo "$BOOT_JDK_VERSION" >&6; }
27906           fi # end check jdk version
27907         fi # end check javac
27908       fi # end check java
27909     fi # end check boot jdk found
27910   fi
27911 
27912     done
27913   fi
27914 
27915 
27916     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27917     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27918       # Do we have a bin/java?
27919       if test ! -x "$BOOT_JDK/bin/java"; then
27920         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27921 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27922         BOOT_JDK_FOUND=no
27923       else
27924         # Do we have a bin/javac?
27925         if test ! -x "$BOOT_JDK/bin/javac"; then
27926           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27927 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27928           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27929 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27930           BOOT_JDK_FOUND=no
27931         else
27932           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27933           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27934 
27935           # Extra M4 quote needed to protect [] in grep expression.
27936           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27937           if test "x$FOUND_CORRECT_VERSION" = x; then
27938             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27939 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27940             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27941 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27942             BOOT_JDK_FOUND=no
27943           else
27944             # We're done! :-)
27945             BOOT_JDK_FOUND=yes
27946 
27947   # Only process if variable expands to non-empty
27948 
27949   if test "x$BOOT_JDK" != x; then
27950     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27951 
27952   # Input might be given as Windows format, start by converting to
27953   # unix format.
27954   path="$BOOT_JDK"
27955   new_path=`$CYGPATH -u "$path"`
27956 
27957   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27958   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27959   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27960   # "foo.exe" is OK but "foo" is an error.
27961   #
27962   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27963   # It is also a way to make sure we got the proper file name for the real test later on.
27964   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27965   if test "x$test_shortpath" = x; then
27966     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27967 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27968     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27969   fi
27970 
27971   # Call helper function which possibly converts this using DOS-style short mode.
27972   # If so, the updated path is stored in $new_path.
27973 
27974   input_path="$new_path"
27975   # Check if we need to convert this using DOS-style short mode. If the path
27976   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27977   # take no chances and rewrite it.
27978   # Note: m4 eats our [], so we need to use [ and ] instead.
27979   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27980   if test "x$has_forbidden_chars" != x; then
27981     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27982     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27983     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27984     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27985       # Going to short mode and back again did indeed matter. Since short mode is
27986       # case insensitive, let's make it lowercase to improve readability.
27987       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27988       # Now convert it back to Unix-style (cygpath)
27989       input_path=`$CYGPATH -u "$shortmode_path"`
27990       new_path="$input_path"
27991     fi
27992   fi
27993 
27994   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27995   if test "x$test_cygdrive_prefix" = x; then
27996     # As a simple fix, exclude /usr/bin since it's not a real path.
27997     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27998       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27999       # a path prefixed by /cygdrive for fixpath to work.
28000       new_path="$CYGWIN_ROOT_PATH$input_path"
28001     fi
28002   fi
28003 
28004 
28005   if test "x$path" != "x$new_path"; then
28006     BOOT_JDK="$new_path"
28007     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28008 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28009   fi
28010 
28011     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28012 
28013   path="$BOOT_JDK"
28014   has_colon=`$ECHO $path | $GREP ^.:`
28015   new_path="$path"
28016   if test "x$has_colon" = x; then
28017     # Not in mixed or Windows style, start by that.
28018     new_path=`cmd //c echo $path`
28019   fi
28020 
28021 
28022   input_path="$new_path"
28023   # Check if we need to convert this using DOS-style short mode. If the path
28024   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28025   # take no chances and rewrite it.
28026   # Note: m4 eats our [], so we need to use [ and ] instead.
28027   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28028   if test "x$has_forbidden_chars" != x; then
28029     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28030     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28031   fi
28032 
28033 
28034   windows_path="$new_path"
28035   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28036     unix_path=`$CYGPATH -u "$windows_path"`
28037     new_path="$unix_path"
28038   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28039     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28040     new_path="$unix_path"
28041   fi
28042 
28043   if test "x$path" != "x$new_path"; then
28044     BOOT_JDK="$new_path"
28045     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28046 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28047   fi
28048 
28049   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28050   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28051 
28052     else
28053       # We're on a unix platform. Hooray! :)
28054       path="$BOOT_JDK"
28055       has_space=`$ECHO "$path" | $GREP " "`
28056       if test "x$has_space" != x; then
28057         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28058 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28059         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28060       fi
28061 
28062       # Use eval to expand a potential ~
28063       eval path="$path"
28064       if test ! -f "$path" && test ! -d "$path"; then
28065         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28066       fi
28067 
28068       if test -d "$path"; then
28069         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28070       else
28071         dir="`$DIRNAME "$path"`"
28072         base="`$BASENAME "$path"`"
28073         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28074       fi
28075     fi
28076   fi
28077 
28078             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28079 $as_echo_n "checking for Boot JDK... " >&6; }
28080             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28081 $as_echo "$BOOT_JDK" >&6; }
28082             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28083 $as_echo_n "checking Boot JDK version... " >&6; }
28084             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28085             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28086 $as_echo "$BOOT_JDK_VERSION" >&6; }
28087           fi # end check jdk version
28088         fi # end check javac
28089       fi # end check java
28090     fi # end check boot jdk found
28091   fi
28092 
28093 
28094   if test "x$BOOT_JDK_FOUND" = xno; then
28095     # Now execute the test
28096 
28097   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28098   BOOT_JDK_SUFFIX="/Contents/Home"
28099   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28100   if test "x$ALL_JDKS_FOUND" != x; then
28101     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28102 
28103   if test "x$BOOT_JDK_FOUND" = xno; then
28104     # Now execute the test
28105 
28106         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28107         if test -d "$BOOT_JDK"; then
28108           BOOT_JDK_FOUND=maybe
28109           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28110 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28111         fi
28112 
28113 
28114     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28115     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28116       # Do we have a bin/java?
28117       if test ! -x "$BOOT_JDK/bin/java"; then
28118         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28119 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28120         BOOT_JDK_FOUND=no
28121       else
28122         # Do we have a bin/javac?
28123         if test ! -x "$BOOT_JDK/bin/javac"; then
28124           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28125 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28126           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28127 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28128           BOOT_JDK_FOUND=no
28129         else
28130           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28131           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28132 
28133           # Extra M4 quote needed to protect [] in grep expression.
28134           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28135           if test "x$FOUND_CORRECT_VERSION" = x; then
28136             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28137 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28138             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28139 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28140             BOOT_JDK_FOUND=no
28141           else
28142             # We're done! :-)
28143             BOOT_JDK_FOUND=yes
28144 
28145   # Only process if variable expands to non-empty
28146 
28147   if test "x$BOOT_JDK" != x; then
28148     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28149 
28150   # Input might be given as Windows format, start by converting to
28151   # unix format.
28152   path="$BOOT_JDK"
28153   new_path=`$CYGPATH -u "$path"`
28154 
28155   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28156   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28157   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28158   # "foo.exe" is OK but "foo" is an error.
28159   #
28160   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28161   # It is also a way to make sure we got the proper file name for the real test later on.
28162   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28163   if test "x$test_shortpath" = x; then
28164     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28165 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28166     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28167   fi
28168 
28169   # Call helper function which possibly converts this using DOS-style short mode.
28170   # If so, the updated path is stored in $new_path.
28171 
28172   input_path="$new_path"
28173   # Check if we need to convert this using DOS-style short mode. If the path
28174   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28175   # take no chances and rewrite it.
28176   # Note: m4 eats our [], so we need to use [ and ] instead.
28177   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28178   if test "x$has_forbidden_chars" != x; then
28179     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28180     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28181     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28182     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28183       # Going to short mode and back again did indeed matter. Since short mode is
28184       # case insensitive, let's make it lowercase to improve readability.
28185       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28186       # Now convert it back to Unix-style (cygpath)
28187       input_path=`$CYGPATH -u "$shortmode_path"`
28188       new_path="$input_path"
28189     fi
28190   fi
28191 
28192   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28193   if test "x$test_cygdrive_prefix" = x; then
28194     # As a simple fix, exclude /usr/bin since it's not a real path.
28195     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28196       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28197       # a path prefixed by /cygdrive for fixpath to work.
28198       new_path="$CYGWIN_ROOT_PATH$input_path"
28199     fi
28200   fi
28201 
28202 
28203   if test "x$path" != "x$new_path"; then
28204     BOOT_JDK="$new_path"
28205     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28206 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28207   fi
28208 
28209     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28210 
28211   path="$BOOT_JDK"
28212   has_colon=`$ECHO $path | $GREP ^.:`
28213   new_path="$path"
28214   if test "x$has_colon" = x; then
28215     # Not in mixed or Windows style, start by that.
28216     new_path=`cmd //c echo $path`
28217   fi
28218 
28219 
28220   input_path="$new_path"
28221   # Check if we need to convert this using DOS-style short mode. If the path
28222   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28223   # take no chances and rewrite it.
28224   # Note: m4 eats our [], so we need to use [ and ] instead.
28225   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28226   if test "x$has_forbidden_chars" != x; then
28227     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28228     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28229   fi
28230 
28231 
28232   windows_path="$new_path"
28233   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28234     unix_path=`$CYGPATH -u "$windows_path"`
28235     new_path="$unix_path"
28236   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28237     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28238     new_path="$unix_path"
28239   fi
28240 
28241   if test "x$path" != "x$new_path"; then
28242     BOOT_JDK="$new_path"
28243     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28244 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28245   fi
28246 
28247   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28248   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28249 
28250     else
28251       # We're on a unix platform. Hooray! :)
28252       path="$BOOT_JDK"
28253       has_space=`$ECHO "$path" | $GREP " "`
28254       if test "x$has_space" != x; then
28255         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28256 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28257         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28258       fi
28259 
28260       # Use eval to expand a potential ~
28261       eval path="$path"
28262       if test ! -f "$path" && test ! -d "$path"; then
28263         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28264       fi
28265 
28266       if test -d "$path"; then
28267         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28268       else
28269         dir="`$DIRNAME "$path"`"
28270         base="`$BASENAME "$path"`"
28271         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28272       fi
28273     fi
28274   fi
28275 
28276             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28277 $as_echo_n "checking for Boot JDK... " >&6; }
28278             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28279 $as_echo "$BOOT_JDK" >&6; }
28280             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28281 $as_echo_n "checking Boot JDK version... " >&6; }
28282             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28283             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28284 $as_echo "$BOOT_JDK_VERSION" >&6; }
28285           fi # end check jdk version
28286         fi # end check javac
28287       fi # end check java
28288     fi # end check boot jdk found
28289   fi
28290 
28291     done
28292   fi
28293 
28294 
28295     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28296     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28297       # Do we have a bin/java?
28298       if test ! -x "$BOOT_JDK/bin/java"; then
28299         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28300 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28301         BOOT_JDK_FOUND=no
28302       else
28303         # Do we have a bin/javac?
28304         if test ! -x "$BOOT_JDK/bin/javac"; then
28305           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28306 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28307           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28308 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28309           BOOT_JDK_FOUND=no
28310         else
28311           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28312           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28313 
28314           # Extra M4 quote needed to protect [] in grep expression.
28315           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28316           if test "x$FOUND_CORRECT_VERSION" = x; then
28317             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28318 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28319             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28320 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28321             BOOT_JDK_FOUND=no
28322           else
28323             # We're done! :-)
28324             BOOT_JDK_FOUND=yes
28325 
28326   # Only process if variable expands to non-empty
28327 
28328   if test "x$BOOT_JDK" != x; then
28329     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28330 
28331   # Input might be given as Windows format, start by converting to
28332   # unix format.
28333   path="$BOOT_JDK"
28334   new_path=`$CYGPATH -u "$path"`
28335 
28336   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28337   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28338   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28339   # "foo.exe" is OK but "foo" is an error.
28340   #
28341   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28342   # It is also a way to make sure we got the proper file name for the real test later on.
28343   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28344   if test "x$test_shortpath" = x; then
28345     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28346 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28347     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28348   fi
28349 
28350   # Call helper function which possibly converts this using DOS-style short mode.
28351   # If so, the updated path is stored in $new_path.
28352 
28353   input_path="$new_path"
28354   # Check if we need to convert this using DOS-style short mode. If the path
28355   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28356   # take no chances and rewrite it.
28357   # Note: m4 eats our [], so we need to use [ and ] instead.
28358   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28359   if test "x$has_forbidden_chars" != x; then
28360     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28361     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28362     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28363     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28364       # Going to short mode and back again did indeed matter. Since short mode is
28365       # case insensitive, let's make it lowercase to improve readability.
28366       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28367       # Now convert it back to Unix-style (cygpath)
28368       input_path=`$CYGPATH -u "$shortmode_path"`
28369       new_path="$input_path"
28370     fi
28371   fi
28372 
28373   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28374   if test "x$test_cygdrive_prefix" = x; then
28375     # As a simple fix, exclude /usr/bin since it's not a real path.
28376     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28377       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28378       # a path prefixed by /cygdrive for fixpath to work.
28379       new_path="$CYGWIN_ROOT_PATH$input_path"
28380     fi
28381   fi
28382 
28383 
28384   if test "x$path" != "x$new_path"; then
28385     BOOT_JDK="$new_path"
28386     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28387 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28388   fi
28389 
28390     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28391 
28392   path="$BOOT_JDK"
28393   has_colon=`$ECHO $path | $GREP ^.:`
28394   new_path="$path"
28395   if test "x$has_colon" = x; then
28396     # Not in mixed or Windows style, start by that.
28397     new_path=`cmd //c echo $path`
28398   fi
28399 
28400 
28401   input_path="$new_path"
28402   # Check if we need to convert this using DOS-style short mode. If the path
28403   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28404   # take no chances and rewrite it.
28405   # Note: m4 eats our [], so we need to use [ and ] instead.
28406   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28407   if test "x$has_forbidden_chars" != x; then
28408     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28409     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28410   fi
28411 
28412 
28413   windows_path="$new_path"
28414   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28415     unix_path=`$CYGPATH -u "$windows_path"`
28416     new_path="$unix_path"
28417   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28418     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28419     new_path="$unix_path"
28420   fi
28421 
28422   if test "x$path" != "x$new_path"; then
28423     BOOT_JDK="$new_path"
28424     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28425 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28426   fi
28427 
28428   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28429   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28430 
28431     else
28432       # We're on a unix platform. Hooray! :)
28433       path="$BOOT_JDK"
28434       has_space=`$ECHO "$path" | $GREP " "`
28435       if test "x$has_space" != x; then
28436         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28437 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28438         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28439       fi
28440 
28441       # Use eval to expand a potential ~
28442       eval path="$path"
28443       if test ! -f "$path" && test ! -d "$path"; then
28444         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28445       fi
28446 
28447       if test -d "$path"; then
28448         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28449       else
28450         dir="`$DIRNAME "$path"`"
28451         base="`$BASENAME "$path"`"
28452         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28453       fi
28454     fi
28455   fi
28456 
28457             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28458 $as_echo_n "checking for Boot JDK... " >&6; }
28459             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28460 $as_echo "$BOOT_JDK" >&6; }
28461             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28462 $as_echo_n "checking Boot JDK version... " >&6; }
28463             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28464             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28465 $as_echo "$BOOT_JDK_VERSION" >&6; }
28466           fi # end check jdk version
28467         fi # end check javac
28468       fi # end check java
28469     fi # end check boot jdk found
28470   fi
28471 
28472   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28473 
28474   if test "x$BOOT_JDK_FOUND" = xno; then
28475     # Now execute the test
28476 
28477   BOOT_JDK_PREFIX="/usr/lib/jvm"
28478   BOOT_JDK_SUFFIX=""
28479   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28480   if test "x$ALL_JDKS_FOUND" != x; then
28481     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28482 
28483   if test "x$BOOT_JDK_FOUND" = xno; then
28484     # Now execute the test
28485 
28486         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28487         if test -d "$BOOT_JDK"; then
28488           BOOT_JDK_FOUND=maybe
28489           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28490 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28491         fi
28492 
28493 
28494     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28495     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28496       # Do we have a bin/java?
28497       if test ! -x "$BOOT_JDK/bin/java"; then
28498         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28499 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28500         BOOT_JDK_FOUND=no
28501       else
28502         # Do we have a bin/javac?
28503         if test ! -x "$BOOT_JDK/bin/javac"; then
28504           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28505 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28506           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28507 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28508           BOOT_JDK_FOUND=no
28509         else
28510           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28511           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28512 
28513           # Extra M4 quote needed to protect [] in grep expression.
28514           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28515           if test "x$FOUND_CORRECT_VERSION" = x; then
28516             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28517 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28518             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28519 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28520             BOOT_JDK_FOUND=no
28521           else
28522             # We're done! :-)
28523             BOOT_JDK_FOUND=yes
28524 
28525   # Only process if variable expands to non-empty
28526 
28527   if test "x$BOOT_JDK" != x; then
28528     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28529 
28530   # Input might be given as Windows format, start by converting to
28531   # unix format.
28532   path="$BOOT_JDK"
28533   new_path=`$CYGPATH -u "$path"`
28534 
28535   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28536   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28537   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28538   # "foo.exe" is OK but "foo" is an error.
28539   #
28540   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28541   # It is also a way to make sure we got the proper file name for the real test later on.
28542   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28543   if test "x$test_shortpath" = x; then
28544     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28545 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28546     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28547   fi
28548 
28549   # Call helper function which possibly converts this using DOS-style short mode.
28550   # If so, the updated path is stored in $new_path.
28551 
28552   input_path="$new_path"
28553   # Check if we need to convert this using DOS-style short mode. If the path
28554   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28555   # take no chances and rewrite it.
28556   # Note: m4 eats our [], so we need to use [ and ] instead.
28557   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28558   if test "x$has_forbidden_chars" != x; then
28559     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28560     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28561     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28562     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28563       # Going to short mode and back again did indeed matter. Since short mode is
28564       # case insensitive, let's make it lowercase to improve readability.
28565       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28566       # Now convert it back to Unix-style (cygpath)
28567       input_path=`$CYGPATH -u "$shortmode_path"`
28568       new_path="$input_path"
28569     fi
28570   fi
28571 
28572   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28573   if test "x$test_cygdrive_prefix" = x; then
28574     # As a simple fix, exclude /usr/bin since it's not a real path.
28575     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28576       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28577       # a path prefixed by /cygdrive for fixpath to work.
28578       new_path="$CYGWIN_ROOT_PATH$input_path"
28579     fi
28580   fi
28581 
28582 
28583   if test "x$path" != "x$new_path"; then
28584     BOOT_JDK="$new_path"
28585     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28586 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28587   fi
28588 
28589     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28590 
28591   path="$BOOT_JDK"
28592   has_colon=`$ECHO $path | $GREP ^.:`
28593   new_path="$path"
28594   if test "x$has_colon" = x; then
28595     # Not in mixed or Windows style, start by that.
28596     new_path=`cmd //c echo $path`
28597   fi
28598 
28599 
28600   input_path="$new_path"
28601   # Check if we need to convert this using DOS-style short mode. If the path
28602   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28603   # take no chances and rewrite it.
28604   # Note: m4 eats our [], so we need to use [ and ] instead.
28605   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28606   if test "x$has_forbidden_chars" != x; then
28607     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28608     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28609   fi
28610 
28611 
28612   windows_path="$new_path"
28613   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28614     unix_path=`$CYGPATH -u "$windows_path"`
28615     new_path="$unix_path"
28616   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28617     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28618     new_path="$unix_path"
28619   fi
28620 
28621   if test "x$path" != "x$new_path"; then
28622     BOOT_JDK="$new_path"
28623     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28624 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28625   fi
28626 
28627   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28628   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28629 
28630     else
28631       # We're on a unix platform. Hooray! :)
28632       path="$BOOT_JDK"
28633       has_space=`$ECHO "$path" | $GREP " "`
28634       if test "x$has_space" != x; then
28635         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28636 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28637         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28638       fi
28639 
28640       # Use eval to expand a potential ~
28641       eval path="$path"
28642       if test ! -f "$path" && test ! -d "$path"; then
28643         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28644       fi
28645 
28646       if test -d "$path"; then
28647         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28648       else
28649         dir="`$DIRNAME "$path"`"
28650         base="`$BASENAME "$path"`"
28651         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28652       fi
28653     fi
28654   fi
28655 
28656             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28657 $as_echo_n "checking for Boot JDK... " >&6; }
28658             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28659 $as_echo "$BOOT_JDK" >&6; }
28660             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28661 $as_echo_n "checking Boot JDK version... " >&6; }
28662             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28663             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28664 $as_echo "$BOOT_JDK_VERSION" >&6; }
28665           fi # end check jdk version
28666         fi # end check javac
28667       fi # end check java
28668     fi # end check boot jdk found
28669   fi
28670 
28671     done
28672   fi
28673 
28674 
28675     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28676     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28677       # Do we have a bin/java?
28678       if test ! -x "$BOOT_JDK/bin/java"; then
28679         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28680 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28681         BOOT_JDK_FOUND=no
28682       else
28683         # Do we have a bin/javac?
28684         if test ! -x "$BOOT_JDK/bin/javac"; then
28685           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28686 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28687           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28688 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28689           BOOT_JDK_FOUND=no
28690         else
28691           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28692           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28693 
28694           # Extra M4 quote needed to protect [] in grep expression.
28695           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28696           if test "x$FOUND_CORRECT_VERSION" = x; then
28697             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28698 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28699             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28700 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28701             BOOT_JDK_FOUND=no
28702           else
28703             # We're done! :-)
28704             BOOT_JDK_FOUND=yes
28705 
28706   # Only process if variable expands to non-empty
28707 
28708   if test "x$BOOT_JDK" != x; then
28709     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28710 
28711   # Input might be given as Windows format, start by converting to
28712   # unix format.
28713   path="$BOOT_JDK"
28714   new_path=`$CYGPATH -u "$path"`
28715 
28716   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28717   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28718   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28719   # "foo.exe" is OK but "foo" is an error.
28720   #
28721   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28722   # It is also a way to make sure we got the proper file name for the real test later on.
28723   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28724   if test "x$test_shortpath" = x; then
28725     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28726 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28727     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28728   fi
28729 
28730   # Call helper function which possibly converts this using DOS-style short mode.
28731   # If so, the updated path is stored in $new_path.
28732 
28733   input_path="$new_path"
28734   # Check if we need to convert this using DOS-style short mode. If the path
28735   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28736   # take no chances and rewrite it.
28737   # Note: m4 eats our [], so we need to use [ and ] instead.
28738   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28739   if test "x$has_forbidden_chars" != x; then
28740     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28741     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28742     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28743     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28744       # Going to short mode and back again did indeed matter. Since short mode is
28745       # case insensitive, let's make it lowercase to improve readability.
28746       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28747       # Now convert it back to Unix-style (cygpath)
28748       input_path=`$CYGPATH -u "$shortmode_path"`
28749       new_path="$input_path"
28750     fi
28751   fi
28752 
28753   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28754   if test "x$test_cygdrive_prefix" = x; then
28755     # As a simple fix, exclude /usr/bin since it's not a real path.
28756     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28757       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28758       # a path prefixed by /cygdrive for fixpath to work.
28759       new_path="$CYGWIN_ROOT_PATH$input_path"
28760     fi
28761   fi
28762 
28763 
28764   if test "x$path" != "x$new_path"; then
28765     BOOT_JDK="$new_path"
28766     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28767 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28768   fi
28769 
28770     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28771 
28772   path="$BOOT_JDK"
28773   has_colon=`$ECHO $path | $GREP ^.:`
28774   new_path="$path"
28775   if test "x$has_colon" = x; then
28776     # Not in mixed or Windows style, start by that.
28777     new_path=`cmd //c echo $path`
28778   fi
28779 
28780 
28781   input_path="$new_path"
28782   # Check if we need to convert this using DOS-style short mode. If the path
28783   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28784   # take no chances and rewrite it.
28785   # Note: m4 eats our [], so we need to use [ and ] instead.
28786   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28787   if test "x$has_forbidden_chars" != x; then
28788     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28789     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28790   fi
28791 
28792 
28793   windows_path="$new_path"
28794   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28795     unix_path=`$CYGPATH -u "$windows_path"`
28796     new_path="$unix_path"
28797   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28798     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28799     new_path="$unix_path"
28800   fi
28801 
28802   if test "x$path" != "x$new_path"; then
28803     BOOT_JDK="$new_path"
28804     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28805 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28806   fi
28807 
28808   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28809   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28810 
28811     else
28812       # We're on a unix platform. Hooray! :)
28813       path="$BOOT_JDK"
28814       has_space=`$ECHO "$path" | $GREP " "`
28815       if test "x$has_space" != x; then
28816         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28817 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28818         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28819       fi
28820 
28821       # Use eval to expand a potential ~
28822       eval path="$path"
28823       if test ! -f "$path" && test ! -d "$path"; then
28824         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28825       fi
28826 
28827       if test -d "$path"; then
28828         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28829       else
28830         dir="`$DIRNAME "$path"`"
28831         base="`$BASENAME "$path"`"
28832         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28833       fi
28834     fi
28835   fi
28836 
28837             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28838 $as_echo_n "checking for Boot JDK... " >&6; }
28839             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28840 $as_echo "$BOOT_JDK" >&6; }
28841             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28842 $as_echo_n "checking Boot JDK version... " >&6; }
28843             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28844             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28845 $as_echo "$BOOT_JDK_VERSION" >&6; }
28846           fi # end check jdk version
28847         fi # end check javac
28848       fi # end check java
28849     fi # end check boot jdk found
28850   fi
28851 
28852   fi
28853 
28854 
28855     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28856     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28857       # Do we have a bin/java?
28858       if test ! -x "$BOOT_JDK/bin/java"; then
28859         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28860 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28861         BOOT_JDK_FOUND=no
28862       else
28863         # Do we have a bin/javac?
28864         if test ! -x "$BOOT_JDK/bin/javac"; then
28865           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28866 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28867           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28868 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28869           BOOT_JDK_FOUND=no
28870         else
28871           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28872           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28873 
28874           # Extra M4 quote needed to protect [] in grep expression.
28875           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28876           if test "x$FOUND_CORRECT_VERSION" = x; then
28877             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28878 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28879             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28880 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28881             BOOT_JDK_FOUND=no
28882           else
28883             # We're done! :-)
28884             BOOT_JDK_FOUND=yes
28885 
28886   # Only process if variable expands to non-empty
28887 
28888   if test "x$BOOT_JDK" != x; then
28889     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28890 
28891   # Input might be given as Windows format, start by converting to
28892   # unix format.
28893   path="$BOOT_JDK"
28894   new_path=`$CYGPATH -u "$path"`
28895 
28896   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28897   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28898   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28899   # "foo.exe" is OK but "foo" is an error.
28900   #
28901   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28902   # It is also a way to make sure we got the proper file name for the real test later on.
28903   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28904   if test "x$test_shortpath" = x; then
28905     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28906 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28907     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28908   fi
28909 
28910   # Call helper function which possibly converts this using DOS-style short mode.
28911   # If so, the updated path is stored in $new_path.
28912 
28913   input_path="$new_path"
28914   # Check if we need to convert this using DOS-style short mode. If the path
28915   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28916   # take no chances and rewrite it.
28917   # Note: m4 eats our [], so we need to use [ and ] instead.
28918   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28919   if test "x$has_forbidden_chars" != x; then
28920     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28921     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28922     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28923     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28924       # Going to short mode and back again did indeed matter. Since short mode is
28925       # case insensitive, let's make it lowercase to improve readability.
28926       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28927       # Now convert it back to Unix-style (cygpath)
28928       input_path=`$CYGPATH -u "$shortmode_path"`
28929       new_path="$input_path"
28930     fi
28931   fi
28932 
28933   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28934   if test "x$test_cygdrive_prefix" = x; then
28935     # As a simple fix, exclude /usr/bin since it's not a real path.
28936     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28937       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28938       # a path prefixed by /cygdrive for fixpath to work.
28939       new_path="$CYGWIN_ROOT_PATH$input_path"
28940     fi
28941   fi
28942 
28943 
28944   if test "x$path" != "x$new_path"; then
28945     BOOT_JDK="$new_path"
28946     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28947 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28948   fi
28949 
28950     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28951 
28952   path="$BOOT_JDK"
28953   has_colon=`$ECHO $path | $GREP ^.:`
28954   new_path="$path"
28955   if test "x$has_colon" = x; then
28956     # Not in mixed or Windows style, start by that.
28957     new_path=`cmd //c echo $path`
28958   fi
28959 
28960 
28961   input_path="$new_path"
28962   # Check if we need to convert this using DOS-style short mode. If the path
28963   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28964   # take no chances and rewrite it.
28965   # Note: m4 eats our [], so we need to use [ and ] instead.
28966   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28967   if test "x$has_forbidden_chars" != x; then
28968     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28969     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28970   fi
28971 
28972 
28973   windows_path="$new_path"
28974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28975     unix_path=`$CYGPATH -u "$windows_path"`
28976     new_path="$unix_path"
28977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28979     new_path="$unix_path"
28980   fi
28981 
28982   if test "x$path" != "x$new_path"; then
28983     BOOT_JDK="$new_path"
28984     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28985 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28986   fi
28987 
28988   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28989   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28990 
28991     else
28992       # We're on a unix platform. Hooray! :)
28993       path="$BOOT_JDK"
28994       has_space=`$ECHO "$path" | $GREP " "`
28995       if test "x$has_space" != x; then
28996         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28997 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28998         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28999       fi
29000 
29001       # Use eval to expand a potential ~
29002       eval path="$path"
29003       if test ! -f "$path" && test ! -d "$path"; then
29004         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29005       fi
29006 
29007       if test -d "$path"; then
29008         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29009       else
29010         dir="`$DIRNAME "$path"`"
29011         base="`$BASENAME "$path"`"
29012         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29013       fi
29014     fi
29015   fi
29016 
29017             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29018 $as_echo_n "checking for Boot JDK... " >&6; }
29019             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29020 $as_echo "$BOOT_JDK" >&6; }
29021             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29022 $as_echo_n "checking Boot JDK version... " >&6; }
29023             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29024             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29025 $as_echo "$BOOT_JDK_VERSION" >&6; }
29026           fi # end check jdk version
29027         fi # end check javac
29028       fi # end check java
29029     fi # end check boot jdk found
29030   fi
29031 
29032 
29033   # If we haven't found anything yet, we've truly lost. Give up.
29034   if test "x$BOOT_JDK_FOUND" = xno; then
29035 
29036   # Print a helpful message on how to acquire the necessary build dependency.
29037   # openjdk is the help tag: freetype, cups, alsa etc
29038   MISSING_DEPENDENCY=openjdk
29039 
29040   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29041     cygwin_help $MISSING_DEPENDENCY
29042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29043     msys_help $MISSING_DEPENDENCY
29044   else
29045     PKGHANDLER_COMMAND=
29046 
29047     case $PKGHANDLER in
29048       apt-get)
29049         apt_help     $MISSING_DEPENDENCY ;;
29050       yum)
29051         yum_help     $MISSING_DEPENDENCY ;;
29052       port)
29053         port_help    $MISSING_DEPENDENCY ;;
29054       pkgutil)
29055         pkgutil_help $MISSING_DEPENDENCY ;;
29056       pkgadd)
29057         pkgadd_help  $MISSING_DEPENDENCY ;;
29058     esac
29059 
29060     if test "x$PKGHANDLER_COMMAND" != x; then
29061       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29062     fi
29063   fi
29064 
29065     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29066 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29067     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29068 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29069     as_fn_error $? "Cannot continue" "$LINENO" 5
29070   fi
29071 
29072 
29073 
29074   # Setup tools from the Boot JDK.
29075 
29076   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29077 
29078   # Publish this variable in the help.
29079 
29080 
29081   if [ -z "${JAVA+x}" ]; then
29082     # The variable is not set by user, try to locate tool using the code snippet
29083 
29084       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29085 $as_echo_n "checking for java in Boot JDK... " >&6; }
29086       JAVA=$BOOT_JDK/bin/java
29087       if test ! -x $JAVA; then
29088         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29089 $as_echo "not found" >&6; }
29090         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29091 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29092         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29093       fi
29094       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29095 $as_echo "ok" >&6; }
29096 
29097 
29098   else
29099     # The variable is set, but is it from the command line or the environment?
29100 
29101     # Try to remove the string !JAVA! from our list.
29102     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29103     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29104       # If it failed, the variable was not from the command line. Ignore it,
29105       # but warn the user (except for BASH, which is always set by the calling BASH).
29106       if test "xJAVA" != xBASH; then
29107         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29108 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29109       fi
29110       # Try to locate tool using the code snippet
29111 
29112       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29113 $as_echo_n "checking for java in Boot JDK... " >&6; }
29114       JAVA=$BOOT_JDK/bin/java
29115       if test ! -x $JAVA; then
29116         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29117 $as_echo "not found" >&6; }
29118         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29119 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29120         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29121       fi
29122       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29123 $as_echo "ok" >&6; }
29124 
29125 
29126     else
29127       # If it succeeded, then it was overridden by the user. We will use it
29128       # for the tool.
29129 
29130       # First remove it from the list of overridden variables, so we can test
29131       # for unknown variables in the end.
29132       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29133 
29134       # Check if we try to supply an empty value
29135       if test "x$JAVA" = x; then
29136         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29137 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29138         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29139 $as_echo_n "checking for JAVA... " >&6; }
29140         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29141 $as_echo "disabled" >&6; }
29142       else
29143         # Check if the provided tool contains a complete path.
29144         tool_specified="$JAVA"
29145         tool_basename="${tool_specified##*/}"
29146         if test "x$tool_basename" = "x$tool_specified"; then
29147           # A command without a complete path is provided, search $PATH.
29148           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29149 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29150           # Extract the first word of "$tool_basename", so it can be a program name with args.
29151 set dummy $tool_basename; ac_word=$2
29152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29153 $as_echo_n "checking for $ac_word... " >&6; }
29154 if ${ac_cv_path_JAVA+:} false; then :
29155   $as_echo_n "(cached) " >&6
29156 else
29157   case $JAVA in
29158   [\\/]* | ?:[\\/]*)
29159   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29160   ;;
29161   *)
29162   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29163 for as_dir in $PATH
29164 do
29165   IFS=$as_save_IFS
29166   test -z "$as_dir" && as_dir=.
29167     for ac_exec_ext in '' $ac_executable_extensions; do
29168   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29169     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29170     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29171     break 2
29172   fi
29173 done
29174   done
29175 IFS=$as_save_IFS
29176 
29177   ;;
29178 esac
29179 fi
29180 JAVA=$ac_cv_path_JAVA
29181 if test -n "$JAVA"; then
29182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29183 $as_echo "$JAVA" >&6; }
29184 else
29185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29186 $as_echo "no" >&6; }
29187 fi
29188 
29189 
29190           if test "x$JAVA" = x; then
29191             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29192           fi
29193         else
29194           # Otherwise we believe it is a complete path. Use it as it is.
29195           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29196 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29197           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29198 $as_echo_n "checking for JAVA... " >&6; }
29199           if test ! -x "$tool_specified"; then
29200             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29201 $as_echo "not found" >&6; }
29202             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29203           fi
29204           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29205 $as_echo "$tool_specified" >&6; }
29206         fi
29207       fi
29208     fi
29209 
29210   fi
29211 
29212 
29213 
29214   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29215 
29216   # Publish this variable in the help.
29217 
29218 
29219   if [ -z "${JAVAC+x}" ]; then
29220     # The variable is not set by user, try to locate tool using the code snippet
29221 
29222       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29223 $as_echo_n "checking for javac in Boot JDK... " >&6; }
29224       JAVAC=$BOOT_JDK/bin/javac
29225       if test ! -x $JAVAC; then
29226         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29227 $as_echo "not found" >&6; }
29228         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29229 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29230         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29231       fi
29232       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29233 $as_echo "ok" >&6; }
29234 
29235 
29236   else
29237     # The variable is set, but is it from the command line or the environment?
29238 
29239     # Try to remove the string !JAVAC! from our list.
29240     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29241     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29242       # If it failed, the variable was not from the command line. Ignore it,
29243       # but warn the user (except for BASH, which is always set by the calling BASH).
29244       if test "xJAVAC" != xBASH; then
29245         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29246 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29247       fi
29248       # Try to locate tool using the code snippet
29249 
29250       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29251 $as_echo_n "checking for javac in Boot JDK... " >&6; }
29252       JAVAC=$BOOT_JDK/bin/javac
29253       if test ! -x $JAVAC; then
29254         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29255 $as_echo "not found" >&6; }
29256         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29257 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29258         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29259       fi
29260       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29261 $as_echo "ok" >&6; }
29262 
29263 
29264     else
29265       # If it succeeded, then it was overridden by the user. We will use it
29266       # for the tool.
29267 
29268       # First remove it from the list of overridden variables, so we can test
29269       # for unknown variables in the end.
29270       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29271 
29272       # Check if we try to supply an empty value
29273       if test "x$JAVAC" = x; then
29274         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29275 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29276         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29277 $as_echo_n "checking for JAVAC... " >&6; }
29278         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29279 $as_echo "disabled" >&6; }
29280       else
29281         # Check if the provided tool contains a complete path.
29282         tool_specified="$JAVAC"
29283         tool_basename="${tool_specified##*/}"
29284         if test "x$tool_basename" = "x$tool_specified"; then
29285           # A command without a complete path is provided, search $PATH.
29286           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29287 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29288           # Extract the first word of "$tool_basename", so it can be a program name with args.
29289 set dummy $tool_basename; ac_word=$2
29290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29291 $as_echo_n "checking for $ac_word... " >&6; }
29292 if ${ac_cv_path_JAVAC+:} false; then :
29293   $as_echo_n "(cached) " >&6
29294 else
29295   case $JAVAC in
29296   [\\/]* | ?:[\\/]*)
29297   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29298   ;;
29299   *)
29300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29301 for as_dir in $PATH
29302 do
29303   IFS=$as_save_IFS
29304   test -z "$as_dir" && as_dir=.
29305     for ac_exec_ext in '' $ac_executable_extensions; do
29306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29307     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29309     break 2
29310   fi
29311 done
29312   done
29313 IFS=$as_save_IFS
29314 
29315   ;;
29316 esac
29317 fi
29318 JAVAC=$ac_cv_path_JAVAC
29319 if test -n "$JAVAC"; then
29320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29321 $as_echo "$JAVAC" >&6; }
29322 else
29323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29324 $as_echo "no" >&6; }
29325 fi
29326 
29327 
29328           if test "x$JAVAC" = x; then
29329             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29330           fi
29331         else
29332           # Otherwise we believe it is a complete path. Use it as it is.
29333           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29334 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29335           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29336 $as_echo_n "checking for JAVAC... " >&6; }
29337           if test ! -x "$tool_specified"; then
29338             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29339 $as_echo "not found" >&6; }
29340             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29341           fi
29342           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29343 $as_echo "$tool_specified" >&6; }
29344         fi
29345       fi
29346     fi
29347 
29348   fi
29349 
29350 
29351 
29352   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29353 
29354   # Publish this variable in the help.
29355 
29356 
29357   if [ -z "${JAVAH+x}" ]; then
29358     # The variable is not set by user, try to locate tool using the code snippet
29359 
29360       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29361 $as_echo_n "checking for javah in Boot JDK... " >&6; }
29362       JAVAH=$BOOT_JDK/bin/javah
29363       if test ! -x $JAVAH; then
29364         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29365 $as_echo "not found" >&6; }
29366         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29367 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29368         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29369       fi
29370       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29371 $as_echo "ok" >&6; }
29372 
29373 
29374   else
29375     # The variable is set, but is it from the command line or the environment?
29376 
29377     # Try to remove the string !JAVAH! from our list.
29378     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29379     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29380       # If it failed, the variable was not from the command line. Ignore it,
29381       # but warn the user (except for BASH, which is always set by the calling BASH).
29382       if test "xJAVAH" != xBASH; then
29383         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29384 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29385       fi
29386       # Try to locate tool using the code snippet
29387 
29388       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29389 $as_echo_n "checking for javah in Boot JDK... " >&6; }
29390       JAVAH=$BOOT_JDK/bin/javah
29391       if test ! -x $JAVAH; then
29392         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29393 $as_echo "not found" >&6; }
29394         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29395 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29396         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29397       fi
29398       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29399 $as_echo "ok" >&6; }
29400 
29401 
29402     else
29403       # If it succeeded, then it was overridden by the user. We will use it
29404       # for the tool.
29405 
29406       # First remove it from the list of overridden variables, so we can test
29407       # for unknown variables in the end.
29408       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29409 
29410       # Check if we try to supply an empty value
29411       if test "x$JAVAH" = x; then
29412         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29413 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29414         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29415 $as_echo_n "checking for JAVAH... " >&6; }
29416         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29417 $as_echo "disabled" >&6; }
29418       else
29419         # Check if the provided tool contains a complete path.
29420         tool_specified="$JAVAH"
29421         tool_basename="${tool_specified##*/}"
29422         if test "x$tool_basename" = "x$tool_specified"; then
29423           # A command without a complete path is provided, search $PATH.
29424           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29425 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29426           # Extract the first word of "$tool_basename", so it can be a program name with args.
29427 set dummy $tool_basename; ac_word=$2
29428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29429 $as_echo_n "checking for $ac_word... " >&6; }
29430 if ${ac_cv_path_JAVAH+:} false; then :
29431   $as_echo_n "(cached) " >&6
29432 else
29433   case $JAVAH in
29434   [\\/]* | ?:[\\/]*)
29435   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29436   ;;
29437   *)
29438   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29439 for as_dir in $PATH
29440 do
29441   IFS=$as_save_IFS
29442   test -z "$as_dir" && as_dir=.
29443     for ac_exec_ext in '' $ac_executable_extensions; do
29444   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29445     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29446     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29447     break 2
29448   fi
29449 done
29450   done
29451 IFS=$as_save_IFS
29452 
29453   ;;
29454 esac
29455 fi
29456 JAVAH=$ac_cv_path_JAVAH
29457 if test -n "$JAVAH"; then
29458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29459 $as_echo "$JAVAH" >&6; }
29460 else
29461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29462 $as_echo "no" >&6; }
29463 fi
29464 
29465 
29466           if test "x$JAVAH" = x; then
29467             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29468           fi
29469         else
29470           # Otherwise we believe it is a complete path. Use it as it is.
29471           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29472 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29473           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29474 $as_echo_n "checking for JAVAH... " >&6; }
29475           if test ! -x "$tool_specified"; then
29476             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29477 $as_echo "not found" >&6; }
29478             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29479           fi
29480           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29481 $as_echo "$tool_specified" >&6; }
29482         fi
29483       fi
29484     fi
29485 
29486   fi
29487 
29488 
29489 
29490   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29491 
29492   # Publish this variable in the help.
29493 
29494 
29495   if [ -z "${JAR+x}" ]; then
29496     # The variable is not set by user, try to locate tool using the code snippet
29497 
29498       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29499 $as_echo_n "checking for jar in Boot JDK... " >&6; }
29500       JAR=$BOOT_JDK/bin/jar
29501       if test ! -x $JAR; then
29502         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29503 $as_echo "not found" >&6; }
29504         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29505 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29506         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29507       fi
29508       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29509 $as_echo "ok" >&6; }
29510 
29511 
29512   else
29513     # The variable is set, but is it from the command line or the environment?
29514 
29515     # Try to remove the string !JAR! from our list.
29516     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29517     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29518       # If it failed, the variable was not from the command line. Ignore it,
29519       # but warn the user (except for BASH, which is always set by the calling BASH).
29520       if test "xJAR" != xBASH; then
29521         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29522 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29523       fi
29524       # Try to locate tool using the code snippet
29525 
29526       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29527 $as_echo_n "checking for jar in Boot JDK... " >&6; }
29528       JAR=$BOOT_JDK/bin/jar
29529       if test ! -x $JAR; then
29530         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29531 $as_echo "not found" >&6; }
29532         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29533 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29534         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29535       fi
29536       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29537 $as_echo "ok" >&6; }
29538 
29539 
29540     else
29541       # If it succeeded, then it was overridden by the user. We will use it
29542       # for the tool.
29543 
29544       # First remove it from the list of overridden variables, so we can test
29545       # for unknown variables in the end.
29546       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29547 
29548       # Check if we try to supply an empty value
29549       if test "x$JAR" = x; then
29550         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29551 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29552         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29553 $as_echo_n "checking for JAR... " >&6; }
29554         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29555 $as_echo "disabled" >&6; }
29556       else
29557         # Check if the provided tool contains a complete path.
29558         tool_specified="$JAR"
29559         tool_basename="${tool_specified##*/}"
29560         if test "x$tool_basename" = "x$tool_specified"; then
29561           # A command without a complete path is provided, search $PATH.
29562           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29563 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29564           # Extract the first word of "$tool_basename", so it can be a program name with args.
29565 set dummy $tool_basename; ac_word=$2
29566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29567 $as_echo_n "checking for $ac_word... " >&6; }
29568 if ${ac_cv_path_JAR+:} false; then :
29569   $as_echo_n "(cached) " >&6
29570 else
29571   case $JAR in
29572   [\\/]* | ?:[\\/]*)
29573   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29574   ;;
29575   *)
29576   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29577 for as_dir in $PATH
29578 do
29579   IFS=$as_save_IFS
29580   test -z "$as_dir" && as_dir=.
29581     for ac_exec_ext in '' $ac_executable_extensions; do
29582   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29583     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29585     break 2
29586   fi
29587 done
29588   done
29589 IFS=$as_save_IFS
29590 
29591   ;;
29592 esac
29593 fi
29594 JAR=$ac_cv_path_JAR
29595 if test -n "$JAR"; then
29596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29597 $as_echo "$JAR" >&6; }
29598 else
29599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29600 $as_echo "no" >&6; }
29601 fi
29602 
29603 
29604           if test "x$JAR" = x; then
29605             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29606           fi
29607         else
29608           # Otherwise we believe it is a complete path. Use it as it is.
29609           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29610 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29611           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29612 $as_echo_n "checking for JAR... " >&6; }
29613           if test ! -x "$tool_specified"; then
29614             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29615 $as_echo "not found" >&6; }
29616             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29617           fi
29618           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29619 $as_echo "$tool_specified" >&6; }
29620         fi
29621       fi
29622     fi
29623 
29624   fi
29625 
29626 
29627 
29628   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29629 
29630   # Publish this variable in the help.
29631 
29632 
29633   if [ -z "${JARSIGNER+x}" ]; then
29634     # The variable is not set by user, try to locate tool using the code snippet
29635 
29636       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29637 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29638       JARSIGNER=$BOOT_JDK/bin/jarsigner
29639       if test ! -x $JARSIGNER; then
29640         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29641 $as_echo "not found" >&6; }
29642         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29643 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29644         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29645       fi
29646       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29647 $as_echo "ok" >&6; }
29648 
29649 
29650   else
29651     # The variable is set, but is it from the command line or the environment?
29652 
29653     # Try to remove the string !JARSIGNER! from our list.
29654     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29655     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29656       # If it failed, the variable was not from the command line. Ignore it,
29657       # but warn the user (except for BASH, which is always set by the calling BASH).
29658       if test "xJARSIGNER" != xBASH; then
29659         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29660 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29661       fi
29662       # Try to locate tool using the code snippet
29663 
29664       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29665 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29666       JARSIGNER=$BOOT_JDK/bin/jarsigner
29667       if test ! -x $JARSIGNER; then
29668         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29669 $as_echo "not found" >&6; }
29670         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29671 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29672         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29673       fi
29674       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29675 $as_echo "ok" >&6; }
29676 
29677 
29678     else
29679       # If it succeeded, then it was overridden by the user. We will use it
29680       # for the tool.
29681 
29682       # First remove it from the list of overridden variables, so we can test
29683       # for unknown variables in the end.
29684       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29685 
29686       # Check if we try to supply an empty value
29687       if test "x$JARSIGNER" = x; then
29688         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29689 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29690         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29691 $as_echo_n "checking for JARSIGNER... " >&6; }
29692         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29693 $as_echo "disabled" >&6; }
29694       else
29695         # Check if the provided tool contains a complete path.
29696         tool_specified="$JARSIGNER"
29697         tool_basename="${tool_specified##*/}"
29698         if test "x$tool_basename" = "x$tool_specified"; then
29699           # A command without a complete path is provided, search $PATH.
29700           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29701 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29702           # Extract the first word of "$tool_basename", so it can be a program name with args.
29703 set dummy $tool_basename; ac_word=$2
29704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29705 $as_echo_n "checking for $ac_word... " >&6; }
29706 if ${ac_cv_path_JARSIGNER+:} false; then :
29707   $as_echo_n "(cached) " >&6
29708 else
29709   case $JARSIGNER in
29710   [\\/]* | ?:[\\/]*)
29711   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29712   ;;
29713   *)
29714   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29715 for as_dir in $PATH
29716 do
29717   IFS=$as_save_IFS
29718   test -z "$as_dir" && as_dir=.
29719     for ac_exec_ext in '' $ac_executable_extensions; do
29720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29721     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29723     break 2
29724   fi
29725 done
29726   done
29727 IFS=$as_save_IFS
29728 
29729   ;;
29730 esac
29731 fi
29732 JARSIGNER=$ac_cv_path_JARSIGNER
29733 if test -n "$JARSIGNER"; then
29734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29735 $as_echo "$JARSIGNER" >&6; }
29736 else
29737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29738 $as_echo "no" >&6; }
29739 fi
29740 
29741 
29742           if test "x$JARSIGNER" = x; then
29743             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29744           fi
29745         else
29746           # Otherwise we believe it is a complete path. Use it as it is.
29747           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29748 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29749           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29750 $as_echo_n "checking for JARSIGNER... " >&6; }
29751           if test ! -x "$tool_specified"; then
29752             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29753 $as_echo "not found" >&6; }
29754             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29755           fi
29756           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29757 $as_echo "$tool_specified" >&6; }
29758         fi
29759       fi
29760     fi
29761 
29762   fi
29763 
29764 
29765 
29766   # Finally, set some other options...
29767 
29768   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29769   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29770 
29771 
29772 
29773   $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
29774   $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
29775   OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
29776   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
29777   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
29778   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
29779     dummy="$dummy -Xpatch:foo=bar"
29780     JVM_ARG_OK=true
29781   else
29782     $ECHO "Arg failed:" >&5
29783     $ECHO "$OUTPUT" >&5
29784     JVM_ARG_OK=false
29785   fi
29786 
29787   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
29788 $as_echo_n "checking if Boot JDK supports modules... " >&6; }
29789   if test "x$JVM_ARG_OK" = "xtrue"; then
29790     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29791 $as_echo "yes" >&6; }
29792     BOOT_JDK_MODULAR="true"
29793   else
29794     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29795 $as_echo "no" >&6; }
29796     BOOT_JDK_MODULAR="false"
29797   fi
29798 
29799 
29800 
29801 
29802   # Check if the boot jdk is 32 or 64 bit
29803   if "$JAVA" -d64 -version > /dev/null 2>&1; then
29804     BOOT_JDK_BITS="64"
29805   else
29806     BOOT_JDK_BITS="32"
29807   fi
29808   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29809 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29811 $as_echo "$BOOT_JDK_BITS" >&6; }
29812 
29813 
29814 
29815 
29816 # Check whether --with-build-jdk was given.
29817 if test "${with_build_jdk+set}" = set; then :
29818   withval=$with_build_jdk;
29819 fi
29820 
29821 
29822   CREATE_BUILDJDK_FOR_HOST=false
29823   BUILD_JDK_FOUND="no"
29824   if test "x$with_build_jdk" != "x"; then
29825 
29826   if test "x$BUILD_JDK_FOUND" = xno; then
29827     # Execute the test
29828 
29829        if test "x$with_build_jdk" != x; then
29830          BUILD_JDK=$with_build_jdk
29831          BUILD_JDK_FOUND=maybe
29832          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
29833 $as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
29834        fi
29835 
29836     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29837     if test "x$BUILD_JDK_FOUND" = xmaybe; then
29838       # Do we have a bin/java?
29839       if test ! -x "$BUILD_JDK/bin/java"; then
29840         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
29841 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
29842         BUILD_JDK_FOUND=no
29843       elif test ! -x "$BUILD_JDK/bin/jlink"; then
29844         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
29845 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
29846         BUILD_JDK_FOUND=no
29847       elif test ! -x "$BUILD_JDK/bin/javac"; then
29848         # Do we have a bin/javac?
29849         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
29850 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
29851         { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
29852 $as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
29853         BUILD_JDK_FOUND=no
29854       else
29855         # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29856         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
29857 
29858         # Extra M4 quote needed to protect [] in grep expression.
29859         FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
29860         if test "x$FOUND_CORRECT_VERSION" = x; then
29861           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
29862 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
29863           { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
29864 $as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
29865           BUILD_JDK_FOUND=no
29866         else
29867           # We're done!
29868           BUILD_JDK_FOUND=yes
29869 
29870   # Only process if variable expands to non-empty
29871 
29872   if test "x$BUILD_JDK" != x; then
29873     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29874 
29875   # Input might be given as Windows format, start by converting to
29876   # unix format.
29877   path="$BUILD_JDK"
29878   new_path=`$CYGPATH -u "$path"`
29879 
29880   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29881   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29882   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29883   # "foo.exe" is OK but "foo" is an error.
29884   #
29885   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29886   # It is also a way to make sure we got the proper file name for the real test later on.
29887   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29888   if test "x$test_shortpath" = x; then
29889     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
29890 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
29891     as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
29892   fi
29893 
29894   # Call helper function which possibly converts this using DOS-style short mode.
29895   # If so, the updated path is stored in $new_path.
29896 
29897   input_path="$new_path"
29898   # Check if we need to convert this using DOS-style short mode. If the path
29899   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29900   # take no chances and rewrite it.
29901   # Note: m4 eats our [], so we need to use [ and ] instead.
29902   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29903   if test "x$has_forbidden_chars" != x; then
29904     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29905     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29906     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29907     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29908       # Going to short mode and back again did indeed matter. Since short mode is
29909       # case insensitive, let's make it lowercase to improve readability.
29910       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29911       # Now convert it back to Unix-style (cygpath)
29912       input_path=`$CYGPATH -u "$shortmode_path"`
29913       new_path="$input_path"
29914     fi
29915   fi
29916 
29917   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29918   if test "x$test_cygdrive_prefix" = x; then
29919     # As a simple fix, exclude /usr/bin since it's not a real path.
29920     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29921       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29922       # a path prefixed by /cygdrive for fixpath to work.
29923       new_path="$CYGWIN_ROOT_PATH$input_path"
29924     fi
29925   fi
29926 
29927 
29928   if test "x$path" != "x$new_path"; then
29929     BUILD_JDK="$new_path"
29930     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
29931 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
29932   fi
29933 
29934     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29935 
29936   path="$BUILD_JDK"
29937   has_colon=`$ECHO $path | $GREP ^.:`
29938   new_path="$path"
29939   if test "x$has_colon" = x; then
29940     # Not in mixed or Windows style, start by that.
29941     new_path=`cmd //c echo $path`
29942   fi
29943 
29944 
29945   input_path="$new_path"
29946   # Check if we need to convert this using DOS-style short mode. If the path
29947   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29948   # take no chances and rewrite it.
29949   # Note: m4 eats our [], so we need to use [ and ] instead.
29950   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29951   if test "x$has_forbidden_chars" != x; then
29952     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29953     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29954   fi
29955 
29956 
29957   windows_path="$new_path"
29958   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29959     unix_path=`$CYGPATH -u "$windows_path"`
29960     new_path="$unix_path"
29961   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29962     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29963     new_path="$unix_path"
29964   fi
29965 
29966   if test "x$path" != "x$new_path"; then
29967     BUILD_JDK="$new_path"
29968     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
29969 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
29970   fi
29971 
29972   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29973   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29974 
29975     else
29976       # We're on a unix platform. Hooray! :)
29977       path="$BUILD_JDK"
29978       has_space=`$ECHO "$path" | $GREP " "`
29979       if test "x$has_space" != x; then
29980         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
29981 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
29982         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29983       fi
29984 
29985       # Use eval to expand a potential ~
29986       eval path="$path"
29987       if test ! -f "$path" && test ! -d "$path"; then
29988         as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29989       fi
29990 
29991       if test -d "$path"; then
29992         BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
29993       else
29994         dir="`$DIRNAME "$path"`"
29995         base="`$BASENAME "$path"`"
29996         BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29997       fi
29998     fi
29999   fi
30000 
30001           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30002 $as_echo_n "checking for Build JDK... " >&6; }
30003           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30004 $as_echo "$BUILD_JDK" >&6; }
30005           { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30006 $as_echo_n "checking Build JDK version... " >&6; }
30007           BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30008           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30009 $as_echo "$BUILD_JDK_VERSION" >&6; }
30010         fi # end check jdk version
30011       fi # end check java
30012     fi # end check build jdk found
30013   fi
30014 
30015   else
30016     if test "x$COMPILE_TYPE" = "xcross"; then
30017       BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30018       BUILD_JDK_FOUND=yes
30019       CREATE_BUILDJDK=true
30020       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30021 $as_echo_n "checking for Build JDK... " >&6; }
30022       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30023 $as_echo "yes, will build it for the host platform" >&6; }
30024     else
30025       BUILD_JDK="\$(JDK_OUTPUTDIR)"
30026       BUILD_JDK_FOUND=yes
30027       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30028 $as_echo_n "checking for Build JDK... " >&6; }
30029       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30030 $as_echo "yes, will use output dir" >&6; }
30031     fi
30032   fi
30033 
30034   if test "x$BUILD_JDK_FOUND" != "xyes"; then
30035     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30036 $as_echo_n "checking for Build JDK... " >&6; }
30037     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30038 $as_echo "no" >&6; }
30039     as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30040   fi
30041 
30042 
30043 
30044 
30045 
30046 ###############################################################################
30047 #
30048 # Configure the sources to use. We can add or override individual directories.
30049 #
30050 ###############################################################################
30051 
30052 
30053   # Where are the sources.
30054   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30055   CORBA_TOPDIR="$SRC_ROOT/corba"
30056   JAXP_TOPDIR="$SRC_ROOT/jaxp"
30057   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30058   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30059   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30060   JDK_TOPDIR="$SRC_ROOT/jdk"
30061 
30062 
30063 
30064 
30065 
30066 
30067 
30068 
30069 
30070   # This feature is no longer supported.
30071 
30072 
30073 
30074 # Check whether --with-add-source-root was given.
30075 if test "${with_add_source_root+set}" = set; then :
30076   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
30077 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30078 fi
30079 
30080 
30081 
30082 
30083 # Check whether --with-override-source-root was given.
30084 if test "${with_override_source_root+set}" = set; then :
30085   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
30086 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30087 fi
30088 
30089 
30090 
30091 
30092 # Check whether --with-adds-and-overrides was given.
30093 if test "${with_adds_and_overrides+set}" = set; then :
30094   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
30095 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30096 fi
30097 
30098 
30099 
30100 
30101 # Check whether --with-override-langtools was given.
30102 if test "${with_override_langtools+set}" = set; then :
30103   withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30104 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30105 fi
30106 
30107 
30108 
30109 
30110 # Check whether --with-override-corba was given.
30111 if test "${with_override_corba+set}" = set; then :
30112   withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30113 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30114 fi
30115 
30116 
30117 
30118 
30119 # Check whether --with-override-jaxp was given.
30120 if test "${with_override_jaxp+set}" = set; then :
30121   withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30122 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30123 fi
30124 
30125 
30126 
30127 
30128 # Check whether --with-override-jaxws was given.
30129 if test "${with_override_jaxws+set}" = set; then :
30130   withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30131 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30132 fi
30133 
30134 
30135 
30136 
30137 # Check whether --with-override-hotspot was given.
30138 if test "${with_override_hotspot+set}" = set; then :
30139   withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30140 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30141 fi
30142 
30143 
30144 
30145 
30146 # Check whether --with-override-nashorn was given.
30147 if test "${with_override_nashorn+set}" = set; then :
30148   withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30149 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30150 fi
30151 
30152 
30153 
30154 
30155 # Check whether --with-override-jdk was given.
30156 if test "${with_override_jdk+set}" = set; then :
30157   withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30158 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30159 fi
30160 
30161 
30162 
30163 
30164   BUILD_OUTPUT="$OUTPUT_ROOT"
30165 
30166 
30167   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30168   BUILD_HOTSPOT=true
30169 
30170 
30171 
30172 # Check whether --with-import-hotspot was given.
30173 if test "${with_import_hotspot+set}" = set; then :
30174   withval=$with_import_hotspot;
30175 fi
30176 
30177   if test "x$with_import_hotspot" != x; then
30178     CURDIR="$PWD"
30179     cd "$with_import_hotspot"
30180     HOTSPOT_DIST="`pwd`"
30181     cd "$CURDIR"
30182     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
30183       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
30184     fi
30185     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
30186 $as_echo_n "checking if hotspot should be imported... " >&6; }
30187     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
30188 $as_echo "yes from $HOTSPOT_DIST" >&6; }
30189     BUILD_HOTSPOT=false
30190   fi
30191 
30192   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
30193 
30194 
30195 
30196 
30197 # Check whether --with-import-modules was given.
30198 if test "${with_import_modules+set}" = set; then :
30199   withval=$with_import_modules;
30200 fi
30201 
30202 
30203   if test "x$with_import_modules" != x \
30204       && test "x$with_import_modules" != "xno"; then
30205     if test -d "$with_import_modules"; then
30206       IMPORT_MODULES_TOPDIR="$with_import_modules"
30207 
30208   # Only process if variable expands to non-empty
30209 
30210   if test "x$IMPORT_MODULES_TOPDIR" != x; then
30211     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30212 
30213   # Input might be given as Windows format, start by converting to
30214   # unix format.
30215   path="$IMPORT_MODULES_TOPDIR"
30216   new_path=`$CYGPATH -u "$path"`
30217 
30218   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30219   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30220   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30221   # "foo.exe" is OK but "foo" is an error.
30222   #
30223   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30224   # It is also a way to make sure we got the proper file name for the real test later on.
30225   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30226   if test "x$test_shortpath" = x; then
30227     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30228 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30229     as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
30230   fi
30231 
30232   # Call helper function which possibly converts this using DOS-style short mode.
30233   # If so, the updated path is stored in $new_path.
30234 
30235   input_path="$new_path"
30236   # Check if we need to convert this using DOS-style short mode. If the path
30237   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30238   # take no chances and rewrite it.
30239   # Note: m4 eats our [], so we need to use [ and ] instead.
30240   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30241   if test "x$has_forbidden_chars" != x; then
30242     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30243     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30244     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30245     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30246       # Going to short mode and back again did indeed matter. Since short mode is
30247       # case insensitive, let's make it lowercase to improve readability.
30248       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30249       # Now convert it back to Unix-style (cygpath)
30250       input_path=`$CYGPATH -u "$shortmode_path"`
30251       new_path="$input_path"
30252     fi
30253   fi
30254 
30255   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30256   if test "x$test_cygdrive_prefix" = x; then
30257     # As a simple fix, exclude /usr/bin since it's not a real path.
30258     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30259       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30260       # a path prefixed by /cygdrive for fixpath to work.
30261       new_path="$CYGWIN_ROOT_PATH$input_path"
30262     fi
30263   fi
30264 
30265 
30266   if test "x$path" != "x$new_path"; then
30267     IMPORT_MODULES_TOPDIR="$new_path"
30268     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30269 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30270   fi
30271 
30272     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30273 
30274   path="$IMPORT_MODULES_TOPDIR"
30275   has_colon=`$ECHO $path | $GREP ^.:`
30276   new_path="$path"
30277   if test "x$has_colon" = x; then
30278     # Not in mixed or Windows style, start by that.
30279     new_path=`cmd //c echo $path`
30280   fi
30281 
30282 
30283   input_path="$new_path"
30284   # Check if we need to convert this using DOS-style short mode. If the path
30285   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30286   # take no chances and rewrite it.
30287   # Note: m4 eats our [], so we need to use [ and ] instead.
30288   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30289   if test "x$has_forbidden_chars" != x; then
30290     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30291     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30292   fi
30293 
30294 
30295   windows_path="$new_path"
30296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30297     unix_path=`$CYGPATH -u "$windows_path"`
30298     new_path="$unix_path"
30299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30300     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30301     new_path="$unix_path"
30302   fi
30303 
30304   if test "x$path" != "x$new_path"; then
30305     IMPORT_MODULES_TOPDIR="$new_path"
30306     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30307 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30308   fi
30309 
30310   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30311   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30312 
30313     else
30314       # We're on a unix platform. Hooray! :)
30315       path="$IMPORT_MODULES_TOPDIR"
30316       has_space=`$ECHO "$path" | $GREP " "`
30317       if test "x$has_space" != x; then
30318         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30319 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30320         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30321       fi
30322 
30323       # Use eval to expand a potential ~
30324       eval path="$path"
30325       if test ! -f "$path" && test ! -d "$path"; then
30326         as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
30327       fi
30328 
30329       if test -d "$path"; then
30330         IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
30331       else
30332         dir="`$DIRNAME "$path"`"
30333         base="`$BASENAME "$path"`"
30334         IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
30335       fi
30336     fi
30337   fi
30338 
30339     elif test -e "$with_import_modules"; then
30340       IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
30341       $RM -rf "$IMPORT_MODULES_TOPDIR"
30342       $MKDIR -p "$IMPORT_MODULES_TOPDIR"
30343       if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
30344         as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30345       fi
30346     else
30347       as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30348     fi
30349   fi
30350 
30351   if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
30352     IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
30353   fi
30354   if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
30355     IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
30356   fi
30357   if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
30358     IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
30359   fi
30360   if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
30361     IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
30362   fi
30363   if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
30364     IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
30365   fi
30366   if test -d "$IMPORT_MODULES_TOPDIR/make"; then
30367     IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
30368   fi
30369 
30370 
30371 
30372 
30373 
30374 
30375 
30376 
30377 
30378 ###############################################################################
30379 #
30380 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
30381 # native code.
30382 #
30383 ###############################################################################
30384 
30385 # See if we are doing a complete static build or not
30386 
30387   # Check whether --enable-static-build was given.
30388 if test "${enable_static_build+set}" = set; then :
30389   enableval=$enable_static_build;
30390 fi
30391 
30392   STATIC_BUILD=false
30393   if test "x$enable_static_build" = "xyes"; then
30394     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30395 $as_echo_n "checking if static build is enabled... " >&6; }
30396     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30397 $as_echo "yes" >&6; }
30398     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
30399       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
30400     fi
30401     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
30402     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
30403     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
30404     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30405     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30406     STATIC_BUILD=true
30407   elif test "x$enable_static_build" = "xno"; then
30408     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30409 $as_echo_n "checking if static build is enabled... " >&6; }
30410     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30411 $as_echo "no" >&6; }
30412   elif test "x$enable_static_build" != "x"; then
30413     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
30414   fi
30415 
30416 
30417 
30418 
30419 # First determine the toolchain type (compiler family)
30420 
30421 
30422 # Check whether --with-toolchain-type was given.
30423 if test "${with_toolchain_type+set}" = set; then :
30424   withval=$with_toolchain_type;
30425 fi
30426 
30427 
30428   # Use indirect variable referencing
30429   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
30430   VALID_TOOLCHAINS=${!toolchain_var_name}
30431 
30432   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30433     if test -n "$XCODEBUILD"; then
30434       # On Mac OS X, default toolchain to clang after Xcode 5
30435       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
30436       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
30437       if test $? -ne 0; then
30438         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
30439       fi
30440       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
30441           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
30442           $CUT -f 1 -d .`
30443       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
30444 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
30445       if test $XCODE_MAJOR_VERSION -ge 5; then
30446           DEFAULT_TOOLCHAIN="clang"
30447       else
30448           DEFAULT_TOOLCHAIN="gcc"
30449       fi
30450     else
30451       # If Xcode is not installed, but the command line tools are
30452       # then we can't run xcodebuild. On these systems we should
30453       # default to clang
30454       DEFAULT_TOOLCHAIN="clang"
30455     fi
30456   else
30457     # First toolchain type in the list is the default
30458     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
30459   fi
30460 
30461   if test "x$with_toolchain_type" = xlist; then
30462     # List all toolchains
30463     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
30464 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
30465     for toolchain in $VALID_TOOLCHAINS; do
30466       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
30467       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30468       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
30469     done
30470 
30471     exit 0
30472   elif test "x$with_toolchain_type" != x; then
30473     # User override; check that it is valid
30474     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
30475       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
30476 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
30477       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
30478 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
30479       as_fn_error $? "Cannot continue." "$LINENO" 5
30480     fi
30481     TOOLCHAIN_TYPE=$with_toolchain_type
30482   else
30483     # No flag given, use default
30484     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
30485   fi
30486 
30487 
30488   TOOLCHAIN_CC_BINARY_clang="clang"
30489   TOOLCHAIN_CC_BINARY_gcc="gcc"
30490   TOOLCHAIN_CC_BINARY_microsoft="cl"
30491   TOOLCHAIN_CC_BINARY_solstudio="cc"
30492   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
30493 
30494   TOOLCHAIN_CXX_BINARY_clang="clang++"
30495   TOOLCHAIN_CXX_BINARY_gcc="g++"
30496   TOOLCHAIN_CXX_BINARY_microsoft="cl"
30497   TOOLCHAIN_CXX_BINARY_solstudio="CC"
30498   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
30499 
30500   # Use indirect variable referencing
30501   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
30502   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30503   toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
30504   TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
30505   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
30506   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
30507   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
30508   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
30509 
30510 
30511   # Define filename patterns
30512   if test "x$OPENJDK_TARGET_OS" = xwindows; then
30513     LIBRARY_PREFIX=
30514     SHARED_LIBRARY_SUFFIX='.dll'
30515     STATIC_LIBRARY_SUFFIX='.lib'
30516     SHARED_LIBRARY='$1.dll'
30517     STATIC_LIBRARY='$1.lib'
30518     OBJ_SUFFIX='.obj'
30519     EXE_SUFFIX='.exe'
30520   else
30521     LIBRARY_PREFIX=lib
30522     SHARED_LIBRARY_SUFFIX='.so'
30523     STATIC_LIBRARY_SUFFIX='.a'
30524     SHARED_LIBRARY='lib$1.so'
30525     STATIC_LIBRARY='lib$1.a'
30526     OBJ_SUFFIX='.o'
30527     EXE_SUFFIX=''
30528     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30529       # For full static builds, we're overloading the SHARED_LIBRARY
30530       # variables in order to limit the amount of changes required.
30531       # It would be better to remove SHARED and just use LIBRARY and
30532       # LIBRARY_SUFFIX for libraries that can be built either
30533       # shared or static and use STATIC_* for libraries that are
30534       # always built statically.
30535       if test "x$STATIC_BUILD" = xtrue; then
30536         SHARED_LIBRARY='lib$1.a'
30537         SHARED_LIBRARY_SUFFIX='.a'
30538       else
30539         SHARED_LIBRARY='lib$1.dylib'
30540         SHARED_LIBRARY_SUFFIX='.dylib'
30541       fi
30542     fi
30543   fi
30544 
30545 
30546 
30547 
30548 
30549 
30550 
30551 
30552 
30553 
30554   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
30555     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
30556 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
30557   else
30558     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
30559 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
30560   fi
30561 
30562 
30563 # User supplied flags should be used when configure detects compilers
30564 
30565   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
30566     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
30567 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
30568   fi
30569 
30570   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
30571     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
30572 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
30573   fi
30574 
30575   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
30576     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
30577 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
30578   fi
30579 
30580 
30581 # Check whether --with-extra-cflags was given.
30582 if test "${with_extra_cflags+set}" = set; then :
30583   withval=$with_extra_cflags;
30584 fi
30585 
30586 
30587 
30588 # Check whether --with-extra-cxxflags was given.
30589 if test "${with_extra_cxxflags+set}" = set; then :
30590   withval=$with_extra_cxxflags;
30591 fi
30592 
30593 
30594 
30595 # Check whether --with-extra-ldflags was given.
30596 if test "${with_extra_ldflags+set}" = set; then :
30597   withval=$with_extra_ldflags;
30598 fi
30599 
30600 
30601   EXTRA_CFLAGS="$with_extra_cflags"
30602   EXTRA_CXXFLAGS="$with_extra_cxxflags"
30603   EXTRA_LDFLAGS="$with_extra_ldflags"
30604 
30605   # Hotspot needs these set in their legacy form
30606   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
30607   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
30608   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
30609 
30610 
30611 
30612 
30613 
30614   # The global CFLAGS and LDLAGS variables are used by configure tests and
30615   # should include the extra parameters
30616   CFLAGS="$EXTRA_CFLAGS"
30617   CXXFLAGS="$EXTRA_CXXFLAGS"
30618   LDFLAGS="$EXTRA_LDFLAGS"
30619   CPPFLAGS=""
30620 
30621 # The sysroot cflags are needed for configure to be able to run the compilers
30622 
30623   if test "x$SYSROOT" != "x"; then
30624     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30625       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30626         # Solaris Studio does not have a concept of sysroot. Instead we must
30627         # make sure the default include and lib dirs are appended to each
30628         # compile and link command line. Must also add -I-xbuiltin to enable
30629         # inlining of system functions and intrinsics.
30630         SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
30631         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
30632             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
30633             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
30634       fi
30635     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
30636       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
30637       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
30638     elif test "x$TOOLCHAIN_TYPE" = xclang; then
30639       SYSROOT_CFLAGS="-isysroot $SYSROOT"
30640       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
30641     fi
30642     # Propagate the sysroot args to hotspot
30643     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
30644     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
30645     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
30646     # The global CFLAGS and LDFLAGS variables need these for configure to function
30647     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
30648     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
30649     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
30650     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
30651   fi
30652 
30653   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30654     # We also need -iframework<path>/System/Library/Frameworks
30655     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30656     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30657     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
30658     # set this here so it doesn't have to be peppered throughout the forest
30659     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30660     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30661   fi
30662 
30663 
30664 
30665 
30666 
30667 # Then detect the actual binaries needed
30668 
30669   # FIXME: Is this needed?
30670   ac_ext=cpp
30671 ac_cpp='$CXXCPP $CPPFLAGS'
30672 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30673 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30674 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30675 
30676 
30677   # Store the CFLAGS etc passed to the configure script.
30678   ORG_CFLAGS="$CFLAGS"
30679   ORG_CXXFLAGS="$CXXFLAGS"
30680 
30681   # autoconf magic only relies on PATH, so update it if tools dir is specified
30682   OLD_PATH="$PATH"
30683 
30684   # On Windows, we need to detect the visual studio installation first.
30685   # This will change the PATH, but we need to keep that new PATH even
30686   # after toolchain detection is done, since the compiler (on x86) uses
30687   # it for DLL resolution in runtime.
30688   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
30689       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
30690 
30691   # Store path to cygwin link.exe to help excluding it when searching for
30692   # VS linker. This must be done before changing the PATH when looking for VS.
30693   # Extract the first word of "link", so it can be a program name with args.
30694 set dummy link; ac_word=$2
30695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30696 $as_echo_n "checking for $ac_word... " >&6; }
30697 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
30698   $as_echo_n "(cached) " >&6
30699 else
30700   case $CYGWIN_LINK in
30701   [\\/]* | ?:[\\/]*)
30702   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
30703   ;;
30704   *)
30705   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30706 for as_dir in $PATH
30707 do
30708   IFS=$as_save_IFS
30709   test -z "$as_dir" && as_dir=.
30710     for ac_exec_ext in '' $ac_executable_extensions; do
30711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30712     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
30713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30714     break 2
30715   fi
30716 done
30717   done
30718 IFS=$as_save_IFS
30719 
30720   ;;
30721 esac
30722 fi
30723 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
30724 if test -n "$CYGWIN_LINK"; then
30725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
30726 $as_echo "$CYGWIN_LINK" >&6; }
30727 else
30728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30729 $as_echo "no" >&6; }
30730 fi
30731 
30732 
30733   if test "x$CYGWIN_LINK" != x; then
30734     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
30735 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
30736     "$CYGWIN_LINK" --version > /dev/null
30737     if test $? -eq 0 ; then
30738       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30739 $as_echo "yes" >&6; }
30740     else
30741       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30742 $as_echo "no" >&6; }
30743       # This might be the VS linker. Don't exclude it later on.
30744       CYGWIN_LINK=""
30745     fi
30746   fi
30747 
30748   # First-hand choice is to locate and run the vsvars bat file.
30749 
30750 
30751 # Check whether --with-toolchain-version was given.
30752 if test "${with_toolchain_version+set}" = set; then :
30753   withval=$with_toolchain_version;
30754 fi
30755 
30756 
30757   if test "x$with_toolchain_version" = xlist; then
30758     # List all toolchains
30759     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
30760 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
30761     for version in $VALID_VS_VERSIONS; do
30762       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
30763       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
30764     done
30765 
30766     exit 0
30767   elif test "x$DEVKIT_VS_VERSION" != x; then
30768     VS_VERSION=$DEVKIT_VS_VERSION
30769     TOOLCHAIN_VERSION=$VS_VERSION
30770     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30771     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30772     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30773     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30774     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30775     VS_PATH="$TOOLCHAIN_PATH:$PATH"
30776 
30777     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
30778     # can still be exported as INCLUDE for compiler invocations without
30779     # SYSROOT_CFLAGS
30780     OLDIFS="$IFS"
30781     IFS=";"
30782     for i in $DEVKIT_VS_INCLUDE; do
30783       ipath=$i
30784 
30785   unix_path="$ipath"
30786   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30787     windows_path=`$CYGPATH -m "$unix_path"`
30788     ipath="$windows_path"
30789   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30790     windows_path=`cmd //c echo $unix_path`
30791     ipath="$windows_path"
30792   fi
30793 
30794       VS_INCLUDE="$VS_INCLUDE;$ipath"
30795     done
30796     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
30797     # as LIB for compiler invocations without SYSROOT_LDFLAGS
30798     for i in $DEVKIT_VS_LIB; do
30799       libpath=$i
30800 
30801   unix_path="$libpath"
30802   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30803     windows_path=`$CYGPATH -m "$unix_path"`
30804     libpath="$windows_path"
30805   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30806     windows_path=`cmd //c echo $unix_path`
30807     libpath="$windows_path"
30808   fi
30809 
30810       VS_LIB="$VS_LIB;$libpath"
30811     done
30812     IFS="$OLDIFS"
30813 
30814     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
30815 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
30816 
30817   elif test "x$with_toolchain_version" != x; then
30818     # User override; check that it is valid
30819     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
30820       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
30821 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
30822       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
30823 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
30824       as_fn_error $? "Cannot continue." "$LINENO" 5
30825     fi
30826     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
30827   else
30828     # No flag given, use default
30829     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
30830   fi
30831 
30832   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
30833 
30834   VS_VERSION="$VS_VERSION"
30835   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
30836   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
30837   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
30838   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
30839 
30840   # When using --with-tools-dir, assume it points to the correct and default
30841   # version of Visual Studio or that --with-toolchain-version was also set.
30842   if test "x$with_tools_dir" != x; then
30843 
30844   if test "x$VS_ENV_CMD" = x; then
30845     VS_VERSION="${VS_VERSION}"
30846     VS_BASE="$with_tools_dir/../.."
30847     METHOD="--with-tools-dir"
30848 
30849     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30850       VCVARSFILE="vc/bin/vcvars32.bat"
30851     else
30852       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30853     fi
30854 
30855 
30856   windows_path="$VS_BASE"
30857   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30858     unix_path=`$CYGPATH -u "$windows_path"`
30859     VS_BASE="$unix_path"
30860   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30861     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30862     VS_BASE="$unix_path"
30863   fi
30864 
30865     if test -d "$VS_BASE"; then
30866       if test -f "$VS_BASE/$VCVARSFILE"; then
30867         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30868 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30869         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30870         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30871         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30872         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30873       else
30874         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30875 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30876         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30877 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30878       fi
30879     fi
30880   fi
30881 
30882 
30883   if test "x$VS_ENV_CMD" = x; then
30884     VS_VERSION="${VS_VERSION}"
30885     VS_BASE="$with_tools_dir/../../.."
30886     METHOD="--with-tools-dir"
30887 
30888     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30889       VCVARSFILE="vc/bin/vcvars32.bat"
30890     else
30891       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30892     fi
30893 
30894 
30895   windows_path="$VS_BASE"
30896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30897     unix_path=`$CYGPATH -u "$windows_path"`
30898     VS_BASE="$unix_path"
30899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30900     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30901     VS_BASE="$unix_path"
30902   fi
30903 
30904     if test -d "$VS_BASE"; then
30905       if test -f "$VS_BASE/$VCVARSFILE"; then
30906         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30907 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30908         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30909         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30910         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30911         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30912       else
30913         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30914 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30915         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30916 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30917       fi
30918     fi
30919   fi
30920 
30921     if test "x$VS_ENV_CMD" = x; then
30922       # Having specified an argument which is incorrect will produce an instant failure;
30923       # we should not go on looking
30924       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
30925 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
30926       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
30927 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
30928       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
30929 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
30930       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
30931     fi
30932   fi
30933 
30934   VS_ENV_CMD=""
30935   VS_ENV_ARGS=""
30936 
30937   if test "x$VS_COMNTOOLS" != x; then
30938 
30939   if test "x$VS_ENV_CMD" = x; then
30940     VS_VERSION="${VS_VERSION}"
30941     VS_BASE="$VS_COMNTOOLS/../.."
30942     METHOD="$VS_COMNTOOLS_VAR variable"
30943 
30944     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30945       VCVARSFILE="vc/bin/vcvars32.bat"
30946     else
30947       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30948     fi
30949 
30950 
30951   windows_path="$VS_BASE"
30952   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30953     unix_path=`$CYGPATH -u "$windows_path"`
30954     VS_BASE="$unix_path"
30955   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30956     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30957     VS_BASE="$unix_path"
30958   fi
30959 
30960     if test -d "$VS_BASE"; then
30961       if test -f "$VS_BASE/$VCVARSFILE"; then
30962         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30963 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30964         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30965         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30966         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30967         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30968       else
30969         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30970 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30971         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30972 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30973       fi
30974     fi
30975   fi
30976 
30977   fi
30978   if test "x$PROGRAMFILES" != x; then
30979 
30980   if test "x$VS_ENV_CMD" = x; then
30981     VS_VERSION="${VS_VERSION}"
30982     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30983     METHOD="well-known name"
30984 
30985     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30986       VCVARSFILE="vc/bin/vcvars32.bat"
30987     else
30988       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30989     fi
30990 
30991 
30992   windows_path="$VS_BASE"
30993   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30994     unix_path=`$CYGPATH -u "$windows_path"`
30995     VS_BASE="$unix_path"
30996   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30997     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30998     VS_BASE="$unix_path"
30999   fi
31000 
31001     if test -d "$VS_BASE"; then
31002       if test -f "$VS_BASE/$VCVARSFILE"; then
31003         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31004 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31005         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31006         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31007         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31008         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31009       else
31010         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31011 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31012         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31013 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31014       fi
31015     fi
31016   fi
31017 
31018   fi
31019   # Work around the insanely named ProgramFiles(x86) env variable
31020   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31021   if test "x$PROGRAMFILES_X86" != x; then
31022 
31023   if test "x$VS_ENV_CMD" = x; then
31024     VS_VERSION="${VS_VERSION}"
31025     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31026     METHOD="well-known name"
31027 
31028     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31029       VCVARSFILE="vc/bin/vcvars32.bat"
31030     else
31031       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31032     fi
31033 
31034 
31035   windows_path="$VS_BASE"
31036   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31037     unix_path=`$CYGPATH -u "$windows_path"`
31038     VS_BASE="$unix_path"
31039   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31040     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31041     VS_BASE="$unix_path"
31042   fi
31043 
31044     if test -d "$VS_BASE"; then
31045       if test -f "$VS_BASE/$VCVARSFILE"; then
31046         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31047 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31048         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31049         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31050         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31051         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31052       else
31053         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31054 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31055         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31056 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31057       fi
31058     fi
31059   fi
31060 
31061   fi
31062 
31063   if test "x$VS_ENV_CMD" = x; then
31064     VS_VERSION="${VS_VERSION}"
31065     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31066     METHOD="well-known name"
31067 
31068     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31069       VCVARSFILE="vc/bin/vcvars32.bat"
31070     else
31071       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31072     fi
31073 
31074 
31075   windows_path="$VS_BASE"
31076   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31077     unix_path=`$CYGPATH -u "$windows_path"`
31078     VS_BASE="$unix_path"
31079   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31080     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31081     VS_BASE="$unix_path"
31082   fi
31083 
31084     if test -d "$VS_BASE"; then
31085       if test -f "$VS_BASE/$VCVARSFILE"; then
31086         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31087 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31088         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31089         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31090         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31091         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31092       else
31093         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31094 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31095         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31096 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31097       fi
31098     fi
31099   fi
31100 
31101 
31102   if test "x$VS_ENV_CMD" = x; then
31103     VS_VERSION="${VS_VERSION}"
31104     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31105     METHOD="well-known name"
31106 
31107     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31108       VCVARSFILE="vc/bin/vcvars32.bat"
31109     else
31110       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31111     fi
31112 
31113 
31114   windows_path="$VS_BASE"
31115   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31116     unix_path=`$CYGPATH -u "$windows_path"`
31117     VS_BASE="$unix_path"
31118   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31119     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31120     VS_BASE="$unix_path"
31121   fi
31122 
31123     if test -d "$VS_BASE"; then
31124       if test -f "$VS_BASE/$VCVARSFILE"; then
31125         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31126 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31127         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31128         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31129         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31130         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31131       else
31132         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31133 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31134         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31135 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31136       fi
31137     fi
31138   fi
31139 
31140 
31141   if test "x$SDK_INSTALL_DIR" != x; then
31142     if test "x$ProgramW6432" != x; then
31143 
31144   if test "x$VS_ENV_CMD" = x; then
31145     VS_VERSION="${VS_VERSION}"
31146     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31147     METHOD="well-known name"
31148 
31149   windows_path="$WIN_SDK_BASE"
31150   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31151     unix_path=`$CYGPATH -u "$windows_path"`
31152     WIN_SDK_BASE="$unix_path"
31153   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31154     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31155     WIN_SDK_BASE="$unix_path"
31156   fi
31157 
31158     if test -d "$WIN_SDK_BASE"; then
31159       # There have been cases of partial or broken SDK installations. A missing
31160       # lib dir is not going to work.
31161       if test ! -d "$WIN_SDK_BASE/lib"; then
31162         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31163 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31164         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31165 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31166       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31167         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31168 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31169         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31170         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31171           VS_ENV_ARGS="/x86"
31172         else
31173           VS_ENV_ARGS="/x64"
31174         fi
31175         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31176         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31177         # TODO: improve detection for other versions of SDK
31178         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31179       else
31180         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31181 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31182         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31183 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31184       fi
31185     fi
31186   fi
31187 
31188     fi
31189     if test "x$PROGRAMW6432" != x; then
31190 
31191   if test "x$VS_ENV_CMD" = x; then
31192     VS_VERSION="${VS_VERSION}"
31193     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
31194     METHOD="well-known name"
31195 
31196   windows_path="$WIN_SDK_BASE"
31197   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31198     unix_path=`$CYGPATH -u "$windows_path"`
31199     WIN_SDK_BASE="$unix_path"
31200   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31201     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31202     WIN_SDK_BASE="$unix_path"
31203   fi
31204 
31205     if test -d "$WIN_SDK_BASE"; then
31206       # There have been cases of partial or broken SDK installations. A missing
31207       # lib dir is not going to work.
31208       if test ! -d "$WIN_SDK_BASE/lib"; then
31209         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31210 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31211         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31212 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31213       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31214         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31215 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31216         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31217         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31218           VS_ENV_ARGS="/x86"
31219         else
31220           VS_ENV_ARGS="/x64"
31221         fi
31222         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31223         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31224         # TODO: improve detection for other versions of SDK
31225         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31226       else
31227         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31228 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31229         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31230 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31231       fi
31232     fi
31233   fi
31234 
31235     fi
31236     if test "x$PROGRAMFILES" != x; then
31237 
31238   if test "x$VS_ENV_CMD" = x; then
31239     VS_VERSION="${VS_VERSION}"
31240     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
31241     METHOD="well-known name"
31242 
31243   windows_path="$WIN_SDK_BASE"
31244   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31245     unix_path=`$CYGPATH -u "$windows_path"`
31246     WIN_SDK_BASE="$unix_path"
31247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31248     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31249     WIN_SDK_BASE="$unix_path"
31250   fi
31251 
31252     if test -d "$WIN_SDK_BASE"; then
31253       # There have been cases of partial or broken SDK installations. A missing
31254       # lib dir is not going to work.
31255       if test ! -d "$WIN_SDK_BASE/lib"; then
31256         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31257 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31258         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31259 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31260       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31261         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31262 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31263         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31264         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31265           VS_ENV_ARGS="/x86"
31266         else
31267           VS_ENV_ARGS="/x64"
31268         fi
31269         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31270         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31271         # TODO: improve detection for other versions of SDK
31272         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31273       else
31274         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31275 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31276         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31277 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31278       fi
31279     fi
31280   fi
31281 
31282     fi
31283 
31284   if test "x$VS_ENV_CMD" = x; then
31285     VS_VERSION="${VS_VERSION}"
31286     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
31287     METHOD="well-known name"
31288 
31289   windows_path="$WIN_SDK_BASE"
31290   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31291     unix_path=`$CYGPATH -u "$windows_path"`
31292     WIN_SDK_BASE="$unix_path"
31293   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31294     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31295     WIN_SDK_BASE="$unix_path"
31296   fi
31297 
31298     if test -d "$WIN_SDK_BASE"; then
31299       # There have been cases of partial or broken SDK installations. A missing
31300       # lib dir is not going to work.
31301       if test ! -d "$WIN_SDK_BASE/lib"; then
31302         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31303 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31304         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31305 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31306       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31307         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31308 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31309         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31310         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31311           VS_ENV_ARGS="/x86"
31312         else
31313           VS_ENV_ARGS="/x64"
31314         fi
31315         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31316         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31317         # TODO: improve detection for other versions of SDK
31318         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31319       else
31320         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31321 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31322         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31323 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31324       fi
31325     fi
31326   fi
31327 
31328 
31329   if test "x$VS_ENV_CMD" = x; then
31330     VS_VERSION="${VS_VERSION}"
31331     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
31332     METHOD="well-known name"
31333 
31334   windows_path="$WIN_SDK_BASE"
31335   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31336     unix_path=`$CYGPATH -u "$windows_path"`
31337     WIN_SDK_BASE="$unix_path"
31338   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31339     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31340     WIN_SDK_BASE="$unix_path"
31341   fi
31342 
31343     if test -d "$WIN_SDK_BASE"; then
31344       # There have been cases of partial or broken SDK installations. A missing
31345       # lib dir is not going to work.
31346       if test ! -d "$WIN_SDK_BASE/lib"; then
31347         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31348 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31349         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31350 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31351       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31352         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31353 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31354         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31355         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31356           VS_ENV_ARGS="/x86"
31357         else
31358           VS_ENV_ARGS="/x64"
31359         fi
31360         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31361         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31362         # TODO: improve detection for other versions of SDK
31363         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31364       else
31365         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31366 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31367         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31368 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31369       fi
31370     fi
31371   fi
31372 
31373   fi
31374 
31375     if test "x$VS_ENV_CMD" != x; then
31376       TOOLCHAIN_VERSION=$VS_VERSION
31377       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31378       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31379       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31380       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31381       # The rest of the variables are already evaled while probing
31382       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
31383 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
31384       break
31385     fi
31386   done
31387 
31388 
31389   # If we have a devkit, skip all of the below.
31390   if test "x$DEVKIT_VS_VERSION" = x; then
31391     if test "x$VS_ENV_CMD" != x; then
31392       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
31393 
31394   # Only process if variable expands to non-empty
31395 
31396   if test "x$VS_ENV_CMD" != x; then
31397     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31398 
31399   # First separate the path from the arguments. This will split at the first
31400   # space.
31401   complete="$VS_ENV_CMD"
31402   path="${complete%% *}"
31403   tmp="$complete EOL"
31404   arguments="${tmp#* }"
31405 
31406   # Input might be given as Windows format, start by converting to
31407   # unix format.
31408   new_path=`$CYGPATH -u "$path"`
31409 
31410   # Now try to locate executable using which
31411   new_path=`$WHICH "$new_path" 2> /dev/null`
31412   # bat and cmd files are not always considered executable in cygwin causing which
31413   # to not find them
31414   if test "x$new_path" = x \
31415       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31416       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31417     new_path=`$CYGPATH -u "$path"`
31418   fi
31419   if test "x$new_path" = x; then
31420     # Oops. Which didn't find the executable.
31421     # The splitting of arguments from the executable at a space might have been incorrect,
31422     # since paths with space are more likely in Windows. Give it another try with the whole
31423     # argument.
31424     path="$complete"
31425     arguments="EOL"
31426     new_path=`$CYGPATH -u "$path"`
31427     new_path=`$WHICH "$new_path" 2> /dev/null`
31428     # bat and cmd files are not always considered executable in cygwin causing which
31429     # to not find them
31430     if test "x$new_path" = x \
31431         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31432         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31433       new_path=`$CYGPATH -u "$path"`
31434     fi
31435     if test "x$new_path" = x; then
31436       # It's still not found. Now this is an unrecoverable error.
31437       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31438 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31439       has_space=`$ECHO "$complete" | $GREP " "`
31440       if test "x$has_space" != x; then
31441         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31442 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31443       fi
31444       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31445     fi
31446   fi
31447 
31448   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31449   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31450   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31451   # "foo.exe" is OK but "foo" is an error.
31452   #
31453   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31454   # It is also a way to make sure we got the proper file name for the real test later on.
31455   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31456   if test "x$test_shortpath" = x; then
31457     # Short path failed, file does not exist as specified.
31458     # Try adding .exe or .cmd
31459     if test -f "${new_path}.exe"; then
31460       input_to_shortpath="${new_path}.exe"
31461     elif test -f "${new_path}.cmd"; then
31462       input_to_shortpath="${new_path}.cmd"
31463     else
31464       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
31465 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
31466       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31467 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31468       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31469     fi
31470   else
31471     input_to_shortpath="$new_path"
31472   fi
31473 
31474   # Call helper function which possibly converts this using DOS-style short mode.
31475   # If so, the updated path is stored in $new_path.
31476   new_path="$input_to_shortpath"
31477 
31478   input_path="$input_to_shortpath"
31479   # Check if we need to convert this using DOS-style short mode. If the path
31480   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31481   # take no chances and rewrite it.
31482   # Note: m4 eats our [], so we need to use [ and ] instead.
31483   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31484   if test "x$has_forbidden_chars" != x; then
31485     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31486     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31487     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31488     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31489       # Going to short mode and back again did indeed matter. Since short mode is
31490       # case insensitive, let's make it lowercase to improve readability.
31491       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31492       # Now convert it back to Unix-style (cygpath)
31493       input_path=`$CYGPATH -u "$shortmode_path"`
31494       new_path="$input_path"
31495     fi
31496   fi
31497 
31498   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31499   if test "x$test_cygdrive_prefix" = x; then
31500     # As a simple fix, exclude /usr/bin since it's not a real path.
31501     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31502       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31503       # a path prefixed by /cygdrive for fixpath to work.
31504       new_path="$CYGWIN_ROOT_PATH$input_path"
31505     fi
31506   fi
31507 
31508   # remove trailing .exe if any
31509   new_path="${new_path/%.exe/}"
31510 
31511     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31512 
31513   # First separate the path from the arguments. This will split at the first
31514   # space.
31515   complete="$VS_ENV_CMD"
31516   path="${complete%% *}"
31517   tmp="$complete EOL"
31518   arguments="${tmp#* }"
31519 
31520   # Input might be given as Windows format, start by converting to
31521   # unix format.
31522   new_path="$path"
31523 
31524   windows_path="$new_path"
31525   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31526     unix_path=`$CYGPATH -u "$windows_path"`
31527     new_path="$unix_path"
31528   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31529     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31530     new_path="$unix_path"
31531   fi
31532 
31533 
31534   # Now try to locate executable using which
31535   new_path=`$WHICH "$new_path" 2> /dev/null`
31536 
31537   if test "x$new_path" = x; then
31538     # Oops. Which didn't find the executable.
31539     # The splitting of arguments from the executable at a space might have been incorrect,
31540     # since paths with space are more likely in Windows. Give it another try with the whole
31541     # argument.
31542     path="$complete"
31543     arguments="EOL"
31544     new_path="$path"
31545 
31546   windows_path="$new_path"
31547   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31548     unix_path=`$CYGPATH -u "$windows_path"`
31549     new_path="$unix_path"
31550   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31551     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31552     new_path="$unix_path"
31553   fi
31554 
31555 
31556     new_path=`$WHICH "$new_path" 2> /dev/null`
31557     # bat and cmd files are not always considered executable in MSYS causing which
31558     # to not find them
31559     if test "x$new_path" = x \
31560         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31561         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31562       new_path="$path"
31563 
31564   windows_path="$new_path"
31565   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31566     unix_path=`$CYGPATH -u "$windows_path"`
31567     new_path="$unix_path"
31568   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31569     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31570     new_path="$unix_path"
31571   fi
31572 
31573     fi
31574 
31575     if test "x$new_path" = x; then
31576       # It's still not found. Now this is an unrecoverable error.
31577       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31578 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31579       has_space=`$ECHO "$complete" | $GREP " "`
31580       if test "x$has_space" != x; then
31581         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31582 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31583       fi
31584       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31585     fi
31586   fi
31587 
31588   # Now new_path has a complete unix path to the binary
31589   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31590     # Keep paths in /bin as-is, but remove trailing .exe if any
31591     new_path="${new_path/%.exe/}"
31592     # Do not save /bin paths to all_fixpath_prefixes!
31593   else
31594     # Not in mixed or Windows style, start by that.
31595     new_path=`cmd //c echo $new_path`
31596 
31597   input_path="$new_path"
31598   # Check if we need to convert this using DOS-style short mode. If the path
31599   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31600   # take no chances and rewrite it.
31601   # Note: m4 eats our [], so we need to use [ and ] instead.
31602   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31603   if test "x$has_forbidden_chars" != x; then
31604     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31605     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31606   fi
31607 
31608     # Output is in $new_path
31609 
31610   windows_path="$new_path"
31611   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31612     unix_path=`$CYGPATH -u "$windows_path"`
31613     new_path="$unix_path"
31614   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31615     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31616     new_path="$unix_path"
31617   fi
31618 
31619     # remove trailing .exe if any
31620     new_path="${new_path/%.exe/}"
31621 
31622     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31623     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31624   fi
31625 
31626     else
31627       # We're on a unix platform. Hooray! :)
31628       # First separate the path from the arguments. This will split at the first
31629       # space.
31630       complete="$VS_ENV_CMD"
31631       path="${complete%% *}"
31632       tmp="$complete EOL"
31633       arguments="${tmp#* }"
31634 
31635       # Cannot rely on the command "which" here since it doesn't always work.
31636       is_absolute_path=`$ECHO "$path" | $GREP ^/`
31637       if test -z "$is_absolute_path"; then
31638         # Path to executable is not absolute. Find it.
31639         IFS_save="$IFS"
31640         IFS=:
31641         for p in $PATH; do
31642           if test -f "$p/$path" && test -x "$p/$path"; then
31643             new_path="$p/$path"
31644             break
31645           fi
31646         done
31647         IFS="$IFS_save"
31648       else
31649         # This is an absolute path, we can use it without further modifications.
31650         new_path="$path"
31651       fi
31652 
31653       if test "x$new_path" = x; then
31654         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31655 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31656         has_space=`$ECHO "$complete" | $GREP " "`
31657         if test "x$has_space" != x; then
31658           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31659 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31660         fi
31661         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31662       fi
31663     fi
31664 
31665     # Now join together the path and the arguments once again
31666     if test "x$arguments" != xEOL; then
31667       new_complete="$new_path ${arguments% *}"
31668     else
31669       new_complete="$new_path"
31670     fi
31671 
31672     if test "x$complete" != "x$new_complete"; then
31673       VS_ENV_CMD="$new_complete"
31674       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
31675 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
31676     fi
31677   fi
31678 
31679 
31680       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
31681       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
31682 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
31683 
31684       # We need to create a couple of temporary files.
31685       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
31686       $MKDIR -p $VS_ENV_TMP_DIR
31687 
31688       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
31689       # Instead create a shell script which will set the relevant variables when run.
31690       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
31691 
31692   unix_path="$WINPATH_VS_ENV_CMD"
31693   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31694     windows_path=`$CYGPATH -m "$unix_path"`
31695     WINPATH_VS_ENV_CMD="$windows_path"
31696   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31697     windows_path=`cmd //c echo $unix_path`
31698     WINPATH_VS_ENV_CMD="$windows_path"
31699   fi
31700 
31701       WINPATH_BASH="$BASH"
31702 
31703   unix_path="$WINPATH_BASH"
31704   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31705     windows_path=`$CYGPATH -m "$unix_path"`
31706     WINPATH_BASH="$windows_path"
31707   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31708     windows_path=`cmd //c echo $unix_path`
31709     WINPATH_BASH="$windows_path"
31710   fi
31711 
31712 
31713       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
31714       # script (executable by bash) that will setup the important variables.
31715       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
31716       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
31717       # This will end up something like:
31718       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
31719       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
31720       # These will end up something like:
31721       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
31722       # The trailing space for everyone except PATH is no typo, but is needed due
31723       # to trailing \ in the Windows paths. These will be stripped later.
31724       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
31725           >> $EXTRACT_VC_ENV_BAT_FILE
31726       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
31727           >> $EXTRACT_VC_ENV_BAT_FILE
31728       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
31729           >> $EXTRACT_VC_ENV_BAT_FILE
31730       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
31731           >> $EXTRACT_VC_ENV_BAT_FILE
31732       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
31733           >> $EXTRACT_VC_ENV_BAT_FILE
31734       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
31735           >> $EXTRACT_VC_ENV_BAT_FILE
31736 
31737       # Now execute the newly created bat file.
31738       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
31739       # Change directory so we don't need to mess with Windows paths in redirects.
31740       cd $VS_ENV_TMP_DIR
31741       cmd /c extract-vs-env.bat | $CAT
31742       cd $CURDIR
31743 
31744       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
31745         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
31746 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
31747         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31748 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31749         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31750 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31751         as_fn_error $? "Cannot continue" "$LINENO" 5
31752       fi
31753 
31754       # Now set all paths and other env variables. This will allow the rest of
31755       # the configure script to find and run the compiler in the proper way.
31756       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
31757 $as_echo "$as_me: Setting extracted environment variables" >&6;}
31758       . $VS_ENV_TMP_DIR/set-vs-env.sh
31759       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
31760       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
31761     else
31762       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
31763       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
31764 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
31765     fi
31766   fi
31767 
31768   # At this point, we should have correct variables in the environment, or we can't continue.
31769   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
31770 $as_echo_n "checking for Visual Studio variables... " >&6; }
31771 
31772   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
31773       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
31774     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
31775       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
31776 $as_echo "present but broken" >&6; }
31777       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
31778     else
31779       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31780 $as_echo "ok" >&6; }
31781       # Remove any trailing "\" ";" and " " from the variables.
31782       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
31783       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
31784       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
31785       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
31786       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
31787       # Remove any paths containing # (typically F#) as that messes up make. This
31788       # is needed if visual studio was installed with F# support.
31789       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
31790 
31791 
31792 
31793 
31794 
31795       # Convert VS_INCLUDE into SYSROOT_CFLAGS
31796       OLDIFS="$IFS"
31797       IFS=";"
31798       for i in $VS_INCLUDE; do
31799         ipath=$i
31800         # Only process non-empty elements
31801         if test "x$ipath" != x; then
31802           IFS="$OLDIFS"
31803           # Check that directory exists before calling fixup_path
31804           testpath=$ipath
31805 
31806   windows_path="$testpath"
31807   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31808     unix_path=`$CYGPATH -u "$windows_path"`
31809     testpath="$unix_path"
31810   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31811     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31812     testpath="$unix_path"
31813   fi
31814 
31815           if test -d "$testpath"; then
31816 
31817   # Only process if variable expands to non-empty
31818 
31819   if test "x$ipath" != x; then
31820     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31821 
31822   # Input might be given as Windows format, start by converting to
31823   # unix format.
31824   path="$ipath"
31825   new_path=`$CYGPATH -u "$path"`
31826 
31827   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31828   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31829   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31830   # "foo.exe" is OK but "foo" is an error.
31831   #
31832   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31833   # It is also a way to make sure we got the proper file name for the real test later on.
31834   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31835   if test "x$test_shortpath" = x; then
31836     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31837 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31838     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
31839   fi
31840 
31841   # Call helper function which possibly converts this using DOS-style short mode.
31842   # If so, the updated path is stored in $new_path.
31843 
31844   input_path="$new_path"
31845   # Check if we need to convert this using DOS-style short mode. If the path
31846   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31847   # take no chances and rewrite it.
31848   # Note: m4 eats our [], so we need to use [ and ] instead.
31849   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31850   if test "x$has_forbidden_chars" != x; then
31851     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31852     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31853     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31854     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31855       # Going to short mode and back again did indeed matter. Since short mode is
31856       # case insensitive, let's make it lowercase to improve readability.
31857       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31858       # Now convert it back to Unix-style (cygpath)
31859       input_path=`$CYGPATH -u "$shortmode_path"`
31860       new_path="$input_path"
31861     fi
31862   fi
31863 
31864   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31865   if test "x$test_cygdrive_prefix" = x; then
31866     # As a simple fix, exclude /usr/bin since it's not a real path.
31867     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31868       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31869       # a path prefixed by /cygdrive for fixpath to work.
31870       new_path="$CYGWIN_ROOT_PATH$input_path"
31871     fi
31872   fi
31873 
31874 
31875   if test "x$path" != "x$new_path"; then
31876     ipath="$new_path"
31877     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31878 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31879   fi
31880 
31881     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31882 
31883   path="$ipath"
31884   has_colon=`$ECHO $path | $GREP ^.:`
31885   new_path="$path"
31886   if test "x$has_colon" = x; then
31887     # Not in mixed or Windows style, start by that.
31888     new_path=`cmd //c echo $path`
31889   fi
31890 
31891 
31892   input_path="$new_path"
31893   # Check if we need to convert this using DOS-style short mode. If the path
31894   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31895   # take no chances and rewrite it.
31896   # Note: m4 eats our [], so we need to use [ and ] instead.
31897   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31898   if test "x$has_forbidden_chars" != x; then
31899     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31900     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31901   fi
31902 
31903 
31904   windows_path="$new_path"
31905   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31906     unix_path=`$CYGPATH -u "$windows_path"`
31907     new_path="$unix_path"
31908   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31909     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31910     new_path="$unix_path"
31911   fi
31912 
31913   if test "x$path" != "x$new_path"; then
31914     ipath="$new_path"
31915     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31916 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31917   fi
31918 
31919   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31920   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31921 
31922     else
31923       # We're on a unix platform. Hooray! :)
31924       path="$ipath"
31925       has_space=`$ECHO "$path" | $GREP " "`
31926       if test "x$has_space" != x; then
31927         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31928 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31929         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31930       fi
31931 
31932       # Use eval to expand a potential ~
31933       eval path="$path"
31934       if test ! -f "$path" && test ! -d "$path"; then
31935         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
31936       fi
31937 
31938       if test -d "$path"; then
31939         ipath="`cd "$path"; $THEPWDCMD -L`"
31940       else
31941         dir="`$DIRNAME "$path"`"
31942         base="`$BASENAME "$path"`"
31943         ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
31944       fi
31945     fi
31946   fi
31947 
31948             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
31949           fi
31950           IFS=";"
31951         fi
31952       done
31953       # Convert VS_LIB into SYSROOT_LDFLAGS
31954       for i in $VS_LIB; do
31955         libpath=$i
31956         # Only process non-empty elements
31957         if test "x$libpath" != x; then
31958           IFS="$OLDIFS"
31959           # Check that directory exists before calling fixup_path
31960           testpath=$libpath
31961 
31962   windows_path="$testpath"
31963   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31964     unix_path=`$CYGPATH -u "$windows_path"`
31965     testpath="$unix_path"
31966   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31967     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31968     testpath="$unix_path"
31969   fi
31970 
31971           if test -d "$testpath"; then
31972 
31973   # Only process if variable expands to non-empty
31974 
31975   if test "x$libpath" != x; then
31976     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31977 
31978   # Input might be given as Windows format, start by converting to
31979   # unix format.
31980   path="$libpath"
31981   new_path=`$CYGPATH -u "$path"`
31982 
31983   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31984   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31985   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31986   # "foo.exe" is OK but "foo" is an error.
31987   #
31988   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31989   # It is also a way to make sure we got the proper file name for the real test later on.
31990   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31991   if test "x$test_shortpath" = x; then
31992     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31993 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31994     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
31995   fi
31996 
31997   # Call helper function which possibly converts this using DOS-style short mode.
31998   # If so, the updated path is stored in $new_path.
31999 
32000   input_path="$new_path"
32001   # Check if we need to convert this using DOS-style short mode. If the path
32002   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32003   # take no chances and rewrite it.
32004   # Note: m4 eats our [], so we need to use [ and ] instead.
32005   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32006   if test "x$has_forbidden_chars" != x; then
32007     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32008     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32009     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32010     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32011       # Going to short mode and back again did indeed matter. Since short mode is
32012       # case insensitive, let's make it lowercase to improve readability.
32013       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32014       # Now convert it back to Unix-style (cygpath)
32015       input_path=`$CYGPATH -u "$shortmode_path"`
32016       new_path="$input_path"
32017     fi
32018   fi
32019 
32020   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32021   if test "x$test_cygdrive_prefix" = x; then
32022     # As a simple fix, exclude /usr/bin since it's not a real path.
32023     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32024       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32025       # a path prefixed by /cygdrive for fixpath to work.
32026       new_path="$CYGWIN_ROOT_PATH$input_path"
32027     fi
32028   fi
32029 
32030 
32031   if test "x$path" != "x$new_path"; then
32032     libpath="$new_path"
32033     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32034 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32035   fi
32036 
32037     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32038 
32039   path="$libpath"
32040   has_colon=`$ECHO $path | $GREP ^.:`
32041   new_path="$path"
32042   if test "x$has_colon" = x; then
32043     # Not in mixed or Windows style, start by that.
32044     new_path=`cmd //c echo $path`
32045   fi
32046 
32047 
32048   input_path="$new_path"
32049   # Check if we need to convert this using DOS-style short mode. If the path
32050   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32051   # take no chances and rewrite it.
32052   # Note: m4 eats our [], so we need to use [ and ] instead.
32053   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32054   if test "x$has_forbidden_chars" != x; then
32055     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32056     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32057   fi
32058 
32059 
32060   windows_path="$new_path"
32061   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32062     unix_path=`$CYGPATH -u "$windows_path"`
32063     new_path="$unix_path"
32064   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32065     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32066     new_path="$unix_path"
32067   fi
32068 
32069   if test "x$path" != "x$new_path"; then
32070     libpath="$new_path"
32071     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32072 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32073   fi
32074 
32075   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32076   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32077 
32078     else
32079       # We're on a unix platform. Hooray! :)
32080       path="$libpath"
32081       has_space=`$ECHO "$path" | $GREP " "`
32082       if test "x$has_space" != x; then
32083         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32084 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32085         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32086       fi
32087 
32088       # Use eval to expand a potential ~
32089       eval path="$path"
32090       if test ! -f "$path" && test ! -d "$path"; then
32091         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32092       fi
32093 
32094       if test -d "$path"; then
32095         libpath="`cd "$path"; $THEPWDCMD -L`"
32096       else
32097         dir="`$DIRNAME "$path"`"
32098         base="`$BASENAME "$path"`"
32099         libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32100       fi
32101     fi
32102   fi
32103 
32104             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32105           fi
32106           IFS=";"
32107         fi
32108       done
32109       IFS="$OLDIFS"
32110     fi
32111   else
32112     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32113 $as_echo "not found" >&6; }
32114 
32115     if test "x$VS_ENV_CMD" = x; then
32116       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32117 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32118       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32119 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32120     else
32121       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32122 $as_echo "$as_me: Running the extraction script failed." >&6;}
32123     fi
32124     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32125 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32126     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32127 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32128     as_fn_error $? "Cannot continue" "$LINENO" 5
32129   fi
32130 
32131     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32132     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32133     PATH="$VS_PATH"
32134     # The microsoft toolchain also requires INCLUDE and LIB to be set.
32135     export INCLUDE="$VS_INCLUDE"
32136     export LIB="$VS_LIB"
32137   else
32138     if test "x$XCODE_VERSION_OUTPUT" != x; then
32139       # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32140       TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32141       TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32142     else
32143       # Currently we do not define this for other toolchains. This might change as the need arise.
32144       TOOLCHAIN_VERSION=
32145     fi
32146   fi
32147 
32148 
32149   # For solaris we really need solaris tools, and not the GNU equivalent.
32150   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32151   # so add that to path before starting to probe.
32152   # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32153   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32154     PATH="/usr/ccs/bin:$PATH"
32155   fi
32156 
32157   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32158   # override all other locations.
32159   if test "x$TOOLCHAIN_PATH" != x; then
32160     PATH=$TOOLCHAIN_PATH:$PATH
32161   fi
32162 
32163 
32164   #
32165   # Setup the compilers (CC and CXX)
32166   #
32167 
32168   COMPILER_NAME=C
32169   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32170 
32171   if test "x$CC" != x; then
32172     # User has supplied compiler name already, always let that override.
32173     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32174 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32175     if test "x`basename $CC`" = "x$CC"; then
32176       # A command without a complete path is provided, search $PATH.
32177 
32178       for ac_prog in $CC
32179 do
32180   # Extract the first word of "$ac_prog", so it can be a program name with args.
32181 set dummy $ac_prog; ac_word=$2
32182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32183 $as_echo_n "checking for $ac_word... " >&6; }
32184 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32185   $as_echo_n "(cached) " >&6
32186 else
32187   case $POTENTIAL_CC in
32188   [\\/]* | ?:[\\/]*)
32189   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32190   ;;
32191   *)
32192   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32193 for as_dir in $PATH
32194 do
32195   IFS=$as_save_IFS
32196   test -z "$as_dir" && as_dir=.
32197     for ac_exec_ext in '' $ac_executable_extensions; do
32198   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32199     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32200     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32201     break 2
32202   fi
32203 done
32204   done
32205 IFS=$as_save_IFS
32206 
32207   ;;
32208 esac
32209 fi
32210 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32211 if test -n "$POTENTIAL_CC"; then
32212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32213 $as_echo "$POTENTIAL_CC" >&6; }
32214 else
32215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32216 $as_echo "no" >&6; }
32217 fi
32218 
32219 
32220   test -n "$POTENTIAL_CC" && break
32221 done
32222 
32223       if test "x$POTENTIAL_CC" != x; then
32224         CC=$POTENTIAL_CC
32225       else
32226         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
32227       fi
32228     else
32229       # Otherwise it might already be a complete path
32230       if test ! -x "$CC"; then
32231         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
32232       fi
32233     fi
32234   else
32235     # No user supplied value. Locate compiler ourselves.
32236 
32237     # If we are cross compiling, assume cross compilation tools follows the
32238     # cross compilation standard where they are prefixed with the autoconf
32239     # standard name for the target. For example the binary
32240     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32241     # If we are not cross compiling, then the default compiler name will be
32242     # used.
32243 
32244     CC=
32245     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32246     # before checking the rest of the PATH.
32247     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32248     # step, this should not be necessary.
32249     if test -n "$TOOLCHAIN_PATH"; then
32250       PATH_save="$PATH"
32251       PATH="$TOOLCHAIN_PATH"
32252       for ac_prog in $SEARCH_LIST
32253 do
32254   # Extract the first word of "$ac_prog", so it can be a program name with args.
32255 set dummy $ac_prog; ac_word=$2
32256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32257 $as_echo_n "checking for $ac_word... " >&6; }
32258 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
32259   $as_echo_n "(cached) " >&6
32260 else
32261   case $TOOLCHAIN_PATH_CC in
32262   [\\/]* | ?:[\\/]*)
32263   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
32264   ;;
32265   *)
32266   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32267 for as_dir in $PATH
32268 do
32269   IFS=$as_save_IFS
32270   test -z "$as_dir" && as_dir=.
32271     for ac_exec_ext in '' $ac_executable_extensions; do
32272   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32273     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
32274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32275     break 2
32276   fi
32277 done
32278   done
32279 IFS=$as_save_IFS
32280 
32281   ;;
32282 esac
32283 fi
32284 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
32285 if test -n "$TOOLCHAIN_PATH_CC"; then
32286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
32287 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
32288 else
32289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32290 $as_echo "no" >&6; }
32291 fi
32292 
32293 
32294   test -n "$TOOLCHAIN_PATH_CC" && break
32295 done
32296 
32297       CC=$TOOLCHAIN_PATH_CC
32298       PATH="$PATH_save"
32299     fi
32300 
32301     # AC_PATH_PROGS can't be run multiple times with the same variable,
32302     # so create a new name for this run.
32303     if test "x$CC" = x; then
32304       for ac_prog in $SEARCH_LIST
32305 do
32306   # Extract the first word of "$ac_prog", so it can be a program name with args.
32307 set dummy $ac_prog; ac_word=$2
32308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32309 $as_echo_n "checking for $ac_word... " >&6; }
32310 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32311   $as_echo_n "(cached) " >&6
32312 else
32313   case $POTENTIAL_CC in
32314   [\\/]* | ?:[\\/]*)
32315   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32316   ;;
32317   *)
32318   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32319 for as_dir in $PATH
32320 do
32321   IFS=$as_save_IFS
32322   test -z "$as_dir" && as_dir=.
32323     for ac_exec_ext in '' $ac_executable_extensions; do
32324   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32325     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32327     break 2
32328   fi
32329 done
32330   done
32331 IFS=$as_save_IFS
32332 
32333   ;;
32334 esac
32335 fi
32336 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32337 if test -n "$POTENTIAL_CC"; then
32338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32339 $as_echo "$POTENTIAL_CC" >&6; }
32340 else
32341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32342 $as_echo "no" >&6; }
32343 fi
32344 
32345 
32346   test -n "$POTENTIAL_CC" && break
32347 done
32348 
32349       CC=$POTENTIAL_CC
32350     fi
32351 
32352     if test "x$CC" = x; then
32353 
32354   # Print a helpful message on how to acquire the necessary build dependency.
32355   # devkit is the help tag: freetype, cups, alsa etc
32356   MISSING_DEPENDENCY=devkit
32357 
32358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32359     cygwin_help $MISSING_DEPENDENCY
32360   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32361     msys_help $MISSING_DEPENDENCY
32362   else
32363     PKGHANDLER_COMMAND=
32364 
32365     case $PKGHANDLER in
32366       apt-get)
32367         apt_help     $MISSING_DEPENDENCY ;;
32368       yum)
32369         yum_help     $MISSING_DEPENDENCY ;;
32370       port)
32371         port_help    $MISSING_DEPENDENCY ;;
32372       pkgutil)
32373         pkgutil_help $MISSING_DEPENDENCY ;;
32374       pkgadd)
32375         pkgadd_help  $MISSING_DEPENDENCY ;;
32376     esac
32377 
32378     if test "x$PKGHANDLER_COMMAND" != x; then
32379       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32380     fi
32381   fi
32382 
32383       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32384     fi
32385   fi
32386 
32387   # Now we have a compiler binary in CC. Make sure it's okay.
32388 
32389   # Only process if variable expands to non-empty
32390 
32391   if test "x$CC" != x; then
32392     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32393 
32394   # First separate the path from the arguments. This will split at the first
32395   # space.
32396   complete="$CC"
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=`$CYGPATH -u "$path"`
32404 
32405   # Now try to locate executable using which
32406   new_path=`$WHICH "$new_path" 2> /dev/null`
32407   # bat and cmd files are not always considered executable in cygwin causing which
32408   # to not find them
32409   if test "x$new_path" = x \
32410       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32411       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32412     new_path=`$CYGPATH -u "$path"`
32413   fi
32414   if test "x$new_path" = x; then
32415     # Oops. Which didn't find the executable.
32416     # The splitting of arguments from the executable at a space might have been incorrect,
32417     # since paths with space are more likely in Windows. Give it another try with the whole
32418     # argument.
32419     path="$complete"
32420     arguments="EOL"
32421     new_path=`$CYGPATH -u "$path"`
32422     new_path=`$WHICH "$new_path" 2> /dev/null`
32423     # bat and cmd files are not always considered executable in cygwin causing which
32424     # to not find them
32425     if test "x$new_path" = x \
32426         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32427         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32428       new_path=`$CYGPATH -u "$path"`
32429     fi
32430     if test "x$new_path" = x; then
32431       # It's still not found. Now this is an unrecoverable error.
32432       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32433 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32434       has_space=`$ECHO "$complete" | $GREP " "`
32435       if test "x$has_space" != x; then
32436         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32437 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32438       fi
32439       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32440     fi
32441   fi
32442 
32443   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32444   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32445   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32446   # "foo.exe" is OK but "foo" is an error.
32447   #
32448   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32449   # It is also a way to make sure we got the proper file name for the real test later on.
32450   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32451   if test "x$test_shortpath" = x; then
32452     # Short path failed, file does not exist as specified.
32453     # Try adding .exe or .cmd
32454     if test -f "${new_path}.exe"; then
32455       input_to_shortpath="${new_path}.exe"
32456     elif test -f "${new_path}.cmd"; then
32457       input_to_shortpath="${new_path}.cmd"
32458     else
32459       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
32460 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
32461       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32462 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32463       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32464     fi
32465   else
32466     input_to_shortpath="$new_path"
32467   fi
32468 
32469   # Call helper function which possibly converts this using DOS-style short mode.
32470   # If so, the updated path is stored in $new_path.
32471   new_path="$input_to_shortpath"
32472 
32473   input_path="$input_to_shortpath"
32474   # Check if we need to convert this using DOS-style short mode. If the path
32475   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32476   # take no chances and rewrite it.
32477   # Note: m4 eats our [], so we need to use [ and ] instead.
32478   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32479   if test "x$has_forbidden_chars" != x; then
32480     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32481     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32482     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32483     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32484       # Going to short mode and back again did indeed matter. Since short mode is
32485       # case insensitive, let's make it lowercase to improve readability.
32486       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32487       # Now convert it back to Unix-style (cygpath)
32488       input_path=`$CYGPATH -u "$shortmode_path"`
32489       new_path="$input_path"
32490     fi
32491   fi
32492 
32493   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32494   if test "x$test_cygdrive_prefix" = x; then
32495     # As a simple fix, exclude /usr/bin since it's not a real path.
32496     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32497       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32498       # a path prefixed by /cygdrive for fixpath to work.
32499       new_path="$CYGWIN_ROOT_PATH$input_path"
32500     fi
32501   fi
32502 
32503   # remove trailing .exe if any
32504   new_path="${new_path/%.exe/}"
32505 
32506     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32507 
32508   # First separate the path from the arguments. This will split at the first
32509   # space.
32510   complete="$CC"
32511   path="${complete%% *}"
32512   tmp="$complete EOL"
32513   arguments="${tmp#* }"
32514 
32515   # Input might be given as Windows format, start by converting to
32516   # unix format.
32517   new_path="$path"
32518 
32519   windows_path="$new_path"
32520   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32521     unix_path=`$CYGPATH -u "$windows_path"`
32522     new_path="$unix_path"
32523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32524     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32525     new_path="$unix_path"
32526   fi
32527 
32528 
32529   # Now try to locate executable using which
32530   new_path=`$WHICH "$new_path" 2> /dev/null`
32531 
32532   if test "x$new_path" = x; then
32533     # Oops. Which didn't find the executable.
32534     # The splitting of arguments from the executable at a space might have been incorrect,
32535     # since paths with space are more likely in Windows. Give it another try with the whole
32536     # argument.
32537     path="$complete"
32538     arguments="EOL"
32539     new_path="$path"
32540 
32541   windows_path="$new_path"
32542   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32543     unix_path=`$CYGPATH -u "$windows_path"`
32544     new_path="$unix_path"
32545   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32546     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32547     new_path="$unix_path"
32548   fi
32549 
32550 
32551     new_path=`$WHICH "$new_path" 2> /dev/null`
32552     # bat and cmd files are not always considered executable in MSYS causing which
32553     # to not find them
32554     if test "x$new_path" = x \
32555         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32556         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32557       new_path="$path"
32558 
32559   windows_path="$new_path"
32560   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32561     unix_path=`$CYGPATH -u "$windows_path"`
32562     new_path="$unix_path"
32563   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32564     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32565     new_path="$unix_path"
32566   fi
32567 
32568     fi
32569 
32570     if test "x$new_path" = x; then
32571       # It's still not found. Now this is an unrecoverable error.
32572       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32573 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32574       has_space=`$ECHO "$complete" | $GREP " "`
32575       if test "x$has_space" != x; then
32576         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32577 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32578       fi
32579       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32580     fi
32581   fi
32582 
32583   # Now new_path has a complete unix path to the binary
32584   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32585     # Keep paths in /bin as-is, but remove trailing .exe if any
32586     new_path="${new_path/%.exe/}"
32587     # Do not save /bin paths to all_fixpath_prefixes!
32588   else
32589     # Not in mixed or Windows style, start by that.
32590     new_path=`cmd //c echo $new_path`
32591 
32592   input_path="$new_path"
32593   # Check if we need to convert this using DOS-style short mode. If the path
32594   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32595   # take no chances and rewrite it.
32596   # Note: m4 eats our [], so we need to use [ and ] instead.
32597   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32598   if test "x$has_forbidden_chars" != x; then
32599     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32600     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32601   fi
32602 
32603     # Output is in $new_path
32604 
32605   windows_path="$new_path"
32606   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32607     unix_path=`$CYGPATH -u "$windows_path"`
32608     new_path="$unix_path"
32609   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32610     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32611     new_path="$unix_path"
32612   fi
32613 
32614     # remove trailing .exe if any
32615     new_path="${new_path/%.exe/}"
32616 
32617     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32618     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32619   fi
32620 
32621     else
32622       # We're on a unix platform. Hooray! :)
32623       # First separate the path from the arguments. This will split at the first
32624       # space.
32625       complete="$CC"
32626       path="${complete%% *}"
32627       tmp="$complete EOL"
32628       arguments="${tmp#* }"
32629 
32630       # Cannot rely on the command "which" here since it doesn't always work.
32631       is_absolute_path=`$ECHO "$path" | $GREP ^/`
32632       if test -z "$is_absolute_path"; then
32633         # Path to executable is not absolute. Find it.
32634         IFS_save="$IFS"
32635         IFS=:
32636         for p in $PATH; do
32637           if test -f "$p/$path" && test -x "$p/$path"; then
32638             new_path="$p/$path"
32639             break
32640           fi
32641         done
32642         IFS="$IFS_save"
32643       else
32644         # This is an absolute path, we can use it without further modifications.
32645         new_path="$path"
32646       fi
32647 
32648       if test "x$new_path" = x; then
32649         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32650 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32651         has_space=`$ECHO "$complete" | $GREP " "`
32652         if test "x$has_space" != x; then
32653           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32654 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32655         fi
32656         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32657       fi
32658     fi
32659 
32660     # Now join together the path and the arguments once again
32661     if test "x$arguments" != xEOL; then
32662       new_complete="$new_path ${arguments% *}"
32663     else
32664       new_complete="$new_path"
32665     fi
32666 
32667     if test "x$complete" != "x$new_complete"; then
32668       CC="$new_complete"
32669       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
32670 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
32671     fi
32672   fi
32673 
32674   TEST_COMPILER="$CC"
32675 
32676   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
32677 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
32678   SYMLINK_ORIGINAL="$TEST_COMPILER"
32679 
32680   if test "x$OPENJDK_BUILD_OS" != xwindows; then
32681     # Follow a chain of symbolic links. Use readlink
32682     # where it exists, else fall back to horribly
32683     # complicated shell code.
32684     if test "x$READLINK_TESTED" != yes; then
32685       # On MacOSX there is a readlink tool with a different
32686       # purpose than the GNU readlink tool. Check the found readlink.
32687       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32688       if test "x$ISGNU" = x; then
32689         # A readlink that we do not know how to use.
32690         # Are there other non-GNU readlinks out there?
32691         READLINK_TESTED=yes
32692         READLINK=
32693       fi
32694     fi
32695 
32696     if test "x$READLINK" != x; then
32697       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
32698     else
32699       # Save the current directory for restoring afterwards
32700       STARTDIR=$PWD
32701       COUNTER=0
32702       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
32703       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
32704       cd $sym_link_dir
32705       # Use -P flag to resolve symlinks in directories.
32706       cd `$THEPWDCMD -P`
32707       sym_link_dir=`$THEPWDCMD -P`
32708       # Resolve file symlinks
32709       while test $COUNTER -lt 20; do
32710         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32711         if test "x$ISLINK" == x; then
32712           # This is not a symbolic link! We are done!
32713           break
32714         fi
32715         # Again resolve directory symlinks since the target of the just found
32716         # link could be in a different directory
32717         cd `$DIRNAME $ISLINK`
32718         sym_link_dir=`$THEPWDCMD -P`
32719         sym_link_file=`$BASENAME $ISLINK`
32720         let COUNTER=COUNTER+1
32721       done
32722       cd $STARTDIR
32723       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
32724     fi
32725   fi
32726 
32727   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
32728     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
32729 $as_echo "no symlink" >&6; }
32730   else
32731     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
32732 $as_echo "$SYMLINK_ORIGINAL" >&6; }
32733 
32734     # We can't handle ccache by gcc wrappers, since we need to know if we're
32735     # using ccache. Instead ccache usage must be controlled by a configure option.
32736     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
32737     if test "x$COMPILER_BASENAME" = "xccache"; then
32738       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
32739 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
32740       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
32741     fi
32742   fi
32743 
32744 
32745   COMPILER=$CC
32746   COMPILER_NAME=$COMPILER_NAME
32747 
32748   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32749     # cc -V output typically looks like
32750     #     cc: Sun C 5.12 Linux_i386 2011/11/16
32751     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32752     # Check that this is likely to be the Solaris Studio cc.
32753     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32754     if test $? -ne 0; then
32755       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32756       { $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
32757 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32758       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32759 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32760       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32761 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32762       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32763     fi
32764     # Remove usage instructions (if present), and
32765     # collapse compiler output into a single line
32766     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32767         $SED -e 's/ *[Uu]sage:.*//'`
32768     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32769         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32770   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32771     # xlc -qversion output typically looks like
32772     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32773     #     Version: 11.01.0000.0015
32774     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32775     # Check that this is likely to be the IBM XL C compiler.
32776     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32777     if test $? -ne 0; then
32778       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32779       { $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
32780 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32781       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32782 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32783       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32784 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32785       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32786     fi
32787     # Collapse compiler output into a single line
32788     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32789     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32790         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32791   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32792     # There is no specific version flag, but all output starts with a version string.
32793     # First line typically looks something like:
32794     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32795     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32796     # Check that this is likely to be Microsoft CL.EXE.
32797     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32798     if test $? -ne 0; then
32799       { $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
32800 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32801       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32802 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32803       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32804     fi
32805     # Collapse compiler output into a single line
32806     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32807     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32808         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32809   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32810     # gcc --version output typically looks like
32811     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32812     #     Copyright (C) 2013 Free Software Foundation, Inc.
32813     #     This is free software; see the source for copying conditions.  There is NO
32814     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32815     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32816     # Check that this is likely to be GCC.
32817     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32818     if test $? -ne 0; then
32819       { $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
32820 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32821       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32822 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32823       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32824     fi
32825     # Remove Copyright and legalese from version string, and
32826     # collapse into a single line
32827     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32828         $SED -e 's/ *Copyright .*//'`
32829     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32830         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
32831   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32832     # clang --version output typically looks like
32833     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32834     #    clang version 3.3 (tags/RELEASE_33/final)
32835     # or
32836     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32837     #    Target: x86_64-pc-linux-gnu
32838     #    Thread model: posix
32839     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32840     # Check that this is likely to be clang
32841     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32842     if test $? -ne 0; then
32843       { $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
32844 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32845       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32846 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32847       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32848     fi
32849     # Collapse compiler output into a single line
32850     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32851     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32852         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
32853   else
32854       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32855   fi
32856   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32857   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32858   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32859   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32860 
32861   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32862 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32863 
32864 
32865   # Now that we have resolved CC ourself, let autoconf have its go at it
32866   ac_ext=c
32867 ac_cpp='$CPP $CPPFLAGS'
32868 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32869 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32870 ac_compiler_gnu=$ac_cv_c_compiler_gnu
32871 if test -n "$ac_tool_prefix"; then
32872   for ac_prog in $CC
32873   do
32874     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32875 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32877 $as_echo_n "checking for $ac_word... " >&6; }
32878 if ${ac_cv_prog_CC+:} false; then :
32879   $as_echo_n "(cached) " >&6
32880 else
32881   if test -n "$CC"; then
32882   ac_cv_prog_CC="$CC" # Let the user override the test.
32883 else
32884 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32885 for as_dir in $PATH
32886 do
32887   IFS=$as_save_IFS
32888   test -z "$as_dir" && as_dir=.
32889     for ac_exec_ext in '' $ac_executable_extensions; do
32890   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32891     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32892     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32893     break 2
32894   fi
32895 done
32896   done
32897 IFS=$as_save_IFS
32898 
32899 fi
32900 fi
32901 CC=$ac_cv_prog_CC
32902 if test -n "$CC"; then
32903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32904 $as_echo "$CC" >&6; }
32905 else
32906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32907 $as_echo "no" >&6; }
32908 fi
32909 
32910 
32911     test -n "$CC" && break
32912   done
32913 fi
32914 if test -z "$CC"; then
32915   ac_ct_CC=$CC
32916   for ac_prog in $CC
32917 do
32918   # Extract the first word of "$ac_prog", so it can be a program name with args.
32919 set dummy $ac_prog; ac_word=$2
32920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32921 $as_echo_n "checking for $ac_word... " >&6; }
32922 if ${ac_cv_prog_ac_ct_CC+:} false; then :
32923   $as_echo_n "(cached) " >&6
32924 else
32925   if test -n "$ac_ct_CC"; then
32926   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32927 else
32928 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32929 for as_dir in $PATH
32930 do
32931   IFS=$as_save_IFS
32932   test -z "$as_dir" && as_dir=.
32933     for ac_exec_ext in '' $ac_executable_extensions; do
32934   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32935     ac_cv_prog_ac_ct_CC="$ac_prog"
32936     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32937     break 2
32938   fi
32939 done
32940   done
32941 IFS=$as_save_IFS
32942 
32943 fi
32944 fi
32945 ac_ct_CC=$ac_cv_prog_ac_ct_CC
32946 if test -n "$ac_ct_CC"; then
32947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32948 $as_echo "$ac_ct_CC" >&6; }
32949 else
32950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32951 $as_echo "no" >&6; }
32952 fi
32953 
32954 
32955   test -n "$ac_ct_CC" && break
32956 done
32957 
32958   if test "x$ac_ct_CC" = x; then
32959     CC=""
32960   else
32961     case $cross_compiling:$ac_tool_warned in
32962 yes:)
32963 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32964 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32965 ac_tool_warned=yes ;;
32966 esac
32967     CC=$ac_ct_CC
32968   fi
32969 fi
32970 
32971 
32972 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32973 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32974 as_fn_error $? "no acceptable C compiler found in \$PATH
32975 See \`config.log' for more details" "$LINENO" 5; }
32976 
32977 # Provide some information about the compiler.
32978 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32979 set X $ac_compile
32980 ac_compiler=$2
32981 for ac_option in --version -v -V -qversion; do
32982   { { ac_try="$ac_compiler $ac_option >&5"
32983 case "(($ac_try" in
32984   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32985   *) ac_try_echo=$ac_try;;
32986 esac
32987 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32988 $as_echo "$ac_try_echo"; } >&5
32989   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32990   ac_status=$?
32991   if test -s conftest.err; then
32992     sed '10a\
32993 ... rest of stderr output deleted ...
32994          10q' conftest.err >conftest.er1
32995     cat conftest.er1 >&5
32996   fi
32997   rm -f conftest.er1 conftest.err
32998   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32999   test $ac_status = 0; }
33000 done
33001 
33002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33003 /* end confdefs.h.  */
33004 
33005 int
33006 main ()
33007 {
33008 
33009   ;
33010   return 0;
33011 }
33012 _ACEOF
33013 ac_clean_files_save=$ac_clean_files
33014 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33015 # Try to create an executable without -o first, disregard a.out.
33016 # It will help us diagnose broken compilers, and finding out an intuition
33017 # of exeext.
33018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33019 $as_echo_n "checking whether the C compiler works... " >&6; }
33020 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33021 
33022 # The possible output files:
33023 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33024 
33025 ac_rmfiles=
33026 for ac_file in $ac_files
33027 do
33028   case $ac_file in
33029     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33030     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33031   esac
33032 done
33033 rm -f $ac_rmfiles
33034 
33035 if { { ac_try="$ac_link_default"
33036 case "(($ac_try" in
33037   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33038   *) ac_try_echo=$ac_try;;
33039 esac
33040 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33041 $as_echo "$ac_try_echo"; } >&5
33042   (eval "$ac_link_default") 2>&5
33043   ac_status=$?
33044   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33045   test $ac_status = 0; }; then :
33046   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33047 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33048 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
33049 # so that the user can short-circuit this test for compilers unknown to
33050 # Autoconf.
33051 for ac_file in $ac_files ''
33052 do
33053   test -f "$ac_file" || continue
33054   case $ac_file in
33055     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33056         ;;
33057     [ab].out )
33058         # We found the default executable, but exeext='' is most
33059         # certainly right.
33060         break;;
33061     *.* )
33062         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33063         then :; else
33064            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33065         fi
33066         # We set ac_cv_exeext here because the later test for it is not
33067         # safe: cross compilers may not add the suffix if given an `-o'
33068         # argument, so we may need to know it at that point already.
33069         # Even if this section looks crufty: it has the advantage of
33070         # actually working.
33071         break;;
33072     * )
33073         break;;
33074   esac
33075 done
33076 test "$ac_cv_exeext" = no && ac_cv_exeext=
33077 
33078 else
33079   ac_file=''
33080 fi
33081 if test -z "$ac_file"; then :
33082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33083 $as_echo "no" >&6; }
33084 $as_echo "$as_me: failed program was:" >&5
33085 sed 's/^/| /' conftest.$ac_ext >&5
33086 
33087 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33088 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33089 as_fn_error 77 "C compiler cannot create executables
33090 See \`config.log' for more details" "$LINENO" 5; }
33091 else
33092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33093 $as_echo "yes" >&6; }
33094 fi
33095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33096 $as_echo_n "checking for C compiler default output file name... " >&6; }
33097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33098 $as_echo "$ac_file" >&6; }
33099 ac_exeext=$ac_cv_exeext
33100 
33101 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33102 ac_clean_files=$ac_clean_files_save
33103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33104 $as_echo_n "checking for suffix of executables... " >&6; }
33105 if { { ac_try="$ac_link"
33106 case "(($ac_try" in
33107   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33108   *) ac_try_echo=$ac_try;;
33109 esac
33110 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33111 $as_echo "$ac_try_echo"; } >&5
33112   (eval "$ac_link") 2>&5
33113   ac_status=$?
33114   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33115   test $ac_status = 0; }; then :
33116   # If both `conftest.exe' and `conftest' are `present' (well, observable)
33117 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33118 # work properly (i.e., refer to `conftest.exe'), while it won't with
33119 # `rm'.
33120 for ac_file in conftest.exe conftest conftest.*; do
33121   test -f "$ac_file" || continue
33122   case $ac_file in
33123     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33124     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33125           break;;
33126     * ) break;;
33127   esac
33128 done
33129 else
33130   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33131 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33132 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33133 See \`config.log' for more details" "$LINENO" 5; }
33134 fi
33135 rm -f conftest conftest$ac_cv_exeext
33136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33137 $as_echo "$ac_cv_exeext" >&6; }
33138 
33139 rm -f conftest.$ac_ext
33140 EXEEXT=$ac_cv_exeext
33141 ac_exeext=$EXEEXT
33142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33143 /* end confdefs.h.  */
33144 #include <stdio.h>
33145 int
33146 main ()
33147 {
33148 FILE *f = fopen ("conftest.out", "w");
33149  return ferror (f) || fclose (f) != 0;
33150 
33151   ;
33152   return 0;
33153 }
33154 _ACEOF
33155 ac_clean_files="$ac_clean_files conftest.out"
33156 # Check that the compiler produces executables we can run.  If not, either
33157 # the compiler is broken, or we cross compile.
33158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33159 $as_echo_n "checking whether we are cross compiling... " >&6; }
33160 if test "$cross_compiling" != yes; then
33161   { { ac_try="$ac_link"
33162 case "(($ac_try" in
33163   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33164   *) ac_try_echo=$ac_try;;
33165 esac
33166 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33167 $as_echo "$ac_try_echo"; } >&5
33168   (eval "$ac_link") 2>&5
33169   ac_status=$?
33170   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33171   test $ac_status = 0; }
33172   if { ac_try='./conftest$ac_cv_exeext'
33173   { { case "(($ac_try" in
33174   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33175   *) ac_try_echo=$ac_try;;
33176 esac
33177 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33178 $as_echo "$ac_try_echo"; } >&5
33179   (eval "$ac_try") 2>&5
33180   ac_status=$?
33181   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33182   test $ac_status = 0; }; }; then
33183     cross_compiling=no
33184   else
33185     if test "$cross_compiling" = maybe; then
33186         cross_compiling=yes
33187     else
33188         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33189 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33190 as_fn_error $? "cannot run C compiled programs.
33191 If you meant to cross compile, use \`--host'.
33192 See \`config.log' for more details" "$LINENO" 5; }
33193     fi
33194   fi
33195 fi
33196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
33197 $as_echo "$cross_compiling" >&6; }
33198 
33199 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
33200 ac_clean_files=$ac_clean_files_save
33201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
33202 $as_echo_n "checking for suffix of object files... " >&6; }
33203 if ${ac_cv_objext+:} false; then :
33204   $as_echo_n "(cached) " >&6
33205 else
33206   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33207 /* end confdefs.h.  */
33208 
33209 int
33210 main ()
33211 {
33212 
33213   ;
33214   return 0;
33215 }
33216 _ACEOF
33217 rm -f conftest.o conftest.obj
33218 if { { ac_try="$ac_compile"
33219 case "(($ac_try" in
33220   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33221   *) ac_try_echo=$ac_try;;
33222 esac
33223 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33224 $as_echo "$ac_try_echo"; } >&5
33225   (eval "$ac_compile") 2>&5
33226   ac_status=$?
33227   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33228   test $ac_status = 0; }; then :
33229   for ac_file in conftest.o conftest.obj conftest.*; do
33230   test -f "$ac_file" || continue;
33231   case $ac_file in
33232     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
33233     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
33234        break;;
33235   esac
33236 done
33237 else
33238   $as_echo "$as_me: failed program was:" >&5
33239 sed 's/^/| /' conftest.$ac_ext >&5
33240 
33241 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33242 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33243 as_fn_error $? "cannot compute suffix of object files: cannot compile
33244 See \`config.log' for more details" "$LINENO" 5; }
33245 fi
33246 rm -f conftest.$ac_cv_objext conftest.$ac_ext
33247 fi
33248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33249 $as_echo "$ac_cv_objext" >&6; }
33250 OBJEXT=$ac_cv_objext
33251 ac_objext=$OBJEXT
33252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33253 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33254 if ${ac_cv_c_compiler_gnu+:} false; then :
33255   $as_echo_n "(cached) " >&6
33256 else
33257   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33258 /* end confdefs.h.  */
33259 
33260 int
33261 main ()
33262 {
33263 #ifndef __GNUC__
33264        choke me
33265 #endif
33266 
33267   ;
33268   return 0;
33269 }
33270 _ACEOF
33271 if ac_fn_c_try_compile "$LINENO"; then :
33272   ac_compiler_gnu=yes
33273 else
33274   ac_compiler_gnu=no
33275 fi
33276 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33277 ac_cv_c_compiler_gnu=$ac_compiler_gnu
33278 
33279 fi
33280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33281 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
33282 if test $ac_compiler_gnu = yes; then
33283   GCC=yes
33284 else
33285   GCC=
33286 fi
33287 ac_test_CFLAGS=${CFLAGS+set}
33288 ac_save_CFLAGS=$CFLAGS
33289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33290 $as_echo_n "checking whether $CC accepts -g... " >&6; }
33291 if ${ac_cv_prog_cc_g+:} false; then :
33292   $as_echo_n "(cached) " >&6
33293 else
33294   ac_save_c_werror_flag=$ac_c_werror_flag
33295    ac_c_werror_flag=yes
33296    ac_cv_prog_cc_g=no
33297    CFLAGS="-g"
33298    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33299 /* end confdefs.h.  */
33300 
33301 int
33302 main ()
33303 {
33304 
33305   ;
33306   return 0;
33307 }
33308 _ACEOF
33309 if ac_fn_c_try_compile "$LINENO"; then :
33310   ac_cv_prog_cc_g=yes
33311 else
33312   CFLAGS=""
33313       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33314 /* end confdefs.h.  */
33315 
33316 int
33317 main ()
33318 {
33319 
33320   ;
33321   return 0;
33322 }
33323 _ACEOF
33324 if ac_fn_c_try_compile "$LINENO"; then :
33325 
33326 else
33327   ac_c_werror_flag=$ac_save_c_werror_flag
33328          CFLAGS="-g"
33329          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33330 /* end confdefs.h.  */
33331 
33332 int
33333 main ()
33334 {
33335 
33336   ;
33337   return 0;
33338 }
33339 _ACEOF
33340 if ac_fn_c_try_compile "$LINENO"; then :
33341   ac_cv_prog_cc_g=yes
33342 fi
33343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33344 fi
33345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33346 fi
33347 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33348    ac_c_werror_flag=$ac_save_c_werror_flag
33349 fi
33350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33351 $as_echo "$ac_cv_prog_cc_g" >&6; }
33352 if test "$ac_test_CFLAGS" = set; then
33353   CFLAGS=$ac_save_CFLAGS
33354 elif test $ac_cv_prog_cc_g = yes; then
33355   if test "$GCC" = yes; then
33356     CFLAGS="-g -O2"
33357   else
33358     CFLAGS="-g"
33359   fi
33360 else
33361   if test "$GCC" = yes; then
33362     CFLAGS="-O2"
33363   else
33364     CFLAGS=
33365   fi
33366 fi
33367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33368 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33369 if ${ac_cv_prog_cc_c89+:} false; then :
33370   $as_echo_n "(cached) " >&6
33371 else
33372   ac_cv_prog_cc_c89=no
33373 ac_save_CC=$CC
33374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33375 /* end confdefs.h.  */
33376 #include <stdarg.h>
33377 #include <stdio.h>
33378 struct stat;
33379 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33380 struct buf { int x; };
33381 FILE * (*rcsopen) (struct buf *, struct stat *, int);
33382 static char *e (p, i)
33383      char **p;
33384      int i;
33385 {
33386   return p[i];
33387 }
33388 static char *f (char * (*g) (char **, int), char **p, ...)
33389 {
33390   char *s;
33391   va_list v;
33392   va_start (v,p);
33393   s = g (p, va_arg (v,int));
33394   va_end (v);
33395   return s;
33396 }
33397 
33398 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33399    function prototypes and stuff, but not '\xHH' hex character constants.
33400    These don't provoke an error unfortunately, instead are silently treated
33401    as 'x'.  The following induces an error, until -std is added to get
33402    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33403    array size at least.  It's necessary to write '\x00'==0 to get something
33404    that's true only with -std.  */
33405 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33406 
33407 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33408    inside strings and character constants.  */
33409 #define FOO(x) 'x'
33410 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33411 
33412 int test (int i, double x);
33413 struct s1 {int (*f) (int a);};
33414 struct s2 {int (*f) (double a);};
33415 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33416 int argc;
33417 char **argv;
33418 int
33419 main ()
33420 {
33421 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33422   ;
33423   return 0;
33424 }
33425 _ACEOF
33426 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33427         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33428 do
33429   CC="$ac_save_CC $ac_arg"
33430   if ac_fn_c_try_compile "$LINENO"; then :
33431   ac_cv_prog_cc_c89=$ac_arg
33432 fi
33433 rm -f core conftest.err conftest.$ac_objext
33434   test "x$ac_cv_prog_cc_c89" != "xno" && break
33435 done
33436 rm -f conftest.$ac_ext
33437 CC=$ac_save_CC
33438 
33439 fi
33440 # AC_CACHE_VAL
33441 case "x$ac_cv_prog_cc_c89" in
33442   x)
33443     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33444 $as_echo "none needed" >&6; } ;;
33445   xno)
33446     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33447 $as_echo "unsupported" >&6; } ;;
33448   *)
33449     CC="$CC $ac_cv_prog_cc_c89"
33450     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33451 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33452 esac
33453 if test "x$ac_cv_prog_cc_c89" != xno; then :
33454 
33455 fi
33456 
33457 ac_ext=cpp
33458 ac_cpp='$CXXCPP $CPPFLAGS'
33459 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33460 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33461 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33462 
33463 
33464 
33465   COMPILER_NAME=C++
33466   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33467 
33468   if test "x$CXX" != x; then
33469     # User has supplied compiler name already, always let that override.
33470     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33471 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33472     if test "x`basename $CXX`" = "x$CXX"; then
33473       # A command without a complete path is provided, search $PATH.
33474 
33475       for ac_prog in $CXX
33476 do
33477   # Extract the first word of "$ac_prog", so it can be a program name with args.
33478 set dummy $ac_prog; ac_word=$2
33479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33480 $as_echo_n "checking for $ac_word... " >&6; }
33481 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33482   $as_echo_n "(cached) " >&6
33483 else
33484   case $POTENTIAL_CXX in
33485   [\\/]* | ?:[\\/]*)
33486   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33487   ;;
33488   *)
33489   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33490 for as_dir in $PATH
33491 do
33492   IFS=$as_save_IFS
33493   test -z "$as_dir" && as_dir=.
33494     for ac_exec_ext in '' $ac_executable_extensions; do
33495   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33496     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33497     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33498     break 2
33499   fi
33500 done
33501   done
33502 IFS=$as_save_IFS
33503 
33504   ;;
33505 esac
33506 fi
33507 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33508 if test -n "$POTENTIAL_CXX"; then
33509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33510 $as_echo "$POTENTIAL_CXX" >&6; }
33511 else
33512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33513 $as_echo "no" >&6; }
33514 fi
33515 
33516 
33517   test -n "$POTENTIAL_CXX" && break
33518 done
33519 
33520       if test "x$POTENTIAL_CXX" != x; then
33521         CXX=$POTENTIAL_CXX
33522       else
33523         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33524       fi
33525     else
33526       # Otherwise it might already be a complete path
33527       if test ! -x "$CXX"; then
33528         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33529       fi
33530     fi
33531   else
33532     # No user supplied value. Locate compiler ourselves.
33533 
33534     # If we are cross compiling, assume cross compilation tools follows the
33535     # cross compilation standard where they are prefixed with the autoconf
33536     # standard name for the target. For example the binary
33537     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33538     # If we are not cross compiling, then the default compiler name will be
33539     # used.
33540 
33541     CXX=
33542     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33543     # before checking the rest of the PATH.
33544     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33545     # step, this should not be necessary.
33546     if test -n "$TOOLCHAIN_PATH"; then
33547       PATH_save="$PATH"
33548       PATH="$TOOLCHAIN_PATH"
33549       for ac_prog in $SEARCH_LIST
33550 do
33551   # Extract the first word of "$ac_prog", so it can be a program name with args.
33552 set dummy $ac_prog; ac_word=$2
33553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33554 $as_echo_n "checking for $ac_word... " >&6; }
33555 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33556   $as_echo_n "(cached) " >&6
33557 else
33558   case $TOOLCHAIN_PATH_CXX in
33559   [\\/]* | ?:[\\/]*)
33560   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33561   ;;
33562   *)
33563   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33564 for as_dir in $PATH
33565 do
33566   IFS=$as_save_IFS
33567   test -z "$as_dir" && as_dir=.
33568     for ac_exec_ext in '' $ac_executable_extensions; do
33569   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33570     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33571     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33572     break 2
33573   fi
33574 done
33575   done
33576 IFS=$as_save_IFS
33577 
33578   ;;
33579 esac
33580 fi
33581 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33582 if test -n "$TOOLCHAIN_PATH_CXX"; then
33583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33584 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33585 else
33586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33587 $as_echo "no" >&6; }
33588 fi
33589 
33590 
33591   test -n "$TOOLCHAIN_PATH_CXX" && break
33592 done
33593 
33594       CXX=$TOOLCHAIN_PATH_CXX
33595       PATH="$PATH_save"
33596     fi
33597 
33598     # AC_PATH_PROGS can't be run multiple times with the same variable,
33599     # so create a new name for this run.
33600     if test "x$CXX" = x; then
33601       for ac_prog in $SEARCH_LIST
33602 do
33603   # Extract the first word of "$ac_prog", so it can be a program name with args.
33604 set dummy $ac_prog; ac_word=$2
33605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33606 $as_echo_n "checking for $ac_word... " >&6; }
33607 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33608   $as_echo_n "(cached) " >&6
33609 else
33610   case $POTENTIAL_CXX in
33611   [\\/]* | ?:[\\/]*)
33612   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33613   ;;
33614   *)
33615   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33616 for as_dir in $PATH
33617 do
33618   IFS=$as_save_IFS
33619   test -z "$as_dir" && as_dir=.
33620     for ac_exec_ext in '' $ac_executable_extensions; do
33621   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33622     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33623     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33624     break 2
33625   fi
33626 done
33627   done
33628 IFS=$as_save_IFS
33629 
33630   ;;
33631 esac
33632 fi
33633 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33634 if test -n "$POTENTIAL_CXX"; then
33635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33636 $as_echo "$POTENTIAL_CXX" >&6; }
33637 else
33638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33639 $as_echo "no" >&6; }
33640 fi
33641 
33642 
33643   test -n "$POTENTIAL_CXX" && break
33644 done
33645 
33646       CXX=$POTENTIAL_CXX
33647     fi
33648 
33649     if test "x$CXX" = x; then
33650 
33651   # Print a helpful message on how to acquire the necessary build dependency.
33652   # devkit is the help tag: freetype, cups, alsa etc
33653   MISSING_DEPENDENCY=devkit
33654 
33655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33656     cygwin_help $MISSING_DEPENDENCY
33657   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33658     msys_help $MISSING_DEPENDENCY
33659   else
33660     PKGHANDLER_COMMAND=
33661 
33662     case $PKGHANDLER in
33663       apt-get)
33664         apt_help     $MISSING_DEPENDENCY ;;
33665       yum)
33666         yum_help     $MISSING_DEPENDENCY ;;
33667       port)
33668         port_help    $MISSING_DEPENDENCY ;;
33669       pkgutil)
33670         pkgutil_help $MISSING_DEPENDENCY ;;
33671       pkgadd)
33672         pkgadd_help  $MISSING_DEPENDENCY ;;
33673     esac
33674 
33675     if test "x$PKGHANDLER_COMMAND" != x; then
33676       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33677     fi
33678   fi
33679 
33680       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33681     fi
33682   fi
33683 
33684   # Now we have a compiler binary in CXX. Make sure it's okay.
33685 
33686   # Only process if variable expands to non-empty
33687 
33688   if test "x$CXX" != x; then
33689     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33690 
33691   # First separate the path from the arguments. This will split at the first
33692   # space.
33693   complete="$CXX"
33694   path="${complete%% *}"
33695   tmp="$complete EOL"
33696   arguments="${tmp#* }"
33697 
33698   # Input might be given as Windows format, start by converting to
33699   # unix format.
33700   new_path=`$CYGPATH -u "$path"`
33701 
33702   # Now try to locate executable using which
33703   new_path=`$WHICH "$new_path" 2> /dev/null`
33704   # bat and cmd files are not always considered executable in cygwin causing which
33705   # to not find them
33706   if test "x$new_path" = x \
33707       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33708       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33709     new_path=`$CYGPATH -u "$path"`
33710   fi
33711   if test "x$new_path" = x; then
33712     # Oops. Which didn't find the executable.
33713     # The splitting of arguments from the executable at a space might have been incorrect,
33714     # since paths with space are more likely in Windows. Give it another try with the whole
33715     # argument.
33716     path="$complete"
33717     arguments="EOL"
33718     new_path=`$CYGPATH -u "$path"`
33719     new_path=`$WHICH "$new_path" 2> /dev/null`
33720     # bat and cmd files are not always considered executable in cygwin causing which
33721     # to not find them
33722     if test "x$new_path" = x \
33723         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33724         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33725       new_path=`$CYGPATH -u "$path"`
33726     fi
33727     if test "x$new_path" = x; then
33728       # It's still not found. Now this is an unrecoverable error.
33729       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33730 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33731       has_space=`$ECHO "$complete" | $GREP " "`
33732       if test "x$has_space" != x; then
33733         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33734 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33735       fi
33736       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33737     fi
33738   fi
33739 
33740   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33741   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33742   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33743   # "foo.exe" is OK but "foo" is an error.
33744   #
33745   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33746   # It is also a way to make sure we got the proper file name for the real test later on.
33747   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33748   if test "x$test_shortpath" = x; then
33749     # Short path failed, file does not exist as specified.
33750     # Try adding .exe or .cmd
33751     if test -f "${new_path}.exe"; then
33752       input_to_shortpath="${new_path}.exe"
33753     elif test -f "${new_path}.cmd"; then
33754       input_to_shortpath="${new_path}.cmd"
33755     else
33756       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33757 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33758       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33759 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33760       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33761     fi
33762   else
33763     input_to_shortpath="$new_path"
33764   fi
33765 
33766   # Call helper function which possibly converts this using DOS-style short mode.
33767   # If so, the updated path is stored in $new_path.
33768   new_path="$input_to_shortpath"
33769 
33770   input_path="$input_to_shortpath"
33771   # Check if we need to convert this using DOS-style short mode. If the path
33772   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33773   # take no chances and rewrite it.
33774   # Note: m4 eats our [], so we need to use [ and ] instead.
33775   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33776   if test "x$has_forbidden_chars" != x; then
33777     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33778     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33779     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33780     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33781       # Going to short mode and back again did indeed matter. Since short mode is
33782       # case insensitive, let's make it lowercase to improve readability.
33783       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33784       # Now convert it back to Unix-style (cygpath)
33785       input_path=`$CYGPATH -u "$shortmode_path"`
33786       new_path="$input_path"
33787     fi
33788   fi
33789 
33790   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33791   if test "x$test_cygdrive_prefix" = x; then
33792     # As a simple fix, exclude /usr/bin since it's not a real path.
33793     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33794       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33795       # a path prefixed by /cygdrive for fixpath to work.
33796       new_path="$CYGWIN_ROOT_PATH$input_path"
33797     fi
33798   fi
33799 
33800   # remove trailing .exe if any
33801   new_path="${new_path/%.exe/}"
33802 
33803     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33804 
33805   # First separate the path from the arguments. This will split at the first
33806   # space.
33807   complete="$CXX"
33808   path="${complete%% *}"
33809   tmp="$complete EOL"
33810   arguments="${tmp#* }"
33811 
33812   # Input might be given as Windows format, start by converting to
33813   # unix format.
33814   new_path="$path"
33815 
33816   windows_path="$new_path"
33817   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33818     unix_path=`$CYGPATH -u "$windows_path"`
33819     new_path="$unix_path"
33820   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33821     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33822     new_path="$unix_path"
33823   fi
33824 
33825 
33826   # Now try to locate executable using which
33827   new_path=`$WHICH "$new_path" 2> /dev/null`
33828 
33829   if test "x$new_path" = x; then
33830     # Oops. Which didn't find the executable.
33831     # The splitting of arguments from the executable at a space might have been incorrect,
33832     # since paths with space are more likely in Windows. Give it another try with the whole
33833     # argument.
33834     path="$complete"
33835     arguments="EOL"
33836     new_path="$path"
33837 
33838   windows_path="$new_path"
33839   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33840     unix_path=`$CYGPATH -u "$windows_path"`
33841     new_path="$unix_path"
33842   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33843     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33844     new_path="$unix_path"
33845   fi
33846 
33847 
33848     new_path=`$WHICH "$new_path" 2> /dev/null`
33849     # bat and cmd files are not always considered executable in MSYS causing which
33850     # to not find them
33851     if test "x$new_path" = x \
33852         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33853         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33854       new_path="$path"
33855 
33856   windows_path="$new_path"
33857   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33858     unix_path=`$CYGPATH -u "$windows_path"`
33859     new_path="$unix_path"
33860   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33861     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33862     new_path="$unix_path"
33863   fi
33864 
33865     fi
33866 
33867     if test "x$new_path" = x; then
33868       # It's still not found. Now this is an unrecoverable error.
33869       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33870 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33871       has_space=`$ECHO "$complete" | $GREP " "`
33872       if test "x$has_space" != x; then
33873         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33874 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33875       fi
33876       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33877     fi
33878   fi
33879 
33880   # Now new_path has a complete unix path to the binary
33881   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33882     # Keep paths in /bin as-is, but remove trailing .exe if any
33883     new_path="${new_path/%.exe/}"
33884     # Do not save /bin paths to all_fixpath_prefixes!
33885   else
33886     # Not in mixed or Windows style, start by that.
33887     new_path=`cmd //c echo $new_path`
33888 
33889   input_path="$new_path"
33890   # Check if we need to convert this using DOS-style short mode. If the path
33891   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33892   # take no chances and rewrite it.
33893   # Note: m4 eats our [], so we need to use [ and ] instead.
33894   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33895   if test "x$has_forbidden_chars" != x; then
33896     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33897     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33898   fi
33899 
33900     # Output is in $new_path
33901 
33902   windows_path="$new_path"
33903   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33904     unix_path=`$CYGPATH -u "$windows_path"`
33905     new_path="$unix_path"
33906   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33907     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33908     new_path="$unix_path"
33909   fi
33910 
33911     # remove trailing .exe if any
33912     new_path="${new_path/%.exe/}"
33913 
33914     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33915     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33916   fi
33917 
33918     else
33919       # We're on a unix platform. Hooray! :)
33920       # First separate the path from the arguments. This will split at the first
33921       # space.
33922       complete="$CXX"
33923       path="${complete%% *}"
33924       tmp="$complete EOL"
33925       arguments="${tmp#* }"
33926 
33927       # Cannot rely on the command "which" here since it doesn't always work.
33928       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33929       if test -z "$is_absolute_path"; then
33930         # Path to executable is not absolute. Find it.
33931         IFS_save="$IFS"
33932         IFS=:
33933         for p in $PATH; do
33934           if test -f "$p/$path" && test -x "$p/$path"; then
33935             new_path="$p/$path"
33936             break
33937           fi
33938         done
33939         IFS="$IFS_save"
33940       else
33941         # This is an absolute path, we can use it without further modifications.
33942         new_path="$path"
33943       fi
33944 
33945       if test "x$new_path" = x; then
33946         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33947 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33948         has_space=`$ECHO "$complete" | $GREP " "`
33949         if test "x$has_space" != x; then
33950           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33951 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33952         fi
33953         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33954       fi
33955     fi
33956 
33957     # Now join together the path and the arguments once again
33958     if test "x$arguments" != xEOL; then
33959       new_complete="$new_path ${arguments% *}"
33960     else
33961       new_complete="$new_path"
33962     fi
33963 
33964     if test "x$complete" != "x$new_complete"; then
33965       CXX="$new_complete"
33966       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33967 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33968     fi
33969   fi
33970 
33971   TEST_COMPILER="$CXX"
33972 
33973   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33974 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33975   SYMLINK_ORIGINAL="$TEST_COMPILER"
33976 
33977   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33978     # Follow a chain of symbolic links. Use readlink
33979     # where it exists, else fall back to horribly
33980     # complicated shell code.
33981     if test "x$READLINK_TESTED" != yes; then
33982       # On MacOSX there is a readlink tool with a different
33983       # purpose than the GNU readlink tool. Check the found readlink.
33984       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33985       if test "x$ISGNU" = x; then
33986         # A readlink that we do not know how to use.
33987         # Are there other non-GNU readlinks out there?
33988         READLINK_TESTED=yes
33989         READLINK=
33990       fi
33991     fi
33992 
33993     if test "x$READLINK" != x; then
33994       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33995     else
33996       # Save the current directory for restoring afterwards
33997       STARTDIR=$PWD
33998       COUNTER=0
33999       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34000       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34001       cd $sym_link_dir
34002       # Use -P flag to resolve symlinks in directories.
34003       cd `$THEPWDCMD -P`
34004       sym_link_dir=`$THEPWDCMD -P`
34005       # Resolve file symlinks
34006       while test $COUNTER -lt 20; do
34007         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34008         if test "x$ISLINK" == x; then
34009           # This is not a symbolic link! We are done!
34010           break
34011         fi
34012         # Again resolve directory symlinks since the target of the just found
34013         # link could be in a different directory
34014         cd `$DIRNAME $ISLINK`
34015         sym_link_dir=`$THEPWDCMD -P`
34016         sym_link_file=`$BASENAME $ISLINK`
34017         let COUNTER=COUNTER+1
34018       done
34019       cd $STARTDIR
34020       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34021     fi
34022   fi
34023 
34024   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34025     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34026 $as_echo "no symlink" >&6; }
34027   else
34028     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34029 $as_echo "$SYMLINK_ORIGINAL" >&6; }
34030 
34031     # We can't handle ccache by gcc wrappers, since we need to know if we're
34032     # using ccache. Instead ccache usage must be controlled by a configure option.
34033     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34034     if test "x$COMPILER_BASENAME" = "xccache"; then
34035       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34036 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34037       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34038     fi
34039   fi
34040 
34041 
34042   COMPILER=$CXX
34043   COMPILER_NAME=$COMPILER_NAME
34044 
34045   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34046     # cc -V output typically looks like
34047     #     cc: Sun C 5.12 Linux_i386 2011/11/16
34048     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34049     # Check that this is likely to be the Solaris Studio cc.
34050     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34051     if test $? -ne 0; then
34052       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34053       { $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
34054 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34055       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34056 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34057       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34058 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34059       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34060     fi
34061     # Remove usage instructions (if present), and
34062     # collapse compiler output into a single line
34063     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34064         $SED -e 's/ *[Uu]sage:.*//'`
34065     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34066         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34067   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34068     # xlc -qversion output typically looks like
34069     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34070     #     Version: 11.01.0000.0015
34071     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34072     # Check that this is likely to be the IBM XL C compiler.
34073     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34074     if test $? -ne 0; then
34075       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34076       { $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
34077 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34078       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34079 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34080       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34081 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34082       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34083     fi
34084     # Collapse compiler output into a single line
34085     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34086     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34087         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34088   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34089     # There is no specific version flag, but all output starts with a version string.
34090     # First line typically looks something like:
34091     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34092     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34093     # Check that this is likely to be Microsoft CL.EXE.
34094     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34095     if test $? -ne 0; then
34096       { $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
34097 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34098       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34099 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34100       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34101     fi
34102     # Collapse compiler output into a single line
34103     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34104     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34105         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34106   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34107     # gcc --version output typically looks like
34108     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34109     #     Copyright (C) 2013 Free Software Foundation, Inc.
34110     #     This is free software; see the source for copying conditions.  There is NO
34111     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34112     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34113     # Check that this is likely to be GCC.
34114     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34115     if test $? -ne 0; then
34116       { $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
34117 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34118       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34119 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34120       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34121     fi
34122     # Remove Copyright and legalese from version string, and
34123     # collapse into a single line
34124     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34125         $SED -e 's/ *Copyright .*//'`
34126     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34127         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34128   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34129     # clang --version output typically looks like
34130     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34131     #    clang version 3.3 (tags/RELEASE_33/final)
34132     # or
34133     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34134     #    Target: x86_64-pc-linux-gnu
34135     #    Thread model: posix
34136     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34137     # Check that this is likely to be clang
34138     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34139     if test $? -ne 0; then
34140       { $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
34141 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34142       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34143 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34144       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34145     fi
34146     # Collapse compiler output into a single line
34147     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34148     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34149         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34150   else
34151       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34152   fi
34153   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34154   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34155   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34156   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34157 
34158   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34159 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34160 
34161 
34162   # Now that we have resolved CXX ourself, let autoconf have its go at it
34163   ac_ext=cpp
34164 ac_cpp='$CXXCPP $CPPFLAGS'
34165 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34166 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34167 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34168 if test -z "$CXX"; then
34169   if test -n "$CCC"; then
34170     CXX=$CCC
34171   else
34172     if test -n "$ac_tool_prefix"; then
34173   for ac_prog in $CXX
34174   do
34175     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34176 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34178 $as_echo_n "checking for $ac_word... " >&6; }
34179 if ${ac_cv_prog_CXX+:} false; then :
34180   $as_echo_n "(cached) " >&6
34181 else
34182   if test -n "$CXX"; then
34183   ac_cv_prog_CXX="$CXX" # Let the user override the test.
34184 else
34185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34186 for as_dir in $PATH
34187 do
34188   IFS=$as_save_IFS
34189   test -z "$as_dir" && as_dir=.
34190     for ac_exec_ext in '' $ac_executable_extensions; do
34191   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34192     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34193     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34194     break 2
34195   fi
34196 done
34197   done
34198 IFS=$as_save_IFS
34199 
34200 fi
34201 fi
34202 CXX=$ac_cv_prog_CXX
34203 if test -n "$CXX"; then
34204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34205 $as_echo "$CXX" >&6; }
34206 else
34207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34208 $as_echo "no" >&6; }
34209 fi
34210 
34211 
34212     test -n "$CXX" && break
34213   done
34214 fi
34215 if test -z "$CXX"; then
34216   ac_ct_CXX=$CXX
34217   for ac_prog in $CXX
34218 do
34219   # Extract the first word of "$ac_prog", so it can be a program name with args.
34220 set dummy $ac_prog; ac_word=$2
34221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34222 $as_echo_n "checking for $ac_word... " >&6; }
34223 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34224   $as_echo_n "(cached) " >&6
34225 else
34226   if test -n "$ac_ct_CXX"; then
34227   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34228 else
34229 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34230 for as_dir in $PATH
34231 do
34232   IFS=$as_save_IFS
34233   test -z "$as_dir" && as_dir=.
34234     for ac_exec_ext in '' $ac_executable_extensions; do
34235   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34236     ac_cv_prog_ac_ct_CXX="$ac_prog"
34237     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34238     break 2
34239   fi
34240 done
34241   done
34242 IFS=$as_save_IFS
34243 
34244 fi
34245 fi
34246 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34247 if test -n "$ac_ct_CXX"; then
34248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34249 $as_echo "$ac_ct_CXX" >&6; }
34250 else
34251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34252 $as_echo "no" >&6; }
34253 fi
34254 
34255 
34256   test -n "$ac_ct_CXX" && break
34257 done
34258 
34259   if test "x$ac_ct_CXX" = x; then
34260     CXX="g++"
34261   else
34262     case $cross_compiling:$ac_tool_warned in
34263 yes:)
34264 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34265 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34266 ac_tool_warned=yes ;;
34267 esac
34268     CXX=$ac_ct_CXX
34269   fi
34270 fi
34271 
34272   fi
34273 fi
34274 # Provide some information about the compiler.
34275 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34276 set X $ac_compile
34277 ac_compiler=$2
34278 for ac_option in --version -v -V -qversion; do
34279   { { ac_try="$ac_compiler $ac_option >&5"
34280 case "(($ac_try" in
34281   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34282   *) ac_try_echo=$ac_try;;
34283 esac
34284 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34285 $as_echo "$ac_try_echo"; } >&5
34286   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34287   ac_status=$?
34288   if test -s conftest.err; then
34289     sed '10a\
34290 ... rest of stderr output deleted ...
34291          10q' conftest.err >conftest.er1
34292     cat conftest.er1 >&5
34293   fi
34294   rm -f conftest.er1 conftest.err
34295   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34296   test $ac_status = 0; }
34297 done
34298 
34299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34300 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34301 if ${ac_cv_cxx_compiler_gnu+:} false; then :
34302   $as_echo_n "(cached) " >&6
34303 else
34304   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34305 /* end confdefs.h.  */
34306 
34307 int
34308 main ()
34309 {
34310 #ifndef __GNUC__
34311        choke me
34312 #endif
34313 
34314   ;
34315   return 0;
34316 }
34317 _ACEOF
34318 if ac_fn_cxx_try_compile "$LINENO"; then :
34319   ac_compiler_gnu=yes
34320 else
34321   ac_compiler_gnu=no
34322 fi
34323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34324 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34325 
34326 fi
34327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34328 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34329 if test $ac_compiler_gnu = yes; then
34330   GXX=yes
34331 else
34332   GXX=
34333 fi
34334 ac_test_CXXFLAGS=${CXXFLAGS+set}
34335 ac_save_CXXFLAGS=$CXXFLAGS
34336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34337 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
34338 if ${ac_cv_prog_cxx_g+:} false; then :
34339   $as_echo_n "(cached) " >&6
34340 else
34341   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34342    ac_cxx_werror_flag=yes
34343    ac_cv_prog_cxx_g=no
34344    CXXFLAGS="-g"
34345    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34346 /* end confdefs.h.  */
34347 
34348 int
34349 main ()
34350 {
34351 
34352   ;
34353   return 0;
34354 }
34355 _ACEOF
34356 if ac_fn_cxx_try_compile "$LINENO"; then :
34357   ac_cv_prog_cxx_g=yes
34358 else
34359   CXXFLAGS=""
34360       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34361 /* end confdefs.h.  */
34362 
34363 int
34364 main ()
34365 {
34366 
34367   ;
34368   return 0;
34369 }
34370 _ACEOF
34371 if ac_fn_cxx_try_compile "$LINENO"; then :
34372 
34373 else
34374   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34375          CXXFLAGS="-g"
34376          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34377 /* end confdefs.h.  */
34378 
34379 int
34380 main ()
34381 {
34382 
34383   ;
34384   return 0;
34385 }
34386 _ACEOF
34387 if ac_fn_cxx_try_compile "$LINENO"; then :
34388   ac_cv_prog_cxx_g=yes
34389 fi
34390 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34391 fi
34392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34393 fi
34394 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34395    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34396 fi
34397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34398 $as_echo "$ac_cv_prog_cxx_g" >&6; }
34399 if test "$ac_test_CXXFLAGS" = set; then
34400   CXXFLAGS=$ac_save_CXXFLAGS
34401 elif test $ac_cv_prog_cxx_g = yes; then
34402   if test "$GXX" = yes; then
34403     CXXFLAGS="-g -O2"
34404   else
34405     CXXFLAGS="-g"
34406   fi
34407 else
34408   if test "$GXX" = yes; then
34409     CXXFLAGS="-O2"
34410   else
34411     CXXFLAGS=
34412   fi
34413 fi
34414 ac_ext=cpp
34415 ac_cpp='$CXXCPP $CPPFLAGS'
34416 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34417 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34418 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34419 
34420 
34421   # This is the compiler version number on the form X.Y[.Z]
34422 
34423 
34424 
34425 
34426   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
34427     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
34428 $as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
34429     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
34430 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
34431   fi
34432 
34433   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
34434   if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
34435     { $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
34436 $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;}
34437   fi
34438 
34439   if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
34440     { $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
34441 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34442   fi
34443 
34444   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
34445 
34446 
34447   if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
34448 
34449 
34450 
34451 
34452 
34453 
34454 
34455 
34456 
34457 
34458 
34459 
34460 
34461 
34462 
34463 
34464 
34465 
34466 
34467 
34468 
34469 
34470 
34471 
34472 
34473 
34474 
34475 
34476 
34477 
34478 
34479 
34480 
34481 
34482 
34483 
34484 
34485 
34486 
34487 
34488 
34489 
34490     # Execute function body
34491 
34492   # Need to assign to a variable since m4 is blocked from modifying parts in [].
34493   REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
34494 
34495   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
34496     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
34497   fi
34498 
34499   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
34500     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
34501   fi
34502 
34503   # Version comparison method inspired by http://stackoverflow.com/a/24067243
34504   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
34505 
34506   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
34507     :
34508 
34509   else
34510     :
34511 
34512           { $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
34513 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
34514 
34515 
34516   fi
34517 
34518 
34519 
34520 
34521 
34522 
34523 
34524 
34525 
34526 
34527 
34528 
34529   fi
34530 
34531   #
34532   # Setup the preprocessor (CPP and CXXCPP)
34533   #
34534   ac_ext=c
34535 ac_cpp='$CPP $CPPFLAGS'
34536 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34537 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34538 ac_compiler_gnu=$ac_cv_c_compiler_gnu
34539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34540 $as_echo_n "checking how to run the C preprocessor... " >&6; }
34541 # On Suns, sometimes $CPP names a directory.
34542 if test -n "$CPP" && test -d "$CPP"; then
34543   CPP=
34544 fi
34545 if test -z "$CPP"; then
34546   if ${ac_cv_prog_CPP+:} false; then :
34547   $as_echo_n "(cached) " >&6
34548 else
34549       # Double quotes because CPP needs to be expanded
34550     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34551     do
34552       ac_preproc_ok=false
34553 for ac_c_preproc_warn_flag in '' yes
34554 do
34555   # Use a header file that comes with gcc, so configuring glibc
34556   # with a fresh cross-compiler works.
34557   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34558   # <limits.h> exists even on freestanding compilers.
34559   # On the NeXT, cc -E runs the code through the compiler's parser,
34560   # not just through cpp. "Syntax error" is here to catch this case.
34561   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34562 /* end confdefs.h.  */
34563 #ifdef __STDC__
34564 # include <limits.h>
34565 #else
34566 # include <assert.h>
34567 #endif
34568                      Syntax error
34569 _ACEOF
34570 if ac_fn_c_try_cpp "$LINENO"; then :
34571 
34572 else
34573   # Broken: fails on valid input.
34574 continue
34575 fi
34576 rm -f conftest.err conftest.i conftest.$ac_ext
34577 
34578   # OK, works on sane cases.  Now check whether nonexistent headers
34579   # can be detected and how.
34580   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34581 /* end confdefs.h.  */
34582 #include <ac_nonexistent.h>
34583 _ACEOF
34584 if ac_fn_c_try_cpp "$LINENO"; then :
34585   # Broken: success on invalid input.
34586 continue
34587 else
34588   # Passes both tests.
34589 ac_preproc_ok=:
34590 break
34591 fi
34592 rm -f conftest.err conftest.i conftest.$ac_ext
34593 
34594 done
34595 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34596 rm -f conftest.i conftest.err conftest.$ac_ext
34597 if $ac_preproc_ok; then :
34598   break
34599 fi
34600 
34601     done
34602     ac_cv_prog_CPP=$CPP
34603 
34604 fi
34605   CPP=$ac_cv_prog_CPP
34606 else
34607   ac_cv_prog_CPP=$CPP
34608 fi
34609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34610 $as_echo "$CPP" >&6; }
34611 ac_preproc_ok=false
34612 for ac_c_preproc_warn_flag in '' yes
34613 do
34614   # Use a header file that comes with gcc, so configuring glibc
34615   # with a fresh cross-compiler works.
34616   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34617   # <limits.h> exists even on freestanding compilers.
34618   # On the NeXT, cc -E runs the code through the compiler's parser,
34619   # not just through cpp. "Syntax error" is here to catch this case.
34620   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34621 /* end confdefs.h.  */
34622 #ifdef __STDC__
34623 # include <limits.h>
34624 #else
34625 # include <assert.h>
34626 #endif
34627                      Syntax error
34628 _ACEOF
34629 if ac_fn_c_try_cpp "$LINENO"; then :
34630 
34631 else
34632   # Broken: fails on valid input.
34633 continue
34634 fi
34635 rm -f conftest.err conftest.i conftest.$ac_ext
34636 
34637   # OK, works on sane cases.  Now check whether nonexistent headers
34638   # can be detected and how.
34639   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34640 /* end confdefs.h.  */
34641 #include <ac_nonexistent.h>
34642 _ACEOF
34643 if ac_fn_c_try_cpp "$LINENO"; then :
34644   # Broken: success on invalid input.
34645 continue
34646 else
34647   # Passes both tests.
34648 ac_preproc_ok=:
34649 break
34650 fi
34651 rm -f conftest.err conftest.i conftest.$ac_ext
34652 
34653 done
34654 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34655 rm -f conftest.i conftest.err conftest.$ac_ext
34656 if $ac_preproc_ok; then :
34657 
34658 else
34659   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34660 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34661 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34662 See \`config.log' for more details" "$LINENO" 5; }
34663 fi
34664 
34665 ac_ext=cpp
34666 ac_cpp='$CXXCPP $CPPFLAGS'
34667 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34668 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34669 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34670 
34671 
34672   # Only process if variable expands to non-empty
34673 
34674   if test "x$CPP" != x; then
34675     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34676 
34677   # First separate the path from the arguments. This will split at the first
34678   # space.
34679   complete="$CPP"
34680   path="${complete%% *}"
34681   tmp="$complete EOL"
34682   arguments="${tmp#* }"
34683 
34684   # Input might be given as Windows format, start by converting to
34685   # unix format.
34686   new_path=`$CYGPATH -u "$path"`
34687 
34688   # Now try to locate executable using which
34689   new_path=`$WHICH "$new_path" 2> /dev/null`
34690   # bat and cmd files are not always considered executable in cygwin causing which
34691   # to not find them
34692   if test "x$new_path" = x \
34693       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34694       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34695     new_path=`$CYGPATH -u "$path"`
34696   fi
34697   if test "x$new_path" = x; then
34698     # Oops. Which didn't find the executable.
34699     # The splitting of arguments from the executable at a space might have been incorrect,
34700     # since paths with space are more likely in Windows. Give it another try with the whole
34701     # argument.
34702     path="$complete"
34703     arguments="EOL"
34704     new_path=`$CYGPATH -u "$path"`
34705     new_path=`$WHICH "$new_path" 2> /dev/null`
34706     # bat and cmd files are not always considered executable in cygwin causing which
34707     # to not find them
34708     if test "x$new_path" = x \
34709         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34710         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34711       new_path=`$CYGPATH -u "$path"`
34712     fi
34713     if test "x$new_path" = x; then
34714       # It's still not found. Now this is an unrecoverable error.
34715       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34716 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34717       has_space=`$ECHO "$complete" | $GREP " "`
34718       if test "x$has_space" != x; then
34719         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34720 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34721       fi
34722       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34723     fi
34724   fi
34725 
34726   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34727   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34728   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34729   # "foo.exe" is OK but "foo" is an error.
34730   #
34731   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34732   # It is also a way to make sure we got the proper file name for the real test later on.
34733   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34734   if test "x$test_shortpath" = x; then
34735     # Short path failed, file does not exist as specified.
34736     # Try adding .exe or .cmd
34737     if test -f "${new_path}.exe"; then
34738       input_to_shortpath="${new_path}.exe"
34739     elif test -f "${new_path}.cmd"; then
34740       input_to_shortpath="${new_path}.cmd"
34741     else
34742       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34743 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34744       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34745 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34746       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34747     fi
34748   else
34749     input_to_shortpath="$new_path"
34750   fi
34751 
34752   # Call helper function which possibly converts this using DOS-style short mode.
34753   # If so, the updated path is stored in $new_path.
34754   new_path="$input_to_shortpath"
34755 
34756   input_path="$input_to_shortpath"
34757   # Check if we need to convert this using DOS-style short mode. If the path
34758   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34759   # take no chances and rewrite it.
34760   # Note: m4 eats our [], so we need to use [ and ] instead.
34761   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34762   if test "x$has_forbidden_chars" != x; then
34763     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34764     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34765     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34766     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34767       # Going to short mode and back again did indeed matter. Since short mode is
34768       # case insensitive, let's make it lowercase to improve readability.
34769       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34770       # Now convert it back to Unix-style (cygpath)
34771       input_path=`$CYGPATH -u "$shortmode_path"`
34772       new_path="$input_path"
34773     fi
34774   fi
34775 
34776   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34777   if test "x$test_cygdrive_prefix" = x; then
34778     # As a simple fix, exclude /usr/bin since it's not a real path.
34779     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34780       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34781       # a path prefixed by /cygdrive for fixpath to work.
34782       new_path="$CYGWIN_ROOT_PATH$input_path"
34783     fi
34784   fi
34785 
34786   # remove trailing .exe if any
34787   new_path="${new_path/%.exe/}"
34788 
34789     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34790 
34791   # First separate the path from the arguments. This will split at the first
34792   # space.
34793   complete="$CPP"
34794   path="${complete%% *}"
34795   tmp="$complete EOL"
34796   arguments="${tmp#* }"
34797 
34798   # Input might be given as Windows format, start by converting to
34799   # unix format.
34800   new_path="$path"
34801 
34802   windows_path="$new_path"
34803   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34804     unix_path=`$CYGPATH -u "$windows_path"`
34805     new_path="$unix_path"
34806   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34807     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34808     new_path="$unix_path"
34809   fi
34810 
34811 
34812   # Now try to locate executable using which
34813   new_path=`$WHICH "$new_path" 2> /dev/null`
34814 
34815   if test "x$new_path" = x; then
34816     # Oops. Which didn't find the executable.
34817     # The splitting of arguments from the executable at a space might have been incorrect,
34818     # since paths with space are more likely in Windows. Give it another try with the whole
34819     # argument.
34820     path="$complete"
34821     arguments="EOL"
34822     new_path="$path"
34823 
34824   windows_path="$new_path"
34825   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34826     unix_path=`$CYGPATH -u "$windows_path"`
34827     new_path="$unix_path"
34828   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34829     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34830     new_path="$unix_path"
34831   fi
34832 
34833 
34834     new_path=`$WHICH "$new_path" 2> /dev/null`
34835     # bat and cmd files are not always considered executable in MSYS causing which
34836     # to not find them
34837     if test "x$new_path" = x \
34838         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34839         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34840       new_path="$path"
34841 
34842   windows_path="$new_path"
34843   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34844     unix_path=`$CYGPATH -u "$windows_path"`
34845     new_path="$unix_path"
34846   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34847     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34848     new_path="$unix_path"
34849   fi
34850 
34851     fi
34852 
34853     if test "x$new_path" = x; then
34854       # It's still not found. Now this is an unrecoverable error.
34855       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34856 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34857       has_space=`$ECHO "$complete" | $GREP " "`
34858       if test "x$has_space" != x; then
34859         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34860 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34861       fi
34862       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34863     fi
34864   fi
34865 
34866   # Now new_path has a complete unix path to the binary
34867   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34868     # Keep paths in /bin as-is, but remove trailing .exe if any
34869     new_path="${new_path/%.exe/}"
34870     # Do not save /bin paths to all_fixpath_prefixes!
34871   else
34872     # Not in mixed or Windows style, start by that.
34873     new_path=`cmd //c echo $new_path`
34874 
34875   input_path="$new_path"
34876   # Check if we need to convert this using DOS-style short mode. If the path
34877   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34878   # take no chances and rewrite it.
34879   # Note: m4 eats our [], so we need to use [ and ] instead.
34880   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34881   if test "x$has_forbidden_chars" != x; then
34882     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34883     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34884   fi
34885 
34886     # Output is in $new_path
34887 
34888   windows_path="$new_path"
34889   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34890     unix_path=`$CYGPATH -u "$windows_path"`
34891     new_path="$unix_path"
34892   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34893     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34894     new_path="$unix_path"
34895   fi
34896 
34897     # remove trailing .exe if any
34898     new_path="${new_path/%.exe/}"
34899 
34900     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34901     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34902   fi
34903 
34904     else
34905       # We're on a unix platform. Hooray! :)
34906       # First separate the path from the arguments. This will split at the first
34907       # space.
34908       complete="$CPP"
34909       path="${complete%% *}"
34910       tmp="$complete EOL"
34911       arguments="${tmp#* }"
34912 
34913       # Cannot rely on the command "which" here since it doesn't always work.
34914       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34915       if test -z "$is_absolute_path"; then
34916         # Path to executable is not absolute. Find it.
34917         IFS_save="$IFS"
34918         IFS=:
34919         for p in $PATH; do
34920           if test -f "$p/$path" && test -x "$p/$path"; then
34921             new_path="$p/$path"
34922             break
34923           fi
34924         done
34925         IFS="$IFS_save"
34926       else
34927         # This is an absolute path, we can use it without further modifications.
34928         new_path="$path"
34929       fi
34930 
34931       if test "x$new_path" = x; then
34932         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34933 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34934         has_space=`$ECHO "$complete" | $GREP " "`
34935         if test "x$has_space" != x; then
34936           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34937 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34938         fi
34939         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34940       fi
34941     fi
34942 
34943     # Now join together the path and the arguments once again
34944     if test "x$arguments" != xEOL; then
34945       new_complete="$new_path ${arguments% *}"
34946     else
34947       new_complete="$new_path"
34948     fi
34949 
34950     if test "x$complete" != "x$new_complete"; then
34951       CPP="$new_complete"
34952       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34953 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34954     fi
34955   fi
34956 
34957   ac_ext=cpp
34958 ac_cpp='$CXXCPP $CPPFLAGS'
34959 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34960 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34961 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34963 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34964 if test -z "$CXXCPP"; then
34965   if ${ac_cv_prog_CXXCPP+:} false; then :
34966   $as_echo_n "(cached) " >&6
34967 else
34968       # Double quotes because CXXCPP needs to be expanded
34969     for CXXCPP in "$CXX -E" "/lib/cpp"
34970     do
34971       ac_preproc_ok=false
34972 for ac_cxx_preproc_warn_flag in '' yes
34973 do
34974   # Use a header file that comes with gcc, so configuring glibc
34975   # with a fresh cross-compiler works.
34976   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34977   # <limits.h> exists even on freestanding compilers.
34978   # On the NeXT, cc -E runs the code through the compiler's parser,
34979   # not just through cpp. "Syntax error" is here to catch this case.
34980   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34981 /* end confdefs.h.  */
34982 #ifdef __STDC__
34983 # include <limits.h>
34984 #else
34985 # include <assert.h>
34986 #endif
34987                      Syntax error
34988 _ACEOF
34989 if ac_fn_cxx_try_cpp "$LINENO"; then :
34990 
34991 else
34992   # Broken: fails on valid input.
34993 continue
34994 fi
34995 rm -f conftest.err conftest.i conftest.$ac_ext
34996 
34997   # OK, works on sane cases.  Now check whether nonexistent headers
34998   # can be detected and how.
34999   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35000 /* end confdefs.h.  */
35001 #include <ac_nonexistent.h>
35002 _ACEOF
35003 if ac_fn_cxx_try_cpp "$LINENO"; then :
35004   # Broken: success on invalid input.
35005 continue
35006 else
35007   # Passes both tests.
35008 ac_preproc_ok=:
35009 break
35010 fi
35011 rm -f conftest.err conftest.i conftest.$ac_ext
35012 
35013 done
35014 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35015 rm -f conftest.i conftest.err conftest.$ac_ext
35016 if $ac_preproc_ok; then :
35017   break
35018 fi
35019 
35020     done
35021     ac_cv_prog_CXXCPP=$CXXCPP
35022 
35023 fi
35024   CXXCPP=$ac_cv_prog_CXXCPP
35025 else
35026   ac_cv_prog_CXXCPP=$CXXCPP
35027 fi
35028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35029 $as_echo "$CXXCPP" >&6; }
35030 ac_preproc_ok=false
35031 for ac_cxx_preproc_warn_flag in '' yes
35032 do
35033   # Use a header file that comes with gcc, so configuring glibc
35034   # with a fresh cross-compiler works.
35035   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35036   # <limits.h> exists even on freestanding compilers.
35037   # On the NeXT, cc -E runs the code through the compiler's parser,
35038   # not just through cpp. "Syntax error" is here to catch this case.
35039   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35040 /* end confdefs.h.  */
35041 #ifdef __STDC__
35042 # include <limits.h>
35043 #else
35044 # include <assert.h>
35045 #endif
35046                      Syntax error
35047 _ACEOF
35048 if ac_fn_cxx_try_cpp "$LINENO"; then :
35049 
35050 else
35051   # Broken: fails on valid input.
35052 continue
35053 fi
35054 rm -f conftest.err conftest.i conftest.$ac_ext
35055 
35056   # OK, works on sane cases.  Now check whether nonexistent headers
35057   # can be detected and how.
35058   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35059 /* end confdefs.h.  */
35060 #include <ac_nonexistent.h>
35061 _ACEOF
35062 if ac_fn_cxx_try_cpp "$LINENO"; then :
35063   # Broken: success on invalid input.
35064 continue
35065 else
35066   # Passes both tests.
35067 ac_preproc_ok=:
35068 break
35069 fi
35070 rm -f conftest.err conftest.i conftest.$ac_ext
35071 
35072 done
35073 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35074 rm -f conftest.i conftest.err conftest.$ac_ext
35075 if $ac_preproc_ok; then :
35076 
35077 else
35078   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35079 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35080 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35081 See \`config.log' for more details" "$LINENO" 5; }
35082 fi
35083 
35084 ac_ext=cpp
35085 ac_cpp='$CXXCPP $CPPFLAGS'
35086 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35087 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35088 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35089 
35090 
35091   # Only process if variable expands to non-empty
35092 
35093   if test "x$CXXCPP" != x; then
35094     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35095 
35096   # First separate the path from the arguments. This will split at the first
35097   # space.
35098   complete="$CXXCPP"
35099   path="${complete%% *}"
35100   tmp="$complete EOL"
35101   arguments="${tmp#* }"
35102 
35103   # Input might be given as Windows format, start by converting to
35104   # unix format.
35105   new_path=`$CYGPATH -u "$path"`
35106 
35107   # Now try to locate executable using which
35108   new_path=`$WHICH "$new_path" 2> /dev/null`
35109   # bat and cmd files are not always considered executable in cygwin causing which
35110   # to not find them
35111   if test "x$new_path" = x \
35112       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35113       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35114     new_path=`$CYGPATH -u "$path"`
35115   fi
35116   if test "x$new_path" = x; then
35117     # Oops. Which didn't find the executable.
35118     # The splitting of arguments from the executable at a space might have been incorrect,
35119     # since paths with space are more likely in Windows. Give it another try with the whole
35120     # argument.
35121     path="$complete"
35122     arguments="EOL"
35123     new_path=`$CYGPATH -u "$path"`
35124     new_path=`$WHICH "$new_path" 2> /dev/null`
35125     # bat and cmd files are not always considered executable in cygwin causing which
35126     # to not find them
35127     if test "x$new_path" = x \
35128         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35129         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35130       new_path=`$CYGPATH -u "$path"`
35131     fi
35132     if test "x$new_path" = x; then
35133       # It's still not found. Now this is an unrecoverable error.
35134       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35135 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35136       has_space=`$ECHO "$complete" | $GREP " "`
35137       if test "x$has_space" != x; then
35138         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35139 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35140       fi
35141       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35142     fi
35143   fi
35144 
35145   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35146   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35147   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35148   # "foo.exe" is OK but "foo" is an error.
35149   #
35150   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35151   # It is also a way to make sure we got the proper file name for the real test later on.
35152   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35153   if test "x$test_shortpath" = x; then
35154     # Short path failed, file does not exist as specified.
35155     # Try adding .exe or .cmd
35156     if test -f "${new_path}.exe"; then
35157       input_to_shortpath="${new_path}.exe"
35158     elif test -f "${new_path}.cmd"; then
35159       input_to_shortpath="${new_path}.cmd"
35160     else
35161       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35162 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35163       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35164 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35165       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35166     fi
35167   else
35168     input_to_shortpath="$new_path"
35169   fi
35170 
35171   # Call helper function which possibly converts this using DOS-style short mode.
35172   # If so, the updated path is stored in $new_path.
35173   new_path="$input_to_shortpath"
35174 
35175   input_path="$input_to_shortpath"
35176   # Check if we need to convert this using DOS-style short mode. If the path
35177   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35178   # take no chances and rewrite it.
35179   # Note: m4 eats our [], so we need to use [ and ] instead.
35180   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35181   if test "x$has_forbidden_chars" != x; then
35182     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35183     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35184     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35185     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35186       # Going to short mode and back again did indeed matter. Since short mode is
35187       # case insensitive, let's make it lowercase to improve readability.
35188       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35189       # Now convert it back to Unix-style (cygpath)
35190       input_path=`$CYGPATH -u "$shortmode_path"`
35191       new_path="$input_path"
35192     fi
35193   fi
35194 
35195   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35196   if test "x$test_cygdrive_prefix" = x; then
35197     # As a simple fix, exclude /usr/bin since it's not a real path.
35198     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35199       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35200       # a path prefixed by /cygdrive for fixpath to work.
35201       new_path="$CYGWIN_ROOT_PATH$input_path"
35202     fi
35203   fi
35204 
35205   # remove trailing .exe if any
35206   new_path="${new_path/%.exe/}"
35207 
35208     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35209 
35210   # First separate the path from the arguments. This will split at the first
35211   # space.
35212   complete="$CXXCPP"
35213   path="${complete%% *}"
35214   tmp="$complete EOL"
35215   arguments="${tmp#* }"
35216 
35217   # Input might be given as Windows format, start by converting to
35218   # unix format.
35219   new_path="$path"
35220 
35221   windows_path="$new_path"
35222   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35223     unix_path=`$CYGPATH -u "$windows_path"`
35224     new_path="$unix_path"
35225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35226     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35227     new_path="$unix_path"
35228   fi
35229 
35230 
35231   # Now try to locate executable using which
35232   new_path=`$WHICH "$new_path" 2> /dev/null`
35233 
35234   if test "x$new_path" = x; then
35235     # Oops. Which didn't find the executable.
35236     # The splitting of arguments from the executable at a space might have been incorrect,
35237     # since paths with space are more likely in Windows. Give it another try with the whole
35238     # argument.
35239     path="$complete"
35240     arguments="EOL"
35241     new_path="$path"
35242 
35243   windows_path="$new_path"
35244   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35245     unix_path=`$CYGPATH -u "$windows_path"`
35246     new_path="$unix_path"
35247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35248     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35249     new_path="$unix_path"
35250   fi
35251 
35252 
35253     new_path=`$WHICH "$new_path" 2> /dev/null`
35254     # bat and cmd files are not always considered executable in MSYS causing which
35255     # to not find them
35256     if test "x$new_path" = x \
35257         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35258         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35259       new_path="$path"
35260 
35261   windows_path="$new_path"
35262   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35263     unix_path=`$CYGPATH -u "$windows_path"`
35264     new_path="$unix_path"
35265   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35266     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35267     new_path="$unix_path"
35268   fi
35269 
35270     fi
35271 
35272     if test "x$new_path" = x; then
35273       # It's still not found. Now this is an unrecoverable error.
35274       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35275 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35276       has_space=`$ECHO "$complete" | $GREP " "`
35277       if test "x$has_space" != x; then
35278         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35279 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35280       fi
35281       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35282     fi
35283   fi
35284 
35285   # Now new_path has a complete unix path to the binary
35286   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35287     # Keep paths in /bin as-is, but remove trailing .exe if any
35288     new_path="${new_path/%.exe/}"
35289     # Do not save /bin paths to all_fixpath_prefixes!
35290   else
35291     # Not in mixed or Windows style, start by that.
35292     new_path=`cmd //c echo $new_path`
35293 
35294   input_path="$new_path"
35295   # Check if we need to convert this using DOS-style short mode. If the path
35296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35297   # take no chances and rewrite it.
35298   # Note: m4 eats our [], so we need to use [ and ] instead.
35299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35300   if test "x$has_forbidden_chars" != x; then
35301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35302     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35303   fi
35304 
35305     # Output is in $new_path
35306 
35307   windows_path="$new_path"
35308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35309     unix_path=`$CYGPATH -u "$windows_path"`
35310     new_path="$unix_path"
35311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35312     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35313     new_path="$unix_path"
35314   fi
35315 
35316     # remove trailing .exe if any
35317     new_path="${new_path/%.exe/}"
35318 
35319     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35320     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35321   fi
35322 
35323     else
35324       # We're on a unix platform. Hooray! :)
35325       # First separate the path from the arguments. This will split at the first
35326       # space.
35327       complete="$CXXCPP"
35328       path="${complete%% *}"
35329       tmp="$complete EOL"
35330       arguments="${tmp#* }"
35331 
35332       # Cannot rely on the command "which" here since it doesn't always work.
35333       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35334       if test -z "$is_absolute_path"; then
35335         # Path to executable is not absolute. Find it.
35336         IFS_save="$IFS"
35337         IFS=:
35338         for p in $PATH; do
35339           if test -f "$p/$path" && test -x "$p/$path"; then
35340             new_path="$p/$path"
35341             break
35342           fi
35343         done
35344         IFS="$IFS_save"
35345       else
35346         # This is an absolute path, we can use it without further modifications.
35347         new_path="$path"
35348       fi
35349 
35350       if test "x$new_path" = x; then
35351         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35352 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35353         has_space=`$ECHO "$complete" | $GREP " "`
35354         if test "x$has_space" != x; then
35355           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35356 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35357         fi
35358         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35359       fi
35360     fi
35361 
35362     # Now join together the path and the arguments once again
35363     if test "x$arguments" != xEOL; then
35364       new_complete="$new_path ${arguments% *}"
35365     else
35366       new_complete="$new_path"
35367     fi
35368 
35369     if test "x$complete" != "x$new_complete"; then
35370       CXXCPP="$new_complete"
35371       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35372 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35373     fi
35374   fi
35375 
35376 
35377   #
35378   # Setup the linker (LD)
35379   #
35380   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35381     # In the Microsoft toolchain we have a separate LD command "link".
35382     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35383     # a cygwin program for something completely different.
35384     # Extract the first word of "link", so it can be a program name with args.
35385 set dummy link; ac_word=$2
35386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35387 $as_echo_n "checking for $ac_word... " >&6; }
35388 if ${ac_cv_prog_LD+:} false; then :
35389   $as_echo_n "(cached) " >&6
35390 else
35391   if test -n "$LD"; then
35392   ac_cv_prog_LD="$LD" # Let the user override the test.
35393 else
35394   ac_prog_rejected=no
35395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35396 for as_dir in $PATH
35397 do
35398   IFS=$as_save_IFS
35399   test -z "$as_dir" && as_dir=.
35400     for ac_exec_ext in '' $ac_executable_extensions; do
35401   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35402     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35403        ac_prog_rejected=yes
35404        continue
35405      fi
35406     ac_cv_prog_LD="link"
35407     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35408     break 2
35409   fi
35410 done
35411   done
35412 IFS=$as_save_IFS
35413 
35414 if test $ac_prog_rejected = yes; then
35415   # We found a bogon in the path, so make sure we never use it.
35416   set dummy $ac_cv_prog_LD
35417   shift
35418   if test $# != 0; then
35419     # We chose a different compiler from the bogus one.
35420     # However, it has the same basename, so the bogon will be chosen
35421     # first if we set LD to just the basename; use the full file name.
35422     shift
35423     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35424   fi
35425 fi
35426 fi
35427 fi
35428 LD=$ac_cv_prog_LD
35429 if test -n "$LD"; then
35430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35431 $as_echo "$LD" >&6; }
35432 else
35433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35434 $as_echo "no" >&6; }
35435 fi
35436 
35437 
35438 
35439   # Only process if variable expands to non-empty
35440 
35441   if test "x$LD" != x; then
35442     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35443 
35444   # First separate the path from the arguments. This will split at the first
35445   # space.
35446   complete="$LD"
35447   path="${complete%% *}"
35448   tmp="$complete EOL"
35449   arguments="${tmp#* }"
35450 
35451   # Input might be given as Windows format, start by converting to
35452   # unix format.
35453   new_path=`$CYGPATH -u "$path"`
35454 
35455   # Now try to locate executable using which
35456   new_path=`$WHICH "$new_path" 2> /dev/null`
35457   # bat and cmd files are not always considered executable in cygwin causing which
35458   # to not find them
35459   if test "x$new_path" = x \
35460       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35461       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35462     new_path=`$CYGPATH -u "$path"`
35463   fi
35464   if test "x$new_path" = x; then
35465     # Oops. Which didn't find the executable.
35466     # The splitting of arguments from the executable at a space might have been incorrect,
35467     # since paths with space are more likely in Windows. Give it another try with the whole
35468     # argument.
35469     path="$complete"
35470     arguments="EOL"
35471     new_path=`$CYGPATH -u "$path"`
35472     new_path=`$WHICH "$new_path" 2> /dev/null`
35473     # bat and cmd files are not always considered executable in cygwin causing which
35474     # to not find them
35475     if test "x$new_path" = x \
35476         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35477         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35478       new_path=`$CYGPATH -u "$path"`
35479     fi
35480     if test "x$new_path" = x; then
35481       # It's still not found. Now this is an unrecoverable error.
35482       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35483 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35484       has_space=`$ECHO "$complete" | $GREP " "`
35485       if test "x$has_space" != x; then
35486         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35487 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35488       fi
35489       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35490     fi
35491   fi
35492 
35493   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35494   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35495   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35496   # "foo.exe" is OK but "foo" is an error.
35497   #
35498   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35499   # It is also a way to make sure we got the proper file name for the real test later on.
35500   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35501   if test "x$test_shortpath" = x; then
35502     # Short path failed, file does not exist as specified.
35503     # Try adding .exe or .cmd
35504     if test -f "${new_path}.exe"; then
35505       input_to_shortpath="${new_path}.exe"
35506     elif test -f "${new_path}.cmd"; then
35507       input_to_shortpath="${new_path}.cmd"
35508     else
35509       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35510 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35511       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35512 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35513       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35514     fi
35515   else
35516     input_to_shortpath="$new_path"
35517   fi
35518 
35519   # Call helper function which possibly converts this using DOS-style short mode.
35520   # If so, the updated path is stored in $new_path.
35521   new_path="$input_to_shortpath"
35522 
35523   input_path="$input_to_shortpath"
35524   # Check if we need to convert this using DOS-style short mode. If the path
35525   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35526   # take no chances and rewrite it.
35527   # Note: m4 eats our [], so we need to use [ and ] instead.
35528   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35529   if test "x$has_forbidden_chars" != x; then
35530     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35531     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35532     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35533     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35534       # Going to short mode and back again did indeed matter. Since short mode is
35535       # case insensitive, let's make it lowercase to improve readability.
35536       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35537       # Now convert it back to Unix-style (cygpath)
35538       input_path=`$CYGPATH -u "$shortmode_path"`
35539       new_path="$input_path"
35540     fi
35541   fi
35542 
35543   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35544   if test "x$test_cygdrive_prefix" = x; then
35545     # As a simple fix, exclude /usr/bin since it's not a real path.
35546     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35547       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35548       # a path prefixed by /cygdrive for fixpath to work.
35549       new_path="$CYGWIN_ROOT_PATH$input_path"
35550     fi
35551   fi
35552 
35553   # remove trailing .exe if any
35554   new_path="${new_path/%.exe/}"
35555 
35556     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35557 
35558   # First separate the path from the arguments. This will split at the first
35559   # space.
35560   complete="$LD"
35561   path="${complete%% *}"
35562   tmp="$complete EOL"
35563   arguments="${tmp#* }"
35564 
35565   # Input might be given as Windows format, start by converting to
35566   # unix format.
35567   new_path="$path"
35568 
35569   windows_path="$new_path"
35570   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35571     unix_path=`$CYGPATH -u "$windows_path"`
35572     new_path="$unix_path"
35573   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35574     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35575     new_path="$unix_path"
35576   fi
35577 
35578 
35579   # Now try to locate executable using which
35580   new_path=`$WHICH "$new_path" 2> /dev/null`
35581 
35582   if test "x$new_path" = x; then
35583     # Oops. Which didn't find the executable.
35584     # The splitting of arguments from the executable at a space might have been incorrect,
35585     # since paths with space are more likely in Windows. Give it another try with the whole
35586     # argument.
35587     path="$complete"
35588     arguments="EOL"
35589     new_path="$path"
35590 
35591   windows_path="$new_path"
35592   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35593     unix_path=`$CYGPATH -u "$windows_path"`
35594     new_path="$unix_path"
35595   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35596     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35597     new_path="$unix_path"
35598   fi
35599 
35600 
35601     new_path=`$WHICH "$new_path" 2> /dev/null`
35602     # bat and cmd files are not always considered executable in MSYS causing which
35603     # to not find them
35604     if test "x$new_path" = x \
35605         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35606         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35607       new_path="$path"
35608 
35609   windows_path="$new_path"
35610   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35611     unix_path=`$CYGPATH -u "$windows_path"`
35612     new_path="$unix_path"
35613   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35614     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35615     new_path="$unix_path"
35616   fi
35617 
35618     fi
35619 
35620     if test "x$new_path" = x; then
35621       # It's still not found. Now this is an unrecoverable error.
35622       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35623 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35624       has_space=`$ECHO "$complete" | $GREP " "`
35625       if test "x$has_space" != x; then
35626         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35627 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35628       fi
35629       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35630     fi
35631   fi
35632 
35633   # Now new_path has a complete unix path to the binary
35634   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35635     # Keep paths in /bin as-is, but remove trailing .exe if any
35636     new_path="${new_path/%.exe/}"
35637     # Do not save /bin paths to all_fixpath_prefixes!
35638   else
35639     # Not in mixed or Windows style, start by that.
35640     new_path=`cmd //c echo $new_path`
35641 
35642   input_path="$new_path"
35643   # Check if we need to convert this using DOS-style short mode. If the path
35644   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35645   # take no chances and rewrite it.
35646   # Note: m4 eats our [], so we need to use [ and ] instead.
35647   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35648   if test "x$has_forbidden_chars" != x; then
35649     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35650     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35651   fi
35652 
35653     # Output is in $new_path
35654 
35655   windows_path="$new_path"
35656   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35657     unix_path=`$CYGPATH -u "$windows_path"`
35658     new_path="$unix_path"
35659   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35660     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35661     new_path="$unix_path"
35662   fi
35663 
35664     # remove trailing .exe if any
35665     new_path="${new_path/%.exe/}"
35666 
35667     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35668     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35669   fi
35670 
35671     else
35672       # We're on a unix platform. Hooray! :)
35673       # First separate the path from the arguments. This will split at the first
35674       # space.
35675       complete="$LD"
35676       path="${complete%% *}"
35677       tmp="$complete EOL"
35678       arguments="${tmp#* }"
35679 
35680       # Cannot rely on the command "which" here since it doesn't always work.
35681       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35682       if test -z "$is_absolute_path"; then
35683         # Path to executable is not absolute. Find it.
35684         IFS_save="$IFS"
35685         IFS=:
35686         for p in $PATH; do
35687           if test -f "$p/$path" && test -x "$p/$path"; then
35688             new_path="$p/$path"
35689             break
35690           fi
35691         done
35692         IFS="$IFS_save"
35693       else
35694         # This is an absolute path, we can use it without further modifications.
35695         new_path="$path"
35696       fi
35697 
35698       if test "x$new_path" = x; then
35699         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35700 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35701         has_space=`$ECHO "$complete" | $GREP " "`
35702         if test "x$has_space" != x; then
35703           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35704 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35705         fi
35706         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35707       fi
35708     fi
35709 
35710     # Now join together the path and the arguments once again
35711     if test "x$arguments" != xEOL; then
35712       new_complete="$new_path ${arguments% *}"
35713     else
35714       new_complete="$new_path"
35715     fi
35716 
35717     if test "x$complete" != "x$new_complete"; then
35718       LD="$new_complete"
35719       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35720 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35721     fi
35722   fi
35723 
35724     # Verify that we indeed succeeded with this trick.
35725     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35726 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35727     "$LD" --version > /dev/null
35728     if test $? -eq 0 ; then
35729       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35730 $as_echo "no" >&6; }
35731       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35732     else
35733       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35734 $as_echo "yes" >&6; }
35735     fi
35736     LDCXX="$LD"
35737   else
35738     # All other toolchains use the compiler to link.
35739     LD="$CC"
35740     LDCXX="$CXX"
35741   fi
35742 
35743   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35744 
35745 
35746   #
35747   # Setup the assembler (AS)
35748   #
35749   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35750     # FIXME: should this really be solaris, or solstudio?
35751 
35752 
35753   # Publish this variable in the help.
35754 
35755 
35756   if [ -z "${AS+x}" ]; then
35757     # The variable is not set by user, try to locate tool using the code snippet
35758     for ac_prog in as
35759 do
35760   # Extract the first word of "$ac_prog", so it can be a program name with args.
35761 set dummy $ac_prog; ac_word=$2
35762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35763 $as_echo_n "checking for $ac_word... " >&6; }
35764 if ${ac_cv_path_AS+:} false; then :
35765   $as_echo_n "(cached) " >&6
35766 else
35767   case $AS in
35768   [\\/]* | ?:[\\/]*)
35769   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35770   ;;
35771   *)
35772   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35773 for as_dir in $PATH
35774 do
35775   IFS=$as_save_IFS
35776   test -z "$as_dir" && as_dir=.
35777     for ac_exec_ext in '' $ac_executable_extensions; do
35778   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35779     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35780     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35781     break 2
35782   fi
35783 done
35784   done
35785 IFS=$as_save_IFS
35786 
35787   ;;
35788 esac
35789 fi
35790 AS=$ac_cv_path_AS
35791 if test -n "$AS"; then
35792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35793 $as_echo "$AS" >&6; }
35794 else
35795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35796 $as_echo "no" >&6; }
35797 fi
35798 
35799 
35800   test -n "$AS" && break
35801 done
35802 
35803   else
35804     # The variable is set, but is it from the command line or the environment?
35805 
35806     # Try to remove the string !AS! from our list.
35807     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35808     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35809       # If it failed, the variable was not from the command line. Ignore it,
35810       # but warn the user (except for BASH, which is always set by the calling BASH).
35811       if test "xAS" != xBASH; then
35812         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35813 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35814       fi
35815       # Try to locate tool using the code snippet
35816       for ac_prog in as
35817 do
35818   # Extract the first word of "$ac_prog", so it can be a program name with args.
35819 set dummy $ac_prog; ac_word=$2
35820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35821 $as_echo_n "checking for $ac_word... " >&6; }
35822 if ${ac_cv_path_AS+:} false; then :
35823   $as_echo_n "(cached) " >&6
35824 else
35825   case $AS in
35826   [\\/]* | ?:[\\/]*)
35827   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35828   ;;
35829   *)
35830   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35831 for as_dir in $PATH
35832 do
35833   IFS=$as_save_IFS
35834   test -z "$as_dir" && as_dir=.
35835     for ac_exec_ext in '' $ac_executable_extensions; do
35836   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35837     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35838     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35839     break 2
35840   fi
35841 done
35842   done
35843 IFS=$as_save_IFS
35844 
35845   ;;
35846 esac
35847 fi
35848 AS=$ac_cv_path_AS
35849 if test -n "$AS"; then
35850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35851 $as_echo "$AS" >&6; }
35852 else
35853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35854 $as_echo "no" >&6; }
35855 fi
35856 
35857 
35858   test -n "$AS" && break
35859 done
35860 
35861     else
35862       # If it succeeded, then it was overridden by the user. We will use it
35863       # for the tool.
35864 
35865       # First remove it from the list of overridden variables, so we can test
35866       # for unknown variables in the end.
35867       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35868 
35869       # Check if we try to supply an empty value
35870       if test "x$AS" = x; then
35871         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35872 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35873         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35874 $as_echo_n "checking for AS... " >&6; }
35875         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35876 $as_echo "disabled" >&6; }
35877       else
35878         # Check if the provided tool contains a complete path.
35879         tool_specified="$AS"
35880         tool_basename="${tool_specified##*/}"
35881         if test "x$tool_basename" = "x$tool_specified"; then
35882           # A command without a complete path is provided, search $PATH.
35883           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35884 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35885           # Extract the first word of "$tool_basename", so it can be a program name with args.
35886 set dummy $tool_basename; ac_word=$2
35887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35888 $as_echo_n "checking for $ac_word... " >&6; }
35889 if ${ac_cv_path_AS+:} false; then :
35890   $as_echo_n "(cached) " >&6
35891 else
35892   case $AS in
35893   [\\/]* | ?:[\\/]*)
35894   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35895   ;;
35896   *)
35897   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35898 for as_dir in $PATH
35899 do
35900   IFS=$as_save_IFS
35901   test -z "$as_dir" && as_dir=.
35902     for ac_exec_ext in '' $ac_executable_extensions; do
35903   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35904     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35905     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35906     break 2
35907   fi
35908 done
35909   done
35910 IFS=$as_save_IFS
35911 
35912   ;;
35913 esac
35914 fi
35915 AS=$ac_cv_path_AS
35916 if test -n "$AS"; then
35917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35918 $as_echo "$AS" >&6; }
35919 else
35920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35921 $as_echo "no" >&6; }
35922 fi
35923 
35924 
35925           if test "x$AS" = x; then
35926             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35927           fi
35928         else
35929           # Otherwise we believe it is a complete path. Use it as it is.
35930           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35931 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35932           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35933 $as_echo_n "checking for AS... " >&6; }
35934           if test ! -x "$tool_specified"; then
35935             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35936 $as_echo "not found" >&6; }
35937             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35938           fi
35939           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35940 $as_echo "$tool_specified" >&6; }
35941         fi
35942       fi
35943     fi
35944 
35945   fi
35946 
35947 
35948 
35949   # Only process if variable expands to non-empty
35950 
35951   if test "x$AS" != x; then
35952     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35953 
35954   # First separate the path from the arguments. This will split at the first
35955   # space.
35956   complete="$AS"
35957   path="${complete%% *}"
35958   tmp="$complete EOL"
35959   arguments="${tmp#* }"
35960 
35961   # Input might be given as Windows format, start by converting to
35962   # unix format.
35963   new_path=`$CYGPATH -u "$path"`
35964 
35965   # Now try to locate executable using which
35966   new_path=`$WHICH "$new_path" 2> /dev/null`
35967   # bat and cmd files are not always considered executable in cygwin causing which
35968   # to not find them
35969   if test "x$new_path" = x \
35970       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35971       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35972     new_path=`$CYGPATH -u "$path"`
35973   fi
35974   if test "x$new_path" = x; then
35975     # Oops. Which didn't find the executable.
35976     # The splitting of arguments from the executable at a space might have been incorrect,
35977     # since paths with space are more likely in Windows. Give it another try with the whole
35978     # argument.
35979     path="$complete"
35980     arguments="EOL"
35981     new_path=`$CYGPATH -u "$path"`
35982     new_path=`$WHICH "$new_path" 2> /dev/null`
35983     # bat and cmd files are not always considered executable in cygwin causing which
35984     # to not find them
35985     if test "x$new_path" = x \
35986         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35987         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35988       new_path=`$CYGPATH -u "$path"`
35989     fi
35990     if test "x$new_path" = x; then
35991       # It's still not found. Now this is an unrecoverable error.
35992       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35993 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35994       has_space=`$ECHO "$complete" | $GREP " "`
35995       if test "x$has_space" != x; then
35996         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35997 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35998       fi
35999       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36000     fi
36001   fi
36002 
36003   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36004   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36005   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36006   # "foo.exe" is OK but "foo" is an error.
36007   #
36008   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36009   # It is also a way to make sure we got the proper file name for the real test later on.
36010   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36011   if test "x$test_shortpath" = x; then
36012     # Short path failed, file does not exist as specified.
36013     # Try adding .exe or .cmd
36014     if test -f "${new_path}.exe"; then
36015       input_to_shortpath="${new_path}.exe"
36016     elif test -f "${new_path}.cmd"; then
36017       input_to_shortpath="${new_path}.cmd"
36018     else
36019       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36020 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36021       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36022 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36023       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36024     fi
36025   else
36026     input_to_shortpath="$new_path"
36027   fi
36028 
36029   # Call helper function which possibly converts this using DOS-style short mode.
36030   # If so, the updated path is stored in $new_path.
36031   new_path="$input_to_shortpath"
36032 
36033   input_path="$input_to_shortpath"
36034   # Check if we need to convert this using DOS-style short mode. If the path
36035   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36036   # take no chances and rewrite it.
36037   # Note: m4 eats our [], so we need to use [ and ] instead.
36038   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36039   if test "x$has_forbidden_chars" != x; then
36040     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36041     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36042     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36043     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36044       # Going to short mode and back again did indeed matter. Since short mode is
36045       # case insensitive, let's make it lowercase to improve readability.
36046       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36047       # Now convert it back to Unix-style (cygpath)
36048       input_path=`$CYGPATH -u "$shortmode_path"`
36049       new_path="$input_path"
36050     fi
36051   fi
36052 
36053   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36054   if test "x$test_cygdrive_prefix" = x; then
36055     # As a simple fix, exclude /usr/bin since it's not a real path.
36056     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36057       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36058       # a path prefixed by /cygdrive for fixpath to work.
36059       new_path="$CYGWIN_ROOT_PATH$input_path"
36060     fi
36061   fi
36062 
36063   # remove trailing .exe if any
36064   new_path="${new_path/%.exe/}"
36065 
36066     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36067 
36068   # First separate the path from the arguments. This will split at the first
36069   # space.
36070   complete="$AS"
36071   path="${complete%% *}"
36072   tmp="$complete EOL"
36073   arguments="${tmp#* }"
36074 
36075   # Input might be given as Windows format, start by converting to
36076   # unix format.
36077   new_path="$path"
36078 
36079   windows_path="$new_path"
36080   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36081     unix_path=`$CYGPATH -u "$windows_path"`
36082     new_path="$unix_path"
36083   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36084     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36085     new_path="$unix_path"
36086   fi
36087 
36088 
36089   # Now try to locate executable using which
36090   new_path=`$WHICH "$new_path" 2> /dev/null`
36091 
36092   if test "x$new_path" = x; then
36093     # Oops. Which didn't find the executable.
36094     # The splitting of arguments from the executable at a space might have been incorrect,
36095     # since paths with space are more likely in Windows. Give it another try with the whole
36096     # argument.
36097     path="$complete"
36098     arguments="EOL"
36099     new_path="$path"
36100 
36101   windows_path="$new_path"
36102   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36103     unix_path=`$CYGPATH -u "$windows_path"`
36104     new_path="$unix_path"
36105   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36106     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36107     new_path="$unix_path"
36108   fi
36109 
36110 
36111     new_path=`$WHICH "$new_path" 2> /dev/null`
36112     # bat and cmd files are not always considered executable in MSYS causing which
36113     # to not find them
36114     if test "x$new_path" = x \
36115         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36116         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36117       new_path="$path"
36118 
36119   windows_path="$new_path"
36120   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36121     unix_path=`$CYGPATH -u "$windows_path"`
36122     new_path="$unix_path"
36123   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36124     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36125     new_path="$unix_path"
36126   fi
36127 
36128     fi
36129 
36130     if test "x$new_path" = x; then
36131       # It's still not found. Now this is an unrecoverable error.
36132       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36133 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36134       has_space=`$ECHO "$complete" | $GREP " "`
36135       if test "x$has_space" != x; then
36136         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36137 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36138       fi
36139       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36140     fi
36141   fi
36142 
36143   # Now new_path has a complete unix path to the binary
36144   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36145     # Keep paths in /bin as-is, but remove trailing .exe if any
36146     new_path="${new_path/%.exe/}"
36147     # Do not save /bin paths to all_fixpath_prefixes!
36148   else
36149     # Not in mixed or Windows style, start by that.
36150     new_path=`cmd //c echo $new_path`
36151 
36152   input_path="$new_path"
36153   # Check if we need to convert this using DOS-style short mode. If the path
36154   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36155   # take no chances and rewrite it.
36156   # Note: m4 eats our [], so we need to use [ and ] instead.
36157   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36158   if test "x$has_forbidden_chars" != x; then
36159     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36160     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36161   fi
36162 
36163     # Output is in $new_path
36164 
36165   windows_path="$new_path"
36166   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36167     unix_path=`$CYGPATH -u "$windows_path"`
36168     new_path="$unix_path"
36169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36170     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36171     new_path="$unix_path"
36172   fi
36173 
36174     # remove trailing .exe if any
36175     new_path="${new_path/%.exe/}"
36176 
36177     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36178     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36179   fi
36180 
36181     else
36182       # We're on a unix platform. Hooray! :)
36183       # First separate the path from the arguments. This will split at the first
36184       # space.
36185       complete="$AS"
36186       path="${complete%% *}"
36187       tmp="$complete EOL"
36188       arguments="${tmp#* }"
36189 
36190       # Cannot rely on the command "which" here since it doesn't always work.
36191       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36192       if test -z "$is_absolute_path"; then
36193         # Path to executable is not absolute. Find it.
36194         IFS_save="$IFS"
36195         IFS=:
36196         for p in $PATH; do
36197           if test -f "$p/$path" && test -x "$p/$path"; then
36198             new_path="$p/$path"
36199             break
36200           fi
36201         done
36202         IFS="$IFS_save"
36203       else
36204         # This is an absolute path, we can use it without further modifications.
36205         new_path="$path"
36206       fi
36207 
36208       if test "x$new_path" = x; then
36209         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36210 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36211         has_space=`$ECHO "$complete" | $GREP " "`
36212         if test "x$has_space" != x; then
36213           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36214 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36215         fi
36216         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36217       fi
36218     fi
36219 
36220     # Now join together the path and the arguments once again
36221     if test "x$arguments" != xEOL; then
36222       new_complete="$new_path ${arguments% *}"
36223     else
36224       new_complete="$new_path"
36225     fi
36226 
36227     if test "x$complete" != "x$new_complete"; then
36228       AS="$new_complete"
36229       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36230 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36231     fi
36232   fi
36233 
36234   else
36235     # FIXME: is this correct for microsoft?
36236     AS="$CC -c"
36237   fi
36238 
36239 
36240   #
36241   # Setup the archiver (AR)
36242   #
36243   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36244     # The corresponding ar tool is lib.exe (used to create static libraries)
36245     # Extract the first word of "lib", so it can be a program name with args.
36246 set dummy lib; ac_word=$2
36247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36248 $as_echo_n "checking for $ac_word... " >&6; }
36249 if ${ac_cv_prog_AR+:} false; then :
36250   $as_echo_n "(cached) " >&6
36251 else
36252   if test -n "$AR"; then
36253   ac_cv_prog_AR="$AR" # Let the user override the test.
36254 else
36255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36256 for as_dir in $PATH
36257 do
36258   IFS=$as_save_IFS
36259   test -z "$as_dir" && as_dir=.
36260     for ac_exec_ext in '' $ac_executable_extensions; do
36261   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36262     ac_cv_prog_AR="lib"
36263     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36264     break 2
36265   fi
36266 done
36267   done
36268 IFS=$as_save_IFS
36269 
36270 fi
36271 fi
36272 AR=$ac_cv_prog_AR
36273 if test -n "$AR"; then
36274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36275 $as_echo "$AR" >&6; }
36276 else
36277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36278 $as_echo "no" >&6; }
36279 fi
36280 
36281 
36282   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36283 
36284 
36285   # Publish this variable in the help.
36286 
36287 
36288   if [ -z "${AR+x}" ]; then
36289     # The variable is not set by user, try to locate tool using the code snippet
36290     if test -n "$ac_tool_prefix"; then
36291   for ac_prog in ar gcc-ar
36292   do
36293     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36294 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36296 $as_echo_n "checking for $ac_word... " >&6; }
36297 if ${ac_cv_prog_AR+:} false; then :
36298   $as_echo_n "(cached) " >&6
36299 else
36300   if test -n "$AR"; then
36301   ac_cv_prog_AR="$AR" # Let the user override the test.
36302 else
36303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36304 for as_dir in $PATH
36305 do
36306   IFS=$as_save_IFS
36307   test -z "$as_dir" && as_dir=.
36308     for ac_exec_ext in '' $ac_executable_extensions; do
36309   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36310     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36311     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36312     break 2
36313   fi
36314 done
36315   done
36316 IFS=$as_save_IFS
36317 
36318 fi
36319 fi
36320 AR=$ac_cv_prog_AR
36321 if test -n "$AR"; then
36322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36323 $as_echo "$AR" >&6; }
36324 else
36325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36326 $as_echo "no" >&6; }
36327 fi
36328 
36329 
36330     test -n "$AR" && break
36331   done
36332 fi
36333 if test -z "$AR"; then
36334   ac_ct_AR=$AR
36335   for ac_prog in ar gcc-ar
36336 do
36337   # Extract the first word of "$ac_prog", so it can be a program name with args.
36338 set dummy $ac_prog; ac_word=$2
36339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36340 $as_echo_n "checking for $ac_word... " >&6; }
36341 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36342   $as_echo_n "(cached) " >&6
36343 else
36344   if test -n "$ac_ct_AR"; then
36345   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36346 else
36347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36348 for as_dir in $PATH
36349 do
36350   IFS=$as_save_IFS
36351   test -z "$as_dir" && as_dir=.
36352     for ac_exec_ext in '' $ac_executable_extensions; do
36353   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36354     ac_cv_prog_ac_ct_AR="$ac_prog"
36355     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36356     break 2
36357   fi
36358 done
36359   done
36360 IFS=$as_save_IFS
36361 
36362 fi
36363 fi
36364 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36365 if test -n "$ac_ct_AR"; then
36366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36367 $as_echo "$ac_ct_AR" >&6; }
36368 else
36369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36370 $as_echo "no" >&6; }
36371 fi
36372 
36373 
36374   test -n "$ac_ct_AR" && break
36375 done
36376 
36377   if test "x$ac_ct_AR" = x; then
36378     AR=""
36379   else
36380     case $cross_compiling:$ac_tool_warned in
36381 yes:)
36382 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36383 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36384 ac_tool_warned=yes ;;
36385 esac
36386     AR=$ac_ct_AR
36387   fi
36388 fi
36389 
36390   else
36391     # The variable is set, but is it from the command line or the environment?
36392 
36393     # Try to remove the string !AR! from our list.
36394     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36395     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36396       # If it failed, the variable was not from the command line. Ignore it,
36397       # but warn the user (except for BASH, which is always set by the calling BASH).
36398       if test "xAR" != xBASH; then
36399         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36400 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36401       fi
36402       # Try to locate tool using the code snippet
36403       if test -n "$ac_tool_prefix"; then
36404   for ac_prog in ar gcc-ar
36405   do
36406     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36407 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36409 $as_echo_n "checking for $ac_word... " >&6; }
36410 if ${ac_cv_prog_AR+:} false; then :
36411   $as_echo_n "(cached) " >&6
36412 else
36413   if test -n "$AR"; then
36414   ac_cv_prog_AR="$AR" # Let the user override the test.
36415 else
36416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36417 for as_dir in $PATH
36418 do
36419   IFS=$as_save_IFS
36420   test -z "$as_dir" && as_dir=.
36421     for ac_exec_ext in '' $ac_executable_extensions; do
36422   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36423     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36424     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36425     break 2
36426   fi
36427 done
36428   done
36429 IFS=$as_save_IFS
36430 
36431 fi
36432 fi
36433 AR=$ac_cv_prog_AR
36434 if test -n "$AR"; then
36435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36436 $as_echo "$AR" >&6; }
36437 else
36438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36439 $as_echo "no" >&6; }
36440 fi
36441 
36442 
36443     test -n "$AR" && break
36444   done
36445 fi
36446 if test -z "$AR"; then
36447   ac_ct_AR=$AR
36448   for ac_prog in ar gcc-ar
36449 do
36450   # Extract the first word of "$ac_prog", so it can be a program name with args.
36451 set dummy $ac_prog; ac_word=$2
36452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36453 $as_echo_n "checking for $ac_word... " >&6; }
36454 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36455   $as_echo_n "(cached) " >&6
36456 else
36457   if test -n "$ac_ct_AR"; then
36458   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36459 else
36460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36461 for as_dir in $PATH
36462 do
36463   IFS=$as_save_IFS
36464   test -z "$as_dir" && as_dir=.
36465     for ac_exec_ext in '' $ac_executable_extensions; do
36466   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36467     ac_cv_prog_ac_ct_AR="$ac_prog"
36468     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36469     break 2
36470   fi
36471 done
36472   done
36473 IFS=$as_save_IFS
36474 
36475 fi
36476 fi
36477 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36478 if test -n "$ac_ct_AR"; then
36479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36480 $as_echo "$ac_ct_AR" >&6; }
36481 else
36482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36483 $as_echo "no" >&6; }
36484 fi
36485 
36486 
36487   test -n "$ac_ct_AR" && break
36488 done
36489 
36490   if test "x$ac_ct_AR" = x; then
36491     AR=""
36492   else
36493     case $cross_compiling:$ac_tool_warned in
36494 yes:)
36495 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36496 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36497 ac_tool_warned=yes ;;
36498 esac
36499     AR=$ac_ct_AR
36500   fi
36501 fi
36502 
36503     else
36504       # If it succeeded, then it was overridden by the user. We will use it
36505       # for the tool.
36506 
36507       # First remove it from the list of overridden variables, so we can test
36508       # for unknown variables in the end.
36509       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36510 
36511       # Check if we try to supply an empty value
36512       if test "x$AR" = x; then
36513         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36514 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36515         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36516 $as_echo_n "checking for AR... " >&6; }
36517         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36518 $as_echo "disabled" >&6; }
36519       else
36520         # Check if the provided tool contains a complete path.
36521         tool_specified="$AR"
36522         tool_basename="${tool_specified##*/}"
36523         if test "x$tool_basename" = "x$tool_specified"; then
36524           # A command without a complete path is provided, search $PATH.
36525           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36526 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36527           # Extract the first word of "$tool_basename", so it can be a program name with args.
36528 set dummy $tool_basename; ac_word=$2
36529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36530 $as_echo_n "checking for $ac_word... " >&6; }
36531 if ${ac_cv_path_AR+:} false; then :
36532   $as_echo_n "(cached) " >&6
36533 else
36534   case $AR in
36535   [\\/]* | ?:[\\/]*)
36536   ac_cv_path_AR="$AR" # Let the user override the test with a path.
36537   ;;
36538   *)
36539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36540 for as_dir in $PATH
36541 do
36542   IFS=$as_save_IFS
36543   test -z "$as_dir" && as_dir=.
36544     for ac_exec_ext in '' $ac_executable_extensions; do
36545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36546     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36548     break 2
36549   fi
36550 done
36551   done
36552 IFS=$as_save_IFS
36553 
36554   ;;
36555 esac
36556 fi
36557 AR=$ac_cv_path_AR
36558 if test -n "$AR"; then
36559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36560 $as_echo "$AR" >&6; }
36561 else
36562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36563 $as_echo "no" >&6; }
36564 fi
36565 
36566 
36567           if test "x$AR" = x; then
36568             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36569           fi
36570         else
36571           # Otherwise we believe it is a complete path. Use it as it is.
36572           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36573 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36574           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36575 $as_echo_n "checking for AR... " >&6; }
36576           if test ! -x "$tool_specified"; then
36577             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36578 $as_echo "not found" >&6; }
36579             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36580           fi
36581           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36582 $as_echo "$tool_specified" >&6; }
36583         fi
36584       fi
36585     fi
36586 
36587   fi
36588 
36589 
36590   else
36591 
36592 
36593   # Publish this variable in the help.
36594 
36595 
36596   if [ -z "${AR+x}" ]; then
36597     # The variable is not set by user, try to locate tool using the code snippet
36598     if test -n "$ac_tool_prefix"; then
36599   for ac_prog in ar
36600   do
36601     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36602 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36604 $as_echo_n "checking for $ac_word... " >&6; }
36605 if ${ac_cv_prog_AR+:} false; then :
36606   $as_echo_n "(cached) " >&6
36607 else
36608   if test -n "$AR"; then
36609   ac_cv_prog_AR="$AR" # Let the user override the test.
36610 else
36611 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36612 for as_dir in $PATH
36613 do
36614   IFS=$as_save_IFS
36615   test -z "$as_dir" && as_dir=.
36616     for ac_exec_ext in '' $ac_executable_extensions; do
36617   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36618     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36619     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36620     break 2
36621   fi
36622 done
36623   done
36624 IFS=$as_save_IFS
36625 
36626 fi
36627 fi
36628 AR=$ac_cv_prog_AR
36629 if test -n "$AR"; then
36630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36631 $as_echo "$AR" >&6; }
36632 else
36633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36634 $as_echo "no" >&6; }
36635 fi
36636 
36637 
36638     test -n "$AR" && break
36639   done
36640 fi
36641 if test -z "$AR"; then
36642   ac_ct_AR=$AR
36643   for ac_prog in ar
36644 do
36645   # Extract the first word of "$ac_prog", so it can be a program name with args.
36646 set dummy $ac_prog; ac_word=$2
36647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36648 $as_echo_n "checking for $ac_word... " >&6; }
36649 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36650   $as_echo_n "(cached) " >&6
36651 else
36652   if test -n "$ac_ct_AR"; then
36653   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36654 else
36655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36656 for as_dir in $PATH
36657 do
36658   IFS=$as_save_IFS
36659   test -z "$as_dir" && as_dir=.
36660     for ac_exec_ext in '' $ac_executable_extensions; do
36661   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36662     ac_cv_prog_ac_ct_AR="$ac_prog"
36663     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36664     break 2
36665   fi
36666 done
36667   done
36668 IFS=$as_save_IFS
36669 
36670 fi
36671 fi
36672 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36673 if test -n "$ac_ct_AR"; then
36674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36675 $as_echo "$ac_ct_AR" >&6; }
36676 else
36677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36678 $as_echo "no" >&6; }
36679 fi
36680 
36681 
36682   test -n "$ac_ct_AR" && break
36683 done
36684 
36685   if test "x$ac_ct_AR" = x; then
36686     AR=""
36687   else
36688     case $cross_compiling:$ac_tool_warned in
36689 yes:)
36690 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36691 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36692 ac_tool_warned=yes ;;
36693 esac
36694     AR=$ac_ct_AR
36695   fi
36696 fi
36697 
36698   else
36699     # The variable is set, but is it from the command line or the environment?
36700 
36701     # Try to remove the string !AR! from our list.
36702     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36703     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36704       # If it failed, the variable was not from the command line. Ignore it,
36705       # but warn the user (except for BASH, which is always set by the calling BASH).
36706       if test "xAR" != xBASH; then
36707         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36708 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36709       fi
36710       # Try to locate tool using the code snippet
36711       if test -n "$ac_tool_prefix"; then
36712   for ac_prog in ar
36713   do
36714     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36715 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36717 $as_echo_n "checking for $ac_word... " >&6; }
36718 if ${ac_cv_prog_AR+:} false; then :
36719   $as_echo_n "(cached) " >&6
36720 else
36721   if test -n "$AR"; then
36722   ac_cv_prog_AR="$AR" # Let the user override the test.
36723 else
36724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36725 for as_dir in $PATH
36726 do
36727   IFS=$as_save_IFS
36728   test -z "$as_dir" && as_dir=.
36729     for ac_exec_ext in '' $ac_executable_extensions; do
36730   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36731     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36732     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36733     break 2
36734   fi
36735 done
36736   done
36737 IFS=$as_save_IFS
36738 
36739 fi
36740 fi
36741 AR=$ac_cv_prog_AR
36742 if test -n "$AR"; then
36743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36744 $as_echo "$AR" >&6; }
36745 else
36746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36747 $as_echo "no" >&6; }
36748 fi
36749 
36750 
36751     test -n "$AR" && break
36752   done
36753 fi
36754 if test -z "$AR"; then
36755   ac_ct_AR=$AR
36756   for ac_prog in ar
36757 do
36758   # Extract the first word of "$ac_prog", so it can be a program name with args.
36759 set dummy $ac_prog; ac_word=$2
36760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36761 $as_echo_n "checking for $ac_word... " >&6; }
36762 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36763   $as_echo_n "(cached) " >&6
36764 else
36765   if test -n "$ac_ct_AR"; then
36766   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36767 else
36768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36769 for as_dir in $PATH
36770 do
36771   IFS=$as_save_IFS
36772   test -z "$as_dir" && as_dir=.
36773     for ac_exec_ext in '' $ac_executable_extensions; do
36774   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36775     ac_cv_prog_ac_ct_AR="$ac_prog"
36776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36777     break 2
36778   fi
36779 done
36780   done
36781 IFS=$as_save_IFS
36782 
36783 fi
36784 fi
36785 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36786 if test -n "$ac_ct_AR"; then
36787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36788 $as_echo "$ac_ct_AR" >&6; }
36789 else
36790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36791 $as_echo "no" >&6; }
36792 fi
36793 
36794 
36795   test -n "$ac_ct_AR" && break
36796 done
36797 
36798   if test "x$ac_ct_AR" = x; then
36799     AR=""
36800   else
36801     case $cross_compiling:$ac_tool_warned in
36802 yes:)
36803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36804 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36805 ac_tool_warned=yes ;;
36806 esac
36807     AR=$ac_ct_AR
36808   fi
36809 fi
36810 
36811     else
36812       # If it succeeded, then it was overridden by the user. We will use it
36813       # for the tool.
36814 
36815       # First remove it from the list of overridden variables, so we can test
36816       # for unknown variables in the end.
36817       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36818 
36819       # Check if we try to supply an empty value
36820       if test "x$AR" = x; then
36821         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36822 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36823         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36824 $as_echo_n "checking for AR... " >&6; }
36825         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36826 $as_echo "disabled" >&6; }
36827       else
36828         # Check if the provided tool contains a complete path.
36829         tool_specified="$AR"
36830         tool_basename="${tool_specified##*/}"
36831         if test "x$tool_basename" = "x$tool_specified"; then
36832           # A command without a complete path is provided, search $PATH.
36833           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36834 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36835           # Extract the first word of "$tool_basename", so it can be a program name with args.
36836 set dummy $tool_basename; ac_word=$2
36837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36838 $as_echo_n "checking for $ac_word... " >&6; }
36839 if ${ac_cv_path_AR+:} false; then :
36840   $as_echo_n "(cached) " >&6
36841 else
36842   case $AR in
36843   [\\/]* | ?:[\\/]*)
36844   ac_cv_path_AR="$AR" # Let the user override the test with a path.
36845   ;;
36846   *)
36847   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36848 for as_dir in $PATH
36849 do
36850   IFS=$as_save_IFS
36851   test -z "$as_dir" && as_dir=.
36852     for ac_exec_ext in '' $ac_executable_extensions; do
36853   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36854     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36855     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36856     break 2
36857   fi
36858 done
36859   done
36860 IFS=$as_save_IFS
36861 
36862   ;;
36863 esac
36864 fi
36865 AR=$ac_cv_path_AR
36866 if test -n "$AR"; then
36867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36868 $as_echo "$AR" >&6; }
36869 else
36870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36871 $as_echo "no" >&6; }
36872 fi
36873 
36874 
36875           if test "x$AR" = x; then
36876             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36877           fi
36878         else
36879           # Otherwise we believe it is a complete path. Use it as it is.
36880           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36881 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36882           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36883 $as_echo_n "checking for AR... " >&6; }
36884           if test ! -x "$tool_specified"; then
36885             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36886 $as_echo "not found" >&6; }
36887             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36888           fi
36889           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36890 $as_echo "$tool_specified" >&6; }
36891         fi
36892       fi
36893     fi
36894 
36895   fi
36896 
36897 
36898   fi
36899 
36900   # Only process if variable expands to non-empty
36901 
36902   if test "x$AR" != x; then
36903     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36904 
36905   # First separate the path from the arguments. This will split at the first
36906   # space.
36907   complete="$AR"
36908   path="${complete%% *}"
36909   tmp="$complete EOL"
36910   arguments="${tmp#* }"
36911 
36912   # Input might be given as Windows format, start by converting to
36913   # unix format.
36914   new_path=`$CYGPATH -u "$path"`
36915 
36916   # Now try to locate executable using which
36917   new_path=`$WHICH "$new_path" 2> /dev/null`
36918   # bat and cmd files are not always considered executable in cygwin causing which
36919   # to not find them
36920   if test "x$new_path" = x \
36921       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36922       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36923     new_path=`$CYGPATH -u "$path"`
36924   fi
36925   if test "x$new_path" = x; then
36926     # Oops. Which didn't find the executable.
36927     # The splitting of arguments from the executable at a space might have been incorrect,
36928     # since paths with space are more likely in Windows. Give it another try with the whole
36929     # argument.
36930     path="$complete"
36931     arguments="EOL"
36932     new_path=`$CYGPATH -u "$path"`
36933     new_path=`$WHICH "$new_path" 2> /dev/null`
36934     # bat and cmd files are not always considered executable in cygwin causing which
36935     # to not find them
36936     if test "x$new_path" = x \
36937         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36938         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36939       new_path=`$CYGPATH -u "$path"`
36940     fi
36941     if test "x$new_path" = x; then
36942       # It's still not found. Now this is an unrecoverable error.
36943       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36944 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36945       has_space=`$ECHO "$complete" | $GREP " "`
36946       if test "x$has_space" != x; then
36947         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36948 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36949       fi
36950       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36951     fi
36952   fi
36953 
36954   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36955   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36956   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36957   # "foo.exe" is OK but "foo" is an error.
36958   #
36959   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36960   # It is also a way to make sure we got the proper file name for the real test later on.
36961   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36962   if test "x$test_shortpath" = x; then
36963     # Short path failed, file does not exist as specified.
36964     # Try adding .exe or .cmd
36965     if test -f "${new_path}.exe"; then
36966       input_to_shortpath="${new_path}.exe"
36967     elif test -f "${new_path}.cmd"; then
36968       input_to_shortpath="${new_path}.cmd"
36969     else
36970       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36971 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36972       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36973 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36974       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36975     fi
36976   else
36977     input_to_shortpath="$new_path"
36978   fi
36979 
36980   # Call helper function which possibly converts this using DOS-style short mode.
36981   # If so, the updated path is stored in $new_path.
36982   new_path="$input_to_shortpath"
36983 
36984   input_path="$input_to_shortpath"
36985   # Check if we need to convert this using DOS-style short mode. If the path
36986   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36987   # take no chances and rewrite it.
36988   # Note: m4 eats our [], so we need to use [ and ] instead.
36989   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36990   if test "x$has_forbidden_chars" != x; then
36991     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36992     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36993     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36994     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36995       # Going to short mode and back again did indeed matter. Since short mode is
36996       # case insensitive, let's make it lowercase to improve readability.
36997       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36998       # Now convert it back to Unix-style (cygpath)
36999       input_path=`$CYGPATH -u "$shortmode_path"`
37000       new_path="$input_path"
37001     fi
37002   fi
37003 
37004   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37005   if test "x$test_cygdrive_prefix" = x; then
37006     # As a simple fix, exclude /usr/bin since it's not a real path.
37007     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37008       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37009       # a path prefixed by /cygdrive for fixpath to work.
37010       new_path="$CYGWIN_ROOT_PATH$input_path"
37011     fi
37012   fi
37013 
37014   # remove trailing .exe if any
37015   new_path="${new_path/%.exe/}"
37016 
37017     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37018 
37019   # First separate the path from the arguments. This will split at the first
37020   # space.
37021   complete="$AR"
37022   path="${complete%% *}"
37023   tmp="$complete EOL"
37024   arguments="${tmp#* }"
37025 
37026   # Input might be given as Windows format, start by converting to
37027   # unix format.
37028   new_path="$path"
37029 
37030   windows_path="$new_path"
37031   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37032     unix_path=`$CYGPATH -u "$windows_path"`
37033     new_path="$unix_path"
37034   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37035     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37036     new_path="$unix_path"
37037   fi
37038 
37039 
37040   # Now try to locate executable using which
37041   new_path=`$WHICH "$new_path" 2> /dev/null`
37042 
37043   if test "x$new_path" = x; then
37044     # Oops. Which didn't find the executable.
37045     # The splitting of arguments from the executable at a space might have been incorrect,
37046     # since paths with space are more likely in Windows. Give it another try with the whole
37047     # argument.
37048     path="$complete"
37049     arguments="EOL"
37050     new_path="$path"
37051 
37052   windows_path="$new_path"
37053   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37054     unix_path=`$CYGPATH -u "$windows_path"`
37055     new_path="$unix_path"
37056   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37057     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37058     new_path="$unix_path"
37059   fi
37060 
37061 
37062     new_path=`$WHICH "$new_path" 2> /dev/null`
37063     # bat and cmd files are not always considered executable in MSYS causing which
37064     # to not find them
37065     if test "x$new_path" = x \
37066         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37067         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37068       new_path="$path"
37069 
37070   windows_path="$new_path"
37071   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37072     unix_path=`$CYGPATH -u "$windows_path"`
37073     new_path="$unix_path"
37074   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37075     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37076     new_path="$unix_path"
37077   fi
37078 
37079     fi
37080 
37081     if test "x$new_path" = x; then
37082       # It's still not found. Now this is an unrecoverable error.
37083       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37084 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37085       has_space=`$ECHO "$complete" | $GREP " "`
37086       if test "x$has_space" != x; then
37087         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37088 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37089       fi
37090       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37091     fi
37092   fi
37093 
37094   # Now new_path has a complete unix path to the binary
37095   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37096     # Keep paths in /bin as-is, but remove trailing .exe if any
37097     new_path="${new_path/%.exe/}"
37098     # Do not save /bin paths to all_fixpath_prefixes!
37099   else
37100     # Not in mixed or Windows style, start by that.
37101     new_path=`cmd //c echo $new_path`
37102 
37103   input_path="$new_path"
37104   # Check if we need to convert this using DOS-style short mode. If the path
37105   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37106   # take no chances and rewrite it.
37107   # Note: m4 eats our [], so we need to use [ and ] instead.
37108   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37109   if test "x$has_forbidden_chars" != x; then
37110     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37111     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37112   fi
37113 
37114     # Output is in $new_path
37115 
37116   windows_path="$new_path"
37117   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37118     unix_path=`$CYGPATH -u "$windows_path"`
37119     new_path="$unix_path"
37120   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37121     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37122     new_path="$unix_path"
37123   fi
37124 
37125     # remove trailing .exe if any
37126     new_path="${new_path/%.exe/}"
37127 
37128     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37129     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37130   fi
37131 
37132     else
37133       # We're on a unix platform. Hooray! :)
37134       # First separate the path from the arguments. This will split at the first
37135       # space.
37136       complete="$AR"
37137       path="${complete%% *}"
37138       tmp="$complete EOL"
37139       arguments="${tmp#* }"
37140 
37141       # Cannot rely on the command "which" here since it doesn't always work.
37142       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37143       if test -z "$is_absolute_path"; then
37144         # Path to executable is not absolute. Find it.
37145         IFS_save="$IFS"
37146         IFS=:
37147         for p in $PATH; do
37148           if test -f "$p/$path" && test -x "$p/$path"; then
37149             new_path="$p/$path"
37150             break
37151           fi
37152         done
37153         IFS="$IFS_save"
37154       else
37155         # This is an absolute path, we can use it without further modifications.
37156         new_path="$path"
37157       fi
37158 
37159       if test "x$new_path" = x; then
37160         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37161 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37162         has_space=`$ECHO "$complete" | $GREP " "`
37163         if test "x$has_space" != x; then
37164           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37165 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37166         fi
37167         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37168       fi
37169     fi
37170 
37171     # Now join together the path and the arguments once again
37172     if test "x$arguments" != xEOL; then
37173       new_complete="$new_path ${arguments% *}"
37174     else
37175       new_complete="$new_path"
37176     fi
37177 
37178     if test "x$complete" != "x$new_complete"; then
37179       AR="$new_complete"
37180       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37181 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37182     fi
37183   fi
37184 
37185 
37186 
37187   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37188 
37189 
37190   # Publish this variable in the help.
37191 
37192 
37193   if [ -z "${LIPO+x}" ]; then
37194     # The variable is not set by user, try to locate tool using the code snippet
37195     for ac_prog in lipo
37196 do
37197   # Extract the first word of "$ac_prog", so it can be a program name with args.
37198 set dummy $ac_prog; ac_word=$2
37199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37200 $as_echo_n "checking for $ac_word... " >&6; }
37201 if ${ac_cv_path_LIPO+:} false; then :
37202   $as_echo_n "(cached) " >&6
37203 else
37204   case $LIPO in
37205   [\\/]* | ?:[\\/]*)
37206   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37207   ;;
37208   *)
37209   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37210 for as_dir in $PATH
37211 do
37212   IFS=$as_save_IFS
37213   test -z "$as_dir" && as_dir=.
37214     for ac_exec_ext in '' $ac_executable_extensions; do
37215   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37216     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37217     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37218     break 2
37219   fi
37220 done
37221   done
37222 IFS=$as_save_IFS
37223 
37224   ;;
37225 esac
37226 fi
37227 LIPO=$ac_cv_path_LIPO
37228 if test -n "$LIPO"; then
37229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37230 $as_echo "$LIPO" >&6; }
37231 else
37232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37233 $as_echo "no" >&6; }
37234 fi
37235 
37236 
37237   test -n "$LIPO" && break
37238 done
37239 
37240   else
37241     # The variable is set, but is it from the command line or the environment?
37242 
37243     # Try to remove the string !LIPO! from our list.
37244     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37245     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37246       # If it failed, the variable was not from the command line. Ignore it,
37247       # but warn the user (except for BASH, which is always set by the calling BASH).
37248       if test "xLIPO" != xBASH; then
37249         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37250 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37251       fi
37252       # Try to locate tool using the code snippet
37253       for ac_prog in lipo
37254 do
37255   # Extract the first word of "$ac_prog", so it can be a program name with args.
37256 set dummy $ac_prog; ac_word=$2
37257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37258 $as_echo_n "checking for $ac_word... " >&6; }
37259 if ${ac_cv_path_LIPO+:} false; then :
37260   $as_echo_n "(cached) " >&6
37261 else
37262   case $LIPO in
37263   [\\/]* | ?:[\\/]*)
37264   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37265   ;;
37266   *)
37267   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37268 for as_dir in $PATH
37269 do
37270   IFS=$as_save_IFS
37271   test -z "$as_dir" && as_dir=.
37272     for ac_exec_ext in '' $ac_executable_extensions; do
37273   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37274     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37275     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37276     break 2
37277   fi
37278 done
37279   done
37280 IFS=$as_save_IFS
37281 
37282   ;;
37283 esac
37284 fi
37285 LIPO=$ac_cv_path_LIPO
37286 if test -n "$LIPO"; then
37287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37288 $as_echo "$LIPO" >&6; }
37289 else
37290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37291 $as_echo "no" >&6; }
37292 fi
37293 
37294 
37295   test -n "$LIPO" && break
37296 done
37297 
37298     else
37299       # If it succeeded, then it was overridden by the user. We will use it
37300       # for the tool.
37301 
37302       # First remove it from the list of overridden variables, so we can test
37303       # for unknown variables in the end.
37304       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37305 
37306       # Check if we try to supply an empty value
37307       if test "x$LIPO" = x; then
37308         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37309 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37310         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37311 $as_echo_n "checking for LIPO... " >&6; }
37312         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37313 $as_echo "disabled" >&6; }
37314       else
37315         # Check if the provided tool contains a complete path.
37316         tool_specified="$LIPO"
37317         tool_basename="${tool_specified##*/}"
37318         if test "x$tool_basename" = "x$tool_specified"; then
37319           # A command without a complete path is provided, search $PATH.
37320           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37321 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37322           # Extract the first word of "$tool_basename", so it can be a program name with args.
37323 set dummy $tool_basename; ac_word=$2
37324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37325 $as_echo_n "checking for $ac_word... " >&6; }
37326 if ${ac_cv_path_LIPO+:} false; then :
37327   $as_echo_n "(cached) " >&6
37328 else
37329   case $LIPO in
37330   [\\/]* | ?:[\\/]*)
37331   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37332   ;;
37333   *)
37334   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37335 for as_dir in $PATH
37336 do
37337   IFS=$as_save_IFS
37338   test -z "$as_dir" && as_dir=.
37339     for ac_exec_ext in '' $ac_executable_extensions; do
37340   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37341     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37342     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37343     break 2
37344   fi
37345 done
37346   done
37347 IFS=$as_save_IFS
37348 
37349   ;;
37350 esac
37351 fi
37352 LIPO=$ac_cv_path_LIPO
37353 if test -n "$LIPO"; then
37354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37355 $as_echo "$LIPO" >&6; }
37356 else
37357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37358 $as_echo "no" >&6; }
37359 fi
37360 
37361 
37362           if test "x$LIPO" = x; then
37363             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37364           fi
37365         else
37366           # Otherwise we believe it is a complete path. Use it as it is.
37367           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37368 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37369           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37370 $as_echo_n "checking for LIPO... " >&6; }
37371           if test ! -x "$tool_specified"; then
37372             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37373 $as_echo "not found" >&6; }
37374             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37375           fi
37376           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37377 $as_echo "$tool_specified" >&6; }
37378         fi
37379       fi
37380     fi
37381 
37382   fi
37383 
37384 
37385 
37386   # Only process if variable expands to non-empty
37387 
37388   if test "x$LIPO" != x; then
37389     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37390 
37391   # First separate the path from the arguments. This will split at the first
37392   # space.
37393   complete="$LIPO"
37394   path="${complete%% *}"
37395   tmp="$complete EOL"
37396   arguments="${tmp#* }"
37397 
37398   # Input might be given as Windows format, start by converting to
37399   # unix format.
37400   new_path=`$CYGPATH -u "$path"`
37401 
37402   # Now try to locate executable using which
37403   new_path=`$WHICH "$new_path" 2> /dev/null`
37404   # bat and cmd files are not always considered executable in cygwin causing which
37405   # to not find them
37406   if test "x$new_path" = x \
37407       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37408       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37409     new_path=`$CYGPATH -u "$path"`
37410   fi
37411   if test "x$new_path" = x; then
37412     # Oops. Which didn't find the executable.
37413     # The splitting of arguments from the executable at a space might have been incorrect,
37414     # since paths with space are more likely in Windows. Give it another try with the whole
37415     # argument.
37416     path="$complete"
37417     arguments="EOL"
37418     new_path=`$CYGPATH -u "$path"`
37419     new_path=`$WHICH "$new_path" 2> /dev/null`
37420     # bat and cmd files are not always considered executable in cygwin causing which
37421     # to not find them
37422     if test "x$new_path" = x \
37423         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37424         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37425       new_path=`$CYGPATH -u "$path"`
37426     fi
37427     if test "x$new_path" = x; then
37428       # It's still not found. Now this is an unrecoverable error.
37429       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37430 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37431       has_space=`$ECHO "$complete" | $GREP " "`
37432       if test "x$has_space" != x; then
37433         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37434 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37435       fi
37436       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37437     fi
37438   fi
37439 
37440   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37441   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37442   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37443   # "foo.exe" is OK but "foo" is an error.
37444   #
37445   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37446   # It is also a way to make sure we got the proper file name for the real test later on.
37447   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37448   if test "x$test_shortpath" = x; then
37449     # Short path failed, file does not exist as specified.
37450     # Try adding .exe or .cmd
37451     if test -f "${new_path}.exe"; then
37452       input_to_shortpath="${new_path}.exe"
37453     elif test -f "${new_path}.cmd"; then
37454       input_to_shortpath="${new_path}.cmd"
37455     else
37456       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37457 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37458       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37459 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37460       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37461     fi
37462   else
37463     input_to_shortpath="$new_path"
37464   fi
37465 
37466   # Call helper function which possibly converts this using DOS-style short mode.
37467   # If so, the updated path is stored in $new_path.
37468   new_path="$input_to_shortpath"
37469 
37470   input_path="$input_to_shortpath"
37471   # Check if we need to convert this using DOS-style short mode. If the path
37472   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37473   # take no chances and rewrite it.
37474   # Note: m4 eats our [], so we need to use [ and ] instead.
37475   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37476   if test "x$has_forbidden_chars" != x; then
37477     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37478     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37479     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37480     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37481       # Going to short mode and back again did indeed matter. Since short mode is
37482       # case insensitive, let's make it lowercase to improve readability.
37483       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37484       # Now convert it back to Unix-style (cygpath)
37485       input_path=`$CYGPATH -u "$shortmode_path"`
37486       new_path="$input_path"
37487     fi
37488   fi
37489 
37490   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37491   if test "x$test_cygdrive_prefix" = x; then
37492     # As a simple fix, exclude /usr/bin since it's not a real path.
37493     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37494       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37495       # a path prefixed by /cygdrive for fixpath to work.
37496       new_path="$CYGWIN_ROOT_PATH$input_path"
37497     fi
37498   fi
37499 
37500   # remove trailing .exe if any
37501   new_path="${new_path/%.exe/}"
37502 
37503     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37504 
37505   # First separate the path from the arguments. This will split at the first
37506   # space.
37507   complete="$LIPO"
37508   path="${complete%% *}"
37509   tmp="$complete EOL"
37510   arguments="${tmp#* }"
37511 
37512   # Input might be given as Windows format, start by converting to
37513   # unix format.
37514   new_path="$path"
37515 
37516   windows_path="$new_path"
37517   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37518     unix_path=`$CYGPATH -u "$windows_path"`
37519     new_path="$unix_path"
37520   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37521     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37522     new_path="$unix_path"
37523   fi
37524 
37525 
37526   # Now try to locate executable using which
37527   new_path=`$WHICH "$new_path" 2> /dev/null`
37528 
37529   if test "x$new_path" = x; then
37530     # Oops. Which didn't find the executable.
37531     # The splitting of arguments from the executable at a space might have been incorrect,
37532     # since paths with space are more likely in Windows. Give it another try with the whole
37533     # argument.
37534     path="$complete"
37535     arguments="EOL"
37536     new_path="$path"
37537 
37538   windows_path="$new_path"
37539   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37540     unix_path=`$CYGPATH -u "$windows_path"`
37541     new_path="$unix_path"
37542   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37543     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37544     new_path="$unix_path"
37545   fi
37546 
37547 
37548     new_path=`$WHICH "$new_path" 2> /dev/null`
37549     # bat and cmd files are not always considered executable in MSYS causing which
37550     # to not find them
37551     if test "x$new_path" = x \
37552         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37553         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37554       new_path="$path"
37555 
37556   windows_path="$new_path"
37557   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37558     unix_path=`$CYGPATH -u "$windows_path"`
37559     new_path="$unix_path"
37560   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37561     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37562     new_path="$unix_path"
37563   fi
37564 
37565     fi
37566 
37567     if test "x$new_path" = x; then
37568       # It's still not found. Now this is an unrecoverable error.
37569       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37570 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37571       has_space=`$ECHO "$complete" | $GREP " "`
37572       if test "x$has_space" != x; then
37573         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37574 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37575       fi
37576       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37577     fi
37578   fi
37579 
37580   # Now new_path has a complete unix path to the binary
37581   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37582     # Keep paths in /bin as-is, but remove trailing .exe if any
37583     new_path="${new_path/%.exe/}"
37584     # Do not save /bin paths to all_fixpath_prefixes!
37585   else
37586     # Not in mixed or Windows style, start by that.
37587     new_path=`cmd //c echo $new_path`
37588 
37589   input_path="$new_path"
37590   # Check if we need to convert this using DOS-style short mode. If the path
37591   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37592   # take no chances and rewrite it.
37593   # Note: m4 eats our [], so we need to use [ and ] instead.
37594   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37595   if test "x$has_forbidden_chars" != x; then
37596     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37597     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37598   fi
37599 
37600     # Output is in $new_path
37601 
37602   windows_path="$new_path"
37603   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37604     unix_path=`$CYGPATH -u "$windows_path"`
37605     new_path="$unix_path"
37606   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37607     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37608     new_path="$unix_path"
37609   fi
37610 
37611     # remove trailing .exe if any
37612     new_path="${new_path/%.exe/}"
37613 
37614     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37615     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37616   fi
37617 
37618     else
37619       # We're on a unix platform. Hooray! :)
37620       # First separate the path from the arguments. This will split at the first
37621       # space.
37622       complete="$LIPO"
37623       path="${complete%% *}"
37624       tmp="$complete EOL"
37625       arguments="${tmp#* }"
37626 
37627       # Cannot rely on the command "which" here since it doesn't always work.
37628       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37629       if test -z "$is_absolute_path"; then
37630         # Path to executable is not absolute. Find it.
37631         IFS_save="$IFS"
37632         IFS=:
37633         for p in $PATH; do
37634           if test -f "$p/$path" && test -x "$p/$path"; then
37635             new_path="$p/$path"
37636             break
37637           fi
37638         done
37639         IFS="$IFS_save"
37640       else
37641         # This is an absolute path, we can use it without further modifications.
37642         new_path="$path"
37643       fi
37644 
37645       if test "x$new_path" = x; then
37646         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37647 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37648         has_space=`$ECHO "$complete" | $GREP " "`
37649         if test "x$has_space" != x; then
37650           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37651 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37652         fi
37653         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37654       fi
37655     fi
37656 
37657     # Now join together the path and the arguments once again
37658     if test "x$arguments" != xEOL; then
37659       new_complete="$new_path ${arguments% *}"
37660     else
37661       new_complete="$new_path"
37662     fi
37663 
37664     if test "x$complete" != "x$new_complete"; then
37665       LIPO="$new_complete"
37666       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37667 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37668     fi
37669   fi
37670 
37671   fi
37672 
37673   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37674     # Extract the first word of "mt", so it can be a program name with args.
37675 set dummy mt; ac_word=$2
37676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37677 $as_echo_n "checking for $ac_word... " >&6; }
37678 if ${ac_cv_prog_MT+:} false; then :
37679   $as_echo_n "(cached) " >&6
37680 else
37681   if test -n "$MT"; then
37682   ac_cv_prog_MT="$MT" # Let the user override the test.
37683 else
37684   ac_prog_rejected=no
37685 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37686 for as_dir in $PATH
37687 do
37688   IFS=$as_save_IFS
37689   test -z "$as_dir" && as_dir=.
37690     for ac_exec_ext in '' $ac_executable_extensions; do
37691   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37692     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37693        ac_prog_rejected=yes
37694        continue
37695      fi
37696     ac_cv_prog_MT="mt"
37697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37698     break 2
37699   fi
37700 done
37701   done
37702 IFS=$as_save_IFS
37703 
37704 if test $ac_prog_rejected = yes; then
37705   # We found a bogon in the path, so make sure we never use it.
37706   set dummy $ac_cv_prog_MT
37707   shift
37708   if test $# != 0; then
37709     # We chose a different compiler from the bogus one.
37710     # However, it has the same basename, so the bogon will be chosen
37711     # first if we set MT to just the basename; use the full file name.
37712     shift
37713     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37714   fi
37715 fi
37716 fi
37717 fi
37718 MT=$ac_cv_prog_MT
37719 if test -n "$MT"; then
37720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37721 $as_echo "$MT" >&6; }
37722 else
37723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37724 $as_echo "no" >&6; }
37725 fi
37726 
37727 
37728 
37729   # Only process if variable expands to non-empty
37730 
37731   if test "x$MT" != x; then
37732     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37733 
37734   # First separate the path from the arguments. This will split at the first
37735   # space.
37736   complete="$MT"
37737   path="${complete%% *}"
37738   tmp="$complete EOL"
37739   arguments="${tmp#* }"
37740 
37741   # Input might be given as Windows format, start by converting to
37742   # unix format.
37743   new_path=`$CYGPATH -u "$path"`
37744 
37745   # Now try to locate executable using which
37746   new_path=`$WHICH "$new_path" 2> /dev/null`
37747   # bat and cmd files are not always considered executable in cygwin causing which
37748   # to not find them
37749   if test "x$new_path" = x \
37750       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37751       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37752     new_path=`$CYGPATH -u "$path"`
37753   fi
37754   if test "x$new_path" = x; then
37755     # Oops. Which didn't find the executable.
37756     # The splitting of arguments from the executable at a space might have been incorrect,
37757     # since paths with space are more likely in Windows. Give it another try with the whole
37758     # argument.
37759     path="$complete"
37760     arguments="EOL"
37761     new_path=`$CYGPATH -u "$path"`
37762     new_path=`$WHICH "$new_path" 2> /dev/null`
37763     # bat and cmd files are not always considered executable in cygwin causing which
37764     # to not find them
37765     if test "x$new_path" = x \
37766         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37767         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37768       new_path=`$CYGPATH -u "$path"`
37769     fi
37770     if test "x$new_path" = x; then
37771       # It's still not found. Now this is an unrecoverable error.
37772       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37773 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37774       has_space=`$ECHO "$complete" | $GREP " "`
37775       if test "x$has_space" != x; then
37776         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37777 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37778       fi
37779       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37780     fi
37781   fi
37782 
37783   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37784   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37785   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37786   # "foo.exe" is OK but "foo" is an error.
37787   #
37788   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37789   # It is also a way to make sure we got the proper file name for the real test later on.
37790   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37791   if test "x$test_shortpath" = x; then
37792     # Short path failed, file does not exist as specified.
37793     # Try adding .exe or .cmd
37794     if test -f "${new_path}.exe"; then
37795       input_to_shortpath="${new_path}.exe"
37796     elif test -f "${new_path}.cmd"; then
37797       input_to_shortpath="${new_path}.cmd"
37798     else
37799       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37800 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37801       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37802 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37803       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37804     fi
37805   else
37806     input_to_shortpath="$new_path"
37807   fi
37808 
37809   # Call helper function which possibly converts this using DOS-style short mode.
37810   # If so, the updated path is stored in $new_path.
37811   new_path="$input_to_shortpath"
37812 
37813   input_path="$input_to_shortpath"
37814   # Check if we need to convert this using DOS-style short mode. If the path
37815   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37816   # take no chances and rewrite it.
37817   # Note: m4 eats our [], so we need to use [ and ] instead.
37818   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37819   if test "x$has_forbidden_chars" != x; then
37820     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37821     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37822     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37823     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37824       # Going to short mode and back again did indeed matter. Since short mode is
37825       # case insensitive, let's make it lowercase to improve readability.
37826       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37827       # Now convert it back to Unix-style (cygpath)
37828       input_path=`$CYGPATH -u "$shortmode_path"`
37829       new_path="$input_path"
37830     fi
37831   fi
37832 
37833   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37834   if test "x$test_cygdrive_prefix" = x; then
37835     # As a simple fix, exclude /usr/bin since it's not a real path.
37836     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37837       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37838       # a path prefixed by /cygdrive for fixpath to work.
37839       new_path="$CYGWIN_ROOT_PATH$input_path"
37840     fi
37841   fi
37842 
37843   # remove trailing .exe if any
37844   new_path="${new_path/%.exe/}"
37845 
37846     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37847 
37848   # First separate the path from the arguments. This will split at the first
37849   # space.
37850   complete="$MT"
37851   path="${complete%% *}"
37852   tmp="$complete EOL"
37853   arguments="${tmp#* }"
37854 
37855   # Input might be given as Windows format, start by converting to
37856   # unix format.
37857   new_path="$path"
37858 
37859   windows_path="$new_path"
37860   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37861     unix_path=`$CYGPATH -u "$windows_path"`
37862     new_path="$unix_path"
37863   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37864     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37865     new_path="$unix_path"
37866   fi
37867 
37868 
37869   # Now try to locate executable using which
37870   new_path=`$WHICH "$new_path" 2> /dev/null`
37871 
37872   if test "x$new_path" = x; then
37873     # Oops. Which didn't find the executable.
37874     # The splitting of arguments from the executable at a space might have been incorrect,
37875     # since paths with space are more likely in Windows. Give it another try with the whole
37876     # argument.
37877     path="$complete"
37878     arguments="EOL"
37879     new_path="$path"
37880 
37881   windows_path="$new_path"
37882   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37883     unix_path=`$CYGPATH -u "$windows_path"`
37884     new_path="$unix_path"
37885   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37886     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37887     new_path="$unix_path"
37888   fi
37889 
37890 
37891     new_path=`$WHICH "$new_path" 2> /dev/null`
37892     # bat and cmd files are not always considered executable in MSYS causing which
37893     # to not find them
37894     if test "x$new_path" = x \
37895         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37896         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37897       new_path="$path"
37898 
37899   windows_path="$new_path"
37900   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37901     unix_path=`$CYGPATH -u "$windows_path"`
37902     new_path="$unix_path"
37903   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37904     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37905     new_path="$unix_path"
37906   fi
37907 
37908     fi
37909 
37910     if test "x$new_path" = x; then
37911       # It's still not found. Now this is an unrecoverable error.
37912       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37913 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37914       has_space=`$ECHO "$complete" | $GREP " "`
37915       if test "x$has_space" != x; then
37916         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37917 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37918       fi
37919       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37920     fi
37921   fi
37922 
37923   # Now new_path has a complete unix path to the binary
37924   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37925     # Keep paths in /bin as-is, but remove trailing .exe if any
37926     new_path="${new_path/%.exe/}"
37927     # Do not save /bin paths to all_fixpath_prefixes!
37928   else
37929     # Not in mixed or Windows style, start by that.
37930     new_path=`cmd //c echo $new_path`
37931 
37932   input_path="$new_path"
37933   # Check if we need to convert this using DOS-style short mode. If the path
37934   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37935   # take no chances and rewrite it.
37936   # Note: m4 eats our [], so we need to use [ and ] instead.
37937   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37938   if test "x$has_forbidden_chars" != x; then
37939     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37940     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37941   fi
37942 
37943     # Output is in $new_path
37944 
37945   windows_path="$new_path"
37946   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37947     unix_path=`$CYGPATH -u "$windows_path"`
37948     new_path="$unix_path"
37949   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37950     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37951     new_path="$unix_path"
37952   fi
37953 
37954     # remove trailing .exe if any
37955     new_path="${new_path/%.exe/}"
37956 
37957     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37958     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37959   fi
37960 
37961     else
37962       # We're on a unix platform. Hooray! :)
37963       # First separate the path from the arguments. This will split at the first
37964       # space.
37965       complete="$MT"
37966       path="${complete%% *}"
37967       tmp="$complete EOL"
37968       arguments="${tmp#* }"
37969 
37970       # Cannot rely on the command "which" here since it doesn't always work.
37971       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37972       if test -z "$is_absolute_path"; then
37973         # Path to executable is not absolute. Find it.
37974         IFS_save="$IFS"
37975         IFS=:
37976         for p in $PATH; do
37977           if test -f "$p/$path" && test -x "$p/$path"; then
37978             new_path="$p/$path"
37979             break
37980           fi
37981         done
37982         IFS="$IFS_save"
37983       else
37984         # This is an absolute path, we can use it without further modifications.
37985         new_path="$path"
37986       fi
37987 
37988       if test "x$new_path" = x; then
37989         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37990 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37991         has_space=`$ECHO "$complete" | $GREP " "`
37992         if test "x$has_space" != x; then
37993           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37994 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37995         fi
37996         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37997       fi
37998     fi
37999 
38000     # Now join together the path and the arguments once again
38001     if test "x$arguments" != xEOL; then
38002       new_complete="$new_path ${arguments% *}"
38003     else
38004       new_complete="$new_path"
38005     fi
38006 
38007     if test "x$complete" != "x$new_complete"; then
38008       MT="$new_complete"
38009       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38010 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38011     fi
38012   fi
38013 
38014     # Setup the resource compiler (RC)
38015     # Extract the first word of "rc", so it can be a program name with args.
38016 set dummy rc; ac_word=$2
38017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38018 $as_echo_n "checking for $ac_word... " >&6; }
38019 if ${ac_cv_prog_RC+:} false; then :
38020   $as_echo_n "(cached) " >&6
38021 else
38022   if test -n "$RC"; then
38023   ac_cv_prog_RC="$RC" # Let the user override the test.
38024 else
38025   ac_prog_rejected=no
38026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38027 for as_dir in $PATH
38028 do
38029   IFS=$as_save_IFS
38030   test -z "$as_dir" && as_dir=.
38031     for ac_exec_ext in '' $ac_executable_extensions; do
38032   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38033     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38034        ac_prog_rejected=yes
38035        continue
38036      fi
38037     ac_cv_prog_RC="rc"
38038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38039     break 2
38040   fi
38041 done
38042   done
38043 IFS=$as_save_IFS
38044 
38045 if test $ac_prog_rejected = yes; then
38046   # We found a bogon in the path, so make sure we never use it.
38047   set dummy $ac_cv_prog_RC
38048   shift
38049   if test $# != 0; then
38050     # We chose a different compiler from the bogus one.
38051     # However, it has the same basename, so the bogon will be chosen
38052     # first if we set RC to just the basename; use the full file name.
38053     shift
38054     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38055   fi
38056 fi
38057 fi
38058 fi
38059 RC=$ac_cv_prog_RC
38060 if test -n "$RC"; then
38061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38062 $as_echo "$RC" >&6; }
38063 else
38064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38065 $as_echo "no" >&6; }
38066 fi
38067 
38068 
38069 
38070   # Only process if variable expands to non-empty
38071 
38072   if test "x$RC" != x; then
38073     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38074 
38075   # First separate the path from the arguments. This will split at the first
38076   # space.
38077   complete="$RC"
38078   path="${complete%% *}"
38079   tmp="$complete EOL"
38080   arguments="${tmp#* }"
38081 
38082   # Input might be given as Windows format, start by converting to
38083   # unix format.
38084   new_path=`$CYGPATH -u "$path"`
38085 
38086   # Now try to locate executable using which
38087   new_path=`$WHICH "$new_path" 2> /dev/null`
38088   # bat and cmd files are not always considered executable in cygwin causing which
38089   # to not find them
38090   if test "x$new_path" = x \
38091       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38092       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38093     new_path=`$CYGPATH -u "$path"`
38094   fi
38095   if test "x$new_path" = x; then
38096     # Oops. Which didn't find the executable.
38097     # The splitting of arguments from the executable at a space might have been incorrect,
38098     # since paths with space are more likely in Windows. Give it another try with the whole
38099     # argument.
38100     path="$complete"
38101     arguments="EOL"
38102     new_path=`$CYGPATH -u "$path"`
38103     new_path=`$WHICH "$new_path" 2> /dev/null`
38104     # bat and cmd files are not always considered executable in cygwin causing which
38105     # to not find them
38106     if test "x$new_path" = x \
38107         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38108         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38109       new_path=`$CYGPATH -u "$path"`
38110     fi
38111     if test "x$new_path" = x; then
38112       # It's still not found. Now this is an unrecoverable error.
38113       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38114 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38115       has_space=`$ECHO "$complete" | $GREP " "`
38116       if test "x$has_space" != x; then
38117         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38118 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38119       fi
38120       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38121     fi
38122   fi
38123 
38124   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38125   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38126   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38127   # "foo.exe" is OK but "foo" is an error.
38128   #
38129   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38130   # It is also a way to make sure we got the proper file name for the real test later on.
38131   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38132   if test "x$test_shortpath" = x; then
38133     # Short path failed, file does not exist as specified.
38134     # Try adding .exe or .cmd
38135     if test -f "${new_path}.exe"; then
38136       input_to_shortpath="${new_path}.exe"
38137     elif test -f "${new_path}.cmd"; then
38138       input_to_shortpath="${new_path}.cmd"
38139     else
38140       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38141 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38142       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38143 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38144       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38145     fi
38146   else
38147     input_to_shortpath="$new_path"
38148   fi
38149 
38150   # Call helper function which possibly converts this using DOS-style short mode.
38151   # If so, the updated path is stored in $new_path.
38152   new_path="$input_to_shortpath"
38153 
38154   input_path="$input_to_shortpath"
38155   # Check if we need to convert this using DOS-style short mode. If the path
38156   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38157   # take no chances and rewrite it.
38158   # Note: m4 eats our [], so we need to use [ and ] instead.
38159   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38160   if test "x$has_forbidden_chars" != x; then
38161     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38162     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38163     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38164     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38165       # Going to short mode and back again did indeed matter. Since short mode is
38166       # case insensitive, let's make it lowercase to improve readability.
38167       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38168       # Now convert it back to Unix-style (cygpath)
38169       input_path=`$CYGPATH -u "$shortmode_path"`
38170       new_path="$input_path"
38171     fi
38172   fi
38173 
38174   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38175   if test "x$test_cygdrive_prefix" = x; then
38176     # As a simple fix, exclude /usr/bin since it's not a real path.
38177     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38178       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38179       # a path prefixed by /cygdrive for fixpath to work.
38180       new_path="$CYGWIN_ROOT_PATH$input_path"
38181     fi
38182   fi
38183 
38184   # remove trailing .exe if any
38185   new_path="${new_path/%.exe/}"
38186 
38187     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38188 
38189   # First separate the path from the arguments. This will split at the first
38190   # space.
38191   complete="$RC"
38192   path="${complete%% *}"
38193   tmp="$complete EOL"
38194   arguments="${tmp#* }"
38195 
38196   # Input might be given as Windows format, start by converting to
38197   # unix format.
38198   new_path="$path"
38199 
38200   windows_path="$new_path"
38201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38202     unix_path=`$CYGPATH -u "$windows_path"`
38203     new_path="$unix_path"
38204   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38205     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38206     new_path="$unix_path"
38207   fi
38208 
38209 
38210   # Now try to locate executable using which
38211   new_path=`$WHICH "$new_path" 2> /dev/null`
38212 
38213   if test "x$new_path" = x; then
38214     # Oops. Which didn't find the executable.
38215     # The splitting of arguments from the executable at a space might have been incorrect,
38216     # since paths with space are more likely in Windows. Give it another try with the whole
38217     # argument.
38218     path="$complete"
38219     arguments="EOL"
38220     new_path="$path"
38221 
38222   windows_path="$new_path"
38223   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38224     unix_path=`$CYGPATH -u "$windows_path"`
38225     new_path="$unix_path"
38226   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38227     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38228     new_path="$unix_path"
38229   fi
38230 
38231 
38232     new_path=`$WHICH "$new_path" 2> /dev/null`
38233     # bat and cmd files are not always considered executable in MSYS causing which
38234     # to not find them
38235     if test "x$new_path" = x \
38236         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38237         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38238       new_path="$path"
38239 
38240   windows_path="$new_path"
38241   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38242     unix_path=`$CYGPATH -u "$windows_path"`
38243     new_path="$unix_path"
38244   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38245     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38246     new_path="$unix_path"
38247   fi
38248 
38249     fi
38250 
38251     if test "x$new_path" = x; then
38252       # It's still not found. Now this is an unrecoverable error.
38253       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38254 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38255       has_space=`$ECHO "$complete" | $GREP " "`
38256       if test "x$has_space" != x; then
38257         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38258 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38259       fi
38260       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38261     fi
38262   fi
38263 
38264   # Now new_path has a complete unix path to the binary
38265   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38266     # Keep paths in /bin as-is, but remove trailing .exe if any
38267     new_path="${new_path/%.exe/}"
38268     # Do not save /bin paths to all_fixpath_prefixes!
38269   else
38270     # Not in mixed or Windows style, start by that.
38271     new_path=`cmd //c echo $new_path`
38272 
38273   input_path="$new_path"
38274   # Check if we need to convert this using DOS-style short mode. If the path
38275   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38276   # take no chances and rewrite it.
38277   # Note: m4 eats our [], so we need to use [ and ] instead.
38278   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38279   if test "x$has_forbidden_chars" != x; then
38280     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38281     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38282   fi
38283 
38284     # Output is in $new_path
38285 
38286   windows_path="$new_path"
38287   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38288     unix_path=`$CYGPATH -u "$windows_path"`
38289     new_path="$unix_path"
38290   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38291     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38292     new_path="$unix_path"
38293   fi
38294 
38295     # remove trailing .exe if any
38296     new_path="${new_path/%.exe/}"
38297 
38298     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38299     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38300   fi
38301 
38302     else
38303       # We're on a unix platform. Hooray! :)
38304       # First separate the path from the arguments. This will split at the first
38305       # space.
38306       complete="$RC"
38307       path="${complete%% *}"
38308       tmp="$complete EOL"
38309       arguments="${tmp#* }"
38310 
38311       # Cannot rely on the command "which" here since it doesn't always work.
38312       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38313       if test -z "$is_absolute_path"; then
38314         # Path to executable is not absolute. Find it.
38315         IFS_save="$IFS"
38316         IFS=:
38317         for p in $PATH; do
38318           if test -f "$p/$path" && test -x "$p/$path"; then
38319             new_path="$p/$path"
38320             break
38321           fi
38322         done
38323         IFS="$IFS_save"
38324       else
38325         # This is an absolute path, we can use it without further modifications.
38326         new_path="$path"
38327       fi
38328 
38329       if test "x$new_path" = x; then
38330         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38331 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38332         has_space=`$ECHO "$complete" | $GREP " "`
38333         if test "x$has_space" != x; then
38334           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38335 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38336         fi
38337         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38338       fi
38339     fi
38340 
38341     # Now join together the path and the arguments once again
38342     if test "x$arguments" != xEOL; then
38343       new_complete="$new_path ${arguments% *}"
38344     else
38345       new_complete="$new_path"
38346     fi
38347 
38348     if test "x$complete" != "x$new_complete"; then
38349       RC="$new_complete"
38350       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38351 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38352     fi
38353   fi
38354 
38355     # Extract the first word of "dumpbin", so it can be a program name with args.
38356 set dummy dumpbin; ac_word=$2
38357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38358 $as_echo_n "checking for $ac_word... " >&6; }
38359 if ${ac_cv_prog_DUMPBIN+:} false; then :
38360   $as_echo_n "(cached) " >&6
38361 else
38362   if test -n "$DUMPBIN"; then
38363   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38364 else
38365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38366 for as_dir in $PATH
38367 do
38368   IFS=$as_save_IFS
38369   test -z "$as_dir" && as_dir=.
38370     for ac_exec_ext in '' $ac_executable_extensions; do
38371   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38372     ac_cv_prog_DUMPBIN="dumpbin"
38373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38374     break 2
38375   fi
38376 done
38377   done
38378 IFS=$as_save_IFS
38379 
38380 fi
38381 fi
38382 DUMPBIN=$ac_cv_prog_DUMPBIN
38383 if test -n "$DUMPBIN"; then
38384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38385 $as_echo "$DUMPBIN" >&6; }
38386 else
38387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38388 $as_echo "no" >&6; }
38389 fi
38390 
38391 
38392 
38393   # Only process if variable expands to non-empty
38394 
38395   if test "x$DUMPBIN" != x; then
38396     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38397 
38398   # First separate the path from the arguments. This will split at the first
38399   # space.
38400   complete="$DUMPBIN"
38401   path="${complete%% *}"
38402   tmp="$complete EOL"
38403   arguments="${tmp#* }"
38404 
38405   # Input might be given as Windows format, start by converting to
38406   # unix format.
38407   new_path=`$CYGPATH -u "$path"`
38408 
38409   # Now try to locate executable using which
38410   new_path=`$WHICH "$new_path" 2> /dev/null`
38411   # bat and cmd files are not always considered executable in cygwin causing which
38412   # to not find them
38413   if test "x$new_path" = x \
38414       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38415       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38416     new_path=`$CYGPATH -u "$path"`
38417   fi
38418   if test "x$new_path" = x; then
38419     # Oops. Which didn't find the executable.
38420     # The splitting of arguments from the executable at a space might have been incorrect,
38421     # since paths with space are more likely in Windows. Give it another try with the whole
38422     # argument.
38423     path="$complete"
38424     arguments="EOL"
38425     new_path=`$CYGPATH -u "$path"`
38426     new_path=`$WHICH "$new_path" 2> /dev/null`
38427     # bat and cmd files are not always considered executable in cygwin causing which
38428     # to not find them
38429     if test "x$new_path" = x \
38430         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38431         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38432       new_path=`$CYGPATH -u "$path"`
38433     fi
38434     if test "x$new_path" = x; then
38435       # It's still not found. Now this is an unrecoverable error.
38436       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38437 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38438       has_space=`$ECHO "$complete" | $GREP " "`
38439       if test "x$has_space" != x; then
38440         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38441 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38442       fi
38443       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38444     fi
38445   fi
38446 
38447   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38448   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38449   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38450   # "foo.exe" is OK but "foo" is an error.
38451   #
38452   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38453   # It is also a way to make sure we got the proper file name for the real test later on.
38454   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38455   if test "x$test_shortpath" = x; then
38456     # Short path failed, file does not exist as specified.
38457     # Try adding .exe or .cmd
38458     if test -f "${new_path}.exe"; then
38459       input_to_shortpath="${new_path}.exe"
38460     elif test -f "${new_path}.cmd"; then
38461       input_to_shortpath="${new_path}.cmd"
38462     else
38463       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38464 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38465       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38466 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38467       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38468     fi
38469   else
38470     input_to_shortpath="$new_path"
38471   fi
38472 
38473   # Call helper function which possibly converts this using DOS-style short mode.
38474   # If so, the updated path is stored in $new_path.
38475   new_path="$input_to_shortpath"
38476 
38477   input_path="$input_to_shortpath"
38478   # Check if we need to convert this using DOS-style short mode. If the path
38479   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38480   # take no chances and rewrite it.
38481   # Note: m4 eats our [], so we need to use [ and ] instead.
38482   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38483   if test "x$has_forbidden_chars" != x; then
38484     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38485     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38486     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38487     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38488       # Going to short mode and back again did indeed matter. Since short mode is
38489       # case insensitive, let's make it lowercase to improve readability.
38490       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38491       # Now convert it back to Unix-style (cygpath)
38492       input_path=`$CYGPATH -u "$shortmode_path"`
38493       new_path="$input_path"
38494     fi
38495   fi
38496 
38497   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38498   if test "x$test_cygdrive_prefix" = x; then
38499     # As a simple fix, exclude /usr/bin since it's not a real path.
38500     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38501       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38502       # a path prefixed by /cygdrive for fixpath to work.
38503       new_path="$CYGWIN_ROOT_PATH$input_path"
38504     fi
38505   fi
38506 
38507   # remove trailing .exe if any
38508   new_path="${new_path/%.exe/}"
38509 
38510     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38511 
38512   # First separate the path from the arguments. This will split at the first
38513   # space.
38514   complete="$DUMPBIN"
38515   path="${complete%% *}"
38516   tmp="$complete EOL"
38517   arguments="${tmp#* }"
38518 
38519   # Input might be given as Windows format, start by converting to
38520   # unix format.
38521   new_path="$path"
38522 
38523   windows_path="$new_path"
38524   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38525     unix_path=`$CYGPATH -u "$windows_path"`
38526     new_path="$unix_path"
38527   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38528     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38529     new_path="$unix_path"
38530   fi
38531 
38532 
38533   # Now try to locate executable using which
38534   new_path=`$WHICH "$new_path" 2> /dev/null`
38535 
38536   if test "x$new_path" = x; then
38537     # Oops. Which didn't find the executable.
38538     # The splitting of arguments from the executable at a space might have been incorrect,
38539     # since paths with space are more likely in Windows. Give it another try with the whole
38540     # argument.
38541     path="$complete"
38542     arguments="EOL"
38543     new_path="$path"
38544 
38545   windows_path="$new_path"
38546   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38547     unix_path=`$CYGPATH -u "$windows_path"`
38548     new_path="$unix_path"
38549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38550     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38551     new_path="$unix_path"
38552   fi
38553 
38554 
38555     new_path=`$WHICH "$new_path" 2> /dev/null`
38556     # bat and cmd files are not always considered executable in MSYS causing which
38557     # to not find them
38558     if test "x$new_path" = x \
38559         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38560         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38561       new_path="$path"
38562 
38563   windows_path="$new_path"
38564   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38565     unix_path=`$CYGPATH -u "$windows_path"`
38566     new_path="$unix_path"
38567   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38568     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38569     new_path="$unix_path"
38570   fi
38571 
38572     fi
38573 
38574     if test "x$new_path" = x; then
38575       # It's still not found. Now this is an unrecoverable error.
38576       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38577 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38578       has_space=`$ECHO "$complete" | $GREP " "`
38579       if test "x$has_space" != x; then
38580         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38581 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38582       fi
38583       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38584     fi
38585   fi
38586 
38587   # Now new_path has a complete unix path to the binary
38588   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38589     # Keep paths in /bin as-is, but remove trailing .exe if any
38590     new_path="${new_path/%.exe/}"
38591     # Do not save /bin paths to all_fixpath_prefixes!
38592   else
38593     # Not in mixed or Windows style, start by that.
38594     new_path=`cmd //c echo $new_path`
38595 
38596   input_path="$new_path"
38597   # Check if we need to convert this using DOS-style short mode. If the path
38598   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38599   # take no chances and rewrite it.
38600   # Note: m4 eats our [], so we need to use [ and ] instead.
38601   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38602   if test "x$has_forbidden_chars" != x; then
38603     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38604     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38605   fi
38606 
38607     # Output is in $new_path
38608 
38609   windows_path="$new_path"
38610   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38611     unix_path=`$CYGPATH -u "$windows_path"`
38612     new_path="$unix_path"
38613   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38614     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38615     new_path="$unix_path"
38616   fi
38617 
38618     # remove trailing .exe if any
38619     new_path="${new_path/%.exe/}"
38620 
38621     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38622     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38623   fi
38624 
38625     else
38626       # We're on a unix platform. Hooray! :)
38627       # First separate the path from the arguments. This will split at the first
38628       # space.
38629       complete="$DUMPBIN"
38630       path="${complete%% *}"
38631       tmp="$complete EOL"
38632       arguments="${tmp#* }"
38633 
38634       # Cannot rely on the command "which" here since it doesn't always work.
38635       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38636       if test -z "$is_absolute_path"; then
38637         # Path to executable is not absolute. Find it.
38638         IFS_save="$IFS"
38639         IFS=:
38640         for p in $PATH; do
38641           if test -f "$p/$path" && test -x "$p/$path"; then
38642             new_path="$p/$path"
38643             break
38644           fi
38645         done
38646         IFS="$IFS_save"
38647       else
38648         # This is an absolute path, we can use it without further modifications.
38649         new_path="$path"
38650       fi
38651 
38652       if test "x$new_path" = x; then
38653         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38654 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38655         has_space=`$ECHO "$complete" | $GREP " "`
38656         if test "x$has_space" != x; then
38657           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38658 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38659         fi
38660         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38661       fi
38662     fi
38663 
38664     # Now join together the path and the arguments once again
38665     if test "x$arguments" != xEOL; then
38666       new_complete="$new_path ${arguments% *}"
38667     else
38668       new_complete="$new_path"
38669     fi
38670 
38671     if test "x$complete" != "x$new_complete"; then
38672       DUMPBIN="$new_complete"
38673       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38674 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38675     fi
38676   fi
38677 
38678     # We need to check for 'msbuild.exe' because at the place where we expect to
38679     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38680     # won't find the 'msbuild.exe' executable in that case (and the
38681     # 'ac_executable_extensions' is unusable due to performance reasons).
38682     # Notice that we intentionally don't fix up the path to MSBUILD because we
38683     # will call it in a DOS shell during freetype detection on Windows (see
38684     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38685     # Extract the first word of "msbuild.exe", so it can be a program name with args.
38686 set dummy msbuild.exe; ac_word=$2
38687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38688 $as_echo_n "checking for $ac_word... " >&6; }
38689 if ${ac_cv_prog_MSBUILD+:} false; then :
38690   $as_echo_n "(cached) " >&6
38691 else
38692   if test -n "$MSBUILD"; then
38693   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38694 else
38695 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38696 for as_dir in $PATH
38697 do
38698   IFS=$as_save_IFS
38699   test -z "$as_dir" && as_dir=.
38700     for ac_exec_ext in '' $ac_executable_extensions; do
38701   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38702     ac_cv_prog_MSBUILD="msbuild.exe"
38703     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38704     break 2
38705   fi
38706 done
38707   done
38708 IFS=$as_save_IFS
38709 
38710 fi
38711 fi
38712 MSBUILD=$ac_cv_prog_MSBUILD
38713 if test -n "$MSBUILD"; then
38714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38715 $as_echo "$MSBUILD" >&6; }
38716 else
38717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38718 $as_echo "no" >&6; }
38719 fi
38720 
38721 
38722   fi
38723 
38724   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38725 
38726 
38727   # Publish this variable in the help.
38728 
38729 
38730   if [ -z "${STRIP+x}" ]; then
38731     # The variable is not set by user, try to locate tool using the code snippet
38732     for ac_prog in strip
38733 do
38734   # Extract the first word of "$ac_prog", so it can be a program name with args.
38735 set dummy $ac_prog; ac_word=$2
38736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38737 $as_echo_n "checking for $ac_word... " >&6; }
38738 if ${ac_cv_path_STRIP+:} false; then :
38739   $as_echo_n "(cached) " >&6
38740 else
38741   case $STRIP in
38742   [\\/]* | ?:[\\/]*)
38743   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38744   ;;
38745   *)
38746   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38747 for as_dir in $PATH
38748 do
38749   IFS=$as_save_IFS
38750   test -z "$as_dir" && as_dir=.
38751     for ac_exec_ext in '' $ac_executable_extensions; do
38752   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38753     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38755     break 2
38756   fi
38757 done
38758   done
38759 IFS=$as_save_IFS
38760 
38761   ;;
38762 esac
38763 fi
38764 STRIP=$ac_cv_path_STRIP
38765 if test -n "$STRIP"; then
38766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38767 $as_echo "$STRIP" >&6; }
38768 else
38769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38770 $as_echo "no" >&6; }
38771 fi
38772 
38773 
38774   test -n "$STRIP" && break
38775 done
38776 
38777   else
38778     # The variable is set, but is it from the command line or the environment?
38779 
38780     # Try to remove the string !STRIP! from our list.
38781     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38782     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38783       # If it failed, the variable was not from the command line. Ignore it,
38784       # but warn the user (except for BASH, which is always set by the calling BASH).
38785       if test "xSTRIP" != xBASH; then
38786         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38787 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38788       fi
38789       # Try to locate tool using the code snippet
38790       for ac_prog in strip
38791 do
38792   # Extract the first word of "$ac_prog", so it can be a program name with args.
38793 set dummy $ac_prog; ac_word=$2
38794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38795 $as_echo_n "checking for $ac_word... " >&6; }
38796 if ${ac_cv_path_STRIP+:} false; then :
38797   $as_echo_n "(cached) " >&6
38798 else
38799   case $STRIP in
38800   [\\/]* | ?:[\\/]*)
38801   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38802   ;;
38803   *)
38804   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38805 for as_dir in $PATH
38806 do
38807   IFS=$as_save_IFS
38808   test -z "$as_dir" && as_dir=.
38809     for ac_exec_ext in '' $ac_executable_extensions; do
38810   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38811     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38812     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38813     break 2
38814   fi
38815 done
38816   done
38817 IFS=$as_save_IFS
38818 
38819   ;;
38820 esac
38821 fi
38822 STRIP=$ac_cv_path_STRIP
38823 if test -n "$STRIP"; then
38824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38825 $as_echo "$STRIP" >&6; }
38826 else
38827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38828 $as_echo "no" >&6; }
38829 fi
38830 
38831 
38832   test -n "$STRIP" && break
38833 done
38834 
38835     else
38836       # If it succeeded, then it was overridden by the user. We will use it
38837       # for the tool.
38838 
38839       # First remove it from the list of overridden variables, so we can test
38840       # for unknown variables in the end.
38841       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38842 
38843       # Check if we try to supply an empty value
38844       if test "x$STRIP" = x; then
38845         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38846 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38847         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38848 $as_echo_n "checking for STRIP... " >&6; }
38849         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38850 $as_echo "disabled" >&6; }
38851       else
38852         # Check if the provided tool contains a complete path.
38853         tool_specified="$STRIP"
38854         tool_basename="${tool_specified##*/}"
38855         if test "x$tool_basename" = "x$tool_specified"; then
38856           # A command without a complete path is provided, search $PATH.
38857           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38858 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38859           # Extract the first word of "$tool_basename", so it can be a program name with args.
38860 set dummy $tool_basename; ac_word=$2
38861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38862 $as_echo_n "checking for $ac_word... " >&6; }
38863 if ${ac_cv_path_STRIP+:} false; then :
38864   $as_echo_n "(cached) " >&6
38865 else
38866   case $STRIP in
38867   [\\/]* | ?:[\\/]*)
38868   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38869   ;;
38870   *)
38871   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38872 for as_dir in $PATH
38873 do
38874   IFS=$as_save_IFS
38875   test -z "$as_dir" && as_dir=.
38876     for ac_exec_ext in '' $ac_executable_extensions; do
38877   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38878     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38879     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38880     break 2
38881   fi
38882 done
38883   done
38884 IFS=$as_save_IFS
38885 
38886   ;;
38887 esac
38888 fi
38889 STRIP=$ac_cv_path_STRIP
38890 if test -n "$STRIP"; then
38891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38892 $as_echo "$STRIP" >&6; }
38893 else
38894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38895 $as_echo "no" >&6; }
38896 fi
38897 
38898 
38899           if test "x$STRIP" = x; then
38900             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38901           fi
38902         else
38903           # Otherwise we believe it is a complete path. Use it as it is.
38904           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38905 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38906           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38907 $as_echo_n "checking for STRIP... " >&6; }
38908           if test ! -x "$tool_specified"; then
38909             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38910 $as_echo "not found" >&6; }
38911             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38912           fi
38913           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38914 $as_echo "$tool_specified" >&6; }
38915         fi
38916       fi
38917     fi
38918 
38919   fi
38920 
38921 
38922 
38923   # Only process if variable expands to non-empty
38924 
38925   if test "x$STRIP" != x; then
38926     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38927 
38928   # First separate the path from the arguments. This will split at the first
38929   # space.
38930   complete="$STRIP"
38931   path="${complete%% *}"
38932   tmp="$complete EOL"
38933   arguments="${tmp#* }"
38934 
38935   # Input might be given as Windows format, start by converting to
38936   # unix format.
38937   new_path=`$CYGPATH -u "$path"`
38938 
38939   # Now try to locate executable using which
38940   new_path=`$WHICH "$new_path" 2> /dev/null`
38941   # bat and cmd files are not always considered executable in cygwin causing which
38942   # to not find them
38943   if test "x$new_path" = x \
38944       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38945       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38946     new_path=`$CYGPATH -u "$path"`
38947   fi
38948   if test "x$new_path" = x; then
38949     # Oops. Which didn't find the executable.
38950     # The splitting of arguments from the executable at a space might have been incorrect,
38951     # since paths with space are more likely in Windows. Give it another try with the whole
38952     # argument.
38953     path="$complete"
38954     arguments="EOL"
38955     new_path=`$CYGPATH -u "$path"`
38956     new_path=`$WHICH "$new_path" 2> /dev/null`
38957     # bat and cmd files are not always considered executable in cygwin causing which
38958     # to not find them
38959     if test "x$new_path" = x \
38960         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38961         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38962       new_path=`$CYGPATH -u "$path"`
38963     fi
38964     if test "x$new_path" = x; then
38965       # It's still not found. Now this is an unrecoverable error.
38966       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38967 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38968       has_space=`$ECHO "$complete" | $GREP " "`
38969       if test "x$has_space" != x; then
38970         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38971 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38972       fi
38973       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38974     fi
38975   fi
38976 
38977   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38978   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38979   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38980   # "foo.exe" is OK but "foo" is an error.
38981   #
38982   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38983   # It is also a way to make sure we got the proper file name for the real test later on.
38984   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38985   if test "x$test_shortpath" = x; then
38986     # Short path failed, file does not exist as specified.
38987     # Try adding .exe or .cmd
38988     if test -f "${new_path}.exe"; then
38989       input_to_shortpath="${new_path}.exe"
38990     elif test -f "${new_path}.cmd"; then
38991       input_to_shortpath="${new_path}.cmd"
38992     else
38993       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38994 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38995       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38996 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38997       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38998     fi
38999   else
39000     input_to_shortpath="$new_path"
39001   fi
39002 
39003   # Call helper function which possibly converts this using DOS-style short mode.
39004   # If so, the updated path is stored in $new_path.
39005   new_path="$input_to_shortpath"
39006 
39007   input_path="$input_to_shortpath"
39008   # Check if we need to convert this using DOS-style short mode. If the path
39009   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39010   # take no chances and rewrite it.
39011   # Note: m4 eats our [], so we need to use [ and ] instead.
39012   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39013   if test "x$has_forbidden_chars" != x; then
39014     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39015     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39016     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39017     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39018       # Going to short mode and back again did indeed matter. Since short mode is
39019       # case insensitive, let's make it lowercase to improve readability.
39020       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39021       # Now convert it back to Unix-style (cygpath)
39022       input_path=`$CYGPATH -u "$shortmode_path"`
39023       new_path="$input_path"
39024     fi
39025   fi
39026 
39027   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39028   if test "x$test_cygdrive_prefix" = x; then
39029     # As a simple fix, exclude /usr/bin since it's not a real path.
39030     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39031       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39032       # a path prefixed by /cygdrive for fixpath to work.
39033       new_path="$CYGWIN_ROOT_PATH$input_path"
39034     fi
39035   fi
39036 
39037   # remove trailing .exe if any
39038   new_path="${new_path/%.exe/}"
39039 
39040     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39041 
39042   # First separate the path from the arguments. This will split at the first
39043   # space.
39044   complete="$STRIP"
39045   path="${complete%% *}"
39046   tmp="$complete EOL"
39047   arguments="${tmp#* }"
39048 
39049   # Input might be given as Windows format, start by converting to
39050   # unix format.
39051   new_path="$path"
39052 
39053   windows_path="$new_path"
39054   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39055     unix_path=`$CYGPATH -u "$windows_path"`
39056     new_path="$unix_path"
39057   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39058     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39059     new_path="$unix_path"
39060   fi
39061 
39062 
39063   # Now try to locate executable using which
39064   new_path=`$WHICH "$new_path" 2> /dev/null`
39065 
39066   if test "x$new_path" = x; then
39067     # Oops. Which didn't find the executable.
39068     # The splitting of arguments from the executable at a space might have been incorrect,
39069     # since paths with space are more likely in Windows. Give it another try with the whole
39070     # argument.
39071     path="$complete"
39072     arguments="EOL"
39073     new_path="$path"
39074 
39075   windows_path="$new_path"
39076   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39077     unix_path=`$CYGPATH -u "$windows_path"`
39078     new_path="$unix_path"
39079   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39080     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39081     new_path="$unix_path"
39082   fi
39083 
39084 
39085     new_path=`$WHICH "$new_path" 2> /dev/null`
39086     # bat and cmd files are not always considered executable in MSYS causing which
39087     # to not find them
39088     if test "x$new_path" = x \
39089         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39090         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39091       new_path="$path"
39092 
39093   windows_path="$new_path"
39094   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39095     unix_path=`$CYGPATH -u "$windows_path"`
39096     new_path="$unix_path"
39097   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39098     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39099     new_path="$unix_path"
39100   fi
39101 
39102     fi
39103 
39104     if test "x$new_path" = x; then
39105       # It's still not found. Now this is an unrecoverable error.
39106       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39107 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39108       has_space=`$ECHO "$complete" | $GREP " "`
39109       if test "x$has_space" != x; then
39110         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39111 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39112       fi
39113       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39114     fi
39115   fi
39116 
39117   # Now new_path has a complete unix path to the binary
39118   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39119     # Keep paths in /bin as-is, but remove trailing .exe if any
39120     new_path="${new_path/%.exe/}"
39121     # Do not save /bin paths to all_fixpath_prefixes!
39122   else
39123     # Not in mixed or Windows style, start by that.
39124     new_path=`cmd //c echo $new_path`
39125 
39126   input_path="$new_path"
39127   # Check if we need to convert this using DOS-style short mode. If the path
39128   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39129   # take no chances and rewrite it.
39130   # Note: m4 eats our [], so we need to use [ and ] instead.
39131   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39132   if test "x$has_forbidden_chars" != x; then
39133     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39134     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39135   fi
39136 
39137     # Output is in $new_path
39138 
39139   windows_path="$new_path"
39140   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39141     unix_path=`$CYGPATH -u "$windows_path"`
39142     new_path="$unix_path"
39143   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39144     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39145     new_path="$unix_path"
39146   fi
39147 
39148     # remove trailing .exe if any
39149     new_path="${new_path/%.exe/}"
39150 
39151     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39152     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39153   fi
39154 
39155     else
39156       # We're on a unix platform. Hooray! :)
39157       # First separate the path from the arguments. This will split at the first
39158       # space.
39159       complete="$STRIP"
39160       path="${complete%% *}"
39161       tmp="$complete EOL"
39162       arguments="${tmp#* }"
39163 
39164       # Cannot rely on the command "which" here since it doesn't always work.
39165       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39166       if test -z "$is_absolute_path"; then
39167         # Path to executable is not absolute. Find it.
39168         IFS_save="$IFS"
39169         IFS=:
39170         for p in $PATH; do
39171           if test -f "$p/$path" && test -x "$p/$path"; then
39172             new_path="$p/$path"
39173             break
39174           fi
39175         done
39176         IFS="$IFS_save"
39177       else
39178         # This is an absolute path, we can use it without further modifications.
39179         new_path="$path"
39180       fi
39181 
39182       if test "x$new_path" = x; then
39183         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39184 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39185         has_space=`$ECHO "$complete" | $GREP " "`
39186         if test "x$has_space" != x; then
39187           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39188 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39189         fi
39190         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39191       fi
39192     fi
39193 
39194     # Now join together the path and the arguments once again
39195     if test "x$arguments" != xEOL; then
39196       new_complete="$new_path ${arguments% *}"
39197     else
39198       new_complete="$new_path"
39199     fi
39200 
39201     if test "x$complete" != "x$new_complete"; then
39202       STRIP="$new_complete"
39203       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39204 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39205     fi
39206   fi
39207 
39208 
39209 
39210   # Publish this variable in the help.
39211 
39212 
39213   if [ -z "${NM+x}" ]; then
39214     # The variable is not set by user, try to locate tool using the code snippet
39215     for ac_prog in nm
39216 do
39217   # Extract the first word of "$ac_prog", so it can be a program name with args.
39218 set dummy $ac_prog; ac_word=$2
39219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39220 $as_echo_n "checking for $ac_word... " >&6; }
39221 if ${ac_cv_path_NM+:} false; then :
39222   $as_echo_n "(cached) " >&6
39223 else
39224   case $NM in
39225   [\\/]* | ?:[\\/]*)
39226   ac_cv_path_NM="$NM" # Let the user override the test with a path.
39227   ;;
39228   *)
39229   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39230 for as_dir in $PATH
39231 do
39232   IFS=$as_save_IFS
39233   test -z "$as_dir" && as_dir=.
39234     for ac_exec_ext in '' $ac_executable_extensions; do
39235   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39236     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39237     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39238     break 2
39239   fi
39240 done
39241   done
39242 IFS=$as_save_IFS
39243 
39244   ;;
39245 esac
39246 fi
39247 NM=$ac_cv_path_NM
39248 if test -n "$NM"; then
39249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39250 $as_echo "$NM" >&6; }
39251 else
39252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39253 $as_echo "no" >&6; }
39254 fi
39255 
39256 
39257   test -n "$NM" && break
39258 done
39259 
39260   else
39261     # The variable is set, but is it from the command line or the environment?
39262 
39263     # Try to remove the string !NM! from our list.
39264     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39265     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39266       # If it failed, the variable was not from the command line. Ignore it,
39267       # but warn the user (except for BASH, which is always set by the calling BASH).
39268       if test "xNM" != xBASH; then
39269         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39270 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39271       fi
39272       # Try to locate tool using the code snippet
39273       for ac_prog in nm
39274 do
39275   # Extract the first word of "$ac_prog", so it can be a program name with args.
39276 set dummy $ac_prog; ac_word=$2
39277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39278 $as_echo_n "checking for $ac_word... " >&6; }
39279 if ${ac_cv_path_NM+:} false; then :
39280   $as_echo_n "(cached) " >&6
39281 else
39282   case $NM in
39283   [\\/]* | ?:[\\/]*)
39284   ac_cv_path_NM="$NM" # Let the user override the test with a path.
39285   ;;
39286   *)
39287   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39288 for as_dir in $PATH
39289 do
39290   IFS=$as_save_IFS
39291   test -z "$as_dir" && as_dir=.
39292     for ac_exec_ext in '' $ac_executable_extensions; do
39293   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39294     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39295     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39296     break 2
39297   fi
39298 done
39299   done
39300 IFS=$as_save_IFS
39301 
39302   ;;
39303 esac
39304 fi
39305 NM=$ac_cv_path_NM
39306 if test -n "$NM"; then
39307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39308 $as_echo "$NM" >&6; }
39309 else
39310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39311 $as_echo "no" >&6; }
39312 fi
39313 
39314 
39315   test -n "$NM" && break
39316 done
39317 
39318     else
39319       # If it succeeded, then it was overridden by the user. We will use it
39320       # for the tool.
39321 
39322       # First remove it from the list of overridden variables, so we can test
39323       # for unknown variables in the end.
39324       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39325 
39326       # Check if we try to supply an empty value
39327       if test "x$NM" = x; then
39328         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39329 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39330         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39331 $as_echo_n "checking for NM... " >&6; }
39332         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39333 $as_echo "disabled" >&6; }
39334       else
39335         # Check if the provided tool contains a complete path.
39336         tool_specified="$NM"
39337         tool_basename="${tool_specified##*/}"
39338         if test "x$tool_basename" = "x$tool_specified"; then
39339           # A command without a complete path is provided, search $PATH.
39340           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39341 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39342           # Extract the first word of "$tool_basename", so it can be a program name with args.
39343 set dummy $tool_basename; ac_word=$2
39344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39345 $as_echo_n "checking for $ac_word... " >&6; }
39346 if ${ac_cv_path_NM+:} false; then :
39347   $as_echo_n "(cached) " >&6
39348 else
39349   case $NM in
39350   [\\/]* | ?:[\\/]*)
39351   ac_cv_path_NM="$NM" # Let the user override the test with a path.
39352   ;;
39353   *)
39354   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39355 for as_dir in $PATH
39356 do
39357   IFS=$as_save_IFS
39358   test -z "$as_dir" && as_dir=.
39359     for ac_exec_ext in '' $ac_executable_extensions; do
39360   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39361     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39362     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39363     break 2
39364   fi
39365 done
39366   done
39367 IFS=$as_save_IFS
39368 
39369   ;;
39370 esac
39371 fi
39372 NM=$ac_cv_path_NM
39373 if test -n "$NM"; then
39374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39375 $as_echo "$NM" >&6; }
39376 else
39377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39378 $as_echo "no" >&6; }
39379 fi
39380 
39381 
39382           if test "x$NM" = x; then
39383             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39384           fi
39385         else
39386           # Otherwise we believe it is a complete path. Use it as it is.
39387           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39388 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39389           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39390 $as_echo_n "checking for NM... " >&6; }
39391           if test ! -x "$tool_specified"; then
39392             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39393 $as_echo "not found" >&6; }
39394             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39395           fi
39396           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39397 $as_echo "$tool_specified" >&6; }
39398         fi
39399       fi
39400     fi
39401 
39402   fi
39403 
39404 
39405 
39406   # Only process if variable expands to non-empty
39407 
39408   if test "x$NM" != x; then
39409     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39410 
39411   # First separate the path from the arguments. This will split at the first
39412   # space.
39413   complete="$NM"
39414   path="${complete%% *}"
39415   tmp="$complete EOL"
39416   arguments="${tmp#* }"
39417 
39418   # Input might be given as Windows format, start by converting to
39419   # unix format.
39420   new_path=`$CYGPATH -u "$path"`
39421 
39422   # Now try to locate executable using which
39423   new_path=`$WHICH "$new_path" 2> /dev/null`
39424   # bat and cmd files are not always considered executable in cygwin causing which
39425   # to not find them
39426   if test "x$new_path" = x \
39427       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39428       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39429     new_path=`$CYGPATH -u "$path"`
39430   fi
39431   if test "x$new_path" = x; then
39432     # Oops. Which didn't find the executable.
39433     # The splitting of arguments from the executable at a space might have been incorrect,
39434     # since paths with space are more likely in Windows. Give it another try with the whole
39435     # argument.
39436     path="$complete"
39437     arguments="EOL"
39438     new_path=`$CYGPATH -u "$path"`
39439     new_path=`$WHICH "$new_path" 2> /dev/null`
39440     # bat and cmd files are not always considered executable in cygwin 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=`$CYGPATH -u "$path"`
39446     fi
39447     if test "x$new_path" = x; then
39448       # It's still not found. Now this is an unrecoverable error.
39449       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39450 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39451       has_space=`$ECHO "$complete" | $GREP " "`
39452       if test "x$has_space" != x; then
39453         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39454 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39455       fi
39456       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39457     fi
39458   fi
39459 
39460   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39461   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39462   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39463   # "foo.exe" is OK but "foo" is an error.
39464   #
39465   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39466   # It is also a way to make sure we got the proper file name for the real test later on.
39467   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39468   if test "x$test_shortpath" = x; then
39469     # Short path failed, file does not exist as specified.
39470     # Try adding .exe or .cmd
39471     if test -f "${new_path}.exe"; then
39472       input_to_shortpath="${new_path}.exe"
39473     elif test -f "${new_path}.cmd"; then
39474       input_to_shortpath="${new_path}.cmd"
39475     else
39476       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39477 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39478       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39479 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39480       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39481     fi
39482   else
39483     input_to_shortpath="$new_path"
39484   fi
39485 
39486   # Call helper function which possibly converts this using DOS-style short mode.
39487   # If so, the updated path is stored in $new_path.
39488   new_path="$input_to_shortpath"
39489 
39490   input_path="$input_to_shortpath"
39491   # Check if we need to convert this using DOS-style short mode. If the path
39492   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39493   # take no chances and rewrite it.
39494   # Note: m4 eats our [], so we need to use [ and ] instead.
39495   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39496   if test "x$has_forbidden_chars" != x; then
39497     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39498     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39499     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39500     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39501       # Going to short mode and back again did indeed matter. Since short mode is
39502       # case insensitive, let's make it lowercase to improve readability.
39503       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39504       # Now convert it back to Unix-style (cygpath)
39505       input_path=`$CYGPATH -u "$shortmode_path"`
39506       new_path="$input_path"
39507     fi
39508   fi
39509 
39510   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39511   if test "x$test_cygdrive_prefix" = x; then
39512     # As a simple fix, exclude /usr/bin since it's not a real path.
39513     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39514       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39515       # a path prefixed by /cygdrive for fixpath to work.
39516       new_path="$CYGWIN_ROOT_PATH$input_path"
39517     fi
39518   fi
39519 
39520   # remove trailing .exe if any
39521   new_path="${new_path/%.exe/}"
39522 
39523     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39524 
39525   # First separate the path from the arguments. This will split at the first
39526   # space.
39527   complete="$NM"
39528   path="${complete%% *}"
39529   tmp="$complete EOL"
39530   arguments="${tmp#* }"
39531 
39532   # Input might be given as Windows format, start by converting to
39533   # unix format.
39534   new_path="$path"
39535 
39536   windows_path="$new_path"
39537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39538     unix_path=`$CYGPATH -u "$windows_path"`
39539     new_path="$unix_path"
39540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39541     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39542     new_path="$unix_path"
39543   fi
39544 
39545 
39546   # Now try to locate executable using which
39547   new_path=`$WHICH "$new_path" 2> /dev/null`
39548 
39549   if test "x$new_path" = x; then
39550     # Oops. Which didn't find the executable.
39551     # The splitting of arguments from the executable at a space might have been incorrect,
39552     # since paths with space are more likely in Windows. Give it another try with the whole
39553     # argument.
39554     path="$complete"
39555     arguments="EOL"
39556     new_path="$path"
39557 
39558   windows_path="$new_path"
39559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39560     unix_path=`$CYGPATH -u "$windows_path"`
39561     new_path="$unix_path"
39562   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39563     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39564     new_path="$unix_path"
39565   fi
39566 
39567 
39568     new_path=`$WHICH "$new_path" 2> /dev/null`
39569     # bat and cmd files are not always considered executable in MSYS causing which
39570     # to not find them
39571     if test "x$new_path" = x \
39572         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39573         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39574       new_path="$path"
39575 
39576   windows_path="$new_path"
39577   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39578     unix_path=`$CYGPATH -u "$windows_path"`
39579     new_path="$unix_path"
39580   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39581     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39582     new_path="$unix_path"
39583   fi
39584 
39585     fi
39586 
39587     if test "x$new_path" = x; then
39588       # It's still not found. Now this is an unrecoverable error.
39589       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39590 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39591       has_space=`$ECHO "$complete" | $GREP " "`
39592       if test "x$has_space" != x; then
39593         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39594 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39595       fi
39596       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39597     fi
39598   fi
39599 
39600   # Now new_path has a complete unix path to the binary
39601   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39602     # Keep paths in /bin as-is, but remove trailing .exe if any
39603     new_path="${new_path/%.exe/}"
39604     # Do not save /bin paths to all_fixpath_prefixes!
39605   else
39606     # Not in mixed or Windows style, start by that.
39607     new_path=`cmd //c echo $new_path`
39608 
39609   input_path="$new_path"
39610   # Check if we need to convert this using DOS-style short mode. If the path
39611   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39612   # take no chances and rewrite it.
39613   # Note: m4 eats our [], so we need to use [ and ] instead.
39614   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39615   if test "x$has_forbidden_chars" != x; then
39616     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39617     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39618   fi
39619 
39620     # Output is in $new_path
39621 
39622   windows_path="$new_path"
39623   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39624     unix_path=`$CYGPATH -u "$windows_path"`
39625     new_path="$unix_path"
39626   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39627     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39628     new_path="$unix_path"
39629   fi
39630 
39631     # remove trailing .exe if any
39632     new_path="${new_path/%.exe/}"
39633 
39634     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39635     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39636   fi
39637 
39638     else
39639       # We're on a unix platform. Hooray! :)
39640       # First separate the path from the arguments. This will split at the first
39641       # space.
39642       complete="$NM"
39643       path="${complete%% *}"
39644       tmp="$complete EOL"
39645       arguments="${tmp#* }"
39646 
39647       # Cannot rely on the command "which" here since it doesn't always work.
39648       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39649       if test -z "$is_absolute_path"; then
39650         # Path to executable is not absolute. Find it.
39651         IFS_save="$IFS"
39652         IFS=:
39653         for p in $PATH; do
39654           if test -f "$p/$path" && test -x "$p/$path"; then
39655             new_path="$p/$path"
39656             break
39657           fi
39658         done
39659         IFS="$IFS_save"
39660       else
39661         # This is an absolute path, we can use it without further modifications.
39662         new_path="$path"
39663       fi
39664 
39665       if test "x$new_path" = x; then
39666         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39667 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39668         has_space=`$ECHO "$complete" | $GREP " "`
39669         if test "x$has_space" != x; then
39670           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39671 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39672         fi
39673         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39674       fi
39675     fi
39676 
39677     # Now join together the path and the arguments once again
39678     if test "x$arguments" != xEOL; then
39679       new_complete="$new_path ${arguments% *}"
39680     else
39681       new_complete="$new_path"
39682     fi
39683 
39684     if test "x$complete" != "x$new_complete"; then
39685       NM="$new_complete"
39686       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39687 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39688     fi
39689   fi
39690 
39691 
39692 
39693   # Publish this variable in the help.
39694 
39695 
39696   if [ -z "${GNM+x}" ]; then
39697     # The variable is not set by user, try to locate tool using the code snippet
39698     for ac_prog in gnm
39699 do
39700   # Extract the first word of "$ac_prog", so it can be a program name with args.
39701 set dummy $ac_prog; ac_word=$2
39702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39703 $as_echo_n "checking for $ac_word... " >&6; }
39704 if ${ac_cv_path_GNM+:} false; then :
39705   $as_echo_n "(cached) " >&6
39706 else
39707   case $GNM in
39708   [\\/]* | ?:[\\/]*)
39709   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39710   ;;
39711   *)
39712   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39713 for as_dir in $PATH
39714 do
39715   IFS=$as_save_IFS
39716   test -z "$as_dir" && as_dir=.
39717     for ac_exec_ext in '' $ac_executable_extensions; do
39718   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39719     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39720     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39721     break 2
39722   fi
39723 done
39724   done
39725 IFS=$as_save_IFS
39726 
39727   ;;
39728 esac
39729 fi
39730 GNM=$ac_cv_path_GNM
39731 if test -n "$GNM"; then
39732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39733 $as_echo "$GNM" >&6; }
39734 else
39735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39736 $as_echo "no" >&6; }
39737 fi
39738 
39739 
39740   test -n "$GNM" && break
39741 done
39742 
39743   else
39744     # The variable is set, but is it from the command line or the environment?
39745 
39746     # Try to remove the string !GNM! from our list.
39747     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39748     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39749       # If it failed, the variable was not from the command line. Ignore it,
39750       # but warn the user (except for BASH, which is always set by the calling BASH).
39751       if test "xGNM" != xBASH; then
39752         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39753 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39754       fi
39755       # Try to locate tool using the code snippet
39756       for ac_prog in gnm
39757 do
39758   # Extract the first word of "$ac_prog", so it can be a program name with args.
39759 set dummy $ac_prog; ac_word=$2
39760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39761 $as_echo_n "checking for $ac_word... " >&6; }
39762 if ${ac_cv_path_GNM+:} false; then :
39763   $as_echo_n "(cached) " >&6
39764 else
39765   case $GNM in
39766   [\\/]* | ?:[\\/]*)
39767   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39768   ;;
39769   *)
39770   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39771 for as_dir in $PATH
39772 do
39773   IFS=$as_save_IFS
39774   test -z "$as_dir" && as_dir=.
39775     for ac_exec_ext in '' $ac_executable_extensions; do
39776   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39777     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39778     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39779     break 2
39780   fi
39781 done
39782   done
39783 IFS=$as_save_IFS
39784 
39785   ;;
39786 esac
39787 fi
39788 GNM=$ac_cv_path_GNM
39789 if test -n "$GNM"; then
39790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39791 $as_echo "$GNM" >&6; }
39792 else
39793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39794 $as_echo "no" >&6; }
39795 fi
39796 
39797 
39798   test -n "$GNM" && break
39799 done
39800 
39801     else
39802       # If it succeeded, then it was overridden by the user. We will use it
39803       # for the tool.
39804 
39805       # First remove it from the list of overridden variables, so we can test
39806       # for unknown variables in the end.
39807       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39808 
39809       # Check if we try to supply an empty value
39810       if test "x$GNM" = x; then
39811         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39812 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39813         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39814 $as_echo_n "checking for GNM... " >&6; }
39815         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39816 $as_echo "disabled" >&6; }
39817       else
39818         # Check if the provided tool contains a complete path.
39819         tool_specified="$GNM"
39820         tool_basename="${tool_specified##*/}"
39821         if test "x$tool_basename" = "x$tool_specified"; then
39822           # A command without a complete path is provided, search $PATH.
39823           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39824 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39825           # Extract the first word of "$tool_basename", so it can be a program name with args.
39826 set dummy $tool_basename; ac_word=$2
39827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39828 $as_echo_n "checking for $ac_word... " >&6; }
39829 if ${ac_cv_path_GNM+:} false; then :
39830   $as_echo_n "(cached) " >&6
39831 else
39832   case $GNM in
39833   [\\/]* | ?:[\\/]*)
39834   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39835   ;;
39836   *)
39837   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39838 for as_dir in $PATH
39839 do
39840   IFS=$as_save_IFS
39841   test -z "$as_dir" && as_dir=.
39842     for ac_exec_ext in '' $ac_executable_extensions; do
39843   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39844     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39845     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39846     break 2
39847   fi
39848 done
39849   done
39850 IFS=$as_save_IFS
39851 
39852   ;;
39853 esac
39854 fi
39855 GNM=$ac_cv_path_GNM
39856 if test -n "$GNM"; then
39857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39858 $as_echo "$GNM" >&6; }
39859 else
39860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39861 $as_echo "no" >&6; }
39862 fi
39863 
39864 
39865           if test "x$GNM" = x; then
39866             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39867           fi
39868         else
39869           # Otherwise we believe it is a complete path. Use it as it is.
39870           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39871 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39872           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39873 $as_echo_n "checking for GNM... " >&6; }
39874           if test ! -x "$tool_specified"; then
39875             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39876 $as_echo "not found" >&6; }
39877             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39878           fi
39879           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39880 $as_echo "$tool_specified" >&6; }
39881         fi
39882       fi
39883     fi
39884 
39885   fi
39886 
39887 
39888 
39889   # Only process if variable expands to non-empty
39890 
39891   if test "x$GNM" != x; then
39892     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39893 
39894   # First separate the path from the arguments. This will split at the first
39895   # space.
39896   complete="$GNM"
39897   path="${complete%% *}"
39898   tmp="$complete EOL"
39899   arguments="${tmp#* }"
39900 
39901   # Input might be given as Windows format, start by converting to
39902   # unix format.
39903   new_path=`$CYGPATH -u "$path"`
39904 
39905   # Now try to locate executable using which
39906   new_path=`$WHICH "$new_path" 2> /dev/null`
39907   # bat and cmd files are not always considered executable in cygwin causing which
39908   # to not find them
39909   if test "x$new_path" = x \
39910       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39911       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39912     new_path=`$CYGPATH -u "$path"`
39913   fi
39914   if test "x$new_path" = x; then
39915     # Oops. Which didn't find the executable.
39916     # The splitting of arguments from the executable at a space might have been incorrect,
39917     # since paths with space are more likely in Windows. Give it another try with the whole
39918     # argument.
39919     path="$complete"
39920     arguments="EOL"
39921     new_path=`$CYGPATH -u "$path"`
39922     new_path=`$WHICH "$new_path" 2> /dev/null`
39923     # bat and cmd files are not always considered executable in cygwin causing which
39924     # to not find them
39925     if test "x$new_path" = x \
39926         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39927         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39928       new_path=`$CYGPATH -u "$path"`
39929     fi
39930     if test "x$new_path" = x; then
39931       # It's still not found. Now this is an unrecoverable error.
39932       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39933 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39934       has_space=`$ECHO "$complete" | $GREP " "`
39935       if test "x$has_space" != x; then
39936         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39937 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39938       fi
39939       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39940     fi
39941   fi
39942 
39943   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39944   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39945   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39946   # "foo.exe" is OK but "foo" is an error.
39947   #
39948   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39949   # It is also a way to make sure we got the proper file name for the real test later on.
39950   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39951   if test "x$test_shortpath" = x; then
39952     # Short path failed, file does not exist as specified.
39953     # Try adding .exe or .cmd
39954     if test -f "${new_path}.exe"; then
39955       input_to_shortpath="${new_path}.exe"
39956     elif test -f "${new_path}.cmd"; then
39957       input_to_shortpath="${new_path}.cmd"
39958     else
39959       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39960 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39961       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39962 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39963       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39964     fi
39965   else
39966     input_to_shortpath="$new_path"
39967   fi
39968 
39969   # Call helper function which possibly converts this using DOS-style short mode.
39970   # If so, the updated path is stored in $new_path.
39971   new_path="$input_to_shortpath"
39972 
39973   input_path="$input_to_shortpath"
39974   # Check if we need to convert this using DOS-style short mode. If the path
39975   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39976   # take no chances and rewrite it.
39977   # Note: m4 eats our [], so we need to use [ and ] instead.
39978   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39979   if test "x$has_forbidden_chars" != x; then
39980     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39981     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39982     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39983     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39984       # Going to short mode and back again did indeed matter. Since short mode is
39985       # case insensitive, let's make it lowercase to improve readability.
39986       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39987       # Now convert it back to Unix-style (cygpath)
39988       input_path=`$CYGPATH -u "$shortmode_path"`
39989       new_path="$input_path"
39990     fi
39991   fi
39992 
39993   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39994   if test "x$test_cygdrive_prefix" = x; then
39995     # As a simple fix, exclude /usr/bin since it's not a real path.
39996     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39997       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39998       # a path prefixed by /cygdrive for fixpath to work.
39999       new_path="$CYGWIN_ROOT_PATH$input_path"
40000     fi
40001   fi
40002 
40003   # remove trailing .exe if any
40004   new_path="${new_path/%.exe/}"
40005 
40006     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40007 
40008   # First separate the path from the arguments. This will split at the first
40009   # space.
40010   complete="$GNM"
40011   path="${complete%% *}"
40012   tmp="$complete EOL"
40013   arguments="${tmp#* }"
40014 
40015   # Input might be given as Windows format, start by converting to
40016   # unix format.
40017   new_path="$path"
40018 
40019   windows_path="$new_path"
40020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40021     unix_path=`$CYGPATH -u "$windows_path"`
40022     new_path="$unix_path"
40023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40024     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40025     new_path="$unix_path"
40026   fi
40027 
40028 
40029   # Now try to locate executable using which
40030   new_path=`$WHICH "$new_path" 2> /dev/null`
40031 
40032   if test "x$new_path" = x; then
40033     # Oops. Which didn't find the executable.
40034     # The splitting of arguments from the executable at a space might have been incorrect,
40035     # since paths with space are more likely in Windows. Give it another try with the whole
40036     # argument.
40037     path="$complete"
40038     arguments="EOL"
40039     new_path="$path"
40040 
40041   windows_path="$new_path"
40042   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40043     unix_path=`$CYGPATH -u "$windows_path"`
40044     new_path="$unix_path"
40045   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40046     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40047     new_path="$unix_path"
40048   fi
40049 
40050 
40051     new_path=`$WHICH "$new_path" 2> /dev/null`
40052     # bat and cmd files are not always considered executable in MSYS causing which
40053     # to not find them
40054     if test "x$new_path" = x \
40055         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40056         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40057       new_path="$path"
40058 
40059   windows_path="$new_path"
40060   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40061     unix_path=`$CYGPATH -u "$windows_path"`
40062     new_path="$unix_path"
40063   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40064     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40065     new_path="$unix_path"
40066   fi
40067 
40068     fi
40069 
40070     if test "x$new_path" = x; then
40071       # It's still not found. Now this is an unrecoverable error.
40072       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40073 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40074       has_space=`$ECHO "$complete" | $GREP " "`
40075       if test "x$has_space" != x; then
40076         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40077 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40078       fi
40079       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40080     fi
40081   fi
40082 
40083   # Now new_path has a complete unix path to the binary
40084   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40085     # Keep paths in /bin as-is, but remove trailing .exe if any
40086     new_path="${new_path/%.exe/}"
40087     # Do not save /bin paths to all_fixpath_prefixes!
40088   else
40089     # Not in mixed or Windows style, start by that.
40090     new_path=`cmd //c echo $new_path`
40091 
40092   input_path="$new_path"
40093   # Check if we need to convert this using DOS-style short mode. If the path
40094   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40095   # take no chances and rewrite it.
40096   # Note: m4 eats our [], so we need to use [ and ] instead.
40097   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40098   if test "x$has_forbidden_chars" != x; then
40099     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40100     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40101   fi
40102 
40103     # Output is in $new_path
40104 
40105   windows_path="$new_path"
40106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40107     unix_path=`$CYGPATH -u "$windows_path"`
40108     new_path="$unix_path"
40109   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40110     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40111     new_path="$unix_path"
40112   fi
40113 
40114     # remove trailing .exe if any
40115     new_path="${new_path/%.exe/}"
40116 
40117     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40118     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40119   fi
40120 
40121     else
40122       # We're on a unix platform. Hooray! :)
40123       # First separate the path from the arguments. This will split at the first
40124       # space.
40125       complete="$GNM"
40126       path="${complete%% *}"
40127       tmp="$complete EOL"
40128       arguments="${tmp#* }"
40129 
40130       # Cannot rely on the command "which" here since it doesn't always work.
40131       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40132       if test -z "$is_absolute_path"; then
40133         # Path to executable is not absolute. Find it.
40134         IFS_save="$IFS"
40135         IFS=:
40136         for p in $PATH; do
40137           if test -f "$p/$path" && test -x "$p/$path"; then
40138             new_path="$p/$path"
40139             break
40140           fi
40141         done
40142         IFS="$IFS_save"
40143       else
40144         # This is an absolute path, we can use it without further modifications.
40145         new_path="$path"
40146       fi
40147 
40148       if test "x$new_path" = x; then
40149         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40150 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40151         has_space=`$ECHO "$complete" | $GREP " "`
40152         if test "x$has_space" != x; then
40153           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40154 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40155         fi
40156         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40157       fi
40158     fi
40159 
40160     # Now join together the path and the arguments once again
40161     if test "x$arguments" != xEOL; then
40162       new_complete="$new_path ${arguments% *}"
40163     else
40164       new_complete="$new_path"
40165     fi
40166 
40167     if test "x$complete" != "x$new_complete"; then
40168       GNM="$new_complete"
40169       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40170 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40171     fi
40172   fi
40173 
40174   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40175     # FIXME: we should unify this with the solaris case above.
40176 
40177 
40178   # Publish this variable in the help.
40179 
40180 
40181   if [ -z "${STRIP+x}" ]; then
40182     # The variable is not set by user, try to locate tool using the code snippet
40183     if test -n "$ac_tool_prefix"; then
40184   for ac_prog in strip
40185   do
40186     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40187 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40189 $as_echo_n "checking for $ac_word... " >&6; }
40190 if ${ac_cv_prog_STRIP+:} false; then :
40191   $as_echo_n "(cached) " >&6
40192 else
40193   if test -n "$STRIP"; then
40194   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40195 else
40196 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40197 for as_dir in $PATH
40198 do
40199   IFS=$as_save_IFS
40200   test -z "$as_dir" && as_dir=.
40201     for ac_exec_ext in '' $ac_executable_extensions; do
40202   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40203     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40204     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40205     break 2
40206   fi
40207 done
40208   done
40209 IFS=$as_save_IFS
40210 
40211 fi
40212 fi
40213 STRIP=$ac_cv_prog_STRIP
40214 if test -n "$STRIP"; then
40215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40216 $as_echo "$STRIP" >&6; }
40217 else
40218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40219 $as_echo "no" >&6; }
40220 fi
40221 
40222 
40223     test -n "$STRIP" && break
40224   done
40225 fi
40226 if test -z "$STRIP"; then
40227   ac_ct_STRIP=$STRIP
40228   for ac_prog in strip
40229 do
40230   # Extract the first word of "$ac_prog", so it can be a program name with args.
40231 set dummy $ac_prog; ac_word=$2
40232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40233 $as_echo_n "checking for $ac_word... " >&6; }
40234 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40235   $as_echo_n "(cached) " >&6
40236 else
40237   if test -n "$ac_ct_STRIP"; then
40238   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40239 else
40240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40241 for as_dir in $PATH
40242 do
40243   IFS=$as_save_IFS
40244   test -z "$as_dir" && as_dir=.
40245     for ac_exec_ext in '' $ac_executable_extensions; do
40246   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40247     ac_cv_prog_ac_ct_STRIP="$ac_prog"
40248     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40249     break 2
40250   fi
40251 done
40252   done
40253 IFS=$as_save_IFS
40254 
40255 fi
40256 fi
40257 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40258 if test -n "$ac_ct_STRIP"; then
40259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40260 $as_echo "$ac_ct_STRIP" >&6; }
40261 else
40262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40263 $as_echo "no" >&6; }
40264 fi
40265 
40266 
40267   test -n "$ac_ct_STRIP" && break
40268 done
40269 
40270   if test "x$ac_ct_STRIP" = x; then
40271     STRIP=""
40272   else
40273     case $cross_compiling:$ac_tool_warned in
40274 yes:)
40275 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40276 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40277 ac_tool_warned=yes ;;
40278 esac
40279     STRIP=$ac_ct_STRIP
40280   fi
40281 fi
40282 
40283   else
40284     # The variable is set, but is it from the command line or the environment?
40285 
40286     # Try to remove the string !STRIP! from our list.
40287     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40288     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40289       # If it failed, the variable was not from the command line. Ignore it,
40290       # but warn the user (except for BASH, which is always set by the calling BASH).
40291       if test "xSTRIP" != xBASH; then
40292         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40293 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40294       fi
40295       # Try to locate tool using the code snippet
40296       if test -n "$ac_tool_prefix"; then
40297   for ac_prog in strip
40298   do
40299     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40300 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40302 $as_echo_n "checking for $ac_word... " >&6; }
40303 if ${ac_cv_prog_STRIP+:} false; then :
40304   $as_echo_n "(cached) " >&6
40305 else
40306   if test -n "$STRIP"; then
40307   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40308 else
40309 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40310 for as_dir in $PATH
40311 do
40312   IFS=$as_save_IFS
40313   test -z "$as_dir" && as_dir=.
40314     for ac_exec_ext in '' $ac_executable_extensions; do
40315   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40316     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40317     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40318     break 2
40319   fi
40320 done
40321   done
40322 IFS=$as_save_IFS
40323 
40324 fi
40325 fi
40326 STRIP=$ac_cv_prog_STRIP
40327 if test -n "$STRIP"; then
40328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40329 $as_echo "$STRIP" >&6; }
40330 else
40331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40332 $as_echo "no" >&6; }
40333 fi
40334 
40335 
40336     test -n "$STRIP" && break
40337   done
40338 fi
40339 if test -z "$STRIP"; then
40340   ac_ct_STRIP=$STRIP
40341   for ac_prog in strip
40342 do
40343   # Extract the first word of "$ac_prog", so it can be a program name with args.
40344 set dummy $ac_prog; ac_word=$2
40345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40346 $as_echo_n "checking for $ac_word... " >&6; }
40347 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40348   $as_echo_n "(cached) " >&6
40349 else
40350   if test -n "$ac_ct_STRIP"; then
40351   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40352 else
40353 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40354 for as_dir in $PATH
40355 do
40356   IFS=$as_save_IFS
40357   test -z "$as_dir" && as_dir=.
40358     for ac_exec_ext in '' $ac_executable_extensions; do
40359   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40360     ac_cv_prog_ac_ct_STRIP="$ac_prog"
40361     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40362     break 2
40363   fi
40364 done
40365   done
40366 IFS=$as_save_IFS
40367 
40368 fi
40369 fi
40370 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40371 if test -n "$ac_ct_STRIP"; then
40372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40373 $as_echo "$ac_ct_STRIP" >&6; }
40374 else
40375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40376 $as_echo "no" >&6; }
40377 fi
40378 
40379 
40380   test -n "$ac_ct_STRIP" && break
40381 done
40382 
40383   if test "x$ac_ct_STRIP" = x; then
40384     STRIP=""
40385   else
40386     case $cross_compiling:$ac_tool_warned in
40387 yes:)
40388 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40389 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40390 ac_tool_warned=yes ;;
40391 esac
40392     STRIP=$ac_ct_STRIP
40393   fi
40394 fi
40395 
40396     else
40397       # If it succeeded, then it was overridden by the user. We will use it
40398       # for the tool.
40399 
40400       # First remove it from the list of overridden variables, so we can test
40401       # for unknown variables in the end.
40402       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40403 
40404       # Check if we try to supply an empty value
40405       if test "x$STRIP" = x; then
40406         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40407 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40408         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40409 $as_echo_n "checking for STRIP... " >&6; }
40410         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40411 $as_echo "disabled" >&6; }
40412       else
40413         # Check if the provided tool contains a complete path.
40414         tool_specified="$STRIP"
40415         tool_basename="${tool_specified##*/}"
40416         if test "x$tool_basename" = "x$tool_specified"; then
40417           # A command without a complete path is provided, search $PATH.
40418           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40419 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40420           # Extract the first word of "$tool_basename", so it can be a program name with args.
40421 set dummy $tool_basename; ac_word=$2
40422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40423 $as_echo_n "checking for $ac_word... " >&6; }
40424 if ${ac_cv_path_STRIP+:} false; then :
40425   $as_echo_n "(cached) " >&6
40426 else
40427   case $STRIP in
40428   [\\/]* | ?:[\\/]*)
40429   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40430   ;;
40431   *)
40432   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40433 for as_dir in $PATH
40434 do
40435   IFS=$as_save_IFS
40436   test -z "$as_dir" && as_dir=.
40437     for ac_exec_ext in '' $ac_executable_extensions; do
40438   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40439     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40440     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40441     break 2
40442   fi
40443 done
40444   done
40445 IFS=$as_save_IFS
40446 
40447   ;;
40448 esac
40449 fi
40450 STRIP=$ac_cv_path_STRIP
40451 if test -n "$STRIP"; then
40452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40453 $as_echo "$STRIP" >&6; }
40454 else
40455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40456 $as_echo "no" >&6; }
40457 fi
40458 
40459 
40460           if test "x$STRIP" = x; then
40461             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40462           fi
40463         else
40464           # Otherwise we believe it is a complete path. Use it as it is.
40465           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40466 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40467           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40468 $as_echo_n "checking for STRIP... " >&6; }
40469           if test ! -x "$tool_specified"; then
40470             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40471 $as_echo "not found" >&6; }
40472             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40473           fi
40474           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40475 $as_echo "$tool_specified" >&6; }
40476         fi
40477       fi
40478     fi
40479 
40480   fi
40481 
40482 
40483 
40484   # Only process if variable expands to non-empty
40485 
40486   if test "x$STRIP" != x; then
40487     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40488 
40489   # First separate the path from the arguments. This will split at the first
40490   # space.
40491   complete="$STRIP"
40492   path="${complete%% *}"
40493   tmp="$complete EOL"
40494   arguments="${tmp#* }"
40495 
40496   # Input might be given as Windows format, start by converting to
40497   # unix format.
40498   new_path=`$CYGPATH -u "$path"`
40499 
40500   # Now try to locate executable using which
40501   new_path=`$WHICH "$new_path" 2> /dev/null`
40502   # bat and cmd files are not always considered executable in cygwin causing which
40503   # to not find them
40504   if test "x$new_path" = x \
40505       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40506       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40507     new_path=`$CYGPATH -u "$path"`
40508   fi
40509   if test "x$new_path" = x; then
40510     # Oops. Which didn't find the executable.
40511     # The splitting of arguments from the executable at a space might have been incorrect,
40512     # since paths with space are more likely in Windows. Give it another try with the whole
40513     # argument.
40514     path="$complete"
40515     arguments="EOL"
40516     new_path=`$CYGPATH -u "$path"`
40517     new_path=`$WHICH "$new_path" 2> /dev/null`
40518     # bat and cmd files are not always considered executable in cygwin causing which
40519     # to not find them
40520     if test "x$new_path" = x \
40521         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40522         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40523       new_path=`$CYGPATH -u "$path"`
40524     fi
40525     if test "x$new_path" = x; then
40526       # It's still not found. Now this is an unrecoverable error.
40527       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40528 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40529       has_space=`$ECHO "$complete" | $GREP " "`
40530       if test "x$has_space" != x; then
40531         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40532 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40533       fi
40534       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40535     fi
40536   fi
40537 
40538   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40539   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40540   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40541   # "foo.exe" is OK but "foo" is an error.
40542   #
40543   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40544   # It is also a way to make sure we got the proper file name for the real test later on.
40545   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40546   if test "x$test_shortpath" = x; then
40547     # Short path failed, file does not exist as specified.
40548     # Try adding .exe or .cmd
40549     if test -f "${new_path}.exe"; then
40550       input_to_shortpath="${new_path}.exe"
40551     elif test -f "${new_path}.cmd"; then
40552       input_to_shortpath="${new_path}.cmd"
40553     else
40554       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40555 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40556       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40557 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40558       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40559     fi
40560   else
40561     input_to_shortpath="$new_path"
40562   fi
40563 
40564   # Call helper function which possibly converts this using DOS-style short mode.
40565   # If so, the updated path is stored in $new_path.
40566   new_path="$input_to_shortpath"
40567 
40568   input_path="$input_to_shortpath"
40569   # Check if we need to convert this using DOS-style short mode. If the path
40570   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40571   # take no chances and rewrite it.
40572   # Note: m4 eats our [], so we need to use [ and ] instead.
40573   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40574   if test "x$has_forbidden_chars" != x; then
40575     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40576     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40577     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40578     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40579       # Going to short mode and back again did indeed matter. Since short mode is
40580       # case insensitive, let's make it lowercase to improve readability.
40581       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40582       # Now convert it back to Unix-style (cygpath)
40583       input_path=`$CYGPATH -u "$shortmode_path"`
40584       new_path="$input_path"
40585     fi
40586   fi
40587 
40588   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40589   if test "x$test_cygdrive_prefix" = x; then
40590     # As a simple fix, exclude /usr/bin since it's not a real path.
40591     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40592       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40593       # a path prefixed by /cygdrive for fixpath to work.
40594       new_path="$CYGWIN_ROOT_PATH$input_path"
40595     fi
40596   fi
40597 
40598   # remove trailing .exe if any
40599   new_path="${new_path/%.exe/}"
40600 
40601     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40602 
40603   # First separate the path from the arguments. This will split at the first
40604   # space.
40605   complete="$STRIP"
40606   path="${complete%% *}"
40607   tmp="$complete EOL"
40608   arguments="${tmp#* }"
40609 
40610   # Input might be given as Windows format, start by converting to
40611   # unix format.
40612   new_path="$path"
40613 
40614   windows_path="$new_path"
40615   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40616     unix_path=`$CYGPATH -u "$windows_path"`
40617     new_path="$unix_path"
40618   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40619     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40620     new_path="$unix_path"
40621   fi
40622 
40623 
40624   # Now try to locate executable using which
40625   new_path=`$WHICH "$new_path" 2> /dev/null`
40626 
40627   if test "x$new_path" = x; then
40628     # Oops. Which didn't find the executable.
40629     # The splitting of arguments from the executable at a space might have been incorrect,
40630     # since paths with space are more likely in Windows. Give it another try with the whole
40631     # argument.
40632     path="$complete"
40633     arguments="EOL"
40634     new_path="$path"
40635 
40636   windows_path="$new_path"
40637   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40638     unix_path=`$CYGPATH -u "$windows_path"`
40639     new_path="$unix_path"
40640   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40641     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40642     new_path="$unix_path"
40643   fi
40644 
40645 
40646     new_path=`$WHICH "$new_path" 2> /dev/null`
40647     # bat and cmd files are not always considered executable in MSYS causing which
40648     # to not find them
40649     if test "x$new_path" = x \
40650         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40651         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40652       new_path="$path"
40653 
40654   windows_path="$new_path"
40655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40656     unix_path=`$CYGPATH -u "$windows_path"`
40657     new_path="$unix_path"
40658   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40659     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40660     new_path="$unix_path"
40661   fi
40662 
40663     fi
40664 
40665     if test "x$new_path" = x; then
40666       # It's still not found. Now this is an unrecoverable error.
40667       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40668 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40669       has_space=`$ECHO "$complete" | $GREP " "`
40670       if test "x$has_space" != x; then
40671         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40672 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40673       fi
40674       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40675     fi
40676   fi
40677 
40678   # Now new_path has a complete unix path to the binary
40679   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40680     # Keep paths in /bin as-is, but remove trailing .exe if any
40681     new_path="${new_path/%.exe/}"
40682     # Do not save /bin paths to all_fixpath_prefixes!
40683   else
40684     # Not in mixed or Windows style, start by that.
40685     new_path=`cmd //c echo $new_path`
40686 
40687   input_path="$new_path"
40688   # Check if we need to convert this using DOS-style short mode. If the path
40689   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40690   # take no chances and rewrite it.
40691   # Note: m4 eats our [], so we need to use [ and ] instead.
40692   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40693   if test "x$has_forbidden_chars" != x; then
40694     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40695     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40696   fi
40697 
40698     # Output is in $new_path
40699 
40700   windows_path="$new_path"
40701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40702     unix_path=`$CYGPATH -u "$windows_path"`
40703     new_path="$unix_path"
40704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40705     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40706     new_path="$unix_path"
40707   fi
40708 
40709     # remove trailing .exe if any
40710     new_path="${new_path/%.exe/}"
40711 
40712     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40713     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40714   fi
40715 
40716     else
40717       # We're on a unix platform. Hooray! :)
40718       # First separate the path from the arguments. This will split at the first
40719       # space.
40720       complete="$STRIP"
40721       path="${complete%% *}"
40722       tmp="$complete EOL"
40723       arguments="${tmp#* }"
40724 
40725       # Cannot rely on the command "which" here since it doesn't always work.
40726       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40727       if test -z "$is_absolute_path"; then
40728         # Path to executable is not absolute. Find it.
40729         IFS_save="$IFS"
40730         IFS=:
40731         for p in $PATH; do
40732           if test -f "$p/$path" && test -x "$p/$path"; then
40733             new_path="$p/$path"
40734             break
40735           fi
40736         done
40737         IFS="$IFS_save"
40738       else
40739         # This is an absolute path, we can use it without further modifications.
40740         new_path="$path"
40741       fi
40742 
40743       if test "x$new_path" = x; then
40744         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40745 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40746         has_space=`$ECHO "$complete" | $GREP " "`
40747         if test "x$has_space" != x; then
40748           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40749 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40750         fi
40751         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40752       fi
40753     fi
40754 
40755     # Now join together the path and the arguments once again
40756     if test "x$arguments" != xEOL; then
40757       new_complete="$new_path ${arguments% *}"
40758     else
40759       new_complete="$new_path"
40760     fi
40761 
40762     if test "x$complete" != "x$new_complete"; then
40763       STRIP="$new_complete"
40764       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40765 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40766     fi
40767   fi
40768 
40769     if test "x$TOOLCHAIN_TYPE" = xgcc; then
40770 
40771 
40772   # Publish this variable in the help.
40773 
40774 
40775   if [ -z "${NM+x}" ]; then
40776     # The variable is not set by user, try to locate tool using the code snippet
40777     if test -n "$ac_tool_prefix"; then
40778   for ac_prog in nm gcc-nm
40779   do
40780     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40781 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40783 $as_echo_n "checking for $ac_word... " >&6; }
40784 if ${ac_cv_prog_NM+:} false; then :
40785   $as_echo_n "(cached) " >&6
40786 else
40787   if test -n "$NM"; then
40788   ac_cv_prog_NM="$NM" # Let the user override the test.
40789 else
40790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40791 for as_dir in $PATH
40792 do
40793   IFS=$as_save_IFS
40794   test -z "$as_dir" && as_dir=.
40795     for ac_exec_ext in '' $ac_executable_extensions; do
40796   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40797     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40798     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40799     break 2
40800   fi
40801 done
40802   done
40803 IFS=$as_save_IFS
40804 
40805 fi
40806 fi
40807 NM=$ac_cv_prog_NM
40808 if test -n "$NM"; then
40809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40810 $as_echo "$NM" >&6; }
40811 else
40812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40813 $as_echo "no" >&6; }
40814 fi
40815 
40816 
40817     test -n "$NM" && break
40818   done
40819 fi
40820 if test -z "$NM"; then
40821   ac_ct_NM=$NM
40822   for ac_prog in nm gcc-nm
40823 do
40824   # Extract the first word of "$ac_prog", so it can be a program name with args.
40825 set dummy $ac_prog; ac_word=$2
40826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40827 $as_echo_n "checking for $ac_word... " >&6; }
40828 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40829   $as_echo_n "(cached) " >&6
40830 else
40831   if test -n "$ac_ct_NM"; then
40832   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40833 else
40834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40835 for as_dir in $PATH
40836 do
40837   IFS=$as_save_IFS
40838   test -z "$as_dir" && as_dir=.
40839     for ac_exec_ext in '' $ac_executable_extensions; do
40840   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40841     ac_cv_prog_ac_ct_NM="$ac_prog"
40842     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40843     break 2
40844   fi
40845 done
40846   done
40847 IFS=$as_save_IFS
40848 
40849 fi
40850 fi
40851 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40852 if test -n "$ac_ct_NM"; then
40853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40854 $as_echo "$ac_ct_NM" >&6; }
40855 else
40856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40857 $as_echo "no" >&6; }
40858 fi
40859 
40860 
40861   test -n "$ac_ct_NM" && break
40862 done
40863 
40864   if test "x$ac_ct_NM" = x; then
40865     NM=""
40866   else
40867     case $cross_compiling:$ac_tool_warned in
40868 yes:)
40869 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40870 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40871 ac_tool_warned=yes ;;
40872 esac
40873     NM=$ac_ct_NM
40874   fi
40875 fi
40876 
40877   else
40878     # The variable is set, but is it from the command line or the environment?
40879 
40880     # Try to remove the string !NM! from our list.
40881     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40882     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40883       # If it failed, the variable was not from the command line. Ignore it,
40884       # but warn the user (except for BASH, which is always set by the calling BASH).
40885       if test "xNM" != xBASH; then
40886         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40887 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40888       fi
40889       # Try to locate tool using the code snippet
40890       if test -n "$ac_tool_prefix"; then
40891   for ac_prog in nm gcc-nm
40892   do
40893     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40894 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40896 $as_echo_n "checking for $ac_word... " >&6; }
40897 if ${ac_cv_prog_NM+:} false; then :
40898   $as_echo_n "(cached) " >&6
40899 else
40900   if test -n "$NM"; then
40901   ac_cv_prog_NM="$NM" # Let the user override the test.
40902 else
40903 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40904 for as_dir in $PATH
40905 do
40906   IFS=$as_save_IFS
40907   test -z "$as_dir" && as_dir=.
40908     for ac_exec_ext in '' $ac_executable_extensions; do
40909   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40910     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40911     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40912     break 2
40913   fi
40914 done
40915   done
40916 IFS=$as_save_IFS
40917 
40918 fi
40919 fi
40920 NM=$ac_cv_prog_NM
40921 if test -n "$NM"; then
40922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40923 $as_echo "$NM" >&6; }
40924 else
40925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40926 $as_echo "no" >&6; }
40927 fi
40928 
40929 
40930     test -n "$NM" && break
40931   done
40932 fi
40933 if test -z "$NM"; then
40934   ac_ct_NM=$NM
40935   for ac_prog in nm gcc-nm
40936 do
40937   # Extract the first word of "$ac_prog", so it can be a program name with args.
40938 set dummy $ac_prog; ac_word=$2
40939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40940 $as_echo_n "checking for $ac_word... " >&6; }
40941 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40942   $as_echo_n "(cached) " >&6
40943 else
40944   if test -n "$ac_ct_NM"; then
40945   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40946 else
40947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40948 for as_dir in $PATH
40949 do
40950   IFS=$as_save_IFS
40951   test -z "$as_dir" && as_dir=.
40952     for ac_exec_ext in '' $ac_executable_extensions; do
40953   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40954     ac_cv_prog_ac_ct_NM="$ac_prog"
40955     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40956     break 2
40957   fi
40958 done
40959   done
40960 IFS=$as_save_IFS
40961 
40962 fi
40963 fi
40964 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40965 if test -n "$ac_ct_NM"; then
40966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40967 $as_echo "$ac_ct_NM" >&6; }
40968 else
40969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40970 $as_echo "no" >&6; }
40971 fi
40972 
40973 
40974   test -n "$ac_ct_NM" && break
40975 done
40976 
40977   if test "x$ac_ct_NM" = x; then
40978     NM=""
40979   else
40980     case $cross_compiling:$ac_tool_warned in
40981 yes:)
40982 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40983 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40984 ac_tool_warned=yes ;;
40985 esac
40986     NM=$ac_ct_NM
40987   fi
40988 fi
40989 
40990     else
40991       # If it succeeded, then it was overridden by the user. We will use it
40992       # for the tool.
40993 
40994       # First remove it from the list of overridden variables, so we can test
40995       # for unknown variables in the end.
40996       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40997 
40998       # Check if we try to supply an empty value
40999       if test "x$NM" = x; then
41000         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41001 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41002         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41003 $as_echo_n "checking for NM... " >&6; }
41004         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41005 $as_echo "disabled" >&6; }
41006       else
41007         # Check if the provided tool contains a complete path.
41008         tool_specified="$NM"
41009         tool_basename="${tool_specified##*/}"
41010         if test "x$tool_basename" = "x$tool_specified"; then
41011           # A command without a complete path is provided, search $PATH.
41012           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41013 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41014           # Extract the first word of "$tool_basename", so it can be a program name with args.
41015 set dummy $tool_basename; ac_word=$2
41016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41017 $as_echo_n "checking for $ac_word... " >&6; }
41018 if ${ac_cv_path_NM+:} false; then :
41019   $as_echo_n "(cached) " >&6
41020 else
41021   case $NM in
41022   [\\/]* | ?:[\\/]*)
41023   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41024   ;;
41025   *)
41026   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41027 for as_dir in $PATH
41028 do
41029   IFS=$as_save_IFS
41030   test -z "$as_dir" && as_dir=.
41031     for ac_exec_ext in '' $ac_executable_extensions; do
41032   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41033     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41034     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41035     break 2
41036   fi
41037 done
41038   done
41039 IFS=$as_save_IFS
41040 
41041   ;;
41042 esac
41043 fi
41044 NM=$ac_cv_path_NM
41045 if test -n "$NM"; then
41046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41047 $as_echo "$NM" >&6; }
41048 else
41049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41050 $as_echo "no" >&6; }
41051 fi
41052 
41053 
41054           if test "x$NM" = x; then
41055             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41056           fi
41057         else
41058           # Otherwise we believe it is a complete path. Use it as it is.
41059           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41060 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41061           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41062 $as_echo_n "checking for NM... " >&6; }
41063           if test ! -x "$tool_specified"; then
41064             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41065 $as_echo "not found" >&6; }
41066             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41067           fi
41068           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41069 $as_echo "$tool_specified" >&6; }
41070         fi
41071       fi
41072     fi
41073 
41074   fi
41075 
41076 
41077     else
41078 
41079 
41080   # Publish this variable in the help.
41081 
41082 
41083   if [ -z "${NM+x}" ]; then
41084     # The variable is not set by user, try to locate tool using the code snippet
41085     if test -n "$ac_tool_prefix"; then
41086   for ac_prog in nm
41087   do
41088     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41089 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41091 $as_echo_n "checking for $ac_word... " >&6; }
41092 if ${ac_cv_prog_NM+:} false; then :
41093   $as_echo_n "(cached) " >&6
41094 else
41095   if test -n "$NM"; then
41096   ac_cv_prog_NM="$NM" # Let the user override the test.
41097 else
41098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41099 for as_dir in $PATH
41100 do
41101   IFS=$as_save_IFS
41102   test -z "$as_dir" && as_dir=.
41103     for ac_exec_ext in '' $ac_executable_extensions; do
41104   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41105     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41106     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41107     break 2
41108   fi
41109 done
41110   done
41111 IFS=$as_save_IFS
41112 
41113 fi
41114 fi
41115 NM=$ac_cv_prog_NM
41116 if test -n "$NM"; then
41117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41118 $as_echo "$NM" >&6; }
41119 else
41120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41121 $as_echo "no" >&6; }
41122 fi
41123 
41124 
41125     test -n "$NM" && break
41126   done
41127 fi
41128 if test -z "$NM"; then
41129   ac_ct_NM=$NM
41130   for ac_prog in nm
41131 do
41132   # Extract the first word of "$ac_prog", so it can be a program name with args.
41133 set dummy $ac_prog; ac_word=$2
41134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41135 $as_echo_n "checking for $ac_word... " >&6; }
41136 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41137   $as_echo_n "(cached) " >&6
41138 else
41139   if test -n "$ac_ct_NM"; then
41140   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41141 else
41142 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41143 for as_dir in $PATH
41144 do
41145   IFS=$as_save_IFS
41146   test -z "$as_dir" && as_dir=.
41147     for ac_exec_ext in '' $ac_executable_extensions; do
41148   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41149     ac_cv_prog_ac_ct_NM="$ac_prog"
41150     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41151     break 2
41152   fi
41153 done
41154   done
41155 IFS=$as_save_IFS
41156 
41157 fi
41158 fi
41159 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41160 if test -n "$ac_ct_NM"; then
41161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41162 $as_echo "$ac_ct_NM" >&6; }
41163 else
41164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41165 $as_echo "no" >&6; }
41166 fi
41167 
41168 
41169   test -n "$ac_ct_NM" && break
41170 done
41171 
41172   if test "x$ac_ct_NM" = x; then
41173     NM=""
41174   else
41175     case $cross_compiling:$ac_tool_warned in
41176 yes:)
41177 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41178 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41179 ac_tool_warned=yes ;;
41180 esac
41181     NM=$ac_ct_NM
41182   fi
41183 fi
41184 
41185   else
41186     # The variable is set, but is it from the command line or the environment?
41187 
41188     # Try to remove the string !NM! from our list.
41189     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41190     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41191       # If it failed, the variable was not from the command line. Ignore it,
41192       # but warn the user (except for BASH, which is always set by the calling BASH).
41193       if test "xNM" != xBASH; then
41194         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41195 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41196       fi
41197       # Try to locate tool using the code snippet
41198       if test -n "$ac_tool_prefix"; then
41199   for ac_prog in nm
41200   do
41201     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41202 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41204 $as_echo_n "checking for $ac_word... " >&6; }
41205 if ${ac_cv_prog_NM+:} false; then :
41206   $as_echo_n "(cached) " >&6
41207 else
41208   if test -n "$NM"; then
41209   ac_cv_prog_NM="$NM" # Let the user override the test.
41210 else
41211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41212 for as_dir in $PATH
41213 do
41214   IFS=$as_save_IFS
41215   test -z "$as_dir" && as_dir=.
41216     for ac_exec_ext in '' $ac_executable_extensions; do
41217   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41218     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41219     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41220     break 2
41221   fi
41222 done
41223   done
41224 IFS=$as_save_IFS
41225 
41226 fi
41227 fi
41228 NM=$ac_cv_prog_NM
41229 if test -n "$NM"; then
41230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41231 $as_echo "$NM" >&6; }
41232 else
41233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41234 $as_echo "no" >&6; }
41235 fi
41236 
41237 
41238     test -n "$NM" && break
41239   done
41240 fi
41241 if test -z "$NM"; then
41242   ac_ct_NM=$NM
41243   for ac_prog in nm
41244 do
41245   # Extract the first word of "$ac_prog", so it can be a program name with args.
41246 set dummy $ac_prog; ac_word=$2
41247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41248 $as_echo_n "checking for $ac_word... " >&6; }
41249 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41250   $as_echo_n "(cached) " >&6
41251 else
41252   if test -n "$ac_ct_NM"; then
41253   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41254 else
41255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41256 for as_dir in $PATH
41257 do
41258   IFS=$as_save_IFS
41259   test -z "$as_dir" && as_dir=.
41260     for ac_exec_ext in '' $ac_executable_extensions; do
41261   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41262     ac_cv_prog_ac_ct_NM="$ac_prog"
41263     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41264     break 2
41265   fi
41266 done
41267   done
41268 IFS=$as_save_IFS
41269 
41270 fi
41271 fi
41272 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41273 if test -n "$ac_ct_NM"; then
41274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41275 $as_echo "$ac_ct_NM" >&6; }
41276 else
41277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41278 $as_echo "no" >&6; }
41279 fi
41280 
41281 
41282   test -n "$ac_ct_NM" && break
41283 done
41284 
41285   if test "x$ac_ct_NM" = x; then
41286     NM=""
41287   else
41288     case $cross_compiling:$ac_tool_warned in
41289 yes:)
41290 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41291 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41292 ac_tool_warned=yes ;;
41293 esac
41294     NM=$ac_ct_NM
41295   fi
41296 fi
41297 
41298     else
41299       # If it succeeded, then it was overridden by the user. We will use it
41300       # for the tool.
41301 
41302       # First remove it from the list of overridden variables, so we can test
41303       # for unknown variables in the end.
41304       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41305 
41306       # Check if we try to supply an empty value
41307       if test "x$NM" = x; then
41308         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41309 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41310         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41311 $as_echo_n "checking for NM... " >&6; }
41312         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41313 $as_echo "disabled" >&6; }
41314       else
41315         # Check if the provided tool contains a complete path.
41316         tool_specified="$NM"
41317         tool_basename="${tool_specified##*/}"
41318         if test "x$tool_basename" = "x$tool_specified"; then
41319           # A command without a complete path is provided, search $PATH.
41320           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41321 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41322           # Extract the first word of "$tool_basename", so it can be a program name with args.
41323 set dummy $tool_basename; ac_word=$2
41324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41325 $as_echo_n "checking for $ac_word... " >&6; }
41326 if ${ac_cv_path_NM+:} false; then :
41327   $as_echo_n "(cached) " >&6
41328 else
41329   case $NM in
41330   [\\/]* | ?:[\\/]*)
41331   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41332   ;;
41333   *)
41334   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41335 for as_dir in $PATH
41336 do
41337   IFS=$as_save_IFS
41338   test -z "$as_dir" && as_dir=.
41339     for ac_exec_ext in '' $ac_executable_extensions; do
41340   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41341     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41342     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41343     break 2
41344   fi
41345 done
41346   done
41347 IFS=$as_save_IFS
41348 
41349   ;;
41350 esac
41351 fi
41352 NM=$ac_cv_path_NM
41353 if test -n "$NM"; then
41354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41355 $as_echo "$NM" >&6; }
41356 else
41357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41358 $as_echo "no" >&6; }
41359 fi
41360 
41361 
41362           if test "x$NM" = x; then
41363             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41364           fi
41365         else
41366           # Otherwise we believe it is a complete path. Use it as it is.
41367           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41368 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41369           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41370 $as_echo_n "checking for NM... " >&6; }
41371           if test ! -x "$tool_specified"; then
41372             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41373 $as_echo "not found" >&6; }
41374             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41375           fi
41376           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41377 $as_echo "$tool_specified" >&6; }
41378         fi
41379       fi
41380     fi
41381 
41382   fi
41383 
41384 
41385     fi
41386 
41387   # Only process if variable expands to non-empty
41388 
41389   if test "x$NM" != x; then
41390     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41391 
41392   # First separate the path from the arguments. This will split at the first
41393   # space.
41394   complete="$NM"
41395   path="${complete%% *}"
41396   tmp="$complete EOL"
41397   arguments="${tmp#* }"
41398 
41399   # Input might be given as Windows format, start by converting to
41400   # unix format.
41401   new_path=`$CYGPATH -u "$path"`
41402 
41403   # Now try to locate executable using which
41404   new_path=`$WHICH "$new_path" 2> /dev/null`
41405   # bat and cmd files are not always considered executable in cygwin causing which
41406   # to not find them
41407   if test "x$new_path" = x \
41408       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41409       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41410     new_path=`$CYGPATH -u "$path"`
41411   fi
41412   if test "x$new_path" = x; then
41413     # Oops. Which didn't find the executable.
41414     # The splitting of arguments from the executable at a space might have been incorrect,
41415     # since paths with space are more likely in Windows. Give it another try with the whole
41416     # argument.
41417     path="$complete"
41418     arguments="EOL"
41419     new_path=`$CYGPATH -u "$path"`
41420     new_path=`$WHICH "$new_path" 2> /dev/null`
41421     # bat and cmd files are not always considered executable in cygwin causing which
41422     # to not find them
41423     if test "x$new_path" = x \
41424         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41425         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41426       new_path=`$CYGPATH -u "$path"`
41427     fi
41428     if test "x$new_path" = x; then
41429       # It's still not found. Now this is an unrecoverable error.
41430       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41431 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41432       has_space=`$ECHO "$complete" | $GREP " "`
41433       if test "x$has_space" != x; then
41434         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41435 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41436       fi
41437       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41438     fi
41439   fi
41440 
41441   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41442   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41443   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41444   # "foo.exe" is OK but "foo" is an error.
41445   #
41446   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41447   # It is also a way to make sure we got the proper file name for the real test later on.
41448   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41449   if test "x$test_shortpath" = x; then
41450     # Short path failed, file does not exist as specified.
41451     # Try adding .exe or .cmd
41452     if test -f "${new_path}.exe"; then
41453       input_to_shortpath="${new_path}.exe"
41454     elif test -f "${new_path}.cmd"; then
41455       input_to_shortpath="${new_path}.cmd"
41456     else
41457       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41458 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41459       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41460 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41461       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41462     fi
41463   else
41464     input_to_shortpath="$new_path"
41465   fi
41466 
41467   # Call helper function which possibly converts this using DOS-style short mode.
41468   # If so, the updated path is stored in $new_path.
41469   new_path="$input_to_shortpath"
41470 
41471   input_path="$input_to_shortpath"
41472   # Check if we need to convert this using DOS-style short mode. If the path
41473   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41474   # take no chances and rewrite it.
41475   # Note: m4 eats our [], so we need to use [ and ] instead.
41476   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41477   if test "x$has_forbidden_chars" != x; then
41478     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41479     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41480     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41481     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41482       # Going to short mode and back again did indeed matter. Since short mode is
41483       # case insensitive, let's make it lowercase to improve readability.
41484       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41485       # Now convert it back to Unix-style (cygpath)
41486       input_path=`$CYGPATH -u "$shortmode_path"`
41487       new_path="$input_path"
41488     fi
41489   fi
41490 
41491   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41492   if test "x$test_cygdrive_prefix" = x; then
41493     # As a simple fix, exclude /usr/bin since it's not a real path.
41494     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41495       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41496       # a path prefixed by /cygdrive for fixpath to work.
41497       new_path="$CYGWIN_ROOT_PATH$input_path"
41498     fi
41499   fi
41500 
41501   # remove trailing .exe if any
41502   new_path="${new_path/%.exe/}"
41503 
41504     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41505 
41506   # First separate the path from the arguments. This will split at the first
41507   # space.
41508   complete="$NM"
41509   path="${complete%% *}"
41510   tmp="$complete EOL"
41511   arguments="${tmp#* }"
41512 
41513   # Input might be given as Windows format, start by converting to
41514   # unix format.
41515   new_path="$path"
41516 
41517   windows_path="$new_path"
41518   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41519     unix_path=`$CYGPATH -u "$windows_path"`
41520     new_path="$unix_path"
41521   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41522     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41523     new_path="$unix_path"
41524   fi
41525 
41526 
41527   # Now try to locate executable using which
41528   new_path=`$WHICH "$new_path" 2> /dev/null`
41529 
41530   if test "x$new_path" = x; then
41531     # Oops. Which didn't find the executable.
41532     # The splitting of arguments from the executable at a space might have been incorrect,
41533     # since paths with space are more likely in Windows. Give it another try with the whole
41534     # argument.
41535     path="$complete"
41536     arguments="EOL"
41537     new_path="$path"
41538 
41539   windows_path="$new_path"
41540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41541     unix_path=`$CYGPATH -u "$windows_path"`
41542     new_path="$unix_path"
41543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41544     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41545     new_path="$unix_path"
41546   fi
41547 
41548 
41549     new_path=`$WHICH "$new_path" 2> /dev/null`
41550     # bat and cmd files are not always considered executable in MSYS causing which
41551     # to not find them
41552     if test "x$new_path" = x \
41553         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41554         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41555       new_path="$path"
41556 
41557   windows_path="$new_path"
41558   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41559     unix_path=`$CYGPATH -u "$windows_path"`
41560     new_path="$unix_path"
41561   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41562     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41563     new_path="$unix_path"
41564   fi
41565 
41566     fi
41567 
41568     if test "x$new_path" = x; then
41569       # It's still not found. Now this is an unrecoverable error.
41570       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41571 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41572       has_space=`$ECHO "$complete" | $GREP " "`
41573       if test "x$has_space" != x; then
41574         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41575 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41576       fi
41577       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41578     fi
41579   fi
41580 
41581   # Now new_path has a complete unix path to the binary
41582   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41583     # Keep paths in /bin as-is, but remove trailing .exe if any
41584     new_path="${new_path/%.exe/}"
41585     # Do not save /bin paths to all_fixpath_prefixes!
41586   else
41587     # Not in mixed or Windows style, start by that.
41588     new_path=`cmd //c echo $new_path`
41589 
41590   input_path="$new_path"
41591   # Check if we need to convert this using DOS-style short mode. If the path
41592   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41593   # take no chances and rewrite it.
41594   # Note: m4 eats our [], so we need to use [ and ] instead.
41595   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41596   if test "x$has_forbidden_chars" != x; then
41597     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41598     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41599   fi
41600 
41601     # Output is in $new_path
41602 
41603   windows_path="$new_path"
41604   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41605     unix_path=`$CYGPATH -u "$windows_path"`
41606     new_path="$unix_path"
41607   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41608     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41609     new_path="$unix_path"
41610   fi
41611 
41612     # remove trailing .exe if any
41613     new_path="${new_path/%.exe/}"
41614 
41615     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41616     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41617   fi
41618 
41619     else
41620       # We're on a unix platform. Hooray! :)
41621       # First separate the path from the arguments. This will split at the first
41622       # space.
41623       complete="$NM"
41624       path="${complete%% *}"
41625       tmp="$complete EOL"
41626       arguments="${tmp#* }"
41627 
41628       # Cannot rely on the command "which" here since it doesn't always work.
41629       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41630       if test -z "$is_absolute_path"; then
41631         # Path to executable is not absolute. Find it.
41632         IFS_save="$IFS"
41633         IFS=:
41634         for p in $PATH; do
41635           if test -f "$p/$path" && test -x "$p/$path"; then
41636             new_path="$p/$path"
41637             break
41638           fi
41639         done
41640         IFS="$IFS_save"
41641       else
41642         # This is an absolute path, we can use it without further modifications.
41643         new_path="$path"
41644       fi
41645 
41646       if test "x$new_path" = x; then
41647         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41648 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41649         has_space=`$ECHO "$complete" | $GREP " "`
41650         if test "x$has_space" != x; then
41651           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41652 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41653         fi
41654         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41655       fi
41656     fi
41657 
41658     # Now join together the path and the arguments once again
41659     if test "x$arguments" != xEOL; then
41660       new_complete="$new_path ${arguments% *}"
41661     else
41662       new_complete="$new_path"
41663     fi
41664 
41665     if test "x$complete" != "x$new_complete"; then
41666       NM="$new_complete"
41667       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41668 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41669     fi
41670   fi
41671 
41672     GNM="$NM"
41673 
41674   fi
41675 
41676   # objcopy is used for moving debug symbols to separate files when
41677   # full debug symbols are enabled.
41678   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
41679 
41680 
41681   # Publish this variable in the help.
41682 
41683 
41684   if [ -z "${OBJCOPY+x}" ]; then
41685     # The variable is not set by user, try to locate tool using the code snippet
41686     if test -n "$ac_tool_prefix"; then
41687   for ac_prog in gobjcopy objcopy
41688   do
41689     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41690 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41692 $as_echo_n "checking for $ac_word... " >&6; }
41693 if ${ac_cv_prog_OBJCOPY+:} false; then :
41694   $as_echo_n "(cached) " >&6
41695 else
41696   if test -n "$OBJCOPY"; then
41697   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41698 else
41699 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41700 for as_dir in $PATH
41701 do
41702   IFS=$as_save_IFS
41703   test -z "$as_dir" && as_dir=.
41704     for ac_exec_ext in '' $ac_executable_extensions; do
41705   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41706     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41707     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41708     break 2
41709   fi
41710 done
41711   done
41712 IFS=$as_save_IFS
41713 
41714 fi
41715 fi
41716 OBJCOPY=$ac_cv_prog_OBJCOPY
41717 if test -n "$OBJCOPY"; then
41718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41719 $as_echo "$OBJCOPY" >&6; }
41720 else
41721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41722 $as_echo "no" >&6; }
41723 fi
41724 
41725 
41726     test -n "$OBJCOPY" && break
41727   done
41728 fi
41729 if test -z "$OBJCOPY"; then
41730   ac_ct_OBJCOPY=$OBJCOPY
41731   for ac_prog in gobjcopy objcopy
41732 do
41733   # Extract the first word of "$ac_prog", so it can be a program name with args.
41734 set dummy $ac_prog; ac_word=$2
41735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41736 $as_echo_n "checking for $ac_word... " >&6; }
41737 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41738   $as_echo_n "(cached) " >&6
41739 else
41740   if test -n "$ac_ct_OBJCOPY"; then
41741   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41742 else
41743 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41744 for as_dir in $PATH
41745 do
41746   IFS=$as_save_IFS
41747   test -z "$as_dir" && as_dir=.
41748     for ac_exec_ext in '' $ac_executable_extensions; do
41749   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41750     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41751     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41752     break 2
41753   fi
41754 done
41755   done
41756 IFS=$as_save_IFS
41757 
41758 fi
41759 fi
41760 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41761 if test -n "$ac_ct_OBJCOPY"; then
41762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41763 $as_echo "$ac_ct_OBJCOPY" >&6; }
41764 else
41765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41766 $as_echo "no" >&6; }
41767 fi
41768 
41769 
41770   test -n "$ac_ct_OBJCOPY" && break
41771 done
41772 
41773   if test "x$ac_ct_OBJCOPY" = x; then
41774     OBJCOPY=""
41775   else
41776     case $cross_compiling:$ac_tool_warned in
41777 yes:)
41778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41779 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41780 ac_tool_warned=yes ;;
41781 esac
41782     OBJCOPY=$ac_ct_OBJCOPY
41783   fi
41784 fi
41785 
41786   else
41787     # The variable is set, but is it from the command line or the environment?
41788 
41789     # Try to remove the string !OBJCOPY! from our list.
41790     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41791     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41792       # If it failed, the variable was not from the command line. Ignore it,
41793       # but warn the user (except for BASH, which is always set by the calling BASH).
41794       if test "xOBJCOPY" != xBASH; then
41795         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41796 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41797       fi
41798       # Try to locate tool using the code snippet
41799       if test -n "$ac_tool_prefix"; then
41800   for ac_prog in gobjcopy objcopy
41801   do
41802     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41803 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41805 $as_echo_n "checking for $ac_word... " >&6; }
41806 if ${ac_cv_prog_OBJCOPY+:} false; then :
41807   $as_echo_n "(cached) " >&6
41808 else
41809   if test -n "$OBJCOPY"; then
41810   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41811 else
41812 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41813 for as_dir in $PATH
41814 do
41815   IFS=$as_save_IFS
41816   test -z "$as_dir" && as_dir=.
41817     for ac_exec_ext in '' $ac_executable_extensions; do
41818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41819     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41821     break 2
41822   fi
41823 done
41824   done
41825 IFS=$as_save_IFS
41826 
41827 fi
41828 fi
41829 OBJCOPY=$ac_cv_prog_OBJCOPY
41830 if test -n "$OBJCOPY"; then
41831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41832 $as_echo "$OBJCOPY" >&6; }
41833 else
41834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41835 $as_echo "no" >&6; }
41836 fi
41837 
41838 
41839     test -n "$OBJCOPY" && break
41840   done
41841 fi
41842 if test -z "$OBJCOPY"; then
41843   ac_ct_OBJCOPY=$OBJCOPY
41844   for ac_prog in gobjcopy objcopy
41845 do
41846   # Extract the first word of "$ac_prog", so it can be a program name with args.
41847 set dummy $ac_prog; ac_word=$2
41848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41849 $as_echo_n "checking for $ac_word... " >&6; }
41850 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41851   $as_echo_n "(cached) " >&6
41852 else
41853   if test -n "$ac_ct_OBJCOPY"; then
41854   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41855 else
41856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41857 for as_dir in $PATH
41858 do
41859   IFS=$as_save_IFS
41860   test -z "$as_dir" && as_dir=.
41861     for ac_exec_ext in '' $ac_executable_extensions; do
41862   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41863     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41864     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41865     break 2
41866   fi
41867 done
41868   done
41869 IFS=$as_save_IFS
41870 
41871 fi
41872 fi
41873 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41874 if test -n "$ac_ct_OBJCOPY"; then
41875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41876 $as_echo "$ac_ct_OBJCOPY" >&6; }
41877 else
41878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41879 $as_echo "no" >&6; }
41880 fi
41881 
41882 
41883   test -n "$ac_ct_OBJCOPY" && break
41884 done
41885 
41886   if test "x$ac_ct_OBJCOPY" = x; then
41887     OBJCOPY=""
41888   else
41889     case $cross_compiling:$ac_tool_warned in
41890 yes:)
41891 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41892 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41893 ac_tool_warned=yes ;;
41894 esac
41895     OBJCOPY=$ac_ct_OBJCOPY
41896   fi
41897 fi
41898 
41899     else
41900       # If it succeeded, then it was overridden by the user. We will use it
41901       # for the tool.
41902 
41903       # First remove it from the list of overridden variables, so we can test
41904       # for unknown variables in the end.
41905       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41906 
41907       # Check if we try to supply an empty value
41908       if test "x$OBJCOPY" = x; then
41909         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41910 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41911         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41912 $as_echo_n "checking for OBJCOPY... " >&6; }
41913         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41914 $as_echo "disabled" >&6; }
41915       else
41916         # Check if the provided tool contains a complete path.
41917         tool_specified="$OBJCOPY"
41918         tool_basename="${tool_specified##*/}"
41919         if test "x$tool_basename" = "x$tool_specified"; then
41920           # A command without a complete path is provided, search $PATH.
41921           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
41922 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
41923           # Extract the first word of "$tool_basename", so it can be a program name with args.
41924 set dummy $tool_basename; ac_word=$2
41925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41926 $as_echo_n "checking for $ac_word... " >&6; }
41927 if ${ac_cv_path_OBJCOPY+:} false; then :
41928   $as_echo_n "(cached) " >&6
41929 else
41930   case $OBJCOPY in
41931   [\\/]* | ?:[\\/]*)
41932   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
41933   ;;
41934   *)
41935   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41936 for as_dir in $PATH
41937 do
41938   IFS=$as_save_IFS
41939   test -z "$as_dir" && as_dir=.
41940     for ac_exec_ext in '' $ac_executable_extensions; do
41941   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41942     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
41943     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41944     break 2
41945   fi
41946 done
41947   done
41948 IFS=$as_save_IFS
41949 
41950   ;;
41951 esac
41952 fi
41953 OBJCOPY=$ac_cv_path_OBJCOPY
41954 if test -n "$OBJCOPY"; then
41955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41956 $as_echo "$OBJCOPY" >&6; }
41957 else
41958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41959 $as_echo "no" >&6; }
41960 fi
41961 
41962 
41963           if test "x$OBJCOPY" = x; then
41964             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41965           fi
41966         else
41967           # Otherwise we believe it is a complete path. Use it as it is.
41968           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
41969 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
41970           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41971 $as_echo_n "checking for OBJCOPY... " >&6; }
41972           if test ! -x "$tool_specified"; then
41973             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41974 $as_echo "not found" >&6; }
41975             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
41976           fi
41977           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41978 $as_echo "$tool_specified" >&6; }
41979         fi
41980       fi
41981     fi
41982 
41983   fi
41984 
41985 
41986     # Only call fixup if objcopy was found.
41987     if test -n "$OBJCOPY"; then
41988 
41989   # Only process if variable expands to non-empty
41990 
41991   if test "x$OBJCOPY" != x; then
41992     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41993 
41994   # First separate the path from the arguments. This will split at the first
41995   # space.
41996   complete="$OBJCOPY"
41997   path="${complete%% *}"
41998   tmp="$complete EOL"
41999   arguments="${tmp#* }"
42000 
42001   # Input might be given as Windows format, start by converting to
42002   # unix format.
42003   new_path=`$CYGPATH -u "$path"`
42004 
42005   # Now try to locate executable using which
42006   new_path=`$WHICH "$new_path" 2> /dev/null`
42007   # bat and cmd files are not always considered executable in cygwin causing which
42008   # to not find them
42009   if test "x$new_path" = x \
42010       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42011       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42012     new_path=`$CYGPATH -u "$path"`
42013   fi
42014   if test "x$new_path" = x; then
42015     # Oops. Which didn't find the executable.
42016     # The splitting of arguments from the executable at a space might have been incorrect,
42017     # since paths with space are more likely in Windows. Give it another try with the whole
42018     # argument.
42019     path="$complete"
42020     arguments="EOL"
42021     new_path=`$CYGPATH -u "$path"`
42022     new_path=`$WHICH "$new_path" 2> /dev/null`
42023     # bat and cmd files are not always considered executable in cygwin causing which
42024     # to not find them
42025     if test "x$new_path" = x \
42026         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42027         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42028       new_path=`$CYGPATH -u "$path"`
42029     fi
42030     if test "x$new_path" = x; then
42031       # It's still not found. Now this is an unrecoverable error.
42032       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42033 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42034       has_space=`$ECHO "$complete" | $GREP " "`
42035       if test "x$has_space" != x; then
42036         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42037 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42038       fi
42039       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42040     fi
42041   fi
42042 
42043   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42044   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42045   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42046   # "foo.exe" is OK but "foo" is an error.
42047   #
42048   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42049   # It is also a way to make sure we got the proper file name for the real test later on.
42050   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42051   if test "x$test_shortpath" = x; then
42052     # Short path failed, file does not exist as specified.
42053     # Try adding .exe or .cmd
42054     if test -f "${new_path}.exe"; then
42055       input_to_shortpath="${new_path}.exe"
42056     elif test -f "${new_path}.cmd"; then
42057       input_to_shortpath="${new_path}.cmd"
42058     else
42059       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42060 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42061       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42062 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42063       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42064     fi
42065   else
42066     input_to_shortpath="$new_path"
42067   fi
42068 
42069   # Call helper function which possibly converts this using DOS-style short mode.
42070   # If so, the updated path is stored in $new_path.
42071   new_path="$input_to_shortpath"
42072 
42073   input_path="$input_to_shortpath"
42074   # Check if we need to convert this using DOS-style short mode. If the path
42075   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42076   # take no chances and rewrite it.
42077   # Note: m4 eats our [], so we need to use [ and ] instead.
42078   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42079   if test "x$has_forbidden_chars" != x; then
42080     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42081     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42082     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42083     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42084       # Going to short mode and back again did indeed matter. Since short mode is
42085       # case insensitive, let's make it lowercase to improve readability.
42086       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42087       # Now convert it back to Unix-style (cygpath)
42088       input_path=`$CYGPATH -u "$shortmode_path"`
42089       new_path="$input_path"
42090     fi
42091   fi
42092 
42093   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42094   if test "x$test_cygdrive_prefix" = x; then
42095     # As a simple fix, exclude /usr/bin since it's not a real path.
42096     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42097       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42098       # a path prefixed by /cygdrive for fixpath to work.
42099       new_path="$CYGWIN_ROOT_PATH$input_path"
42100     fi
42101   fi
42102 
42103   # remove trailing .exe if any
42104   new_path="${new_path/%.exe/}"
42105 
42106     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42107 
42108   # First separate the path from the arguments. This will split at the first
42109   # space.
42110   complete="$OBJCOPY"
42111   path="${complete%% *}"
42112   tmp="$complete EOL"
42113   arguments="${tmp#* }"
42114 
42115   # Input might be given as Windows format, start by converting to
42116   # unix format.
42117   new_path="$path"
42118 
42119   windows_path="$new_path"
42120   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42121     unix_path=`$CYGPATH -u "$windows_path"`
42122     new_path="$unix_path"
42123   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42124     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42125     new_path="$unix_path"
42126   fi
42127 
42128 
42129   # Now try to locate executable using which
42130   new_path=`$WHICH "$new_path" 2> /dev/null`
42131 
42132   if test "x$new_path" = x; then
42133     # Oops. Which didn't find the executable.
42134     # The splitting of arguments from the executable at a space might have been incorrect,
42135     # since paths with space are more likely in Windows. Give it another try with the whole
42136     # argument.
42137     path="$complete"
42138     arguments="EOL"
42139     new_path="$path"
42140 
42141   windows_path="$new_path"
42142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42143     unix_path=`$CYGPATH -u "$windows_path"`
42144     new_path="$unix_path"
42145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42146     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42147     new_path="$unix_path"
42148   fi
42149 
42150 
42151     new_path=`$WHICH "$new_path" 2> /dev/null`
42152     # bat and cmd files are not always considered executable in MSYS causing which
42153     # to not find them
42154     if test "x$new_path" = x \
42155         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42156         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42157       new_path="$path"
42158 
42159   windows_path="$new_path"
42160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42161     unix_path=`$CYGPATH -u "$windows_path"`
42162     new_path="$unix_path"
42163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42164     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42165     new_path="$unix_path"
42166   fi
42167 
42168     fi
42169 
42170     if test "x$new_path" = x; then
42171       # It's still not found. Now this is an unrecoverable error.
42172       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42173 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42174       has_space=`$ECHO "$complete" | $GREP " "`
42175       if test "x$has_space" != x; then
42176         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42177 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42178       fi
42179       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42180     fi
42181   fi
42182 
42183   # Now new_path has a complete unix path to the binary
42184   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42185     # Keep paths in /bin as-is, but remove trailing .exe if any
42186     new_path="${new_path/%.exe/}"
42187     # Do not save /bin paths to all_fixpath_prefixes!
42188   else
42189     # Not in mixed or Windows style, start by that.
42190     new_path=`cmd //c echo $new_path`
42191 
42192   input_path="$new_path"
42193   # Check if we need to convert this using DOS-style short mode. If the path
42194   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42195   # take no chances and rewrite it.
42196   # Note: m4 eats our [], so we need to use [ and ] instead.
42197   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42198   if test "x$has_forbidden_chars" != x; then
42199     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42200     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42201   fi
42202 
42203     # Output is in $new_path
42204 
42205   windows_path="$new_path"
42206   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42207     unix_path=`$CYGPATH -u "$windows_path"`
42208     new_path="$unix_path"
42209   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42210     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42211     new_path="$unix_path"
42212   fi
42213 
42214     # remove trailing .exe if any
42215     new_path="${new_path/%.exe/}"
42216 
42217     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42218     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42219   fi
42220 
42221     else
42222       # We're on a unix platform. Hooray! :)
42223       # First separate the path from the arguments. This will split at the first
42224       # space.
42225       complete="$OBJCOPY"
42226       path="${complete%% *}"
42227       tmp="$complete EOL"
42228       arguments="${tmp#* }"
42229 
42230       # Cannot rely on the command "which" here since it doesn't always work.
42231       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42232       if test -z "$is_absolute_path"; then
42233         # Path to executable is not absolute. Find it.
42234         IFS_save="$IFS"
42235         IFS=:
42236         for p in $PATH; do
42237           if test -f "$p/$path" && test -x "$p/$path"; then
42238             new_path="$p/$path"
42239             break
42240           fi
42241         done
42242         IFS="$IFS_save"
42243       else
42244         # This is an absolute path, we can use it without further modifications.
42245         new_path="$path"
42246       fi
42247 
42248       if test "x$new_path" = x; then
42249         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42250 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42251         has_space=`$ECHO "$complete" | $GREP " "`
42252         if test "x$has_space" != x; then
42253           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42254 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42255         fi
42256         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42257       fi
42258     fi
42259 
42260     # Now join together the path and the arguments once again
42261     if test "x$arguments" != xEOL; then
42262       new_complete="$new_path ${arguments% *}"
42263     else
42264       new_complete="$new_path"
42265     fi
42266 
42267     if test "x$complete" != "x$new_complete"; then
42268       OBJCOPY="$new_complete"
42269       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42270 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42271     fi
42272   fi
42273 
42274       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42275         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42276         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42277         # - version number is last blank separate word on first line
42278         # - version number formats that have been seen:
42279         #   - <major>.<minor>
42280         #   - <major>.<minor>.<micro>
42281         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42282         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42283          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42284               -e 's/.* //' \
42285               -e '/^[01]\./b bad' \
42286               -e '/^2\./{' \
42287               -e '  s/^2\.//' \
42288               -e '  /^[0-9]$/b bad' \
42289               -e '  /^[0-9]\./b bad' \
42290               -e '  /^1[0-9]$/b bad' \
42291               -e '  /^1[0-9]\./b bad' \
42292               -e '  /^20\./b bad' \
42293               -e '  /^21\.0$/b bad' \
42294               -e '  /^21\.0\./b bad' \
42295               -e '}' \
42296               -e ':good' \
42297               -e 's/.*/VALID_VERSION/p' \
42298               -e 'q' \
42299               -e ':bad' \
42300               -e 's/.*/BAD_VERSION/p' \
42301               -e 'q'`
42302         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42303           OBJCOPY=
42304           { $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
42305 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42306           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42307 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42308           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42309 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42310           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42311 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42312           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42313 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42314         fi
42315       fi
42316     fi
42317   fi
42318 
42319 
42320 
42321   # Publish this variable in the help.
42322 
42323 
42324   if [ -z "${OBJDUMP+x}" ]; then
42325     # The variable is not set by user, try to locate tool using the code snippet
42326     if test -n "$ac_tool_prefix"; then
42327   for ac_prog in gobjdump objdump
42328   do
42329     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42330 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42332 $as_echo_n "checking for $ac_word... " >&6; }
42333 if ${ac_cv_prog_OBJDUMP+:} false; then :
42334   $as_echo_n "(cached) " >&6
42335 else
42336   if test -n "$OBJDUMP"; then
42337   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42338 else
42339 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42340 for as_dir in $PATH
42341 do
42342   IFS=$as_save_IFS
42343   test -z "$as_dir" && as_dir=.
42344     for ac_exec_ext in '' $ac_executable_extensions; do
42345   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42346     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42347     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42348     break 2
42349   fi
42350 done
42351   done
42352 IFS=$as_save_IFS
42353 
42354 fi
42355 fi
42356 OBJDUMP=$ac_cv_prog_OBJDUMP
42357 if test -n "$OBJDUMP"; then
42358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42359 $as_echo "$OBJDUMP" >&6; }
42360 else
42361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42362 $as_echo "no" >&6; }
42363 fi
42364 
42365 
42366     test -n "$OBJDUMP" && break
42367   done
42368 fi
42369 if test -z "$OBJDUMP"; then
42370   ac_ct_OBJDUMP=$OBJDUMP
42371   for ac_prog in gobjdump objdump
42372 do
42373   # Extract the first word of "$ac_prog", so it can be a program name with args.
42374 set dummy $ac_prog; ac_word=$2
42375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42376 $as_echo_n "checking for $ac_word... " >&6; }
42377 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42378   $as_echo_n "(cached) " >&6
42379 else
42380   if test -n "$ac_ct_OBJDUMP"; then
42381   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42382 else
42383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42384 for as_dir in $PATH
42385 do
42386   IFS=$as_save_IFS
42387   test -z "$as_dir" && as_dir=.
42388     for ac_exec_ext in '' $ac_executable_extensions; do
42389   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42390     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42391     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42392     break 2
42393   fi
42394 done
42395   done
42396 IFS=$as_save_IFS
42397 
42398 fi
42399 fi
42400 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42401 if test -n "$ac_ct_OBJDUMP"; then
42402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42403 $as_echo "$ac_ct_OBJDUMP" >&6; }
42404 else
42405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42406 $as_echo "no" >&6; }
42407 fi
42408 
42409 
42410   test -n "$ac_ct_OBJDUMP" && break
42411 done
42412 
42413   if test "x$ac_ct_OBJDUMP" = x; then
42414     OBJDUMP=""
42415   else
42416     case $cross_compiling:$ac_tool_warned in
42417 yes:)
42418 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42419 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42420 ac_tool_warned=yes ;;
42421 esac
42422     OBJDUMP=$ac_ct_OBJDUMP
42423   fi
42424 fi
42425 
42426   else
42427     # The variable is set, but is it from the command line or the environment?
42428 
42429     # Try to remove the string !OBJDUMP! from our list.
42430     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42431     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42432       # If it failed, the variable was not from the command line. Ignore it,
42433       # but warn the user (except for BASH, which is always set by the calling BASH).
42434       if test "xOBJDUMP" != xBASH; then
42435         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42436 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42437       fi
42438       # Try to locate tool using the code snippet
42439       if test -n "$ac_tool_prefix"; then
42440   for ac_prog in gobjdump objdump
42441   do
42442     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42443 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42445 $as_echo_n "checking for $ac_word... " >&6; }
42446 if ${ac_cv_prog_OBJDUMP+:} false; then :
42447   $as_echo_n "(cached) " >&6
42448 else
42449   if test -n "$OBJDUMP"; then
42450   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42451 else
42452 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42453 for as_dir in $PATH
42454 do
42455   IFS=$as_save_IFS
42456   test -z "$as_dir" && as_dir=.
42457     for ac_exec_ext in '' $ac_executable_extensions; do
42458   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42459     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42460     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42461     break 2
42462   fi
42463 done
42464   done
42465 IFS=$as_save_IFS
42466 
42467 fi
42468 fi
42469 OBJDUMP=$ac_cv_prog_OBJDUMP
42470 if test -n "$OBJDUMP"; then
42471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42472 $as_echo "$OBJDUMP" >&6; }
42473 else
42474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42475 $as_echo "no" >&6; }
42476 fi
42477 
42478 
42479     test -n "$OBJDUMP" && break
42480   done
42481 fi
42482 if test -z "$OBJDUMP"; then
42483   ac_ct_OBJDUMP=$OBJDUMP
42484   for ac_prog in gobjdump objdump
42485 do
42486   # Extract the first word of "$ac_prog", so it can be a program name with args.
42487 set dummy $ac_prog; ac_word=$2
42488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42489 $as_echo_n "checking for $ac_word... " >&6; }
42490 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42491   $as_echo_n "(cached) " >&6
42492 else
42493   if test -n "$ac_ct_OBJDUMP"; then
42494   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42495 else
42496 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42497 for as_dir in $PATH
42498 do
42499   IFS=$as_save_IFS
42500   test -z "$as_dir" && as_dir=.
42501     for ac_exec_ext in '' $ac_executable_extensions; do
42502   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42503     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42504     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42505     break 2
42506   fi
42507 done
42508   done
42509 IFS=$as_save_IFS
42510 
42511 fi
42512 fi
42513 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42514 if test -n "$ac_ct_OBJDUMP"; then
42515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42516 $as_echo "$ac_ct_OBJDUMP" >&6; }
42517 else
42518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42519 $as_echo "no" >&6; }
42520 fi
42521 
42522 
42523   test -n "$ac_ct_OBJDUMP" && break
42524 done
42525 
42526   if test "x$ac_ct_OBJDUMP" = x; then
42527     OBJDUMP=""
42528   else
42529     case $cross_compiling:$ac_tool_warned in
42530 yes:)
42531 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42532 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42533 ac_tool_warned=yes ;;
42534 esac
42535     OBJDUMP=$ac_ct_OBJDUMP
42536   fi
42537 fi
42538 
42539     else
42540       # If it succeeded, then it was overridden by the user. We will use it
42541       # for the tool.
42542 
42543       # First remove it from the list of overridden variables, so we can test
42544       # for unknown variables in the end.
42545       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42546 
42547       # Check if we try to supply an empty value
42548       if test "x$OBJDUMP" = x; then
42549         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42550 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42551         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42552 $as_echo_n "checking for OBJDUMP... " >&6; }
42553         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42554 $as_echo "disabled" >&6; }
42555       else
42556         # Check if the provided tool contains a complete path.
42557         tool_specified="$OBJDUMP"
42558         tool_basename="${tool_specified##*/}"
42559         if test "x$tool_basename" = "x$tool_specified"; then
42560           # A command without a complete path is provided, search $PATH.
42561           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42562 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42563           # Extract the first word of "$tool_basename", so it can be a program name with args.
42564 set dummy $tool_basename; ac_word=$2
42565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42566 $as_echo_n "checking for $ac_word... " >&6; }
42567 if ${ac_cv_path_OBJDUMP+:} false; then :
42568   $as_echo_n "(cached) " >&6
42569 else
42570   case $OBJDUMP in
42571   [\\/]* | ?:[\\/]*)
42572   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42573   ;;
42574   *)
42575   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42576 for as_dir in $PATH
42577 do
42578   IFS=$as_save_IFS
42579   test -z "$as_dir" && as_dir=.
42580     for ac_exec_ext in '' $ac_executable_extensions; do
42581   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42582     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42583     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42584     break 2
42585   fi
42586 done
42587   done
42588 IFS=$as_save_IFS
42589 
42590   ;;
42591 esac
42592 fi
42593 OBJDUMP=$ac_cv_path_OBJDUMP
42594 if test -n "$OBJDUMP"; then
42595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42596 $as_echo "$OBJDUMP" >&6; }
42597 else
42598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42599 $as_echo "no" >&6; }
42600 fi
42601 
42602 
42603           if test "x$OBJDUMP" = x; then
42604             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42605           fi
42606         else
42607           # Otherwise we believe it is a complete path. Use it as it is.
42608           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42609 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42610           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42611 $as_echo_n "checking for OBJDUMP... " >&6; }
42612           if test ! -x "$tool_specified"; then
42613             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42614 $as_echo "not found" >&6; }
42615             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42616           fi
42617           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42618 $as_echo "$tool_specified" >&6; }
42619         fi
42620       fi
42621     fi
42622 
42623   fi
42624 
42625 
42626   if test "x$OBJDUMP" != x; then
42627     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42628     # bails if argument is missing.
42629 
42630   # Only process if variable expands to non-empty
42631 
42632   if test "x$OBJDUMP" != x; then
42633     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42634 
42635   # First separate the path from the arguments. This will split at the first
42636   # space.
42637   complete="$OBJDUMP"
42638   path="${complete%% *}"
42639   tmp="$complete EOL"
42640   arguments="${tmp#* }"
42641 
42642   # Input might be given as Windows format, start by converting to
42643   # unix format.
42644   new_path=`$CYGPATH -u "$path"`
42645 
42646   # Now try to locate executable using which
42647   new_path=`$WHICH "$new_path" 2> /dev/null`
42648   # bat and cmd files are not always considered executable in cygwin causing which
42649   # to not find them
42650   if test "x$new_path" = x \
42651       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42652       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42653     new_path=`$CYGPATH -u "$path"`
42654   fi
42655   if test "x$new_path" = x; then
42656     # Oops. Which didn't find the executable.
42657     # The splitting of arguments from the executable at a space might have been incorrect,
42658     # since paths with space are more likely in Windows. Give it another try with the whole
42659     # argument.
42660     path="$complete"
42661     arguments="EOL"
42662     new_path=`$CYGPATH -u "$path"`
42663     new_path=`$WHICH "$new_path" 2> /dev/null`
42664     # bat and cmd files are not always considered executable in cygwin causing which
42665     # to not find them
42666     if test "x$new_path" = x \
42667         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42668         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42669       new_path=`$CYGPATH -u "$path"`
42670     fi
42671     if test "x$new_path" = x; then
42672       # It's still not found. Now this is an unrecoverable error.
42673       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42674 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42675       has_space=`$ECHO "$complete" | $GREP " "`
42676       if test "x$has_space" != x; then
42677         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42678 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42679       fi
42680       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42681     fi
42682   fi
42683 
42684   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42685   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42686   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42687   # "foo.exe" is OK but "foo" is an error.
42688   #
42689   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42690   # It is also a way to make sure we got the proper file name for the real test later on.
42691   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42692   if test "x$test_shortpath" = x; then
42693     # Short path failed, file does not exist as specified.
42694     # Try adding .exe or .cmd
42695     if test -f "${new_path}.exe"; then
42696       input_to_shortpath="${new_path}.exe"
42697     elif test -f "${new_path}.cmd"; then
42698       input_to_shortpath="${new_path}.cmd"
42699     else
42700       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42701 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42702       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42703 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42704       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42705     fi
42706   else
42707     input_to_shortpath="$new_path"
42708   fi
42709 
42710   # Call helper function which possibly converts this using DOS-style short mode.
42711   # If so, the updated path is stored in $new_path.
42712   new_path="$input_to_shortpath"
42713 
42714   input_path="$input_to_shortpath"
42715   # Check if we need to convert this using DOS-style short mode. If the path
42716   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42717   # take no chances and rewrite it.
42718   # Note: m4 eats our [], so we need to use [ and ] instead.
42719   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42720   if test "x$has_forbidden_chars" != x; then
42721     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42722     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42723     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42724     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42725       # Going to short mode and back again did indeed matter. Since short mode is
42726       # case insensitive, let's make it lowercase to improve readability.
42727       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42728       # Now convert it back to Unix-style (cygpath)
42729       input_path=`$CYGPATH -u "$shortmode_path"`
42730       new_path="$input_path"
42731     fi
42732   fi
42733 
42734   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42735   if test "x$test_cygdrive_prefix" = x; then
42736     # As a simple fix, exclude /usr/bin since it's not a real path.
42737     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42738       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42739       # a path prefixed by /cygdrive for fixpath to work.
42740       new_path="$CYGWIN_ROOT_PATH$input_path"
42741     fi
42742   fi
42743 
42744   # remove trailing .exe if any
42745   new_path="${new_path/%.exe/}"
42746 
42747     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42748 
42749   # First separate the path from the arguments. This will split at the first
42750   # space.
42751   complete="$OBJDUMP"
42752   path="${complete%% *}"
42753   tmp="$complete EOL"
42754   arguments="${tmp#* }"
42755 
42756   # Input might be given as Windows format, start by converting to
42757   # unix format.
42758   new_path="$path"
42759 
42760   windows_path="$new_path"
42761   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42762     unix_path=`$CYGPATH -u "$windows_path"`
42763     new_path="$unix_path"
42764   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42765     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42766     new_path="$unix_path"
42767   fi
42768 
42769 
42770   # Now try to locate executable using which
42771   new_path=`$WHICH "$new_path" 2> /dev/null`
42772 
42773   if test "x$new_path" = x; then
42774     # Oops. Which didn't find the executable.
42775     # The splitting of arguments from the executable at a space might have been incorrect,
42776     # since paths with space are more likely in Windows. Give it another try with the whole
42777     # argument.
42778     path="$complete"
42779     arguments="EOL"
42780     new_path="$path"
42781 
42782   windows_path="$new_path"
42783   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42784     unix_path=`$CYGPATH -u "$windows_path"`
42785     new_path="$unix_path"
42786   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42787     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42788     new_path="$unix_path"
42789   fi
42790 
42791 
42792     new_path=`$WHICH "$new_path" 2> /dev/null`
42793     # bat and cmd files are not always considered executable in MSYS causing which
42794     # to not find them
42795     if test "x$new_path" = x \
42796         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42797         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42798       new_path="$path"
42799 
42800   windows_path="$new_path"
42801   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42802     unix_path=`$CYGPATH -u "$windows_path"`
42803     new_path="$unix_path"
42804   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42805     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42806     new_path="$unix_path"
42807   fi
42808 
42809     fi
42810 
42811     if test "x$new_path" = x; then
42812       # It's still not found. Now this is an unrecoverable error.
42813       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42814 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42815       has_space=`$ECHO "$complete" | $GREP " "`
42816       if test "x$has_space" != x; then
42817         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42818 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42819       fi
42820       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42821     fi
42822   fi
42823 
42824   # Now new_path has a complete unix path to the binary
42825   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42826     # Keep paths in /bin as-is, but remove trailing .exe if any
42827     new_path="${new_path/%.exe/}"
42828     # Do not save /bin paths to all_fixpath_prefixes!
42829   else
42830     # Not in mixed or Windows style, start by that.
42831     new_path=`cmd //c echo $new_path`
42832 
42833   input_path="$new_path"
42834   # Check if we need to convert this using DOS-style short mode. If the path
42835   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42836   # take no chances and rewrite it.
42837   # Note: m4 eats our [], so we need to use [ and ] instead.
42838   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42839   if test "x$has_forbidden_chars" != x; then
42840     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42841     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42842   fi
42843 
42844     # Output is in $new_path
42845 
42846   windows_path="$new_path"
42847   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42848     unix_path=`$CYGPATH -u "$windows_path"`
42849     new_path="$unix_path"
42850   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42851     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42852     new_path="$unix_path"
42853   fi
42854 
42855     # remove trailing .exe if any
42856     new_path="${new_path/%.exe/}"
42857 
42858     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42859     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42860   fi
42861 
42862     else
42863       # We're on a unix platform. Hooray! :)
42864       # First separate the path from the arguments. This will split at the first
42865       # space.
42866       complete="$OBJDUMP"
42867       path="${complete%% *}"
42868       tmp="$complete EOL"
42869       arguments="${tmp#* }"
42870 
42871       # Cannot rely on the command "which" here since it doesn't always work.
42872       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42873       if test -z "$is_absolute_path"; then
42874         # Path to executable is not absolute. Find it.
42875         IFS_save="$IFS"
42876         IFS=:
42877         for p in $PATH; do
42878           if test -f "$p/$path" && test -x "$p/$path"; then
42879             new_path="$p/$path"
42880             break
42881           fi
42882         done
42883         IFS="$IFS_save"
42884       else
42885         # This is an absolute path, we can use it without further modifications.
42886         new_path="$path"
42887       fi
42888 
42889       if test "x$new_path" = x; then
42890         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42891 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42892         has_space=`$ECHO "$complete" | $GREP " "`
42893         if test "x$has_space" != x; then
42894           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42895 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42896         fi
42897         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42898       fi
42899     fi
42900 
42901     # Now join together the path and the arguments once again
42902     if test "x$arguments" != xEOL; then
42903       new_complete="$new_path ${arguments% *}"
42904     else
42905       new_complete="$new_path"
42906     fi
42907 
42908     if test "x$complete" != "x$new_complete"; then
42909       OBJDUMP="$new_complete"
42910       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42911 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42912     fi
42913   fi
42914 
42915   fi
42916 
42917 
42918   # Restore old path.
42919   PATH="$OLD_PATH"
42920 
42921   # Restore the flags to the user specified values.
42922   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
42923   CFLAGS="$ORG_CFLAGS"
42924   CXXFLAGS="$ORG_CXXFLAGS"
42925 
42926 
42927 # Finally do some processing after the detection phase
42928 
42929   if test "x$COMPILE_TYPE" = "xcross"; then
42930     # Now we need to find a C/C++ compiler that can build executables for the
42931     # build platform. We can't use the AC_PROG_CC macro, since it can only be
42932     # used once. Also, we need to do this without adding a tools dir to the
42933     # path, otherwise we might pick up cross-compilers which don't use standard
42934     # naming.
42935 
42936     OLDPATH="$PATH"
42937 
42938 
42939 # Check whether --with-build-devkit was given.
42940 if test "${with_build_devkit+set}" = set; then :
42941   withval=$with_build_devkit;
42942 fi
42943 
42944     if test "x$with_build_devkit" = "xyes"; then
42945       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
42946     elif test -n "$with_build_devkit"; then
42947       if test ! -d "$with_build_devkit"; then
42948         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
42949       else
42950 
42951   # Only process if variable expands to non-empty
42952 
42953   if test "x$with_build_devkit" != x; then
42954     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42955 
42956   # Input might be given as Windows format, start by converting to
42957   # unix format.
42958   path="$with_build_devkit"
42959   new_path=`$CYGPATH -u "$path"`
42960 
42961   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42962   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42963   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42964   # "foo.exe" is OK but "foo" is an error.
42965   #
42966   # This test is therefore slightly more accurate than "test -f" to check for file precense.
42967   # It is also a way to make sure we got the proper file name for the real test later on.
42968   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42969   if test "x$test_shortpath" = x; then
42970     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42971 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42972     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
42973   fi
42974 
42975   # Call helper function which possibly converts this using DOS-style short mode.
42976   # If so, the updated path is stored in $new_path.
42977 
42978   input_path="$new_path"
42979   # Check if we need to convert this using DOS-style short mode. If the path
42980   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42981   # take no chances and rewrite it.
42982   # Note: m4 eats our [], so we need to use [ and ] instead.
42983   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42984   if test "x$has_forbidden_chars" != x; then
42985     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42986     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42987     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42988     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42989       # Going to short mode and back again did indeed matter. Since short mode is
42990       # case insensitive, let's make it lowercase to improve readability.
42991       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42992       # Now convert it back to Unix-style (cygpath)
42993       input_path=`$CYGPATH -u "$shortmode_path"`
42994       new_path="$input_path"
42995     fi
42996   fi
42997 
42998   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42999   if test "x$test_cygdrive_prefix" = x; then
43000     # As a simple fix, exclude /usr/bin since it's not a real path.
43001     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43002       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43003       # a path prefixed by /cygdrive for fixpath to work.
43004       new_path="$CYGWIN_ROOT_PATH$input_path"
43005     fi
43006   fi
43007 
43008 
43009   if test "x$path" != "x$new_path"; then
43010     with_build_devkit="$new_path"
43011     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43012 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43013   fi
43014 
43015     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43016 
43017   path="$with_build_devkit"
43018   has_colon=`$ECHO $path | $GREP ^.:`
43019   new_path="$path"
43020   if test "x$has_colon" = x; then
43021     # Not in mixed or Windows style, start by that.
43022     new_path=`cmd //c echo $path`
43023   fi
43024 
43025 
43026   input_path="$new_path"
43027   # Check if we need to convert this using DOS-style short mode. If the path
43028   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43029   # take no chances and rewrite it.
43030   # Note: m4 eats our [], so we need to use [ and ] instead.
43031   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43032   if test "x$has_forbidden_chars" != x; then
43033     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43034     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43035   fi
43036 
43037 
43038   windows_path="$new_path"
43039   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43040     unix_path=`$CYGPATH -u "$windows_path"`
43041     new_path="$unix_path"
43042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43043     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43044     new_path="$unix_path"
43045   fi
43046 
43047   if test "x$path" != "x$new_path"; then
43048     with_build_devkit="$new_path"
43049     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43050 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43051   fi
43052 
43053   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43054   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43055 
43056     else
43057       # We're on a unix platform. Hooray! :)
43058       path="$with_build_devkit"
43059       has_space=`$ECHO "$path" | $GREP " "`
43060       if test "x$has_space" != x; then
43061         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43062 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43063         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43064       fi
43065 
43066       # Use eval to expand a potential ~
43067       eval path="$path"
43068       if test ! -f "$path" && test ! -d "$path"; then
43069         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43070       fi
43071 
43072       if test -d "$path"; then
43073         with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43074       else
43075         dir="`$DIRNAME "$path"`"
43076         base="`$BASENAME "$path"`"
43077         with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43078       fi
43079     fi
43080   fi
43081 
43082         BUILD_DEVKIT_ROOT="$with_build_devkit"
43083         # Check for a meta data info file in the root of the devkit
43084         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43085           # Process devkit.info so that existing devkit variables are not
43086           # modified by this
43087           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43088               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43089               -e "s/\$host/\$build/g" \
43090               $BUILD_DEVKIT_ROOT/devkit.info \
43091               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43092           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43093           # This potentially sets the following:
43094           # A descriptive name of the devkit
43095 
43096   if test "x$BUILD_DEVKIT_NAME" = x; then
43097     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43098   fi
43099 
43100           # Corresponds to --with-extra-path
43101 
43102   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43103     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43104   fi
43105 
43106           # Corresponds to --with-toolchain-path
43107 
43108   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43109     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43110   fi
43111 
43112           # Corresponds to --with-sysroot
43113 
43114   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43115     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43116   fi
43117 
43118           # Skip the Window specific parts
43119         fi
43120 
43121         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43122 $as_echo_n "checking for build platform devkit... " >&6; }
43123         if test "x$BUILD_DEVKIT_NAME" != x; then
43124           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43125 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43126         else
43127           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43128 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43129         fi
43130 
43131         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43132 
43133   if test "x$BUILD_SYSROOT" != "x"; then
43134     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43135       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43136         # Solaris Studio does not have a concept of sysroot. Instead we must
43137         # make sure the default include and lib dirs are appended to each
43138         # compile and link command line. Must also add -I-xbuiltin to enable
43139         # inlining of system functions and intrinsics.
43140         BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43141         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43142             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43143             -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43144       fi
43145     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43146       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43147       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43148     elif test "x$TOOLCHAIN_TYPE" = xclang; then
43149       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43150       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43151     fi
43152     # Propagate the sysroot args to hotspot
43153     BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43154     BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43155     BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43156     # The global CFLAGS and LDFLAGS variables need these for configure to function
43157     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43158     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43159     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43160     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43161   fi
43162 
43163   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43164     # We also need -iframework<path>/System/Library/Frameworks
43165     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43166     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43167     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43168     # set this here so it doesn't have to be peppered throughout the forest
43169     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43170     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43171   fi
43172 
43173 
43174 
43175 
43176 
43177          # Fallback default of just /bin if DEVKIT_PATH is not defined
43178         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43179           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43180         fi
43181         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43182       fi
43183     fi
43184 
43185     # FIXME: we should list the discovered compilers as an exclude pattern!
43186     # If we do that, we can do this detection before POST_DETECTION, and still
43187     # find the build compilers in the tools dir, if needed.
43188 
43189 
43190 
43191   # Publish this variable in the help.
43192 
43193 
43194   if [ -z "${BUILD_CC+x}" ]; then
43195     # The variable is not set by user, try to locate tool using the code snippet
43196     for ac_prog in cl cc gcc
43197 do
43198   # Extract the first word of "$ac_prog", so it can be a program name with args.
43199 set dummy $ac_prog; ac_word=$2
43200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43201 $as_echo_n "checking for $ac_word... " >&6; }
43202 if ${ac_cv_path_BUILD_CC+:} false; then :
43203   $as_echo_n "(cached) " >&6
43204 else
43205   case $BUILD_CC in
43206   [\\/]* | ?:[\\/]*)
43207   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43208   ;;
43209   *)
43210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43211 for as_dir in $PATH
43212 do
43213   IFS=$as_save_IFS
43214   test -z "$as_dir" && as_dir=.
43215     for ac_exec_ext in '' $ac_executable_extensions; do
43216   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43217     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43218     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43219     break 2
43220   fi
43221 done
43222   done
43223 IFS=$as_save_IFS
43224 
43225   ;;
43226 esac
43227 fi
43228 BUILD_CC=$ac_cv_path_BUILD_CC
43229 if test -n "$BUILD_CC"; then
43230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43231 $as_echo "$BUILD_CC" >&6; }
43232 else
43233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43234 $as_echo "no" >&6; }
43235 fi
43236 
43237 
43238   test -n "$BUILD_CC" && break
43239 done
43240 
43241   else
43242     # The variable is set, but is it from the command line or the environment?
43243 
43244     # Try to remove the string !BUILD_CC! from our list.
43245     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43246     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43247       # If it failed, the variable was not from the command line. Ignore it,
43248       # but warn the user (except for BASH, which is always set by the calling BASH).
43249       if test "xBUILD_CC" != xBASH; then
43250         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43251 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43252       fi
43253       # Try to locate tool using the code snippet
43254       for ac_prog in cl cc gcc
43255 do
43256   # Extract the first word of "$ac_prog", so it can be a program name with args.
43257 set dummy $ac_prog; ac_word=$2
43258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43259 $as_echo_n "checking for $ac_word... " >&6; }
43260 if ${ac_cv_path_BUILD_CC+:} false; then :
43261   $as_echo_n "(cached) " >&6
43262 else
43263   case $BUILD_CC in
43264   [\\/]* | ?:[\\/]*)
43265   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43266   ;;
43267   *)
43268   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43269 for as_dir in $PATH
43270 do
43271   IFS=$as_save_IFS
43272   test -z "$as_dir" && as_dir=.
43273     for ac_exec_ext in '' $ac_executable_extensions; do
43274   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43275     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43276     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43277     break 2
43278   fi
43279 done
43280   done
43281 IFS=$as_save_IFS
43282 
43283   ;;
43284 esac
43285 fi
43286 BUILD_CC=$ac_cv_path_BUILD_CC
43287 if test -n "$BUILD_CC"; then
43288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43289 $as_echo "$BUILD_CC" >&6; }
43290 else
43291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43292 $as_echo "no" >&6; }
43293 fi
43294 
43295 
43296   test -n "$BUILD_CC" && break
43297 done
43298 
43299     else
43300       # If it succeeded, then it was overridden by the user. We will use it
43301       # for the tool.
43302 
43303       # First remove it from the list of overridden variables, so we can test
43304       # for unknown variables in the end.
43305       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43306 
43307       # Check if we try to supply an empty value
43308       if test "x$BUILD_CC" = x; then
43309         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43310 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43311         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43312 $as_echo_n "checking for BUILD_CC... " >&6; }
43313         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43314 $as_echo "disabled" >&6; }
43315       else
43316         # Check if the provided tool contains a complete path.
43317         tool_specified="$BUILD_CC"
43318         tool_basename="${tool_specified##*/}"
43319         if test "x$tool_basename" = "x$tool_specified"; then
43320           # A command without a complete path is provided, search $PATH.
43321           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43322 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43323           # Extract the first word of "$tool_basename", so it can be a program name with args.
43324 set dummy $tool_basename; ac_word=$2
43325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43326 $as_echo_n "checking for $ac_word... " >&6; }
43327 if ${ac_cv_path_BUILD_CC+:} false; then :
43328   $as_echo_n "(cached) " >&6
43329 else
43330   case $BUILD_CC in
43331   [\\/]* | ?:[\\/]*)
43332   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43333   ;;
43334   *)
43335   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43336 for as_dir in $PATH
43337 do
43338   IFS=$as_save_IFS
43339   test -z "$as_dir" && as_dir=.
43340     for ac_exec_ext in '' $ac_executable_extensions; do
43341   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43342     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43343     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43344     break 2
43345   fi
43346 done
43347   done
43348 IFS=$as_save_IFS
43349 
43350   ;;
43351 esac
43352 fi
43353 BUILD_CC=$ac_cv_path_BUILD_CC
43354 if test -n "$BUILD_CC"; then
43355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43356 $as_echo "$BUILD_CC" >&6; }
43357 else
43358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43359 $as_echo "no" >&6; }
43360 fi
43361 
43362 
43363           if test "x$BUILD_CC" = x; then
43364             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43365           fi
43366         else
43367           # Otherwise we believe it is a complete path. Use it as it is.
43368           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43369 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43370           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43371 $as_echo_n "checking for BUILD_CC... " >&6; }
43372           if test ! -x "$tool_specified"; then
43373             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43374 $as_echo "not found" >&6; }
43375             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43376           fi
43377           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43378 $as_echo "$tool_specified" >&6; }
43379         fi
43380       fi
43381     fi
43382 
43383   fi
43384 
43385 
43386 
43387   if test "x$BUILD_CC" = x; then
43388     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43389   fi
43390 
43391 
43392 
43393   # Only process if variable expands to non-empty
43394 
43395   if test "x$BUILD_CC" != x; then
43396     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43397 
43398   # First separate the path from the arguments. This will split at the first
43399   # space.
43400   complete="$BUILD_CC"
43401   path="${complete%% *}"
43402   tmp="$complete EOL"
43403   arguments="${tmp#* }"
43404 
43405   # Input might be given as Windows format, start by converting to
43406   # unix format.
43407   new_path=`$CYGPATH -u "$path"`
43408 
43409   # Now try to locate executable using which
43410   new_path=`$WHICH "$new_path" 2> /dev/null`
43411   # bat and cmd files are not always considered executable in cygwin causing which
43412   # to not find them
43413   if test "x$new_path" = x \
43414       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43415       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43416     new_path=`$CYGPATH -u "$path"`
43417   fi
43418   if test "x$new_path" = x; then
43419     # Oops. Which didn't find the executable.
43420     # The splitting of arguments from the executable at a space might have been incorrect,
43421     # since paths with space are more likely in Windows. Give it another try with the whole
43422     # argument.
43423     path="$complete"
43424     arguments="EOL"
43425     new_path=`$CYGPATH -u "$path"`
43426     new_path=`$WHICH "$new_path" 2> /dev/null`
43427     # bat and cmd files are not always considered executable in cygwin causing which
43428     # to not find them
43429     if test "x$new_path" = x \
43430         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43431         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43432       new_path=`$CYGPATH -u "$path"`
43433     fi
43434     if test "x$new_path" = x; then
43435       # It's still not found. Now this is an unrecoverable error.
43436       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43437 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43438       has_space=`$ECHO "$complete" | $GREP " "`
43439       if test "x$has_space" != x; then
43440         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43441 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43442       fi
43443       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43444     fi
43445   fi
43446 
43447   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43448   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43449   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43450   # "foo.exe" is OK but "foo" is an error.
43451   #
43452   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43453   # It is also a way to make sure we got the proper file name for the real test later on.
43454   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43455   if test "x$test_shortpath" = x; then
43456     # Short path failed, file does not exist as specified.
43457     # Try adding .exe or .cmd
43458     if test -f "${new_path}.exe"; then
43459       input_to_shortpath="${new_path}.exe"
43460     elif test -f "${new_path}.cmd"; then
43461       input_to_shortpath="${new_path}.cmd"
43462     else
43463       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43464 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43465       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43466 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43467       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43468     fi
43469   else
43470     input_to_shortpath="$new_path"
43471   fi
43472 
43473   # Call helper function which possibly converts this using DOS-style short mode.
43474   # If so, the updated path is stored in $new_path.
43475   new_path="$input_to_shortpath"
43476 
43477   input_path="$input_to_shortpath"
43478   # Check if we need to convert this using DOS-style short mode. If the path
43479   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43480   # take no chances and rewrite it.
43481   # Note: m4 eats our [], so we need to use [ and ] instead.
43482   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43483   if test "x$has_forbidden_chars" != x; then
43484     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43485     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43486     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43487     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43488       # Going to short mode and back again did indeed matter. Since short mode is
43489       # case insensitive, let's make it lowercase to improve readability.
43490       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43491       # Now convert it back to Unix-style (cygpath)
43492       input_path=`$CYGPATH -u "$shortmode_path"`
43493       new_path="$input_path"
43494     fi
43495   fi
43496 
43497   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43498   if test "x$test_cygdrive_prefix" = x; then
43499     # As a simple fix, exclude /usr/bin since it's not a real path.
43500     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43501       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43502       # a path prefixed by /cygdrive for fixpath to work.
43503       new_path="$CYGWIN_ROOT_PATH$input_path"
43504     fi
43505   fi
43506 
43507   # remove trailing .exe if any
43508   new_path="${new_path/%.exe/}"
43509 
43510     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43511 
43512   # First separate the path from the arguments. This will split at the first
43513   # space.
43514   complete="$BUILD_CC"
43515   path="${complete%% *}"
43516   tmp="$complete EOL"
43517   arguments="${tmp#* }"
43518 
43519   # Input might be given as Windows format, start by converting to
43520   # unix format.
43521   new_path="$path"
43522 
43523   windows_path="$new_path"
43524   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43525     unix_path=`$CYGPATH -u "$windows_path"`
43526     new_path="$unix_path"
43527   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43528     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43529     new_path="$unix_path"
43530   fi
43531 
43532 
43533   # Now try to locate executable using which
43534   new_path=`$WHICH "$new_path" 2> /dev/null`
43535 
43536   if test "x$new_path" = x; then
43537     # Oops. Which didn't find the executable.
43538     # The splitting of arguments from the executable at a space might have been incorrect,
43539     # since paths with space are more likely in Windows. Give it another try with the whole
43540     # argument.
43541     path="$complete"
43542     arguments="EOL"
43543     new_path="$path"
43544 
43545   windows_path="$new_path"
43546   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43547     unix_path=`$CYGPATH -u "$windows_path"`
43548     new_path="$unix_path"
43549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43550     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43551     new_path="$unix_path"
43552   fi
43553 
43554 
43555     new_path=`$WHICH "$new_path" 2> /dev/null`
43556     # bat and cmd files are not always considered executable in MSYS causing which
43557     # to not find them
43558     if test "x$new_path" = x \
43559         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43560         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43561       new_path="$path"
43562 
43563   windows_path="$new_path"
43564   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43565     unix_path=`$CYGPATH -u "$windows_path"`
43566     new_path="$unix_path"
43567   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43568     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43569     new_path="$unix_path"
43570   fi
43571 
43572     fi
43573 
43574     if test "x$new_path" = x; then
43575       # It's still not found. Now this is an unrecoverable error.
43576       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43577 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43578       has_space=`$ECHO "$complete" | $GREP " "`
43579       if test "x$has_space" != x; then
43580         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43581 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43582       fi
43583       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43584     fi
43585   fi
43586 
43587   # Now new_path has a complete unix path to the binary
43588   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43589     # Keep paths in /bin as-is, but remove trailing .exe if any
43590     new_path="${new_path/%.exe/}"
43591     # Do not save /bin paths to all_fixpath_prefixes!
43592   else
43593     # Not in mixed or Windows style, start by that.
43594     new_path=`cmd //c echo $new_path`
43595 
43596   input_path="$new_path"
43597   # Check if we need to convert this using DOS-style short mode. If the path
43598   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43599   # take no chances and rewrite it.
43600   # Note: m4 eats our [], so we need to use [ and ] instead.
43601   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43602   if test "x$has_forbidden_chars" != x; then
43603     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43604     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43605   fi
43606 
43607     # Output is in $new_path
43608 
43609   windows_path="$new_path"
43610   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43611     unix_path=`$CYGPATH -u "$windows_path"`
43612     new_path="$unix_path"
43613   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43614     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43615     new_path="$unix_path"
43616   fi
43617 
43618     # remove trailing .exe if any
43619     new_path="${new_path/%.exe/}"
43620 
43621     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43622     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43623   fi
43624 
43625     else
43626       # We're on a unix platform. Hooray! :)
43627       # First separate the path from the arguments. This will split at the first
43628       # space.
43629       complete="$BUILD_CC"
43630       path="${complete%% *}"
43631       tmp="$complete EOL"
43632       arguments="${tmp#* }"
43633 
43634       # Cannot rely on the command "which" here since it doesn't always work.
43635       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43636       if test -z "$is_absolute_path"; then
43637         # Path to executable is not absolute. Find it.
43638         IFS_save="$IFS"
43639         IFS=:
43640         for p in $PATH; do
43641           if test -f "$p/$path" && test -x "$p/$path"; then
43642             new_path="$p/$path"
43643             break
43644           fi
43645         done
43646         IFS="$IFS_save"
43647       else
43648         # This is an absolute path, we can use it without further modifications.
43649         new_path="$path"
43650       fi
43651 
43652       if test "x$new_path" = x; then
43653         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43654 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43655         has_space=`$ECHO "$complete" | $GREP " "`
43656         if test "x$has_space" != x; then
43657           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43658 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43659         fi
43660         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43661       fi
43662     fi
43663 
43664     # Now join together the path and the arguments once again
43665     if test "x$arguments" != xEOL; then
43666       new_complete="$new_path ${arguments% *}"
43667     else
43668       new_complete="$new_path"
43669     fi
43670 
43671     if test "x$complete" != "x$new_complete"; then
43672       BUILD_CC="$new_complete"
43673       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
43674 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
43675     fi
43676   fi
43677 
43678 
43679 
43680 
43681   # Publish this variable in the help.
43682 
43683 
43684   if [ -z "${BUILD_CXX+x}" ]; then
43685     # The variable is not set by user, try to locate tool using the code snippet
43686     for ac_prog in cl CC g++
43687 do
43688   # Extract the first word of "$ac_prog", so it can be a program name with args.
43689 set dummy $ac_prog; ac_word=$2
43690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43691 $as_echo_n "checking for $ac_word... " >&6; }
43692 if ${ac_cv_path_BUILD_CXX+:} false; then :
43693   $as_echo_n "(cached) " >&6
43694 else
43695   case $BUILD_CXX in
43696   [\\/]* | ?:[\\/]*)
43697   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43698   ;;
43699   *)
43700   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43701 for as_dir in $PATH
43702 do
43703   IFS=$as_save_IFS
43704   test -z "$as_dir" && as_dir=.
43705     for ac_exec_ext in '' $ac_executable_extensions; do
43706   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43707     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43708     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43709     break 2
43710   fi
43711 done
43712   done
43713 IFS=$as_save_IFS
43714 
43715   ;;
43716 esac
43717 fi
43718 BUILD_CXX=$ac_cv_path_BUILD_CXX
43719 if test -n "$BUILD_CXX"; then
43720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43721 $as_echo "$BUILD_CXX" >&6; }
43722 else
43723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43724 $as_echo "no" >&6; }
43725 fi
43726 
43727 
43728   test -n "$BUILD_CXX" && break
43729 done
43730 
43731   else
43732     # The variable is set, but is it from the command line or the environment?
43733 
43734     # Try to remove the string !BUILD_CXX! from our list.
43735     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43736     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43737       # If it failed, the variable was not from the command line. Ignore it,
43738       # but warn the user (except for BASH, which is always set by the calling BASH).
43739       if test "xBUILD_CXX" != xBASH; then
43740         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43741 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43742       fi
43743       # Try to locate tool using the code snippet
43744       for ac_prog in cl CC g++
43745 do
43746   # Extract the first word of "$ac_prog", so it can be a program name with args.
43747 set dummy $ac_prog; ac_word=$2
43748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43749 $as_echo_n "checking for $ac_word... " >&6; }
43750 if ${ac_cv_path_BUILD_CXX+:} false; then :
43751   $as_echo_n "(cached) " >&6
43752 else
43753   case $BUILD_CXX in
43754   [\\/]* | ?:[\\/]*)
43755   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43756   ;;
43757   *)
43758   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43759 for as_dir in $PATH
43760 do
43761   IFS=$as_save_IFS
43762   test -z "$as_dir" && as_dir=.
43763     for ac_exec_ext in '' $ac_executable_extensions; do
43764   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43765     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43766     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43767     break 2
43768   fi
43769 done
43770   done
43771 IFS=$as_save_IFS
43772 
43773   ;;
43774 esac
43775 fi
43776 BUILD_CXX=$ac_cv_path_BUILD_CXX
43777 if test -n "$BUILD_CXX"; then
43778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43779 $as_echo "$BUILD_CXX" >&6; }
43780 else
43781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43782 $as_echo "no" >&6; }
43783 fi
43784 
43785 
43786   test -n "$BUILD_CXX" && break
43787 done
43788 
43789     else
43790       # If it succeeded, then it was overridden by the user. We will use it
43791       # for the tool.
43792 
43793       # First remove it from the list of overridden variables, so we can test
43794       # for unknown variables in the end.
43795       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43796 
43797       # Check if we try to supply an empty value
43798       if test "x$BUILD_CXX" = x; then
43799         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43800 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43801         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43802 $as_echo_n "checking for BUILD_CXX... " >&6; }
43803         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43804 $as_echo "disabled" >&6; }
43805       else
43806         # Check if the provided tool contains a complete path.
43807         tool_specified="$BUILD_CXX"
43808         tool_basename="${tool_specified##*/}"
43809         if test "x$tool_basename" = "x$tool_specified"; then
43810           # A command without a complete path is provided, search $PATH.
43811           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43812 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43813           # Extract the first word of "$tool_basename", so it can be a program name with args.
43814 set dummy $tool_basename; ac_word=$2
43815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43816 $as_echo_n "checking for $ac_word... " >&6; }
43817 if ${ac_cv_path_BUILD_CXX+:} false; then :
43818   $as_echo_n "(cached) " >&6
43819 else
43820   case $BUILD_CXX in
43821   [\\/]* | ?:[\\/]*)
43822   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43823   ;;
43824   *)
43825   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43826 for as_dir in $PATH
43827 do
43828   IFS=$as_save_IFS
43829   test -z "$as_dir" && as_dir=.
43830     for ac_exec_ext in '' $ac_executable_extensions; do
43831   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43832     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43833     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43834     break 2
43835   fi
43836 done
43837   done
43838 IFS=$as_save_IFS
43839 
43840   ;;
43841 esac
43842 fi
43843 BUILD_CXX=$ac_cv_path_BUILD_CXX
43844 if test -n "$BUILD_CXX"; then
43845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43846 $as_echo "$BUILD_CXX" >&6; }
43847 else
43848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43849 $as_echo "no" >&6; }
43850 fi
43851 
43852 
43853           if test "x$BUILD_CXX" = x; then
43854             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43855           fi
43856         else
43857           # Otherwise we believe it is a complete path. Use it as it is.
43858           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43859 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43860           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43861 $as_echo_n "checking for BUILD_CXX... " >&6; }
43862           if test ! -x "$tool_specified"; then
43863             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43864 $as_echo "not found" >&6; }
43865             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43866           fi
43867           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43868 $as_echo "$tool_specified" >&6; }
43869         fi
43870       fi
43871     fi
43872 
43873   fi
43874 
43875 
43876 
43877   if test "x$BUILD_CXX" = x; then
43878     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43879   fi
43880 
43881 
43882 
43883   # Only process if variable expands to non-empty
43884 
43885   if test "x$BUILD_CXX" != x; then
43886     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43887 
43888   # First separate the path from the arguments. This will split at the first
43889   # space.
43890   complete="$BUILD_CXX"
43891   path="${complete%% *}"
43892   tmp="$complete EOL"
43893   arguments="${tmp#* }"
43894 
43895   # Input might be given as Windows format, start by converting to
43896   # unix format.
43897   new_path=`$CYGPATH -u "$path"`
43898 
43899   # Now try to locate executable using which
43900   new_path=`$WHICH "$new_path" 2> /dev/null`
43901   # bat and cmd files are not always considered executable in cygwin causing which
43902   # to not find them
43903   if test "x$new_path" = x \
43904       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43905       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43906     new_path=`$CYGPATH -u "$path"`
43907   fi
43908   if test "x$new_path" = x; then
43909     # Oops. Which didn't find the executable.
43910     # The splitting of arguments from the executable at a space might have been incorrect,
43911     # since paths with space are more likely in Windows. Give it another try with the whole
43912     # argument.
43913     path="$complete"
43914     arguments="EOL"
43915     new_path=`$CYGPATH -u "$path"`
43916     new_path=`$WHICH "$new_path" 2> /dev/null`
43917     # bat and cmd files are not always considered executable in cygwin causing which
43918     # to not find them
43919     if test "x$new_path" = x \
43920         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43921         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43922       new_path=`$CYGPATH -u "$path"`
43923     fi
43924     if test "x$new_path" = x; then
43925       # It's still not found. Now this is an unrecoverable error.
43926       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43927 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43928       has_space=`$ECHO "$complete" | $GREP " "`
43929       if test "x$has_space" != x; then
43930         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43931 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43932       fi
43933       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43934     fi
43935   fi
43936 
43937   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43938   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43939   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43940   # "foo.exe" is OK but "foo" is an error.
43941   #
43942   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43943   # It is also a way to make sure we got the proper file name for the real test later on.
43944   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43945   if test "x$test_shortpath" = x; then
43946     # Short path failed, file does not exist as specified.
43947     # Try adding .exe or .cmd
43948     if test -f "${new_path}.exe"; then
43949       input_to_shortpath="${new_path}.exe"
43950     elif test -f "${new_path}.cmd"; then
43951       input_to_shortpath="${new_path}.cmd"
43952     else
43953       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
43954 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
43955       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43956 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43957       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43958     fi
43959   else
43960     input_to_shortpath="$new_path"
43961   fi
43962 
43963   # Call helper function which possibly converts this using DOS-style short mode.
43964   # If so, the updated path is stored in $new_path.
43965   new_path="$input_to_shortpath"
43966 
43967   input_path="$input_to_shortpath"
43968   # Check if we need to convert this using DOS-style short mode. If the path
43969   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43970   # take no chances and rewrite it.
43971   # Note: m4 eats our [], so we need to use [ and ] instead.
43972   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43973   if test "x$has_forbidden_chars" != x; then
43974     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43975     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43976     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43977     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43978       # Going to short mode and back again did indeed matter. Since short mode is
43979       # case insensitive, let's make it lowercase to improve readability.
43980       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43981       # Now convert it back to Unix-style (cygpath)
43982       input_path=`$CYGPATH -u "$shortmode_path"`
43983       new_path="$input_path"
43984     fi
43985   fi
43986 
43987   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43988   if test "x$test_cygdrive_prefix" = x; then
43989     # As a simple fix, exclude /usr/bin since it's not a real path.
43990     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43991       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43992       # a path prefixed by /cygdrive for fixpath to work.
43993       new_path="$CYGWIN_ROOT_PATH$input_path"
43994     fi
43995   fi
43996 
43997   # remove trailing .exe if any
43998   new_path="${new_path/%.exe/}"
43999 
44000     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44001 
44002   # First separate the path from the arguments. This will split at the first
44003   # space.
44004   complete="$BUILD_CXX"
44005   path="${complete%% *}"
44006   tmp="$complete EOL"
44007   arguments="${tmp#* }"
44008 
44009   # Input might be given as Windows format, start by converting to
44010   # unix format.
44011   new_path="$path"
44012 
44013   windows_path="$new_path"
44014   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44015     unix_path=`$CYGPATH -u "$windows_path"`
44016     new_path="$unix_path"
44017   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44018     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44019     new_path="$unix_path"
44020   fi
44021 
44022 
44023   # Now try to locate executable using which
44024   new_path=`$WHICH "$new_path" 2> /dev/null`
44025 
44026   if test "x$new_path" = x; then
44027     # Oops. Which didn't find the executable.
44028     # The splitting of arguments from the executable at a space might have been incorrect,
44029     # since paths with space are more likely in Windows. Give it another try with the whole
44030     # argument.
44031     path="$complete"
44032     arguments="EOL"
44033     new_path="$path"
44034 
44035   windows_path="$new_path"
44036   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44037     unix_path=`$CYGPATH -u "$windows_path"`
44038     new_path="$unix_path"
44039   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44040     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44041     new_path="$unix_path"
44042   fi
44043 
44044 
44045     new_path=`$WHICH "$new_path" 2> /dev/null`
44046     # bat and cmd files are not always considered executable in MSYS causing which
44047     # to not find them
44048     if test "x$new_path" = x \
44049         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44050         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44051       new_path="$path"
44052 
44053   windows_path="$new_path"
44054   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44055     unix_path=`$CYGPATH -u "$windows_path"`
44056     new_path="$unix_path"
44057   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44058     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44059     new_path="$unix_path"
44060   fi
44061 
44062     fi
44063 
44064     if test "x$new_path" = x; then
44065       # It's still not found. Now this is an unrecoverable error.
44066       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44067 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44068       has_space=`$ECHO "$complete" | $GREP " "`
44069       if test "x$has_space" != x; then
44070         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44071 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44072       fi
44073       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44074     fi
44075   fi
44076 
44077   # Now new_path has a complete unix path to the binary
44078   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44079     # Keep paths in /bin as-is, but remove trailing .exe if any
44080     new_path="${new_path/%.exe/}"
44081     # Do not save /bin paths to all_fixpath_prefixes!
44082   else
44083     # Not in mixed or Windows style, start by that.
44084     new_path=`cmd //c echo $new_path`
44085 
44086   input_path="$new_path"
44087   # Check if we need to convert this using DOS-style short mode. If the path
44088   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44089   # take no chances and rewrite it.
44090   # Note: m4 eats our [], so we need to use [ and ] instead.
44091   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44092   if test "x$has_forbidden_chars" != x; then
44093     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44094     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44095   fi
44096 
44097     # Output is in $new_path
44098 
44099   windows_path="$new_path"
44100   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44101     unix_path=`$CYGPATH -u "$windows_path"`
44102     new_path="$unix_path"
44103   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44104     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44105     new_path="$unix_path"
44106   fi
44107 
44108     # remove trailing .exe if any
44109     new_path="${new_path/%.exe/}"
44110 
44111     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44112     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44113   fi
44114 
44115     else
44116       # We're on a unix platform. Hooray! :)
44117       # First separate the path from the arguments. This will split at the first
44118       # space.
44119       complete="$BUILD_CXX"
44120       path="${complete%% *}"
44121       tmp="$complete EOL"
44122       arguments="${tmp#* }"
44123 
44124       # Cannot rely on the command "which" here since it doesn't always work.
44125       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44126       if test -z "$is_absolute_path"; then
44127         # Path to executable is not absolute. Find it.
44128         IFS_save="$IFS"
44129         IFS=:
44130         for p in $PATH; do
44131           if test -f "$p/$path" && test -x "$p/$path"; then
44132             new_path="$p/$path"
44133             break
44134           fi
44135         done
44136         IFS="$IFS_save"
44137       else
44138         # This is an absolute path, we can use it without further modifications.
44139         new_path="$path"
44140       fi
44141 
44142       if test "x$new_path" = x; then
44143         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44144 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44145         has_space=`$ECHO "$complete" | $GREP " "`
44146         if test "x$has_space" != x; then
44147           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44148 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44149         fi
44150         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44151       fi
44152     fi
44153 
44154     # Now join together the path and the arguments once again
44155     if test "x$arguments" != xEOL; then
44156       new_complete="$new_path ${arguments% *}"
44157     else
44158       new_complete="$new_path"
44159     fi
44160 
44161     if test "x$complete" != "x$new_complete"; then
44162       BUILD_CXX="$new_complete"
44163       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44164 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44165     fi
44166   fi
44167 
44168 
44169 
44170   # Publish this variable in the help.
44171 
44172 
44173   if [ -z "${BUILD_NM+x}" ]; then
44174     # The variable is not set by user, try to locate tool using the code snippet
44175     for ac_prog in nm gcc-nm
44176 do
44177   # Extract the first word of "$ac_prog", so it can be a program name with args.
44178 set dummy $ac_prog; ac_word=$2
44179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44180 $as_echo_n "checking for $ac_word... " >&6; }
44181 if ${ac_cv_path_BUILD_NM+:} false; then :
44182   $as_echo_n "(cached) " >&6
44183 else
44184   case $BUILD_NM in
44185   [\\/]* | ?:[\\/]*)
44186   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44187   ;;
44188   *)
44189   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44190 for as_dir in $PATH
44191 do
44192   IFS=$as_save_IFS
44193   test -z "$as_dir" && as_dir=.
44194     for ac_exec_ext in '' $ac_executable_extensions; do
44195   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44196     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44197     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44198     break 2
44199   fi
44200 done
44201   done
44202 IFS=$as_save_IFS
44203 
44204   ;;
44205 esac
44206 fi
44207 BUILD_NM=$ac_cv_path_BUILD_NM
44208 if test -n "$BUILD_NM"; then
44209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44210 $as_echo "$BUILD_NM" >&6; }
44211 else
44212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44213 $as_echo "no" >&6; }
44214 fi
44215 
44216 
44217   test -n "$BUILD_NM" && break
44218 done
44219 
44220   else
44221     # The variable is set, but is it from the command line or the environment?
44222 
44223     # Try to remove the string !BUILD_NM! from our list.
44224     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44225     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44226       # If it failed, the variable was not from the command line. Ignore it,
44227       # but warn the user (except for BASH, which is always set by the calling BASH).
44228       if test "xBUILD_NM" != xBASH; then
44229         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44230 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44231       fi
44232       # Try to locate tool using the code snippet
44233       for ac_prog in nm gcc-nm
44234 do
44235   # Extract the first word of "$ac_prog", so it can be a program name with args.
44236 set dummy $ac_prog; ac_word=$2
44237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44238 $as_echo_n "checking for $ac_word... " >&6; }
44239 if ${ac_cv_path_BUILD_NM+:} false; then :
44240   $as_echo_n "(cached) " >&6
44241 else
44242   case $BUILD_NM in
44243   [\\/]* | ?:[\\/]*)
44244   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44245   ;;
44246   *)
44247   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44248 for as_dir in $PATH
44249 do
44250   IFS=$as_save_IFS
44251   test -z "$as_dir" && as_dir=.
44252     for ac_exec_ext in '' $ac_executable_extensions; do
44253   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44254     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44255     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44256     break 2
44257   fi
44258 done
44259   done
44260 IFS=$as_save_IFS
44261 
44262   ;;
44263 esac
44264 fi
44265 BUILD_NM=$ac_cv_path_BUILD_NM
44266 if test -n "$BUILD_NM"; then
44267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44268 $as_echo "$BUILD_NM" >&6; }
44269 else
44270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44271 $as_echo "no" >&6; }
44272 fi
44273 
44274 
44275   test -n "$BUILD_NM" && break
44276 done
44277 
44278     else
44279       # If it succeeded, then it was overridden by the user. We will use it
44280       # for the tool.
44281 
44282       # First remove it from the list of overridden variables, so we can test
44283       # for unknown variables in the end.
44284       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44285 
44286       # Check if we try to supply an empty value
44287       if test "x$BUILD_NM" = x; then
44288         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44289 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44290         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44291 $as_echo_n "checking for BUILD_NM... " >&6; }
44292         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44293 $as_echo "disabled" >&6; }
44294       else
44295         # Check if the provided tool contains a complete path.
44296         tool_specified="$BUILD_NM"
44297         tool_basename="${tool_specified##*/}"
44298         if test "x$tool_basename" = "x$tool_specified"; then
44299           # A command without a complete path is provided, search $PATH.
44300           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44301 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44302           # Extract the first word of "$tool_basename", so it can be a program name with args.
44303 set dummy $tool_basename; ac_word=$2
44304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44305 $as_echo_n "checking for $ac_word... " >&6; }
44306 if ${ac_cv_path_BUILD_NM+:} false; then :
44307   $as_echo_n "(cached) " >&6
44308 else
44309   case $BUILD_NM in
44310   [\\/]* | ?:[\\/]*)
44311   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44312   ;;
44313   *)
44314   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44315 for as_dir in $PATH
44316 do
44317   IFS=$as_save_IFS
44318   test -z "$as_dir" && as_dir=.
44319     for ac_exec_ext in '' $ac_executable_extensions; do
44320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44321     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44323     break 2
44324   fi
44325 done
44326   done
44327 IFS=$as_save_IFS
44328 
44329   ;;
44330 esac
44331 fi
44332 BUILD_NM=$ac_cv_path_BUILD_NM
44333 if test -n "$BUILD_NM"; then
44334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44335 $as_echo "$BUILD_NM" >&6; }
44336 else
44337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44338 $as_echo "no" >&6; }
44339 fi
44340 
44341 
44342           if test "x$BUILD_NM" = x; then
44343             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44344           fi
44345         else
44346           # Otherwise we believe it is a complete path. Use it as it is.
44347           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44348 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44349           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44350 $as_echo_n "checking for BUILD_NM... " >&6; }
44351           if test ! -x "$tool_specified"; then
44352             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44353 $as_echo "not found" >&6; }
44354             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44355           fi
44356           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44357 $as_echo "$tool_specified" >&6; }
44358         fi
44359       fi
44360     fi
44361 
44362   fi
44363 
44364 
44365 
44366   # Only process if variable expands to non-empty
44367 
44368   if test "x$BUILD_NM" != x; then
44369     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44370 
44371   # First separate the path from the arguments. This will split at the first
44372   # space.
44373   complete="$BUILD_NM"
44374   path="${complete%% *}"
44375   tmp="$complete EOL"
44376   arguments="${tmp#* }"
44377 
44378   # Input might be given as Windows format, start by converting to
44379   # unix format.
44380   new_path=`$CYGPATH -u "$path"`
44381 
44382   # Now try to locate executable using which
44383   new_path=`$WHICH "$new_path" 2> /dev/null`
44384   # bat and cmd files are not always considered executable in cygwin causing which
44385   # to not find them
44386   if test "x$new_path" = x \
44387       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44388       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44389     new_path=`$CYGPATH -u "$path"`
44390   fi
44391   if test "x$new_path" = x; then
44392     # Oops. Which didn't find the executable.
44393     # The splitting of arguments from the executable at a space might have been incorrect,
44394     # since paths with space are more likely in Windows. Give it another try with the whole
44395     # argument.
44396     path="$complete"
44397     arguments="EOL"
44398     new_path=`$CYGPATH -u "$path"`
44399     new_path=`$WHICH "$new_path" 2> /dev/null`
44400     # bat and cmd files are not always considered executable in cygwin causing which
44401     # to not find them
44402     if test "x$new_path" = x \
44403         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44404         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44405       new_path=`$CYGPATH -u "$path"`
44406     fi
44407     if test "x$new_path" = x; then
44408       # It's still not found. Now this is an unrecoverable error.
44409       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44410 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44411       has_space=`$ECHO "$complete" | $GREP " "`
44412       if test "x$has_space" != x; then
44413         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44414 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44415       fi
44416       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44417     fi
44418   fi
44419 
44420   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44421   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44422   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44423   # "foo.exe" is OK but "foo" is an error.
44424   #
44425   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44426   # It is also a way to make sure we got the proper file name for the real test later on.
44427   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44428   if test "x$test_shortpath" = x; then
44429     # Short path failed, file does not exist as specified.
44430     # Try adding .exe or .cmd
44431     if test -f "${new_path}.exe"; then
44432       input_to_shortpath="${new_path}.exe"
44433     elif test -f "${new_path}.cmd"; then
44434       input_to_shortpath="${new_path}.cmd"
44435     else
44436       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44437 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44438       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44439 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44440       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44441     fi
44442   else
44443     input_to_shortpath="$new_path"
44444   fi
44445 
44446   # Call helper function which possibly converts this using DOS-style short mode.
44447   # If so, the updated path is stored in $new_path.
44448   new_path="$input_to_shortpath"
44449 
44450   input_path="$input_to_shortpath"
44451   # Check if we need to convert this using DOS-style short mode. If the path
44452   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44453   # take no chances and rewrite it.
44454   # Note: m4 eats our [], so we need to use [ and ] instead.
44455   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44456   if test "x$has_forbidden_chars" != x; then
44457     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44458     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44459     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44460     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44461       # Going to short mode and back again did indeed matter. Since short mode is
44462       # case insensitive, let's make it lowercase to improve readability.
44463       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44464       # Now convert it back to Unix-style (cygpath)
44465       input_path=`$CYGPATH -u "$shortmode_path"`
44466       new_path="$input_path"
44467     fi
44468   fi
44469 
44470   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44471   if test "x$test_cygdrive_prefix" = x; then
44472     # As a simple fix, exclude /usr/bin since it's not a real path.
44473     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44474       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44475       # a path prefixed by /cygdrive for fixpath to work.
44476       new_path="$CYGWIN_ROOT_PATH$input_path"
44477     fi
44478   fi
44479 
44480   # remove trailing .exe if any
44481   new_path="${new_path/%.exe/}"
44482 
44483     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44484 
44485   # First separate the path from the arguments. This will split at the first
44486   # space.
44487   complete="$BUILD_NM"
44488   path="${complete%% *}"
44489   tmp="$complete EOL"
44490   arguments="${tmp#* }"
44491 
44492   # Input might be given as Windows format, start by converting to
44493   # unix format.
44494   new_path="$path"
44495 
44496   windows_path="$new_path"
44497   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44498     unix_path=`$CYGPATH -u "$windows_path"`
44499     new_path="$unix_path"
44500   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44501     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44502     new_path="$unix_path"
44503   fi
44504 
44505 
44506   # Now try to locate executable using which
44507   new_path=`$WHICH "$new_path" 2> /dev/null`
44508 
44509   if test "x$new_path" = x; then
44510     # Oops. Which didn't find the executable.
44511     # The splitting of arguments from the executable at a space might have been incorrect,
44512     # since paths with space are more likely in Windows. Give it another try with the whole
44513     # argument.
44514     path="$complete"
44515     arguments="EOL"
44516     new_path="$path"
44517 
44518   windows_path="$new_path"
44519   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44520     unix_path=`$CYGPATH -u "$windows_path"`
44521     new_path="$unix_path"
44522   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44523     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44524     new_path="$unix_path"
44525   fi
44526 
44527 
44528     new_path=`$WHICH "$new_path" 2> /dev/null`
44529     # bat and cmd files are not always considered executable in MSYS causing which
44530     # to not find them
44531     if test "x$new_path" = x \
44532         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44533         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44534       new_path="$path"
44535 
44536   windows_path="$new_path"
44537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44538     unix_path=`$CYGPATH -u "$windows_path"`
44539     new_path="$unix_path"
44540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44541     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44542     new_path="$unix_path"
44543   fi
44544 
44545     fi
44546 
44547     if test "x$new_path" = x; then
44548       # It's still not found. Now this is an unrecoverable error.
44549       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44550 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44551       has_space=`$ECHO "$complete" | $GREP " "`
44552       if test "x$has_space" != x; then
44553         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44554 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44555       fi
44556       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44557     fi
44558   fi
44559 
44560   # Now new_path has a complete unix path to the binary
44561   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44562     # Keep paths in /bin as-is, but remove trailing .exe if any
44563     new_path="${new_path/%.exe/}"
44564     # Do not save /bin paths to all_fixpath_prefixes!
44565   else
44566     # Not in mixed or Windows style, start by that.
44567     new_path=`cmd //c echo $new_path`
44568 
44569   input_path="$new_path"
44570   # Check if we need to convert this using DOS-style short mode. If the path
44571   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44572   # take no chances and rewrite it.
44573   # Note: m4 eats our [], so we need to use [ and ] instead.
44574   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44575   if test "x$has_forbidden_chars" != x; then
44576     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44577     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44578   fi
44579 
44580     # Output is in $new_path
44581 
44582   windows_path="$new_path"
44583   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44584     unix_path=`$CYGPATH -u "$windows_path"`
44585     new_path="$unix_path"
44586   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44587     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44588     new_path="$unix_path"
44589   fi
44590 
44591     # remove trailing .exe if any
44592     new_path="${new_path/%.exe/}"
44593 
44594     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44595     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44596   fi
44597 
44598     else
44599       # We're on a unix platform. Hooray! :)
44600       # First separate the path from the arguments. This will split at the first
44601       # space.
44602       complete="$BUILD_NM"
44603       path="${complete%% *}"
44604       tmp="$complete EOL"
44605       arguments="${tmp#* }"
44606 
44607       # Cannot rely on the command "which" here since it doesn't always work.
44608       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44609       if test -z "$is_absolute_path"; then
44610         # Path to executable is not absolute. Find it.
44611         IFS_save="$IFS"
44612         IFS=:
44613         for p in $PATH; do
44614           if test -f "$p/$path" && test -x "$p/$path"; then
44615             new_path="$p/$path"
44616             break
44617           fi
44618         done
44619         IFS="$IFS_save"
44620       else
44621         # This is an absolute path, we can use it without further modifications.
44622         new_path="$path"
44623       fi
44624 
44625       if test "x$new_path" = x; then
44626         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44627 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44628         has_space=`$ECHO "$complete" | $GREP " "`
44629         if test "x$has_space" != x; then
44630           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44631 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44632         fi
44633         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44634       fi
44635     fi
44636 
44637     # Now join together the path and the arguments once again
44638     if test "x$arguments" != xEOL; then
44639       new_complete="$new_path ${arguments% *}"
44640     else
44641       new_complete="$new_path"
44642     fi
44643 
44644     if test "x$complete" != "x$new_complete"; then
44645       BUILD_NM="$new_complete"
44646       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44647 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44648     fi
44649   fi
44650 
44651 
44652 
44653   # Publish this variable in the help.
44654 
44655 
44656   if [ -z "${BUILD_AR+x}" ]; then
44657     # The variable is not set by user, try to locate tool using the code snippet
44658     for ac_prog in ar gcc-ar
44659 do
44660   # Extract the first word of "$ac_prog", so it can be a program name with args.
44661 set dummy $ac_prog; ac_word=$2
44662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44663 $as_echo_n "checking for $ac_word... " >&6; }
44664 if ${ac_cv_path_BUILD_AR+:} false; then :
44665   $as_echo_n "(cached) " >&6
44666 else
44667   case $BUILD_AR in
44668   [\\/]* | ?:[\\/]*)
44669   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44670   ;;
44671   *)
44672   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44673 for as_dir in $PATH
44674 do
44675   IFS=$as_save_IFS
44676   test -z "$as_dir" && as_dir=.
44677     for ac_exec_ext in '' $ac_executable_extensions; do
44678   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44679     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44680     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44681     break 2
44682   fi
44683 done
44684   done
44685 IFS=$as_save_IFS
44686 
44687   ;;
44688 esac
44689 fi
44690 BUILD_AR=$ac_cv_path_BUILD_AR
44691 if test -n "$BUILD_AR"; then
44692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44693 $as_echo "$BUILD_AR" >&6; }
44694 else
44695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44696 $as_echo "no" >&6; }
44697 fi
44698 
44699 
44700   test -n "$BUILD_AR" && break
44701 done
44702 
44703   else
44704     # The variable is set, but is it from the command line or the environment?
44705 
44706     # Try to remove the string !BUILD_AR! from our list.
44707     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
44708     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44709       # If it failed, the variable was not from the command line. Ignore it,
44710       # but warn the user (except for BASH, which is always set by the calling BASH).
44711       if test "xBUILD_AR" != xBASH; then
44712         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
44713 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
44714       fi
44715       # Try to locate tool using the code snippet
44716       for ac_prog in ar gcc-ar
44717 do
44718   # Extract the first word of "$ac_prog", so it can be a program name with args.
44719 set dummy $ac_prog; ac_word=$2
44720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44721 $as_echo_n "checking for $ac_word... " >&6; }
44722 if ${ac_cv_path_BUILD_AR+:} false; then :
44723   $as_echo_n "(cached) " >&6
44724 else
44725   case $BUILD_AR in
44726   [\\/]* | ?:[\\/]*)
44727   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44728   ;;
44729   *)
44730   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44731 for as_dir in $PATH
44732 do
44733   IFS=$as_save_IFS
44734   test -z "$as_dir" && as_dir=.
44735     for ac_exec_ext in '' $ac_executable_extensions; do
44736   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44737     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44738     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44739     break 2
44740   fi
44741 done
44742   done
44743 IFS=$as_save_IFS
44744 
44745   ;;
44746 esac
44747 fi
44748 BUILD_AR=$ac_cv_path_BUILD_AR
44749 if test -n "$BUILD_AR"; then
44750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44751 $as_echo "$BUILD_AR" >&6; }
44752 else
44753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44754 $as_echo "no" >&6; }
44755 fi
44756 
44757 
44758   test -n "$BUILD_AR" && break
44759 done
44760 
44761     else
44762       # If it succeeded, then it was overridden by the user. We will use it
44763       # for the tool.
44764 
44765       # First remove it from the list of overridden variables, so we can test
44766       # for unknown variables in the end.
44767       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44768 
44769       # Check if we try to supply an empty value
44770       if test "x$BUILD_AR" = x; then
44771         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44772 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44773         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44774 $as_echo_n "checking for BUILD_AR... " >&6; }
44775         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44776 $as_echo "disabled" >&6; }
44777       else
44778         # Check if the provided tool contains a complete path.
44779         tool_specified="$BUILD_AR"
44780         tool_basename="${tool_specified##*/}"
44781         if test "x$tool_basename" = "x$tool_specified"; then
44782           # A command without a complete path is provided, search $PATH.
44783           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44784 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44785           # Extract the first word of "$tool_basename", so it can be a program name with args.
44786 set dummy $tool_basename; ac_word=$2
44787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44788 $as_echo_n "checking for $ac_word... " >&6; }
44789 if ${ac_cv_path_BUILD_AR+:} false; then :
44790   $as_echo_n "(cached) " >&6
44791 else
44792   case $BUILD_AR in
44793   [\\/]* | ?:[\\/]*)
44794   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44795   ;;
44796   *)
44797   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44798 for as_dir in $PATH
44799 do
44800   IFS=$as_save_IFS
44801   test -z "$as_dir" && as_dir=.
44802     for ac_exec_ext in '' $ac_executable_extensions; do
44803   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44804     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44805     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44806     break 2
44807   fi
44808 done
44809   done
44810 IFS=$as_save_IFS
44811 
44812   ;;
44813 esac
44814 fi
44815 BUILD_AR=$ac_cv_path_BUILD_AR
44816 if test -n "$BUILD_AR"; then
44817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44818 $as_echo "$BUILD_AR" >&6; }
44819 else
44820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44821 $as_echo "no" >&6; }
44822 fi
44823 
44824 
44825           if test "x$BUILD_AR" = x; then
44826             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44827           fi
44828         else
44829           # Otherwise we believe it is a complete path. Use it as it is.
44830           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44831 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44832           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44833 $as_echo_n "checking for BUILD_AR... " >&6; }
44834           if test ! -x "$tool_specified"; then
44835             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44836 $as_echo "not found" >&6; }
44837             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44838           fi
44839           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44840 $as_echo "$tool_specified" >&6; }
44841         fi
44842       fi
44843     fi
44844 
44845   fi
44846 
44847 
44848 
44849   # Only process if variable expands to non-empty
44850 
44851   if test "x$BUILD_AR" != x; then
44852     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44853 
44854   # First separate the path from the arguments. This will split at the first
44855   # space.
44856   complete="$BUILD_AR"
44857   path="${complete%% *}"
44858   tmp="$complete EOL"
44859   arguments="${tmp#* }"
44860 
44861   # Input might be given as Windows format, start by converting to
44862   # unix format.
44863   new_path=`$CYGPATH -u "$path"`
44864 
44865   # Now try to locate executable using which
44866   new_path=`$WHICH "$new_path" 2> /dev/null`
44867   # bat and cmd files are not always considered executable in cygwin causing which
44868   # to not find them
44869   if test "x$new_path" = x \
44870       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44871       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44872     new_path=`$CYGPATH -u "$path"`
44873   fi
44874   if test "x$new_path" = x; then
44875     # Oops. Which didn't find the executable.
44876     # The splitting of arguments from the executable at a space might have been incorrect,
44877     # since paths with space are more likely in Windows. Give it another try with the whole
44878     # argument.
44879     path="$complete"
44880     arguments="EOL"
44881     new_path=`$CYGPATH -u "$path"`
44882     new_path=`$WHICH "$new_path" 2> /dev/null`
44883     # bat and cmd files are not always considered executable in cygwin causing which
44884     # to not find them
44885     if test "x$new_path" = x \
44886         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44887         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44888       new_path=`$CYGPATH -u "$path"`
44889     fi
44890     if test "x$new_path" = x; then
44891       # It's still not found. Now this is an unrecoverable error.
44892       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44893 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44894       has_space=`$ECHO "$complete" | $GREP " "`
44895       if test "x$has_space" != x; then
44896         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44897 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44898       fi
44899       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44900     fi
44901   fi
44902 
44903   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44904   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44905   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44906   # "foo.exe" is OK but "foo" is an error.
44907   #
44908   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44909   # It is also a way to make sure we got the proper file name for the real test later on.
44910   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44911   if test "x$test_shortpath" = x; then
44912     # Short path failed, file does not exist as specified.
44913     # Try adding .exe or .cmd
44914     if test -f "${new_path}.exe"; then
44915       input_to_shortpath="${new_path}.exe"
44916     elif test -f "${new_path}.cmd"; then
44917       input_to_shortpath="${new_path}.cmd"
44918     else
44919       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
44920 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
44921       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44922 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44923       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44924     fi
44925   else
44926     input_to_shortpath="$new_path"
44927   fi
44928 
44929   # Call helper function which possibly converts this using DOS-style short mode.
44930   # If so, the updated path is stored in $new_path.
44931   new_path="$input_to_shortpath"
44932 
44933   input_path="$input_to_shortpath"
44934   # Check if we need to convert this using DOS-style short mode. If the path
44935   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44936   # take no chances and rewrite it.
44937   # Note: m4 eats our [], so we need to use [ and ] instead.
44938   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44939   if test "x$has_forbidden_chars" != x; then
44940     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44941     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44942     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44943     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44944       # Going to short mode and back again did indeed matter. Since short mode is
44945       # case insensitive, let's make it lowercase to improve readability.
44946       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44947       # Now convert it back to Unix-style (cygpath)
44948       input_path=`$CYGPATH -u "$shortmode_path"`
44949       new_path="$input_path"
44950     fi
44951   fi
44952 
44953   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44954   if test "x$test_cygdrive_prefix" = x; then
44955     # As a simple fix, exclude /usr/bin since it's not a real path.
44956     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44957       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44958       # a path prefixed by /cygdrive for fixpath to work.
44959       new_path="$CYGWIN_ROOT_PATH$input_path"
44960     fi
44961   fi
44962 
44963   # remove trailing .exe if any
44964   new_path="${new_path/%.exe/}"
44965 
44966     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44967 
44968   # First separate the path from the arguments. This will split at the first
44969   # space.
44970   complete="$BUILD_AR"
44971   path="${complete%% *}"
44972   tmp="$complete EOL"
44973   arguments="${tmp#* }"
44974 
44975   # Input might be given as Windows format, start by converting to
44976   # unix format.
44977   new_path="$path"
44978 
44979   windows_path="$new_path"
44980   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44981     unix_path=`$CYGPATH -u "$windows_path"`
44982     new_path="$unix_path"
44983   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44984     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44985     new_path="$unix_path"
44986   fi
44987 
44988 
44989   # Now try to locate executable using which
44990   new_path=`$WHICH "$new_path" 2> /dev/null`
44991 
44992   if test "x$new_path" = x; then
44993     # Oops. Which didn't find the executable.
44994     # The splitting of arguments from the executable at a space might have been incorrect,
44995     # since paths with space are more likely in Windows. Give it another try with the whole
44996     # argument.
44997     path="$complete"
44998     arguments="EOL"
44999     new_path="$path"
45000 
45001   windows_path="$new_path"
45002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45003     unix_path=`$CYGPATH -u "$windows_path"`
45004     new_path="$unix_path"
45005   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45006     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45007     new_path="$unix_path"
45008   fi
45009 
45010 
45011     new_path=`$WHICH "$new_path" 2> /dev/null`
45012     # bat and cmd files are not always considered executable in MSYS causing which
45013     # to not find them
45014     if test "x$new_path" = x \
45015         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45016         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45017       new_path="$path"
45018 
45019   windows_path="$new_path"
45020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45021     unix_path=`$CYGPATH -u "$windows_path"`
45022     new_path="$unix_path"
45023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45024     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45025     new_path="$unix_path"
45026   fi
45027 
45028     fi
45029 
45030     if test "x$new_path" = x; then
45031       # It's still not found. Now this is an unrecoverable error.
45032       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45033 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45034       has_space=`$ECHO "$complete" | $GREP " "`
45035       if test "x$has_space" != x; then
45036         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45037 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45038       fi
45039       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45040     fi
45041   fi
45042 
45043   # Now new_path has a complete unix path to the binary
45044   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45045     # Keep paths in /bin as-is, but remove trailing .exe if any
45046     new_path="${new_path/%.exe/}"
45047     # Do not save /bin paths to all_fixpath_prefixes!
45048   else
45049     # Not in mixed or Windows style, start by that.
45050     new_path=`cmd //c echo $new_path`
45051 
45052   input_path="$new_path"
45053   # Check if we need to convert this using DOS-style short mode. If the path
45054   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45055   # take no chances and rewrite it.
45056   # Note: m4 eats our [], so we need to use [ and ] instead.
45057   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45058   if test "x$has_forbidden_chars" != x; then
45059     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45060     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45061   fi
45062 
45063     # Output is in $new_path
45064 
45065   windows_path="$new_path"
45066   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45067     unix_path=`$CYGPATH -u "$windows_path"`
45068     new_path="$unix_path"
45069   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45070     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45071     new_path="$unix_path"
45072   fi
45073 
45074     # remove trailing .exe if any
45075     new_path="${new_path/%.exe/}"
45076 
45077     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45078     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45079   fi
45080 
45081     else
45082       # We're on a unix platform. Hooray! :)
45083       # First separate the path from the arguments. This will split at the first
45084       # space.
45085       complete="$BUILD_AR"
45086       path="${complete%% *}"
45087       tmp="$complete EOL"
45088       arguments="${tmp#* }"
45089 
45090       # Cannot rely on the command "which" here since it doesn't always work.
45091       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45092       if test -z "$is_absolute_path"; then
45093         # Path to executable is not absolute. Find it.
45094         IFS_save="$IFS"
45095         IFS=:
45096         for p in $PATH; do
45097           if test -f "$p/$path" && test -x "$p/$path"; then
45098             new_path="$p/$path"
45099             break
45100           fi
45101         done
45102         IFS="$IFS_save"
45103       else
45104         # This is an absolute path, we can use it without further modifications.
45105         new_path="$path"
45106       fi
45107 
45108       if test "x$new_path" = x; then
45109         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45110 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45111         has_space=`$ECHO "$complete" | $GREP " "`
45112         if test "x$has_space" != x; then
45113           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45114 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45115         fi
45116         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45117       fi
45118     fi
45119 
45120     # Now join together the path and the arguments once again
45121     if test "x$arguments" != xEOL; then
45122       new_complete="$new_path ${arguments% *}"
45123     else
45124       new_complete="$new_path"
45125     fi
45126 
45127     if test "x$complete" != "x$new_complete"; then
45128       BUILD_AR="$new_complete"
45129       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45130 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45131     fi
45132   fi
45133 
45134 
45135 
45136   # Publish this variable in the help.
45137 
45138 
45139   if [ -z "${BUILD_OBJCOPY+x}" ]; then
45140     # The variable is not set by user, try to locate tool using the code snippet
45141     for ac_prog in objcopy
45142 do
45143   # Extract the first word of "$ac_prog", so it can be a program name with args.
45144 set dummy $ac_prog; ac_word=$2
45145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45146 $as_echo_n "checking for $ac_word... " >&6; }
45147 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45148   $as_echo_n "(cached) " >&6
45149 else
45150   case $BUILD_OBJCOPY in
45151   [\\/]* | ?:[\\/]*)
45152   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45153   ;;
45154   *)
45155   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45156 for as_dir in $PATH
45157 do
45158   IFS=$as_save_IFS
45159   test -z "$as_dir" && as_dir=.
45160     for ac_exec_ext in '' $ac_executable_extensions; do
45161   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45162     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45164     break 2
45165   fi
45166 done
45167   done
45168 IFS=$as_save_IFS
45169 
45170   ;;
45171 esac
45172 fi
45173 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45174 if test -n "$BUILD_OBJCOPY"; then
45175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45176 $as_echo "$BUILD_OBJCOPY" >&6; }
45177 else
45178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45179 $as_echo "no" >&6; }
45180 fi
45181 
45182 
45183   test -n "$BUILD_OBJCOPY" && break
45184 done
45185 
45186   else
45187     # The variable is set, but is it from the command line or the environment?
45188 
45189     # Try to remove the string !BUILD_OBJCOPY! from our list.
45190     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
45191     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45192       # If it failed, the variable was not from the command line. Ignore it,
45193       # but warn the user (except for BASH, which is always set by the calling BASH).
45194       if test "xBUILD_OBJCOPY" != xBASH; then
45195         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
45196 $as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
45197       fi
45198       # Try to locate tool using the code snippet
45199       for ac_prog in objcopy
45200 do
45201   # Extract the first word of "$ac_prog", so it can be a program name with args.
45202 set dummy $ac_prog; ac_word=$2
45203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45204 $as_echo_n "checking for $ac_word... " >&6; }
45205 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45206   $as_echo_n "(cached) " >&6
45207 else
45208   case $BUILD_OBJCOPY in
45209   [\\/]* | ?:[\\/]*)
45210   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45211   ;;
45212   *)
45213   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45214 for as_dir in $PATH
45215 do
45216   IFS=$as_save_IFS
45217   test -z "$as_dir" && as_dir=.
45218     for ac_exec_ext in '' $ac_executable_extensions; do
45219   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45220     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45221     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45222     break 2
45223   fi
45224 done
45225   done
45226 IFS=$as_save_IFS
45227 
45228   ;;
45229 esac
45230 fi
45231 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45232 if test -n "$BUILD_OBJCOPY"; then
45233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45234 $as_echo "$BUILD_OBJCOPY" >&6; }
45235 else
45236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45237 $as_echo "no" >&6; }
45238 fi
45239 
45240 
45241   test -n "$BUILD_OBJCOPY" && break
45242 done
45243 
45244     else
45245       # If it succeeded, then it was overridden by the user. We will use it
45246       # for the tool.
45247 
45248       # First remove it from the list of overridden variables, so we can test
45249       # for unknown variables in the end.
45250       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45251 
45252       # Check if we try to supply an empty value
45253       if test "x$BUILD_OBJCOPY" = x; then
45254         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
45255 $as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
45256         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45257 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45258         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45259 $as_echo "disabled" >&6; }
45260       else
45261         # Check if the provided tool contains a complete path.
45262         tool_specified="$BUILD_OBJCOPY"
45263         tool_basename="${tool_specified##*/}"
45264         if test "x$tool_basename" = "x$tool_specified"; then
45265           # A command without a complete path is provided, search $PATH.
45266           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
45267 $as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
45268           # Extract the first word of "$tool_basename", so it can be a program name with args.
45269 set dummy $tool_basename; ac_word=$2
45270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45271 $as_echo_n "checking for $ac_word... " >&6; }
45272 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45273   $as_echo_n "(cached) " >&6
45274 else
45275   case $BUILD_OBJCOPY in
45276   [\\/]* | ?:[\\/]*)
45277   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45278   ;;
45279   *)
45280   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45281 for as_dir in $PATH
45282 do
45283   IFS=$as_save_IFS
45284   test -z "$as_dir" && as_dir=.
45285     for ac_exec_ext in '' $ac_executable_extensions; do
45286   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45287     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45288     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45289     break 2
45290   fi
45291 done
45292   done
45293 IFS=$as_save_IFS
45294 
45295   ;;
45296 esac
45297 fi
45298 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45299 if test -n "$BUILD_OBJCOPY"; then
45300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45301 $as_echo "$BUILD_OBJCOPY" >&6; }
45302 else
45303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45304 $as_echo "no" >&6; }
45305 fi
45306 
45307 
45308           if test "x$BUILD_OBJCOPY" = x; then
45309             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45310           fi
45311         else
45312           # Otherwise we believe it is a complete path. Use it as it is.
45313           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
45314 $as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
45315           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45316 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45317           if test ! -x "$tool_specified"; then
45318             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45319 $as_echo "not found" >&6; }
45320             as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
45321           fi
45322           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45323 $as_echo "$tool_specified" >&6; }
45324         fi
45325       fi
45326     fi
45327 
45328   fi
45329 
45330 
45331 
45332   # Only process if variable expands to non-empty
45333 
45334   if test "x$BUILD_OBJCOPY" != x; then
45335     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45336 
45337   # First separate the path from the arguments. This will split at the first
45338   # space.
45339   complete="$BUILD_OBJCOPY"
45340   path="${complete%% *}"
45341   tmp="$complete EOL"
45342   arguments="${tmp#* }"
45343 
45344   # Input might be given as Windows format, start by converting to
45345   # unix format.
45346   new_path=`$CYGPATH -u "$path"`
45347 
45348   # Now try to locate executable using which
45349   new_path=`$WHICH "$new_path" 2> /dev/null`
45350   # bat and cmd files are not always considered executable in cygwin causing which
45351   # to not find them
45352   if test "x$new_path" = x \
45353       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45354       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45355     new_path=`$CYGPATH -u "$path"`
45356   fi
45357   if test "x$new_path" = x; then
45358     # Oops. Which didn't find the executable.
45359     # The splitting of arguments from the executable at a space might have been incorrect,
45360     # since paths with space are more likely in Windows. Give it another try with the whole
45361     # argument.
45362     path="$complete"
45363     arguments="EOL"
45364     new_path=`$CYGPATH -u "$path"`
45365     new_path=`$WHICH "$new_path" 2> /dev/null`
45366     # bat and cmd files are not always considered executable in cygwin causing which
45367     # to not find them
45368     if test "x$new_path" = x \
45369         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45370         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45371       new_path=`$CYGPATH -u "$path"`
45372     fi
45373     if test "x$new_path" = x; then
45374       # It's still not found. Now this is an unrecoverable error.
45375       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45376 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45377       has_space=`$ECHO "$complete" | $GREP " "`
45378       if test "x$has_space" != x; then
45379         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45380 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45381       fi
45382       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45383     fi
45384   fi
45385 
45386   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45387   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45388   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45389   # "foo.exe" is OK but "foo" is an error.
45390   #
45391   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45392   # It is also a way to make sure we got the proper file name for the real test later on.
45393   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45394   if test "x$test_shortpath" = x; then
45395     # Short path failed, file does not exist as specified.
45396     # Try adding .exe or .cmd
45397     if test -f "${new_path}.exe"; then
45398       input_to_shortpath="${new_path}.exe"
45399     elif test -f "${new_path}.cmd"; then
45400       input_to_shortpath="${new_path}.cmd"
45401     else
45402       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
45403 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
45404       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45405 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45406       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45407     fi
45408   else
45409     input_to_shortpath="$new_path"
45410   fi
45411 
45412   # Call helper function which possibly converts this using DOS-style short mode.
45413   # If so, the updated path is stored in $new_path.
45414   new_path="$input_to_shortpath"
45415 
45416   input_path="$input_to_shortpath"
45417   # Check if we need to convert this using DOS-style short mode. If the path
45418   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45419   # take no chances and rewrite it.
45420   # Note: m4 eats our [], so we need to use [ and ] instead.
45421   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45422   if test "x$has_forbidden_chars" != x; then
45423     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45424     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45425     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45426     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45427       # Going to short mode and back again did indeed matter. Since short mode is
45428       # case insensitive, let's make it lowercase to improve readability.
45429       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45430       # Now convert it back to Unix-style (cygpath)
45431       input_path=`$CYGPATH -u "$shortmode_path"`
45432       new_path="$input_path"
45433     fi
45434   fi
45435 
45436   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45437   if test "x$test_cygdrive_prefix" = x; then
45438     # As a simple fix, exclude /usr/bin since it's not a real path.
45439     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45440       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45441       # a path prefixed by /cygdrive for fixpath to work.
45442       new_path="$CYGWIN_ROOT_PATH$input_path"
45443     fi
45444   fi
45445 
45446   # remove trailing .exe if any
45447   new_path="${new_path/%.exe/}"
45448 
45449     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45450 
45451   # First separate the path from the arguments. This will split at the first
45452   # space.
45453   complete="$BUILD_OBJCOPY"
45454   path="${complete%% *}"
45455   tmp="$complete EOL"
45456   arguments="${tmp#* }"
45457 
45458   # Input might be given as Windows format, start by converting to
45459   # unix format.
45460   new_path="$path"
45461 
45462   windows_path="$new_path"
45463   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45464     unix_path=`$CYGPATH -u "$windows_path"`
45465     new_path="$unix_path"
45466   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45467     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45468     new_path="$unix_path"
45469   fi
45470 
45471 
45472   # Now try to locate executable using which
45473   new_path=`$WHICH "$new_path" 2> /dev/null`
45474 
45475   if test "x$new_path" = x; then
45476     # Oops. Which didn't find the executable.
45477     # The splitting of arguments from the executable at a space might have been incorrect,
45478     # since paths with space are more likely in Windows. Give it another try with the whole
45479     # argument.
45480     path="$complete"
45481     arguments="EOL"
45482     new_path="$path"
45483 
45484   windows_path="$new_path"
45485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45486     unix_path=`$CYGPATH -u "$windows_path"`
45487     new_path="$unix_path"
45488   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45489     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45490     new_path="$unix_path"
45491   fi
45492 
45493 
45494     new_path=`$WHICH "$new_path" 2> /dev/null`
45495     # bat and cmd files are not always considered executable in MSYS causing which
45496     # to not find them
45497     if test "x$new_path" = x \
45498         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45499         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45500       new_path="$path"
45501 
45502   windows_path="$new_path"
45503   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45504     unix_path=`$CYGPATH -u "$windows_path"`
45505     new_path="$unix_path"
45506   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45507     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45508     new_path="$unix_path"
45509   fi
45510 
45511     fi
45512 
45513     if test "x$new_path" = x; then
45514       # It's still not found. Now this is an unrecoverable error.
45515       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45516 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45517       has_space=`$ECHO "$complete" | $GREP " "`
45518       if test "x$has_space" != x; then
45519         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45520 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45521       fi
45522       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45523     fi
45524   fi
45525 
45526   # Now new_path has a complete unix path to the binary
45527   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45528     # Keep paths in /bin as-is, but remove trailing .exe if any
45529     new_path="${new_path/%.exe/}"
45530     # Do not save /bin paths to all_fixpath_prefixes!
45531   else
45532     # Not in mixed or Windows style, start by that.
45533     new_path=`cmd //c echo $new_path`
45534 
45535   input_path="$new_path"
45536   # Check if we need to convert this using DOS-style short mode. If the path
45537   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45538   # take no chances and rewrite it.
45539   # Note: m4 eats our [], so we need to use [ and ] instead.
45540   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45541   if test "x$has_forbidden_chars" != x; then
45542     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45543     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45544   fi
45545 
45546     # Output is in $new_path
45547 
45548   windows_path="$new_path"
45549   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45550     unix_path=`$CYGPATH -u "$windows_path"`
45551     new_path="$unix_path"
45552   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45553     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45554     new_path="$unix_path"
45555   fi
45556 
45557     # remove trailing .exe if any
45558     new_path="${new_path/%.exe/}"
45559 
45560     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45561     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45562   fi
45563 
45564     else
45565       # We're on a unix platform. Hooray! :)
45566       # First separate the path from the arguments. This will split at the first
45567       # space.
45568       complete="$BUILD_OBJCOPY"
45569       path="${complete%% *}"
45570       tmp="$complete EOL"
45571       arguments="${tmp#* }"
45572 
45573       # Cannot rely on the command "which" here since it doesn't always work.
45574       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45575       if test -z "$is_absolute_path"; then
45576         # Path to executable is not absolute. Find it.
45577         IFS_save="$IFS"
45578         IFS=:
45579         for p in $PATH; do
45580           if test -f "$p/$path" && test -x "$p/$path"; then
45581             new_path="$p/$path"
45582             break
45583           fi
45584         done
45585         IFS="$IFS_save"
45586       else
45587         # This is an absolute path, we can use it without further modifications.
45588         new_path="$path"
45589       fi
45590 
45591       if test "x$new_path" = x; then
45592         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45593 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45594         has_space=`$ECHO "$complete" | $GREP " "`
45595         if test "x$has_space" != x; then
45596           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45597 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45598         fi
45599         as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45600       fi
45601     fi
45602 
45603     # Now join together the path and the arguments once again
45604     if test "x$arguments" != xEOL; then
45605       new_complete="$new_path ${arguments% *}"
45606     else
45607       new_complete="$new_path"
45608     fi
45609 
45610     if test "x$complete" != "x$new_complete"; then
45611       BUILD_OBJCOPY="$new_complete"
45612       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
45613 $as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
45614     fi
45615   fi
45616 
45617 
45618 
45619   # Publish this variable in the help.
45620 
45621 
45622   if [ -z "${BUILD_STRIP+x}" ]; then
45623     # The variable is not set by user, try to locate tool using the code snippet
45624     for ac_prog in strip
45625 do
45626   # Extract the first word of "$ac_prog", so it can be a program name with args.
45627 set dummy $ac_prog; ac_word=$2
45628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45629 $as_echo_n "checking for $ac_word... " >&6; }
45630 if ${ac_cv_path_BUILD_STRIP+:} false; then :
45631   $as_echo_n "(cached) " >&6
45632 else
45633   case $BUILD_STRIP in
45634   [\\/]* | ?:[\\/]*)
45635   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
45636   ;;
45637   *)
45638   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45639 for as_dir in $PATH
45640 do
45641   IFS=$as_save_IFS
45642   test -z "$as_dir" && as_dir=.
45643     for ac_exec_ext in '' $ac_executable_extensions; do
45644   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45645     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
45646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45647     break 2
45648   fi
45649 done
45650   done
45651 IFS=$as_save_IFS
45652 
45653   ;;
45654 esac
45655 fi
45656 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
45657 if test -n "$BUILD_STRIP"; then
45658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
45659 $as_echo "$BUILD_STRIP" >&6; }
45660 else
45661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45662 $as_echo "no" >&6; }
45663 fi
45664 
45665 
45666   test -n "$BUILD_STRIP" && break
45667 done
45668 
45669   else
45670     # The variable is set, but is it from the command line or the environment?
45671 
45672     # Try to remove the string !BUILD_STRIP! from our list.
45673     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
45674     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45675       # If it failed, the variable was not from the command line. Ignore it,
45676       # but warn the user (except for BASH, which is always set by the calling BASH).
45677       if test "xBUILD_STRIP" != xBASH; then
45678         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
45679 $as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
45680       fi
45681       # Try to locate tool using the code snippet
45682       for ac_prog in strip
45683 do
45684   # Extract the first word of "$ac_prog", so it can be a program name with args.
45685 set dummy $ac_prog; ac_word=$2
45686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45687 $as_echo_n "checking for $ac_word... " >&6; }
45688 if ${ac_cv_path_BUILD_STRIP+:} false; then :
45689   $as_echo_n "(cached) " >&6
45690 else
45691   case $BUILD_STRIP in
45692   [\\/]* | ?:[\\/]*)
45693   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
45694   ;;
45695   *)
45696   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45697 for as_dir in $PATH
45698 do
45699   IFS=$as_save_IFS
45700   test -z "$as_dir" && as_dir=.
45701     for ac_exec_ext in '' $ac_executable_extensions; do
45702   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45703     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
45704     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45705     break 2
45706   fi
45707 done
45708   done
45709 IFS=$as_save_IFS
45710 
45711   ;;
45712 esac
45713 fi
45714 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
45715 if test -n "$BUILD_STRIP"; then
45716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
45717 $as_echo "$BUILD_STRIP" >&6; }
45718 else
45719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45720 $as_echo "no" >&6; }
45721 fi
45722 
45723 
45724   test -n "$BUILD_STRIP" && break
45725 done
45726 
45727     else
45728       # If it succeeded, then it was overridden by the user. We will use it
45729       # for the tool.
45730 
45731       # First remove it from the list of overridden variables, so we can test
45732       # for unknown variables in the end.
45733       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45734 
45735       # Check if we try to supply an empty value
45736       if test "x$BUILD_STRIP" = x; then
45737         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
45738 $as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
45739         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
45740 $as_echo_n "checking for BUILD_STRIP... " >&6; }
45741         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45742 $as_echo "disabled" >&6; }
45743       else
45744         # Check if the provided tool contains a complete path.
45745         tool_specified="$BUILD_STRIP"
45746         tool_basename="${tool_specified##*/}"
45747         if test "x$tool_basename" = "x$tool_specified"; then
45748           # A command without a complete path is provided, search $PATH.
45749           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
45750 $as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
45751           # Extract the first word of "$tool_basename", so it can be a program name with args.
45752 set dummy $tool_basename; ac_word=$2
45753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45754 $as_echo_n "checking for $ac_word... " >&6; }
45755 if ${ac_cv_path_BUILD_STRIP+:} false; then :
45756   $as_echo_n "(cached) " >&6
45757 else
45758   case $BUILD_STRIP in
45759   [\\/]* | ?:[\\/]*)
45760   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
45761   ;;
45762   *)
45763   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45764 for as_dir in $PATH
45765 do
45766   IFS=$as_save_IFS
45767   test -z "$as_dir" && as_dir=.
45768     for ac_exec_ext in '' $ac_executable_extensions; do
45769   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45770     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
45771     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45772     break 2
45773   fi
45774 done
45775   done
45776 IFS=$as_save_IFS
45777 
45778   ;;
45779 esac
45780 fi
45781 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
45782 if test -n "$BUILD_STRIP"; then
45783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
45784 $as_echo "$BUILD_STRIP" >&6; }
45785 else
45786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45787 $as_echo "no" >&6; }
45788 fi
45789 
45790 
45791           if test "x$BUILD_STRIP" = x; then
45792             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45793           fi
45794         else
45795           # Otherwise we believe it is a complete path. Use it as it is.
45796           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
45797 $as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
45798           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
45799 $as_echo_n "checking for BUILD_STRIP... " >&6; }
45800           if test ! -x "$tool_specified"; then
45801             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45802 $as_echo "not found" >&6; }
45803             as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
45804           fi
45805           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45806 $as_echo "$tool_specified" >&6; }
45807         fi
45808       fi
45809     fi
45810 
45811   fi
45812 
45813 
45814 
45815   # Only process if variable expands to non-empty
45816 
45817   if test "x$BUILD_STRIP" != x; then
45818     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45819 
45820   # First separate the path from the arguments. This will split at the first
45821   # space.
45822   complete="$BUILD_STRIP"
45823   path="${complete%% *}"
45824   tmp="$complete EOL"
45825   arguments="${tmp#* }"
45826 
45827   # Input might be given as Windows format, start by converting to
45828   # unix format.
45829   new_path=`$CYGPATH -u "$path"`
45830 
45831   # Now try to locate executable using which
45832   new_path=`$WHICH "$new_path" 2> /dev/null`
45833   # bat and cmd files are not always considered executable in cygwin causing which
45834   # to not find them
45835   if test "x$new_path" = x \
45836       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45837       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45838     new_path=`$CYGPATH -u "$path"`
45839   fi
45840   if test "x$new_path" = x; then
45841     # Oops. Which didn't find the executable.
45842     # The splitting of arguments from the executable at a space might have been incorrect,
45843     # since paths with space are more likely in Windows. Give it another try with the whole
45844     # argument.
45845     path="$complete"
45846     arguments="EOL"
45847     new_path=`$CYGPATH -u "$path"`
45848     new_path=`$WHICH "$new_path" 2> /dev/null`
45849     # bat and cmd files are not always considered executable in cygwin causing which
45850     # to not find them
45851     if test "x$new_path" = x \
45852         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45853         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45854       new_path=`$CYGPATH -u "$path"`
45855     fi
45856     if test "x$new_path" = x; then
45857       # It's still not found. Now this is an unrecoverable error.
45858       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
45859 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
45860       has_space=`$ECHO "$complete" | $GREP " "`
45861       if test "x$has_space" != x; then
45862         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45863 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45864       fi
45865       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
45866     fi
45867   fi
45868 
45869   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45870   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45871   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45872   # "foo.exe" is OK but "foo" is an error.
45873   #
45874   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45875   # It is also a way to make sure we got the proper file name for the real test later on.
45876   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45877   if test "x$test_shortpath" = x; then
45878     # Short path failed, file does not exist as specified.
45879     # Try adding .exe or .cmd
45880     if test -f "${new_path}.exe"; then
45881       input_to_shortpath="${new_path}.exe"
45882     elif test -f "${new_path}.cmd"; then
45883       input_to_shortpath="${new_path}.cmd"
45884     else
45885       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
45886 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
45887       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45888 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45889       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
45890     fi
45891   else
45892     input_to_shortpath="$new_path"
45893   fi
45894 
45895   # Call helper function which possibly converts this using DOS-style short mode.
45896   # If so, the updated path is stored in $new_path.
45897   new_path="$input_to_shortpath"
45898 
45899   input_path="$input_to_shortpath"
45900   # Check if we need to convert this using DOS-style short mode. If the path
45901   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45902   # take no chances and rewrite it.
45903   # Note: m4 eats our [], so we need to use [ and ] instead.
45904   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45905   if test "x$has_forbidden_chars" != x; then
45906     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45907     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45908     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45909     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45910       # Going to short mode and back again did indeed matter. Since short mode is
45911       # case insensitive, let's make it lowercase to improve readability.
45912       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45913       # Now convert it back to Unix-style (cygpath)
45914       input_path=`$CYGPATH -u "$shortmode_path"`
45915       new_path="$input_path"
45916     fi
45917   fi
45918 
45919   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45920   if test "x$test_cygdrive_prefix" = x; then
45921     # As a simple fix, exclude /usr/bin since it's not a real path.
45922     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45923       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45924       # a path prefixed by /cygdrive for fixpath to work.
45925       new_path="$CYGWIN_ROOT_PATH$input_path"
45926     fi
45927   fi
45928 
45929   # remove trailing .exe if any
45930   new_path="${new_path/%.exe/}"
45931 
45932     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45933 
45934   # First separate the path from the arguments. This will split at the first
45935   # space.
45936   complete="$BUILD_STRIP"
45937   path="${complete%% *}"
45938   tmp="$complete EOL"
45939   arguments="${tmp#* }"
45940 
45941   # Input might be given as Windows format, start by converting to
45942   # unix format.
45943   new_path="$path"
45944 
45945   windows_path="$new_path"
45946   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45947     unix_path=`$CYGPATH -u "$windows_path"`
45948     new_path="$unix_path"
45949   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45950     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45951     new_path="$unix_path"
45952   fi
45953 
45954 
45955   # Now try to locate executable using which
45956   new_path=`$WHICH "$new_path" 2> /dev/null`
45957 
45958   if test "x$new_path" = x; then
45959     # Oops. Which didn't find the executable.
45960     # The splitting of arguments from the executable at a space might have been incorrect,
45961     # since paths with space are more likely in Windows. Give it another try with the whole
45962     # argument.
45963     path="$complete"
45964     arguments="EOL"
45965     new_path="$path"
45966 
45967   windows_path="$new_path"
45968   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45969     unix_path=`$CYGPATH -u "$windows_path"`
45970     new_path="$unix_path"
45971   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45972     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45973     new_path="$unix_path"
45974   fi
45975 
45976 
45977     new_path=`$WHICH "$new_path" 2> /dev/null`
45978     # bat and cmd files are not always considered executable in MSYS causing which
45979     # to not find them
45980     if test "x$new_path" = x \
45981         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45982         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45983       new_path="$path"
45984 
45985   windows_path="$new_path"
45986   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45987     unix_path=`$CYGPATH -u "$windows_path"`
45988     new_path="$unix_path"
45989   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45990     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45991     new_path="$unix_path"
45992   fi
45993 
45994     fi
45995 
45996     if test "x$new_path" = x; then
45997       # It's still not found. Now this is an unrecoverable error.
45998       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
45999 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46000       has_space=`$ECHO "$complete" | $GREP " "`
46001       if test "x$has_space" != x; then
46002         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46003 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46004       fi
46005       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46006     fi
46007   fi
46008 
46009   # Now new_path has a complete unix path to the binary
46010   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46011     # Keep paths in /bin as-is, but remove trailing .exe if any
46012     new_path="${new_path/%.exe/}"
46013     # Do not save /bin paths to all_fixpath_prefixes!
46014   else
46015     # Not in mixed or Windows style, start by that.
46016     new_path=`cmd //c echo $new_path`
46017 
46018   input_path="$new_path"
46019   # Check if we need to convert this using DOS-style short mode. If the path
46020   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46021   # take no chances and rewrite it.
46022   # Note: m4 eats our [], so we need to use [ and ] instead.
46023   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46024   if test "x$has_forbidden_chars" != x; then
46025     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46026     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46027   fi
46028 
46029     # Output is in $new_path
46030 
46031   windows_path="$new_path"
46032   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46033     unix_path=`$CYGPATH -u "$windows_path"`
46034     new_path="$unix_path"
46035   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46036     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46037     new_path="$unix_path"
46038   fi
46039 
46040     # remove trailing .exe if any
46041     new_path="${new_path/%.exe/}"
46042 
46043     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46044     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46045   fi
46046 
46047     else
46048       # We're on a unix platform. Hooray! :)
46049       # First separate the path from the arguments. This will split at the first
46050       # space.
46051       complete="$BUILD_STRIP"
46052       path="${complete%% *}"
46053       tmp="$complete EOL"
46054       arguments="${tmp#* }"
46055 
46056       # Cannot rely on the command "which" here since it doesn't always work.
46057       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46058       if test -z "$is_absolute_path"; then
46059         # Path to executable is not absolute. Find it.
46060         IFS_save="$IFS"
46061         IFS=:
46062         for p in $PATH; do
46063           if test -f "$p/$path" && test -x "$p/$path"; then
46064             new_path="$p/$path"
46065             break
46066           fi
46067         done
46068         IFS="$IFS_save"
46069       else
46070         # This is an absolute path, we can use it without further modifications.
46071         new_path="$path"
46072       fi
46073 
46074       if test "x$new_path" = x; then
46075         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46076 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46077         has_space=`$ECHO "$complete" | $GREP " "`
46078         if test "x$has_space" != x; then
46079           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46080 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46081         fi
46082         as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46083       fi
46084     fi
46085 
46086     # Now join together the path and the arguments once again
46087     if test "x$arguments" != xEOL; then
46088       new_complete="$new_path ${arguments% *}"
46089     else
46090       new_complete="$new_path"
46091     fi
46092 
46093     if test "x$complete" != "x$new_complete"; then
46094       BUILD_STRIP="$new_complete"
46095       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46096 $as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46097     fi
46098   fi
46099 
46100     # Assume the C compiler is the assembler
46101     BUILD_AS="$BUILD_CC -c"
46102     # Just like for the target compiler, use the compiler as linker
46103     BUILD_LD="$BUILD_CC"
46104     BUILD_LDCXX="$BUILD_CXX"
46105 
46106     PATH="$OLDPATH"
46107   else
46108     # If we are not cross compiling, use the normal target compilers for
46109     # building the build platform executables.
46110     BUILD_CC="$CC"
46111     BUILD_CXX="$CXX"
46112     BUILD_LD="$LD"
46113     BUILD_LDCXX="$LDCXX"
46114     BUILD_NM="$NM"
46115     BUILD_AS="$AS"
46116     BUILD_OBJCOPY="$OBJCOPY"
46117     BUILD_STRIP="$STRIP"
46118     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
46119     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
46120     BUILD_AR="$AR"
46121   fi
46122 
46123 
46124 
46125 
46126 
46127 
46128 
46129 
46130 
46131 
46132 
46133 
46134   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46135     # For hotspot, we need these in Windows mixed path,
46136     # so rewrite them all. Need added .exe suffix.
46137     HOTSPOT_CXX="$CXX.exe"
46138     HOTSPOT_LD="$LD.exe"
46139     HOTSPOT_MT="$MT.exe"
46140     HOTSPOT_RC="$RC.exe"
46141 
46142   unix_path="$HOTSPOT_CXX"
46143   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46144     windows_path=`$CYGPATH -m "$unix_path"`
46145     HOTSPOT_CXX="$windows_path"
46146   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46147     windows_path=`cmd //c echo $unix_path`
46148     HOTSPOT_CXX="$windows_path"
46149   fi
46150 
46151 
46152   unix_path="$HOTSPOT_LD"
46153   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46154     windows_path=`$CYGPATH -m "$unix_path"`
46155     HOTSPOT_LD="$windows_path"
46156   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46157     windows_path=`cmd //c echo $unix_path`
46158     HOTSPOT_LD="$windows_path"
46159   fi
46160 
46161 
46162   unix_path="$HOTSPOT_MT"
46163   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46164     windows_path=`$CYGPATH -m "$unix_path"`
46165     HOTSPOT_MT="$windows_path"
46166   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46167     windows_path=`cmd //c echo $unix_path`
46168     HOTSPOT_MT="$windows_path"
46169   fi
46170 
46171 
46172   unix_path="$HOTSPOT_RC"
46173   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46174     windows_path=`$CYGPATH -m "$unix_path"`
46175     HOTSPOT_RC="$windows_path"
46176   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46177     windows_path=`cmd //c echo $unix_path`
46178     HOTSPOT_RC="$windows_path"
46179   fi
46180 
46181 
46182 
46183   else
46184     HOTSPOT_CXX="$CXX"
46185     HOTSPOT_LD="$LD"
46186   fi
46187 
46188 
46189 
46190   if test  "x$TOOLCHAIN_TYPE" = xclang; then
46191     USE_CLANG=true
46192   fi
46193 
46194 
46195 
46196 
46197 
46198   # The package path is used only on macosx?
46199   # FIXME: clean this up, and/or move it elsewhere.
46200   PACKAGE_PATH=/opt/local
46201 
46202 
46203   # Check for extra potential brokenness.
46204   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46205     # On Windows, double-check that we got the right compiler.
46206     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46207     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
46208     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
46209       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
46210         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
46211       fi
46212     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
46213       if test "x$COMPILER_CPU_TEST" != "xx64"; then
46214         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
46215       fi
46216     fi
46217   fi
46218 
46219   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46220     # If this is a --hash-style=gnu system, use --hash-style=both, why?
46221     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
46222     # This is later checked when setting flags.
46223 
46224     # "-Og" suppported for GCC 4.8 and later
46225     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
46226 
46227 
46228 
46229 
46230 
46231 
46232 
46233 
46234 
46235 
46236 
46237 
46238 
46239 
46240 
46241 
46242 
46243 
46244 
46245 
46246 
46247 
46248 
46249 
46250 
46251 
46252 
46253 
46254 
46255 
46256 
46257 
46258 
46259 
46260 
46261 
46262 
46263 
46264 
46265 
46266 
46267 
46268 
46269 
46270 
46271 
46272 
46273     # Execute function body
46274 
46275 
46276 
46277 
46278 
46279 
46280 
46281 
46282 
46283 
46284 
46285 
46286 
46287 
46288 
46289 
46290 
46291 
46292 
46293 
46294 
46295 
46296 
46297 
46298 
46299 
46300 
46301 
46302 
46303 
46304 
46305 
46306 
46307 
46308 
46309 
46310 
46311 
46312 
46313 
46314 
46315 
46316 
46317 
46318 
46319 
46320 
46321 
46322     # Execute function body
46323 
46324   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46325 $as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46326   supports=yes
46327 
46328   saved_cflags="$CFLAGS"
46329   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
46330   ac_ext=c
46331 ac_cpp='$CPP $CPPFLAGS'
46332 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46333 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46334 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46335 
46336   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46337 /* end confdefs.h.  */
46338 int i;
46339 _ACEOF
46340 if ac_fn_c_try_compile "$LINENO"; then :
46341 
46342 else
46343   supports=no
46344 fi
46345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46346   ac_ext=cpp
46347 ac_cpp='$CXXCPP $CPPFLAGS'
46348 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46349 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46350 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46351 
46352   CFLAGS="$saved_cflags"
46353 
46354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46355 $as_echo "$supports" >&6; }
46356   if test "x$supports" = "xyes" ; then
46357     :
46358     C_COMP_SUPPORTS="yes"
46359   else
46360     :
46361     C_COMP_SUPPORTS="no"
46362   fi
46363 
46364 
46365 
46366 
46367 
46368 
46369 
46370 
46371 
46372 
46373 
46374 
46375 
46376 
46377 
46378 
46379 
46380 
46381 
46382 
46383 
46384 
46385 
46386 
46387 
46388 
46389 
46390 
46391 
46392 
46393 
46394 
46395 
46396 
46397 
46398 
46399 
46400 
46401 
46402 
46403 
46404 
46405 
46406 
46407 
46408 
46409 
46410 
46411 
46412 
46413 
46414 
46415 
46416 
46417 
46418 
46419 
46420 
46421 
46422     # Execute function body
46423 
46424   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46425 $as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46426   supports=yes
46427 
46428   saved_cxxflags="$CXXFLAGS"
46429   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
46430   ac_ext=cpp
46431 ac_cpp='$CXXCPP $CPPFLAGS'
46432 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46433 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46434 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46435 
46436   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46437 /* end confdefs.h.  */
46438 int i;
46439 _ACEOF
46440 if ac_fn_cxx_try_compile "$LINENO"; then :
46441 
46442 else
46443   supports=no
46444 fi
46445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46446   ac_ext=cpp
46447 ac_cpp='$CXXCPP $CPPFLAGS'
46448 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46449 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46450 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46451 
46452   CXXFLAGS="$saved_cxxflags"
46453 
46454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46455 $as_echo "$supports" >&6; }
46456   if test "x$supports" = "xyes" ; then
46457     :
46458     CXX_COMP_SUPPORTS="yes"
46459   else
46460     :
46461     CXX_COMP_SUPPORTS="no"
46462   fi
46463 
46464 
46465 
46466 
46467 
46468 
46469 
46470 
46471 
46472 
46473 
46474 
46475 
46476   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46477 $as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46478   supports=no
46479   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
46480 
46481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46482 $as_echo "$supports" >&6; }
46483   if test "x$supports" = "xyes" ; then
46484     :
46485     HAS_CFLAG_OPTIMIZE_DEBUG=true
46486   else
46487     :
46488     HAS_CFLAG_OPTIMIZE_DEBUG=false
46489   fi
46490 
46491 
46492 
46493 
46494 
46495 
46496 
46497     # "-z relro" supported in GNU binutils 2.17 and later
46498     LINKER_RELRO_FLAG="-Wl,-z,relro"
46499 
46500 
46501 
46502 
46503 
46504 
46505 
46506 
46507 
46508 
46509 
46510 
46511 
46512 
46513 
46514 
46515 
46516 
46517 
46518 
46519 
46520 
46521 
46522 
46523 
46524 
46525 
46526 
46527 
46528 
46529 
46530 
46531 
46532 
46533 
46534 
46535 
46536 
46537 
46538 
46539 
46540 
46541 
46542 
46543 
46544 
46545 
46546     # Execute function body
46547 
46548   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
46549 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
46550   supports=yes
46551 
46552   saved_ldflags="$LDFLAGS"
46553   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
46554   ac_ext=c
46555 ac_cpp='$CPP $CPPFLAGS'
46556 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46557 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46558 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46559 
46560   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46561 /* end confdefs.h.  */
46562 
46563 int
46564 main ()
46565 {
46566 
46567   ;
46568   return 0;
46569 }
46570 _ACEOF
46571 if ac_fn_c_try_link "$LINENO"; then :
46572 
46573 else
46574   supports=no
46575 fi
46576 rm -f core conftest.err conftest.$ac_objext \
46577     conftest$ac_exeext conftest.$ac_ext
46578   ac_ext=cpp
46579 ac_cpp='$CXXCPP $CPPFLAGS'
46580 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46581 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46582 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46583 
46584   LDFLAGS="$saved_ldflags"
46585 
46586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46587 $as_echo "$supports" >&6; }
46588   if test "x$supports" = "xyes" ; then
46589     :
46590     HAS_LINKER_RELRO=true
46591   else
46592     :
46593     HAS_LINKER_RELRO=false
46594   fi
46595 
46596 
46597 
46598 
46599 
46600 
46601 
46602 
46603 
46604 
46605 
46606 
46607 
46608     # "-z now" supported in GNU binutils 2.11 and later
46609     LINKER_NOW_FLAG="-Wl,-z,now"
46610 
46611 
46612 
46613 
46614 
46615 
46616 
46617 
46618 
46619 
46620 
46621 
46622 
46623 
46624 
46625 
46626 
46627 
46628 
46629 
46630 
46631 
46632 
46633 
46634 
46635 
46636 
46637 
46638 
46639 
46640 
46641 
46642 
46643 
46644 
46645 
46646 
46647 
46648 
46649 
46650 
46651 
46652 
46653 
46654 
46655 
46656 
46657     # Execute function body
46658 
46659   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
46660 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
46661   supports=yes
46662 
46663   saved_ldflags="$LDFLAGS"
46664   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
46665   ac_ext=c
46666 ac_cpp='$CPP $CPPFLAGS'
46667 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46668 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46669 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46670 
46671   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46672 /* end confdefs.h.  */
46673 
46674 int
46675 main ()
46676 {
46677 
46678   ;
46679   return 0;
46680 }
46681 _ACEOF
46682 if ac_fn_c_try_link "$LINENO"; then :
46683 
46684 else
46685   supports=no
46686 fi
46687 rm -f core conftest.err conftest.$ac_objext \
46688     conftest$ac_exeext conftest.$ac_ext
46689   ac_ext=cpp
46690 ac_cpp='$CXXCPP $CPPFLAGS'
46691 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46692 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46693 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46694 
46695   LDFLAGS="$saved_ldflags"
46696 
46697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46698 $as_echo "$supports" >&6; }
46699   if test "x$supports" = "xyes" ; then
46700     :
46701     HAS_LINKER_NOW=true
46702   else
46703     :
46704     HAS_LINKER_NOW=false
46705   fi
46706 
46707 
46708 
46709 
46710 
46711 
46712 
46713 
46714 
46715 
46716 
46717 
46718   fi
46719 
46720   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
46721   # in executable.'
46722   USING_BROKEN_SUSE_LD=no
46723   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
46724     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
46725 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
46726     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
46727     $ECHO "int main() { }" > main.c
46728     if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
46729       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46730 $as_echo "no" >&6; }
46731       USING_BROKEN_SUSE_LD=no
46732     else
46733       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46734 $as_echo "yes" >&6; }
46735       USING_BROKEN_SUSE_LD=yes
46736     fi
46737     rm -rf version-script.map main.c a.out
46738   fi
46739 
46740 
46741 
46742 # Setup the JTReg Regression Test Harness.
46743 
46744 
46745 # Check whether --with-jtreg was given.
46746 if test "${with_jtreg+set}" = set; then :
46747   withval=$with_jtreg;
46748 else
46749   with_jtreg=no
46750 fi
46751 
46752 
46753   if test "x$with_jtreg" = xno; then
46754     # jtreg disabled
46755     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
46756 $as_echo_n "checking for jtreg... " >&6; }
46757     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46758 $as_echo "no" >&6; }
46759   else
46760     if test "x$with_jtreg" != xyes; then
46761       # with path specified.
46762       JT_HOME="$with_jtreg"
46763     fi
46764 
46765     if test "x$JT_HOME" != x; then
46766       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
46767 $as_echo_n "checking for jtreg... " >&6; }
46768 
46769       # use JT_HOME enviroment var.
46770 
46771   # Only process if variable expands to non-empty
46772 
46773   if test "x$JT_HOME" != x; then
46774     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46775 
46776   # Input might be given as Windows format, start by converting to
46777   # unix format.
46778   path="$JT_HOME"
46779   new_path=`$CYGPATH -u "$path"`
46780 
46781   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46782   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46783   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46784   # "foo.exe" is OK but "foo" is an error.
46785   #
46786   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46787   # It is also a way to make sure we got the proper file name for the real test later on.
46788   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46789   if test "x$test_shortpath" = x; then
46790     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
46791 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
46792     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
46793   fi
46794 
46795   # Call helper function which possibly converts this using DOS-style short mode.
46796   # If so, the updated path is stored in $new_path.
46797 
46798   input_path="$new_path"
46799   # Check if we need to convert this using DOS-style short mode. If the path
46800   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46801   # take no chances and rewrite it.
46802   # Note: m4 eats our [], so we need to use [ and ] instead.
46803   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46804   if test "x$has_forbidden_chars" != x; then
46805     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46806     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46807     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46808     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46809       # Going to short mode and back again did indeed matter. Since short mode is
46810       # case insensitive, let's make it lowercase to improve readability.
46811       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46812       # Now convert it back to Unix-style (cygpath)
46813       input_path=`$CYGPATH -u "$shortmode_path"`
46814       new_path="$input_path"
46815     fi
46816   fi
46817 
46818   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46819   if test "x$test_cygdrive_prefix" = x; then
46820     # As a simple fix, exclude /usr/bin since it's not a real path.
46821     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46822       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46823       # a path prefixed by /cygdrive for fixpath to work.
46824       new_path="$CYGWIN_ROOT_PATH$input_path"
46825     fi
46826   fi
46827 
46828 
46829   if test "x$path" != "x$new_path"; then
46830     JT_HOME="$new_path"
46831     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
46832 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
46833   fi
46834 
46835     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46836 
46837   path="$JT_HOME"
46838   has_colon=`$ECHO $path | $GREP ^.:`
46839   new_path="$path"
46840   if test "x$has_colon" = x; then
46841     # Not in mixed or Windows style, start by that.
46842     new_path=`cmd //c echo $path`
46843   fi
46844 
46845 
46846   input_path="$new_path"
46847   # Check if we need to convert this using DOS-style short mode. If the path
46848   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46849   # take no chances and rewrite it.
46850   # Note: m4 eats our [], so we need to use [ and ] instead.
46851   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46852   if test "x$has_forbidden_chars" != x; then
46853     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46854     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46855   fi
46856 
46857 
46858   windows_path="$new_path"
46859   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46860     unix_path=`$CYGPATH -u "$windows_path"`
46861     new_path="$unix_path"
46862   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46863     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46864     new_path="$unix_path"
46865   fi
46866 
46867   if test "x$path" != "x$new_path"; then
46868     JT_HOME="$new_path"
46869     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
46870 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
46871   fi
46872 
46873   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46874   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46875 
46876     else
46877       # We're on a unix platform. Hooray! :)
46878       path="$JT_HOME"
46879       has_space=`$ECHO "$path" | $GREP " "`
46880       if test "x$has_space" != x; then
46881         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
46882 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
46883         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46884       fi
46885 
46886       # Use eval to expand a potential ~
46887       eval path="$path"
46888       if test ! -f "$path" && test ! -d "$path"; then
46889         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
46890       fi
46891 
46892       if test -d "$path"; then
46893         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
46894       else
46895         dir="`$DIRNAME "$path"`"
46896         base="`$BASENAME "$path"`"
46897         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
46898       fi
46899     fi
46900   fi
46901 
46902 
46903       # jtreg win32 script works for everybody
46904       JTREGEXE="$JT_HOME/bin/jtreg"
46905 
46906       if test ! -f "$JTREGEXE"; then
46907         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
46908       fi
46909 
46910       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
46911 $as_echo "$JTREGEXE" >&6; }
46912     else
46913       # try to find jtreg on path
46914 
46915 
46916 
46917   # Publish this variable in the help.
46918 
46919 
46920   if [ -z "${JTREGEXE+x}" ]; then
46921     # The variable is not set by user, try to locate tool using the code snippet
46922     for ac_prog in jtreg
46923 do
46924   # Extract the first word of "$ac_prog", so it can be a program name with args.
46925 set dummy $ac_prog; ac_word=$2
46926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46927 $as_echo_n "checking for $ac_word... " >&6; }
46928 if ${ac_cv_path_JTREGEXE+:} false; then :
46929   $as_echo_n "(cached) " >&6
46930 else
46931   case $JTREGEXE in
46932   [\\/]* | ?:[\\/]*)
46933   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
46934   ;;
46935   *)
46936   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46937 for as_dir in $PATH
46938 do
46939   IFS=$as_save_IFS
46940   test -z "$as_dir" && as_dir=.
46941     for ac_exec_ext in '' $ac_executable_extensions; do
46942   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46943     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
46944     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46945     break 2
46946   fi
46947 done
46948   done
46949 IFS=$as_save_IFS
46950 
46951   ;;
46952 esac
46953 fi
46954 JTREGEXE=$ac_cv_path_JTREGEXE
46955 if test -n "$JTREGEXE"; then
46956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
46957 $as_echo "$JTREGEXE" >&6; }
46958 else
46959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46960 $as_echo "no" >&6; }
46961 fi
46962 
46963 
46964   test -n "$JTREGEXE" && break
46965 done
46966 
46967   else
46968     # The variable is set, but is it from the command line or the environment?
46969 
46970     # Try to remove the string !JTREGEXE! from our list.
46971     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
46972     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46973       # If it failed, the variable was not from the command line. Ignore it,
46974       # but warn the user (except for BASH, which is always set by the calling BASH).
46975       if test "xJTREGEXE" != xBASH; then
46976         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
46977 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
46978       fi
46979       # Try to locate tool using the code snippet
46980       for ac_prog in jtreg
46981 do
46982   # Extract the first word of "$ac_prog", so it can be a program name with args.
46983 set dummy $ac_prog; ac_word=$2
46984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46985 $as_echo_n "checking for $ac_word... " >&6; }
46986 if ${ac_cv_path_JTREGEXE+:} false; then :
46987   $as_echo_n "(cached) " >&6
46988 else
46989   case $JTREGEXE in
46990   [\\/]* | ?:[\\/]*)
46991   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
46992   ;;
46993   *)
46994   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46995 for as_dir in $PATH
46996 do
46997   IFS=$as_save_IFS
46998   test -z "$as_dir" && as_dir=.
46999     for ac_exec_ext in '' $ac_executable_extensions; do
47000   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47001     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47002     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47003     break 2
47004   fi
47005 done
47006   done
47007 IFS=$as_save_IFS
47008 
47009   ;;
47010 esac
47011 fi
47012 JTREGEXE=$ac_cv_path_JTREGEXE
47013 if test -n "$JTREGEXE"; then
47014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47015 $as_echo "$JTREGEXE" >&6; }
47016 else
47017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47018 $as_echo "no" >&6; }
47019 fi
47020 
47021 
47022   test -n "$JTREGEXE" && break
47023 done
47024 
47025     else
47026       # If it succeeded, then it was overridden by the user. We will use it
47027       # for the tool.
47028 
47029       # First remove it from the list of overridden variables, so we can test
47030       # for unknown variables in the end.
47031       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47032 
47033       # Check if we try to supply an empty value
47034       if test "x$JTREGEXE" = x; then
47035         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
47036 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
47037         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47038 $as_echo_n "checking for JTREGEXE... " >&6; }
47039         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47040 $as_echo "disabled" >&6; }
47041       else
47042         # Check if the provided tool contains a complete path.
47043         tool_specified="$JTREGEXE"
47044         tool_basename="${tool_specified##*/}"
47045         if test "x$tool_basename" = "x$tool_specified"; then
47046           # A command without a complete path is provided, search $PATH.
47047           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
47048 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
47049           # Extract the first word of "$tool_basename", so it can be a program name with args.
47050 set dummy $tool_basename; ac_word=$2
47051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47052 $as_echo_n "checking for $ac_word... " >&6; }
47053 if ${ac_cv_path_JTREGEXE+:} false; then :
47054   $as_echo_n "(cached) " >&6
47055 else
47056   case $JTREGEXE in
47057   [\\/]* | ?:[\\/]*)
47058   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47059   ;;
47060   *)
47061   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47062 for as_dir in $PATH
47063 do
47064   IFS=$as_save_IFS
47065   test -z "$as_dir" && as_dir=.
47066     for ac_exec_ext in '' $ac_executable_extensions; do
47067   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47068     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47069     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47070     break 2
47071   fi
47072 done
47073   done
47074 IFS=$as_save_IFS
47075 
47076   ;;
47077 esac
47078 fi
47079 JTREGEXE=$ac_cv_path_JTREGEXE
47080 if test -n "$JTREGEXE"; then
47081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47082 $as_echo "$JTREGEXE" >&6; }
47083 else
47084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47085 $as_echo "no" >&6; }
47086 fi
47087 
47088 
47089           if test "x$JTREGEXE" = x; then
47090             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47091           fi
47092         else
47093           # Otherwise we believe it is a complete path. Use it as it is.
47094           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
47095 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
47096           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47097 $as_echo_n "checking for JTREGEXE... " >&6; }
47098           if test ! -x "$tool_specified"; then
47099             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47100 $as_echo "not found" >&6; }
47101             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
47102           fi
47103           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47104 $as_echo "$tool_specified" >&6; }
47105         fi
47106       fi
47107     fi
47108 
47109   fi
47110 
47111 
47112 
47113   if test "x$JTREGEXE" = x; then
47114     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
47115   fi
47116 
47117 
47118       JT_HOME="`$DIRNAME $JTREGEXE`"
47119     fi
47120   fi
47121 
47122 
47123 
47124 
47125 
47126 
47127   # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
47128   # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
47129   # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
47130   #                              commands produced by the link step (currently AIX only)
47131   if test "x$TOOLCHAIN_TYPE" = xxlc; then
47132     COMPILER_TARGET_BITS_FLAG="-q"
47133     COMPILER_COMMAND_FILE_FLAG="-f"
47134     COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
47135   else
47136     COMPILER_TARGET_BITS_FLAG="-m"
47137     COMPILER_COMMAND_FILE_FLAG="@"
47138     COMPILER_BINDCMD_FILE_FLAG=""
47139 
47140     # The solstudio linker does not support @-files.
47141     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47142       COMPILER_COMMAND_FILE_FLAG=
47143     fi
47144 
47145     # Check if @file is supported by gcc
47146     if test "x$TOOLCHAIN_TYPE" = xgcc; then
47147       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
47148 $as_echo_n "checking if @file is supported by gcc... " >&6; }
47149       # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
47150       $ECHO "" "--version" > command.file
47151       if $CXX @command.file 2>&5 >&5; then
47152         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47153 $as_echo "yes" >&6; }
47154         COMPILER_COMMAND_FILE_FLAG="@"
47155       else
47156         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47157 $as_echo "no" >&6; }
47158         COMPILER_COMMAND_FILE_FLAG=
47159       fi
47160       rm -rf command.file
47161     fi
47162   fi
47163 
47164 
47165 
47166 
47167   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
47168   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47169     ARFLAGS="-r"
47170   elif test "x$OPENJDK_TARGET_OS" = xaix; then
47171     ARFLAGS="-X64"
47172   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
47173     # lib.exe is used as AR to create static libraries.
47174     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
47175   else
47176     ARFLAGS=""
47177   fi
47178 
47179 
47180   ## Setup strip.
47181   # FIXME: should this really be per platform, or should it be per toolchain type?
47182   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
47183   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
47184   if test "x$OPENJDK_TARGET_OS" = xlinux; then
47185     STRIPFLAGS="-g"
47186   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
47187     STRIPFLAGS="-x"
47188   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
47189     STRIPFLAGS="-S"
47190   elif test "x$OPENJDK_TARGET_OS" = xaix; then
47191     STRIPFLAGS="-X32_64"
47192   fi
47193 
47194 
47195 
47196   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47197     CC_OUT_OPTION=-Fo
47198     EXE_OUT_OPTION=-out:
47199     LD_OUT_OPTION=-out:
47200     AR_OUT_OPTION=-out:
47201   else
47202     # The option used to specify the target .o,.a or .so file.
47203     # When compiling, how to specify the to be created object file.
47204     CC_OUT_OPTION='-o$(SPACE)'
47205     # When linking, how to specify the to be created executable.
47206     EXE_OUT_OPTION='-o$(SPACE)'
47207     # When linking, how to specify the to be created dynamically linkable library.
47208     LD_OUT_OPTION='-o$(SPACE)'
47209     # When archiving, how to specify the to be create static archive for object files.
47210     AR_OUT_OPTION='rcs$(SPACE)'
47211   fi
47212 
47213 
47214 
47215 
47216 
47217   # On Windows, we need to set RC flags.
47218   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47219     RC_FLAGS="-nologo -l0x409"
47220     if test "x$DEBUG_LEVEL" = xrelease; then
47221       RC_FLAGS="$RC_FLAGS -DNDEBUG"
47222     fi
47223 
47224     # The version variables used to create RC_FLAGS may be overridden
47225     # in a custom configure script, or possibly the command line.
47226     # Let those variables be expanded at make time in spec.gmk.
47227     # The \$ are escaped to the shell, and the $(...) variables
47228     # are evaluated by make.
47229     RC_FLAGS="$RC_FLAGS \
47230         -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
47231         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
47232         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
47233         -D\"JDK_VER=\$(VERSION_NUMBER)\" \
47234         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
47235         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
47236         -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
47237   fi
47238 
47239 
47240   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47241     # silence copyright notice and other headers.
47242     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
47243   fi
47244 
47245 
47246 # Now we can test some aspects on the target using configure macros.
47247 
47248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
47249 $as_echo_n "checking for ANSI C header files... " >&6; }
47250 if ${ac_cv_header_stdc+:} false; then :
47251   $as_echo_n "(cached) " >&6
47252 else
47253   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47254 /* end confdefs.h.  */
47255 #include <stdlib.h>
47256 #include <stdarg.h>
47257 #include <string.h>
47258 #include <float.h>
47259 
47260 int
47261 main ()
47262 {
47263 
47264   ;
47265   return 0;
47266 }
47267 _ACEOF
47268 if ac_fn_cxx_try_compile "$LINENO"; then :
47269   ac_cv_header_stdc=yes
47270 else
47271   ac_cv_header_stdc=no
47272 fi
47273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47274 
47275 if test $ac_cv_header_stdc = yes; then
47276   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
47277   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47278 /* end confdefs.h.  */
47279 #include <string.h>
47280 
47281 _ACEOF
47282 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47283   $EGREP "memchr" >/dev/null 2>&1; then :
47284 
47285 else
47286   ac_cv_header_stdc=no
47287 fi
47288 rm -f conftest*
47289 
47290 fi
47291 
47292 if test $ac_cv_header_stdc = yes; then
47293   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
47294   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47295 /* end confdefs.h.  */
47296 #include <stdlib.h>
47297 
47298 _ACEOF
47299 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47300   $EGREP "free" >/dev/null 2>&1; then :
47301 
47302 else
47303   ac_cv_header_stdc=no
47304 fi
47305 rm -f conftest*
47306 
47307 fi
47308 
47309 if test $ac_cv_header_stdc = yes; then
47310   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
47311   if test "$cross_compiling" = yes; then :
47312   :
47313 else
47314   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47315 /* end confdefs.h.  */
47316 #include <ctype.h>
47317 #include <stdlib.h>
47318 #if ((' ' & 0x0FF) == 0x020)
47319 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
47320 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
47321 #else
47322 # define ISLOWER(c) \
47323                    (('a' <= (c) && (c) <= 'i') \
47324                      || ('j' <= (c) && (c) <= 'r') \
47325                      || ('s' <= (c) && (c) <= 'z'))
47326 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
47327 #endif
47328 
47329 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
47330 int
47331 main ()
47332 {
47333   int i;
47334   for (i = 0; i < 256; i++)
47335     if (XOR (islower (i), ISLOWER (i))
47336         || toupper (i) != TOUPPER (i))
47337       return 2;
47338   return 0;
47339 }
47340 _ACEOF
47341 if ac_fn_cxx_try_run "$LINENO"; then :
47342 
47343 else
47344   ac_cv_header_stdc=no
47345 fi
47346 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47347   conftest.$ac_objext conftest.beam conftest.$ac_ext
47348 fi
47349 
47350 fi
47351 fi
47352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
47353 $as_echo "$ac_cv_header_stdc" >&6; }
47354 if test $ac_cv_header_stdc = yes; then
47355 
47356 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
47357 
47358 fi
47359 
47360 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
47361 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
47362                   inttypes.h stdint.h unistd.h
47363 do :
47364   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47365 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
47366 "
47367 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47368   cat >>confdefs.h <<_ACEOF
47369 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47370 _ACEOF
47371 
47372 fi
47373 
47374 done
47375 
47376 
47377 
47378   ###############################################################################
47379   #
47380   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
47381   # (The JVM can use 32 or 64 bit Java pointers but that decision
47382   # is made at runtime.)
47383   #
47384 
47385   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
47386     # Always specify -m flag on Solaris
47387     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
47388 
47389   # When we add flags to the "official" CFLAGS etc, we need to
47390   # keep track of these additions in ADDED_CFLAGS etc. These
47391   # will later be checked to make sure only controlled additions
47392   # have been made to CFLAGS etc.
47393   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47394   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47395   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47396 
47397   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47398   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47399   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47400 
47401   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47402   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47403   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47404 
47405   elif test "x$COMPILE_TYPE" = xreduced; then
47406     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
47407       # Specify -m if running reduced on unix platforms
47408 
47409   # When we add flags to the "official" CFLAGS etc, we need to
47410   # keep track of these additions in ADDED_CFLAGS etc. These
47411   # will later be checked to make sure only controlled additions
47412   # have been made to CFLAGS etc.
47413   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47414   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47415   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47416 
47417   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47418   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47419   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47420 
47421   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47422   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47423   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47424 
47425     fi
47426   fi
47427 
47428   # Make compilation sanity check
47429   for ac_header in stdio.h
47430 do :
47431   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
47432 if test "x$ac_cv_header_stdio_h" = xyes; then :
47433   cat >>confdefs.h <<_ACEOF
47434 #define HAVE_STDIO_H 1
47435 _ACEOF
47436 
47437 else
47438 
47439     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
47440 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
47441     if test "x$COMPILE_TYPE" = xreduced; then
47442 
47443   # Print a helpful message on how to acquire the necessary build dependency.
47444   # reduced is the help tag: freetype, cups, alsa etc
47445   MISSING_DEPENDENCY=reduced
47446 
47447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47448     cygwin_help $MISSING_DEPENDENCY
47449   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47450     msys_help $MISSING_DEPENDENCY
47451   else
47452     PKGHANDLER_COMMAND=
47453 
47454     case $PKGHANDLER in
47455       apt-get)
47456         apt_help     $MISSING_DEPENDENCY ;;
47457       yum)
47458         yum_help     $MISSING_DEPENDENCY ;;
47459       port)
47460         port_help    $MISSING_DEPENDENCY ;;
47461       pkgutil)
47462         pkgutil_help $MISSING_DEPENDENCY ;;
47463       pkgadd)
47464         pkgadd_help  $MISSING_DEPENDENCY ;;
47465     esac
47466 
47467     if test "x$PKGHANDLER_COMMAND" != x; then
47468       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47469     fi
47470   fi
47471 
47472       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
47473 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
47474     elif test "x$COMPILE_TYPE" = xcross; then
47475       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
47476 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
47477     fi
47478     as_fn_error $? "Cannot continue." "$LINENO" 5
47479 
47480 fi
47481 
47482 done
47483 
47484 
47485   # The cast to long int works around a bug in the HP C Compiler
47486 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47487 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47488 # This bug is HP SR number 8606223364.
47489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47490 $as_echo_n "checking size of int *... " >&6; }
47491 if ${ac_cv_sizeof_int_p+:} false; then :
47492   $as_echo_n "(cached) " >&6
47493 else
47494   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47495 
47496 else
47497   if test "$ac_cv_type_int_p" = yes; then
47498      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47499 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47500 as_fn_error 77 "cannot compute sizeof (int *)
47501 See \`config.log' for more details" "$LINENO" 5; }
47502    else
47503      ac_cv_sizeof_int_p=0
47504    fi
47505 fi
47506 
47507 fi
47508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47509 $as_echo "$ac_cv_sizeof_int_p" >&6; }
47510 
47511 
47512 
47513 cat >>confdefs.h <<_ACEOF
47514 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
47515 _ACEOF
47516 
47517 
47518 
47519   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
47520   if test "x$ac_cv_sizeof_int_p" = x; then
47521     # The test failed, lets stick to the assumed value.
47522     { $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
47523 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
47524   else
47525     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47526 
47527     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47528       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
47529       # Let's try to implicitely set the compilers target architecture and retry the test
47530       { $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
47531 $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;}
47532       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
47533 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
47534 
47535   # When we add flags to the "official" CFLAGS etc, we need to
47536   # keep track of these additions in ADDED_CFLAGS etc. These
47537   # will later be checked to make sure only controlled additions
47538   # have been made to CFLAGS etc.
47539   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47540   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47541   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47542 
47543   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47544   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47545   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47546 
47547   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47548   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47549   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47550 
47551 
47552       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
47553       unset ac_cv_sizeof_int_p
47554       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
47555       cat >>confdefs.h <<_ACEOF
47556 #undef SIZEOF_INT_P
47557 _ACEOF
47558 
47559       # The cast to long int works around a bug in the HP C Compiler
47560 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47561 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47562 # This bug is HP SR number 8606223364.
47563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47564 $as_echo_n "checking size of int *... " >&6; }
47565 if ${ac_cv_sizeof_int_p+:} false; then :
47566   $as_echo_n "(cached) " >&6
47567 else
47568   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47569 
47570 else
47571   if test "$ac_cv_type_int_p" = yes; then
47572      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47573 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47574 as_fn_error 77 "cannot compute sizeof (int *)
47575 See \`config.log' for more details" "$LINENO" 5; }
47576    else
47577      ac_cv_sizeof_int_p=0
47578    fi
47579 fi
47580 
47581 fi
47582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47583 $as_echo "$ac_cv_sizeof_int_p" >&6; }
47584 
47585 
47586 
47587 cat >>confdefs.h <<_ACEOF
47588 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
47589 _ACEOF
47590 
47591 
47592 
47593       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47594 
47595       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47596         { $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
47597 $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;}
47598         if test "x$COMPILE_TYPE" = xreduced; then
47599 
47600   # Print a helpful message on how to acquire the necessary build dependency.
47601   # reduced is the help tag: freetype, cups, alsa etc
47602   MISSING_DEPENDENCY=reduced
47603 
47604   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47605     cygwin_help $MISSING_DEPENDENCY
47606   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47607     msys_help $MISSING_DEPENDENCY
47608   else
47609     PKGHANDLER_COMMAND=
47610 
47611     case $PKGHANDLER in
47612       apt-get)
47613         apt_help     $MISSING_DEPENDENCY ;;
47614       yum)
47615         yum_help     $MISSING_DEPENDENCY ;;
47616       port)
47617         port_help    $MISSING_DEPENDENCY ;;
47618       pkgutil)
47619         pkgutil_help $MISSING_DEPENDENCY ;;
47620       pkgadd)
47621         pkgadd_help  $MISSING_DEPENDENCY ;;
47622     esac
47623 
47624     if test "x$PKGHANDLER_COMMAND" != x; then
47625       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47626     fi
47627   fi
47628 
47629           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
47630 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
47631         elif test "x$COMPILE_TYPE" = xcross; then
47632           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
47633 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
47634         fi
47635         as_fn_error $? "Cannot continue." "$LINENO" 5
47636       fi
47637     fi
47638   fi
47639 
47640   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
47641 $as_echo_n "checking for target address size... " >&6; }
47642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
47643 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
47644 
47645 
47646   ###############################################################################
47647   #
47648   # Is the target little of big endian?
47649   #
47650    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
47651 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
47652 if ${ac_cv_c_bigendian+:} false; then :
47653   $as_echo_n "(cached) " >&6
47654 else
47655   ac_cv_c_bigendian=unknown
47656     # See if we're dealing with a universal compiler.
47657     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47658 /* end confdefs.h.  */
47659 #ifndef __APPLE_CC__
47660                not a universal capable compiler
47661              #endif
47662              typedef int dummy;
47663 
47664 _ACEOF
47665 if ac_fn_cxx_try_compile "$LINENO"; then :
47666 
47667         # Check for potential -arch flags.  It is not universal unless
47668         # there are at least two -arch flags with different values.
47669         ac_arch=
47670         ac_prev=
47671         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
47672          if test -n "$ac_prev"; then
47673            case $ac_word in
47674              i?86 | x86_64 | ppc | ppc64)
47675                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
47676                  ac_arch=$ac_word
47677                else
47678                  ac_cv_c_bigendian=universal
47679                  break
47680                fi
47681                ;;
47682            esac
47683            ac_prev=
47684          elif test "x$ac_word" = "x-arch"; then
47685            ac_prev=arch
47686          fi
47687        done
47688 fi
47689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47690     if test $ac_cv_c_bigendian = unknown; then
47691       # See if sys/param.h defines the BYTE_ORDER macro.
47692       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47693 /* end confdefs.h.  */
47694 #include <sys/types.h>
47695              #include <sys/param.h>
47696 
47697 int
47698 main ()
47699 {
47700 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
47701                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
47702                      && LITTLE_ENDIAN)
47703               bogus endian macros
47704              #endif
47705 
47706   ;
47707   return 0;
47708 }
47709 _ACEOF
47710 if ac_fn_cxx_try_compile "$LINENO"; then :
47711   # It does; now see whether it defined to BIG_ENDIAN or not.
47712          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47713 /* end confdefs.h.  */
47714 #include <sys/types.h>
47715                 #include <sys/param.h>
47716 
47717 int
47718 main ()
47719 {
47720 #if BYTE_ORDER != BIG_ENDIAN
47721                  not big endian
47722                 #endif
47723 
47724   ;
47725   return 0;
47726 }
47727 _ACEOF
47728 if ac_fn_cxx_try_compile "$LINENO"; then :
47729   ac_cv_c_bigendian=yes
47730 else
47731   ac_cv_c_bigendian=no
47732 fi
47733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47734 fi
47735 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47736     fi
47737     if test $ac_cv_c_bigendian = unknown; then
47738       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
47739       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47740 /* end confdefs.h.  */
47741 #include <limits.h>
47742 
47743 int
47744 main ()
47745 {
47746 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
47747               bogus endian macros
47748              #endif
47749 
47750   ;
47751   return 0;
47752 }
47753 _ACEOF
47754 if ac_fn_cxx_try_compile "$LINENO"; then :
47755   # It does; now see whether it defined to _BIG_ENDIAN or not.
47756          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47757 /* end confdefs.h.  */
47758 #include <limits.h>
47759 
47760 int
47761 main ()
47762 {
47763 #ifndef _BIG_ENDIAN
47764                  not big endian
47765                 #endif
47766 
47767   ;
47768   return 0;
47769 }
47770 _ACEOF
47771 if ac_fn_cxx_try_compile "$LINENO"; then :
47772   ac_cv_c_bigendian=yes
47773 else
47774   ac_cv_c_bigendian=no
47775 fi
47776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47777 fi
47778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47779     fi
47780     if test $ac_cv_c_bigendian = unknown; then
47781       # Compile a test program.
47782       if test "$cross_compiling" = yes; then :
47783   # Try to guess by grepping values from an object file.
47784          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47785 /* end confdefs.h.  */
47786 short int ascii_mm[] =
47787                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
47788                 short int ascii_ii[] =
47789                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
47790                 int use_ascii (int i) {
47791                   return ascii_mm[i] + ascii_ii[i];
47792                 }
47793                 short int ebcdic_ii[] =
47794                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
47795                 short int ebcdic_mm[] =
47796                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
47797                 int use_ebcdic (int i) {
47798                   return ebcdic_mm[i] + ebcdic_ii[i];
47799                 }
47800                 extern int foo;
47801 
47802 int
47803 main ()
47804 {
47805 return use_ascii (foo) == use_ebcdic (foo);
47806   ;
47807   return 0;
47808 }
47809 _ACEOF
47810 if ac_fn_cxx_try_compile "$LINENO"; then :
47811   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
47812               ac_cv_c_bigendian=yes
47813             fi
47814             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
47815               if test "$ac_cv_c_bigendian" = unknown; then
47816                 ac_cv_c_bigendian=no
47817               else
47818                 # finding both strings is unlikely to happen, but who knows?
47819                 ac_cv_c_bigendian=unknown
47820               fi
47821             fi
47822 fi
47823 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47824 else
47825   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47826 /* end confdefs.h.  */
47827 $ac_includes_default
47828 int
47829 main ()
47830 {
47831 
47832              /* Are we little or big endian?  From Harbison&Steele.  */
47833              union
47834              {
47835                long int l;
47836                char c[sizeof (long int)];
47837              } u;
47838              u.l = 1;
47839              return u.c[sizeof (long int) - 1] == 1;
47840 
47841   ;
47842   return 0;
47843 }
47844 _ACEOF
47845 if ac_fn_cxx_try_run "$LINENO"; then :
47846   ac_cv_c_bigendian=no
47847 else
47848   ac_cv_c_bigendian=yes
47849 fi
47850 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47851   conftest.$ac_objext conftest.beam conftest.$ac_ext
47852 fi
47853 
47854     fi
47855 fi
47856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
47857 $as_echo "$ac_cv_c_bigendian" >&6; }
47858  case $ac_cv_c_bigendian in #(
47859    yes)
47860      ENDIAN="big";; #(
47861    no)
47862      ENDIAN="little" ;; #(
47863    universal)
47864      ENDIAN="universal_endianness"
47865      ;; #(
47866    *)
47867      ENDIAN="unknown" ;;
47868  esac
47869 
47870 
47871   if test "x$ENDIAN" = xuniversal_endianness; then
47872     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
47873   fi
47874   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
47875     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
47876   fi
47877 
47878 
47879 # Configure flags for the tools
47880 
47881   ###############################################################################
47882   #
47883   # How to compile shared libraries.
47884   #
47885 
47886   if test "x$TOOLCHAIN_TYPE" = xgcc; then
47887     PICFLAG="-fPIC"
47888     C_FLAG_REORDER=''
47889     CXX_FLAG_REORDER=''
47890 
47891     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47892       # Linking is different on MacOSX
47893       if test "x$STATIC_BUILD" = xtrue; then
47894         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
47895       else
47896         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
47897       fi
47898       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
47899       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
47900       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
47901       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
47902     else
47903       # Default works for linux, might work on other platforms as well.
47904       SHARED_LIBRARY_FLAGS='-shared'
47905       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
47906       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
47907       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
47908       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
47909     fi
47910   elif test "x$TOOLCHAIN_TYPE" = xclang; then
47911     C_FLAG_REORDER=''
47912     CXX_FLAG_REORDER=''
47913 
47914     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47915       # Linking is different on MacOSX
47916       PICFLAG=''
47917       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
47918       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
47919       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
47920       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
47921       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
47922     else
47923       # Default works for linux, might work on other platforms as well.
47924       PICFLAG='-fPIC'
47925       SHARED_LIBRARY_FLAGS='-shared'
47926       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
47927       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
47928       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
47929       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
47930     fi
47931   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47932     PICFLAG="-KPIC"
47933     C_FLAG_REORDER='-xF'
47934     CXX_FLAG_REORDER='-xF'
47935     SHARED_LIBRARY_FLAGS="-G"
47936     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
47937     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
47938     SET_SHARED_LIBRARY_NAME='-h $1'
47939     SET_SHARED_LIBRARY_MAPFILE='-M$1'
47940   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47941     # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
47942     # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
47943     # will have to patch this single instruction with a call to some out-of-order code which
47944     # does the load from the TOC. This is of course slow. But in that case we also would have
47945     # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
47946     # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
47947     # can be patched directly by the linker and does not require a jump to out-of-order code.
47948     # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
47949     # instead. This creates a distinct TOC for every compilation unit (and thus requires two
47950     # loads for accessing a global variable). But there are rumors that this may be seen as a
47951     # 'performance feature' because of improved code locality of the symbols used in a
47952     # compilation unit.
47953     PICFLAG="-qpic"
47954     JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
47955     C_FLAG_REORDER=''
47956     CXX_FLAG_REORDER=''
47957     SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
47958     SET_EXECUTABLE_ORIGIN=""
47959     SET_SHARED_LIBRARY_ORIGIN=''
47960     SET_SHARED_LIBRARY_NAME=''
47961     SET_SHARED_LIBRARY_MAPFILE=''
47962   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47963     PICFLAG=""
47964     C_FLAG_REORDER=''
47965     CXX_FLAG_REORDER=''
47966     SHARED_LIBRARY_FLAGS="-dll"
47967     SET_EXECUTABLE_ORIGIN=''
47968     SET_SHARED_LIBRARY_ORIGIN=''
47969     SET_SHARED_LIBRARY_NAME=''
47970     SET_SHARED_LIBRARY_MAPFILE='-def:$1'
47971   fi
47972 
47973 
47974 
47975 
47976 
47977 
47978 
47979 
47980 
47981   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47982     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
47983     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
47984     CFLAGS_JDKLIB_EXTRA='-xstrconst'
47985   fi
47986   # The (cross) compiler is now configured, we can now test capabilities
47987   # of the target platform.
47988 
47989 
47990 
47991   ###############################################################################
47992   #
47993   # Setup the opt flags for different compilers
47994   # and different operating systems.
47995   #
47996 
47997   # FIXME: this was indirectly the old default, but just inherited.
47998   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47999   #   C_FLAG_DEPS="-MMD -MF"
48000   # fi
48001 
48002   # Generate make dependency files
48003   if test "x$TOOLCHAIN_TYPE" = xgcc; then
48004     C_FLAG_DEPS="-MMD -MF"
48005   elif test "x$TOOLCHAIN_TYPE" = xclang; then
48006     C_FLAG_DEPS="-MMD -MF"
48007   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48008     C_FLAG_DEPS="-xMMD -xMF"
48009   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48010     C_FLAG_DEPS="-qmakedep=gcc -MF"
48011   fi
48012   CXX_FLAG_DEPS="$C_FLAG_DEPS"
48013 
48014 
48015 
48016   # Debug symbols
48017   if test "x$TOOLCHAIN_TYPE" = xgcc; then
48018     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
48019       # reduce from default "-g2" option to save space
48020       CFLAGS_DEBUG_SYMBOLS="-g1"
48021       CXXFLAGS_DEBUG_SYMBOLS="-g1"
48022     else
48023       CFLAGS_DEBUG_SYMBOLS="-g"
48024       CXXFLAGS_DEBUG_SYMBOLS="-g"
48025     fi
48026   elif test "x$TOOLCHAIN_TYPE" = xclang; then
48027     CFLAGS_DEBUG_SYMBOLS="-g"
48028     CXXFLAGS_DEBUG_SYMBOLS="-g"
48029   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48030     CFLAGS_DEBUG_SYMBOLS="-g -xs"
48031     # -g0 enables debug symbols without disabling inlining.
48032     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
48033   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48034     CFLAGS_DEBUG_SYMBOLS="-g"
48035     CXXFLAGS_DEBUG_SYMBOLS="-g"
48036   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48037     CFLAGS_DEBUG_SYMBOLS="-Zi"
48038     CXXFLAGS_DEBUG_SYMBOLS="-Zi"
48039   fi
48040 
48041 
48042 
48043   # bounds, memory and behavior checking options
48044   if test "x$TOOLCHAIN_TYPE" = xgcc; then
48045     case $DEBUG_LEVEL in
48046     release )
48047       # no adjustment
48048       ;;
48049     fastdebug )
48050       # no adjustment
48051       ;;
48052     slowdebug )
48053       # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS it
48054       # get's added conditionally on whether we produce debug symbols or not.
48055       # This is most likely not really correct.
48056 
48057       # Add runtime stack smashing and undefined behavior checks.
48058       # Not all versions of gcc support -fstack-protector
48059       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
48060 
48061 
48062 
48063 
48064 
48065 
48066 
48067 
48068 
48069 
48070 
48071 
48072 
48073 
48074 
48075 
48076 
48077 
48078 
48079 
48080 
48081 
48082 
48083 
48084 
48085 
48086 
48087 
48088 
48089 
48090 
48091 
48092 
48093 
48094 
48095 
48096 
48097 
48098 
48099 
48100 
48101 
48102     # Execute function body
48103 
48104 
48105 
48106 
48107 
48108 
48109 
48110 
48111 
48112 
48113 
48114 
48115 
48116 
48117 
48118 
48119 
48120 
48121 
48122 
48123 
48124 
48125 
48126 
48127 
48128 
48129 
48130 
48131 
48132 
48133 
48134 
48135 
48136 
48137 
48138 
48139 
48140 
48141 
48142 
48143 
48144 
48145 
48146 
48147 
48148 
48149 
48150 
48151     # Execute function body
48152 
48153   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48154 $as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48155   supports=yes
48156 
48157   saved_cflags="$CFLAGS"
48158   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
48159   ac_ext=c
48160 ac_cpp='$CPP $CPPFLAGS'
48161 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48162 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48163 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48164 
48165   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48166 /* end confdefs.h.  */
48167 int i;
48168 _ACEOF
48169 if ac_fn_c_try_compile "$LINENO"; then :
48170 
48171 else
48172   supports=no
48173 fi
48174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48175   ac_ext=cpp
48176 ac_cpp='$CXXCPP $CPPFLAGS'
48177 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48178 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48179 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48180 
48181   CFLAGS="$saved_cflags"
48182 
48183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48184 $as_echo "$supports" >&6; }
48185   if test "x$supports" = "xyes" ; then
48186     :
48187     C_COMP_SUPPORTS="yes"
48188   else
48189     :
48190     C_COMP_SUPPORTS="no"
48191   fi
48192 
48193 
48194 
48195 
48196 
48197 
48198 
48199 
48200 
48201 
48202 
48203 
48204 
48205 
48206 
48207 
48208 
48209 
48210 
48211 
48212 
48213 
48214 
48215 
48216 
48217 
48218 
48219 
48220 
48221 
48222 
48223 
48224 
48225 
48226 
48227 
48228 
48229 
48230 
48231 
48232 
48233 
48234 
48235 
48236 
48237 
48238 
48239 
48240 
48241 
48242 
48243 
48244 
48245 
48246 
48247 
48248 
48249 
48250 
48251     # Execute function body
48252 
48253   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48254 $as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48255   supports=yes
48256 
48257   saved_cxxflags="$CXXFLAGS"
48258   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
48259   ac_ext=cpp
48260 ac_cpp='$CXXCPP $CPPFLAGS'
48261 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48262 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48263 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48264 
48265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48266 /* end confdefs.h.  */
48267 int i;
48268 _ACEOF
48269 if ac_fn_cxx_try_compile "$LINENO"; then :
48270 
48271 else
48272   supports=no
48273 fi
48274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48275   ac_ext=cpp
48276 ac_cpp='$CXXCPP $CPPFLAGS'
48277 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48278 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48279 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48280 
48281   CXXFLAGS="$saved_cxxflags"
48282 
48283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48284 $as_echo "$supports" >&6; }
48285   if test "x$supports" = "xyes" ; then
48286     :
48287     CXX_COMP_SUPPORTS="yes"
48288   else
48289     :
48290     CXX_COMP_SUPPORTS="no"
48291   fi
48292 
48293 
48294 
48295 
48296 
48297 
48298 
48299 
48300 
48301 
48302 
48303 
48304 
48305   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48306 $as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48307   supports=no
48308   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48309 
48310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48311 $as_echo "$supports" >&6; }
48312   if test "x$supports" = "xyes" ; then
48313     :
48314 
48315   else
48316     :
48317     STACK_PROTECTOR_CFLAG=""
48318   fi
48319 
48320 
48321 
48322 
48323 
48324 
48325 
48326       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48327       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48328       ;;
48329     esac
48330   fi
48331 
48332   # Optimization levels
48333   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48334     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
48335 
48336     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
48337       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
48338       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
48339       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
48340       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
48341       C_O_FLAG_DEBUG="-xregs=no%frameptr"
48342       C_O_FLAG_NONE="-xregs=no%frameptr"
48343       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
48344       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
48345       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
48346       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
48347       CXX_O_FLAG_NONE="-xregs=no%frameptr"
48348       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
48349         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
48350         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
48351       fi
48352     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48353       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
48354       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48355       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48356       C_O_FLAG_DEBUG=""
48357       C_O_FLAG_NONE=""
48358       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
48359       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48360       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48361       CXX_O_FLAG_DEBUG=""
48362       CXX_O_FLAG_NONE=""
48363     fi
48364   else
48365     # The remaining toolchains share opt flags between CC and CXX;
48366     # setup for C and duplicate afterwards.
48367     if test "x$TOOLCHAIN_TYPE" = xgcc; then
48368       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48369         # On MacOSX we optimize for size, something
48370         # we should do for all platforms?
48371         C_O_FLAG_HIGHEST="-Os"
48372         C_O_FLAG_HI="-Os"
48373         C_O_FLAG_NORM="-Os"
48374       else
48375         C_O_FLAG_HIGHEST="-O3"
48376         C_O_FLAG_HI="-O3"
48377         C_O_FLAG_NORM="-O2"
48378       fi
48379       C_O_FLAG_DEBUG="-O0"
48380       C_O_FLAG_NONE="-O0"
48381     elif test "x$TOOLCHAIN_TYPE" = xclang; then
48382       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48383         # On MacOSX we optimize for size, something
48384         # we should do for all platforms?
48385         C_O_FLAG_HIGHEST="-Os"
48386         C_O_FLAG_HI="-Os"
48387         C_O_FLAG_NORM="-Os"
48388       else
48389         C_O_FLAG_HIGHEST="-O3"
48390         C_O_FLAG_HI="-O3"
48391         C_O_FLAG_NORM="-O2"
48392       fi
48393       C_O_FLAG_DEBUG="-O0"
48394       C_O_FLAG_NONE="-O0"
48395     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48396       C_O_FLAG_HIGHEST="-O3"
48397       C_O_FLAG_HI="-O3 -qstrict"
48398       C_O_FLAG_NORM="-O2"
48399       C_O_FLAG_DEBUG="-qnoopt"
48400       C_O_FLAG_NONE="-qnoopt"
48401     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48402       C_O_FLAG_HIGHEST="-O2"
48403       C_O_FLAG_HI="-O1"
48404       C_O_FLAG_NORM="-O1"
48405       C_O_FLAG_DEBUG="-Od"
48406       C_O_FLAG_NONE="-Od"
48407     fi
48408     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
48409     CXX_O_FLAG_HI="$C_O_FLAG_HI"
48410     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
48411     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
48412     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
48413   fi
48414 
48415   # Adjust optimization flags according to debug level.
48416   case $DEBUG_LEVEL in
48417     release )
48418       # no adjustment
48419       ;;
48420     fastdebug )
48421       # Not quite so much optimization
48422       C_O_FLAG_HI="$C_O_FLAG_NORM"
48423       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
48424       ;;
48425     slowdebug )
48426       # Disable optimization
48427       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
48428       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
48429       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
48430       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
48431       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
48432       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
48433       ;;
48434   esac
48435 
48436 
48437 
48438 
48439 
48440 
48441 
48442 
48443 
48444 
48445 
48446 
48447 
48448   # Special extras...
48449   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48450     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48451       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48452       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48453     fi
48454     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48455     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48456   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48457     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48458     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48459   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
48460     CXXSTD_CXXFLAG="-std=gnu++98"
48461 
48462 
48463 
48464 
48465 
48466 
48467 
48468 
48469 
48470 
48471 
48472 
48473 
48474 
48475 
48476 
48477 
48478 
48479 
48480 
48481 
48482 
48483 
48484 
48485 
48486 
48487 
48488 
48489 
48490 
48491 
48492 
48493 
48494 
48495 
48496 
48497 
48498 
48499 
48500 
48501 
48502 
48503     # Execute function body
48504 
48505   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
48506 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
48507   supports=yes
48508 
48509   saved_cxxflags="$CXXFLAGS"
48510   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
48511   ac_ext=cpp
48512 ac_cpp='$CXXCPP $CPPFLAGS'
48513 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48514 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48515 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48516 
48517   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48518 /* end confdefs.h.  */
48519 int i;
48520 _ACEOF
48521 if ac_fn_cxx_try_compile "$LINENO"; then :
48522 
48523 else
48524   supports=no
48525 fi
48526 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48527   ac_ext=cpp
48528 ac_cpp='$CXXCPP $CPPFLAGS'
48529 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48530 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48531 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48532 
48533   CXXFLAGS="$saved_cxxflags"
48534 
48535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48536 $as_echo "$supports" >&6; }
48537   if test "x$supports" = "xyes" ; then
48538     :
48539 
48540   else
48541     :
48542     CXXSTD_CXXFLAG=""
48543   fi
48544 
48545 
48546 
48547 
48548 
48549 
48550 
48551 
48552 
48553 
48554 
48555 
48556     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
48557 
48558   fi
48559 
48560   CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
48561   CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
48562   LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
48563 
48564   ###############################################################################
48565   #
48566   # Now setup the CFLAGS and LDFLAGS for the JDK build.
48567   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
48568   #
48569 
48570   # Setup compiler/platform specific flags into
48571   #    CFLAGS_JDK    - C Compiler flags
48572   #    CXXFLAGS_JDK  - C++ Compiler flags
48573   #    COMMON_CCXXFLAGS_JDK - common to C and C++
48574   if test "x$TOOLCHAIN_TYPE" = xgcc; then
48575     if test "x$OPENJDK_TARGET_CPU" = xx86; then
48576       # Force compatibility with i586 on 32 bit intel platforms.
48577       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
48578     fi
48579     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
48580         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
48581     case $OPENJDK_TARGET_CPU_ARCH in
48582       arm )
48583         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
48584         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
48585         ;;
48586       ppc )
48587         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
48588         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
48589         ;;
48590       * )
48591         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
48592         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
48593         ;;
48594     esac
48595 
48596 
48597 
48598 
48599 
48600 
48601 
48602 
48603 
48604 
48605 
48606 
48607 
48608 
48609 
48610 
48611 
48612 
48613 
48614 
48615 
48616 
48617 
48618 
48619 
48620 
48621 
48622 
48623 
48624 
48625 
48626 
48627 
48628 
48629 
48630 
48631 
48632 
48633 
48634 
48635 
48636 
48637     # Execute function body
48638 
48639   # Need to assign to a variable since m4 is blocked from modifying parts in [].
48640   REFERENCE_VERSION=6
48641 
48642   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
48643     as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
48644   fi
48645 
48646   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
48647     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
48648   fi
48649 
48650   # Version comparison method inspired by http://stackoverflow.com/a/24067243
48651   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
48652 
48653   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
48654     :
48655 
48656   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
48657   # runs afoul of the more aggressive versions of these optimisations.
48658   # Notably, value range propagation now assumes that the this pointer of C++
48659   # member functions is non-null.
48660   NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
48661 
48662 
48663 
48664 
48665 
48666 
48667 
48668 
48669 
48670 
48671 
48672 
48673 
48674 
48675 
48676 
48677 
48678 
48679 
48680 
48681 
48682 
48683 
48684 
48685 
48686 
48687 
48688 
48689 
48690 
48691 
48692 
48693 
48694 
48695 
48696 
48697 
48698 
48699 
48700 
48701 
48702 
48703     # Execute function body
48704 
48705 
48706 
48707 
48708 
48709 
48710 
48711 
48712 
48713 
48714 
48715 
48716 
48717 
48718 
48719 
48720 
48721 
48722 
48723 
48724 
48725 
48726 
48727 
48728 
48729 
48730 
48731 
48732 
48733 
48734 
48735 
48736 
48737 
48738 
48739 
48740 
48741 
48742 
48743 
48744 
48745 
48746 
48747 
48748 
48749 
48750 
48751 
48752     # Execute function body
48753 
48754   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
48755 $as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
48756   supports=yes
48757 
48758   saved_cflags="$CFLAGS"
48759   CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
48760   ac_ext=c
48761 ac_cpp='$CPP $CPPFLAGS'
48762 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48763 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48764 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48765 
48766   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48767 /* end confdefs.h.  */
48768 int i;
48769 _ACEOF
48770 if ac_fn_c_try_compile "$LINENO"; then :
48771 
48772 else
48773   supports=no
48774 fi
48775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48776   ac_ext=cpp
48777 ac_cpp='$CXXCPP $CPPFLAGS'
48778 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48779 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48780 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48781 
48782   CFLAGS="$saved_cflags"
48783 
48784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48785 $as_echo "$supports" >&6; }
48786   if test "x$supports" = "xyes" ; then
48787     :
48788     C_COMP_SUPPORTS="yes"
48789   else
48790     :
48791     C_COMP_SUPPORTS="no"
48792   fi
48793 
48794 
48795 
48796 
48797 
48798 
48799 
48800 
48801 
48802 
48803 
48804 
48805 
48806 
48807 
48808 
48809 
48810 
48811 
48812 
48813 
48814 
48815 
48816 
48817 
48818 
48819 
48820 
48821 
48822 
48823 
48824 
48825 
48826 
48827 
48828 
48829 
48830 
48831 
48832 
48833 
48834 
48835 
48836 
48837 
48838 
48839 
48840 
48841 
48842 
48843 
48844 
48845 
48846 
48847 
48848 
48849 
48850 
48851 
48852     # Execute function body
48853 
48854   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
48855 $as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
48856   supports=yes
48857 
48858   saved_cxxflags="$CXXFLAGS"
48859   CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
48860   ac_ext=cpp
48861 ac_cpp='$CXXCPP $CPPFLAGS'
48862 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48863 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48864 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48865 
48866   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48867 /* end confdefs.h.  */
48868 int i;
48869 _ACEOF
48870 if ac_fn_cxx_try_compile "$LINENO"; then :
48871 
48872 else
48873   supports=no
48874 fi
48875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48876   ac_ext=cpp
48877 ac_cpp='$CXXCPP $CPPFLAGS'
48878 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48879 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48880 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48881 
48882   CXXFLAGS="$saved_cxxflags"
48883 
48884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48885 $as_echo "$supports" >&6; }
48886   if test "x$supports" = "xyes" ; then
48887     :
48888     CXX_COMP_SUPPORTS="yes"
48889   else
48890     :
48891     CXX_COMP_SUPPORTS="no"
48892   fi
48893 
48894 
48895 
48896 
48897 
48898 
48899 
48900 
48901 
48902 
48903 
48904 
48905 
48906   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
48907 $as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
48908   supports=no
48909   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48910 
48911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48912 $as_echo "$supports" >&6; }
48913   if test "x$supports" = "xyes" ; then
48914     :
48915 
48916   else
48917     :
48918     NO_NULL_POINTER_CHECK_CFLAG=""
48919   fi
48920 
48921 
48922 
48923 
48924 
48925 
48926 
48927   NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
48928 
48929 
48930 
48931 
48932 
48933 
48934 
48935 
48936 
48937 
48938 
48939 
48940 
48941 
48942 
48943 
48944 
48945 
48946 
48947 
48948 
48949 
48950 
48951 
48952 
48953 
48954 
48955 
48956 
48957 
48958 
48959 
48960 
48961 
48962 
48963 
48964 
48965 
48966 
48967 
48968 
48969 
48970     # Execute function body
48971 
48972 
48973 
48974 
48975 
48976 
48977 
48978 
48979 
48980 
48981 
48982 
48983 
48984 
48985 
48986 
48987 
48988 
48989 
48990 
48991 
48992 
48993 
48994 
48995 
48996 
48997 
48998 
48999 
49000 
49001 
49002 
49003 
49004 
49005 
49006 
49007 
49008 
49009 
49010 
49011 
49012 
49013 
49014 
49015 
49016 
49017 
49018 
49019     # Execute function body
49020 
49021   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49022 $as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49023   supports=yes
49024 
49025   saved_cflags="$CFLAGS"
49026   CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
49027   ac_ext=c
49028 ac_cpp='$CPP $CPPFLAGS'
49029 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49030 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49031 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49032 
49033   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49034 /* end confdefs.h.  */
49035 int i;
49036 _ACEOF
49037 if ac_fn_c_try_compile "$LINENO"; then :
49038 
49039 else
49040   supports=no
49041 fi
49042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49043   ac_ext=cpp
49044 ac_cpp='$CXXCPP $CPPFLAGS'
49045 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49046 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49047 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49048 
49049   CFLAGS="$saved_cflags"
49050 
49051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49052 $as_echo "$supports" >&6; }
49053   if test "x$supports" = "xyes" ; then
49054     :
49055     C_COMP_SUPPORTS="yes"
49056   else
49057     :
49058     C_COMP_SUPPORTS="no"
49059   fi
49060 
49061 
49062 
49063 
49064 
49065 
49066 
49067 
49068 
49069 
49070 
49071 
49072 
49073 
49074 
49075 
49076 
49077 
49078 
49079 
49080 
49081 
49082 
49083 
49084 
49085 
49086 
49087 
49088 
49089 
49090 
49091 
49092 
49093 
49094 
49095 
49096 
49097 
49098 
49099 
49100 
49101 
49102 
49103 
49104 
49105 
49106 
49107 
49108 
49109 
49110 
49111 
49112 
49113 
49114 
49115 
49116 
49117 
49118 
49119     # Execute function body
49120 
49121   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49122 $as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49123   supports=yes
49124 
49125   saved_cxxflags="$CXXFLAGS"
49126   CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
49127   ac_ext=cpp
49128 ac_cpp='$CXXCPP $CPPFLAGS'
49129 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49130 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49131 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49132 
49133   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49134 /* end confdefs.h.  */
49135 int i;
49136 _ACEOF
49137 if ac_fn_cxx_try_compile "$LINENO"; then :
49138 
49139 else
49140   supports=no
49141 fi
49142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49143   ac_ext=cpp
49144 ac_cpp='$CXXCPP $CPPFLAGS'
49145 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49146 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49147 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49148 
49149   CXXFLAGS="$saved_cxxflags"
49150 
49151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49152 $as_echo "$supports" >&6; }
49153   if test "x$supports" = "xyes" ; then
49154     :
49155     CXX_COMP_SUPPORTS="yes"
49156   else
49157     :
49158     CXX_COMP_SUPPORTS="no"
49159   fi
49160 
49161 
49162 
49163 
49164 
49165 
49166 
49167 
49168 
49169 
49170 
49171 
49172 
49173   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49174 $as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49175   supports=no
49176   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49177 
49178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49179 $as_echo "$supports" >&6; }
49180   if test "x$supports" = "xyes" ; then
49181     :
49182 
49183   else
49184     :
49185     NO_LIFETIME_DSE_CFLAG=""
49186   fi
49187 
49188 
49189 
49190 
49191 
49192 
49193   CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49194 
49195 
49196 
49197   else
49198     :
49199 
49200   fi
49201 
49202 
49203 
49204 
49205 
49206 
49207 
49208 
49209 
49210 
49211 
49212 
49213   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49214     if test "x$OPENJDK_TARGET_OS" = xlinux; then
49215       if test "x$OPENJDK_TARGET_CPU" = xx86; then
49216         # Force compatibility with i586 on 32 bit intel platforms.
49217         COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49218       fi
49219       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49220           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49221       case $OPENJDK_TARGET_CPU_ARCH in
49222         ppc )
49223           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49224           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49225           ;;
49226         * )
49227           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49228           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49229           ;;
49230       esac
49231     fi
49232   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49233     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49234     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49235       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49236     fi
49237 
49238     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49239     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49240   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49241     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49242     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49243   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49244     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49245         -MD -Zc:wchar_t- -W3 -wd4800 \
49246         -DWIN32_LEAN_AND_MEAN \
49247         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49248         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49249         -DWIN32 -DIAL"
49250     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49251       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49252     else
49253       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49254     fi
49255     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49256     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49257     # studio.
49258     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49259       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49260       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49261     fi
49262   fi
49263 
49264   ###############################################################################
49265 
49266   # Adjust flags according to debug level.
49267   case $DEBUG_LEVEL in
49268     fastdebug | slowdebug )
49269       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49270       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49271       JAVAC_FLAGS="$JAVAC_FLAGS -g"
49272       ;;
49273     release )
49274       ;;
49275     * )
49276       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49277       ;;
49278   esac
49279 
49280   # Set some common defines. These works for all compilers, but assume
49281   # -D is universally accepted.
49282 
49283   # Setup endianness
49284   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49285     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49286     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49287     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49288     #   Note: -Dmacro         is the same as    #define macro 1
49289     #         -Dmacro=        is the same as    #define macro
49290     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49291       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
49292     else
49293       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
49294     fi
49295   else
49296     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
49297     # are defined in the system?
49298     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49299       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
49300     else
49301       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
49302     fi
49303   fi
49304 
49305   # Setup target OS define. Use OS target name but in upper case.
49306   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
49307   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
49308 
49309   # Setup target CPU
49310   OPENJDK_TARGET_CCXXFLAGS_JDK="$OPENJDK_TARGET_CCXXFLAGS_JDK \
49311       $ADD_LP64 \
49312       -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
49313   OPENJDK_BUILD_CCXXFLAGS_JDK="$OPENJDK_BUILD_CCXXFLAGS_JDK \
49314       $OPENJDK_BUILD_ADD_LP64 \
49315       -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
49316 
49317   # Setup debug/release defines
49318   if test "x$DEBUG_LEVEL" = xrelease; then
49319     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
49320     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49321       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
49322     fi
49323   else
49324     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
49325   fi
49326 
49327   # Set some additional per-OS defines.
49328   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49329     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
49330   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
49331     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
49332   fi
49333 
49334   # Additional macosx handling
49335   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49336     # Setting these parameters makes it an error to link to macosx APIs that are
49337     # newer than the given OS version and makes the linked binaries compatible
49338     # even if built on a newer version of the OS.
49339     # The expected format is X.Y.Z
49340     MACOSX_VERSION_MIN=10.7.0
49341 
49342 
49343     # The macro takes the version with no dots, ex: 1070
49344     # Let the flags variables get resolved in make for easier override on make
49345     # command line.
49346     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
49347     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
49348   fi
49349 
49350   # Setup some hard coded includes
49351   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
49352       -I${JDK_TOPDIR}/src/java.base/share/native/include \
49353       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
49354       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
49355       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
49356       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
49357 
49358   # The shared libraries are compiled using the picflag.
49359   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \
49360       $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
49361   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \
49362       $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
49363 
49364   # Executable flags
49365   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \
49366       $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
49367   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \
49368       $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
49369 
49370   # The corresponding flags for building for the build platform. This is still an
49371   # approximation, we only need something that runs on this machine when cross
49372   # compiling the product.
49373   OPENJDK_BUILD_CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CCXXFLAGS_JDK \
49374       $PICFLAG $CFLAGS_JDKLIB_EXTRA"
49375   OPENJDK_BUILD_CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CCXXFLAGS_JDK \
49376       $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
49377   OPENJDK_BUILD_CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CCXXFLAGS_JDK"
49378   OPENJDK_BUILD_CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CCXXFLAGS_JDK"
49379 
49380 
49381 
49382 
49383 
49384 
49385 
49386 
49387 
49388 
49389   # Flags for compiling test libraries
49390   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
49391   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
49392 
49393   # Flags for compiling test executables
49394   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
49395   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
49396 
49397 
49398 
49399 
49400 
49401 
49402   # Setup LDFLAGS et al.
49403   #
49404 
49405   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49406     LDFLAGS_MICROSOFT="-nologo -opt:ref"
49407     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
49408     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49409       LDFLAGS_SAFESH="-safeseh"
49410       LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
49411     fi
49412   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49413     # If this is a --hash-style=gnu system, use --hash-style=both, why?
49414     # We have previously set HAS_GNU_HASH if this is the case
49415     if test -n "$HAS_GNU_HASH"; then
49416       LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
49417       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
49418     fi
49419     if test "x$OPENJDK_TARGET_OS" = xlinux; then
49420       # And since we now know that the linker is gnu, then add -z defs, to forbid
49421       # undefined symbols in object files.
49422       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
49423       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
49424       case $DEBUG_LEVEL in
49425         release )
49426           # tell linker to optimize libraries.
49427           # Should this be supplied to the OSS linker as well?
49428           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
49429           LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
49430           ;;
49431         slowdebug )
49432           if test "x$HAS_LINKER_NOW" = "xtrue"; then
49433             # do relocations at load
49434             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
49435             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
49436           fi
49437           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
49438             # mark relocations read only
49439             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
49440             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
49441           fi
49442           ;;
49443         fastdebug )
49444           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
49445             # mark relocations read only
49446             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
49447             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
49448           fi
49449           ;;
49450         * )
49451           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49452           ;;
49453         esac
49454     fi
49455   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49456     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
49457     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
49458     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
49459     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
49460   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49461     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
49462     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
49463   fi
49464 
49465   # Customize LDFLAGS for executables
49466 
49467   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
49468 
49469   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49470     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
49471       LDFLAGS_STACK_SIZE=1048576
49472     else
49473       LDFLAGS_STACK_SIZE=327680
49474     fi
49475     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
49476   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49477     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
49478   fi
49479 
49480   OPENJDK_BUILD_LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE}"
49481   LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
49482 
49483   # Customize LDFLAGS for libs
49484   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
49485 
49486   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
49487   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49488     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
49489         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
49490     JDKLIB_LIBS=""
49491   else
49492     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
49493         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
49494 
49495     # On some platforms (mac) the linker warns about non existing -L dirs.
49496     # Add server first if available. Linking aginst client does not always produce the same results.
49497     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
49498     # Default to server for other variants.
49499     if test "x$JVM_VARIANT_SERVER" = xtrue; then
49500       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
49501     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
49502       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
49503     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
49504       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
49505     else
49506       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
49507     fi
49508 
49509     JDKLIB_LIBS="-ljava -ljvm"
49510     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49511       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
49512     fi
49513 
49514     # When building a buildjdk, it's always only the server variant
49515     OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
49516         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
49517   fi
49518 
49519   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${LDFLAGS_JDKLIB}"
49520   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
49521 
49522 
49523 
49524 
49525 
49526 
49527 
49528 
49529 
49530 
49531   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
49532   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
49533 
49534 
49535 
49536 
49537 
49538   # Some Zero and Shark settings.
49539   # ZERO_ARCHFLAG tells the compiler which mode to build for
49540   case "${OPENJDK_TARGET_CPU}" in
49541     s390)
49542       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
49543       ;;
49544     *)
49545       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49546   esac
49547 
49548 
49549 
49550 
49551 
49552 
49553 
49554 
49555 
49556 
49557 
49558 
49559 
49560 
49561 
49562 
49563 
49564 
49565 
49566 
49567 
49568 
49569 
49570 
49571 
49572 
49573 
49574 
49575 
49576 
49577 
49578 
49579 
49580 
49581 
49582 
49583 
49584 
49585 
49586 
49587 
49588 
49589     # Execute function body
49590 
49591 
49592 
49593 
49594 
49595 
49596 
49597 
49598 
49599 
49600 
49601 
49602 
49603 
49604 
49605 
49606 
49607 
49608 
49609 
49610 
49611 
49612 
49613 
49614 
49615 
49616 
49617 
49618 
49619 
49620 
49621 
49622 
49623 
49624 
49625 
49626 
49627 
49628 
49629 
49630 
49631 
49632 
49633 
49634 
49635 
49636 
49637 
49638     # Execute function body
49639 
49640   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
49641 $as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
49642   supports=yes
49643 
49644   saved_cflags="$CFLAGS"
49645   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
49646   ac_ext=c
49647 ac_cpp='$CPP $CPPFLAGS'
49648 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49649 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49650 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49651 
49652   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49653 /* end confdefs.h.  */
49654 int i;
49655 _ACEOF
49656 if ac_fn_c_try_compile "$LINENO"; then :
49657 
49658 else
49659   supports=no
49660 fi
49661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49662   ac_ext=cpp
49663 ac_cpp='$CXXCPP $CPPFLAGS'
49664 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49665 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49666 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49667 
49668   CFLAGS="$saved_cflags"
49669 
49670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49671 $as_echo "$supports" >&6; }
49672   if test "x$supports" = "xyes" ; then
49673     :
49674     C_COMP_SUPPORTS="yes"
49675   else
49676     :
49677     C_COMP_SUPPORTS="no"
49678   fi
49679 
49680 
49681 
49682 
49683 
49684 
49685 
49686 
49687 
49688 
49689 
49690 
49691 
49692 
49693 
49694 
49695 
49696 
49697 
49698 
49699 
49700 
49701 
49702 
49703 
49704 
49705 
49706 
49707 
49708 
49709 
49710 
49711 
49712 
49713 
49714 
49715 
49716 
49717 
49718 
49719 
49720 
49721 
49722 
49723 
49724 
49725 
49726 
49727 
49728 
49729 
49730 
49731 
49732 
49733 
49734 
49735 
49736 
49737 
49738     # Execute function body
49739 
49740   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
49741 $as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
49742   supports=yes
49743 
49744   saved_cxxflags="$CXXFLAGS"
49745   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
49746   ac_ext=cpp
49747 ac_cpp='$CXXCPP $CPPFLAGS'
49748 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49749 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49750 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49751 
49752   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49753 /* end confdefs.h.  */
49754 int i;
49755 _ACEOF
49756 if ac_fn_cxx_try_compile "$LINENO"; then :
49757 
49758 else
49759   supports=no
49760 fi
49761 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49762   ac_ext=cpp
49763 ac_cpp='$CXXCPP $CPPFLAGS'
49764 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49765 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49766 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49767 
49768   CXXFLAGS="$saved_cxxflags"
49769 
49770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49771 $as_echo "$supports" >&6; }
49772   if test "x$supports" = "xyes" ; then
49773     :
49774     CXX_COMP_SUPPORTS="yes"
49775   else
49776     :
49777     CXX_COMP_SUPPORTS="no"
49778   fi
49779 
49780 
49781 
49782 
49783 
49784 
49785 
49786 
49787 
49788 
49789 
49790 
49791 
49792   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
49793 $as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
49794   supports=no
49795   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49796 
49797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49798 $as_echo "$supports" >&6; }
49799   if test "x$supports" = "xyes" ; then
49800     :
49801 
49802   else
49803     :
49804     ZERO_ARCHFLAG=""
49805   fi
49806 
49807 
49808 
49809 
49810 
49811 
49812 
49813 
49814   # Check that the compiler supports -mX (or -qX on AIX) flags
49815   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
49816 
49817 
49818 
49819 
49820 
49821 
49822 
49823 
49824 
49825 
49826 
49827 
49828 
49829 
49830 
49831 
49832 
49833 
49834 
49835 
49836 
49837 
49838 
49839 
49840 
49841 
49842 
49843 
49844 
49845 
49846 
49847 
49848 
49849 
49850 
49851 
49852 
49853 
49854 
49855 
49856 
49857 
49858 
49859 
49860 
49861 
49862 
49863     # Execute function body
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 
49898 
49899 
49900 
49901 
49902 
49903 
49904 
49905 
49906 
49907 
49908 
49909 
49910 
49911 
49912     # Execute function body
49913 
49914   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
49915 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
49916   supports=yes
49917 
49918   saved_cflags="$CFLAGS"
49919   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49920   ac_ext=c
49921 ac_cpp='$CPP $CPPFLAGS'
49922 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49923 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49924 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49925 
49926   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49927 /* end confdefs.h.  */
49928 int i;
49929 _ACEOF
49930 if ac_fn_c_try_compile "$LINENO"; then :
49931 
49932 else
49933   supports=no
49934 fi
49935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49936   ac_ext=cpp
49937 ac_cpp='$CXXCPP $CPPFLAGS'
49938 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49939 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49940 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49941 
49942   CFLAGS="$saved_cflags"
49943 
49944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49945 $as_echo "$supports" >&6; }
49946   if test "x$supports" = "xyes" ; then
49947     :
49948     C_COMP_SUPPORTS="yes"
49949   else
49950     :
49951     C_COMP_SUPPORTS="no"
49952   fi
49953 
49954 
49955 
49956 
49957 
49958 
49959 
49960 
49961 
49962 
49963 
49964 
49965 
49966 
49967 
49968 
49969 
49970 
49971 
49972 
49973 
49974 
49975 
49976 
49977 
49978 
49979 
49980 
49981 
49982 
49983 
49984 
49985 
49986 
49987 
49988 
49989 
49990 
49991 
49992 
49993 
49994 
49995 
49996 
49997 
49998 
49999 
50000 
50001 
50002 
50003 
50004 
50005 
50006 
50007 
50008 
50009 
50010 
50011 
50012     # Execute function body
50013 
50014   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
50015 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
50016   supports=yes
50017 
50018   saved_cxxflags="$CXXFLAGS"
50019   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50020   ac_ext=cpp
50021 ac_cpp='$CXXCPP $CPPFLAGS'
50022 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50023 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50024 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50025 
50026   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50027 /* end confdefs.h.  */
50028 int i;
50029 _ACEOF
50030 if ac_fn_cxx_try_compile "$LINENO"; then :
50031 
50032 else
50033   supports=no
50034 fi
50035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50036   ac_ext=cpp
50037 ac_cpp='$CXXCPP $CPPFLAGS'
50038 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50039 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50040 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50041 
50042   CXXFLAGS="$saved_cxxflags"
50043 
50044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50045 $as_echo "$supports" >&6; }
50046   if test "x$supports" = "xyes" ; then
50047     :
50048     CXX_COMP_SUPPORTS="yes"
50049   else
50050     :
50051     CXX_COMP_SUPPORTS="no"
50052   fi
50053 
50054 
50055 
50056 
50057 
50058 
50059 
50060 
50061 
50062 
50063 
50064 
50065 
50066   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
50067 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
50068   supports=no
50069   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50070 
50071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50072 $as_echo "$supports" >&6; }
50073   if test "x$supports" = "xyes" ; then
50074     :
50075     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
50076   else
50077     :
50078     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
50079   fi
50080 
50081 
50082 
50083 
50084 
50085 
50086 
50087 
50088   # Check whether --enable-warnings-as-errors was given.
50089 if test "${enable_warnings_as_errors+set}" = set; then :
50090   enableval=$enable_warnings_as_errors;
50091 fi
50092 
50093 
50094   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
50095 $as_echo_n "checking if native warnings are errors... " >&6; }
50096   if test "x$enable_warnings_as_errors" = "xyes"; then
50097     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
50098 $as_echo "yes (explicitely set)" >&6; }
50099     WARNINGS_AS_ERRORS=true
50100   elif test "x$enable_warnings_as_errors" = "xno"; then
50101     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50102 $as_echo "no" >&6; }
50103     WARNINGS_AS_ERRORS=false
50104   elif test "x$enable_warnings_as_errors" = "x"; then
50105     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
50106 $as_echo "yes (default)" >&6; }
50107     WARNINGS_AS_ERRORS=true
50108   else
50109     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
50110   fi
50111 
50112   if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
50113     # Set legacy hotspot variable
50114     HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
50115   else
50116     HOTSPOT_SET_WARNINGS_AS_ERRORS=""
50117   fi
50118 
50119 
50120 
50121 
50122   case "${TOOLCHAIN_TYPE}" in
50123     microsoft)
50124       DISABLE_WARNING_PREFIX="-wd"
50125       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
50126       ;;
50127     solstudio)
50128       DISABLE_WARNING_PREFIX="-erroff="
50129       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
50130       ;;
50131     gcc)
50132       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
50133 
50134 
50135 
50136 
50137 
50138 
50139 
50140 
50141 
50142 
50143 
50144 
50145 
50146 
50147 
50148 
50149 
50150 
50151 
50152 
50153 
50154 
50155 
50156 
50157 
50158 
50159 
50160 
50161 
50162 
50163 
50164 
50165 
50166 
50167 
50168 
50169 
50170 
50171 
50172 
50173 
50174 
50175 
50176 
50177 
50178 
50179 
50180     # Execute function body
50181 
50182 
50183 
50184 
50185 
50186 
50187 
50188 
50189 
50190 
50191 
50192 
50193 
50194 
50195 
50196 
50197 
50198 
50199 
50200 
50201 
50202 
50203 
50204 
50205 
50206 
50207 
50208 
50209 
50210 
50211 
50212 
50213 
50214 
50215 
50216 
50217 
50218 
50219 
50220 
50221 
50222 
50223 
50224 
50225 
50226 
50227 
50228 
50229     # Execute function body
50230 
50231   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
50232 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
50233   supports=yes
50234 
50235   saved_cflags="$CFLAGS"
50236   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
50237   ac_ext=c
50238 ac_cpp='$CPP $CPPFLAGS'
50239 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50240 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50241 ac_compiler_gnu=$ac_cv_c_compiler_gnu
50242 
50243   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50244 /* end confdefs.h.  */
50245 int i;
50246 _ACEOF
50247 if ac_fn_c_try_compile "$LINENO"; then :
50248 
50249 else
50250   supports=no
50251 fi
50252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50253   ac_ext=cpp
50254 ac_cpp='$CXXCPP $CPPFLAGS'
50255 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50256 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50257 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50258 
50259   CFLAGS="$saved_cflags"
50260 
50261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50262 $as_echo "$supports" >&6; }
50263   if test "x$supports" = "xyes" ; then
50264     :
50265     C_COMP_SUPPORTS="yes"
50266   else
50267     :
50268     C_COMP_SUPPORTS="no"
50269   fi
50270 
50271 
50272 
50273 
50274 
50275 
50276 
50277 
50278 
50279 
50280 
50281 
50282 
50283 
50284 
50285 
50286 
50287 
50288 
50289 
50290 
50291 
50292 
50293 
50294 
50295 
50296 
50297 
50298 
50299 
50300 
50301 
50302 
50303 
50304 
50305 
50306 
50307 
50308 
50309 
50310 
50311 
50312 
50313 
50314 
50315 
50316 
50317 
50318 
50319 
50320 
50321 
50322 
50323 
50324 
50325 
50326 
50327 
50328 
50329     # Execute function body
50330 
50331   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
50332 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
50333   supports=yes
50334 
50335   saved_cxxflags="$CXXFLAGS"
50336   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
50337   ac_ext=cpp
50338 ac_cpp='$CXXCPP $CPPFLAGS'
50339 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50340 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50341 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50342 
50343   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50344 /* end confdefs.h.  */
50345 int i;
50346 _ACEOF
50347 if ac_fn_cxx_try_compile "$LINENO"; then :
50348 
50349 else
50350   supports=no
50351 fi
50352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50353   ac_ext=cpp
50354 ac_cpp='$CXXCPP $CPPFLAGS'
50355 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50356 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50357 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50358 
50359   CXXFLAGS="$saved_cxxflags"
50360 
50361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50362 $as_echo "$supports" >&6; }
50363   if test "x$supports" = "xyes" ; then
50364     :
50365     CXX_COMP_SUPPORTS="yes"
50366   else
50367     :
50368     CXX_COMP_SUPPORTS="no"
50369   fi
50370 
50371 
50372 
50373 
50374 
50375 
50376 
50377 
50378 
50379 
50380 
50381 
50382 
50383   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
50384 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
50385   supports=no
50386   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50387 
50388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50389 $as_echo "$supports" >&6; }
50390   if test "x$supports" = "xyes" ; then
50391     :
50392     GCC_CAN_DISABLE_WARNINGS=true
50393   else
50394     :
50395     GCC_CAN_DISABLE_WARNINGS=false
50396 
50397   fi
50398 
50399 
50400 
50401 
50402 
50403 
50404       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
50405         DISABLE_WARNING_PREFIX="-Wno-"
50406       else
50407         DISABLE_WARNING_PREFIX=
50408       fi
50409       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
50410       # Repeate the check for the BUILD_CC
50411       CC_OLD="$CC"
50412       CC="$BUILD_CC"
50413 
50414 
50415 
50416 
50417 
50418 
50419 
50420 
50421 
50422 
50423 
50424 
50425 
50426 
50427 
50428 
50429 
50430 
50431 
50432 
50433 
50434 
50435 
50436 
50437 
50438 
50439 
50440 
50441 
50442 
50443 
50444 
50445 
50446 
50447 
50448 
50449 
50450 
50451 
50452 
50453 
50454 
50455 
50456 
50457 
50458 
50459 
50460     # Execute function body
50461 
50462 
50463 
50464 
50465 
50466 
50467 
50468 
50469 
50470 
50471 
50472 
50473 
50474 
50475 
50476 
50477 
50478 
50479 
50480 
50481 
50482 
50483 
50484 
50485 
50486 
50487 
50488 
50489 
50490 
50491 
50492 
50493 
50494 
50495 
50496 
50497 
50498 
50499 
50500 
50501 
50502 
50503 
50504 
50505 
50506 
50507 
50508 
50509     # Execute function body
50510 
50511   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
50512 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
50513   supports=yes
50514 
50515   saved_cflags="$CFLAGS"
50516   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
50517   ac_ext=c
50518 ac_cpp='$CPP $CPPFLAGS'
50519 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50520 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50521 ac_compiler_gnu=$ac_cv_c_compiler_gnu
50522 
50523   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50524 /* end confdefs.h.  */
50525 int i;
50526 _ACEOF
50527 if ac_fn_c_try_compile "$LINENO"; then :
50528 
50529 else
50530   supports=no
50531 fi
50532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50533   ac_ext=cpp
50534 ac_cpp='$CXXCPP $CPPFLAGS'
50535 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50536 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50537 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50538 
50539   CFLAGS="$saved_cflags"
50540 
50541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50542 $as_echo "$supports" >&6; }
50543   if test "x$supports" = "xyes" ; then
50544     :
50545     C_COMP_SUPPORTS="yes"
50546   else
50547     :
50548     C_COMP_SUPPORTS="no"
50549   fi
50550 
50551 
50552 
50553 
50554 
50555 
50556 
50557 
50558 
50559 
50560 
50561 
50562 
50563 
50564 
50565 
50566 
50567 
50568 
50569 
50570 
50571 
50572 
50573 
50574 
50575 
50576 
50577 
50578 
50579 
50580 
50581 
50582 
50583 
50584 
50585 
50586 
50587 
50588 
50589 
50590 
50591 
50592 
50593 
50594 
50595 
50596 
50597 
50598 
50599 
50600 
50601 
50602 
50603 
50604 
50605 
50606 
50607 
50608 
50609     # Execute function body
50610 
50611   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
50612 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
50613   supports=yes
50614 
50615   saved_cxxflags="$CXXFLAGS"
50616   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
50617   ac_ext=cpp
50618 ac_cpp='$CXXCPP $CPPFLAGS'
50619 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50620 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50621 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50622 
50623   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50624 /* end confdefs.h.  */
50625 int i;
50626 _ACEOF
50627 if ac_fn_cxx_try_compile "$LINENO"; then :
50628 
50629 else
50630   supports=no
50631 fi
50632 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50633   ac_ext=cpp
50634 ac_cpp='$CXXCPP $CPPFLAGS'
50635 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50636 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50637 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50638 
50639   CXXFLAGS="$saved_cxxflags"
50640 
50641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50642 $as_echo "$supports" >&6; }
50643   if test "x$supports" = "xyes" ; then
50644     :
50645     CXX_COMP_SUPPORTS="yes"
50646   else
50647     :
50648     CXX_COMP_SUPPORTS="no"
50649   fi
50650 
50651 
50652 
50653 
50654 
50655 
50656 
50657 
50658 
50659 
50660 
50661 
50662 
50663   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
50664 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
50665   supports=no
50666   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50667 
50668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50669 $as_echo "$supports" >&6; }
50670   if test "x$supports" = "xyes" ; then
50671     :
50672     BUILD_CC_CAN_DISABLE_WARNINGS=true
50673   else
50674     :
50675     BUILD_CC_CAN_DISABLE_WARNINGS=false
50676 
50677   fi
50678 
50679 
50680 
50681 
50682 
50683 
50684       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
50685         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
50686       else
50687         BUILD_CC_DISABLE_WARNING_PREFIX=
50688       fi
50689       CC="$CC_OLD"
50690       ;;
50691     clang)
50692       DISABLE_WARNING_PREFIX="-Wno-"
50693       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
50694       ;;
50695     xlc)
50696       DISABLE_WARNING_PREFIX="-qsuppress="
50697       CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
50698       ;;
50699   esac
50700 
50701 
50702 
50703 
50704 
50705 # Setup debug symbols (need objcopy from the toolchain for that)
50706 
50707   #
50708   # NATIVE_DEBUG_SYMBOLS
50709   # This must be done after the toolchain is setup, since we're looking at objcopy.
50710   #
50711   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
50712 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
50713 
50714 # Check whether --with-native-debug-symbols was given.
50715 if test "${with_native_debug_symbols+set}" = set; then :
50716   withval=$with_native_debug_symbols;
50717         if test "x$OPENJDK_TARGET_OS" = xaix; then
50718           if test "x$withval" = xexternal || test "x$withval" = xzipped; then
50719             as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
50720           fi
50721         fi
50722 
50723 else
50724 
50725         if test "x$OPENJDK_TARGET_OS" = xaix; then
50726           # AIX doesn't support 'zipped' so use 'internal' as default
50727           with_native_debug_symbols="internal"
50728         else
50729           if test "x$STATIC_BUILD" = xtrue; then
50730             with_native_debug_symbols="none"
50731           else
50732             with_native_debug_symbols="zipped"
50733           fi
50734         fi
50735 
50736 fi
50737 
50738   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
50739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
50740 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
50741 
50742   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
50743 
50744     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
50745       if test "x$OBJCOPY" = x; then
50746         # enabling of enable-debug-symbols and can't find objcopy
50747         # this is an error
50748         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
50749       fi
50750     fi
50751 
50752     COMPILE_WITH_DEBUG_SYMBOLS=true
50753     COPY_DEBUG_SYMBOLS=true
50754     ZIP_EXTERNAL_DEBUG_SYMBOLS=true
50755 
50756     # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
50757     DEBUG_BINARIES=false
50758     STRIP_POLICY=min_strip
50759 
50760   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
50761     COMPILE_WITH_DEBUG_SYMBOLS=false
50762     COPY_DEBUG_SYMBOLS=false
50763     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
50764 
50765     DEBUG_BINARIES=false
50766     STRIP_POLICY=no_strip
50767   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
50768     COMPILE_WITH_DEBUG_SYMBOLS=true
50769     COPY_DEBUG_SYMBOLS=false
50770     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
50771 
50772     # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
50773     DEBUG_BINARIES=true
50774     STRIP_POLICY=no_strip
50775     STRIP=""
50776 
50777   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
50778 
50779     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
50780       if test "x$OBJCOPY" = x; then
50781         # enabling of enable-debug-symbols and can't find objcopy
50782         # this is an error
50783         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
50784       fi
50785     fi
50786 
50787     COMPILE_WITH_DEBUG_SYMBOLS=true
50788     COPY_DEBUG_SYMBOLS=true
50789     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
50790 
50791     # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
50792     DEBUG_BINARIES=false
50793     STRIP_POLICY=min_strip
50794   else
50795     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
50796   fi
50797 
50798   # --enable-debug-symbols is deprecated.
50799   # Please use --with-native-debug-symbols=[internal,external,zipped] .
50800 
50801   # Check whether --enable-debug-symbols was given.
50802 if test "${enable_debug_symbols+set}" = set; then :
50803   enableval=$enable_debug_symbols;
50804 fi
50805 
50806   if test "x$enable_debug_symbols" != x; then
50807     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
50808 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
50809 
50810     if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
50811       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
50812 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
50813     fi
50814 
50815   fi
50816 
50817 
50818   # --enable-zip-debug-info is deprecated.
50819   # Please use --with-native-debug-symbols=zipped .
50820 
50821   # Check whether --enable-zip-debug-info was given.
50822 if test "${enable_zip_debug_info+set}" = set; then :
50823   enableval=$enable_zip_debug_info;
50824 fi
50825 
50826   if test "x$enable_zip_debug_info" != x; then
50827     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
50828 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
50829 
50830     if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
50831       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
50832 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
50833     fi
50834 
50835   fi
50836 
50837 
50838 
50839 
50840 
50841 
50842   # Legacy values
50843 
50844 
50845 
50846 
50847   # Check whether --enable-native-coverage was given.
50848 if test "${enable_native_coverage+set}" = set; then :
50849   enableval=$enable_native_coverage;
50850 fi
50851 
50852   GCOV_ENABLED="false"
50853   if test "x$enable_native_coverage" = "xyes"; then
50854     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
50855       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
50856 $as_echo_n "checking if native coverage is enabled... " >&6; }
50857       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50858 $as_echo "yes" >&6; }
50859       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
50860       GCOV_LDFLAGS="-fprofile-arcs"
50861       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
50862       LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
50863       LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
50864       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
50865       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
50866       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
50867       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
50868       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
50869       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
50870       GCOV_ENABLED="true"
50871     else
50872       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
50873     fi
50874   elif test "x$enable_native_coverage" = "xno"; then
50875     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
50876 $as_echo_n "checking if native coverage is enabled... " >&6; }
50877     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50878 $as_echo "no" >&6; }
50879   elif test "x$enable_native_coverage" != "x"; then
50880     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
50881   fi
50882 
50883 
50884 
50885 
50886 ###############################################################################
50887 #
50888 # Check dependencies for external and internal libraries.
50889 #
50890 ###############################################################################
50891 
50892 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
50893 
50894   # When using cygwin or msys, we need a wrapper binary that renames
50895   # /cygdrive/c/ arguments into c:/ arguments and peeks into
50896   # @files and rewrites these too! This wrapper binary is
50897   # called fixpath.
50898   FIXPATH=
50899   if test "x$OPENJDK_BUILD_OS" = xwindows; then
50900     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
50901 $as_echo_n "checking if fixpath can be created... " >&6; }
50902     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
50903     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
50904     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
50905     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
50906       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
50907       FIXPATH="$FIXPATH_BIN -c"
50908     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
50909       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
50910       # @ was chosen as separator to minimize risk of other tools messing around with it
50911       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
50912           | tr ' ' '\n' | grep '^/./' | sort | uniq`
50913       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
50914       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
50915     fi
50916     FIXPATH_SRC_W="$FIXPATH_SRC"
50917     FIXPATH_BIN_W="$FIXPATH_BIN"
50918 
50919   unix_path="$FIXPATH_SRC_W"
50920   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50921     windows_path=`$CYGPATH -m "$unix_path"`
50922     FIXPATH_SRC_W="$windows_path"
50923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50924     windows_path=`cmd //c echo $unix_path`
50925     FIXPATH_SRC_W="$windows_path"
50926   fi
50927 
50928 
50929   unix_path="$FIXPATH_BIN_W"
50930   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50931     windows_path=`$CYGPATH -m "$unix_path"`
50932     FIXPATH_BIN_W="$windows_path"
50933   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50934     windows_path=`cmd //c echo $unix_path`
50935     FIXPATH_BIN_W="$windows_path"
50936   fi
50937 
50938     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
50939     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
50940     cd $FIXPATH_DIR
50941     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
50942     cd $CURDIR
50943 
50944     if test ! -x $FIXPATH_BIN; then
50945       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50946 $as_echo "no" >&6; }
50947       cat $FIXPATH_DIR/fixpath1.log
50948       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
50949     fi
50950     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50951 $as_echo "yes" >&6; }
50952     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
50953 $as_echo_n "checking if fixpath.exe works... " >&6; }
50954     cd $FIXPATH_DIR
50955     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
50956         > $FIXPATH_DIR/fixpath2.log 2>&1
50957     cd $CURDIR
50958     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
50959       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50960 $as_echo "no" >&6; }
50961       cat $FIXPATH_DIR/fixpath2.log
50962       as_fn_error $? "fixpath did not work!" "$LINENO" 5
50963     fi
50964     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50965 $as_echo "yes" >&6; }
50966 
50967     FIXPATH_DETACH_FLAG="--detach"
50968   fi
50969 
50970 
50971 
50972 
50973 
50974 
50975   # Check if X11 is needed
50976   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
50977     # No X11 support on windows or macosx
50978     NEEDS_LIB_X11=false
50979   else
50980     if test "x$SUPPORT_HEADFUL" = xno; then
50981       # No X11 support if building headless-only
50982       NEEDS_LIB_X11=false
50983     else
50984       # All other instances need X11
50985       NEEDS_LIB_X11=true
50986     fi
50987   fi
50988 
50989   # Check if cups is needed
50990   if test "x$OPENJDK_TARGET_OS" = xwindows; then
50991     # Windows have a separate print system
50992     NEEDS_LIB_CUPS=false
50993   else
50994     NEEDS_LIB_CUPS=true
50995   fi
50996 
50997   # Check if freetype is needed
50998   if test "x$OPENJDK" = "xtrue"; then
50999     NEEDS_LIB_FREETYPE=true
51000   else
51001     NEEDS_LIB_FREETYPE=false
51002   fi
51003 
51004   # Check if alsa is needed
51005   if test "x$OPENJDK_TARGET_OS" = xlinux; then
51006     NEEDS_LIB_ALSA=true
51007   else
51008     NEEDS_LIB_ALSA=false
51009   fi
51010 
51011   # Check if ffi is needed
51012   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
51013     NEEDS_LIB_FFI=true
51014   else
51015     NEEDS_LIB_FFI=false
51016   fi
51017 
51018 
51019   # statically link libstdc++ before C++ ABI is stablized on Linux unless
51020   # dynamic build is configured on command line.
51021 
51022 # Check whether --with-stdc++lib was given.
51023 if test "${with_stdc__lib+set}" = set; then :
51024   withval=$with_stdc__lib;
51025         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
51026                 && test "x$with_stdc__lib" != xdefault; then
51027           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
51028         fi
51029 
51030 else
51031   with_stdc__lib=default
51032 
51033 fi
51034 
51035 
51036   if test "x$OPENJDK_TARGET_OS" = xlinux; then
51037     # Test if -lstdc++ works.
51038     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
51039 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
51040     ac_ext=cpp
51041 ac_cpp='$CXXCPP $CPPFLAGS'
51042 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51043 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51044 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51045 
51046     OLD_CXXFLAGS="$CXXFLAGS"
51047     CXXFLAGS="$CXXFLAGS -lstdc++"
51048     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51049 /* end confdefs.h.  */
51050 
51051 int
51052 main ()
51053 {
51054 return 0;
51055   ;
51056   return 0;
51057 }
51058 _ACEOF
51059 if ac_fn_cxx_try_link "$LINENO"; then :
51060   has_dynamic_libstdcxx=yes
51061 else
51062   has_dynamic_libstdcxx=no
51063 fi
51064 rm -f core conftest.err conftest.$ac_objext \
51065     conftest$ac_exeext conftest.$ac_ext
51066     CXXFLAGS="$OLD_CXXFLAGS"
51067     ac_ext=cpp
51068 ac_cpp='$CXXCPP $CPPFLAGS'
51069 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51070 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51071 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51072 
51073     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
51074 $as_echo "$has_dynamic_libstdcxx" >&6; }
51075 
51076     # Test if stdc++ can be linked statically.
51077     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
51078 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
51079     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
51080     ac_ext=cpp
51081 ac_cpp='$CXXCPP $CPPFLAGS'
51082 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51083 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51084 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51085 
51086     OLD_LIBS="$LIBS"
51087     OLD_CXX="$CXX"
51088     LIBS="$STATIC_STDCXX_FLAGS"
51089     CXX="$CC"
51090     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51091 /* end confdefs.h.  */
51092 
51093 int
51094 main ()
51095 {
51096 return 0;
51097   ;
51098   return 0;
51099 }
51100 _ACEOF
51101 if ac_fn_cxx_try_link "$LINENO"; then :
51102   has_static_libstdcxx=yes
51103 else
51104   has_static_libstdcxx=no
51105 fi
51106 rm -f core conftest.err conftest.$ac_objext \
51107     conftest$ac_exeext conftest.$ac_ext
51108     LIBS="$OLD_LIBS"
51109     CXX="$OLD_CXX"
51110     ac_ext=cpp
51111 ac_cpp='$CXXCPP $CPPFLAGS'
51112 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51113 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51114 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51115 
51116     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
51117 $as_echo "$has_static_libstdcxx" >&6; }
51118 
51119     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
51120       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
51121     fi
51122 
51123     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
51124       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
51125     fi
51126 
51127     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
51128       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
51129     fi
51130 
51131     # If dynamic was requested, it's available since it would fail above otherwise.
51132     # If dynamic wasn't requested, go with static unless it isn't available.
51133     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
51134 $as_echo_n "checking how to link with libstdc++... " >&6; }
51135     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
51136       LIBCXX="$LIBCXX -lstdc++"
51137       LDCXX="$CXX"
51138       STATIC_CXX_SETTING="STATIC_CXX=false"
51139       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
51140 $as_echo "dynamic" >&6; }
51141     else
51142       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
51143       LDCXX="$CC"
51144       STATIC_CXX_SETTING="STATIC_CXX=true"
51145       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
51146 $as_echo "static" >&6; }
51147     fi
51148   fi
51149 
51150 
51151   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
51152   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
51153     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
51154   fi
51155 
51156   # TODO better (platform agnostic) test
51157   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
51158     LIBCXX="-lstdc++"
51159   fi
51160 
51161 
51162   # Setup Windows runtime dlls
51163   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
51164 
51165 
51166 # Check whether --with-msvcr-dll was given.
51167 if test "${with_msvcr_dll+set}" = set; then :
51168   withval=$with_msvcr_dll;
51169 fi
51170 
51171 
51172   if test "x$with_msvcr_dll" != x; then
51173     # If given explicitely by user, do not probe. If not present, fail directly.
51174 
51175   DLL_NAME="$MSVCR_NAME"
51176   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
51177   METHOD="--with-msvcr-dll"
51178   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51179     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51180 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51181 
51182     # Need to check if the found msvcr is correct architecture
51183     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51184 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51185     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51186     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51187       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51188       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51189       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51190         CORRECT_MSVCR_ARCH="PE32 executable"
51191       else
51192         CORRECT_MSVCR_ARCH="PE32+ executable"
51193       fi
51194     else
51195       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51196         CORRECT_MSVCR_ARCH=386
51197       else
51198         CORRECT_MSVCR_ARCH=x86-64
51199       fi
51200     fi
51201     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51202       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51203 $as_echo "ok" >&6; }
51204       MSVC_DLL="$POSSIBLE_MSVC_DLL"
51205 
51206   # Only process if variable expands to non-empty
51207 
51208   if test "x$MSVC_DLL" != x; then
51209     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51210 
51211   # Input might be given as Windows format, start by converting to
51212   # unix format.
51213   path="$MSVC_DLL"
51214   new_path=`$CYGPATH -u "$path"`
51215 
51216   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51217   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51218   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51219   # "foo.exe" is OK but "foo" is an error.
51220   #
51221   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51222   # It is also a way to make sure we got the proper file name for the real test later on.
51223   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51224   if test "x$test_shortpath" = x; then
51225     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51226 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51227     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51228   fi
51229 
51230   # Call helper function which possibly converts this using DOS-style short mode.
51231   # If so, the updated path is stored in $new_path.
51232 
51233   input_path="$new_path"
51234   # Check if we need to convert this using DOS-style short mode. If the path
51235   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51236   # take no chances and rewrite it.
51237   # Note: m4 eats our [], so we need to use [ and ] instead.
51238   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51239   if test "x$has_forbidden_chars" != x; then
51240     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51241     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51242     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51243     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51244       # Going to short mode and back again did indeed matter. Since short mode is
51245       # case insensitive, let's make it lowercase to improve readability.
51246       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51247       # Now convert it back to Unix-style (cygpath)
51248       input_path=`$CYGPATH -u "$shortmode_path"`
51249       new_path="$input_path"
51250     fi
51251   fi
51252 
51253   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51254   if test "x$test_cygdrive_prefix" = x; then
51255     # As a simple fix, exclude /usr/bin since it's not a real path.
51256     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51257       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51258       # a path prefixed by /cygdrive for fixpath to work.
51259       new_path="$CYGWIN_ROOT_PATH$input_path"
51260     fi
51261   fi
51262 
51263 
51264   if test "x$path" != "x$new_path"; then
51265     MSVC_DLL="$new_path"
51266     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51267 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51268   fi
51269 
51270     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51271 
51272   path="$MSVC_DLL"
51273   has_colon=`$ECHO $path | $GREP ^.:`
51274   new_path="$path"
51275   if test "x$has_colon" = x; then
51276     # Not in mixed or Windows style, start by that.
51277     new_path=`cmd //c echo $path`
51278   fi
51279 
51280 
51281   input_path="$new_path"
51282   # Check if we need to convert this using DOS-style short mode. If the path
51283   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51284   # take no chances and rewrite it.
51285   # Note: m4 eats our [], so we need to use [ and ] instead.
51286   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51287   if test "x$has_forbidden_chars" != x; then
51288     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51289     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51290   fi
51291 
51292 
51293   windows_path="$new_path"
51294   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51295     unix_path=`$CYGPATH -u "$windows_path"`
51296     new_path="$unix_path"
51297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51298     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51299     new_path="$unix_path"
51300   fi
51301 
51302   if test "x$path" != "x$new_path"; then
51303     MSVC_DLL="$new_path"
51304     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51305 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51306   fi
51307 
51308   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51309   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51310 
51311     else
51312       # We're on a unix platform. Hooray! :)
51313       path="$MSVC_DLL"
51314       has_space=`$ECHO "$path" | $GREP " "`
51315       if test "x$has_space" != x; then
51316         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51317 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51318         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51319       fi
51320 
51321       # Use eval to expand a potential ~
51322       eval path="$path"
51323       if test ! -f "$path" && test ! -d "$path"; then
51324         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51325       fi
51326 
51327       if test -d "$path"; then
51328         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51329       else
51330         dir="`$DIRNAME "$path"`"
51331         base="`$BASENAME "$path"`"
51332         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51333       fi
51334     fi
51335   fi
51336 
51337       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51338 $as_echo_n "checking for $DLL_NAME... " >&6; }
51339       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51340 $as_echo "$MSVC_DLL" >&6; }
51341     else
51342       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51343 $as_echo "incorrect, ignoring" >&6; }
51344       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51345 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51346     fi
51347   fi
51348 
51349     if test "x$MSVC_DLL" = x; then
51350       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
51351     fi
51352     MSVCR_DLL="$MSVC_DLL"
51353   elif test "x$DEVKIT_MSVCR_DLL" != x; then
51354 
51355   DLL_NAME="$MSVCR_NAME"
51356   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
51357   METHOD="devkit"
51358   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51359     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51360 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51361 
51362     # Need to check if the found msvcr is correct architecture
51363     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51364 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51365     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51366     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51367       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51368       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51369       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51370         CORRECT_MSVCR_ARCH="PE32 executable"
51371       else
51372         CORRECT_MSVCR_ARCH="PE32+ executable"
51373       fi
51374     else
51375       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51376         CORRECT_MSVCR_ARCH=386
51377       else
51378         CORRECT_MSVCR_ARCH=x86-64
51379       fi
51380     fi
51381     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51382       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51383 $as_echo "ok" >&6; }
51384       MSVC_DLL="$POSSIBLE_MSVC_DLL"
51385 
51386   # Only process if variable expands to non-empty
51387 
51388   if test "x$MSVC_DLL" != x; then
51389     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51390 
51391   # Input might be given as Windows format, start by converting to
51392   # unix format.
51393   path="$MSVC_DLL"
51394   new_path=`$CYGPATH -u "$path"`
51395 
51396   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51397   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51398   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51399   # "foo.exe" is OK but "foo" is an error.
51400   #
51401   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51402   # It is also a way to make sure we got the proper file name for the real test later on.
51403   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51404   if test "x$test_shortpath" = x; then
51405     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51406 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51407     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51408   fi
51409 
51410   # Call helper function which possibly converts this using DOS-style short mode.
51411   # If so, the updated path is stored in $new_path.
51412 
51413   input_path="$new_path"
51414   # Check if we need to convert this using DOS-style short mode. If the path
51415   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51416   # take no chances and rewrite it.
51417   # Note: m4 eats our [], so we need to use [ and ] instead.
51418   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51419   if test "x$has_forbidden_chars" != x; then
51420     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51421     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51422     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51423     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51424       # Going to short mode and back again did indeed matter. Since short mode is
51425       # case insensitive, let's make it lowercase to improve readability.
51426       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51427       # Now convert it back to Unix-style (cygpath)
51428       input_path=`$CYGPATH -u "$shortmode_path"`
51429       new_path="$input_path"
51430     fi
51431   fi
51432 
51433   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51434   if test "x$test_cygdrive_prefix" = x; then
51435     # As a simple fix, exclude /usr/bin since it's not a real path.
51436     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51437       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51438       # a path prefixed by /cygdrive for fixpath to work.
51439       new_path="$CYGWIN_ROOT_PATH$input_path"
51440     fi
51441   fi
51442 
51443 
51444   if test "x$path" != "x$new_path"; then
51445     MSVC_DLL="$new_path"
51446     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51447 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51448   fi
51449 
51450     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51451 
51452   path="$MSVC_DLL"
51453   has_colon=`$ECHO $path | $GREP ^.:`
51454   new_path="$path"
51455   if test "x$has_colon" = x; then
51456     # Not in mixed or Windows style, start by that.
51457     new_path=`cmd //c echo $path`
51458   fi
51459 
51460 
51461   input_path="$new_path"
51462   # Check if we need to convert this using DOS-style short mode. If the path
51463   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51464   # take no chances and rewrite it.
51465   # Note: m4 eats our [], so we need to use [ and ] instead.
51466   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51467   if test "x$has_forbidden_chars" != x; then
51468     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51469     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51470   fi
51471 
51472 
51473   windows_path="$new_path"
51474   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51475     unix_path=`$CYGPATH -u "$windows_path"`
51476     new_path="$unix_path"
51477   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51478     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51479     new_path="$unix_path"
51480   fi
51481 
51482   if test "x$path" != "x$new_path"; then
51483     MSVC_DLL="$new_path"
51484     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51485 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51486   fi
51487 
51488   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51489   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51490 
51491     else
51492       # We're on a unix platform. Hooray! :)
51493       path="$MSVC_DLL"
51494       has_space=`$ECHO "$path" | $GREP " "`
51495       if test "x$has_space" != x; then
51496         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51497 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51498         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51499       fi
51500 
51501       # Use eval to expand a potential ~
51502       eval path="$path"
51503       if test ! -f "$path" && test ! -d "$path"; then
51504         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51505       fi
51506 
51507       if test -d "$path"; then
51508         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51509       else
51510         dir="`$DIRNAME "$path"`"
51511         base="`$BASENAME "$path"`"
51512         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51513       fi
51514     fi
51515   fi
51516 
51517       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51518 $as_echo_n "checking for $DLL_NAME... " >&6; }
51519       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51520 $as_echo "$MSVC_DLL" >&6; }
51521     else
51522       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51523 $as_echo "incorrect, ignoring" >&6; }
51524       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51525 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51526     fi
51527   fi
51528 
51529     if test "x$MSVC_DLL" = x; then
51530       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
51531     fi
51532     MSVCR_DLL="$MSVC_DLL"
51533   else
51534 
51535   DLL_NAME="${MSVCR_NAME}"
51536   MSVC_DLL=
51537 
51538   if test "x$MSVC_DLL" = x; then
51539     # Probe: Using well-known location from Visual Studio 10.0
51540     if test "x$VCINSTALLDIR" != x; then
51541       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51542 
51543   windows_path="$CYGWIN_VC_INSTALL_DIR"
51544   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51545     unix_path=`$CYGPATH -u "$windows_path"`
51546     CYGWIN_VC_INSTALL_DIR="$unix_path"
51547   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51548     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51549     CYGWIN_VC_INSTALL_DIR="$unix_path"
51550   fi
51551 
51552       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51553         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51554       else
51555         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51556       fi
51557       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51558 
51559   DLL_NAME="$DLL_NAME"
51560   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51561   METHOD="well-known location in VCINSTALLDIR"
51562   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51563     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51564 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51565 
51566     # Need to check if the found msvcr is correct architecture
51567     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51568 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51569     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51570     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51571       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51572       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51573       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51574         CORRECT_MSVCR_ARCH="PE32 executable"
51575       else
51576         CORRECT_MSVCR_ARCH="PE32+ executable"
51577       fi
51578     else
51579       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51580         CORRECT_MSVCR_ARCH=386
51581       else
51582         CORRECT_MSVCR_ARCH=x86-64
51583       fi
51584     fi
51585     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51586       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51587 $as_echo "ok" >&6; }
51588       MSVC_DLL="$POSSIBLE_MSVC_DLL"
51589 
51590   # Only process if variable expands to non-empty
51591 
51592   if test "x$MSVC_DLL" != x; then
51593     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51594 
51595   # Input might be given as Windows format, start by converting to
51596   # unix format.
51597   path="$MSVC_DLL"
51598   new_path=`$CYGPATH -u "$path"`
51599 
51600   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51601   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51602   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51603   # "foo.exe" is OK but "foo" is an error.
51604   #
51605   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51606   # It is also a way to make sure we got the proper file name for the real test later on.
51607   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51608   if test "x$test_shortpath" = x; then
51609     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51610 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51611     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51612   fi
51613 
51614   # Call helper function which possibly converts this using DOS-style short mode.
51615   # If so, the updated path is stored in $new_path.
51616 
51617   input_path="$new_path"
51618   # Check if we need to convert this using DOS-style short mode. If the path
51619   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51620   # take no chances and rewrite it.
51621   # Note: m4 eats our [], so we need to use [ and ] instead.
51622   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51623   if test "x$has_forbidden_chars" != x; then
51624     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51625     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51626     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51627     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51628       # Going to short mode and back again did indeed matter. Since short mode is
51629       # case insensitive, let's make it lowercase to improve readability.
51630       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51631       # Now convert it back to Unix-style (cygpath)
51632       input_path=`$CYGPATH -u "$shortmode_path"`
51633       new_path="$input_path"
51634     fi
51635   fi
51636 
51637   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51638   if test "x$test_cygdrive_prefix" = x; then
51639     # As a simple fix, exclude /usr/bin since it's not a real path.
51640     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51641       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51642       # a path prefixed by /cygdrive for fixpath to work.
51643       new_path="$CYGWIN_ROOT_PATH$input_path"
51644     fi
51645   fi
51646 
51647 
51648   if test "x$path" != "x$new_path"; then
51649     MSVC_DLL="$new_path"
51650     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51651 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51652   fi
51653 
51654     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51655 
51656   path="$MSVC_DLL"
51657   has_colon=`$ECHO $path | $GREP ^.:`
51658   new_path="$path"
51659   if test "x$has_colon" = x; then
51660     # Not in mixed or Windows style, start by that.
51661     new_path=`cmd //c echo $path`
51662   fi
51663 
51664 
51665   input_path="$new_path"
51666   # Check if we need to convert this using DOS-style short mode. If the path
51667   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51668   # take no chances and rewrite it.
51669   # Note: m4 eats our [], so we need to use [ and ] instead.
51670   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51671   if test "x$has_forbidden_chars" != x; then
51672     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51673     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51674   fi
51675 
51676 
51677   windows_path="$new_path"
51678   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51679     unix_path=`$CYGPATH -u "$windows_path"`
51680     new_path="$unix_path"
51681   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51682     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51683     new_path="$unix_path"
51684   fi
51685 
51686   if test "x$path" != "x$new_path"; then
51687     MSVC_DLL="$new_path"
51688     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51689 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51690   fi
51691 
51692   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51693   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51694 
51695     else
51696       # We're on a unix platform. Hooray! :)
51697       path="$MSVC_DLL"
51698       has_space=`$ECHO "$path" | $GREP " "`
51699       if test "x$has_space" != x; then
51700         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51701 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51702         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51703       fi
51704 
51705       # Use eval to expand a potential ~
51706       eval path="$path"
51707       if test ! -f "$path" && test ! -d "$path"; then
51708         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51709       fi
51710 
51711       if test -d "$path"; then
51712         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51713       else
51714         dir="`$DIRNAME "$path"`"
51715         base="`$BASENAME "$path"`"
51716         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51717       fi
51718     fi
51719   fi
51720 
51721       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51722 $as_echo_n "checking for $DLL_NAME... " >&6; }
51723       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51724 $as_echo "$MSVC_DLL" >&6; }
51725     else
51726       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51727 $as_echo "incorrect, ignoring" >&6; }
51728       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51729 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51730     fi
51731   fi
51732 
51733     fi
51734   fi
51735 
51736   if test "x$MSVC_DLL" = x; then
51737     # Probe: Check in the Boot JDK directory.
51738     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51739 
51740   DLL_NAME="$DLL_NAME"
51741   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51742   METHOD="well-known location in Boot JDK"
51743   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51744     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51745 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51746 
51747     # Need to check if the found msvcr is correct architecture
51748     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51749 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51750     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51751     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51752       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51753       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51754       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51755         CORRECT_MSVCR_ARCH="PE32 executable"
51756       else
51757         CORRECT_MSVCR_ARCH="PE32+ executable"
51758       fi
51759     else
51760       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51761         CORRECT_MSVCR_ARCH=386
51762       else
51763         CORRECT_MSVCR_ARCH=x86-64
51764       fi
51765     fi
51766     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51767       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51768 $as_echo "ok" >&6; }
51769       MSVC_DLL="$POSSIBLE_MSVC_DLL"
51770 
51771   # Only process if variable expands to non-empty
51772 
51773   if test "x$MSVC_DLL" != x; then
51774     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51775 
51776   # Input might be given as Windows format, start by converting to
51777   # unix format.
51778   path="$MSVC_DLL"
51779   new_path=`$CYGPATH -u "$path"`
51780 
51781   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51782   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51783   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51784   # "foo.exe" is OK but "foo" is an error.
51785   #
51786   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51787   # It is also a way to make sure we got the proper file name for the real test later on.
51788   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51789   if test "x$test_shortpath" = x; then
51790     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51791 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51792     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51793   fi
51794 
51795   # Call helper function which possibly converts this using DOS-style short mode.
51796   # If so, the updated path is stored in $new_path.
51797 
51798   input_path="$new_path"
51799   # Check if we need to convert this using DOS-style short mode. If the path
51800   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51801   # take no chances and rewrite it.
51802   # Note: m4 eats our [], so we need to use [ and ] instead.
51803   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51804   if test "x$has_forbidden_chars" != x; then
51805     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51806     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51807     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51808     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51809       # Going to short mode and back again did indeed matter. Since short mode is
51810       # case insensitive, let's make it lowercase to improve readability.
51811       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51812       # Now convert it back to Unix-style (cygpath)
51813       input_path=`$CYGPATH -u "$shortmode_path"`
51814       new_path="$input_path"
51815     fi
51816   fi
51817 
51818   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51819   if test "x$test_cygdrive_prefix" = x; then
51820     # As a simple fix, exclude /usr/bin since it's not a real path.
51821     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51822       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51823       # a path prefixed by /cygdrive for fixpath to work.
51824       new_path="$CYGWIN_ROOT_PATH$input_path"
51825     fi
51826   fi
51827 
51828 
51829   if test "x$path" != "x$new_path"; then
51830     MSVC_DLL="$new_path"
51831     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51832 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51833   fi
51834 
51835     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51836 
51837   path="$MSVC_DLL"
51838   has_colon=`$ECHO $path | $GREP ^.:`
51839   new_path="$path"
51840   if test "x$has_colon" = x; then
51841     # Not in mixed or Windows style, start by that.
51842     new_path=`cmd //c echo $path`
51843   fi
51844 
51845 
51846   input_path="$new_path"
51847   # Check if we need to convert this using DOS-style short mode. If the path
51848   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51849   # take no chances and rewrite it.
51850   # Note: m4 eats our [], so we need to use [ and ] instead.
51851   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51852   if test "x$has_forbidden_chars" != x; then
51853     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51854     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51855   fi
51856 
51857 
51858   windows_path="$new_path"
51859   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51860     unix_path=`$CYGPATH -u "$windows_path"`
51861     new_path="$unix_path"
51862   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51863     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51864     new_path="$unix_path"
51865   fi
51866 
51867   if test "x$path" != "x$new_path"; then
51868     MSVC_DLL="$new_path"
51869     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51870 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51871   fi
51872 
51873   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51874   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51875 
51876     else
51877       # We're on a unix platform. Hooray! :)
51878       path="$MSVC_DLL"
51879       has_space=`$ECHO "$path" | $GREP " "`
51880       if test "x$has_space" != x; then
51881         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51882 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51883         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51884       fi
51885 
51886       # Use eval to expand a potential ~
51887       eval path="$path"
51888       if test ! -f "$path" && test ! -d "$path"; then
51889         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51890       fi
51891 
51892       if test -d "$path"; then
51893         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51894       else
51895         dir="`$DIRNAME "$path"`"
51896         base="`$BASENAME "$path"`"
51897         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51898       fi
51899     fi
51900   fi
51901 
51902       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51903 $as_echo_n "checking for $DLL_NAME... " >&6; }
51904       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51905 $as_echo "$MSVC_DLL" >&6; }
51906     else
51907       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51908 $as_echo "incorrect, ignoring" >&6; }
51909       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51910 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51911     fi
51912   fi
51913 
51914   fi
51915 
51916   if test "x$MSVC_DLL" = x; then
51917     # Probe: Look in the Windows system32 directory
51918     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51919 
51920   windows_path="$CYGWIN_SYSTEMROOT"
51921   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51922     unix_path=`$CYGPATH -u "$windows_path"`
51923     CYGWIN_SYSTEMROOT="$unix_path"
51924   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51925     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51926     CYGWIN_SYSTEMROOT="$unix_path"
51927   fi
51928 
51929     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51930 
51931   DLL_NAME="$DLL_NAME"
51932   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51933   METHOD="well-known location in SYSTEMROOT"
51934   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51935     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51936 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51937 
51938     # Need to check if the found msvcr is correct architecture
51939     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51940 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51941     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51942     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51943       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51944       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51945       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51946         CORRECT_MSVCR_ARCH="PE32 executable"
51947       else
51948         CORRECT_MSVCR_ARCH="PE32+ executable"
51949       fi
51950     else
51951       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51952         CORRECT_MSVCR_ARCH=386
51953       else
51954         CORRECT_MSVCR_ARCH=x86-64
51955       fi
51956     fi
51957     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51958       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51959 $as_echo "ok" >&6; }
51960       MSVC_DLL="$POSSIBLE_MSVC_DLL"
51961 
51962   # Only process if variable expands to non-empty
51963 
51964   if test "x$MSVC_DLL" != x; then
51965     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51966 
51967   # Input might be given as Windows format, start by converting to
51968   # unix format.
51969   path="$MSVC_DLL"
51970   new_path=`$CYGPATH -u "$path"`
51971 
51972   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51973   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51974   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51975   # "foo.exe" is OK but "foo" is an error.
51976   #
51977   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51978   # It is also a way to make sure we got the proper file name for the real test later on.
51979   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51980   if test "x$test_shortpath" = x; then
51981     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51982 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51983     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51984   fi
51985 
51986   # Call helper function which possibly converts this using DOS-style short mode.
51987   # If so, the updated path is stored in $new_path.
51988 
51989   input_path="$new_path"
51990   # Check if we need to convert this using DOS-style short mode. If the path
51991   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51992   # take no chances and rewrite it.
51993   # Note: m4 eats our [], so we need to use [ and ] instead.
51994   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51995   if test "x$has_forbidden_chars" != x; then
51996     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51997     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51998     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51999     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52000       # Going to short mode and back again did indeed matter. Since short mode is
52001       # case insensitive, let's make it lowercase to improve readability.
52002       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52003       # Now convert it back to Unix-style (cygpath)
52004       input_path=`$CYGPATH -u "$shortmode_path"`
52005       new_path="$input_path"
52006     fi
52007   fi
52008 
52009   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52010   if test "x$test_cygdrive_prefix" = x; then
52011     # As a simple fix, exclude /usr/bin since it's not a real path.
52012     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52013       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52014       # a path prefixed by /cygdrive for fixpath to work.
52015       new_path="$CYGWIN_ROOT_PATH$input_path"
52016     fi
52017   fi
52018 
52019 
52020   if test "x$path" != "x$new_path"; then
52021     MSVC_DLL="$new_path"
52022     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52023 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52024   fi
52025 
52026     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52027 
52028   path="$MSVC_DLL"
52029   has_colon=`$ECHO $path | $GREP ^.:`
52030   new_path="$path"
52031   if test "x$has_colon" = x; then
52032     # Not in mixed or Windows style, start by that.
52033     new_path=`cmd //c echo $path`
52034   fi
52035 
52036 
52037   input_path="$new_path"
52038   # Check if we need to convert this using DOS-style short mode. If the path
52039   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52040   # take no chances and rewrite it.
52041   # Note: m4 eats our [], so we need to use [ and ] instead.
52042   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52043   if test "x$has_forbidden_chars" != x; then
52044     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52045     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52046   fi
52047 
52048 
52049   windows_path="$new_path"
52050   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52051     unix_path=`$CYGPATH -u "$windows_path"`
52052     new_path="$unix_path"
52053   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52054     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52055     new_path="$unix_path"
52056   fi
52057 
52058   if test "x$path" != "x$new_path"; then
52059     MSVC_DLL="$new_path"
52060     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52061 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52062   fi
52063 
52064   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52065   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52066 
52067     else
52068       # We're on a unix platform. Hooray! :)
52069       path="$MSVC_DLL"
52070       has_space=`$ECHO "$path" | $GREP " "`
52071       if test "x$has_space" != x; then
52072         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52073 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52074         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52075       fi
52076 
52077       # Use eval to expand a potential ~
52078       eval path="$path"
52079       if test ! -f "$path" && test ! -d "$path"; then
52080         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52081       fi
52082 
52083       if test -d "$path"; then
52084         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52085       else
52086         dir="`$DIRNAME "$path"`"
52087         base="`$BASENAME "$path"`"
52088         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
52089       fi
52090     fi
52091   fi
52092 
52093       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52094 $as_echo_n "checking for $DLL_NAME... " >&6; }
52095       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52096 $as_echo "$MSVC_DLL" >&6; }
52097     else
52098       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52099 $as_echo "incorrect, ignoring" >&6; }
52100       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52101 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52102     fi
52103   fi
52104 
52105   fi
52106 
52107   if test "x$MSVC_DLL" = x; then
52108     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
52109     if test "x$VS100COMNTOOLS" != x; then
52110       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
52111 
52112   windows_path="$CYGWIN_VS_TOOLS_DIR"
52113   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52114     unix_path=`$CYGPATH -u "$windows_path"`
52115     CYGWIN_VS_TOOLS_DIR="$unix_path"
52116   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52117     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52118     CYGWIN_VS_TOOLS_DIR="$unix_path"
52119   fi
52120 
52121       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52122         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52123             | $GREP -i /x64/ | $HEAD --lines 1`
52124       else
52125         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52126             | $GREP -i /x86/ | $HEAD --lines 1`
52127       fi
52128 
52129   DLL_NAME="$DLL_NAME"
52130   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52131   METHOD="search of VS100COMNTOOLS"
52132   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52133     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52134 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52135 
52136     # Need to check if the found msvcr is correct architecture
52137     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52138 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52139     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52140     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52141       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52142       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52143       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52144         CORRECT_MSVCR_ARCH="PE32 executable"
52145       else
52146         CORRECT_MSVCR_ARCH="PE32+ executable"
52147       fi
52148     else
52149       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52150         CORRECT_MSVCR_ARCH=386
52151       else
52152         CORRECT_MSVCR_ARCH=x86-64
52153       fi
52154     fi
52155     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52156       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52157 $as_echo "ok" >&6; }
52158       MSVC_DLL="$POSSIBLE_MSVC_DLL"
52159 
52160   # Only process if variable expands to non-empty
52161 
52162   if test "x$MSVC_DLL" != x; then
52163     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52164 
52165   # Input might be given as Windows format, start by converting to
52166   # unix format.
52167   path="$MSVC_DLL"
52168   new_path=`$CYGPATH -u "$path"`
52169 
52170   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52171   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52172   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52173   # "foo.exe" is OK but "foo" is an error.
52174   #
52175   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52176   # It is also a way to make sure we got the proper file name for the real test later on.
52177   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52178   if test "x$test_shortpath" = x; then
52179     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52180 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52181     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52182   fi
52183 
52184   # Call helper function which possibly converts this using DOS-style short mode.
52185   # If so, the updated path is stored in $new_path.
52186 
52187   input_path="$new_path"
52188   # Check if we need to convert this using DOS-style short mode. If the path
52189   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52190   # take no chances and rewrite it.
52191   # Note: m4 eats our [], so we need to use [ and ] instead.
52192   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52193   if test "x$has_forbidden_chars" != x; then
52194     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52195     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52196     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52197     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52198       # Going to short mode and back again did indeed matter. Since short mode is
52199       # case insensitive, let's make it lowercase to improve readability.
52200       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52201       # Now convert it back to Unix-style (cygpath)
52202       input_path=`$CYGPATH -u "$shortmode_path"`
52203       new_path="$input_path"
52204     fi
52205   fi
52206 
52207   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52208   if test "x$test_cygdrive_prefix" = x; then
52209     # As a simple fix, exclude /usr/bin since it's not a real path.
52210     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52211       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52212       # a path prefixed by /cygdrive for fixpath to work.
52213       new_path="$CYGWIN_ROOT_PATH$input_path"
52214     fi
52215   fi
52216 
52217 
52218   if test "x$path" != "x$new_path"; then
52219     MSVC_DLL="$new_path"
52220     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52221 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52222   fi
52223 
52224     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52225 
52226   path="$MSVC_DLL"
52227   has_colon=`$ECHO $path | $GREP ^.:`
52228   new_path="$path"
52229   if test "x$has_colon" = x; then
52230     # Not in mixed or Windows style, start by that.
52231     new_path=`cmd //c echo $path`
52232   fi
52233 
52234 
52235   input_path="$new_path"
52236   # Check if we need to convert this using DOS-style short mode. If the path
52237   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52238   # take no chances and rewrite it.
52239   # Note: m4 eats our [], so we need to use [ and ] instead.
52240   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52241   if test "x$has_forbidden_chars" != x; then
52242     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52243     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52244   fi
52245 
52246 
52247   windows_path="$new_path"
52248   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52249     unix_path=`$CYGPATH -u "$windows_path"`
52250     new_path="$unix_path"
52251   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52252     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52253     new_path="$unix_path"
52254   fi
52255 
52256   if test "x$path" != "x$new_path"; then
52257     MSVC_DLL="$new_path"
52258     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52259 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52260   fi
52261 
52262   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52263   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52264 
52265     else
52266       # We're on a unix platform. Hooray! :)
52267       path="$MSVC_DLL"
52268       has_space=`$ECHO "$path" | $GREP " "`
52269       if test "x$has_space" != x; then
52270         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52271 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52272         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52273       fi
52274 
52275       # Use eval to expand a potential ~
52276       eval path="$path"
52277       if test ! -f "$path" && test ! -d "$path"; then
52278         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52279       fi
52280 
52281       if test -d "$path"; then
52282         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52283       else
52284         dir="`$DIRNAME "$path"`"
52285         base="`$BASENAME "$path"`"
52286         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
52287       fi
52288     fi
52289   fi
52290 
52291       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52292 $as_echo_n "checking for $DLL_NAME... " >&6; }
52293       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52294 $as_echo "$MSVC_DLL" >&6; }
52295     else
52296       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52297 $as_echo "incorrect, ignoring" >&6; }
52298       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52299 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52300     fi
52301   fi
52302 
52303     fi
52304   fi
52305 
52306   if test "x$MSVC_DLL" = x; then
52307     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
52308     # (This was the original behaviour; kept since it might turn something up)
52309     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
52310       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52311         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52312             | $GREP x64 | $HEAD --lines 1`
52313       else
52314         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52315             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
52316         if test "x$POSSIBLE_MSVC_DLL" = x; then
52317           # We're grasping at straws now...
52318           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52319               | $HEAD --lines 1`
52320         fi
52321       fi
52322 
52323 
52324   DLL_NAME="$DLL_NAME"
52325   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52326   METHOD="search of VCINSTALLDIR"
52327   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52328     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52329 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52330 
52331     # Need to check if the found msvcr is correct architecture
52332     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52333 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52334     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52335     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52336       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52337       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52338       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52339         CORRECT_MSVCR_ARCH="PE32 executable"
52340       else
52341         CORRECT_MSVCR_ARCH="PE32+ executable"
52342       fi
52343     else
52344       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52345         CORRECT_MSVCR_ARCH=386
52346       else
52347         CORRECT_MSVCR_ARCH=x86-64
52348       fi
52349     fi
52350     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52351       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52352 $as_echo "ok" >&6; }
52353       MSVC_DLL="$POSSIBLE_MSVC_DLL"
52354 
52355   # Only process if variable expands to non-empty
52356 
52357   if test "x$MSVC_DLL" != x; then
52358     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52359 
52360   # Input might be given as Windows format, start by converting to
52361   # unix format.
52362   path="$MSVC_DLL"
52363   new_path=`$CYGPATH -u "$path"`
52364 
52365   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52366   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52367   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52368   # "foo.exe" is OK but "foo" is an error.
52369   #
52370   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52371   # It is also a way to make sure we got the proper file name for the real test later on.
52372   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52373   if test "x$test_shortpath" = x; then
52374     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52375 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52376     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52377   fi
52378 
52379   # Call helper function which possibly converts this using DOS-style short mode.
52380   # If so, the updated path is stored in $new_path.
52381 
52382   input_path="$new_path"
52383   # Check if we need to convert this using DOS-style short mode. If the path
52384   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52385   # take no chances and rewrite it.
52386   # Note: m4 eats our [], so we need to use [ and ] instead.
52387   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52388   if test "x$has_forbidden_chars" != x; then
52389     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52390     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52391     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52392     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52393       # Going to short mode and back again did indeed matter. Since short mode is
52394       # case insensitive, let's make it lowercase to improve readability.
52395       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52396       # Now convert it back to Unix-style (cygpath)
52397       input_path=`$CYGPATH -u "$shortmode_path"`
52398       new_path="$input_path"
52399     fi
52400   fi
52401 
52402   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52403   if test "x$test_cygdrive_prefix" = x; then
52404     # As a simple fix, exclude /usr/bin since it's not a real path.
52405     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52406       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52407       # a path prefixed by /cygdrive for fixpath to work.
52408       new_path="$CYGWIN_ROOT_PATH$input_path"
52409     fi
52410   fi
52411 
52412 
52413   if test "x$path" != "x$new_path"; then
52414     MSVC_DLL="$new_path"
52415     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52416 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52417   fi
52418 
52419     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52420 
52421   path="$MSVC_DLL"
52422   has_colon=`$ECHO $path | $GREP ^.:`
52423   new_path="$path"
52424   if test "x$has_colon" = x; then
52425     # Not in mixed or Windows style, start by that.
52426     new_path=`cmd //c echo $path`
52427   fi
52428 
52429 
52430   input_path="$new_path"
52431   # Check if we need to convert this using DOS-style short mode. If the path
52432   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52433   # take no chances and rewrite it.
52434   # Note: m4 eats our [], so we need to use [ and ] instead.
52435   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52436   if test "x$has_forbidden_chars" != x; then
52437     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52438     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52439   fi
52440 
52441 
52442   windows_path="$new_path"
52443   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52444     unix_path=`$CYGPATH -u "$windows_path"`
52445     new_path="$unix_path"
52446   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52447     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52448     new_path="$unix_path"
52449   fi
52450 
52451   if test "x$path" != "x$new_path"; then
52452     MSVC_DLL="$new_path"
52453     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52454 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52455   fi
52456 
52457   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52458   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52459 
52460     else
52461       # We're on a unix platform. Hooray! :)
52462       path="$MSVC_DLL"
52463       has_space=`$ECHO "$path" | $GREP " "`
52464       if test "x$has_space" != x; then
52465         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52466 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52467         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52468       fi
52469 
52470       # Use eval to expand a potential ~
52471       eval path="$path"
52472       if test ! -f "$path" && test ! -d "$path"; then
52473         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52474       fi
52475 
52476       if test -d "$path"; then
52477         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52478       else
52479         dir="`$DIRNAME "$path"`"
52480         base="`$BASENAME "$path"`"
52481         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
52482       fi
52483     fi
52484   fi
52485 
52486       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52487 $as_echo_n "checking for $DLL_NAME... " >&6; }
52488       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52489 $as_echo "$MSVC_DLL" >&6; }
52490     else
52491       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52492 $as_echo "incorrect, ignoring" >&6; }
52493       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52494 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52495     fi
52496   fi
52497 
52498     fi
52499   fi
52500 
52501   if test "x$MSVC_DLL" = x; then
52502     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52503 $as_echo_n "checking for $DLL_NAME... " >&6; }
52504     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52505 $as_echo "no" >&6; }
52506     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52507   fi
52508 
52509     MSVCR_DLL="$MSVC_DLL"
52510   fi
52511 
52512 
52513 
52514 # Check whether --with-msvcp-dll was given.
52515 if test "${with_msvcp_dll+set}" = set; then :
52516   withval=$with_msvcp_dll;
52517 fi
52518 
52519 
52520   if test "x$MSVCP_NAME" != "x"; then
52521     if test "x$with_msvcp_dll" != x; then
52522       # If given explicitely by user, do not probe. If not present, fail directly.
52523 
52524   DLL_NAME="$MSVCP_NAME"
52525   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
52526   METHOD="--with-msvcp-dll"
52527   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52528     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52529 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52530 
52531     # Need to check if the found msvcr is correct architecture
52532     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52533 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52534     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52535     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52536       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52537       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52538       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52539         CORRECT_MSVCR_ARCH="PE32 executable"
52540       else
52541         CORRECT_MSVCR_ARCH="PE32+ executable"
52542       fi
52543     else
52544       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52545         CORRECT_MSVCR_ARCH=386
52546       else
52547         CORRECT_MSVCR_ARCH=x86-64
52548       fi
52549     fi
52550     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52551       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52552 $as_echo "ok" >&6; }
52553       MSVC_DLL="$POSSIBLE_MSVC_DLL"
52554 
52555   # Only process if variable expands to non-empty
52556 
52557   if test "x$MSVC_DLL" != x; then
52558     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52559 
52560   # Input might be given as Windows format, start by converting to
52561   # unix format.
52562   path="$MSVC_DLL"
52563   new_path=`$CYGPATH -u "$path"`
52564 
52565   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52566   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52567   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52568   # "foo.exe" is OK but "foo" is an error.
52569   #
52570   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52571   # It is also a way to make sure we got the proper file name for the real test later on.
52572   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52573   if test "x$test_shortpath" = x; then
52574     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52575 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52576     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52577   fi
52578 
52579   # Call helper function which possibly converts this using DOS-style short mode.
52580   # If so, the updated path is stored in $new_path.
52581 
52582   input_path="$new_path"
52583   # Check if we need to convert this using DOS-style short mode. If the path
52584   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52585   # take no chances and rewrite it.
52586   # Note: m4 eats our [], so we need to use [ and ] instead.
52587   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52588   if test "x$has_forbidden_chars" != x; then
52589     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52590     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52591     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52592     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52593       # Going to short mode and back again did indeed matter. Since short mode is
52594       # case insensitive, let's make it lowercase to improve readability.
52595       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52596       # Now convert it back to Unix-style (cygpath)
52597       input_path=`$CYGPATH -u "$shortmode_path"`
52598       new_path="$input_path"
52599     fi
52600   fi
52601 
52602   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52603   if test "x$test_cygdrive_prefix" = x; then
52604     # As a simple fix, exclude /usr/bin since it's not a real path.
52605     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52606       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52607       # a path prefixed by /cygdrive for fixpath to work.
52608       new_path="$CYGWIN_ROOT_PATH$input_path"
52609     fi
52610   fi
52611 
52612 
52613   if test "x$path" != "x$new_path"; then
52614     MSVC_DLL="$new_path"
52615     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52616 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52617   fi
52618 
52619     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52620 
52621   path="$MSVC_DLL"
52622   has_colon=`$ECHO $path | $GREP ^.:`
52623   new_path="$path"
52624   if test "x$has_colon" = x; then
52625     # Not in mixed or Windows style, start by that.
52626     new_path=`cmd //c echo $path`
52627   fi
52628 
52629 
52630   input_path="$new_path"
52631   # Check if we need to convert this using DOS-style short mode. If the path
52632   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52633   # take no chances and rewrite it.
52634   # Note: m4 eats our [], so we need to use [ and ] instead.
52635   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52636   if test "x$has_forbidden_chars" != x; then
52637     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52638     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52639   fi
52640 
52641 
52642   windows_path="$new_path"
52643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52644     unix_path=`$CYGPATH -u "$windows_path"`
52645     new_path="$unix_path"
52646   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52647     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52648     new_path="$unix_path"
52649   fi
52650 
52651   if test "x$path" != "x$new_path"; then
52652     MSVC_DLL="$new_path"
52653     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52654 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52655   fi
52656 
52657   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52658   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52659 
52660     else
52661       # We're on a unix platform. Hooray! :)
52662       path="$MSVC_DLL"
52663       has_space=`$ECHO "$path" | $GREP " "`
52664       if test "x$has_space" != x; then
52665         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52666 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52667         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52668       fi
52669 
52670       # Use eval to expand a potential ~
52671       eval path="$path"
52672       if test ! -f "$path" && test ! -d "$path"; then
52673         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52674       fi
52675 
52676       if test -d "$path"; then
52677         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52678       else
52679         dir="`$DIRNAME "$path"`"
52680         base="`$BASENAME "$path"`"
52681         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
52682       fi
52683     fi
52684   fi
52685 
52686       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52687 $as_echo_n "checking for $DLL_NAME... " >&6; }
52688       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52689 $as_echo "$MSVC_DLL" >&6; }
52690     else
52691       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52692 $as_echo "incorrect, ignoring" >&6; }
52693       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52694 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52695     fi
52696   fi
52697 
52698       if test "x$MSVC_DLL" = x; then
52699         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
52700       fi
52701       MSVCP_DLL="$MSVC_DLL"
52702     elif test "x$DEVKIT_MSVCP_DLL" != x; then
52703 
52704   DLL_NAME="$MSVCP_NAME"
52705   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
52706   METHOD="devkit"
52707   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52708     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52709 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52710 
52711     # Need to check if the found msvcr is correct architecture
52712     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52713 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52714     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52715     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52716       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52717       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52718       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52719         CORRECT_MSVCR_ARCH="PE32 executable"
52720       else
52721         CORRECT_MSVCR_ARCH="PE32+ executable"
52722       fi
52723     else
52724       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52725         CORRECT_MSVCR_ARCH=386
52726       else
52727         CORRECT_MSVCR_ARCH=x86-64
52728       fi
52729     fi
52730     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52731       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52732 $as_echo "ok" >&6; }
52733       MSVC_DLL="$POSSIBLE_MSVC_DLL"
52734 
52735   # Only process if variable expands to non-empty
52736 
52737   if test "x$MSVC_DLL" != x; then
52738     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52739 
52740   # Input might be given as Windows format, start by converting to
52741   # unix format.
52742   path="$MSVC_DLL"
52743   new_path=`$CYGPATH -u "$path"`
52744 
52745   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52746   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52747   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52748   # "foo.exe" is OK but "foo" is an error.
52749   #
52750   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52751   # It is also a way to make sure we got the proper file name for the real test later on.
52752   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52753   if test "x$test_shortpath" = x; then
52754     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52755 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52756     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52757   fi
52758 
52759   # Call helper function which possibly converts this using DOS-style short mode.
52760   # If so, the updated path is stored in $new_path.
52761 
52762   input_path="$new_path"
52763   # Check if we need to convert this using DOS-style short mode. If the path
52764   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52765   # take no chances and rewrite it.
52766   # Note: m4 eats our [], so we need to use [ and ] instead.
52767   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52768   if test "x$has_forbidden_chars" != x; then
52769     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52770     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52771     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52772     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52773       # Going to short mode and back again did indeed matter. Since short mode is
52774       # case insensitive, let's make it lowercase to improve readability.
52775       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52776       # Now convert it back to Unix-style (cygpath)
52777       input_path=`$CYGPATH -u "$shortmode_path"`
52778       new_path="$input_path"
52779     fi
52780   fi
52781 
52782   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52783   if test "x$test_cygdrive_prefix" = x; then
52784     # As a simple fix, exclude /usr/bin since it's not a real path.
52785     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52786       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52787       # a path prefixed by /cygdrive for fixpath to work.
52788       new_path="$CYGWIN_ROOT_PATH$input_path"
52789     fi
52790   fi
52791 
52792 
52793   if test "x$path" != "x$new_path"; then
52794     MSVC_DLL="$new_path"
52795     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52796 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52797   fi
52798 
52799     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52800 
52801   path="$MSVC_DLL"
52802   has_colon=`$ECHO $path | $GREP ^.:`
52803   new_path="$path"
52804   if test "x$has_colon" = x; then
52805     # Not in mixed or Windows style, start by that.
52806     new_path=`cmd //c echo $path`
52807   fi
52808 
52809 
52810   input_path="$new_path"
52811   # Check if we need to convert this using DOS-style short mode. If the path
52812   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52813   # take no chances and rewrite it.
52814   # Note: m4 eats our [], so we need to use [ and ] instead.
52815   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52816   if test "x$has_forbidden_chars" != x; then
52817     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52818     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52819   fi
52820 
52821 
52822   windows_path="$new_path"
52823   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52824     unix_path=`$CYGPATH -u "$windows_path"`
52825     new_path="$unix_path"
52826   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52827     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52828     new_path="$unix_path"
52829   fi
52830 
52831   if test "x$path" != "x$new_path"; then
52832     MSVC_DLL="$new_path"
52833     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52834 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52835   fi
52836 
52837   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52838   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52839 
52840     else
52841       # We're on a unix platform. Hooray! :)
52842       path="$MSVC_DLL"
52843       has_space=`$ECHO "$path" | $GREP " "`
52844       if test "x$has_space" != x; then
52845         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52846 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52847         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52848       fi
52849 
52850       # Use eval to expand a potential ~
52851       eval path="$path"
52852       if test ! -f "$path" && test ! -d "$path"; then
52853         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52854       fi
52855 
52856       if test -d "$path"; then
52857         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52858       else
52859         dir="`$DIRNAME "$path"`"
52860         base="`$BASENAME "$path"`"
52861         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
52862       fi
52863     fi
52864   fi
52865 
52866       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52867 $as_echo_n "checking for $DLL_NAME... " >&6; }
52868       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52869 $as_echo "$MSVC_DLL" >&6; }
52870     else
52871       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52872 $as_echo "incorrect, ignoring" >&6; }
52873       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52874 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52875     fi
52876   fi
52877 
52878       if test "x$MSVC_DLL" = x; then
52879         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
52880       fi
52881       MSVCP_DLL="$MSVC_DLL"
52882     else
52883 
52884   DLL_NAME="${MSVCP_NAME}"
52885   MSVC_DLL=
52886 
52887   if test "x$MSVC_DLL" = x; then
52888     # Probe: Using well-known location from Visual Studio 10.0
52889     if test "x$VCINSTALLDIR" != x; then
52890       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
52891 
52892   windows_path="$CYGWIN_VC_INSTALL_DIR"
52893   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52894     unix_path=`$CYGPATH -u "$windows_path"`
52895     CYGWIN_VC_INSTALL_DIR="$unix_path"
52896   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52897     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52898     CYGWIN_VC_INSTALL_DIR="$unix_path"
52899   fi
52900 
52901       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52902         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
52903       else
52904         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
52905       fi
52906       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
52907 
52908   DLL_NAME="$DLL_NAME"
52909   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52910   METHOD="well-known location in VCINSTALLDIR"
52911   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52912     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52913 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52914 
52915     # Need to check if the found msvcr is correct architecture
52916     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52917 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52918     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52919     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52920       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52921       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52922       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52923         CORRECT_MSVCR_ARCH="PE32 executable"
52924       else
52925         CORRECT_MSVCR_ARCH="PE32+ executable"
52926       fi
52927     else
52928       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52929         CORRECT_MSVCR_ARCH=386
52930       else
52931         CORRECT_MSVCR_ARCH=x86-64
52932       fi
52933     fi
52934     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52935       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52936 $as_echo "ok" >&6; }
52937       MSVC_DLL="$POSSIBLE_MSVC_DLL"
52938 
52939   # Only process if variable expands to non-empty
52940 
52941   if test "x$MSVC_DLL" != x; then
52942     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52943 
52944   # Input might be given as Windows format, start by converting to
52945   # unix format.
52946   path="$MSVC_DLL"
52947   new_path=`$CYGPATH -u "$path"`
52948 
52949   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52950   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52951   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52952   # "foo.exe" is OK but "foo" is an error.
52953   #
52954   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52955   # It is also a way to make sure we got the proper file name for the real test later on.
52956   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52957   if test "x$test_shortpath" = x; then
52958     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52959 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52960     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52961   fi
52962 
52963   # Call helper function which possibly converts this using DOS-style short mode.
52964   # If so, the updated path is stored in $new_path.
52965 
52966   input_path="$new_path"
52967   # Check if we need to convert this using DOS-style short mode. If the path
52968   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52969   # take no chances and rewrite it.
52970   # Note: m4 eats our [], so we need to use [ and ] instead.
52971   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52972   if test "x$has_forbidden_chars" != x; then
52973     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52974     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52975     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52976     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52977       # Going to short mode and back again did indeed matter. Since short mode is
52978       # case insensitive, let's make it lowercase to improve readability.
52979       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52980       # Now convert it back to Unix-style (cygpath)
52981       input_path=`$CYGPATH -u "$shortmode_path"`
52982       new_path="$input_path"
52983     fi
52984   fi
52985 
52986   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52987   if test "x$test_cygdrive_prefix" = x; then
52988     # As a simple fix, exclude /usr/bin since it's not a real path.
52989     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52990       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52991       # a path prefixed by /cygdrive for fixpath to work.
52992       new_path="$CYGWIN_ROOT_PATH$input_path"
52993     fi
52994   fi
52995 
52996 
52997   if test "x$path" != "x$new_path"; then
52998     MSVC_DLL="$new_path"
52999     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53000 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53001   fi
53002 
53003     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53004 
53005   path="$MSVC_DLL"
53006   has_colon=`$ECHO $path | $GREP ^.:`
53007   new_path="$path"
53008   if test "x$has_colon" = x; then
53009     # Not in mixed or Windows style, start by that.
53010     new_path=`cmd //c echo $path`
53011   fi
53012 
53013 
53014   input_path="$new_path"
53015   # Check if we need to convert this using DOS-style short mode. If the path
53016   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53017   # take no chances and rewrite it.
53018   # Note: m4 eats our [], so we need to use [ and ] instead.
53019   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53020   if test "x$has_forbidden_chars" != x; then
53021     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53022     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53023   fi
53024 
53025 
53026   windows_path="$new_path"
53027   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53028     unix_path=`$CYGPATH -u "$windows_path"`
53029     new_path="$unix_path"
53030   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53031     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53032     new_path="$unix_path"
53033   fi
53034 
53035   if test "x$path" != "x$new_path"; then
53036     MSVC_DLL="$new_path"
53037     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53038 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53039   fi
53040 
53041   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53042   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53043 
53044     else
53045       # We're on a unix platform. Hooray! :)
53046       path="$MSVC_DLL"
53047       has_space=`$ECHO "$path" | $GREP " "`
53048       if test "x$has_space" != x; then
53049         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53050 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53051         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53052       fi
53053 
53054       # Use eval to expand a potential ~
53055       eval path="$path"
53056       if test ! -f "$path" && test ! -d "$path"; then
53057         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53058       fi
53059 
53060       if test -d "$path"; then
53061         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53062       else
53063         dir="`$DIRNAME "$path"`"
53064         base="`$BASENAME "$path"`"
53065         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53066       fi
53067     fi
53068   fi
53069 
53070       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53071 $as_echo_n "checking for $DLL_NAME... " >&6; }
53072       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53073 $as_echo "$MSVC_DLL" >&6; }
53074     else
53075       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53076 $as_echo "incorrect, ignoring" >&6; }
53077       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53078 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53079     fi
53080   fi
53081 
53082     fi
53083   fi
53084 
53085   if test "x$MSVC_DLL" = x; then
53086     # Probe: Check in the Boot JDK directory.
53087     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53088 
53089   DLL_NAME="$DLL_NAME"
53090   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53091   METHOD="well-known location in Boot JDK"
53092   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53093     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53094 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53095 
53096     # Need to check if the found msvcr is correct architecture
53097     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53098 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53099     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53100     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53101       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53102       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53103       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53104         CORRECT_MSVCR_ARCH="PE32 executable"
53105       else
53106         CORRECT_MSVCR_ARCH="PE32+ executable"
53107       fi
53108     else
53109       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53110         CORRECT_MSVCR_ARCH=386
53111       else
53112         CORRECT_MSVCR_ARCH=x86-64
53113       fi
53114     fi
53115     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53116       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53117 $as_echo "ok" >&6; }
53118       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53119 
53120   # Only process if variable expands to non-empty
53121 
53122   if test "x$MSVC_DLL" != x; then
53123     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53124 
53125   # Input might be given as Windows format, start by converting to
53126   # unix format.
53127   path="$MSVC_DLL"
53128   new_path=`$CYGPATH -u "$path"`
53129 
53130   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53131   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53132   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53133   # "foo.exe" is OK but "foo" is an error.
53134   #
53135   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53136   # It is also a way to make sure we got the proper file name for the real test later on.
53137   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53138   if test "x$test_shortpath" = x; then
53139     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53140 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53141     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53142   fi
53143 
53144   # Call helper function which possibly converts this using DOS-style short mode.
53145   # If so, the updated path is stored in $new_path.
53146 
53147   input_path="$new_path"
53148   # Check if we need to convert this using DOS-style short mode. If the path
53149   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53150   # take no chances and rewrite it.
53151   # Note: m4 eats our [], so we need to use [ and ] instead.
53152   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53153   if test "x$has_forbidden_chars" != x; then
53154     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53155     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53156     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53157     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53158       # Going to short mode and back again did indeed matter. Since short mode is
53159       # case insensitive, let's make it lowercase to improve readability.
53160       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53161       # Now convert it back to Unix-style (cygpath)
53162       input_path=`$CYGPATH -u "$shortmode_path"`
53163       new_path="$input_path"
53164     fi
53165   fi
53166 
53167   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53168   if test "x$test_cygdrive_prefix" = x; then
53169     # As a simple fix, exclude /usr/bin since it's not a real path.
53170     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53171       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53172       # a path prefixed by /cygdrive for fixpath to work.
53173       new_path="$CYGWIN_ROOT_PATH$input_path"
53174     fi
53175   fi
53176 
53177 
53178   if test "x$path" != "x$new_path"; then
53179     MSVC_DLL="$new_path"
53180     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53181 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53182   fi
53183 
53184     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53185 
53186   path="$MSVC_DLL"
53187   has_colon=`$ECHO $path | $GREP ^.:`
53188   new_path="$path"
53189   if test "x$has_colon" = x; then
53190     # Not in mixed or Windows style, start by that.
53191     new_path=`cmd //c echo $path`
53192   fi
53193 
53194 
53195   input_path="$new_path"
53196   # Check if we need to convert this using DOS-style short mode. If the path
53197   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53198   # take no chances and rewrite it.
53199   # Note: m4 eats our [], so we need to use [ and ] instead.
53200   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53201   if test "x$has_forbidden_chars" != x; then
53202     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53203     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53204   fi
53205 
53206 
53207   windows_path="$new_path"
53208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53209     unix_path=`$CYGPATH -u "$windows_path"`
53210     new_path="$unix_path"
53211   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53212     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53213     new_path="$unix_path"
53214   fi
53215 
53216   if test "x$path" != "x$new_path"; then
53217     MSVC_DLL="$new_path"
53218     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53219 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53220   fi
53221 
53222   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53223   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53224 
53225     else
53226       # We're on a unix platform. Hooray! :)
53227       path="$MSVC_DLL"
53228       has_space=`$ECHO "$path" | $GREP " "`
53229       if test "x$has_space" != x; then
53230         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53231 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53232         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53233       fi
53234 
53235       # Use eval to expand a potential ~
53236       eval path="$path"
53237       if test ! -f "$path" && test ! -d "$path"; then
53238         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53239       fi
53240 
53241       if test -d "$path"; then
53242         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53243       else
53244         dir="`$DIRNAME "$path"`"
53245         base="`$BASENAME "$path"`"
53246         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53247       fi
53248     fi
53249   fi
53250 
53251       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53252 $as_echo_n "checking for $DLL_NAME... " >&6; }
53253       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53254 $as_echo "$MSVC_DLL" >&6; }
53255     else
53256       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53257 $as_echo "incorrect, ignoring" >&6; }
53258       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53259 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53260     fi
53261   fi
53262 
53263   fi
53264 
53265   if test "x$MSVC_DLL" = x; then
53266     # Probe: Look in the Windows system32 directory
53267     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53268 
53269   windows_path="$CYGWIN_SYSTEMROOT"
53270   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53271     unix_path=`$CYGPATH -u "$windows_path"`
53272     CYGWIN_SYSTEMROOT="$unix_path"
53273   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53274     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53275     CYGWIN_SYSTEMROOT="$unix_path"
53276   fi
53277 
53278     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53279 
53280   DLL_NAME="$DLL_NAME"
53281   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53282   METHOD="well-known location in SYSTEMROOT"
53283   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53284     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53285 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53286 
53287     # Need to check if the found msvcr is correct architecture
53288     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53289 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53290     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53291     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53292       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53293       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53294       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53295         CORRECT_MSVCR_ARCH="PE32 executable"
53296       else
53297         CORRECT_MSVCR_ARCH="PE32+ executable"
53298       fi
53299     else
53300       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53301         CORRECT_MSVCR_ARCH=386
53302       else
53303         CORRECT_MSVCR_ARCH=x86-64
53304       fi
53305     fi
53306     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53307       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53308 $as_echo "ok" >&6; }
53309       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53310 
53311   # Only process if variable expands to non-empty
53312 
53313   if test "x$MSVC_DLL" != x; then
53314     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53315 
53316   # Input might be given as Windows format, start by converting to
53317   # unix format.
53318   path="$MSVC_DLL"
53319   new_path=`$CYGPATH -u "$path"`
53320 
53321   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53322   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53323   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53324   # "foo.exe" is OK but "foo" is an error.
53325   #
53326   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53327   # It is also a way to make sure we got the proper file name for the real test later on.
53328   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53329   if test "x$test_shortpath" = x; then
53330     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53331 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53332     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53333   fi
53334 
53335   # Call helper function which possibly converts this using DOS-style short mode.
53336   # If so, the updated path is stored in $new_path.
53337 
53338   input_path="$new_path"
53339   # Check if we need to convert this using DOS-style short mode. If the path
53340   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53341   # take no chances and rewrite it.
53342   # Note: m4 eats our [], so we need to use [ and ] instead.
53343   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53344   if test "x$has_forbidden_chars" != x; then
53345     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53346     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53347     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53348     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53349       # Going to short mode and back again did indeed matter. Since short mode is
53350       # case insensitive, let's make it lowercase to improve readability.
53351       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53352       # Now convert it back to Unix-style (cygpath)
53353       input_path=`$CYGPATH -u "$shortmode_path"`
53354       new_path="$input_path"
53355     fi
53356   fi
53357 
53358   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53359   if test "x$test_cygdrive_prefix" = x; then
53360     # As a simple fix, exclude /usr/bin since it's not a real path.
53361     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53362       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53363       # a path prefixed by /cygdrive for fixpath to work.
53364       new_path="$CYGWIN_ROOT_PATH$input_path"
53365     fi
53366   fi
53367 
53368 
53369   if test "x$path" != "x$new_path"; then
53370     MSVC_DLL="$new_path"
53371     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53372 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53373   fi
53374 
53375     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53376 
53377   path="$MSVC_DLL"
53378   has_colon=`$ECHO $path | $GREP ^.:`
53379   new_path="$path"
53380   if test "x$has_colon" = x; then
53381     # Not in mixed or Windows style, start by that.
53382     new_path=`cmd //c echo $path`
53383   fi
53384 
53385 
53386   input_path="$new_path"
53387   # Check if we need to convert this using DOS-style short mode. If the path
53388   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53389   # take no chances and rewrite it.
53390   # Note: m4 eats our [], so we need to use [ and ] instead.
53391   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53392   if test "x$has_forbidden_chars" != x; then
53393     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53394     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53395   fi
53396 
53397 
53398   windows_path="$new_path"
53399   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53400     unix_path=`$CYGPATH -u "$windows_path"`
53401     new_path="$unix_path"
53402   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53403     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53404     new_path="$unix_path"
53405   fi
53406 
53407   if test "x$path" != "x$new_path"; then
53408     MSVC_DLL="$new_path"
53409     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53410 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53411   fi
53412 
53413   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53414   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53415 
53416     else
53417       # We're on a unix platform. Hooray! :)
53418       path="$MSVC_DLL"
53419       has_space=`$ECHO "$path" | $GREP " "`
53420       if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
53424       fi
53425 
53426       # Use eval to expand a potential ~
53427       eval path="$path"
53428       if test ! -f "$path" && test ! -d "$path"; then
53429         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53430       fi
53431 
53432       if test -d "$path"; then
53433         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53434       else
53435         dir="`$DIRNAME "$path"`"
53436         base="`$BASENAME "$path"`"
53437         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53438       fi
53439     fi
53440   fi
53441 
53442       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53443 $as_echo_n "checking for $DLL_NAME... " >&6; }
53444       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53445 $as_echo "$MSVC_DLL" >&6; }
53446     else
53447       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53448 $as_echo "incorrect, ignoring" >&6; }
53449       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53450 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53451     fi
53452   fi
53453 
53454   fi
53455 
53456   if test "x$MSVC_DLL" = x; then
53457     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
53458     if test "x$VS100COMNTOOLS" != x; then
53459       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
53460 
53461   windows_path="$CYGWIN_VS_TOOLS_DIR"
53462   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53463     unix_path=`$CYGPATH -u "$windows_path"`
53464     CYGWIN_VS_TOOLS_DIR="$unix_path"
53465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53466     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53467     CYGWIN_VS_TOOLS_DIR="$unix_path"
53468   fi
53469 
53470       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53471         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53472             | $GREP -i /x64/ | $HEAD --lines 1`
53473       else
53474         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53475             | $GREP -i /x86/ | $HEAD --lines 1`
53476       fi
53477 
53478   DLL_NAME="$DLL_NAME"
53479   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53480   METHOD="search of VS100COMNTOOLS"
53481   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53482     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53483 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53484 
53485     # Need to check if the found msvcr is correct architecture
53486     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53487 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53488     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53489     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53490       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53491       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53492       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53493         CORRECT_MSVCR_ARCH="PE32 executable"
53494       else
53495         CORRECT_MSVCR_ARCH="PE32+ executable"
53496       fi
53497     else
53498       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53499         CORRECT_MSVCR_ARCH=386
53500       else
53501         CORRECT_MSVCR_ARCH=x86-64
53502       fi
53503     fi
53504     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53505       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53506 $as_echo "ok" >&6; }
53507       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53508 
53509   # Only process if variable expands to non-empty
53510 
53511   if test "x$MSVC_DLL" != x; then
53512     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53513 
53514   # Input might be given as Windows format, start by converting to
53515   # unix format.
53516   path="$MSVC_DLL"
53517   new_path=`$CYGPATH -u "$path"`
53518 
53519   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53520   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53521   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53522   # "foo.exe" is OK but "foo" is an error.
53523   #
53524   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53525   # It is also a way to make sure we got the proper file name for the real test later on.
53526   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53527   if test "x$test_shortpath" = x; then
53528     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53529 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53530     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53531   fi
53532 
53533   # Call helper function which possibly converts this using DOS-style short mode.
53534   # If so, the updated path is stored in $new_path.
53535 
53536   input_path="$new_path"
53537   # Check if we need to convert this using DOS-style short mode. If the path
53538   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53539   # take no chances and rewrite it.
53540   # Note: m4 eats our [], so we need to use [ and ] instead.
53541   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53542   if test "x$has_forbidden_chars" != x; then
53543     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53544     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53545     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53546     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53547       # Going to short mode and back again did indeed matter. Since short mode is
53548       # case insensitive, let's make it lowercase to improve readability.
53549       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53550       # Now convert it back to Unix-style (cygpath)
53551       input_path=`$CYGPATH -u "$shortmode_path"`
53552       new_path="$input_path"
53553     fi
53554   fi
53555 
53556   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53557   if test "x$test_cygdrive_prefix" = x; then
53558     # As a simple fix, exclude /usr/bin since it's not a real path.
53559     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53560       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53561       # a path prefixed by /cygdrive for fixpath to work.
53562       new_path="$CYGWIN_ROOT_PATH$input_path"
53563     fi
53564   fi
53565 
53566 
53567   if test "x$path" != "x$new_path"; then
53568     MSVC_DLL="$new_path"
53569     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53570 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53571   fi
53572 
53573     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53574 
53575   path="$MSVC_DLL"
53576   has_colon=`$ECHO $path | $GREP ^.:`
53577   new_path="$path"
53578   if test "x$has_colon" = x; then
53579     # Not in mixed or Windows style, start by that.
53580     new_path=`cmd //c echo $path`
53581   fi
53582 
53583 
53584   input_path="$new_path"
53585   # Check if we need to convert this using DOS-style short mode. If the path
53586   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53587   # take no chances and rewrite it.
53588   # Note: m4 eats our [], so we need to use [ and ] instead.
53589   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53590   if test "x$has_forbidden_chars" != x; then
53591     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53592     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53593   fi
53594 
53595 
53596   windows_path="$new_path"
53597   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53598     unix_path=`$CYGPATH -u "$windows_path"`
53599     new_path="$unix_path"
53600   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53601     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53602     new_path="$unix_path"
53603   fi
53604 
53605   if test "x$path" != "x$new_path"; then
53606     MSVC_DLL="$new_path"
53607     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53608 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53609   fi
53610 
53611   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53612   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53613 
53614     else
53615       # We're on a unix platform. Hooray! :)
53616       path="$MSVC_DLL"
53617       has_space=`$ECHO "$path" | $GREP " "`
53618       if test "x$has_space" != x; then
53619         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53620 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53621         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53622       fi
53623 
53624       # Use eval to expand a potential ~
53625       eval path="$path"
53626       if test ! -f "$path" && test ! -d "$path"; then
53627         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53628       fi
53629 
53630       if test -d "$path"; then
53631         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53632       else
53633         dir="`$DIRNAME "$path"`"
53634         base="`$BASENAME "$path"`"
53635         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53636       fi
53637     fi
53638   fi
53639 
53640       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53641 $as_echo_n "checking for $DLL_NAME... " >&6; }
53642       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53643 $as_echo "$MSVC_DLL" >&6; }
53644     else
53645       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53646 $as_echo "incorrect, ignoring" >&6; }
53647       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53648 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53649     fi
53650   fi
53651 
53652     fi
53653   fi
53654 
53655   if test "x$MSVC_DLL" = x; then
53656     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
53657     # (This was the original behaviour; kept since it might turn something up)
53658     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
53659       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53660         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
53661             | $GREP x64 | $HEAD --lines 1`
53662       else
53663         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
53664             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
53665         if test "x$POSSIBLE_MSVC_DLL" = x; then
53666           # We're grasping at straws now...
53667           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
53668               | $HEAD --lines 1`
53669         fi
53670       fi
53671 
53672 
53673   DLL_NAME="$DLL_NAME"
53674   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53675   METHOD="search of VCINSTALLDIR"
53676   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53677     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53678 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53679 
53680     # Need to check if the found msvcr is correct architecture
53681     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53682 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53683     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53684     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53685       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53686       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53687       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53688         CORRECT_MSVCR_ARCH="PE32 executable"
53689       else
53690         CORRECT_MSVCR_ARCH="PE32+ executable"
53691       fi
53692     else
53693       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53694         CORRECT_MSVCR_ARCH=386
53695       else
53696         CORRECT_MSVCR_ARCH=x86-64
53697       fi
53698     fi
53699     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53700       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53701 $as_echo "ok" >&6; }
53702       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53703 
53704   # Only process if variable expands to non-empty
53705 
53706   if test "x$MSVC_DLL" != x; then
53707     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53708 
53709   # Input might be given as Windows format, start by converting to
53710   # unix format.
53711   path="$MSVC_DLL"
53712   new_path=`$CYGPATH -u "$path"`
53713 
53714   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53715   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53716   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53717   # "foo.exe" is OK but "foo" is an error.
53718   #
53719   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53720   # It is also a way to make sure we got the proper file name for the real test later on.
53721   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53722   if test "x$test_shortpath" = x; then
53723     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53724 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53725     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53726   fi
53727 
53728   # Call helper function which possibly converts this using DOS-style short mode.
53729   # If so, the updated path is stored in $new_path.
53730 
53731   input_path="$new_path"
53732   # Check if we need to convert this using DOS-style short mode. If the path
53733   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53734   # take no chances and rewrite it.
53735   # Note: m4 eats our [], so we need to use [ and ] instead.
53736   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53737   if test "x$has_forbidden_chars" != x; then
53738     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53739     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53740     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53741     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53742       # Going to short mode and back again did indeed matter. Since short mode is
53743       # case insensitive, let's make it lowercase to improve readability.
53744       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53745       # Now convert it back to Unix-style (cygpath)
53746       input_path=`$CYGPATH -u "$shortmode_path"`
53747       new_path="$input_path"
53748     fi
53749   fi
53750 
53751   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53752   if test "x$test_cygdrive_prefix" = x; then
53753     # As a simple fix, exclude /usr/bin since it's not a real path.
53754     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53755       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53756       # a path prefixed by /cygdrive for fixpath to work.
53757       new_path="$CYGWIN_ROOT_PATH$input_path"
53758     fi
53759   fi
53760 
53761 
53762   if test "x$path" != "x$new_path"; then
53763     MSVC_DLL="$new_path"
53764     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53765 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53766   fi
53767 
53768     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53769 
53770   path="$MSVC_DLL"
53771   has_colon=`$ECHO $path | $GREP ^.:`
53772   new_path="$path"
53773   if test "x$has_colon" = x; then
53774     # Not in mixed or Windows style, start by that.
53775     new_path=`cmd //c echo $path`
53776   fi
53777 
53778 
53779   input_path="$new_path"
53780   # Check if we need to convert this using DOS-style short mode. If the path
53781   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53782   # take no chances and rewrite it.
53783   # Note: m4 eats our [], so we need to use [ and ] instead.
53784   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53785   if test "x$has_forbidden_chars" != x; then
53786     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53787     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53788   fi
53789 
53790 
53791   windows_path="$new_path"
53792   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53793     unix_path=`$CYGPATH -u "$windows_path"`
53794     new_path="$unix_path"
53795   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53796     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53797     new_path="$unix_path"
53798   fi
53799 
53800   if test "x$path" != "x$new_path"; then
53801     MSVC_DLL="$new_path"
53802     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53803 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53804   fi
53805 
53806   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53807   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53808 
53809     else
53810       # We're on a unix platform. Hooray! :)
53811       path="$MSVC_DLL"
53812       has_space=`$ECHO "$path" | $GREP " "`
53813       if test "x$has_space" != x; then
53814         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53815 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53816         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53817       fi
53818 
53819       # Use eval to expand a potential ~
53820       eval path="$path"
53821       if test ! -f "$path" && test ! -d "$path"; then
53822         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53823       fi
53824 
53825       if test -d "$path"; then
53826         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53827       else
53828         dir="`$DIRNAME "$path"`"
53829         base="`$BASENAME "$path"`"
53830         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53831       fi
53832     fi
53833   fi
53834 
53835       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53836 $as_echo_n "checking for $DLL_NAME... " >&6; }
53837       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53838 $as_echo "$MSVC_DLL" >&6; }
53839     else
53840       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53841 $as_echo "incorrect, ignoring" >&6; }
53842       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53843 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53844     fi
53845   fi
53846 
53847     fi
53848   fi
53849 
53850   if test "x$MSVC_DLL" = x; then
53851     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53852 $as_echo_n "checking for $DLL_NAME... " >&6; }
53853     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53854 $as_echo "no" >&6; }
53855     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
53856   fi
53857 
53858       MSVCP_DLL="$MSVC_DLL"
53859     fi
53860 
53861   fi
53862 
53863   fi
53864 
53865 
53866   if test "x$NEEDS_LIB_X11" = xfalse; then
53867     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
53868       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
53869 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
53870     fi
53871     X_CFLAGS=
53872     X_LIBS=
53873   else
53874 
53875     if test "x${with_x}" = xno; then
53876       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
53877     fi
53878 
53879     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
53880       # The user has specified a X11 base directory. Use it for includes and
53881       # libraries, unless explicitely overridden.
53882       if test "x$x_includes" = xNONE; then
53883         x_includes="${with_x}/include"
53884       fi
53885       if test "x$x_libraries" = xNONE; then
53886         x_libraries="${with_x}/lib"
53887       fi
53888     else
53889       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
53890       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
53891       # --x-libraries for the sysroot, if that seems to be correct.
53892       if test "x$SYSROOT" != "x"; then
53893         if test "x$x_includes" = xNONE; then
53894           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
53895             x_includes="$SYSROOT/usr/X11R6/include"
53896           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
53897             x_includes="$SYSROOT/usr/include"
53898           fi
53899         fi
53900         if test "x$x_libraries" = xNONE; then
53901           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
53902             x_libraries="$SYSROOT/usr/X11R6/lib"
53903           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53904             x_libraries="$SYSROOT/usr/lib64"
53905           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
53906             x_libraries="$SYSROOT/usr/lib"
53907           fi
53908         fi
53909       fi
53910     fi
53911 
53912     # Now let autoconf do it's magic
53913     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
53914 $as_echo_n "checking for X... " >&6; }
53915 
53916 
53917 # Check whether --with-x was given.
53918 if test "${with_x+set}" = set; then :
53919   withval=$with_x;
53920 fi
53921 
53922 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
53923 if test "x$with_x" = xno; then
53924   # The user explicitly disabled X.
53925   have_x=disabled
53926 else
53927   case $x_includes,$x_libraries in #(
53928     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
53929     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
53930   $as_echo_n "(cached) " >&6
53931 else
53932   # One or both of the vars are not set, and there is no cached value.
53933 ac_x_includes=no ac_x_libraries=no
53934 rm -f -r conftest.dir
53935 if mkdir conftest.dir; then
53936   cd conftest.dir
53937   cat >Imakefile <<'_ACEOF'
53938 incroot:
53939         @echo incroot='${INCROOT}'
53940 usrlibdir:
53941         @echo usrlibdir='${USRLIBDIR}'
53942 libdir:
53943         @echo libdir='${LIBDIR}'
53944 _ACEOF
53945   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
53946     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
53947     for ac_var in incroot usrlibdir libdir; do
53948       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
53949     done
53950     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
53951     for ac_extension in a so sl dylib la dll; do
53952       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
53953          test -f "$ac_im_libdir/libX11.$ac_extension"; then
53954         ac_im_usrlibdir=$ac_im_libdir; break
53955       fi
53956     done
53957     # Screen out bogus values from the imake configuration.  They are
53958     # bogus both because they are the default anyway, and because
53959     # using them would break gcc on systems where it needs fixed includes.
53960     case $ac_im_incroot in
53961         /usr/include) ac_x_includes= ;;
53962         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
53963     esac
53964     case $ac_im_usrlibdir in
53965         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
53966         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
53967     esac
53968   fi
53969   cd ..
53970   rm -f -r conftest.dir
53971 fi
53972 
53973 # Standard set of common directories for X headers.
53974 # Check X11 before X11Rn because it is often a symlink to the current release.
53975 ac_x_header_dirs='
53976 /usr/X11/include
53977 /usr/X11R7/include
53978 /usr/X11R6/include
53979 /usr/X11R5/include
53980 /usr/X11R4/include
53981 
53982 /usr/include/X11
53983 /usr/include/X11R7
53984 /usr/include/X11R6
53985 /usr/include/X11R5
53986 /usr/include/X11R4
53987 
53988 /usr/local/X11/include
53989 /usr/local/X11R7/include
53990 /usr/local/X11R6/include
53991 /usr/local/X11R5/include
53992 /usr/local/X11R4/include
53993 
53994 /usr/local/include/X11
53995 /usr/local/include/X11R7
53996 /usr/local/include/X11R6
53997 /usr/local/include/X11R5
53998 /usr/local/include/X11R4
53999 
54000 /usr/X386/include
54001 /usr/x386/include
54002 /usr/XFree86/include/X11
54003 
54004 /usr/include
54005 /usr/local/include
54006 /usr/unsupported/include
54007 /usr/athena/include
54008 /usr/local/x11r5/include
54009 /usr/lpp/Xamples/include
54010 
54011 /usr/openwin/include
54012 /usr/openwin/share/include'
54013 
54014 if test "$ac_x_includes" = no; then
54015   # Guess where to find include files, by looking for Xlib.h.
54016   # First, try using that file with no special directory specified.
54017   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54018 /* end confdefs.h.  */
54019 #include <X11/Xlib.h>
54020 _ACEOF
54021 if ac_fn_cxx_try_cpp "$LINENO"; then :
54022   # We can compile using X headers with no special include directory.
54023 ac_x_includes=
54024 else
54025   for ac_dir in $ac_x_header_dirs; do
54026   if test -r "$ac_dir/X11/Xlib.h"; then
54027     ac_x_includes=$ac_dir
54028     break
54029   fi
54030 done
54031 fi
54032 rm -f conftest.err conftest.i conftest.$ac_ext
54033 fi # $ac_x_includes = no
54034 
54035 if test "$ac_x_libraries" = no; then
54036   # Check for the libraries.
54037   # See if we find them without any special options.
54038   # Don't add to $LIBS permanently.
54039   ac_save_LIBS=$LIBS
54040   LIBS="-lX11 $LIBS"
54041   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54042 /* end confdefs.h.  */
54043 #include <X11/Xlib.h>
54044 int
54045 main ()
54046 {
54047 XrmInitialize ()
54048   ;
54049   return 0;
54050 }
54051 _ACEOF
54052 if ac_fn_cxx_try_link "$LINENO"; then :
54053   LIBS=$ac_save_LIBS
54054 # We can link X programs with no special library path.
54055 ac_x_libraries=
54056 else
54057   LIBS=$ac_save_LIBS
54058 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
54059 do
54060   # Don't even attempt the hair of trying to link an X program!
54061   for ac_extension in a so sl dylib la dll; do
54062     if test -r "$ac_dir/libX11.$ac_extension"; then
54063       ac_x_libraries=$ac_dir
54064       break 2
54065     fi
54066   done
54067 done
54068 fi
54069 rm -f core conftest.err conftest.$ac_objext \
54070     conftest$ac_exeext conftest.$ac_ext
54071 fi # $ac_x_libraries = no
54072 
54073 case $ac_x_includes,$ac_x_libraries in #(
54074   no,* | *,no | *\'*)
54075     # Didn't find X, or a directory has "'" in its name.
54076     ac_cv_have_x="have_x=no";; #(
54077   *)
54078     # Record where we found X for the cache.
54079     ac_cv_have_x="have_x=yes\
54080         ac_x_includes='$ac_x_includes'\
54081         ac_x_libraries='$ac_x_libraries'"
54082 esac
54083 fi
54084 ;; #(
54085     *) have_x=yes;;
54086   esac
54087   eval "$ac_cv_have_x"
54088 fi # $with_x != no
54089 
54090 if test "$have_x" != yes; then
54091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
54092 $as_echo "$have_x" >&6; }
54093   no_x=yes
54094 else
54095   # If each of the values was on the command line, it overrides each guess.
54096   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
54097   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
54098   # Update the cache value to reflect the command line values.
54099   ac_cv_have_x="have_x=yes\
54100         ac_x_includes='$x_includes'\
54101         ac_x_libraries='$x_libraries'"
54102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
54103 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
54104 fi
54105 
54106     if test "$no_x" = yes; then
54107   # Not all programs may use this symbol, but it does not hurt to define it.
54108 
54109 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
54110 
54111   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
54112 else
54113   if test -n "$x_includes"; then
54114     X_CFLAGS="$X_CFLAGS -I$x_includes"
54115   fi
54116 
54117   # It would also be nice to do this for all -L options, not just this one.
54118   if test -n "$x_libraries"; then
54119     X_LIBS="$X_LIBS -L$x_libraries"
54120     # For Solaris; some versions of Sun CC require a space after -R and
54121     # others require no space.  Words are not sufficient . . . .
54122     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
54123 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
54124     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
54125     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
54126     ac_cxx_werror_flag=yes
54127     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54128 /* end confdefs.h.  */
54129 
54130 int
54131 main ()
54132 {
54133 
54134   ;
54135   return 0;
54136 }
54137 _ACEOF
54138 if ac_fn_cxx_try_link "$LINENO"; then :
54139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54140 $as_echo "no" >&6; }
54141        X_LIBS="$X_LIBS -R$x_libraries"
54142 else
54143   LIBS="$ac_xsave_LIBS -R $x_libraries"
54144        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54145 /* end confdefs.h.  */
54146 
54147 int
54148 main ()
54149 {
54150 
54151   ;
54152   return 0;
54153 }
54154 _ACEOF
54155 if ac_fn_cxx_try_link "$LINENO"; then :
54156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54157 $as_echo "yes" >&6; }
54158           X_LIBS="$X_LIBS -R $x_libraries"
54159 else
54160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
54161 $as_echo "neither works" >&6; }
54162 fi
54163 rm -f core conftest.err conftest.$ac_objext \
54164     conftest$ac_exeext conftest.$ac_ext
54165 fi
54166 rm -f core conftest.err conftest.$ac_objext \
54167     conftest$ac_exeext conftest.$ac_ext
54168     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
54169     LIBS=$ac_xsave_LIBS
54170   fi
54171 
54172   # Check for system-dependent libraries X programs must link with.
54173   # Do this before checking for the system-independent R6 libraries
54174   # (-lICE), since we may need -lsocket or whatever for X linking.
54175 
54176   if test "$ISC" = yes; then
54177     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
54178   else
54179     # Martyn Johnson says this is needed for Ultrix, if the X
54180     # libraries were built with DECnet support.  And Karl Berry says
54181     # the Alpha needs dnet_stub (dnet does not exist).
54182     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
54183     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54184 /* end confdefs.h.  */
54185 
54186 /* Override any GCC internal prototype to avoid an error.
54187    Use char because int might match the return type of a GCC
54188    builtin and then its argument prototype would still apply.  */
54189 #ifdef __cplusplus
54190 extern "C"
54191 #endif
54192 char XOpenDisplay ();
54193 int
54194 main ()
54195 {
54196 return XOpenDisplay ();
54197   ;
54198   return 0;
54199 }
54200 _ACEOF
54201 if ac_fn_cxx_try_link "$LINENO"; then :
54202 
54203 else
54204   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
54205 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
54206 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
54207   $as_echo_n "(cached) " >&6
54208 else
54209   ac_check_lib_save_LIBS=$LIBS
54210 LIBS="-ldnet  $LIBS"
54211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54212 /* end confdefs.h.  */
54213 
54214 /* Override any GCC internal prototype to avoid an error.
54215    Use char because int might match the return type of a GCC
54216    builtin and then its argument prototype would still apply.  */
54217 #ifdef __cplusplus
54218 extern "C"
54219 #endif
54220 char dnet_ntoa ();
54221 int
54222 main ()
54223 {
54224 return dnet_ntoa ();
54225   ;
54226   return 0;
54227 }
54228 _ACEOF
54229 if ac_fn_cxx_try_link "$LINENO"; then :
54230   ac_cv_lib_dnet_dnet_ntoa=yes
54231 else
54232   ac_cv_lib_dnet_dnet_ntoa=no
54233 fi
54234 rm -f core conftest.err conftest.$ac_objext \
54235     conftest$ac_exeext conftest.$ac_ext
54236 LIBS=$ac_check_lib_save_LIBS
54237 fi
54238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
54239 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
54240 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
54241   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
54242 fi
54243 
54244     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
54245       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
54246 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
54247 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
54248   $as_echo_n "(cached) " >&6
54249 else
54250   ac_check_lib_save_LIBS=$LIBS
54251 LIBS="-ldnet_stub  $LIBS"
54252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54253 /* end confdefs.h.  */
54254 
54255 /* Override any GCC internal prototype to avoid an error.
54256    Use char because int might match the return type of a GCC
54257    builtin and then its argument prototype would still apply.  */
54258 #ifdef __cplusplus
54259 extern "C"
54260 #endif
54261 char dnet_ntoa ();
54262 int
54263 main ()
54264 {
54265 return dnet_ntoa ();
54266   ;
54267   return 0;
54268 }
54269 _ACEOF
54270 if ac_fn_cxx_try_link "$LINENO"; then :
54271   ac_cv_lib_dnet_stub_dnet_ntoa=yes
54272 else
54273   ac_cv_lib_dnet_stub_dnet_ntoa=no
54274 fi
54275 rm -f core conftest.err conftest.$ac_objext \
54276     conftest$ac_exeext conftest.$ac_ext
54277 LIBS=$ac_check_lib_save_LIBS
54278 fi
54279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
54280 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
54281 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
54282   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
54283 fi
54284 
54285     fi
54286 fi
54287 rm -f core conftest.err conftest.$ac_objext \
54288     conftest$ac_exeext conftest.$ac_ext
54289     LIBS="$ac_xsave_LIBS"
54290 
54291     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
54292     # to get the SysV transport functions.
54293     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
54294     # needs -lnsl.
54295     # The nsl library prevents programs from opening the X display
54296     # on Irix 5.2, according to T.E. Dickey.
54297     # The functions gethostbyname, getservbyname, and inet_addr are
54298     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
54299     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
54300 if test "x$ac_cv_func_gethostbyname" = xyes; then :
54301 
54302 fi
54303 
54304     if test $ac_cv_func_gethostbyname = no; then
54305       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
54306 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
54307 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
54308   $as_echo_n "(cached) " >&6
54309 else
54310   ac_check_lib_save_LIBS=$LIBS
54311 LIBS="-lnsl  $LIBS"
54312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54313 /* end confdefs.h.  */
54314 
54315 /* Override any GCC internal prototype to avoid an error.
54316    Use char because int might match the return type of a GCC
54317    builtin and then its argument prototype would still apply.  */
54318 #ifdef __cplusplus
54319 extern "C"
54320 #endif
54321 char gethostbyname ();
54322 int
54323 main ()
54324 {
54325 return gethostbyname ();
54326   ;
54327   return 0;
54328 }
54329 _ACEOF
54330 if ac_fn_cxx_try_link "$LINENO"; then :
54331   ac_cv_lib_nsl_gethostbyname=yes
54332 else
54333   ac_cv_lib_nsl_gethostbyname=no
54334 fi
54335 rm -f core conftest.err conftest.$ac_objext \
54336     conftest$ac_exeext conftest.$ac_ext
54337 LIBS=$ac_check_lib_save_LIBS
54338 fi
54339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
54340 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
54341 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
54342   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
54343 fi
54344 
54345       if test $ac_cv_lib_nsl_gethostbyname = no; then
54346         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
54347 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
54348 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
54349   $as_echo_n "(cached) " >&6
54350 else
54351   ac_check_lib_save_LIBS=$LIBS
54352 LIBS="-lbsd  $LIBS"
54353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54354 /* end confdefs.h.  */
54355 
54356 /* Override any GCC internal prototype to avoid an error.
54357    Use char because int might match the return type of a GCC
54358    builtin and then its argument prototype would still apply.  */
54359 #ifdef __cplusplus
54360 extern "C"
54361 #endif
54362 char gethostbyname ();
54363 int
54364 main ()
54365 {
54366 return gethostbyname ();
54367   ;
54368   return 0;
54369 }
54370 _ACEOF
54371 if ac_fn_cxx_try_link "$LINENO"; then :
54372   ac_cv_lib_bsd_gethostbyname=yes
54373 else
54374   ac_cv_lib_bsd_gethostbyname=no
54375 fi
54376 rm -f core conftest.err conftest.$ac_objext \
54377     conftest$ac_exeext conftest.$ac_ext
54378 LIBS=$ac_check_lib_save_LIBS
54379 fi
54380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
54381 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
54382 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
54383   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
54384 fi
54385 
54386       fi
54387     fi
54388 
54389     # lieder@skyler.mavd.honeywell.com says without -lsocket,
54390     # socket/setsockopt and other routines are undefined under SCO ODT
54391     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
54392     # on later versions), says Simon Leinen: it contains gethostby*
54393     # variants that don't use the name server (or something).  -lsocket
54394     # must be given before -lnsl if both are needed.  We assume that
54395     # if connect needs -lnsl, so does gethostbyname.
54396     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
54397 if test "x$ac_cv_func_connect" = xyes; then :
54398 
54399 fi
54400 
54401     if test $ac_cv_func_connect = no; then
54402       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
54403 $as_echo_n "checking for connect in -lsocket... " >&6; }
54404 if ${ac_cv_lib_socket_connect+:} false; then :
54405   $as_echo_n "(cached) " >&6
54406 else
54407   ac_check_lib_save_LIBS=$LIBS
54408 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
54409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54410 /* end confdefs.h.  */
54411 
54412 /* Override any GCC internal prototype to avoid an error.
54413    Use char because int might match the return type of a GCC
54414    builtin and then its argument prototype would still apply.  */
54415 #ifdef __cplusplus
54416 extern "C"
54417 #endif
54418 char connect ();
54419 int
54420 main ()
54421 {
54422 return connect ();
54423   ;
54424   return 0;
54425 }
54426 _ACEOF
54427 if ac_fn_cxx_try_link "$LINENO"; then :
54428   ac_cv_lib_socket_connect=yes
54429 else
54430   ac_cv_lib_socket_connect=no
54431 fi
54432 rm -f core conftest.err conftest.$ac_objext \
54433     conftest$ac_exeext conftest.$ac_ext
54434 LIBS=$ac_check_lib_save_LIBS
54435 fi
54436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
54437 $as_echo "$ac_cv_lib_socket_connect" >&6; }
54438 if test "x$ac_cv_lib_socket_connect" = xyes; then :
54439   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
54440 fi
54441 
54442     fi
54443 
54444     # Guillermo Gomez says -lposix is necessary on A/UX.
54445     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
54446 if test "x$ac_cv_func_remove" = xyes; then :
54447 
54448 fi
54449 
54450     if test $ac_cv_func_remove = no; then
54451       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
54452 $as_echo_n "checking for remove in -lposix... " >&6; }
54453 if ${ac_cv_lib_posix_remove+:} false; then :
54454   $as_echo_n "(cached) " >&6
54455 else
54456   ac_check_lib_save_LIBS=$LIBS
54457 LIBS="-lposix  $LIBS"
54458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54459 /* end confdefs.h.  */
54460 
54461 /* Override any GCC internal prototype to avoid an error.
54462    Use char because int might match the return type of a GCC
54463    builtin and then its argument prototype would still apply.  */
54464 #ifdef __cplusplus
54465 extern "C"
54466 #endif
54467 char remove ();
54468 int
54469 main ()
54470 {
54471 return remove ();
54472   ;
54473   return 0;
54474 }
54475 _ACEOF
54476 if ac_fn_cxx_try_link "$LINENO"; then :
54477   ac_cv_lib_posix_remove=yes
54478 else
54479   ac_cv_lib_posix_remove=no
54480 fi
54481 rm -f core conftest.err conftest.$ac_objext \
54482     conftest$ac_exeext conftest.$ac_ext
54483 LIBS=$ac_check_lib_save_LIBS
54484 fi
54485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
54486 $as_echo "$ac_cv_lib_posix_remove" >&6; }
54487 if test "x$ac_cv_lib_posix_remove" = xyes; then :
54488   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
54489 fi
54490 
54491     fi
54492 
54493     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
54494     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
54495 if test "x$ac_cv_func_shmat" = xyes; then :
54496 
54497 fi
54498 
54499     if test $ac_cv_func_shmat = no; then
54500       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
54501 $as_echo_n "checking for shmat in -lipc... " >&6; }
54502 if ${ac_cv_lib_ipc_shmat+:} false; then :
54503   $as_echo_n "(cached) " >&6
54504 else
54505   ac_check_lib_save_LIBS=$LIBS
54506 LIBS="-lipc  $LIBS"
54507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54508 /* end confdefs.h.  */
54509 
54510 /* Override any GCC internal prototype to avoid an error.
54511    Use char because int might match the return type of a GCC
54512    builtin and then its argument prototype would still apply.  */
54513 #ifdef __cplusplus
54514 extern "C"
54515 #endif
54516 char shmat ();
54517 int
54518 main ()
54519 {
54520 return shmat ();
54521   ;
54522   return 0;
54523 }
54524 _ACEOF
54525 if ac_fn_cxx_try_link "$LINENO"; then :
54526   ac_cv_lib_ipc_shmat=yes
54527 else
54528   ac_cv_lib_ipc_shmat=no
54529 fi
54530 rm -f core conftest.err conftest.$ac_objext \
54531     conftest$ac_exeext conftest.$ac_ext
54532 LIBS=$ac_check_lib_save_LIBS
54533 fi
54534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
54535 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
54536 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
54537   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
54538 fi
54539 
54540     fi
54541   fi
54542 
54543   # Check for libraries that X11R6 Xt/Xaw programs need.
54544   ac_save_LDFLAGS=$LDFLAGS
54545   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
54546   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
54547   # check for ICE first), but we must link in the order -lSM -lICE or
54548   # we get undefined symbols.  So assume we have SM if we have ICE.
54549   # These have to be linked with before -lX11, unlike the other
54550   # libraries we check for below, so use a different variable.
54551   # John Interrante, Karl Berry
54552   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
54553 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
54554 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
54555   $as_echo_n "(cached) " >&6
54556 else
54557   ac_check_lib_save_LIBS=$LIBS
54558 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
54559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54560 /* end confdefs.h.  */
54561 
54562 /* Override any GCC internal prototype to avoid an error.
54563    Use char because int might match the return type of a GCC
54564    builtin and then its argument prototype would still apply.  */
54565 #ifdef __cplusplus
54566 extern "C"
54567 #endif
54568 char IceConnectionNumber ();
54569 int
54570 main ()
54571 {
54572 return IceConnectionNumber ();
54573   ;
54574   return 0;
54575 }
54576 _ACEOF
54577 if ac_fn_cxx_try_link "$LINENO"; then :
54578   ac_cv_lib_ICE_IceConnectionNumber=yes
54579 else
54580   ac_cv_lib_ICE_IceConnectionNumber=no
54581 fi
54582 rm -f core conftest.err conftest.$ac_objext \
54583     conftest$ac_exeext conftest.$ac_ext
54584 LIBS=$ac_check_lib_save_LIBS
54585 fi
54586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
54587 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
54588 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
54589   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
54590 fi
54591 
54592   LDFLAGS=$ac_save_LDFLAGS
54593 
54594 fi
54595 
54596 
54597     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
54598     # this doesn't make sense so we remove it.
54599     if test "x$COMPILE_TYPE" = xcross; then
54600       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
54601     fi
54602 
54603     if test "x$no_x" = xyes; then
54604 
54605   # Print a helpful message on how to acquire the necessary build dependency.
54606   # x11 is the help tag: freetype, cups, alsa etc
54607   MISSING_DEPENDENCY=x11
54608 
54609   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54610     cygwin_help $MISSING_DEPENDENCY
54611   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54612     msys_help $MISSING_DEPENDENCY
54613   else
54614     PKGHANDLER_COMMAND=
54615 
54616     case $PKGHANDLER in
54617       apt-get)
54618         apt_help     $MISSING_DEPENDENCY ;;
54619       yum)
54620         yum_help     $MISSING_DEPENDENCY ;;
54621       port)
54622         port_help    $MISSING_DEPENDENCY ;;
54623       pkgutil)
54624         pkgutil_help $MISSING_DEPENDENCY ;;
54625       pkgadd)
54626         pkgadd_help  $MISSING_DEPENDENCY ;;
54627     esac
54628 
54629     if test "x$PKGHANDLER_COMMAND" != x; then
54630       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54631     fi
54632   fi
54633 
54634       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
54635     fi
54636 
54637     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
54638       OPENWIN_HOME="/usr/openwin"
54639       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
54640       X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
54641           -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
54642           -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
54643           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
54644     fi
54645 
54646     ac_ext=c
54647 ac_cpp='$CPP $CPPFLAGS'
54648 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54649 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54650 ac_compiler_gnu=$ac_cv_c_compiler_gnu
54651 
54652     OLD_CFLAGS="$CFLAGS"
54653     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
54654 
54655     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
54656     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
54657 do :
54658   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
54659 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
54660           # include <X11/Xlib.h>
54661           # include <X11/Xutil.h>
54662 
54663 
54664 "
54665 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
54666   cat >>confdefs.h <<_ACEOF
54667 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
54668 _ACEOF
54669  X11_HEADERS_OK=yes
54670 else
54671   X11_HEADERS_OK=no; break
54672 fi
54673 
54674 done
54675 
54676 
54677     if test "x$X11_HEADERS_OK" = xno; then
54678 
54679   # Print a helpful message on how to acquire the necessary build dependency.
54680   # x11 is the help tag: freetype, cups, alsa etc
54681   MISSING_DEPENDENCY=x11
54682 
54683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54684     cygwin_help $MISSING_DEPENDENCY
54685   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54686     msys_help $MISSING_DEPENDENCY
54687   else
54688     PKGHANDLER_COMMAND=
54689 
54690     case $PKGHANDLER in
54691       apt-get)
54692         apt_help     $MISSING_DEPENDENCY ;;
54693       yum)
54694         yum_help     $MISSING_DEPENDENCY ;;
54695       port)
54696         port_help    $MISSING_DEPENDENCY ;;
54697       pkgutil)
54698         pkgutil_help $MISSING_DEPENDENCY ;;
54699       pkgadd)
54700         pkgadd_help  $MISSING_DEPENDENCY ;;
54701     esac
54702 
54703     if test "x$PKGHANDLER_COMMAND" != x; then
54704       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54705     fi
54706   fi
54707 
54708       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
54709     fi
54710 
54711     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
54712     # defined in libawt_xawt.
54713     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
54714 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
54715     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54716 /* end confdefs.h.  */
54717 #include <X11/extensions/Xrender.h>
54718 int
54719 main ()
54720 {
54721 XLinearGradient x;
54722   ;
54723   return 0;
54724 }
54725 _ACEOF
54726 if ac_fn_c_try_compile "$LINENO"; then :
54727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54728 $as_echo "yes" >&6; }
54729 else
54730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54731 $as_echo "no" >&6; }
54732          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
54733 fi
54734 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
54735 
54736     CFLAGS="$OLD_CFLAGS"
54737     ac_ext=cpp
54738 ac_cpp='$CXXCPP $CPPFLAGS'
54739 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54740 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54741 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54742 
54743   fi # NEEDS_LIB_X11
54744 
54745 
54746 
54747 
54748 
54749 
54750 # Check whether --with-cups was given.
54751 if test "${with_cups+set}" = set; then :
54752   withval=$with_cups;
54753 fi
54754 
54755 
54756 # Check whether --with-cups-include was given.
54757 if test "${with_cups_include+set}" = set; then :
54758   withval=$with_cups_include;
54759 fi
54760 
54761 
54762   if test "x$NEEDS_LIB_CUPS" = xfalse; then
54763     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
54764         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
54765       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
54766 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
54767     fi
54768     CUPS_CFLAGS=
54769   else
54770     CUPS_FOUND=no
54771 
54772     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
54773       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
54774     fi
54775 
54776     if test "x${with_cups}" != x; then
54777       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
54778 $as_echo_n "checking for cups headers... " >&6; }
54779       if test -s "${with_cups}/include/cups/cups.h"; then
54780         CUPS_CFLAGS="-I${with_cups}/include"
54781         CUPS_FOUND=yes
54782         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
54783 $as_echo "$CUPS_FOUND" >&6; }
54784       else
54785         as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
54786       fi
54787     fi
54788     if test "x${with_cups_include}" != x; then
54789       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
54790 $as_echo_n "checking for cups headers... " >&6; }
54791       if test -s "${with_cups_include}/cups/cups.h"; then
54792         CUPS_CFLAGS="-I${with_cups_include}"
54793         CUPS_FOUND=yes
54794         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
54795 $as_echo "$CUPS_FOUND" >&6; }
54796       else
54797         as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
54798       fi
54799     fi
54800     if test "x$CUPS_FOUND" = xno; then
54801       # Are the cups headers installed in the default /usr/include location?
54802       for ac_header in cups/cups.h cups/ppd.h
54803 do :
54804   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
54805 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
54806 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
54807   cat >>confdefs.h <<_ACEOF
54808 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
54809 _ACEOF
54810 
54811           CUPS_FOUND=yes
54812           CUPS_CFLAGS=
54813           DEFAULT_CUPS=yes
54814 
54815 fi
54816 
54817 done
54818 
54819     fi
54820     if test "x$CUPS_FOUND" = xno; then
54821       # Getting nervous now? Lets poke around for standard Solaris third-party
54822       # package installation locations.
54823       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
54824 $as_echo_n "checking for cups headers... " >&6; }
54825       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
54826         # An SFW package seems to be installed!
54827         CUPS_FOUND=yes
54828         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
54829       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
54830         # A CSW package seems to be installed!
54831         CUPS_FOUND=yes
54832         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
54833       fi
54834       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
54835 $as_echo "$CUPS_FOUND" >&6; }
54836     fi
54837     if test "x$CUPS_FOUND" = xno; then
54838 
54839   # Print a helpful message on how to acquire the necessary build dependency.
54840   # cups is the help tag: freetype, cups, alsa etc
54841   MISSING_DEPENDENCY=cups
54842 
54843   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54844     cygwin_help $MISSING_DEPENDENCY
54845   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54846     msys_help $MISSING_DEPENDENCY
54847   else
54848     PKGHANDLER_COMMAND=
54849 
54850     case $PKGHANDLER in
54851       apt-get)
54852         apt_help     $MISSING_DEPENDENCY ;;
54853       yum)
54854         yum_help     $MISSING_DEPENDENCY ;;
54855       port)
54856         port_help    $MISSING_DEPENDENCY ;;
54857       pkgutil)
54858         pkgutil_help $MISSING_DEPENDENCY ;;
54859       pkgadd)
54860         pkgadd_help  $MISSING_DEPENDENCY ;;
54861     esac
54862 
54863     if test "x$PKGHANDLER_COMMAND" != x; then
54864       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54865     fi
54866   fi
54867 
54868       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
54869     fi
54870   fi
54871 
54872 
54873 
54874 
54875 
54876 # Check whether --with-freetype was given.
54877 if test "${with_freetype+set}" = set; then :
54878   withval=$with_freetype;
54879 fi
54880 
54881 
54882 # Check whether --with-freetype-include was given.
54883 if test "${with_freetype_include+set}" = set; then :
54884   withval=$with_freetype_include;
54885 fi
54886 
54887 
54888 # Check whether --with-freetype-lib was given.
54889 if test "${with_freetype_lib+set}" = set; then :
54890   withval=$with_freetype_lib;
54891 fi
54892 
54893 
54894 # Check whether --with-freetype-src was given.
54895 if test "${with_freetype_src+set}" = set; then :
54896   withval=$with_freetype_src;
54897 fi
54898 
54899   # Check whether --enable-freetype-bundling was given.
54900 if test "${enable_freetype_bundling+set}" = set; then :
54901   enableval=$enable_freetype_bundling;
54902 fi
54903 
54904 
54905   # Need to specify explicitly since it needs to be overridden on some versions of macosx
54906   FREETYPE_BASE_NAME=freetype
54907   FREETYPE_CFLAGS=
54908   FREETYPE_LIBS=
54909   FREETYPE_BUNDLE_LIB_PATH=
54910 
54911   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
54912     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
54913         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
54914         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
54915         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
54916       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
54917 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
54918     fi
54919     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
54920       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
54921 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
54922     fi
54923   else
54924     # freetype is needed to build; go get it!
54925 
54926     BUNDLE_FREETYPE="$enable_freetype_bundling"
54927 
54928     if  test "x$with_freetype_src" != x; then
54929       if test "x$OPENJDK_TARGET_OS" = xwindows; then
54930         # Try to build freetype if --with-freetype-src was given on Windows
54931 
54932   FREETYPE_SRC_PATH="$with_freetype_src"
54933   BUILD_FREETYPE=yes
54934 
54935   # Check if the freetype sources are acessible..
54936   if ! test -d $FREETYPE_SRC_PATH; then
54937     { $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
54938 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
54939     BUILD_FREETYPE=no
54940   fi
54941   # ..and contain a vc2010 project file
54942   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
54943   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
54944     { $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
54945 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
54946     BUILD_FREETYPE=no
54947   fi
54948   # Now check if configure found a version of 'msbuild.exe'
54949   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
54950     { $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
54951 $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;}
54952     BUILD_FREETYPE=no
54953   fi
54954 
54955   # Ready to go..
54956   if test "x$BUILD_FREETYPE" = xyes; then
54957     # msbuild requires trailing slashes for output directories
54958     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
54959     freetype_lib_path_unix="$freetype_lib_path"
54960     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
54961 
54962   unix_path="$vcxproj_path"
54963   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54964     windows_path=`$CYGPATH -m "$unix_path"`
54965     vcxproj_path="$windows_path"
54966   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54967     windows_path=`cmd //c echo $unix_path`
54968     vcxproj_path="$windows_path"
54969   fi
54970 
54971 
54972   unix_path="$freetype_lib_path"
54973   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54974     windows_path=`$CYGPATH -m "$unix_path"`
54975     freetype_lib_path="$windows_path"
54976   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54977     windows_path=`cmd //c echo $unix_path`
54978     freetype_lib_path="$windows_path"
54979   fi
54980 
54981 
54982   unix_path="$freetype_obj_path"
54983   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54984     windows_path=`$CYGPATH -m "$unix_path"`
54985     freetype_obj_path="$windows_path"
54986   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54987     windows_path=`cmd //c echo $unix_path`
54988     freetype_obj_path="$windows_path"
54989   fi
54990 
54991     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54992       freetype_platform=x64
54993     else
54994       freetype_platform=win32
54995     fi
54996 
54997     # The original freetype project file is for VS 2010 (i.e. 'v100'),
54998     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
54999     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
55000     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
55001     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
55002 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
55003 
55004     # First we try to build the freetype.dll
55005     $ECHO -e "@echo off\n"\
55006         "$MSBUILD $vcxproj_path "\
55007         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
55008         "/p:Configuration=\"Release Multithreaded\" "\
55009         "/p:Platform=$freetype_platform "\
55010         "/p:ConfigurationType=DynamicLibrary "\
55011         "/p:TargetName=freetype "\
55012         "/p:OutDir=\"$freetype_lib_path\" "\
55013         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
55014     cmd /c freetype.bat
55015 
55016     if test -s "$freetype_lib_path_unix/freetype.dll"; then
55017       # If that succeeds we also build freetype.lib
55018       $ECHO -e "@echo off\n"\
55019           "$MSBUILD $vcxproj_path "\
55020           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
55021           "/p:Configuration=\"Release Multithreaded\" "\
55022           "/p:Platform=$freetype_platform "\
55023           "/p:ConfigurationType=StaticLibrary "\
55024           "/p:TargetName=freetype "\
55025           "/p:OutDir=\"$freetype_lib_path\" "\
55026           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
55027       cmd /c freetype.bat
55028 
55029       if test -s "$freetype_lib_path_unix/freetype.lib"; then
55030         # Once we build both, lib and dll, set freetype lib and include path appropriately
55031         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
55032         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
55033         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
55034 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
55035       else
55036         BUILD_FREETYPE=no
55037       fi
55038     else
55039       BUILD_FREETYPE=no
55040     fi
55041   fi
55042 
55043         if test "x$BUILD_FREETYPE" = xyes; then
55044           # Okay, we built it. Check that it works.
55045 
55046   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55047   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55048   METHOD="--with-freetype-src"
55049 
55050   # Let's start with an optimistic view of the world :-)
55051   FOUND_FREETYPE=yes
55052 
55053   # First look for the canonical freetype main include file ft2build.h.
55054   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55055     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55056     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55057     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55058       # Fail.
55059       FOUND_FREETYPE=no
55060     fi
55061   fi
55062 
55063   if test "x$FOUND_FREETYPE" = xyes; then
55064     # Include file found, let's continue the sanity check.
55065     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55066 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55067 
55068     # Reset to default value
55069     FREETYPE_BASE_NAME=freetype
55070     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55071     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55072       if test "x$OPENJDK_TARGET_OS" = xmacosx \
55073           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55074         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55075         # for the .6 version explicitly.
55076         FREETYPE_BASE_NAME=freetype.6
55077         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55078         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55079 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55080       else
55081         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55082 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55083         FOUND_FREETYPE=no
55084       fi
55085     else
55086       if test "x$OPENJDK_TARGET_OS" = xwindows; then
55087         # On Windows, we will need both .lib and .dll file.
55088         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55089           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55090 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55091           FOUND_FREETYPE=no
55092         fi
55093       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55094           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55095         # Found lib in isa dir, use that instead.
55096         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55097         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55098 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55099       fi
55100     fi
55101   fi
55102 
55103   if test "x$FOUND_FREETYPE" = xyes; then
55104 
55105   # Only process if variable expands to non-empty
55106 
55107   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55108     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55109 
55110   # Input might be given as Windows format, start by converting to
55111   # unix format.
55112   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55113   new_path=`$CYGPATH -u "$path"`
55114 
55115   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55116   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55117   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55118   # "foo.exe" is OK but "foo" is an error.
55119   #
55120   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55121   # It is also a way to make sure we got the proper file name for the real test later on.
55122   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55123   if test "x$test_shortpath" = x; then
55124     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55125 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55126     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55127   fi
55128 
55129   # Call helper function which possibly converts this using DOS-style short mode.
55130   # If so, the updated path is stored in $new_path.
55131 
55132   input_path="$new_path"
55133   # Check if we need to convert this using DOS-style short mode. If the path
55134   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55135   # take no chances and rewrite it.
55136   # Note: m4 eats our [], so we need to use [ and ] instead.
55137   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55138   if test "x$has_forbidden_chars" != x; then
55139     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55140     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55141     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55142     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55143       # Going to short mode and back again did indeed matter. Since short mode is
55144       # case insensitive, let's make it lowercase to improve readability.
55145       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55146       # Now convert it back to Unix-style (cygpath)
55147       input_path=`$CYGPATH -u "$shortmode_path"`
55148       new_path="$input_path"
55149     fi
55150   fi
55151 
55152   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55153   if test "x$test_cygdrive_prefix" = x; then
55154     # As a simple fix, exclude /usr/bin since it's not a real path.
55155     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55156       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55157       # a path prefixed by /cygdrive for fixpath to work.
55158       new_path="$CYGWIN_ROOT_PATH$input_path"
55159     fi
55160   fi
55161 
55162 
55163   if test "x$path" != "x$new_path"; then
55164     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55165     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55166 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55167   fi
55168 
55169     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55170 
55171   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55172   has_colon=`$ECHO $path | $GREP ^.:`
55173   new_path="$path"
55174   if test "x$has_colon" = x; then
55175     # Not in mixed or Windows style, start by that.
55176     new_path=`cmd //c echo $path`
55177   fi
55178 
55179 
55180   input_path="$new_path"
55181   # Check if we need to convert this using DOS-style short mode. If the path
55182   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55183   # take no chances and rewrite it.
55184   # Note: m4 eats our [], so we need to use [ and ] instead.
55185   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55186   if test "x$has_forbidden_chars" != x; then
55187     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55188     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55189   fi
55190 
55191 
55192   windows_path="$new_path"
55193   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55194     unix_path=`$CYGPATH -u "$windows_path"`
55195     new_path="$unix_path"
55196   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55197     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55198     new_path="$unix_path"
55199   fi
55200 
55201   if test "x$path" != "x$new_path"; then
55202     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55203     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55204 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55205   fi
55206 
55207   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55208   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55209 
55210     else
55211       # We're on a unix platform. Hooray! :)
55212       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55213       has_space=`$ECHO "$path" | $GREP " "`
55214       if test "x$has_space" != x; then
55215         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55216 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55217         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55218       fi
55219 
55220       # Use eval to expand a potential ~
55221       eval path="$path"
55222       if test ! -f "$path" && test ! -d "$path"; then
55223         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55224       fi
55225 
55226       if test -d "$path"; then
55227         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55228       else
55229         dir="`$DIRNAME "$path"`"
55230         base="`$BASENAME "$path"`"
55231         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55232       fi
55233     fi
55234   fi
55235 
55236 
55237   # Only process if variable expands to non-empty
55238 
55239   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55240     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55241 
55242   # Input might be given as Windows format, start by converting to
55243   # unix format.
55244   path="$POTENTIAL_FREETYPE_LIB_PATH"
55245   new_path=`$CYGPATH -u "$path"`
55246 
55247   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55248   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55249   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55250   # "foo.exe" is OK but "foo" is an error.
55251   #
55252   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55253   # It is also a way to make sure we got the proper file name for the real test later on.
55254   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55255   if test "x$test_shortpath" = x; then
55256     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55257 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55258     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55259   fi
55260 
55261   # Call helper function which possibly converts this using DOS-style short mode.
55262   # If so, the updated path is stored in $new_path.
55263 
55264   input_path="$new_path"
55265   # Check if we need to convert this using DOS-style short mode. If the path
55266   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55267   # take no chances and rewrite it.
55268   # Note: m4 eats our [], so we need to use [ and ] instead.
55269   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55270   if test "x$has_forbidden_chars" != x; then
55271     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55272     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55273     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55274     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55275       # Going to short mode and back again did indeed matter. Since short mode is
55276       # case insensitive, let's make it lowercase to improve readability.
55277       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55278       # Now convert it back to Unix-style (cygpath)
55279       input_path=`$CYGPATH -u "$shortmode_path"`
55280       new_path="$input_path"
55281     fi
55282   fi
55283 
55284   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55285   if test "x$test_cygdrive_prefix" = x; then
55286     # As a simple fix, exclude /usr/bin since it's not a real path.
55287     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55288       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55289       # a path prefixed by /cygdrive for fixpath to work.
55290       new_path="$CYGWIN_ROOT_PATH$input_path"
55291     fi
55292   fi
55293 
55294 
55295   if test "x$path" != "x$new_path"; then
55296     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55297     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55298 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55299   fi
55300 
55301     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55302 
55303   path="$POTENTIAL_FREETYPE_LIB_PATH"
55304   has_colon=`$ECHO $path | $GREP ^.:`
55305   new_path="$path"
55306   if test "x$has_colon" = x; then
55307     # Not in mixed or Windows style, start by that.
55308     new_path=`cmd //c echo $path`
55309   fi
55310 
55311 
55312   input_path="$new_path"
55313   # Check if we need to convert this using DOS-style short mode. If the path
55314   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55315   # take no chances and rewrite it.
55316   # Note: m4 eats our [], so we need to use [ and ] instead.
55317   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55318   if test "x$has_forbidden_chars" != x; then
55319     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55320     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55321   fi
55322 
55323 
55324   windows_path="$new_path"
55325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55326     unix_path=`$CYGPATH -u "$windows_path"`
55327     new_path="$unix_path"
55328   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55329     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55330     new_path="$unix_path"
55331   fi
55332 
55333   if test "x$path" != "x$new_path"; then
55334     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55335     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55336 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55337   fi
55338 
55339   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55340   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55341 
55342     else
55343       # We're on a unix platform. Hooray! :)
55344       path="$POTENTIAL_FREETYPE_LIB_PATH"
55345       has_space=`$ECHO "$path" | $GREP " "`
55346       if test "x$has_space" != x; then
55347         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55348 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55349         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55350       fi
55351 
55352       # Use eval to expand a potential ~
55353       eval path="$path"
55354       if test ! -f "$path" && test ! -d "$path"; then
55355         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55356       fi
55357 
55358       if test -d "$path"; then
55359         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55360       else
55361         dir="`$DIRNAME "$path"`"
55362         base="`$BASENAME "$path"`"
55363         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55364       fi
55365     fi
55366   fi
55367 
55368 
55369     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55370     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55371 $as_echo_n "checking for freetype includes... " >&6; }
55372     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55373 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55374     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55375     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55376 $as_echo_n "checking for freetype libraries... " >&6; }
55377     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55378 $as_echo "$FREETYPE_LIB_PATH" >&6; }
55379   fi
55380 
55381           if test "x$FOUND_FREETYPE" != xyes; then
55382             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
55383           fi
55384         else
55385           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
55386 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
55387           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
55388         fi
55389       else
55390         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
55391 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
55392       fi
55393     fi
55394 
55395     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
55396       # User has specified settings
55397 
55398       if test "x$BUNDLE_FREETYPE" = x; then
55399         # If not specified, default is to bundle freetype
55400         BUNDLE_FREETYPE=yes
55401       fi
55402 
55403       if test "x$with_freetype" != x; then
55404         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
55405         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
55406       fi
55407 
55408       # Allow --with-freetype-lib and --with-freetype-include to override
55409       if test "x$with_freetype_include" != x; then
55410         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
55411       fi
55412       if test "x$with_freetype_lib" != x; then
55413         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
55414       fi
55415 
55416       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55417         # Okay, we got it. Check that it works.
55418 
55419   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55420   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55421   METHOD="--with-freetype"
55422 
55423   # Let's start with an optimistic view of the world :-)
55424   FOUND_FREETYPE=yes
55425 
55426   # First look for the canonical freetype main include file ft2build.h.
55427   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55428     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55429     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55430     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55431       # Fail.
55432       FOUND_FREETYPE=no
55433     fi
55434   fi
55435 
55436   if test "x$FOUND_FREETYPE" = xyes; then
55437     # Include file found, let's continue the sanity check.
55438     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55439 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55440 
55441     # Reset to default value
55442     FREETYPE_BASE_NAME=freetype
55443     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55444     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55445       if test "x$OPENJDK_TARGET_OS" = xmacosx \
55446           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55447         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55448         # for the .6 version explicitly.
55449         FREETYPE_BASE_NAME=freetype.6
55450         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55451         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55452 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55453       else
55454         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55455 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55456         FOUND_FREETYPE=no
55457       fi
55458     else
55459       if test "x$OPENJDK_TARGET_OS" = xwindows; then
55460         # On Windows, we will need both .lib and .dll file.
55461         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55462           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55463 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55464           FOUND_FREETYPE=no
55465         fi
55466       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55467           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55468         # Found lib in isa dir, use that instead.
55469         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55470         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55471 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55472       fi
55473     fi
55474   fi
55475 
55476   if test "x$FOUND_FREETYPE" = xyes; then
55477 
55478   # Only process if variable expands to non-empty
55479 
55480   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55481     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55482 
55483   # Input might be given as Windows format, start by converting to
55484   # unix format.
55485   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55486   new_path=`$CYGPATH -u "$path"`
55487 
55488   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55489   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55490   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55491   # "foo.exe" is OK but "foo" is an error.
55492   #
55493   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55494   # It is also a way to make sure we got the proper file name for the real test later on.
55495   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55496   if test "x$test_shortpath" = x; then
55497     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55498 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55499     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55500   fi
55501 
55502   # Call helper function which possibly converts this using DOS-style short mode.
55503   # If so, the updated path is stored in $new_path.
55504 
55505   input_path="$new_path"
55506   # Check if we need to convert this using DOS-style short mode. If the path
55507   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55508   # take no chances and rewrite it.
55509   # Note: m4 eats our [], so we need to use [ and ] instead.
55510   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55511   if test "x$has_forbidden_chars" != x; then
55512     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55513     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55514     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55515     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55516       # Going to short mode and back again did indeed matter. Since short mode is
55517       # case insensitive, let's make it lowercase to improve readability.
55518       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55519       # Now convert it back to Unix-style (cygpath)
55520       input_path=`$CYGPATH -u "$shortmode_path"`
55521       new_path="$input_path"
55522     fi
55523   fi
55524 
55525   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55526   if test "x$test_cygdrive_prefix" = x; then
55527     # As a simple fix, exclude /usr/bin since it's not a real path.
55528     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55529       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55530       # a path prefixed by /cygdrive for fixpath to work.
55531       new_path="$CYGWIN_ROOT_PATH$input_path"
55532     fi
55533   fi
55534 
55535 
55536   if test "x$path" != "x$new_path"; then
55537     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55538     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55539 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55540   fi
55541 
55542     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55543 
55544   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55545   has_colon=`$ECHO $path | $GREP ^.:`
55546   new_path="$path"
55547   if test "x$has_colon" = x; then
55548     # Not in mixed or Windows style, start by that.
55549     new_path=`cmd //c echo $path`
55550   fi
55551 
55552 
55553   input_path="$new_path"
55554   # Check if we need to convert this using DOS-style short mode. If the path
55555   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55556   # take no chances and rewrite it.
55557   # Note: m4 eats our [], so we need to use [ and ] instead.
55558   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55559   if test "x$has_forbidden_chars" != x; then
55560     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55561     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55562   fi
55563 
55564 
55565   windows_path="$new_path"
55566   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55567     unix_path=`$CYGPATH -u "$windows_path"`
55568     new_path="$unix_path"
55569   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55570     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55571     new_path="$unix_path"
55572   fi
55573 
55574   if test "x$path" != "x$new_path"; then
55575     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55576     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55577 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55578   fi
55579 
55580   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55581   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55582 
55583     else
55584       # We're on a unix platform. Hooray! :)
55585       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55586       has_space=`$ECHO "$path" | $GREP " "`
55587       if test "x$has_space" != x; then
55588         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55589 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55590         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55591       fi
55592 
55593       # Use eval to expand a potential ~
55594       eval path="$path"
55595       if test ! -f "$path" && test ! -d "$path"; then
55596         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55597       fi
55598 
55599       if test -d "$path"; then
55600         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55601       else
55602         dir="`$DIRNAME "$path"`"
55603         base="`$BASENAME "$path"`"
55604         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55605       fi
55606     fi
55607   fi
55608 
55609 
55610   # Only process if variable expands to non-empty
55611 
55612   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55613     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55614 
55615   # Input might be given as Windows format, start by converting to
55616   # unix format.
55617   path="$POTENTIAL_FREETYPE_LIB_PATH"
55618   new_path=`$CYGPATH -u "$path"`
55619 
55620   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55621   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55622   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55623   # "foo.exe" is OK but "foo" is an error.
55624   #
55625   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55626   # It is also a way to make sure we got the proper file name for the real test later on.
55627   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55628   if test "x$test_shortpath" = x; then
55629     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55630 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55631     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55632   fi
55633 
55634   # Call helper function which possibly converts this using DOS-style short mode.
55635   # If so, the updated path is stored in $new_path.
55636 
55637   input_path="$new_path"
55638   # Check if we need to convert this using DOS-style short mode. If the path
55639   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55640   # take no chances and rewrite it.
55641   # Note: m4 eats our [], so we need to use [ and ] instead.
55642   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55643   if test "x$has_forbidden_chars" != x; then
55644     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55645     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55646     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55647     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55648       # Going to short mode and back again did indeed matter. Since short mode is
55649       # case insensitive, let's make it lowercase to improve readability.
55650       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55651       # Now convert it back to Unix-style (cygpath)
55652       input_path=`$CYGPATH -u "$shortmode_path"`
55653       new_path="$input_path"
55654     fi
55655   fi
55656 
55657   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55658   if test "x$test_cygdrive_prefix" = x; then
55659     # As a simple fix, exclude /usr/bin since it's not a real path.
55660     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55661       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55662       # a path prefixed by /cygdrive for fixpath to work.
55663       new_path="$CYGWIN_ROOT_PATH$input_path"
55664     fi
55665   fi
55666 
55667 
55668   if test "x$path" != "x$new_path"; then
55669     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55670     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55671 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55672   fi
55673 
55674     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55675 
55676   path="$POTENTIAL_FREETYPE_LIB_PATH"
55677   has_colon=`$ECHO $path | $GREP ^.:`
55678   new_path="$path"
55679   if test "x$has_colon" = x; then
55680     # Not in mixed or Windows style, start by that.
55681     new_path=`cmd //c echo $path`
55682   fi
55683 
55684 
55685   input_path="$new_path"
55686   # Check if we need to convert this using DOS-style short mode. If the path
55687   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55688   # take no chances and rewrite it.
55689   # Note: m4 eats our [], so we need to use [ and ] instead.
55690   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55691   if test "x$has_forbidden_chars" != x; then
55692     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55693     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55694   fi
55695 
55696 
55697   windows_path="$new_path"
55698   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55699     unix_path=`$CYGPATH -u "$windows_path"`
55700     new_path="$unix_path"
55701   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55702     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55703     new_path="$unix_path"
55704   fi
55705 
55706   if test "x$path" != "x$new_path"; then
55707     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55708     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55709 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55710   fi
55711 
55712   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55713   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55714 
55715     else
55716       # We're on a unix platform. Hooray! :)
55717       path="$POTENTIAL_FREETYPE_LIB_PATH"
55718       has_space=`$ECHO "$path" | $GREP " "`
55719       if test "x$has_space" != x; then
55720         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55721 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55722         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55723       fi
55724 
55725       # Use eval to expand a potential ~
55726       eval path="$path"
55727       if test ! -f "$path" && test ! -d "$path"; then
55728         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55729       fi
55730 
55731       if test -d "$path"; then
55732         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55733       else
55734         dir="`$DIRNAME "$path"`"
55735         base="`$BASENAME "$path"`"
55736         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55737       fi
55738     fi
55739   fi
55740 
55741 
55742     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55743     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55744 $as_echo_n "checking for freetype includes... " >&6; }
55745     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55746 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55747     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55748     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55749 $as_echo_n "checking for freetype libraries... " >&6; }
55750     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55751 $as_echo "$FREETYPE_LIB_PATH" >&6; }
55752   fi
55753 
55754         if test "x$FOUND_FREETYPE" != xyes; then
55755           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
55756         fi
55757       else
55758         # User specified only one of lib or include. This is an error.
55759         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
55760           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
55761 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
55762           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
55763         else
55764           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
55765 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
55766           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
55767         fi
55768       fi
55769     else
55770       # User did not specify settings, but we need freetype. Try to locate it.
55771 
55772       if test "x$BUNDLE_FREETYPE" = x; then
55773         # If not specified, default is to bundle freetype only on windows
55774         if test "x$OPENJDK_TARGET_OS" = xwindows; then
55775           BUNDLE_FREETYPE=yes
55776         else
55777           BUNDLE_FREETYPE=no
55778         fi
55779       fi
55780 
55781       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
55782       if test "x$SYSROOT" = x; then
55783         if test "x$FOUND_FREETYPE" != xyes; then
55784           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
55785           if test "x$PKG_CONFIG" != x; then
55786 
55787 pkg_failed=no
55788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
55789 $as_echo_n "checking for FREETYPE... " >&6; }
55790 
55791 if test -n "$FREETYPE_CFLAGS"; then
55792     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
55793  elif test -n "$PKG_CONFIG"; then
55794     if test -n "$PKG_CONFIG" && \
55795     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
55796   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
55797   ac_status=$?
55798   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55799   test $ac_status = 0; }; then
55800   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
55801 else
55802   pkg_failed=yes
55803 fi
55804  else
55805     pkg_failed=untried
55806 fi
55807 if test -n "$FREETYPE_LIBS"; then
55808     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
55809  elif test -n "$PKG_CONFIG"; then
55810     if test -n "$PKG_CONFIG" && \
55811     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
55812   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
55813   ac_status=$?
55814   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55815   test $ac_status = 0; }; then
55816   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
55817 else
55818   pkg_failed=yes
55819 fi
55820  else
55821     pkg_failed=untried
55822 fi
55823 
55824 
55825 
55826 if test $pkg_failed = yes; then
55827 
55828 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55829         _pkg_short_errors_supported=yes
55830 else
55831         _pkg_short_errors_supported=no
55832 fi
55833         if test $_pkg_short_errors_supported = yes; then
55834                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
55835         else
55836                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
55837         fi
55838         # Put the nasty error message in config.log where it belongs
55839         echo "$FREETYPE_PKG_ERRORS" >&5
55840 
55841         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55842 $as_echo "no" >&6; }
55843                 FOUND_FREETYPE=no
55844 elif test $pkg_failed = untried; then
55845         FOUND_FREETYPE=no
55846 else
55847         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
55848         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
55849         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55850 $as_echo "yes" >&6; }
55851         FOUND_FREETYPE=yes
55852 fi
55853             if test "x$FOUND_FREETYPE" = xyes; then
55854               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
55855               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
55856               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
55857               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
55858                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
55859               fi
55860               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
55861               if test "x$BUNDLE_FREETYPE" = xyes; then
55862                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
55863 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
55864                 FOUND_FREETYPE=no
55865               else
55866                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
55867 $as_echo_n "checking for freetype... " >&6; }
55868                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
55869 $as_echo "yes (using pkg-config)" >&6; }
55870               fi
55871             fi
55872           fi
55873         fi
55874       fi
55875 
55876       if test "x$FOUND_FREETYPE" != xyes; then
55877         # Check in well-known locations
55878         if test "x$OPENJDK_TARGET_OS" = xwindows; then
55879           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
55880 
55881   windows_path="$FREETYPE_BASE_DIR"
55882   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55883     unix_path=`$CYGPATH -u "$windows_path"`
55884     FREETYPE_BASE_DIR="$unix_path"
55885   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55886     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55887     FREETYPE_BASE_DIR="$unix_path"
55888   fi
55889 
55890 
55891   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55892   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55893   METHOD="well-known location"
55894 
55895   # Let's start with an optimistic view of the world :-)
55896   FOUND_FREETYPE=yes
55897 
55898   # First look for the canonical freetype main include file ft2build.h.
55899   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55900     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55901     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55902     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55903       # Fail.
55904       FOUND_FREETYPE=no
55905     fi
55906   fi
55907 
55908   if test "x$FOUND_FREETYPE" = xyes; then
55909     # Include file found, let's continue the sanity check.
55910     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55911 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55912 
55913     # Reset to default value
55914     FREETYPE_BASE_NAME=freetype
55915     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55916     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55917       if test "x$OPENJDK_TARGET_OS" = xmacosx \
55918           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55919         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55920         # for the .6 version explicitly.
55921         FREETYPE_BASE_NAME=freetype.6
55922         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55923         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55924 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55925       else
55926         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55927 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55928         FOUND_FREETYPE=no
55929       fi
55930     else
55931       if test "x$OPENJDK_TARGET_OS" = xwindows; then
55932         # On Windows, we will need both .lib and .dll file.
55933         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55934           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55935 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55936           FOUND_FREETYPE=no
55937         fi
55938       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55939           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55940         # Found lib in isa dir, use that instead.
55941         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55942         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55943 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55944       fi
55945     fi
55946   fi
55947 
55948   if test "x$FOUND_FREETYPE" = xyes; then
55949 
55950   # Only process if variable expands to non-empty
55951 
55952   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55953     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55954 
55955   # Input might be given as Windows format, start by converting to
55956   # unix format.
55957   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55958   new_path=`$CYGPATH -u "$path"`
55959 
55960   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55961   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55962   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55963   # "foo.exe" is OK but "foo" is an error.
55964   #
55965   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55966   # It is also a way to make sure we got the proper file name for the real test later on.
55967   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55968   if test "x$test_shortpath" = x; then
55969     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55970 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55971     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55972   fi
55973 
55974   # Call helper function which possibly converts this using DOS-style short mode.
55975   # If so, the updated path is stored in $new_path.
55976 
55977   input_path="$new_path"
55978   # Check if we need to convert this using DOS-style short mode. If the path
55979   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55980   # take no chances and rewrite it.
55981   # Note: m4 eats our [], so we need to use [ and ] instead.
55982   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55983   if test "x$has_forbidden_chars" != x; then
55984     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55985     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55986     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55987     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55988       # Going to short mode and back again did indeed matter. Since short mode is
55989       # case insensitive, let's make it lowercase to improve readability.
55990       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55991       # Now convert it back to Unix-style (cygpath)
55992       input_path=`$CYGPATH -u "$shortmode_path"`
55993       new_path="$input_path"
55994     fi
55995   fi
55996 
55997   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55998   if test "x$test_cygdrive_prefix" = x; then
55999     # As a simple fix, exclude /usr/bin since it's not a real path.
56000     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56001       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56002       # a path prefixed by /cygdrive for fixpath to work.
56003       new_path="$CYGWIN_ROOT_PATH$input_path"
56004     fi
56005   fi
56006 
56007 
56008   if test "x$path" != "x$new_path"; then
56009     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56010     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56011 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56012   fi
56013 
56014     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56015 
56016   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56017   has_colon=`$ECHO $path | $GREP ^.:`
56018   new_path="$path"
56019   if test "x$has_colon" = x; then
56020     # Not in mixed or Windows style, start by that.
56021     new_path=`cmd //c echo $path`
56022   fi
56023 
56024 
56025   input_path="$new_path"
56026   # Check if we need to convert this using DOS-style short mode. If the path
56027   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56028   # take no chances and rewrite it.
56029   # Note: m4 eats our [], so we need to use [ and ] instead.
56030   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56031   if test "x$has_forbidden_chars" != x; then
56032     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56033     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56034   fi
56035 
56036 
56037   windows_path="$new_path"
56038   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56039     unix_path=`$CYGPATH -u "$windows_path"`
56040     new_path="$unix_path"
56041   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56042     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56043     new_path="$unix_path"
56044   fi
56045 
56046   if test "x$path" != "x$new_path"; then
56047     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56048     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56049 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56050   fi
56051 
56052   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56053   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56054 
56055     else
56056       # We're on a unix platform. Hooray! :)
56057       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56058       has_space=`$ECHO "$path" | $GREP " "`
56059       if test "x$has_space" != x; then
56060         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56061 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56062         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56063       fi
56064 
56065       # Use eval to expand a potential ~
56066       eval path="$path"
56067       if test ! -f "$path" && test ! -d "$path"; then
56068         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56069       fi
56070 
56071       if test -d "$path"; then
56072         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56073       else
56074         dir="`$DIRNAME "$path"`"
56075         base="`$BASENAME "$path"`"
56076         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56077       fi
56078     fi
56079   fi
56080 
56081 
56082   # Only process if variable expands to non-empty
56083 
56084   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56085     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56086 
56087   # Input might be given as Windows format, start by converting to
56088   # unix format.
56089   path="$POTENTIAL_FREETYPE_LIB_PATH"
56090   new_path=`$CYGPATH -u "$path"`
56091 
56092   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56093   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56094   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56095   # "foo.exe" is OK but "foo" is an error.
56096   #
56097   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56098   # It is also a way to make sure we got the proper file name for the real test later on.
56099   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56100   if test "x$test_shortpath" = x; then
56101     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56102 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56103     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56104   fi
56105 
56106   # Call helper function which possibly converts this using DOS-style short mode.
56107   # If so, the updated path is stored in $new_path.
56108 
56109   input_path="$new_path"
56110   # Check if we need to convert this using DOS-style short mode. If the path
56111   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56112   # take no chances and rewrite it.
56113   # Note: m4 eats our [], so we need to use [ and ] instead.
56114   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56115   if test "x$has_forbidden_chars" != x; then
56116     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56117     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56118     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56119     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56120       # Going to short mode and back again did indeed matter. Since short mode is
56121       # case insensitive, let's make it lowercase to improve readability.
56122       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56123       # Now convert it back to Unix-style (cygpath)
56124       input_path=`$CYGPATH -u "$shortmode_path"`
56125       new_path="$input_path"
56126     fi
56127   fi
56128 
56129   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56130   if test "x$test_cygdrive_prefix" = x; then
56131     # As a simple fix, exclude /usr/bin since it's not a real path.
56132     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56133       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56134       # a path prefixed by /cygdrive for fixpath to work.
56135       new_path="$CYGWIN_ROOT_PATH$input_path"
56136     fi
56137   fi
56138 
56139 
56140   if test "x$path" != "x$new_path"; then
56141     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56142     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56143 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56144   fi
56145 
56146     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56147 
56148   path="$POTENTIAL_FREETYPE_LIB_PATH"
56149   has_colon=`$ECHO $path | $GREP ^.:`
56150   new_path="$path"
56151   if test "x$has_colon" = x; then
56152     # Not in mixed or Windows style, start by that.
56153     new_path=`cmd //c echo $path`
56154   fi
56155 
56156 
56157   input_path="$new_path"
56158   # Check if we need to convert this using DOS-style short mode. If the path
56159   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56160   # take no chances and rewrite it.
56161   # Note: m4 eats our [], so we need to use [ and ] instead.
56162   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56163   if test "x$has_forbidden_chars" != x; then
56164     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56165     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56166   fi
56167 
56168 
56169   windows_path="$new_path"
56170   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56171     unix_path=`$CYGPATH -u "$windows_path"`
56172     new_path="$unix_path"
56173   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56174     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56175     new_path="$unix_path"
56176   fi
56177 
56178   if test "x$path" != "x$new_path"; then
56179     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56180     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56181 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56182   fi
56183 
56184   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56185   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56186 
56187     else
56188       # We're on a unix platform. Hooray! :)
56189       path="$POTENTIAL_FREETYPE_LIB_PATH"
56190       has_space=`$ECHO "$path" | $GREP " "`
56191       if test "x$has_space" != x; then
56192         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56193 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56194         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56195       fi
56196 
56197       # Use eval to expand a potential ~
56198       eval path="$path"
56199       if test ! -f "$path" && test ! -d "$path"; then
56200         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56201       fi
56202 
56203       if test -d "$path"; then
56204         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56205       else
56206         dir="`$DIRNAME "$path"`"
56207         base="`$BASENAME "$path"`"
56208         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56209       fi
56210     fi
56211   fi
56212 
56213 
56214     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56215     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56216 $as_echo_n "checking for freetype includes... " >&6; }
56217     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56218 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56219     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56220     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56221 $as_echo_n "checking for freetype libraries... " >&6; }
56222     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56223 $as_echo "$FREETYPE_LIB_PATH" >&6; }
56224   fi
56225 
56226           if test "x$FOUND_FREETYPE" != xyes; then
56227             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
56228 
56229   windows_path="$FREETYPE_BASE_DIR"
56230   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56231     unix_path=`$CYGPATH -u "$windows_path"`
56232     FREETYPE_BASE_DIR="$unix_path"
56233   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56234     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56235     FREETYPE_BASE_DIR="$unix_path"
56236   fi
56237 
56238 
56239   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56240   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
56241   METHOD="well-known location"
56242 
56243   # Let's start with an optimistic view of the world :-)
56244   FOUND_FREETYPE=yes
56245 
56246   # First look for the canonical freetype main include file ft2build.h.
56247   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56248     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56249     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56250     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56251       # Fail.
56252       FOUND_FREETYPE=no
56253     fi
56254   fi
56255 
56256   if test "x$FOUND_FREETYPE" = xyes; then
56257     # Include file found, let's continue the sanity check.
56258     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56259 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56260 
56261     # Reset to default value
56262     FREETYPE_BASE_NAME=freetype
56263     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56264     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56265       if test "x$OPENJDK_TARGET_OS" = xmacosx \
56266           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56267         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56268         # for the .6 version explicitly.
56269         FREETYPE_BASE_NAME=freetype.6
56270         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56271         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56272 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56273       else
56274         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56275 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56276         FOUND_FREETYPE=no
56277       fi
56278     else
56279       if test "x$OPENJDK_TARGET_OS" = xwindows; then
56280         # On Windows, we will need both .lib and .dll file.
56281         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56282           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56283 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56284           FOUND_FREETYPE=no
56285         fi
56286       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56287           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56288         # Found lib in isa dir, use that instead.
56289         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56290         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56291 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56292       fi
56293     fi
56294   fi
56295 
56296   if test "x$FOUND_FREETYPE" = xyes; then
56297 
56298   # Only process if variable expands to non-empty
56299 
56300   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56301     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56302 
56303   # Input might be given as Windows format, start by converting to
56304   # unix format.
56305   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56306   new_path=`$CYGPATH -u "$path"`
56307 
56308   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56309   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56310   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56311   # "foo.exe" is OK but "foo" is an error.
56312   #
56313   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56314   # It is also a way to make sure we got the proper file name for the real test later on.
56315   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56316   if test "x$test_shortpath" = x; then
56317     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56318 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56319     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56320   fi
56321 
56322   # Call helper function which possibly converts this using DOS-style short mode.
56323   # If so, the updated path is stored in $new_path.
56324 
56325   input_path="$new_path"
56326   # Check if we need to convert this using DOS-style short mode. If the path
56327   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56328   # take no chances and rewrite it.
56329   # Note: m4 eats our [], so we need to use [ and ] instead.
56330   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56331   if test "x$has_forbidden_chars" != x; then
56332     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56333     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56334     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56335     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56336       # Going to short mode and back again did indeed matter. Since short mode is
56337       # case insensitive, let's make it lowercase to improve readability.
56338       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56339       # Now convert it back to Unix-style (cygpath)
56340       input_path=`$CYGPATH -u "$shortmode_path"`
56341       new_path="$input_path"
56342     fi
56343   fi
56344 
56345   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56346   if test "x$test_cygdrive_prefix" = x; then
56347     # As a simple fix, exclude /usr/bin since it's not a real path.
56348     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56349       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56350       # a path prefixed by /cygdrive for fixpath to work.
56351       new_path="$CYGWIN_ROOT_PATH$input_path"
56352     fi
56353   fi
56354 
56355 
56356   if test "x$path" != "x$new_path"; then
56357     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56358     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56359 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56360   fi
56361 
56362     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56363 
56364   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56365   has_colon=`$ECHO $path | $GREP ^.:`
56366   new_path="$path"
56367   if test "x$has_colon" = x; then
56368     # Not in mixed or Windows style, start by that.
56369     new_path=`cmd //c echo $path`
56370   fi
56371 
56372 
56373   input_path="$new_path"
56374   # Check if we need to convert this using DOS-style short mode. If the path
56375   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56376   # take no chances and rewrite it.
56377   # Note: m4 eats our [], so we need to use [ and ] instead.
56378   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56379   if test "x$has_forbidden_chars" != x; then
56380     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56381     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56382   fi
56383 
56384 
56385   windows_path="$new_path"
56386   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56387     unix_path=`$CYGPATH -u "$windows_path"`
56388     new_path="$unix_path"
56389   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56390     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56391     new_path="$unix_path"
56392   fi
56393 
56394   if test "x$path" != "x$new_path"; then
56395     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56396     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56397 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56398   fi
56399 
56400   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56401   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56402 
56403     else
56404       # We're on a unix platform. Hooray! :)
56405       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56406       has_space=`$ECHO "$path" | $GREP " "`
56407       if test "x$has_space" != x; then
56408         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56409 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56410         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56411       fi
56412 
56413       # Use eval to expand a potential ~
56414       eval path="$path"
56415       if test ! -f "$path" && test ! -d "$path"; then
56416         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56417       fi
56418 
56419       if test -d "$path"; then
56420         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56421       else
56422         dir="`$DIRNAME "$path"`"
56423         base="`$BASENAME "$path"`"
56424         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56425       fi
56426     fi
56427   fi
56428 
56429 
56430   # Only process if variable expands to non-empty
56431 
56432   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56433     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56434 
56435   # Input might be given as Windows format, start by converting to
56436   # unix format.
56437   path="$POTENTIAL_FREETYPE_LIB_PATH"
56438   new_path=`$CYGPATH -u "$path"`
56439 
56440   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56441   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56442   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56443   # "foo.exe" is OK but "foo" is an error.
56444   #
56445   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56446   # It is also a way to make sure we got the proper file name for the real test later on.
56447   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56448   if test "x$test_shortpath" = x; then
56449     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56450 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56451     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56452   fi
56453 
56454   # Call helper function which possibly converts this using DOS-style short mode.
56455   # If so, the updated path is stored in $new_path.
56456 
56457   input_path="$new_path"
56458   # Check if we need to convert this using DOS-style short mode. If the path
56459   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56460   # take no chances and rewrite it.
56461   # Note: m4 eats our [], so we need to use [ and ] instead.
56462   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56463   if test "x$has_forbidden_chars" != x; then
56464     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56465     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56466     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56467     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56468       # Going to short mode and back again did indeed matter. Since short mode is
56469       # case insensitive, let's make it lowercase to improve readability.
56470       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56471       # Now convert it back to Unix-style (cygpath)
56472       input_path=`$CYGPATH -u "$shortmode_path"`
56473       new_path="$input_path"
56474     fi
56475   fi
56476 
56477   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56478   if test "x$test_cygdrive_prefix" = x; then
56479     # As a simple fix, exclude /usr/bin since it's not a real path.
56480     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56481       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56482       # a path prefixed by /cygdrive for fixpath to work.
56483       new_path="$CYGWIN_ROOT_PATH$input_path"
56484     fi
56485   fi
56486 
56487 
56488   if test "x$path" != "x$new_path"; then
56489     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56490     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56491 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56492   fi
56493 
56494     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56495 
56496   path="$POTENTIAL_FREETYPE_LIB_PATH"
56497   has_colon=`$ECHO $path | $GREP ^.:`
56498   new_path="$path"
56499   if test "x$has_colon" = x; then
56500     # Not in mixed or Windows style, start by that.
56501     new_path=`cmd //c echo $path`
56502   fi
56503 
56504 
56505   input_path="$new_path"
56506   # Check if we need to convert this using DOS-style short mode. If the path
56507   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56508   # take no chances and rewrite it.
56509   # Note: m4 eats our [], so we need to use [ and ] instead.
56510   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56511   if test "x$has_forbidden_chars" != x; then
56512     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56513     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56514   fi
56515 
56516 
56517   windows_path="$new_path"
56518   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56519     unix_path=`$CYGPATH -u "$windows_path"`
56520     new_path="$unix_path"
56521   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56522     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56523     new_path="$unix_path"
56524   fi
56525 
56526   if test "x$path" != "x$new_path"; then
56527     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56528     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56529 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56530   fi
56531 
56532   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56533   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56534 
56535     else
56536       # We're on a unix platform. Hooray! :)
56537       path="$POTENTIAL_FREETYPE_LIB_PATH"
56538       has_space=`$ECHO "$path" | $GREP " "`
56539       if test "x$has_space" != x; then
56540         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56541 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56542         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56543       fi
56544 
56545       # Use eval to expand a potential ~
56546       eval path="$path"
56547       if test ! -f "$path" && test ! -d "$path"; then
56548         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56549       fi
56550 
56551       if test -d "$path"; then
56552         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56553       else
56554         dir="`$DIRNAME "$path"`"
56555         base="`$BASENAME "$path"`"
56556         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56557       fi
56558     fi
56559   fi
56560 
56561 
56562     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56563     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56564 $as_echo_n "checking for freetype includes... " >&6; }
56565     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56566 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56567     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56568     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56569 $as_echo_n "checking for freetype libraries... " >&6; }
56570     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56571 $as_echo "$FREETYPE_LIB_PATH" >&6; }
56572   fi
56573 
56574           fi
56575           if test "x$FOUND_FREETYPE" != xyes; then
56576             FREETYPE_BASE_DIR="$HOME/freetype"
56577 
56578   windows_path="$FREETYPE_BASE_DIR"
56579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56580     unix_path=`$CYGPATH -u "$windows_path"`
56581     FREETYPE_BASE_DIR="$unix_path"
56582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56583     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56584     FREETYPE_BASE_DIR="$unix_path"
56585   fi
56586 
56587             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56588 
56589   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56590   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
56591   METHOD="well-known location"
56592 
56593   # Let's start with an optimistic view of the world :-)
56594   FOUND_FREETYPE=yes
56595 
56596   # First look for the canonical freetype main include file ft2build.h.
56597   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56598     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56599     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56600     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56601       # Fail.
56602       FOUND_FREETYPE=no
56603     fi
56604   fi
56605 
56606   if test "x$FOUND_FREETYPE" = xyes; then
56607     # Include file found, let's continue the sanity check.
56608     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56609 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56610 
56611     # Reset to default value
56612     FREETYPE_BASE_NAME=freetype
56613     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56614     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56615       if test "x$OPENJDK_TARGET_OS" = xmacosx \
56616           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56617         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56618         # for the .6 version explicitly.
56619         FREETYPE_BASE_NAME=freetype.6
56620         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56621         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56622 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56623       else
56624         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56625 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56626         FOUND_FREETYPE=no
56627       fi
56628     else
56629       if test "x$OPENJDK_TARGET_OS" = xwindows; then
56630         # On Windows, we will need both .lib and .dll file.
56631         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56632           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56633 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56634           FOUND_FREETYPE=no
56635         fi
56636       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56637           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56638         # Found lib in isa dir, use that instead.
56639         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56640         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56641 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56642       fi
56643     fi
56644   fi
56645 
56646   if test "x$FOUND_FREETYPE" = xyes; then
56647 
56648   # Only process if variable expands to non-empty
56649 
56650   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56651     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56652 
56653   # Input might be given as Windows format, start by converting to
56654   # unix format.
56655   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56656   new_path=`$CYGPATH -u "$path"`
56657 
56658   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56659   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56660   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56661   # "foo.exe" is OK but "foo" is an error.
56662   #
56663   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56664   # It is also a way to make sure we got the proper file name for the real test later on.
56665   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56666   if test "x$test_shortpath" = x; then
56667     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56668 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56669     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56670   fi
56671 
56672   # Call helper function which possibly converts this using DOS-style short mode.
56673   # If so, the updated path is stored in $new_path.
56674 
56675   input_path="$new_path"
56676   # Check if we need to convert this using DOS-style short mode. If the path
56677   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56678   # take no chances and rewrite it.
56679   # Note: m4 eats our [], so we need to use [ and ] instead.
56680   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56681   if test "x$has_forbidden_chars" != x; then
56682     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56683     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56684     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56685     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56686       # Going to short mode and back again did indeed matter. Since short mode is
56687       # case insensitive, let's make it lowercase to improve readability.
56688       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56689       # Now convert it back to Unix-style (cygpath)
56690       input_path=`$CYGPATH -u "$shortmode_path"`
56691       new_path="$input_path"
56692     fi
56693   fi
56694 
56695   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56696   if test "x$test_cygdrive_prefix" = x; then
56697     # As a simple fix, exclude /usr/bin since it's not a real path.
56698     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56699       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56700       # a path prefixed by /cygdrive for fixpath to work.
56701       new_path="$CYGWIN_ROOT_PATH$input_path"
56702     fi
56703   fi
56704 
56705 
56706   if test "x$path" != "x$new_path"; then
56707     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56708     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56709 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56710   fi
56711 
56712     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56713 
56714   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56715   has_colon=`$ECHO $path | $GREP ^.:`
56716   new_path="$path"
56717   if test "x$has_colon" = x; then
56718     # Not in mixed or Windows style, start by that.
56719     new_path=`cmd //c echo $path`
56720   fi
56721 
56722 
56723   input_path="$new_path"
56724   # Check if we need to convert this using DOS-style short mode. If the path
56725   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56726   # take no chances and rewrite it.
56727   # Note: m4 eats our [], so we need to use [ and ] instead.
56728   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56729   if test "x$has_forbidden_chars" != x; then
56730     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56731     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56732   fi
56733 
56734 
56735   windows_path="$new_path"
56736   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56737     unix_path=`$CYGPATH -u "$windows_path"`
56738     new_path="$unix_path"
56739   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56740     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56741     new_path="$unix_path"
56742   fi
56743 
56744   if test "x$path" != "x$new_path"; then
56745     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56746     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56747 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56748   fi
56749 
56750   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56751   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56752 
56753     else
56754       # We're on a unix platform. Hooray! :)
56755       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56756       has_space=`$ECHO "$path" | $GREP " "`
56757       if test "x$has_space" != x; then
56758         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56759 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56760         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56761       fi
56762 
56763       # Use eval to expand a potential ~
56764       eval path="$path"
56765       if test ! -f "$path" && test ! -d "$path"; then
56766         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56767       fi
56768 
56769       if test -d "$path"; then
56770         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56771       else
56772         dir="`$DIRNAME "$path"`"
56773         base="`$BASENAME "$path"`"
56774         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56775       fi
56776     fi
56777   fi
56778 
56779 
56780   # Only process if variable expands to non-empty
56781 
56782   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56783     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56784 
56785   # Input might be given as Windows format, start by converting to
56786   # unix format.
56787   path="$POTENTIAL_FREETYPE_LIB_PATH"
56788   new_path=`$CYGPATH -u "$path"`
56789 
56790   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56791   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56792   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56793   # "foo.exe" is OK but "foo" is an error.
56794   #
56795   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56796   # It is also a way to make sure we got the proper file name for the real test later on.
56797   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56798   if test "x$test_shortpath" = x; then
56799     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56800 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56801     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56802   fi
56803 
56804   # Call helper function which possibly converts this using DOS-style short mode.
56805   # If so, the updated path is stored in $new_path.
56806 
56807   input_path="$new_path"
56808   # Check if we need to convert this using DOS-style short mode. If the path
56809   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56810   # take no chances and rewrite it.
56811   # Note: m4 eats our [], so we need to use [ and ] instead.
56812   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56813   if test "x$has_forbidden_chars" != x; then
56814     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56815     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56816     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56817     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56818       # Going to short mode and back again did indeed matter. Since short mode is
56819       # case insensitive, let's make it lowercase to improve readability.
56820       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56821       # Now convert it back to Unix-style (cygpath)
56822       input_path=`$CYGPATH -u "$shortmode_path"`
56823       new_path="$input_path"
56824     fi
56825   fi
56826 
56827   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56828   if test "x$test_cygdrive_prefix" = x; then
56829     # As a simple fix, exclude /usr/bin since it's not a real path.
56830     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56831       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56832       # a path prefixed by /cygdrive for fixpath to work.
56833       new_path="$CYGWIN_ROOT_PATH$input_path"
56834     fi
56835   fi
56836 
56837 
56838   if test "x$path" != "x$new_path"; then
56839     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56840     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56841 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56842   fi
56843 
56844     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56845 
56846   path="$POTENTIAL_FREETYPE_LIB_PATH"
56847   has_colon=`$ECHO $path | $GREP ^.:`
56848   new_path="$path"
56849   if test "x$has_colon" = x; then
56850     # Not in mixed or Windows style, start by that.
56851     new_path=`cmd //c echo $path`
56852   fi
56853 
56854 
56855   input_path="$new_path"
56856   # Check if we need to convert this using DOS-style short mode. If the path
56857   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56858   # take no chances and rewrite it.
56859   # Note: m4 eats our [], so we need to use [ and ] instead.
56860   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56861   if test "x$has_forbidden_chars" != x; then
56862     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56863     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56864   fi
56865 
56866 
56867   windows_path="$new_path"
56868   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56869     unix_path=`$CYGPATH -u "$windows_path"`
56870     new_path="$unix_path"
56871   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56872     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56873     new_path="$unix_path"
56874   fi
56875 
56876   if test "x$path" != "x$new_path"; then
56877     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56878     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56879 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56880   fi
56881 
56882   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56883   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56884 
56885     else
56886       # We're on a unix platform. Hooray! :)
56887       path="$POTENTIAL_FREETYPE_LIB_PATH"
56888       has_space=`$ECHO "$path" | $GREP " "`
56889       if test "x$has_space" != x; then
56890         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56891 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56892         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56893       fi
56894 
56895       # Use eval to expand a potential ~
56896       eval path="$path"
56897       if test ! -f "$path" && test ! -d "$path"; then
56898         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56899       fi
56900 
56901       if test -d "$path"; then
56902         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56903       else
56904         dir="`$DIRNAME "$path"`"
56905         base="`$BASENAME "$path"`"
56906         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56907       fi
56908     fi
56909   fi
56910 
56911 
56912     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56913     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56914 $as_echo_n "checking for freetype includes... " >&6; }
56915     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56916 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56917     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56918     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56919 $as_echo_n "checking for freetype libraries... " >&6; }
56920     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56921 $as_echo "$FREETYPE_LIB_PATH" >&6; }
56922   fi
56923 
56924             else
56925 
56926   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56927   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
56928   METHOD="well-known location"
56929 
56930   # Let's start with an optimistic view of the world :-)
56931   FOUND_FREETYPE=yes
56932 
56933   # First look for the canonical freetype main include file ft2build.h.
56934   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56935     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56936     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56937     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56938       # Fail.
56939       FOUND_FREETYPE=no
56940     fi
56941   fi
56942 
56943   if test "x$FOUND_FREETYPE" = xyes; then
56944     # Include file found, let's continue the sanity check.
56945     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56946 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56947 
56948     # Reset to default value
56949     FREETYPE_BASE_NAME=freetype
56950     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56951     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56952       if test "x$OPENJDK_TARGET_OS" = xmacosx \
56953           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56954         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56955         # for the .6 version explicitly.
56956         FREETYPE_BASE_NAME=freetype.6
56957         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56958         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56959 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56960       else
56961         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56962 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56963         FOUND_FREETYPE=no
56964       fi
56965     else
56966       if test "x$OPENJDK_TARGET_OS" = xwindows; then
56967         # On Windows, we will need both .lib and .dll file.
56968         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56969           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56970 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56971           FOUND_FREETYPE=no
56972         fi
56973       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56974           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56975         # Found lib in isa dir, use that instead.
56976         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56977         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56978 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56979       fi
56980     fi
56981   fi
56982 
56983   if test "x$FOUND_FREETYPE" = xyes; then
56984 
56985   # Only process if variable expands to non-empty
56986 
56987   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56988     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56989 
56990   # Input might be given as Windows format, start by converting to
56991   # unix format.
56992   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56993   new_path=`$CYGPATH -u "$path"`
56994 
56995   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56996   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56997   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56998   # "foo.exe" is OK but "foo" is an error.
56999   #
57000   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57001   # It is also a way to make sure we got the proper file name for the real test later on.
57002   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57003   if test "x$test_shortpath" = x; then
57004     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57005 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57006     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57007   fi
57008 
57009   # Call helper function which possibly converts this using DOS-style short mode.
57010   # If so, the updated path is stored in $new_path.
57011 
57012   input_path="$new_path"
57013   # Check if we need to convert this using DOS-style short mode. If the path
57014   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57015   # take no chances and rewrite it.
57016   # Note: m4 eats our [], so we need to use [ and ] instead.
57017   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57018   if test "x$has_forbidden_chars" != x; then
57019     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57020     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57021     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57022     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57023       # Going to short mode and back again did indeed matter. Since short mode is
57024       # case insensitive, let's make it lowercase to improve readability.
57025       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57026       # Now convert it back to Unix-style (cygpath)
57027       input_path=`$CYGPATH -u "$shortmode_path"`
57028       new_path="$input_path"
57029     fi
57030   fi
57031 
57032   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57033   if test "x$test_cygdrive_prefix" = x; then
57034     # As a simple fix, exclude /usr/bin since it's not a real path.
57035     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57036       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57037       # a path prefixed by /cygdrive for fixpath to work.
57038       new_path="$CYGWIN_ROOT_PATH$input_path"
57039     fi
57040   fi
57041 
57042 
57043   if test "x$path" != "x$new_path"; then
57044     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57045     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57046 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57047   fi
57048 
57049     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57050 
57051   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57052   has_colon=`$ECHO $path | $GREP ^.:`
57053   new_path="$path"
57054   if test "x$has_colon" = x; then
57055     # Not in mixed or Windows style, start by that.
57056     new_path=`cmd //c echo $path`
57057   fi
57058 
57059 
57060   input_path="$new_path"
57061   # Check if we need to convert this using DOS-style short mode. If the path
57062   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57063   # take no chances and rewrite it.
57064   # Note: m4 eats our [], so we need to use [ and ] instead.
57065   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57066   if test "x$has_forbidden_chars" != x; then
57067     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57068     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57069   fi
57070 
57071 
57072   windows_path="$new_path"
57073   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57074     unix_path=`$CYGPATH -u "$windows_path"`
57075     new_path="$unix_path"
57076   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57077     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57078     new_path="$unix_path"
57079   fi
57080 
57081   if test "x$path" != "x$new_path"; then
57082     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57083     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57084 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57085   fi
57086 
57087   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57088   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57089 
57090     else
57091       # We're on a unix platform. Hooray! :)
57092       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57093       has_space=`$ECHO "$path" | $GREP " "`
57094       if test "x$has_space" != x; then
57095         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57096 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57097         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57098       fi
57099 
57100       # Use eval to expand a potential ~
57101       eval path="$path"
57102       if test ! -f "$path" && test ! -d "$path"; then
57103         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57104       fi
57105 
57106       if test -d "$path"; then
57107         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57108       else
57109         dir="`$DIRNAME "$path"`"
57110         base="`$BASENAME "$path"`"
57111         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57112       fi
57113     fi
57114   fi
57115 
57116 
57117   # Only process if variable expands to non-empty
57118 
57119   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57120     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57121 
57122   # Input might be given as Windows format, start by converting to
57123   # unix format.
57124   path="$POTENTIAL_FREETYPE_LIB_PATH"
57125   new_path=`$CYGPATH -u "$path"`
57126 
57127   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57128   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57129   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57130   # "foo.exe" is OK but "foo" is an error.
57131   #
57132   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57133   # It is also a way to make sure we got the proper file name for the real test later on.
57134   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57135   if test "x$test_shortpath" = x; then
57136     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57137 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57138     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57139   fi
57140 
57141   # Call helper function which possibly converts this using DOS-style short mode.
57142   # If so, the updated path is stored in $new_path.
57143 
57144   input_path="$new_path"
57145   # Check if we need to convert this using DOS-style short mode. If the path
57146   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57147   # take no chances and rewrite it.
57148   # Note: m4 eats our [], so we need to use [ and ] instead.
57149   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57150   if test "x$has_forbidden_chars" != x; then
57151     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57152     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57153     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57154     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57155       # Going to short mode and back again did indeed matter. Since short mode is
57156       # case insensitive, let's make it lowercase to improve readability.
57157       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57158       # Now convert it back to Unix-style (cygpath)
57159       input_path=`$CYGPATH -u "$shortmode_path"`
57160       new_path="$input_path"
57161     fi
57162   fi
57163 
57164   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57165   if test "x$test_cygdrive_prefix" = x; then
57166     # As a simple fix, exclude /usr/bin since it's not a real path.
57167     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57168       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57169       # a path prefixed by /cygdrive for fixpath to work.
57170       new_path="$CYGWIN_ROOT_PATH$input_path"
57171     fi
57172   fi
57173 
57174 
57175   if test "x$path" != "x$new_path"; then
57176     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57177     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57178 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57179   fi
57180 
57181     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57182 
57183   path="$POTENTIAL_FREETYPE_LIB_PATH"
57184   has_colon=`$ECHO $path | $GREP ^.:`
57185   new_path="$path"
57186   if test "x$has_colon" = x; then
57187     # Not in mixed or Windows style, start by that.
57188     new_path=`cmd //c echo $path`
57189   fi
57190 
57191 
57192   input_path="$new_path"
57193   # Check if we need to convert this using DOS-style short mode. If the path
57194   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57195   # take no chances and rewrite it.
57196   # Note: m4 eats our [], so we need to use [ and ] instead.
57197   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57198   if test "x$has_forbidden_chars" != x; then
57199     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57200     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57201   fi
57202 
57203 
57204   windows_path="$new_path"
57205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57206     unix_path=`$CYGPATH -u "$windows_path"`
57207     new_path="$unix_path"
57208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57209     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57210     new_path="$unix_path"
57211   fi
57212 
57213   if test "x$path" != "x$new_path"; then
57214     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57215     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57216 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57217   fi
57218 
57219   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57220   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57221 
57222     else
57223       # We're on a unix platform. Hooray! :)
57224       path="$POTENTIAL_FREETYPE_LIB_PATH"
57225       has_space=`$ECHO "$path" | $GREP " "`
57226       if test "x$has_space" != x; then
57227         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57228 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57229         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57230       fi
57231 
57232       # Use eval to expand a potential ~
57233       eval path="$path"
57234       if test ! -f "$path" && test ! -d "$path"; then
57235         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57236       fi
57237 
57238       if test -d "$path"; then
57239         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57240       else
57241         dir="`$DIRNAME "$path"`"
57242         base="`$BASENAME "$path"`"
57243         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57244       fi
57245     fi
57246   fi
57247 
57248 
57249     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57250     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57251 $as_echo_n "checking for freetype includes... " >&6; }
57252     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57253 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57254     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57255     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57256 $as_echo_n "checking for freetype libraries... " >&6; }
57257     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57258 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57259   fi
57260 
57261             fi
57262             if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
57263                 && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
57264               # Source is available, as a last resort try to build freetype in default location
57265 
57266   FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
57267   BUILD_FREETYPE=yes
57268 
57269   # Check if the freetype sources are acessible..
57270   if ! test -d $FREETYPE_SRC_PATH; then
57271     { $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
57272 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57273     BUILD_FREETYPE=no
57274   fi
57275   # ..and contain a vc2010 project file
57276   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57277   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57278     { $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
57279 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57280     BUILD_FREETYPE=no
57281   fi
57282   # Now check if configure found a version of 'msbuild.exe'
57283   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57284     { $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
57285 $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;}
57286     BUILD_FREETYPE=no
57287   fi
57288 
57289   # Ready to go..
57290   if test "x$BUILD_FREETYPE" = xyes; then
57291     # msbuild requires trailing slashes for output directories
57292     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57293     freetype_lib_path_unix="$freetype_lib_path"
57294     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57295 
57296   unix_path="$vcxproj_path"
57297   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57298     windows_path=`$CYGPATH -m "$unix_path"`
57299     vcxproj_path="$windows_path"
57300   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57301     windows_path=`cmd //c echo $unix_path`
57302     vcxproj_path="$windows_path"
57303   fi
57304 
57305 
57306   unix_path="$freetype_lib_path"
57307   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57308     windows_path=`$CYGPATH -m "$unix_path"`
57309     freetype_lib_path="$windows_path"
57310   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57311     windows_path=`cmd //c echo $unix_path`
57312     freetype_lib_path="$windows_path"
57313   fi
57314 
57315 
57316   unix_path="$freetype_obj_path"
57317   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57318     windows_path=`$CYGPATH -m "$unix_path"`
57319     freetype_obj_path="$windows_path"
57320   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57321     windows_path=`cmd //c echo $unix_path`
57322     freetype_obj_path="$windows_path"
57323   fi
57324 
57325     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57326       freetype_platform=x64
57327     else
57328       freetype_platform=win32
57329     fi
57330 
57331     # The original freetype project file is for VS 2010 (i.e. 'v100'),
57332     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57333     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57334     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57335     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57336 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57337 
57338     # First we try to build the freetype.dll
57339     $ECHO -e "@echo off\n"\
57340         "$MSBUILD $vcxproj_path "\
57341         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57342         "/p:Configuration=\"Release Multithreaded\" "\
57343         "/p:Platform=$freetype_platform "\
57344         "/p:ConfigurationType=DynamicLibrary "\
57345         "/p:TargetName=freetype "\
57346         "/p:OutDir=\"$freetype_lib_path\" "\
57347         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57348     cmd /c freetype.bat
57349 
57350     if test -s "$freetype_lib_path_unix/freetype.dll"; then
57351       # If that succeeds we also build freetype.lib
57352       $ECHO -e "@echo off\n"\
57353           "$MSBUILD $vcxproj_path "\
57354           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57355           "/p:Configuration=\"Release Multithreaded\" "\
57356           "/p:Platform=$freetype_platform "\
57357           "/p:ConfigurationType=StaticLibrary "\
57358           "/p:TargetName=freetype "\
57359           "/p:OutDir=\"$freetype_lib_path\" "\
57360           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57361       cmd /c freetype.bat
57362 
57363       if test -s "$freetype_lib_path_unix/freetype.lib"; then
57364         # Once we build both, lib and dll, set freetype lib and include path appropriately
57365         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57366         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57367         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57368 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57369       else
57370         BUILD_FREETYPE=no
57371       fi
57372     else
57373       BUILD_FREETYPE=no
57374     fi
57375   fi
57376 
57377               if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57378 
57379   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57380   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
57381   METHOD="well-known location"
57382 
57383   # Let's start with an optimistic view of the world :-)
57384   FOUND_FREETYPE=yes
57385 
57386   # First look for the canonical freetype main include file ft2build.h.
57387   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57388     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57389     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57390     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57391       # Fail.
57392       FOUND_FREETYPE=no
57393     fi
57394   fi
57395 
57396   if test "x$FOUND_FREETYPE" = xyes; then
57397     # Include file found, let's continue the sanity check.
57398     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57399 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57400 
57401     # Reset to default value
57402     FREETYPE_BASE_NAME=freetype
57403     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57404     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57405       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57406           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57407         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57408         # for the .6 version explicitly.
57409         FREETYPE_BASE_NAME=freetype.6
57410         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57411         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57412 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57413       else
57414         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57415 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57416         FOUND_FREETYPE=no
57417       fi
57418     else
57419       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57420         # On Windows, we will need both .lib and .dll file.
57421         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57422           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57423 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57424           FOUND_FREETYPE=no
57425         fi
57426       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57427           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57428         # Found lib in isa dir, use that instead.
57429         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57430         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57431 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57432       fi
57433     fi
57434   fi
57435 
57436   if test "x$FOUND_FREETYPE" = xyes; then
57437 
57438   # Only process if variable expands to non-empty
57439 
57440   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57441     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57442 
57443   # Input might be given as Windows format, start by converting to
57444   # unix format.
57445   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57446   new_path=`$CYGPATH -u "$path"`
57447 
57448   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57449   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57450   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57451   # "foo.exe" is OK but "foo" is an error.
57452   #
57453   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57454   # It is also a way to make sure we got the proper file name for the real test later on.
57455   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57456   if test "x$test_shortpath" = x; then
57457     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57458 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57459     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57460   fi
57461 
57462   # Call helper function which possibly converts this using DOS-style short mode.
57463   # If so, the updated path is stored in $new_path.
57464 
57465   input_path="$new_path"
57466   # Check if we need to convert this using DOS-style short mode. If the path
57467   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57468   # take no chances and rewrite it.
57469   # Note: m4 eats our [], so we need to use [ and ] instead.
57470   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57471   if test "x$has_forbidden_chars" != x; then
57472     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57473     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57474     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57475     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57476       # Going to short mode and back again did indeed matter. Since short mode is
57477       # case insensitive, let's make it lowercase to improve readability.
57478       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57479       # Now convert it back to Unix-style (cygpath)
57480       input_path=`$CYGPATH -u "$shortmode_path"`
57481       new_path="$input_path"
57482     fi
57483   fi
57484 
57485   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57486   if test "x$test_cygdrive_prefix" = x; then
57487     # As a simple fix, exclude /usr/bin since it's not a real path.
57488     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57489       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57490       # a path prefixed by /cygdrive for fixpath to work.
57491       new_path="$CYGWIN_ROOT_PATH$input_path"
57492     fi
57493   fi
57494 
57495 
57496   if test "x$path" != "x$new_path"; then
57497     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57498     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57499 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57500   fi
57501 
57502     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57503 
57504   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57505   has_colon=`$ECHO $path | $GREP ^.:`
57506   new_path="$path"
57507   if test "x$has_colon" = x; then
57508     # Not in mixed or Windows style, start by that.
57509     new_path=`cmd //c echo $path`
57510   fi
57511 
57512 
57513   input_path="$new_path"
57514   # Check if we need to convert this using DOS-style short mode. If the path
57515   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57516   # take no chances and rewrite it.
57517   # Note: m4 eats our [], so we need to use [ and ] instead.
57518   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57519   if test "x$has_forbidden_chars" != x; then
57520     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57521     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57522   fi
57523 
57524 
57525   windows_path="$new_path"
57526   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57527     unix_path=`$CYGPATH -u "$windows_path"`
57528     new_path="$unix_path"
57529   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57530     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57531     new_path="$unix_path"
57532   fi
57533 
57534   if test "x$path" != "x$new_path"; then
57535     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57536     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57537 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57538   fi
57539 
57540   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57541   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57542 
57543     else
57544       # We're on a unix platform. Hooray! :)
57545       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57546       has_space=`$ECHO "$path" | $GREP " "`
57547       if test "x$has_space" != x; then
57548         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57549 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57550         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57551       fi
57552 
57553       # Use eval to expand a potential ~
57554       eval path="$path"
57555       if test ! -f "$path" && test ! -d "$path"; then
57556         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57557       fi
57558 
57559       if test -d "$path"; then
57560         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57561       else
57562         dir="`$DIRNAME "$path"`"
57563         base="`$BASENAME "$path"`"
57564         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57565       fi
57566     fi
57567   fi
57568 
57569 
57570   # Only process if variable expands to non-empty
57571 
57572   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57573     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57574 
57575   # Input might be given as Windows format, start by converting to
57576   # unix format.
57577   path="$POTENTIAL_FREETYPE_LIB_PATH"
57578   new_path=`$CYGPATH -u "$path"`
57579 
57580   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57581   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57582   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57583   # "foo.exe" is OK but "foo" is an error.
57584   #
57585   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57586   # It is also a way to make sure we got the proper file name for the real test later on.
57587   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57588   if test "x$test_shortpath" = x; then
57589     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57590 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57591     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57592   fi
57593 
57594   # Call helper function which possibly converts this using DOS-style short mode.
57595   # If so, the updated path is stored in $new_path.
57596 
57597   input_path="$new_path"
57598   # Check if we need to convert this using DOS-style short mode. If the path
57599   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57600   # take no chances and rewrite it.
57601   # Note: m4 eats our [], so we need to use [ and ] instead.
57602   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57603   if test "x$has_forbidden_chars" != x; then
57604     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57605     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57606     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57607     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57608       # Going to short mode and back again did indeed matter. Since short mode is
57609       # case insensitive, let's make it lowercase to improve readability.
57610       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57611       # Now convert it back to Unix-style (cygpath)
57612       input_path=`$CYGPATH -u "$shortmode_path"`
57613       new_path="$input_path"
57614     fi
57615   fi
57616 
57617   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57618   if test "x$test_cygdrive_prefix" = x; then
57619     # As a simple fix, exclude /usr/bin since it's not a real path.
57620     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57621       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57622       # a path prefixed by /cygdrive for fixpath to work.
57623       new_path="$CYGWIN_ROOT_PATH$input_path"
57624     fi
57625   fi
57626 
57627 
57628   if test "x$path" != "x$new_path"; then
57629     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57630     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57631 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57632   fi
57633 
57634     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57635 
57636   path="$POTENTIAL_FREETYPE_LIB_PATH"
57637   has_colon=`$ECHO $path | $GREP ^.:`
57638   new_path="$path"
57639   if test "x$has_colon" = x; then
57640     # Not in mixed or Windows style, start by that.
57641     new_path=`cmd //c echo $path`
57642   fi
57643 
57644 
57645   input_path="$new_path"
57646   # Check if we need to convert this using DOS-style short mode. If the path
57647   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57648   # take no chances and rewrite it.
57649   # Note: m4 eats our [], so we need to use [ and ] instead.
57650   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57651   if test "x$has_forbidden_chars" != x; then
57652     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57653     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57654   fi
57655 
57656 
57657   windows_path="$new_path"
57658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57659     unix_path=`$CYGPATH -u "$windows_path"`
57660     new_path="$unix_path"
57661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57662     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57663     new_path="$unix_path"
57664   fi
57665 
57666   if test "x$path" != "x$new_path"; then
57667     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57668     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57669 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57670   fi
57671 
57672   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57673   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57674 
57675     else
57676       # We're on a unix platform. Hooray! :)
57677       path="$POTENTIAL_FREETYPE_LIB_PATH"
57678       has_space=`$ECHO "$path" | $GREP " "`
57679       if test "x$has_space" != x; then
57680         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57681 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57682         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57683       fi
57684 
57685       # Use eval to expand a potential ~
57686       eval path="$path"
57687       if test ! -f "$path" && test ! -d "$path"; then
57688         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57689       fi
57690 
57691       if test -d "$path"; then
57692         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57693       else
57694         dir="`$DIRNAME "$path"`"
57695         base="`$BASENAME "$path"`"
57696         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57697       fi
57698     fi
57699   fi
57700 
57701 
57702     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57703     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57704 $as_echo_n "checking for freetype includes... " >&6; }
57705     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57706 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57707     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57708     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57709 $as_echo_n "checking for freetype libraries... " >&6; }
57710     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57711 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57712   fi
57713 
57714               else
57715 
57716   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57717   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
57718   METHOD="well-known location"
57719 
57720   # Let's start with an optimistic view of the world :-)
57721   FOUND_FREETYPE=yes
57722 
57723   # First look for the canonical freetype main include file ft2build.h.
57724   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57725     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57726     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57727     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57728       # Fail.
57729       FOUND_FREETYPE=no
57730     fi
57731   fi
57732 
57733   if test "x$FOUND_FREETYPE" = xyes; then
57734     # Include file found, let's continue the sanity check.
57735     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57736 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57737 
57738     # Reset to default value
57739     FREETYPE_BASE_NAME=freetype
57740     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57741     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57742       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57743           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57744         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57745         # for the .6 version explicitly.
57746         FREETYPE_BASE_NAME=freetype.6
57747         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57748         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57749 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57750       else
57751         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57752 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57753         FOUND_FREETYPE=no
57754       fi
57755     else
57756       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57757         # On Windows, we will need both .lib and .dll file.
57758         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57759           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57760 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57761           FOUND_FREETYPE=no
57762         fi
57763       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57764           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57765         # Found lib in isa dir, use that instead.
57766         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57767         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57768 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57769       fi
57770     fi
57771   fi
57772 
57773   if test "x$FOUND_FREETYPE" = xyes; then
57774 
57775   # Only process if variable expands to non-empty
57776 
57777   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57778     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57779 
57780   # Input might be given as Windows format, start by converting to
57781   # unix format.
57782   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57783   new_path=`$CYGPATH -u "$path"`
57784 
57785   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57786   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57787   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57788   # "foo.exe" is OK but "foo" is an error.
57789   #
57790   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57791   # It is also a way to make sure we got the proper file name for the real test later on.
57792   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57793   if test "x$test_shortpath" = x; then
57794     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57795 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57796     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57797   fi
57798 
57799   # Call helper function which possibly converts this using DOS-style short mode.
57800   # If so, the updated path is stored in $new_path.
57801 
57802   input_path="$new_path"
57803   # Check if we need to convert this using DOS-style short mode. If the path
57804   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57805   # take no chances and rewrite it.
57806   # Note: m4 eats our [], so we need to use [ and ] instead.
57807   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57808   if test "x$has_forbidden_chars" != x; then
57809     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57810     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57811     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57812     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57813       # Going to short mode and back again did indeed matter. Since short mode is
57814       # case insensitive, let's make it lowercase to improve readability.
57815       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57816       # Now convert it back to Unix-style (cygpath)
57817       input_path=`$CYGPATH -u "$shortmode_path"`
57818       new_path="$input_path"
57819     fi
57820   fi
57821 
57822   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57823   if test "x$test_cygdrive_prefix" = x; then
57824     # As a simple fix, exclude /usr/bin since it's not a real path.
57825     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57826       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57827       # a path prefixed by /cygdrive for fixpath to work.
57828       new_path="$CYGWIN_ROOT_PATH$input_path"
57829     fi
57830   fi
57831 
57832 
57833   if test "x$path" != "x$new_path"; then
57834     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57835     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57836 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57837   fi
57838 
57839     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57840 
57841   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57842   has_colon=`$ECHO $path | $GREP ^.:`
57843   new_path="$path"
57844   if test "x$has_colon" = x; then
57845     # Not in mixed or Windows style, start by that.
57846     new_path=`cmd //c echo $path`
57847   fi
57848 
57849 
57850   input_path="$new_path"
57851   # Check if we need to convert this using DOS-style short mode. If the path
57852   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57853   # take no chances and rewrite it.
57854   # Note: m4 eats our [], so we need to use [ and ] instead.
57855   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57856   if test "x$has_forbidden_chars" != x; then
57857     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57858     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57859   fi
57860 
57861 
57862   windows_path="$new_path"
57863   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57864     unix_path=`$CYGPATH -u "$windows_path"`
57865     new_path="$unix_path"
57866   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57867     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57868     new_path="$unix_path"
57869   fi
57870 
57871   if test "x$path" != "x$new_path"; then
57872     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57873     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57874 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57875   fi
57876 
57877   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57878   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57879 
57880     else
57881       # We're on a unix platform. Hooray! :)
57882       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57883       has_space=`$ECHO "$path" | $GREP " "`
57884       if test "x$has_space" != x; then
57885         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57886 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57887         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57888       fi
57889 
57890       # Use eval to expand a potential ~
57891       eval path="$path"
57892       if test ! -f "$path" && test ! -d "$path"; then
57893         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57894       fi
57895 
57896       if test -d "$path"; then
57897         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57898       else
57899         dir="`$DIRNAME "$path"`"
57900         base="`$BASENAME "$path"`"
57901         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57902       fi
57903     fi
57904   fi
57905 
57906 
57907   # Only process if variable expands to non-empty
57908 
57909   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57910     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57911 
57912   # Input might be given as Windows format, start by converting to
57913   # unix format.
57914   path="$POTENTIAL_FREETYPE_LIB_PATH"
57915   new_path=`$CYGPATH -u "$path"`
57916 
57917   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57918   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57919   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57920   # "foo.exe" is OK but "foo" is an error.
57921   #
57922   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57923   # It is also a way to make sure we got the proper file name for the real test later on.
57924   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57925   if test "x$test_shortpath" = x; then
57926     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57927 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57928     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57929   fi
57930 
57931   # Call helper function which possibly converts this using DOS-style short mode.
57932   # If so, the updated path is stored in $new_path.
57933 
57934   input_path="$new_path"
57935   # Check if we need to convert this using DOS-style short mode. If the path
57936   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57937   # take no chances and rewrite it.
57938   # Note: m4 eats our [], so we need to use [ and ] instead.
57939   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57940   if test "x$has_forbidden_chars" != x; then
57941     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57942     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57943     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57944     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57945       # Going to short mode and back again did indeed matter. Since short mode is
57946       # case insensitive, let's make it lowercase to improve readability.
57947       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57948       # Now convert it back to Unix-style (cygpath)
57949       input_path=`$CYGPATH -u "$shortmode_path"`
57950       new_path="$input_path"
57951     fi
57952   fi
57953 
57954   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57955   if test "x$test_cygdrive_prefix" = x; then
57956     # As a simple fix, exclude /usr/bin since it's not a real path.
57957     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57958       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57959       # a path prefixed by /cygdrive for fixpath to work.
57960       new_path="$CYGWIN_ROOT_PATH$input_path"
57961     fi
57962   fi
57963 
57964 
57965   if test "x$path" != "x$new_path"; then
57966     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57967     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57968 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57969   fi
57970 
57971     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57972 
57973   path="$POTENTIAL_FREETYPE_LIB_PATH"
57974   has_colon=`$ECHO $path | $GREP ^.:`
57975   new_path="$path"
57976   if test "x$has_colon" = x; then
57977     # Not in mixed or Windows style, start by that.
57978     new_path=`cmd //c echo $path`
57979   fi
57980 
57981 
57982   input_path="$new_path"
57983   # Check if we need to convert this using DOS-style short mode. If the path
57984   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57985   # take no chances and rewrite it.
57986   # Note: m4 eats our [], so we need to use [ and ] instead.
57987   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57988   if test "x$has_forbidden_chars" != x; then
57989     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57990     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57991   fi
57992 
57993 
57994   windows_path="$new_path"
57995   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57996     unix_path=`$CYGPATH -u "$windows_path"`
57997     new_path="$unix_path"
57998   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57999     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58000     new_path="$unix_path"
58001   fi
58002 
58003   if test "x$path" != "x$new_path"; then
58004     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58005     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58006 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58007   fi
58008 
58009   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58010   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58011 
58012     else
58013       # We're on a unix platform. Hooray! :)
58014       path="$POTENTIAL_FREETYPE_LIB_PATH"
58015       has_space=`$ECHO "$path" | $GREP " "`
58016       if test "x$has_space" != x; then
58017         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58018 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58019         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58020       fi
58021 
58022       # Use eval to expand a potential ~
58023       eval path="$path"
58024       if test ! -f "$path" && test ! -d "$path"; then
58025         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58026       fi
58027 
58028       if test -d "$path"; then
58029         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58030       else
58031         dir="`$DIRNAME "$path"`"
58032         base="`$BASENAME "$path"`"
58033         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58034       fi
58035     fi
58036   fi
58037 
58038 
58039     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58040     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58041 $as_echo_n "checking for freetype includes... " >&6; }
58042     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58043 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58044     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58045     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58046 $as_echo_n "checking for freetype libraries... " >&6; }
58047     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58048 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58049   fi
58050 
58051               fi
58052             fi
58053           fi
58054         else
58055           FREETYPE_BASE_DIR="$SYSROOT/usr"
58056 
58057   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58058   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58059   METHOD="well-known location"
58060 
58061   # Let's start with an optimistic view of the world :-)
58062   FOUND_FREETYPE=yes
58063 
58064   # First look for the canonical freetype main include file ft2build.h.
58065   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58066     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58067     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58068     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58069       # Fail.
58070       FOUND_FREETYPE=no
58071     fi
58072   fi
58073 
58074   if test "x$FOUND_FREETYPE" = xyes; then
58075     # Include file found, let's continue the sanity check.
58076     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58077 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58078 
58079     # Reset to default value
58080     FREETYPE_BASE_NAME=freetype
58081     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58082     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58083       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58084           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58085         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58086         # for the .6 version explicitly.
58087         FREETYPE_BASE_NAME=freetype.6
58088         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58089         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58090 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58091       else
58092         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58093 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58094         FOUND_FREETYPE=no
58095       fi
58096     else
58097       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58098         # On Windows, we will need both .lib and .dll file.
58099         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58100           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58101 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58102           FOUND_FREETYPE=no
58103         fi
58104       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58105           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58106         # Found lib in isa dir, use that instead.
58107         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58108         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58109 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58110       fi
58111     fi
58112   fi
58113 
58114   if test "x$FOUND_FREETYPE" = xyes; then
58115 
58116   # Only process if variable expands to non-empty
58117 
58118   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58119     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58120 
58121   # Input might be given as Windows format, start by converting to
58122   # unix format.
58123   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58124   new_path=`$CYGPATH -u "$path"`
58125 
58126   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58127   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58128   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58129   # "foo.exe" is OK but "foo" is an error.
58130   #
58131   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58132   # It is also a way to make sure we got the proper file name for the real test later on.
58133   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58134   if test "x$test_shortpath" = x; then
58135     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58136 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58137     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58138   fi
58139 
58140   # Call helper function which possibly converts this using DOS-style short mode.
58141   # If so, the updated path is stored in $new_path.
58142 
58143   input_path="$new_path"
58144   # Check if we need to convert this using DOS-style short mode. If the path
58145   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58146   # take no chances and rewrite it.
58147   # Note: m4 eats our [], so we need to use [ and ] instead.
58148   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58149   if test "x$has_forbidden_chars" != x; then
58150     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58151     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58152     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58153     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58154       # Going to short mode and back again did indeed matter. Since short mode is
58155       # case insensitive, let's make it lowercase to improve readability.
58156       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58157       # Now convert it back to Unix-style (cygpath)
58158       input_path=`$CYGPATH -u "$shortmode_path"`
58159       new_path="$input_path"
58160     fi
58161   fi
58162 
58163   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58164   if test "x$test_cygdrive_prefix" = x; then
58165     # As a simple fix, exclude /usr/bin since it's not a real path.
58166     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58167       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58168       # a path prefixed by /cygdrive for fixpath to work.
58169       new_path="$CYGWIN_ROOT_PATH$input_path"
58170     fi
58171   fi
58172 
58173 
58174   if test "x$path" != "x$new_path"; then
58175     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58176     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58177 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58178   fi
58179 
58180     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58181 
58182   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58183   has_colon=`$ECHO $path | $GREP ^.:`
58184   new_path="$path"
58185   if test "x$has_colon" = x; then
58186     # Not in mixed or Windows style, start by that.
58187     new_path=`cmd //c echo $path`
58188   fi
58189 
58190 
58191   input_path="$new_path"
58192   # Check if we need to convert this using DOS-style short mode. If the path
58193   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58194   # take no chances and rewrite it.
58195   # Note: m4 eats our [], so we need to use [ and ] instead.
58196   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58197   if test "x$has_forbidden_chars" != x; then
58198     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58199     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58200   fi
58201 
58202 
58203   windows_path="$new_path"
58204   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58205     unix_path=`$CYGPATH -u "$windows_path"`
58206     new_path="$unix_path"
58207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58208     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58209     new_path="$unix_path"
58210   fi
58211 
58212   if test "x$path" != "x$new_path"; then
58213     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58214     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58215 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58216   fi
58217 
58218   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58219   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58220 
58221     else
58222       # We're on a unix platform. Hooray! :)
58223       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58224       has_space=`$ECHO "$path" | $GREP " "`
58225       if test "x$has_space" != x; then
58226         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58227 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58228         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58229       fi
58230 
58231       # Use eval to expand a potential ~
58232       eval path="$path"
58233       if test ! -f "$path" && test ! -d "$path"; then
58234         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58235       fi
58236 
58237       if test -d "$path"; then
58238         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58239       else
58240         dir="`$DIRNAME "$path"`"
58241         base="`$BASENAME "$path"`"
58242         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58243       fi
58244     fi
58245   fi
58246 
58247 
58248   # Only process if variable expands to non-empty
58249 
58250   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58251     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58252 
58253   # Input might be given as Windows format, start by converting to
58254   # unix format.
58255   path="$POTENTIAL_FREETYPE_LIB_PATH"
58256   new_path=`$CYGPATH -u "$path"`
58257 
58258   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58259   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58260   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58261   # "foo.exe" is OK but "foo" is an error.
58262   #
58263   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58264   # It is also a way to make sure we got the proper file name for the real test later on.
58265   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58266   if test "x$test_shortpath" = x; then
58267     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58268 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58269     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58270   fi
58271 
58272   # Call helper function which possibly converts this using DOS-style short mode.
58273   # If so, the updated path is stored in $new_path.
58274 
58275   input_path="$new_path"
58276   # Check if we need to convert this using DOS-style short mode. If the path
58277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58278   # take no chances and rewrite it.
58279   # Note: m4 eats our [], so we need to use [ and ] instead.
58280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58281   if test "x$has_forbidden_chars" != x; then
58282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58283     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58284     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58285     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58286       # Going to short mode and back again did indeed matter. Since short mode is
58287       # case insensitive, let's make it lowercase to improve readability.
58288       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58289       # Now convert it back to Unix-style (cygpath)
58290       input_path=`$CYGPATH -u "$shortmode_path"`
58291       new_path="$input_path"
58292     fi
58293   fi
58294 
58295   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58296   if test "x$test_cygdrive_prefix" = x; then
58297     # As a simple fix, exclude /usr/bin since it's not a real path.
58298     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58299       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58300       # a path prefixed by /cygdrive for fixpath to work.
58301       new_path="$CYGWIN_ROOT_PATH$input_path"
58302     fi
58303   fi
58304 
58305 
58306   if test "x$path" != "x$new_path"; then
58307     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58308     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58309 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58310   fi
58311 
58312     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58313 
58314   path="$POTENTIAL_FREETYPE_LIB_PATH"
58315   has_colon=`$ECHO $path | $GREP ^.:`
58316   new_path="$path"
58317   if test "x$has_colon" = x; then
58318     # Not in mixed or Windows style, start by that.
58319     new_path=`cmd //c echo $path`
58320   fi
58321 
58322 
58323   input_path="$new_path"
58324   # Check if we need to convert this using DOS-style short mode. If the path
58325   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58326   # take no chances and rewrite it.
58327   # Note: m4 eats our [], so we need to use [ and ] instead.
58328   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58329   if test "x$has_forbidden_chars" != x; then
58330     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58331     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58332   fi
58333 
58334 
58335   windows_path="$new_path"
58336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58337     unix_path=`$CYGPATH -u "$windows_path"`
58338     new_path="$unix_path"
58339   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58340     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58341     new_path="$unix_path"
58342   fi
58343 
58344   if test "x$path" != "x$new_path"; then
58345     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58346     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58347 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58348   fi
58349 
58350   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58351   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58352 
58353     else
58354       # We're on a unix platform. Hooray! :)
58355       path="$POTENTIAL_FREETYPE_LIB_PATH"
58356       has_space=`$ECHO "$path" | $GREP " "`
58357       if test "x$has_space" != x; then
58358         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58359 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58360         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58361       fi
58362 
58363       # Use eval to expand a potential ~
58364       eval path="$path"
58365       if test ! -f "$path" && test ! -d "$path"; then
58366         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58367       fi
58368 
58369       if test -d "$path"; then
58370         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58371       else
58372         dir="`$DIRNAME "$path"`"
58373         base="`$BASENAME "$path"`"
58374         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58375       fi
58376     fi
58377   fi
58378 
58379 
58380     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58381     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58382 $as_echo_n "checking for freetype includes... " >&6; }
58383     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58384 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58385     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58386     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58387 $as_echo_n "checking for freetype libraries... " >&6; }
58388     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58389 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58390   fi
58391 
58392 
58393           if test "x$FOUND_FREETYPE" != xyes; then
58394             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
58395 
58396   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58397   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58398   METHOD="well-known location"
58399 
58400   # Let's start with an optimistic view of the world :-)
58401   FOUND_FREETYPE=yes
58402 
58403   # First look for the canonical freetype main include file ft2build.h.
58404   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58405     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58406     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58407     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58408       # Fail.
58409       FOUND_FREETYPE=no
58410     fi
58411   fi
58412 
58413   if test "x$FOUND_FREETYPE" = xyes; then
58414     # Include file found, let's continue the sanity check.
58415     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58416 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58417 
58418     # Reset to default value
58419     FREETYPE_BASE_NAME=freetype
58420     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58421     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58422       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58423           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58424         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58425         # for the .6 version explicitly.
58426         FREETYPE_BASE_NAME=freetype.6
58427         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58428         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58429 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58430       else
58431         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58432 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58433         FOUND_FREETYPE=no
58434       fi
58435     else
58436       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58437         # On Windows, we will need both .lib and .dll file.
58438         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58439           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58440 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58441           FOUND_FREETYPE=no
58442         fi
58443       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58444           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58445         # Found lib in isa dir, use that instead.
58446         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58447         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58448 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58449       fi
58450     fi
58451   fi
58452 
58453   if test "x$FOUND_FREETYPE" = xyes; then
58454 
58455   # Only process if variable expands to non-empty
58456 
58457   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58458     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58459 
58460   # Input might be given as Windows format, start by converting to
58461   # unix format.
58462   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58463   new_path=`$CYGPATH -u "$path"`
58464 
58465   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58466   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58467   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58468   # "foo.exe" is OK but "foo" is an error.
58469   #
58470   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58471   # It is also a way to make sure we got the proper file name for the real test later on.
58472   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58473   if test "x$test_shortpath" = x; then
58474     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58475 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58476     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58477   fi
58478 
58479   # Call helper function which possibly converts this using DOS-style short mode.
58480   # If so, the updated path is stored in $new_path.
58481 
58482   input_path="$new_path"
58483   # Check if we need to convert this using DOS-style short mode. If the path
58484   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58485   # take no chances and rewrite it.
58486   # Note: m4 eats our [], so we need to use [ and ] instead.
58487   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58488   if test "x$has_forbidden_chars" != x; then
58489     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58490     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58491     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58492     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58493       # Going to short mode and back again did indeed matter. Since short mode is
58494       # case insensitive, let's make it lowercase to improve readability.
58495       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58496       # Now convert it back to Unix-style (cygpath)
58497       input_path=`$CYGPATH -u "$shortmode_path"`
58498       new_path="$input_path"
58499     fi
58500   fi
58501 
58502   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58503   if test "x$test_cygdrive_prefix" = x; then
58504     # As a simple fix, exclude /usr/bin since it's not a real path.
58505     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58506       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58507       # a path prefixed by /cygdrive for fixpath to work.
58508       new_path="$CYGWIN_ROOT_PATH$input_path"
58509     fi
58510   fi
58511 
58512 
58513   if test "x$path" != "x$new_path"; then
58514     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58515     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58516 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58517   fi
58518 
58519     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58520 
58521   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58522   has_colon=`$ECHO $path | $GREP ^.:`
58523   new_path="$path"
58524   if test "x$has_colon" = x; then
58525     # Not in mixed or Windows style, start by that.
58526     new_path=`cmd //c echo $path`
58527   fi
58528 
58529 
58530   input_path="$new_path"
58531   # Check if we need to convert this using DOS-style short mode. If the path
58532   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58533   # take no chances and rewrite it.
58534   # Note: m4 eats our [], so we need to use [ and ] instead.
58535   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58536   if test "x$has_forbidden_chars" != x; then
58537     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58538     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58539   fi
58540 
58541 
58542   windows_path="$new_path"
58543   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58544     unix_path=`$CYGPATH -u "$windows_path"`
58545     new_path="$unix_path"
58546   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58547     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58548     new_path="$unix_path"
58549   fi
58550 
58551   if test "x$path" != "x$new_path"; then
58552     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58553     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58554 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58555   fi
58556 
58557   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58558   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58559 
58560     else
58561       # We're on a unix platform. Hooray! :)
58562       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58563       has_space=`$ECHO "$path" | $GREP " "`
58564       if test "x$has_space" != x; then
58565         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58566 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58567         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58568       fi
58569 
58570       # Use eval to expand a potential ~
58571       eval path="$path"
58572       if test ! -f "$path" && test ! -d "$path"; then
58573         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58574       fi
58575 
58576       if test -d "$path"; then
58577         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58578       else
58579         dir="`$DIRNAME "$path"`"
58580         base="`$BASENAME "$path"`"
58581         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58582       fi
58583     fi
58584   fi
58585 
58586 
58587   # Only process if variable expands to non-empty
58588 
58589   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58590     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58591 
58592   # Input might be given as Windows format, start by converting to
58593   # unix format.
58594   path="$POTENTIAL_FREETYPE_LIB_PATH"
58595   new_path=`$CYGPATH -u "$path"`
58596 
58597   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58598   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58599   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58600   # "foo.exe" is OK but "foo" is an error.
58601   #
58602   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58603   # It is also a way to make sure we got the proper file name for the real test later on.
58604   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58605   if test "x$test_shortpath" = x; then
58606     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58607 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58608     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58609   fi
58610 
58611   # Call helper function which possibly converts this using DOS-style short mode.
58612   # If so, the updated path is stored in $new_path.
58613 
58614   input_path="$new_path"
58615   # Check if we need to convert this using DOS-style short mode. If the path
58616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58617   # take no chances and rewrite it.
58618   # Note: m4 eats our [], so we need to use [ and ] instead.
58619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58620   if test "x$has_forbidden_chars" != x; then
58621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58622     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58623     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58624     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58625       # Going to short mode and back again did indeed matter. Since short mode is
58626       # case insensitive, let's make it lowercase to improve readability.
58627       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58628       # Now convert it back to Unix-style (cygpath)
58629       input_path=`$CYGPATH -u "$shortmode_path"`
58630       new_path="$input_path"
58631     fi
58632   fi
58633 
58634   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58635   if test "x$test_cygdrive_prefix" = x; then
58636     # As a simple fix, exclude /usr/bin since it's not a real path.
58637     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58638       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58639       # a path prefixed by /cygdrive for fixpath to work.
58640       new_path="$CYGWIN_ROOT_PATH$input_path"
58641     fi
58642   fi
58643 
58644 
58645   if test "x$path" != "x$new_path"; then
58646     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58647     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58648 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58649   fi
58650 
58651     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58652 
58653   path="$POTENTIAL_FREETYPE_LIB_PATH"
58654   has_colon=`$ECHO $path | $GREP ^.:`
58655   new_path="$path"
58656   if test "x$has_colon" = x; then
58657     # Not in mixed or Windows style, start by that.
58658     new_path=`cmd //c echo $path`
58659   fi
58660 
58661 
58662   input_path="$new_path"
58663   # Check if we need to convert this using DOS-style short mode. If the path
58664   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58665   # take no chances and rewrite it.
58666   # Note: m4 eats our [], so we need to use [ and ] instead.
58667   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58668   if test "x$has_forbidden_chars" != x; then
58669     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58670     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58671   fi
58672 
58673 
58674   windows_path="$new_path"
58675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58676     unix_path=`$CYGPATH -u "$windows_path"`
58677     new_path="$unix_path"
58678   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58679     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58680     new_path="$unix_path"
58681   fi
58682 
58683   if test "x$path" != "x$new_path"; then
58684     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58685     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58686 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58687   fi
58688 
58689   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58690   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58691 
58692     else
58693       # We're on a unix platform. Hooray! :)
58694       path="$POTENTIAL_FREETYPE_LIB_PATH"
58695       has_space=`$ECHO "$path" | $GREP " "`
58696       if test "x$has_space" != x; then
58697         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58698 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58699         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58700       fi
58701 
58702       # Use eval to expand a potential ~
58703       eval path="$path"
58704       if test ! -f "$path" && test ! -d "$path"; then
58705         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58706       fi
58707 
58708       if test -d "$path"; then
58709         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58710       else
58711         dir="`$DIRNAME "$path"`"
58712         base="`$BASENAME "$path"`"
58713         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58714       fi
58715     fi
58716   fi
58717 
58718 
58719     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58720     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58721 $as_echo_n "checking for freetype includes... " >&6; }
58722     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58723 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58724     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58725     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58726 $as_echo_n "checking for freetype libraries... " >&6; }
58727     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58728 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58729   fi
58730 
58731           fi
58732 
58733           if test "x$OPENJDK_TARGET_OS" = xmacosx; then
58734             if test "x$FOUND_FREETYPE" != xyes; then
58735               # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
58736               FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
58737 
58738   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58739   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58740   METHOD="well-known location"
58741 
58742   # Let's start with an optimistic view of the world :-)
58743   FOUND_FREETYPE=yes
58744 
58745   # First look for the canonical freetype main include file ft2build.h.
58746   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58747     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58748     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58749     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58750       # Fail.
58751       FOUND_FREETYPE=no
58752     fi
58753   fi
58754 
58755   if test "x$FOUND_FREETYPE" = xyes; then
58756     # Include file found, let's continue the sanity check.
58757     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58758 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58759 
58760     # Reset to default value
58761     FREETYPE_BASE_NAME=freetype
58762     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58763     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58764       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58765           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58766         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58767         # for the .6 version explicitly.
58768         FREETYPE_BASE_NAME=freetype.6
58769         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58770         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58771 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58772       else
58773         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58774 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58775         FOUND_FREETYPE=no
58776       fi
58777     else
58778       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58779         # On Windows, we will need both .lib and .dll file.
58780         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58781           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58782 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58783           FOUND_FREETYPE=no
58784         fi
58785       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58786           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58787         # Found lib in isa dir, use that instead.
58788         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58789         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58790 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58791       fi
58792     fi
58793   fi
58794 
58795   if test "x$FOUND_FREETYPE" = xyes; then
58796 
58797   # Only process if variable expands to non-empty
58798 
58799   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58800     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58801 
58802   # Input might be given as Windows format, start by converting to
58803   # unix format.
58804   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58805   new_path=`$CYGPATH -u "$path"`
58806 
58807   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58808   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58809   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58810   # "foo.exe" is OK but "foo" is an error.
58811   #
58812   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58813   # It is also a way to make sure we got the proper file name for the real test later on.
58814   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58815   if test "x$test_shortpath" = x; then
58816     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58817 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58818     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58819   fi
58820 
58821   # Call helper function which possibly converts this using DOS-style short mode.
58822   # If so, the updated path is stored in $new_path.
58823 
58824   input_path="$new_path"
58825   # Check if we need to convert this using DOS-style short mode. If the path
58826   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58827   # take no chances and rewrite it.
58828   # Note: m4 eats our [], so we need to use [ and ] instead.
58829   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58830   if test "x$has_forbidden_chars" != x; then
58831     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58832     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58833     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58834     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58835       # Going to short mode and back again did indeed matter. Since short mode is
58836       # case insensitive, let's make it lowercase to improve readability.
58837       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58838       # Now convert it back to Unix-style (cygpath)
58839       input_path=`$CYGPATH -u "$shortmode_path"`
58840       new_path="$input_path"
58841     fi
58842   fi
58843 
58844   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58845   if test "x$test_cygdrive_prefix" = x; then
58846     # As a simple fix, exclude /usr/bin since it's not a real path.
58847     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58848       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58849       # a path prefixed by /cygdrive for fixpath to work.
58850       new_path="$CYGWIN_ROOT_PATH$input_path"
58851     fi
58852   fi
58853 
58854 
58855   if test "x$path" != "x$new_path"; then
58856     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58857     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58858 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58859   fi
58860 
58861     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58862 
58863   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58864   has_colon=`$ECHO $path | $GREP ^.:`
58865   new_path="$path"
58866   if test "x$has_colon" = x; then
58867     # Not in mixed or Windows style, start by that.
58868     new_path=`cmd //c echo $path`
58869   fi
58870 
58871 
58872   input_path="$new_path"
58873   # Check if we need to convert this using DOS-style short mode. If the path
58874   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58875   # take no chances and rewrite it.
58876   # Note: m4 eats our [], so we need to use [ and ] instead.
58877   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58878   if test "x$has_forbidden_chars" != x; then
58879     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58880     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58881   fi
58882 
58883 
58884   windows_path="$new_path"
58885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58886     unix_path=`$CYGPATH -u "$windows_path"`
58887     new_path="$unix_path"
58888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58889     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58890     new_path="$unix_path"
58891   fi
58892 
58893   if test "x$path" != "x$new_path"; then
58894     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58895     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58896 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58897   fi
58898 
58899   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58900   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58901 
58902     else
58903       # We're on a unix platform. Hooray! :)
58904       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58905       has_space=`$ECHO "$path" | $GREP " "`
58906       if test "x$has_space" != x; then
58907         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58908 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58909         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58910       fi
58911 
58912       # Use eval to expand a potential ~
58913       eval path="$path"
58914       if test ! -f "$path" && test ! -d "$path"; then
58915         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58916       fi
58917 
58918       if test -d "$path"; then
58919         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58920       else
58921         dir="`$DIRNAME "$path"`"
58922         base="`$BASENAME "$path"`"
58923         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58924       fi
58925     fi
58926   fi
58927 
58928 
58929   # Only process if variable expands to non-empty
58930 
58931   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58932     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58933 
58934   # Input might be given as Windows format, start by converting to
58935   # unix format.
58936   path="$POTENTIAL_FREETYPE_LIB_PATH"
58937   new_path=`$CYGPATH -u "$path"`
58938 
58939   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58940   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58941   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58942   # "foo.exe" is OK but "foo" is an error.
58943   #
58944   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58945   # It is also a way to make sure we got the proper file name for the real test later on.
58946   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58947   if test "x$test_shortpath" = x; then
58948     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58949 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58950     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58951   fi
58952 
58953   # Call helper function which possibly converts this using DOS-style short mode.
58954   # If so, the updated path is stored in $new_path.
58955 
58956   input_path="$new_path"
58957   # Check if we need to convert this using DOS-style short mode. If the path
58958   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58959   # take no chances and rewrite it.
58960   # Note: m4 eats our [], so we need to use [ and ] instead.
58961   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58962   if test "x$has_forbidden_chars" != x; then
58963     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58964     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58965     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58966     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58967       # Going to short mode and back again did indeed matter. Since short mode is
58968       # case insensitive, let's make it lowercase to improve readability.
58969       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58970       # Now convert it back to Unix-style (cygpath)
58971       input_path=`$CYGPATH -u "$shortmode_path"`
58972       new_path="$input_path"
58973     fi
58974   fi
58975 
58976   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58977   if test "x$test_cygdrive_prefix" = x; then
58978     # As a simple fix, exclude /usr/bin since it's not a real path.
58979     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58980       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58981       # a path prefixed by /cygdrive for fixpath to work.
58982       new_path="$CYGWIN_ROOT_PATH$input_path"
58983     fi
58984   fi
58985 
58986 
58987   if test "x$path" != "x$new_path"; then
58988     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58989     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58990 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58991   fi
58992 
58993     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58994 
58995   path="$POTENTIAL_FREETYPE_LIB_PATH"
58996   has_colon=`$ECHO $path | $GREP ^.:`
58997   new_path="$path"
58998   if test "x$has_colon" = x; then
58999     # Not in mixed or Windows style, start by that.
59000     new_path=`cmd //c echo $path`
59001   fi
59002 
59003 
59004   input_path="$new_path"
59005   # Check if we need to convert this using DOS-style short mode. If the path
59006   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59007   # take no chances and rewrite it.
59008   # Note: m4 eats our [], so we need to use [ and ] instead.
59009   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59010   if test "x$has_forbidden_chars" != x; then
59011     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59012     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59013   fi
59014 
59015 
59016   windows_path="$new_path"
59017   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59018     unix_path=`$CYGPATH -u "$windows_path"`
59019     new_path="$unix_path"
59020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59021     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59022     new_path="$unix_path"
59023   fi
59024 
59025   if test "x$path" != "x$new_path"; then
59026     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59027     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59028 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59029   fi
59030 
59031   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59032   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59033 
59034     else
59035       # We're on a unix platform. Hooray! :)
59036       path="$POTENTIAL_FREETYPE_LIB_PATH"
59037       has_space=`$ECHO "$path" | $GREP " "`
59038       if test "x$has_space" != x; then
59039         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59040 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59041         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59042       fi
59043 
59044       # Use eval to expand a potential ~
59045       eval path="$path"
59046       if test ! -f "$path" && test ! -d "$path"; then
59047         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59048       fi
59049 
59050       if test -d "$path"; then
59051         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59052       else
59053         dir="`$DIRNAME "$path"`"
59054         base="`$BASENAME "$path"`"
59055         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59056       fi
59057     fi
59058   fi
59059 
59060 
59061     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59062     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59063 $as_echo_n "checking for freetype includes... " >&6; }
59064     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59065 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59066     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59067     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59068 $as_echo_n "checking for freetype libraries... " >&6; }
59069     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59070 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59071   fi
59072 
59073             fi
59074           fi
59075 
59076           if test "x$FOUND_FREETYPE" != xyes; then
59077             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
59078 
59079   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59080   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59081   METHOD="well-known location"
59082 
59083   # Let's start with an optimistic view of the world :-)
59084   FOUND_FREETYPE=yes
59085 
59086   # First look for the canonical freetype main include file ft2build.h.
59087   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59088     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59089     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59090     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59091       # Fail.
59092       FOUND_FREETYPE=no
59093     fi
59094   fi
59095 
59096   if test "x$FOUND_FREETYPE" = xyes; then
59097     # Include file found, let's continue the sanity check.
59098     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59099 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59100 
59101     # Reset to default value
59102     FREETYPE_BASE_NAME=freetype
59103     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59104     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59105       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59106           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59107         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59108         # for the .6 version explicitly.
59109         FREETYPE_BASE_NAME=freetype.6
59110         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59111         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59112 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59113       else
59114         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59115 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59116         FOUND_FREETYPE=no
59117       fi
59118     else
59119       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59120         # On Windows, we will need both .lib and .dll file.
59121         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59122           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59123 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59124           FOUND_FREETYPE=no
59125         fi
59126       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59127           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59128         # Found lib in isa dir, use that instead.
59129         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59130         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59131 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59132       fi
59133     fi
59134   fi
59135 
59136   if test "x$FOUND_FREETYPE" = xyes; then
59137 
59138   # Only process if variable expands to non-empty
59139 
59140   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59141     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59142 
59143   # Input might be given as Windows format, start by converting to
59144   # unix format.
59145   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59146   new_path=`$CYGPATH -u "$path"`
59147 
59148   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59149   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59150   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59151   # "foo.exe" is OK but "foo" is an error.
59152   #
59153   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59154   # It is also a way to make sure we got the proper file name for the real test later on.
59155   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59156   if test "x$test_shortpath" = x; then
59157     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59158 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59159     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59160   fi
59161 
59162   # Call helper function which possibly converts this using DOS-style short mode.
59163   # If so, the updated path is stored in $new_path.
59164 
59165   input_path="$new_path"
59166   # Check if we need to convert this using DOS-style short mode. If the path
59167   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59168   # take no chances and rewrite it.
59169   # Note: m4 eats our [], so we need to use [ and ] instead.
59170   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59171   if test "x$has_forbidden_chars" != x; then
59172     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59173     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59174     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59175     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59176       # Going to short mode and back again did indeed matter. Since short mode is
59177       # case insensitive, let's make it lowercase to improve readability.
59178       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59179       # Now convert it back to Unix-style (cygpath)
59180       input_path=`$CYGPATH -u "$shortmode_path"`
59181       new_path="$input_path"
59182     fi
59183   fi
59184 
59185   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59186   if test "x$test_cygdrive_prefix" = x; then
59187     # As a simple fix, exclude /usr/bin since it's not a real path.
59188     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59189       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59190       # a path prefixed by /cygdrive for fixpath to work.
59191       new_path="$CYGWIN_ROOT_PATH$input_path"
59192     fi
59193   fi
59194 
59195 
59196   if test "x$path" != "x$new_path"; then
59197     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59198     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59199 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59200   fi
59201 
59202     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59203 
59204   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59205   has_colon=`$ECHO $path | $GREP ^.:`
59206   new_path="$path"
59207   if test "x$has_colon" = x; then
59208     # Not in mixed or Windows style, start by that.
59209     new_path=`cmd //c echo $path`
59210   fi
59211 
59212 
59213   input_path="$new_path"
59214   # Check if we need to convert this using DOS-style short mode. If the path
59215   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59216   # take no chances and rewrite it.
59217   # Note: m4 eats our [], so we need to use [ and ] instead.
59218   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59219   if test "x$has_forbidden_chars" != x; then
59220     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59221     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59222   fi
59223 
59224 
59225   windows_path="$new_path"
59226   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59227     unix_path=`$CYGPATH -u "$windows_path"`
59228     new_path="$unix_path"
59229   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59230     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59231     new_path="$unix_path"
59232   fi
59233 
59234   if test "x$path" != "x$new_path"; then
59235     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59236     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59237 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59238   fi
59239 
59240   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59241   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59242 
59243     else
59244       # We're on a unix platform. Hooray! :)
59245       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59246       has_space=`$ECHO "$path" | $GREP " "`
59247       if test "x$has_space" != x; then
59248         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59249 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59250         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59251       fi
59252 
59253       # Use eval to expand a potential ~
59254       eval path="$path"
59255       if test ! -f "$path" && test ! -d "$path"; then
59256         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59257       fi
59258 
59259       if test -d "$path"; then
59260         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59261       else
59262         dir="`$DIRNAME "$path"`"
59263         base="`$BASENAME "$path"`"
59264         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59265       fi
59266     fi
59267   fi
59268 
59269 
59270   # Only process if variable expands to non-empty
59271 
59272   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59273     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59274 
59275   # Input might be given as Windows format, start by converting to
59276   # unix format.
59277   path="$POTENTIAL_FREETYPE_LIB_PATH"
59278   new_path=`$CYGPATH -u "$path"`
59279 
59280   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59281   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59282   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59283   # "foo.exe" is OK but "foo" is an error.
59284   #
59285   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59286   # It is also a way to make sure we got the proper file name for the real test later on.
59287   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59288   if test "x$test_shortpath" = x; then
59289     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59290 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59291     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59292   fi
59293 
59294   # Call helper function which possibly converts this using DOS-style short mode.
59295   # If so, the updated path is stored in $new_path.
59296 
59297   input_path="$new_path"
59298   # Check if we need to convert this using DOS-style short mode. If the path
59299   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59300   # take no chances and rewrite it.
59301   # Note: m4 eats our [], so we need to use [ and ] instead.
59302   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59303   if test "x$has_forbidden_chars" != x; then
59304     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59305     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59306     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59307     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59308       # Going to short mode and back again did indeed matter. Since short mode is
59309       # case insensitive, let's make it lowercase to improve readability.
59310       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59311       # Now convert it back to Unix-style (cygpath)
59312       input_path=`$CYGPATH -u "$shortmode_path"`
59313       new_path="$input_path"
59314     fi
59315   fi
59316 
59317   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59318   if test "x$test_cygdrive_prefix" = x; then
59319     # As a simple fix, exclude /usr/bin since it's not a real path.
59320     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59321       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59322       # a path prefixed by /cygdrive for fixpath to work.
59323       new_path="$CYGWIN_ROOT_PATH$input_path"
59324     fi
59325   fi
59326 
59327 
59328   if test "x$path" != "x$new_path"; then
59329     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59330     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59331 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59332   fi
59333 
59334     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59335 
59336   path="$POTENTIAL_FREETYPE_LIB_PATH"
59337   has_colon=`$ECHO $path | $GREP ^.:`
59338   new_path="$path"
59339   if test "x$has_colon" = x; then
59340     # Not in mixed or Windows style, start by that.
59341     new_path=`cmd //c echo $path`
59342   fi
59343 
59344 
59345   input_path="$new_path"
59346   # Check if we need to convert this using DOS-style short mode. If the path
59347   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59348   # take no chances and rewrite it.
59349   # Note: m4 eats our [], so we need to use [ and ] instead.
59350   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59351   if test "x$has_forbidden_chars" != x; then
59352     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59353     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59354   fi
59355 
59356 
59357   windows_path="$new_path"
59358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59359     unix_path=`$CYGPATH -u "$windows_path"`
59360     new_path="$unix_path"
59361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59363     new_path="$unix_path"
59364   fi
59365 
59366   if test "x$path" != "x$new_path"; then
59367     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59368     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59369 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59370   fi
59371 
59372   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59373   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59374 
59375     else
59376       # We're on a unix platform. Hooray! :)
59377       path="$POTENTIAL_FREETYPE_LIB_PATH"
59378       has_space=`$ECHO "$path" | $GREP " "`
59379       if test "x$has_space" != x; then
59380         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59381 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59382         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59383       fi
59384 
59385       # Use eval to expand a potential ~
59386       eval path="$path"
59387       if test ! -f "$path" && test ! -d "$path"; then
59388         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59389       fi
59390 
59391       if test -d "$path"; then
59392         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59393       else
59394         dir="`$DIRNAME "$path"`"
59395         base="`$BASENAME "$path"`"
59396         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59397       fi
59398     fi
59399   fi
59400 
59401 
59402     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59403     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59404 $as_echo_n "checking for freetype includes... " >&6; }
59405     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59406 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59407     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59408     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59409 $as_echo_n "checking for freetype libraries... " >&6; }
59410     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59411 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59412   fi
59413 
59414           fi
59415 
59416           if test "x$FOUND_FREETYPE" != xyes; then
59417             FREETYPE_BASE_DIR="$SYSROOT/usr"
59418             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59419 
59420   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59421   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
59422   METHOD="well-known location"
59423 
59424   # Let's start with an optimistic view of the world :-)
59425   FOUND_FREETYPE=yes
59426 
59427   # First look for the canonical freetype main include file ft2build.h.
59428   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59429     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59430     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59431     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59432       # Fail.
59433       FOUND_FREETYPE=no
59434     fi
59435   fi
59436 
59437   if test "x$FOUND_FREETYPE" = xyes; then
59438     # Include file found, let's continue the sanity check.
59439     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59440 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59441 
59442     # Reset to default value
59443     FREETYPE_BASE_NAME=freetype
59444     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59445     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59446       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59447           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59448         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59449         # for the .6 version explicitly.
59450         FREETYPE_BASE_NAME=freetype.6
59451         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59452         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59453 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59454       else
59455         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59456 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59457         FOUND_FREETYPE=no
59458       fi
59459     else
59460       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59461         # On Windows, we will need both .lib and .dll file.
59462         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59463           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59464 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59465           FOUND_FREETYPE=no
59466         fi
59467       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59468           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59469         # Found lib in isa dir, use that instead.
59470         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59471         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59472 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59473       fi
59474     fi
59475   fi
59476 
59477   if test "x$FOUND_FREETYPE" = xyes; then
59478 
59479   # Only process if variable expands to non-empty
59480 
59481   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59482     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59483 
59484   # Input might be given as Windows format, start by converting to
59485   # unix format.
59486   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59487   new_path=`$CYGPATH -u "$path"`
59488 
59489   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59490   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59491   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59492   # "foo.exe" is OK but "foo" is an error.
59493   #
59494   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59495   # It is also a way to make sure we got the proper file name for the real test later on.
59496   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59497   if test "x$test_shortpath" = x; then
59498     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59499 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59500     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59501   fi
59502 
59503   # Call helper function which possibly converts this using DOS-style short mode.
59504   # If so, the updated path is stored in $new_path.
59505 
59506   input_path="$new_path"
59507   # Check if we need to convert this using DOS-style short mode. If the path
59508   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59509   # take no chances and rewrite it.
59510   # Note: m4 eats our [], so we need to use [ and ] instead.
59511   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59512   if test "x$has_forbidden_chars" != x; then
59513     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59514     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59515     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59516     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59517       # Going to short mode and back again did indeed matter. Since short mode is
59518       # case insensitive, let's make it lowercase to improve readability.
59519       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59520       # Now convert it back to Unix-style (cygpath)
59521       input_path=`$CYGPATH -u "$shortmode_path"`
59522       new_path="$input_path"
59523     fi
59524   fi
59525 
59526   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59527   if test "x$test_cygdrive_prefix" = x; then
59528     # As a simple fix, exclude /usr/bin since it's not a real path.
59529     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59530       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59531       # a path prefixed by /cygdrive for fixpath to work.
59532       new_path="$CYGWIN_ROOT_PATH$input_path"
59533     fi
59534   fi
59535 
59536 
59537   if test "x$path" != "x$new_path"; then
59538     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59539     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59540 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59541   fi
59542 
59543     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59544 
59545   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59546   has_colon=`$ECHO $path | $GREP ^.:`
59547   new_path="$path"
59548   if test "x$has_colon" = x; then
59549     # Not in mixed or Windows style, start by that.
59550     new_path=`cmd //c echo $path`
59551   fi
59552 
59553 
59554   input_path="$new_path"
59555   # Check if we need to convert this using DOS-style short mode. If the path
59556   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59557   # take no chances and rewrite it.
59558   # Note: m4 eats our [], so we need to use [ and ] instead.
59559   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59560   if test "x$has_forbidden_chars" != x; then
59561     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59562     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59563   fi
59564 
59565 
59566   windows_path="$new_path"
59567   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59568     unix_path=`$CYGPATH -u "$windows_path"`
59569     new_path="$unix_path"
59570   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59571     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59572     new_path="$unix_path"
59573   fi
59574 
59575   if test "x$path" != "x$new_path"; then
59576     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59577     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59578 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59579   fi
59580 
59581   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59582   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59583 
59584     else
59585       # We're on a unix platform. Hooray! :)
59586       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59587       has_space=`$ECHO "$path" | $GREP " "`
59588       if test "x$has_space" != x; then
59589         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59590 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59591         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59592       fi
59593 
59594       # Use eval to expand a potential ~
59595       eval path="$path"
59596       if test ! -f "$path" && test ! -d "$path"; then
59597         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59598       fi
59599 
59600       if test -d "$path"; then
59601         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59602       else
59603         dir="`$DIRNAME "$path"`"
59604         base="`$BASENAME "$path"`"
59605         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59606       fi
59607     fi
59608   fi
59609 
59610 
59611   # Only process if variable expands to non-empty
59612 
59613   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59614     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59615 
59616   # Input might be given as Windows format, start by converting to
59617   # unix format.
59618   path="$POTENTIAL_FREETYPE_LIB_PATH"
59619   new_path=`$CYGPATH -u "$path"`
59620 
59621   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59622   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59623   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59624   # "foo.exe" is OK but "foo" is an error.
59625   #
59626   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59627   # It is also a way to make sure we got the proper file name for the real test later on.
59628   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59629   if test "x$test_shortpath" = x; then
59630     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59631 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59632     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59633   fi
59634 
59635   # Call helper function which possibly converts this using DOS-style short mode.
59636   # If so, the updated path is stored in $new_path.
59637 
59638   input_path="$new_path"
59639   # Check if we need to convert this using DOS-style short mode. If the path
59640   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59641   # take no chances and rewrite it.
59642   # Note: m4 eats our [], so we need to use [ and ] instead.
59643   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59644   if test "x$has_forbidden_chars" != x; then
59645     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59646     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59647     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59648     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59649       # Going to short mode and back again did indeed matter. Since short mode is
59650       # case insensitive, let's make it lowercase to improve readability.
59651       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59652       # Now convert it back to Unix-style (cygpath)
59653       input_path=`$CYGPATH -u "$shortmode_path"`
59654       new_path="$input_path"
59655     fi
59656   fi
59657 
59658   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59659   if test "x$test_cygdrive_prefix" = x; then
59660     # As a simple fix, exclude /usr/bin since it's not a real path.
59661     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59662       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59663       # a path prefixed by /cygdrive for fixpath to work.
59664       new_path="$CYGWIN_ROOT_PATH$input_path"
59665     fi
59666   fi
59667 
59668 
59669   if test "x$path" != "x$new_path"; then
59670     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59671     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59672 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59673   fi
59674 
59675     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59676 
59677   path="$POTENTIAL_FREETYPE_LIB_PATH"
59678   has_colon=`$ECHO $path | $GREP ^.:`
59679   new_path="$path"
59680   if test "x$has_colon" = x; then
59681     # Not in mixed or Windows style, start by that.
59682     new_path=`cmd //c echo $path`
59683   fi
59684 
59685 
59686   input_path="$new_path"
59687   # Check if we need to convert this using DOS-style short mode. If the path
59688   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59689   # take no chances and rewrite it.
59690   # Note: m4 eats our [], so we need to use [ and ] instead.
59691   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59692   if test "x$has_forbidden_chars" != x; then
59693     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59694     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59695   fi
59696 
59697 
59698   windows_path="$new_path"
59699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59700     unix_path=`$CYGPATH -u "$windows_path"`
59701     new_path="$unix_path"
59702   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59703     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59704     new_path="$unix_path"
59705   fi
59706 
59707   if test "x$path" != "x$new_path"; then
59708     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59709     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59710 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59711   fi
59712 
59713   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59714   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59715 
59716     else
59717       # We're on a unix platform. Hooray! :)
59718       path="$POTENTIAL_FREETYPE_LIB_PATH"
59719       has_space=`$ECHO "$path" | $GREP " "`
59720       if test "x$has_space" != x; then
59721         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59722 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59723         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59724       fi
59725 
59726       # Use eval to expand a potential ~
59727       eval path="$path"
59728       if test ! -f "$path" && test ! -d "$path"; then
59729         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59730       fi
59731 
59732       if test -d "$path"; then
59733         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59734       else
59735         dir="`$DIRNAME "$path"`"
59736         base="`$BASENAME "$path"`"
59737         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59738       fi
59739     fi
59740   fi
59741 
59742 
59743     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59744     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59745 $as_echo_n "checking for freetype includes... " >&6; }
59746     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59747 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59748     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59749     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59750 $as_echo_n "checking for freetype libraries... " >&6; }
59751     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59752 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59753   fi
59754 
59755             else
59756 
59757   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59758   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
59759   METHOD="well-known location"
59760 
59761   # Let's start with an optimistic view of the world :-)
59762   FOUND_FREETYPE=yes
59763 
59764   # First look for the canonical freetype main include file ft2build.h.
59765   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59766     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59767     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59768     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59769       # Fail.
59770       FOUND_FREETYPE=no
59771     fi
59772   fi
59773 
59774   if test "x$FOUND_FREETYPE" = xyes; then
59775     # Include file found, let's continue the sanity check.
59776     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59777 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59778 
59779     # Reset to default value
59780     FREETYPE_BASE_NAME=freetype
59781     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59782     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59783       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59784           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59785         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59786         # for the .6 version explicitly.
59787         FREETYPE_BASE_NAME=freetype.6
59788         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59789         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59790 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59791       else
59792         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59793 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59794         FOUND_FREETYPE=no
59795       fi
59796     else
59797       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59798         # On Windows, we will need both .lib and .dll file.
59799         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59800           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59801 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59802           FOUND_FREETYPE=no
59803         fi
59804       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59805           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59806         # Found lib in isa dir, use that instead.
59807         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59808         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59809 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59810       fi
59811     fi
59812   fi
59813 
59814   if test "x$FOUND_FREETYPE" = xyes; then
59815 
59816   # Only process if variable expands to non-empty
59817 
59818   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59819     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59820 
59821   # Input might be given as Windows format, start by converting to
59822   # unix format.
59823   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59824   new_path=`$CYGPATH -u "$path"`
59825 
59826   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59827   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59828   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59829   # "foo.exe" is OK but "foo" is an error.
59830   #
59831   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59832   # It is also a way to make sure we got the proper file name for the real test later on.
59833   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59834   if test "x$test_shortpath" = x; then
59835     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59836 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59837     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59838   fi
59839 
59840   # Call helper function which possibly converts this using DOS-style short mode.
59841   # If so, the updated path is stored in $new_path.
59842 
59843   input_path="$new_path"
59844   # Check if we need to convert this using DOS-style short mode. If the path
59845   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59846   # take no chances and rewrite it.
59847   # Note: m4 eats our [], so we need to use [ and ] instead.
59848   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59849   if test "x$has_forbidden_chars" != x; then
59850     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59851     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59852     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59853     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59854       # Going to short mode and back again did indeed matter. Since short mode is
59855       # case insensitive, let's make it lowercase to improve readability.
59856       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59857       # Now convert it back to Unix-style (cygpath)
59858       input_path=`$CYGPATH -u "$shortmode_path"`
59859       new_path="$input_path"
59860     fi
59861   fi
59862 
59863   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59864   if test "x$test_cygdrive_prefix" = x; then
59865     # As a simple fix, exclude /usr/bin since it's not a real path.
59866     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59867       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59868       # a path prefixed by /cygdrive for fixpath to work.
59869       new_path="$CYGWIN_ROOT_PATH$input_path"
59870     fi
59871   fi
59872 
59873 
59874   if test "x$path" != "x$new_path"; then
59875     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59876     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59877 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59878   fi
59879 
59880     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59881 
59882   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59883   has_colon=`$ECHO $path | $GREP ^.:`
59884   new_path="$path"
59885   if test "x$has_colon" = x; then
59886     # Not in mixed or Windows style, start by that.
59887     new_path=`cmd //c echo $path`
59888   fi
59889 
59890 
59891   input_path="$new_path"
59892   # Check if we need to convert this using DOS-style short mode. If the path
59893   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59894   # take no chances and rewrite it.
59895   # Note: m4 eats our [], so we need to use [ and ] instead.
59896   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59897   if test "x$has_forbidden_chars" != x; then
59898     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59899     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59900   fi
59901 
59902 
59903   windows_path="$new_path"
59904   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59905     unix_path=`$CYGPATH -u "$windows_path"`
59906     new_path="$unix_path"
59907   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59908     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59909     new_path="$unix_path"
59910   fi
59911 
59912   if test "x$path" != "x$new_path"; then
59913     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59914     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59915 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59916   fi
59917 
59918   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59919   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59920 
59921     else
59922       # We're on a unix platform. Hooray! :)
59923       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59924       has_space=`$ECHO "$path" | $GREP " "`
59925       if test "x$has_space" != x; then
59926         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59927 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59928         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59929       fi
59930 
59931       # Use eval to expand a potential ~
59932       eval path="$path"
59933       if test ! -f "$path" && test ! -d "$path"; then
59934         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59935       fi
59936 
59937       if test -d "$path"; then
59938         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59939       else
59940         dir="`$DIRNAME "$path"`"
59941         base="`$BASENAME "$path"`"
59942         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59943       fi
59944     fi
59945   fi
59946 
59947 
59948   # Only process if variable expands to non-empty
59949 
59950   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59951     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59952 
59953   # Input might be given as Windows format, start by converting to
59954   # unix format.
59955   path="$POTENTIAL_FREETYPE_LIB_PATH"
59956   new_path=`$CYGPATH -u "$path"`
59957 
59958   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59959   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59960   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59961   # "foo.exe" is OK but "foo" is an error.
59962   #
59963   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59964   # It is also a way to make sure we got the proper file name for the real test later on.
59965   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59966   if test "x$test_shortpath" = x; then
59967     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59968 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59969     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59970   fi
59971 
59972   # Call helper function which possibly converts this using DOS-style short mode.
59973   # If so, the updated path is stored in $new_path.
59974 
59975   input_path="$new_path"
59976   # Check if we need to convert this using DOS-style short mode. If the path
59977   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59978   # take no chances and rewrite it.
59979   # Note: m4 eats our [], so we need to use [ and ] instead.
59980   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59981   if test "x$has_forbidden_chars" != x; then
59982     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59983     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59984     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59985     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59986       # Going to short mode and back again did indeed matter. Since short mode is
59987       # case insensitive, let's make it lowercase to improve readability.
59988       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59989       # Now convert it back to Unix-style (cygpath)
59990       input_path=`$CYGPATH -u "$shortmode_path"`
59991       new_path="$input_path"
59992     fi
59993   fi
59994 
59995   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59996   if test "x$test_cygdrive_prefix" = x; then
59997     # As a simple fix, exclude /usr/bin since it's not a real path.
59998     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59999       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60000       # a path prefixed by /cygdrive for fixpath to work.
60001       new_path="$CYGWIN_ROOT_PATH$input_path"
60002     fi
60003   fi
60004 
60005 
60006   if test "x$path" != "x$new_path"; then
60007     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60008     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60009 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60010   fi
60011 
60012     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60013 
60014   path="$POTENTIAL_FREETYPE_LIB_PATH"
60015   has_colon=`$ECHO $path | $GREP ^.:`
60016   new_path="$path"
60017   if test "x$has_colon" = x; then
60018     # Not in mixed or Windows style, start by that.
60019     new_path=`cmd //c echo $path`
60020   fi
60021 
60022 
60023   input_path="$new_path"
60024   # Check if we need to convert this using DOS-style short mode. If the path
60025   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60026   # take no chances and rewrite it.
60027   # Note: m4 eats our [], so we need to use [ and ] instead.
60028   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60029   if test "x$has_forbidden_chars" != x; then
60030     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60031     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60032   fi
60033 
60034 
60035   windows_path="$new_path"
60036   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60037     unix_path=`$CYGPATH -u "$windows_path"`
60038     new_path="$unix_path"
60039   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60040     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60041     new_path="$unix_path"
60042   fi
60043 
60044   if test "x$path" != "x$new_path"; then
60045     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60046     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60047 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60048   fi
60049 
60050   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60051   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60052 
60053     else
60054       # We're on a unix platform. Hooray! :)
60055       path="$POTENTIAL_FREETYPE_LIB_PATH"
60056       has_space=`$ECHO "$path" | $GREP " "`
60057       if test "x$has_space" != x; then
60058         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60059 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60060         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60061       fi
60062 
60063       # Use eval to expand a potential ~
60064       eval path="$path"
60065       if test ! -f "$path" && test ! -d "$path"; then
60066         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60067       fi
60068 
60069       if test -d "$path"; then
60070         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60071       else
60072         dir="`$DIRNAME "$path"`"
60073         base="`$BASENAME "$path"`"
60074         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60075       fi
60076     fi
60077   fi
60078 
60079 
60080     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60081     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60082 $as_echo_n "checking for freetype includes... " >&6; }
60083     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60084 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60085     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60086     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60087 $as_echo_n "checking for freetype libraries... " >&6; }
60088     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60089 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60090   fi
60091 
60092               if test "x$FOUND_FREETYPE" != xyes; then
60093 
60094   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60095   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60096   METHOD="well-known location"
60097 
60098   # Let's start with an optimistic view of the world :-)
60099   FOUND_FREETYPE=yes
60100 
60101   # First look for the canonical freetype main include file ft2build.h.
60102   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60103     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60104     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60105     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60106       # Fail.
60107       FOUND_FREETYPE=no
60108     fi
60109   fi
60110 
60111   if test "x$FOUND_FREETYPE" = xyes; then
60112     # Include file found, let's continue the sanity check.
60113     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60114 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60115 
60116     # Reset to default value
60117     FREETYPE_BASE_NAME=freetype
60118     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60119     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60120       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60121           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60122         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60123         # for the .6 version explicitly.
60124         FREETYPE_BASE_NAME=freetype.6
60125         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60126         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60127 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60128       else
60129         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60130 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60131         FOUND_FREETYPE=no
60132       fi
60133     else
60134       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60135         # On Windows, we will need both .lib and .dll file.
60136         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60137           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60138 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60139           FOUND_FREETYPE=no
60140         fi
60141       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60142           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60143         # Found lib in isa dir, use that instead.
60144         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60145         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60146 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60147       fi
60148     fi
60149   fi
60150 
60151   if test "x$FOUND_FREETYPE" = xyes; then
60152 
60153   # Only process if variable expands to non-empty
60154 
60155   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60156     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60157 
60158   # Input might be given as Windows format, start by converting to
60159   # unix format.
60160   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60161   new_path=`$CYGPATH -u "$path"`
60162 
60163   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60164   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60165   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60166   # "foo.exe" is OK but "foo" is an error.
60167   #
60168   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60169   # It is also a way to make sure we got the proper file name for the real test later on.
60170   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60171   if test "x$test_shortpath" = x; then
60172     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60173 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60174     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60175   fi
60176 
60177   # Call helper function which possibly converts this using DOS-style short mode.
60178   # If so, the updated path is stored in $new_path.
60179 
60180   input_path="$new_path"
60181   # Check if we need to convert this using DOS-style short mode. If the path
60182   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60183   # take no chances and rewrite it.
60184   # Note: m4 eats our [], so we need to use [ and ] instead.
60185   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60186   if test "x$has_forbidden_chars" != x; then
60187     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60188     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60189     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60190     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60191       # Going to short mode and back again did indeed matter. Since short mode is
60192       # case insensitive, let's make it lowercase to improve readability.
60193       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60194       # Now convert it back to Unix-style (cygpath)
60195       input_path=`$CYGPATH -u "$shortmode_path"`
60196       new_path="$input_path"
60197     fi
60198   fi
60199 
60200   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60201   if test "x$test_cygdrive_prefix" = x; then
60202     # As a simple fix, exclude /usr/bin since it's not a real path.
60203     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60204       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60205       # a path prefixed by /cygdrive for fixpath to work.
60206       new_path="$CYGWIN_ROOT_PATH$input_path"
60207     fi
60208   fi
60209 
60210 
60211   if test "x$path" != "x$new_path"; then
60212     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60213     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60214 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60215   fi
60216 
60217     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60218 
60219   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60220   has_colon=`$ECHO $path | $GREP ^.:`
60221   new_path="$path"
60222   if test "x$has_colon" = x; then
60223     # Not in mixed or Windows style, start by that.
60224     new_path=`cmd //c echo $path`
60225   fi
60226 
60227 
60228   input_path="$new_path"
60229   # Check if we need to convert this using DOS-style short mode. If the path
60230   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60231   # take no chances and rewrite it.
60232   # Note: m4 eats our [], so we need to use [ and ] instead.
60233   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60234   if test "x$has_forbidden_chars" != x; then
60235     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60236     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60237   fi
60238 
60239 
60240   windows_path="$new_path"
60241   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60242     unix_path=`$CYGPATH -u "$windows_path"`
60243     new_path="$unix_path"
60244   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60245     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60246     new_path="$unix_path"
60247   fi
60248 
60249   if test "x$path" != "x$new_path"; then
60250     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60251     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60252 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60253   fi
60254 
60255   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60256   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60257 
60258     else
60259       # We're on a unix platform. Hooray! :)
60260       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60261       has_space=`$ECHO "$path" | $GREP " "`
60262       if test "x$has_space" != x; then
60263         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60264 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60265         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60266       fi
60267 
60268       # Use eval to expand a potential ~
60269       eval path="$path"
60270       if test ! -f "$path" && test ! -d "$path"; then
60271         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60272       fi
60273 
60274       if test -d "$path"; then
60275         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60276       else
60277         dir="`$DIRNAME "$path"`"
60278         base="`$BASENAME "$path"`"
60279         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60280       fi
60281     fi
60282   fi
60283 
60284 
60285   # Only process if variable expands to non-empty
60286 
60287   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60288     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60289 
60290   # Input might be given as Windows format, start by converting to
60291   # unix format.
60292   path="$POTENTIAL_FREETYPE_LIB_PATH"
60293   new_path=`$CYGPATH -u "$path"`
60294 
60295   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60296   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60297   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60298   # "foo.exe" is OK but "foo" is an error.
60299   #
60300   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60301   # It is also a way to make sure we got the proper file name for the real test later on.
60302   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60303   if test "x$test_shortpath" = x; then
60304     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60305 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60306     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60307   fi
60308 
60309   # Call helper function which possibly converts this using DOS-style short mode.
60310   # If so, the updated path is stored in $new_path.
60311 
60312   input_path="$new_path"
60313   # Check if we need to convert this using DOS-style short mode. If the path
60314   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60315   # take no chances and rewrite it.
60316   # Note: m4 eats our [], so we need to use [ and ] instead.
60317   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60318   if test "x$has_forbidden_chars" != x; then
60319     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60320     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60321     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60322     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60323       # Going to short mode and back again did indeed matter. Since short mode is
60324       # case insensitive, let's make it lowercase to improve readability.
60325       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60326       # Now convert it back to Unix-style (cygpath)
60327       input_path=`$CYGPATH -u "$shortmode_path"`
60328       new_path="$input_path"
60329     fi
60330   fi
60331 
60332   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60333   if test "x$test_cygdrive_prefix" = x; then
60334     # As a simple fix, exclude /usr/bin since it's not a real path.
60335     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60336       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60337       # a path prefixed by /cygdrive for fixpath to work.
60338       new_path="$CYGWIN_ROOT_PATH$input_path"
60339     fi
60340   fi
60341 
60342 
60343   if test "x$path" != "x$new_path"; then
60344     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60345     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60346 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60347   fi
60348 
60349     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60350 
60351   path="$POTENTIAL_FREETYPE_LIB_PATH"
60352   has_colon=`$ECHO $path | $GREP ^.:`
60353   new_path="$path"
60354   if test "x$has_colon" = x; then
60355     # Not in mixed or Windows style, start by that.
60356     new_path=`cmd //c echo $path`
60357   fi
60358 
60359 
60360   input_path="$new_path"
60361   # Check if we need to convert this using DOS-style short mode. If the path
60362   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60363   # take no chances and rewrite it.
60364   # Note: m4 eats our [], so we need to use [ and ] instead.
60365   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60366   if test "x$has_forbidden_chars" != x; then
60367     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60368     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60369   fi
60370 
60371 
60372   windows_path="$new_path"
60373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60374     unix_path=`$CYGPATH -u "$windows_path"`
60375     new_path="$unix_path"
60376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60377     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60378     new_path="$unix_path"
60379   fi
60380 
60381   if test "x$path" != "x$new_path"; then
60382     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60383     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60384 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60385   fi
60386 
60387   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60388   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60389 
60390     else
60391       # We're on a unix platform. Hooray! :)
60392       path="$POTENTIAL_FREETYPE_LIB_PATH"
60393       has_space=`$ECHO "$path" | $GREP " "`
60394       if test "x$has_space" != x; then
60395         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60396 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60397         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60398       fi
60399 
60400       # Use eval to expand a potential ~
60401       eval path="$path"
60402       if test ! -f "$path" && test ! -d "$path"; then
60403         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60404       fi
60405 
60406       if test -d "$path"; then
60407         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60408       else
60409         dir="`$DIRNAME "$path"`"
60410         base="`$BASENAME "$path"`"
60411         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60412       fi
60413     fi
60414   fi
60415 
60416 
60417     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60418     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60419 $as_echo_n "checking for freetype includes... " >&6; }
60420     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60421 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60422     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60423     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60424 $as_echo_n "checking for freetype libraries... " >&6; }
60425     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60426 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60427   fi
60428 
60429               fi
60430             fi
60431           fi
60432         fi
60433       fi # end check in well-known locations
60434 
60435       if test "x$FOUND_FREETYPE" != xyes; then
60436 
60437   # Print a helpful message on how to acquire the necessary build dependency.
60438   # freetype is the help tag: freetype, cups, alsa etc
60439   MISSING_DEPENDENCY=freetype
60440 
60441   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60442     cygwin_help $MISSING_DEPENDENCY
60443   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60444     msys_help $MISSING_DEPENDENCY
60445   else
60446     PKGHANDLER_COMMAND=
60447 
60448     case $PKGHANDLER in
60449       apt-get)
60450         apt_help     $MISSING_DEPENDENCY ;;
60451       yum)
60452         yum_help     $MISSING_DEPENDENCY ;;
60453       port)
60454         port_help    $MISSING_DEPENDENCY ;;
60455       pkgutil)
60456         pkgutil_help $MISSING_DEPENDENCY ;;
60457       pkgadd)
60458         pkgadd_help  $MISSING_DEPENDENCY ;;
60459     esac
60460 
60461     if test "x$PKGHANDLER_COMMAND" != x; then
60462       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
60463     fi
60464   fi
60465 
60466         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
60467       fi
60468     fi # end user specified settings
60469 
60470     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
60471     if test "x$FREETYPE_CFLAGS" = x; then
60472 
60473   # Only process if variable expands to non-empty
60474 
60475   if test "x$FREETYPE_INCLUDE_PATH" != x; then
60476     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60477 
60478   # Input might be given as Windows format, start by converting to
60479   # unix format.
60480   path="$FREETYPE_INCLUDE_PATH"
60481   new_path=`$CYGPATH -u "$path"`
60482 
60483   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60484   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60485   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60486   # "foo.exe" is OK but "foo" is an error.
60487   #
60488   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60489   # It is also a way to make sure we got the proper file name for the real test later on.
60490   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60491   if test "x$test_shortpath" = x; then
60492     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60493 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60494     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
60495   fi
60496 
60497   # Call helper function which possibly converts this using DOS-style short mode.
60498   # If so, the updated path is stored in $new_path.
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     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60509     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60510     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60511       # Going to short mode and back again did indeed matter. Since short mode is
60512       # case insensitive, let's make it lowercase to improve readability.
60513       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60514       # Now convert it back to Unix-style (cygpath)
60515       input_path=`$CYGPATH -u "$shortmode_path"`
60516       new_path="$input_path"
60517     fi
60518   fi
60519 
60520   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60521   if test "x$test_cygdrive_prefix" = x; then
60522     # As a simple fix, exclude /usr/bin since it's not a real path.
60523     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60524       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60525       # a path prefixed by /cygdrive for fixpath to work.
60526       new_path="$CYGWIN_ROOT_PATH$input_path"
60527     fi
60528   fi
60529 
60530 
60531   if test "x$path" != "x$new_path"; then
60532     FREETYPE_INCLUDE_PATH="$new_path"
60533     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60534 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60535   fi
60536 
60537     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60538 
60539   path="$FREETYPE_INCLUDE_PATH"
60540   has_colon=`$ECHO $path | $GREP ^.:`
60541   new_path="$path"
60542   if test "x$has_colon" = x; then
60543     # Not in mixed or Windows style, start by that.
60544     new_path=`cmd //c echo $path`
60545   fi
60546 
60547 
60548   input_path="$new_path"
60549   # Check if we need to convert this using DOS-style short mode. If the path
60550   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60551   # take no chances and rewrite it.
60552   # Note: m4 eats our [], so we need to use [ and ] instead.
60553   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60554   if test "x$has_forbidden_chars" != x; then
60555     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60556     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60557   fi
60558 
60559 
60560   windows_path="$new_path"
60561   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60562     unix_path=`$CYGPATH -u "$windows_path"`
60563     new_path="$unix_path"
60564   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60565     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60566     new_path="$unix_path"
60567   fi
60568 
60569   if test "x$path" != "x$new_path"; then
60570     FREETYPE_INCLUDE_PATH="$new_path"
60571     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60572 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60573   fi
60574 
60575   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60576   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60577 
60578     else
60579       # We're on a unix platform. Hooray! :)
60580       path="$FREETYPE_INCLUDE_PATH"
60581       has_space=`$ECHO "$path" | $GREP " "`
60582       if test "x$has_space" != x; then
60583         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60584 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60585         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60586       fi
60587 
60588       # Use eval to expand a potential ~
60589       eval path="$path"
60590       if test ! -f "$path" && test ! -d "$path"; then
60591         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60592       fi
60593 
60594       if test -d "$path"; then
60595         FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60596       else
60597         dir="`$DIRNAME "$path"`"
60598         base="`$BASENAME "$path"`"
60599         FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60600       fi
60601     fi
60602   fi
60603 
60604       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
60605         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
60606       else
60607         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
60608       fi
60609     fi
60610 
60611     if test "x$FREETYPE_LIBS" = x; then
60612 
60613   # Only process if variable expands to non-empty
60614 
60615   if test "x$FREETYPE_LIB_PATH" != x; then
60616     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60617 
60618   # Input might be given as Windows format, start by converting to
60619   # unix format.
60620   path="$FREETYPE_LIB_PATH"
60621   new_path=`$CYGPATH -u "$path"`
60622 
60623   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60624   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60625   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60626   # "foo.exe" is OK but "foo" is an error.
60627   #
60628   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60629   # It is also a way to make sure we got the proper file name for the real test later on.
60630   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60631   if test "x$test_shortpath" = x; then
60632     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60633 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60634     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
60635   fi
60636 
60637   # Call helper function which possibly converts this using DOS-style short mode.
60638   # If so, the updated path is stored in $new_path.
60639 
60640   input_path="$new_path"
60641   # Check if we need to convert this using DOS-style short mode. If the path
60642   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60643   # take no chances and rewrite it.
60644   # Note: m4 eats our [], so we need to use [ and ] instead.
60645   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60646   if test "x$has_forbidden_chars" != x; then
60647     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60648     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60649     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60650     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60651       # Going to short mode and back again did indeed matter. Since short mode is
60652       # case insensitive, let's make it lowercase to improve readability.
60653       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60654       # Now convert it back to Unix-style (cygpath)
60655       input_path=`$CYGPATH -u "$shortmode_path"`
60656       new_path="$input_path"
60657     fi
60658   fi
60659 
60660   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60661   if test "x$test_cygdrive_prefix" = x; then
60662     # As a simple fix, exclude /usr/bin since it's not a real path.
60663     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60664       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60665       # a path prefixed by /cygdrive for fixpath to work.
60666       new_path="$CYGWIN_ROOT_PATH$input_path"
60667     fi
60668   fi
60669 
60670 
60671   if test "x$path" != "x$new_path"; then
60672     FREETYPE_LIB_PATH="$new_path"
60673     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
60674 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60675   fi
60676 
60677     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60678 
60679   path="$FREETYPE_LIB_PATH"
60680   has_colon=`$ECHO $path | $GREP ^.:`
60681   new_path="$path"
60682   if test "x$has_colon" = x; then
60683     # Not in mixed or Windows style, start by that.
60684     new_path=`cmd //c echo $path`
60685   fi
60686 
60687 
60688   input_path="$new_path"
60689   # Check if we need to convert this using DOS-style short mode. If the path
60690   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60691   # take no chances and rewrite it.
60692   # Note: m4 eats our [], so we need to use [ and ] instead.
60693   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60694   if test "x$has_forbidden_chars" != x; then
60695     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60696     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60697   fi
60698 
60699 
60700   windows_path="$new_path"
60701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60702     unix_path=`$CYGPATH -u "$windows_path"`
60703     new_path="$unix_path"
60704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60705     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60706     new_path="$unix_path"
60707   fi
60708 
60709   if test "x$path" != "x$new_path"; then
60710     FREETYPE_LIB_PATH="$new_path"
60711     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
60712 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60713   fi
60714 
60715   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60716   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60717 
60718     else
60719       # We're on a unix platform. Hooray! :)
60720       path="$FREETYPE_LIB_PATH"
60721       has_space=`$ECHO "$path" | $GREP " "`
60722       if test "x$has_space" != x; then
60723         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60724 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60725         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60726       fi
60727 
60728       # Use eval to expand a potential ~
60729       eval path="$path"
60730       if test ! -f "$path" && test ! -d "$path"; then
60731         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60732       fi
60733 
60734       if test -d "$path"; then
60735         FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60736       else
60737         dir="`$DIRNAME "$path"`"
60738         base="`$BASENAME "$path"`"
60739         FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60740       fi
60741     fi
60742   fi
60743 
60744       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60745         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
60746       else
60747         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
60748       fi
60749     fi
60750 
60751     # Try to compile it
60752     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
60753 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
60754     ac_ext=cpp
60755 ac_cpp='$CXXCPP $CPPFLAGS'
60756 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
60757 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
60758 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
60759 
60760     PREV_CXXCFLAGS="$CXXFLAGS"
60761     PREV_LIBS="$LIBS"
60762     PREV_CXX="$CXX"
60763     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
60764     LIBS="$LIBS $FREETYPE_LIBS"
60765     CXX="$FIXPATH $CXX"
60766     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60767 /* end confdefs.h.  */
60768 
60769           #include<ft2build.h>
60770           #include FT_FREETYPE_H
60771           int main () {
60772             FT_Init_FreeType(NULL);
60773             return 0;
60774           }
60775 
60776 _ACEOF
60777 if ac_fn_cxx_try_link "$LINENO"; then :
60778 
60779           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60780 $as_echo "yes" >&6; }
60781 
60782 else
60783 
60784           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60785 $as_echo "no" >&6; }
60786           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
60787 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
60788           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
60789 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
60790 
60791 
60792   # Print a helpful message on how to acquire the necessary build dependency.
60793   # freetype is the help tag: freetype, cups, alsa etc
60794   MISSING_DEPENDENCY=freetype
60795 
60796   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60797     cygwin_help $MISSING_DEPENDENCY
60798   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60799     msys_help $MISSING_DEPENDENCY
60800   else
60801     PKGHANDLER_COMMAND=
60802 
60803     case $PKGHANDLER in
60804       apt-get)
60805         apt_help     $MISSING_DEPENDENCY ;;
60806       yum)
60807         yum_help     $MISSING_DEPENDENCY ;;
60808       port)
60809         port_help    $MISSING_DEPENDENCY ;;
60810       pkgutil)
60811         pkgutil_help $MISSING_DEPENDENCY ;;
60812       pkgadd)
60813         pkgadd_help  $MISSING_DEPENDENCY ;;
60814     esac
60815 
60816     if test "x$PKGHANDLER_COMMAND" != x; then
60817       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
60818     fi
60819   fi
60820 
60821 
60822           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
60823 
60824 
60825 fi
60826 rm -f core conftest.err conftest.$ac_objext \
60827     conftest$ac_exeext conftest.$ac_ext
60828     CXXCFLAGS="$PREV_CXXFLAGS"
60829     LIBS="$PREV_LIBS"
60830     CXX="$PREV_CXX"
60831     ac_ext=cpp
60832 ac_cpp='$CXXCPP $CPPFLAGS'
60833 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
60834 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
60835 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
60836 
60837 
60838     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
60839 $as_echo_n "checking if we should bundle freetype... " >&6; }
60840     if test "x$BUNDLE_FREETYPE" = xyes; then
60841       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
60842     fi
60843     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
60844 $as_echo "$BUNDLE_FREETYPE" >&6; }
60845 
60846   fi # end freetype needed
60847 
60848 
60849 
60850 
60851 
60852 
60853 
60854 # Check whether --with-alsa was given.
60855 if test "${with_alsa+set}" = set; then :
60856   withval=$with_alsa;
60857 fi
60858 
60859 
60860 # Check whether --with-alsa-include was given.
60861 if test "${with_alsa_include+set}" = set; then :
60862   withval=$with_alsa_include;
60863 fi
60864 
60865 
60866 # Check whether --with-alsa-lib was given.
60867 if test "${with_alsa_lib+set}" = set; then :
60868   withval=$with_alsa_lib;
60869 fi
60870 
60871 
60872   if test "x$NEEDS_LIB_ALSA" = xfalse; then
60873     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
60874         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
60875         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
60876       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
60877 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
60878     fi
60879     ALSA_CFLAGS=
60880     ALSA_LIBS=
60881   else
60882     ALSA_FOUND=no
60883 
60884     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
60885       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
60886     fi
60887 
60888     if test "x${with_alsa}" != x; then
60889       ALSA_LIBS="-L${with_alsa}/lib -lasound"
60890       ALSA_CFLAGS="-I${with_alsa}/include"
60891       ALSA_FOUND=yes
60892     fi
60893     if test "x${with_alsa_include}" != x; then
60894       ALSA_CFLAGS="-I${with_alsa_include}"
60895       ALSA_FOUND=yes
60896     fi
60897     if test "x${with_alsa_lib}" != x; then
60898       ALSA_LIBS="-L${with_alsa_lib} -lasound"
60899       ALSA_FOUND=yes
60900     fi
60901     # Do not try pkg-config if we have a sysroot set.
60902     if test "x$SYSROOT" = x; then
60903       if test "x$ALSA_FOUND" = xno; then
60904 
60905 pkg_failed=no
60906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
60907 $as_echo_n "checking for ALSA... " >&6; }
60908 
60909 if test -n "$ALSA_CFLAGS"; then
60910     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
60911  elif test -n "$PKG_CONFIG"; then
60912     if test -n "$PKG_CONFIG" && \
60913     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
60914   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
60915   ac_status=$?
60916   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60917   test $ac_status = 0; }; then
60918   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
60919 else
60920   pkg_failed=yes
60921 fi
60922  else
60923     pkg_failed=untried
60924 fi
60925 if test -n "$ALSA_LIBS"; then
60926     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
60927  elif test -n "$PKG_CONFIG"; then
60928     if test -n "$PKG_CONFIG" && \
60929     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
60930   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
60931   ac_status=$?
60932   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60933   test $ac_status = 0; }; then
60934   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
60935 else
60936   pkg_failed=yes
60937 fi
60938  else
60939     pkg_failed=untried
60940 fi
60941 
60942 
60943 
60944 if test $pkg_failed = yes; then
60945 
60946 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
60947         _pkg_short_errors_supported=yes
60948 else
60949         _pkg_short_errors_supported=no
60950 fi
60951         if test $_pkg_short_errors_supported = yes; then
60952                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
60953         else
60954                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
60955         fi
60956         # Put the nasty error message in config.log where it belongs
60957         echo "$ALSA_PKG_ERRORS" >&5
60958 
60959         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60960 $as_echo "no" >&6; }
60961                 ALSA_FOUND=no
60962 elif test $pkg_failed = untried; then
60963         ALSA_FOUND=no
60964 else
60965         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
60966         ALSA_LIBS=$pkg_cv_ALSA_LIBS
60967         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60968 $as_echo "yes" >&6; }
60969         ALSA_FOUND=yes
60970 fi
60971       fi
60972     fi
60973     if test "x$ALSA_FOUND" = xno; then
60974       for ac_header in alsa/asoundlib.h
60975 do :
60976   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
60977 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
60978   cat >>confdefs.h <<_ACEOF
60979 #define HAVE_ALSA_ASOUNDLIB_H 1
60980 _ACEOF
60981 
60982             ALSA_FOUND=yes
60983             ALSA_CFLAGS=-Iignoreme
60984             ALSA_LIBS=-lasound
60985             DEFAULT_ALSA=yes
60986 
60987 else
60988   ALSA_FOUND=no
60989 
60990 fi
60991 
60992 done
60993 
60994     fi
60995     if test "x$ALSA_FOUND" = xno; then
60996 
60997   # Print a helpful message on how to acquire the necessary build dependency.
60998   # alsa is the help tag: freetype, cups, alsa etc
60999   MISSING_DEPENDENCY=alsa
61000 
61001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61002     cygwin_help $MISSING_DEPENDENCY
61003   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61004     msys_help $MISSING_DEPENDENCY
61005   else
61006     PKGHANDLER_COMMAND=
61007 
61008     case $PKGHANDLER in
61009       apt-get)
61010         apt_help     $MISSING_DEPENDENCY ;;
61011       yum)
61012         yum_help     $MISSING_DEPENDENCY ;;
61013       port)
61014         port_help    $MISSING_DEPENDENCY ;;
61015       pkgutil)
61016         pkgutil_help $MISSING_DEPENDENCY ;;
61017       pkgadd)
61018         pkgadd_help  $MISSING_DEPENDENCY ;;
61019     esac
61020 
61021     if test "x$PKGHANDLER_COMMAND" != x; then
61022       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
61023     fi
61024   fi
61025 
61026       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
61027     fi
61028   fi
61029 
61030 
61031 
61032 
61033 
61034 
61035 # Check whether --with-libffi was given.
61036 if test "${with_libffi+set}" = set; then :
61037   withval=$with_libffi;
61038 fi
61039 
61040 
61041 # Check whether --with-libffi-include was given.
61042 if test "${with_libffi_include+set}" = set; then :
61043   withval=$with_libffi_include;
61044 fi
61045 
61046 
61047 # Check whether --with-libffi-lib was given.
61048 if test "${with_libffi_lib+set}" = set; then :
61049   withval=$with_libffi_lib;
61050 fi
61051 
61052 
61053   if test "x$NEEDS_LIB_FFI" = xfalse; then
61054     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
61055         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
61056         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
61057       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
61058 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
61059     fi
61060     LIBFFI_CFLAGS=
61061     LIBFFI_LIBS=
61062   else
61063     LIBFFI_FOUND=no
61064 
61065     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
61066       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
61067     fi
61068 
61069     if test "x${with_libffi}" != x; then
61070       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
61071       LIBFFI_CFLAGS="-I${with_libffi}/include"
61072       LIBFFI_FOUND=yes
61073     fi
61074     if test "x${with_libffi_include}" != x; then
61075       LIBFFI_CFLAGS="-I${with_libffi_include}"
61076       LIBFFI_FOUND=yes
61077     fi
61078     if test "x${with_libffi_lib}" != x; then
61079       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
61080       LIBFFI_FOUND=yes
61081     fi
61082     # Do not try pkg-config if we have a sysroot set.
61083     if test "x$SYSROOT" = x; then
61084       if test "x$LIBFFI_FOUND" = xno; then
61085         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
61086 
61087 pkg_failed=no
61088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
61089 $as_echo_n "checking for LIBFFI... " >&6; }
61090 
61091 if test -n "$LIBFFI_CFLAGS"; then
61092     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
61093  elif test -n "$PKG_CONFIG"; then
61094     if test -n "$PKG_CONFIG" && \
61095     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
61096   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
61097   ac_status=$?
61098   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61099   test $ac_status = 0; }; then
61100   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
61101 else
61102   pkg_failed=yes
61103 fi
61104  else
61105     pkg_failed=untried
61106 fi
61107 if test -n "$LIBFFI_LIBS"; then
61108     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
61109  elif test -n "$PKG_CONFIG"; then
61110     if test -n "$PKG_CONFIG" && \
61111     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
61112   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
61113   ac_status=$?
61114   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61115   test $ac_status = 0; }; then
61116   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
61117 else
61118   pkg_failed=yes
61119 fi
61120  else
61121     pkg_failed=untried
61122 fi
61123 
61124 
61125 
61126 if test $pkg_failed = yes; then
61127 
61128 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
61129         _pkg_short_errors_supported=yes
61130 else
61131         _pkg_short_errors_supported=no
61132 fi
61133         if test $_pkg_short_errors_supported = yes; then
61134                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
61135         else
61136                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
61137         fi
61138         # Put the nasty error message in config.log where it belongs
61139         echo "$LIBFFI_PKG_ERRORS" >&5
61140 
61141         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61142 $as_echo "no" >&6; }
61143                 LIBFFI_FOUND=no
61144 elif test $pkg_failed = untried; then
61145         LIBFFI_FOUND=no
61146 else
61147         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
61148         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
61149         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
61150 $as_echo "yes" >&6; }
61151         LIBFFI_FOUND=yes
61152 fi
61153       fi
61154     fi
61155     if test "x$LIBFFI_FOUND" = xno; then
61156       for ac_header in ffi.h
61157 do :
61158   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
61159 if test "x$ac_cv_header_ffi_h" = xyes; then :
61160   cat >>confdefs.h <<_ACEOF
61161 #define HAVE_FFI_H 1
61162 _ACEOF
61163 
61164             LIBFFI_FOUND=yes
61165             LIBFFI_CFLAGS=
61166             LIBFFI_LIBS=-lffi
61167 
61168 else
61169   LIBFFI_FOUND=no
61170 
61171 fi
61172 
61173 done
61174 
61175     fi
61176     if test "x$LIBFFI_FOUND" = xno; then
61177 
61178   # Print a helpful message on how to acquire the necessary build dependency.
61179   # ffi is the help tag: freetype, cups, alsa etc
61180   MISSING_DEPENDENCY=ffi
61181 
61182   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61183     cygwin_help $MISSING_DEPENDENCY
61184   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61185     msys_help $MISSING_DEPENDENCY
61186   else
61187     PKGHANDLER_COMMAND=
61188 
61189     case $PKGHANDLER in
61190       apt-get)
61191         apt_help     $MISSING_DEPENDENCY ;;
61192       yum)
61193         yum_help     $MISSING_DEPENDENCY ;;
61194       port)
61195         port_help    $MISSING_DEPENDENCY ;;
61196       pkgutil)
61197         pkgutil_help $MISSING_DEPENDENCY ;;
61198       pkgadd)
61199         pkgadd_help  $MISSING_DEPENDENCY ;;
61200     esac
61201 
61202     if test "x$PKGHANDLER_COMMAND" != x; then
61203       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
61204     fi
61205   fi
61206 
61207       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
61208     fi
61209 
61210     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
61211 $as_echo_n "checking if libffi works... " >&6; }
61212     ac_ext=c
61213 ac_cpp='$CPP $CPPFLAGS'
61214 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
61215 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
61216 ac_compiler_gnu=$ac_cv_c_compiler_gnu
61217 
61218     OLD_CFLAGS="$CFLAGS"
61219     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
61220     OLD_LIBS="$LIBS"
61221     LIBS="$LIBS $LIBFFI_LIBS"
61222     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61223 /* end confdefs.h.  */
61224 #include <ffi.h>
61225 int
61226 main ()
61227 {
61228 
61229           ffi_call(NULL, NULL, NULL, NULL);
61230           return 0;
61231 
61232   ;
61233   return 0;
61234 }
61235 _ACEOF
61236 if ac_fn_c_try_link "$LINENO"; then :
61237   LIBFFI_WORKS=yes
61238 else
61239   LIBFFI_WORKS=no
61240 
61241 fi
61242 rm -f core conftest.err conftest.$ac_objext \
61243     conftest$ac_exeext conftest.$ac_ext
61244     CFLAGS="$OLD_CFLAGS"
61245     LIBS="$OLD_LIBS"
61246     ac_ext=cpp
61247 ac_cpp='$CXXCPP $CPPFLAGS'
61248 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
61249 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
61250 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
61251 
61252     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
61253 $as_echo "$LIBFFI_WORKS" >&6; }
61254 
61255     if test "x$LIBFFI_WORKS" = xno; then
61256 
61257   # Print a helpful message on how to acquire the necessary build dependency.
61258   # ffi is the help tag: freetype, cups, alsa etc
61259   MISSING_DEPENDENCY=ffi
61260 
61261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61262     cygwin_help $MISSING_DEPENDENCY
61263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61264     msys_help $MISSING_DEPENDENCY
61265   else
61266     PKGHANDLER_COMMAND=
61267 
61268     case $PKGHANDLER in
61269       apt-get)
61270         apt_help     $MISSING_DEPENDENCY ;;
61271       yum)
61272         yum_help     $MISSING_DEPENDENCY ;;
61273       port)
61274         port_help    $MISSING_DEPENDENCY ;;
61275       pkgutil)
61276         pkgutil_help $MISSING_DEPENDENCY ;;
61277       pkgadd)
61278         pkgadd_help  $MISSING_DEPENDENCY ;;
61279     esac
61280 
61281     if test "x$PKGHANDLER_COMMAND" != x; then
61282       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
61283     fi
61284   fi
61285 
61286       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
61287     fi
61288   fi
61289 
61290 
61291 
61292 
61293 
61294   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
61295     # Extract the first word of "llvm-config", so it can be a program name with args.
61296 set dummy llvm-config; ac_word=$2
61297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61298 $as_echo_n "checking for $ac_word... " >&6; }
61299 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
61300   $as_echo_n "(cached) " >&6
61301 else
61302   if test -n "$LLVM_CONFIG"; then
61303   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
61304 else
61305 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61306 for as_dir in $PATH
61307 do
61308   IFS=$as_save_IFS
61309   test -z "$as_dir" && as_dir=.
61310     for ac_exec_ext in '' $ac_executable_extensions; do
61311   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61312     ac_cv_prog_LLVM_CONFIG="llvm-config"
61313     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61314     break 2
61315   fi
61316 done
61317   done
61318 IFS=$as_save_IFS
61319 
61320 fi
61321 fi
61322 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
61323 if test -n "$LLVM_CONFIG"; then
61324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
61325 $as_echo "$LLVM_CONFIG" >&6; }
61326 else
61327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61328 $as_echo "no" >&6; }
61329 fi
61330 
61331 
61332 
61333     if test "x$LLVM_CONFIG" != xllvm-config; then
61334       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
61335     fi
61336 
61337     llvm_components="jit mcjit engine nativecodegen native"
61338     unset LLVM_CFLAGS
61339     for flag in $("$LLVM_CONFIG" --cxxflags); do
61340       if echo "${flag}" | grep -q '^-[ID]'; then
61341         if test "${flag}" != "-D_DEBUG" ; then
61342           if test "${LLVM_CFLAGS}" != "" ; then
61343             LLVM_CFLAGS="${LLVM_CFLAGS} "
61344           fi
61345           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
61346         fi
61347       fi
61348     done
61349     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
61350     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
61351 
61352     unset LLVM_LDFLAGS
61353     for flag in $("${LLVM_CONFIG}" --ldflags); do
61354       if echo "${flag}" | grep -q '^-L'; then
61355         if test "${LLVM_LDFLAGS}" != ""; then
61356           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
61357         fi
61358         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
61359       fi
61360     done
61361 
61362     unset LLVM_LIBS
61363     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
61364       if echo "${flag}" | grep -q '^-l'; then
61365         if test "${LLVM_LIBS}" != ""; then
61366           LLVM_LIBS="${LLVM_LIBS} "
61367         fi
61368         LLVM_LIBS="${LLVM_LIBS}${flag}"
61369       fi
61370     done
61371 
61372     # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
61373     # always properly detect -ltinfo
61374     LLVM_LIBS="${LLVM_LIBS} -ltinfo"
61375 
61376 
61377 
61378 
61379   fi
61380 
61381 
61382 
61383 # Check whether --with-libjpeg was given.
61384 if test "${with_libjpeg+set}" = set; then :
61385   withval=$with_libjpeg;
61386 fi
61387 
61388 
61389   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
61390 $as_echo_n "checking for which libjpeg to use... " >&6; }
61391   # default is bundled
61392   DEFAULT_LIBJPEG=bundled
61393   # if user didn't specify, use DEFAULT_LIBJPEG
61394   if test "x${with_libjpeg}" = "x"; then
61395     with_libjpeg=${DEFAULT_LIBJPEG}
61396   fi
61397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
61398 $as_echo "${with_libjpeg}" >&6; }
61399 
61400   if test "x${with_libjpeg}" = "xbundled"; then
61401     USE_EXTERNAL_LIBJPEG=false
61402   elif test "x${with_libjpeg}" = "xsystem"; then
61403     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
61404 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
61405 
61406 else
61407    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
61408 fi
61409 
61410 
61411     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
61412 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
61413 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
61414   $as_echo_n "(cached) " >&6
61415 else
61416   ac_check_lib_save_LIBS=$LIBS
61417 LIBS="-ljpeg  $LIBS"
61418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61419 /* end confdefs.h.  */
61420 
61421 /* Override any GCC internal prototype to avoid an error.
61422    Use char because int might match the return type of a GCC
61423    builtin and then its argument prototype would still apply.  */
61424 #ifdef __cplusplus
61425 extern "C"
61426 #endif
61427 char jpeg_CreateDecompress ();
61428 int
61429 main ()
61430 {
61431 return jpeg_CreateDecompress ();
61432   ;
61433   return 0;
61434 }
61435 _ACEOF
61436 if ac_fn_cxx_try_link "$LINENO"; then :
61437   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
61438 else
61439   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
61440 fi
61441 rm -f core conftest.err conftest.$ac_objext \
61442     conftest$ac_exeext conftest.$ac_ext
61443 LIBS=$ac_check_lib_save_LIBS
61444 fi
61445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
61446 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
61447 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
61448   cat >>confdefs.h <<_ACEOF
61449 #define HAVE_LIBJPEG 1
61450 _ACEOF
61451 
61452   LIBS="-ljpeg $LIBS"
61453 
61454 else
61455    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
61456 fi
61457 
61458 
61459     USE_EXTERNAL_LIBJPEG=true
61460   else
61461     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
61462   fi
61463 
61464 
61465 
61466 
61467 
61468 # Check whether --with-giflib was given.
61469 if test "${with_giflib+set}" = set; then :
61470   withval=$with_giflib;
61471 fi
61472 
61473 
61474   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
61475 $as_echo_n "checking for which giflib to use... " >&6; }
61476   # default is bundled
61477   DEFAULT_GIFLIB=bundled
61478   # if user didn't specify, use DEFAULT_GIFLIB
61479   if test "x${with_giflib}" = "x"; then
61480     with_giflib=${DEFAULT_GIFLIB}
61481   fi
61482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
61483 $as_echo "${with_giflib}" >&6; }
61484 
61485   if test "x${with_giflib}" = "xbundled"; then
61486     USE_EXTERNAL_LIBGIF=false
61487   elif test "x${with_giflib}" = "xsystem"; then
61488     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
61489 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
61490 
61491 else
61492    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
61493 fi
61494 
61495 
61496     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
61497 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
61498 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
61499   $as_echo_n "(cached) " >&6
61500 else
61501   ac_check_lib_save_LIBS=$LIBS
61502 LIBS="-lgif  $LIBS"
61503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61504 /* end confdefs.h.  */
61505 
61506 /* Override any GCC internal prototype to avoid an error.
61507    Use char because int might match the return type of a GCC
61508    builtin and then its argument prototype would still apply.  */
61509 #ifdef __cplusplus
61510 extern "C"
61511 #endif
61512 char DGifGetCode ();
61513 int
61514 main ()
61515 {
61516 return DGifGetCode ();
61517   ;
61518   return 0;
61519 }
61520 _ACEOF
61521 if ac_fn_cxx_try_link "$LINENO"; then :
61522   ac_cv_lib_gif_DGifGetCode=yes
61523 else
61524   ac_cv_lib_gif_DGifGetCode=no
61525 fi
61526 rm -f core conftest.err conftest.$ac_objext \
61527     conftest$ac_exeext conftest.$ac_ext
61528 LIBS=$ac_check_lib_save_LIBS
61529 fi
61530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
61531 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
61532 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
61533   cat >>confdefs.h <<_ACEOF
61534 #define HAVE_LIBGIF 1
61535 _ACEOF
61536 
61537   LIBS="-lgif $LIBS"
61538 
61539 else
61540    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
61541 fi
61542 
61543 
61544     USE_EXTERNAL_LIBGIF=true
61545   else
61546     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
61547   fi
61548 
61549 
61550 
61551 
61552 
61553 # Check whether --with-libpng was given.
61554 if test "${with_libpng+set}" = set; then :
61555   withval=$with_libpng;
61556 fi
61557 
61558 
61559   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
61560 $as_echo_n "checking for which libpng to use... " >&6; }
61561 
61562   # default is bundled
61563   DEFAULT_LIBPNG=bundled
61564   # if user didn't specify, use DEFAULT_LIBPNG
61565   if test "x${with_libpng}" = "x"; then
61566       with_libpng=${DEFAULT_LIBPNG}
61567   fi
61568 
61569   if test "x${with_libpng}" = "xbundled"; then
61570       USE_EXTERNAL_LIBPNG=false
61571       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
61572 $as_echo "bundled" >&6; }
61573   elif test "x${with_libpng}" = "xsystem"; then
61574 
61575 pkg_failed=no
61576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
61577 $as_echo_n "checking for PNG... " >&6; }
61578 
61579 if test -n "$PNG_CFLAGS"; then
61580     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
61581  elif test -n "$PKG_CONFIG"; then
61582     if test -n "$PKG_CONFIG" && \
61583     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
61584   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
61585   ac_status=$?
61586   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61587   test $ac_status = 0; }; then
61588   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
61589 else
61590   pkg_failed=yes
61591 fi
61592  else
61593     pkg_failed=untried
61594 fi
61595 if test -n "$PNG_LIBS"; then
61596     pkg_cv_PNG_LIBS="$PNG_LIBS"
61597  elif test -n "$PKG_CONFIG"; then
61598     if test -n "$PKG_CONFIG" && \
61599     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
61600   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
61601   ac_status=$?
61602   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61603   test $ac_status = 0; }; then
61604   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
61605 else
61606   pkg_failed=yes
61607 fi
61608  else
61609     pkg_failed=untried
61610 fi
61611 
61612 
61613 
61614 if test $pkg_failed = yes; then
61615 
61616 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
61617         _pkg_short_errors_supported=yes
61618 else
61619         _pkg_short_errors_supported=no
61620 fi
61621         if test $_pkg_short_errors_supported = yes; then
61622                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
61623         else
61624                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
61625         fi
61626         # Put the nasty error message in config.log where it belongs
61627         echo "$PNG_PKG_ERRORS" >&5
61628 
61629         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61630 $as_echo "no" >&6; }
61631                  LIBPNG_FOUND=no
61632 elif test $pkg_failed = untried; then
61633          LIBPNG_FOUND=no
61634 else
61635         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
61636         PNG_LIBS=$pkg_cv_PNG_LIBS
61637         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
61638 $as_echo "yes" >&6; }
61639          LIBPNG_FOUND=yes
61640 fi
61641       if test "x${LIBPNG_FOUND}" = "xyes"; then
61642           USE_EXTERNAL_LIBPNG=true
61643           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
61644 $as_echo "system" >&6; }
61645       else
61646           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
61647 $as_echo "system not found" >&6; }
61648           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
61649       fi
61650   else
61651       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
61652   fi
61653 
61654 
61655 
61656 
61657 
61658 # Check whether --with-zlib was given.
61659 if test "${with_zlib+set}" = set; then :
61660   withval=$with_zlib;
61661 fi
61662 
61663 
61664   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
61665 $as_echo_n "checking for compress in -lz... " >&6; }
61666 if ${ac_cv_lib_z_compress+:} false; then :
61667   $as_echo_n "(cached) " >&6
61668 else
61669   ac_check_lib_save_LIBS=$LIBS
61670 LIBS="-lz  $LIBS"
61671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61672 /* end confdefs.h.  */
61673 
61674 /* Override any GCC internal prototype to avoid an error.
61675    Use char because int might match the return type of a GCC
61676    builtin and then its argument prototype would still apply.  */
61677 #ifdef __cplusplus
61678 extern "C"
61679 #endif
61680 char compress ();
61681 int
61682 main ()
61683 {
61684 return compress ();
61685   ;
61686   return 0;
61687 }
61688 _ACEOF
61689 if ac_fn_cxx_try_link "$LINENO"; then :
61690   ac_cv_lib_z_compress=yes
61691 else
61692   ac_cv_lib_z_compress=no
61693 fi
61694 rm -f core conftest.err conftest.$ac_objext \
61695     conftest$ac_exeext conftest.$ac_ext
61696 LIBS=$ac_check_lib_save_LIBS
61697 fi
61698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
61699 $as_echo "$ac_cv_lib_z_compress" >&6; }
61700 if test "x$ac_cv_lib_z_compress" = xyes; then :
61701    ZLIB_FOUND=yes
61702 else
61703    ZLIB_FOUND=no
61704 fi
61705 
61706 
61707   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
61708 $as_echo_n "checking for which zlib to use... " >&6; }
61709 
61710   DEFAULT_ZLIB=system
61711   if test "x$OPENJDK_TARGET_OS" = xwindows; then
61712     # On windows default is bundled...on others default is system
61713     DEFAULT_ZLIB=bundled
61714   fi
61715 
61716   if test "x${ZLIB_FOUND}" != "xyes"; then
61717     # If we don't find any system...set default to bundled
61718     DEFAULT_ZLIB=bundled
61719   fi
61720 
61721   # If user didn't specify, use DEFAULT_ZLIB
61722   if test "x${with_zlib}" = "x"; then
61723     with_zlib=${DEFAULT_ZLIB}
61724   fi
61725 
61726   if test "x${with_zlib}" = "xbundled"; then
61727     USE_EXTERNAL_LIBZ=false
61728     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
61729 $as_echo "bundled" >&6; }
61730   elif test "x${with_zlib}" = "xsystem"; then
61731     if test "x${ZLIB_FOUND}" = "xyes"; then
61732       USE_EXTERNAL_LIBZ=true
61733       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
61734 $as_echo "system" >&6; }
61735     else
61736       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
61737 $as_echo "system not found" >&6; }
61738       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
61739     fi
61740   else
61741     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
61742   fi
61743 
61744 
61745 
61746 
61747 
61748 # Check whether --with-lcms was given.
61749 if test "${with_lcms+set}" = set; then :
61750   withval=$with_lcms;
61751 fi
61752 
61753 
61754   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
61755 $as_echo_n "checking for which lcms to use... " >&6; }
61756 
61757   DEFAULT_LCMS=bundled
61758   # If user didn't specify, use DEFAULT_LCMS
61759   if test "x${with_lcms}" = "x"; then
61760       with_lcms=${DEFAULT_LCMS}
61761   fi
61762 
61763   if test "x${with_lcms}" = "xbundled"; then
61764     USE_EXTERNAL_LCMS=false
61765     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
61766 $as_echo "bundled" >&6; }
61767   elif test "x${with_lcms}" = "xsystem"; then
61768     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
61769 $as_echo "system" >&6; }
61770 
61771 pkg_failed=no
61772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
61773 $as_echo_n "checking for LCMS... " >&6; }
61774 
61775 if test -n "$LCMS_CFLAGS"; then
61776     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
61777  elif test -n "$PKG_CONFIG"; then
61778     if test -n "$PKG_CONFIG" && \
61779     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
61780   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
61781   ac_status=$?
61782   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61783   test $ac_status = 0; }; then
61784   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
61785 else
61786   pkg_failed=yes
61787 fi
61788  else
61789     pkg_failed=untried
61790 fi
61791 if test -n "$LCMS_LIBS"; then
61792     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
61793  elif test -n "$PKG_CONFIG"; then
61794     if test -n "$PKG_CONFIG" && \
61795     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
61796   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
61797   ac_status=$?
61798   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61799   test $ac_status = 0; }; then
61800   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
61801 else
61802   pkg_failed=yes
61803 fi
61804  else
61805     pkg_failed=untried
61806 fi
61807 
61808 
61809 
61810 if test $pkg_failed = yes; then
61811 
61812 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
61813         _pkg_short_errors_supported=yes
61814 else
61815         _pkg_short_errors_supported=no
61816 fi
61817         if test $_pkg_short_errors_supported = yes; then
61818                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
61819         else
61820                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
61821         fi
61822         # Put the nasty error message in config.log where it belongs
61823         echo "$LCMS_PKG_ERRORS" >&5
61824 
61825         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61826 $as_echo "no" >&6; }
61827                 LCMS_FOUND=no
61828 elif test $pkg_failed = untried; then
61829         LCMS_FOUND=no
61830 else
61831         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
61832         LCMS_LIBS=$pkg_cv_LCMS_LIBS
61833         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
61834 $as_echo "yes" >&6; }
61835         LCMS_FOUND=yes
61836 fi
61837     if test "x${LCMS_FOUND}" = "xyes"; then
61838       USE_EXTERNAL_LCMS=true
61839     else
61840       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
61841     fi
61842   else
61843     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
61844   fi
61845 
61846 
61847 
61848 
61849 
61850 
61851 
61852 
61853 
61854 
61855 
61856   # Setup libm (the maths library)
61857   if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
61858     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
61859 $as_echo_n "checking for cos in -lm... " >&6; }
61860 if ${ac_cv_lib_m_cos+:} false; then :
61861   $as_echo_n "(cached) " >&6
61862 else
61863   ac_check_lib_save_LIBS=$LIBS
61864 LIBS="-lm  $LIBS"
61865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61866 /* end confdefs.h.  */
61867 
61868 /* Override any GCC internal prototype to avoid an error.
61869    Use char because int might match the return type of a GCC
61870    builtin and then its argument prototype would still apply.  */
61871 #ifdef __cplusplus
61872 extern "C"
61873 #endif
61874 char cos ();
61875 int
61876 main ()
61877 {
61878 return cos ();
61879   ;
61880   return 0;
61881 }
61882 _ACEOF
61883 if ac_fn_cxx_try_link "$LINENO"; then :
61884   ac_cv_lib_m_cos=yes
61885 else
61886   ac_cv_lib_m_cos=no
61887 fi
61888 rm -f core conftest.err conftest.$ac_objext \
61889     conftest$ac_exeext conftest.$ac_ext
61890 LIBS=$ac_check_lib_save_LIBS
61891 fi
61892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
61893 $as_echo "$ac_cv_lib_m_cos" >&6; }
61894 if test "x$ac_cv_lib_m_cos" = xyes; then :
61895   cat >>confdefs.h <<_ACEOF
61896 #define HAVE_LIBM 1
61897 _ACEOF
61898 
61899   LIBS="-lm $LIBS"
61900 
61901 else
61902 
61903         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
61904 $as_echo "$as_me: Maths library was not found" >&6;}
61905 
61906 fi
61907 
61908     LIBM="-lm"
61909   else
61910     LIBM=""
61911   fi
61912 
61913 
61914   # Setup libdl (for dynamic library loading)
61915   save_LIBS="$LIBS"
61916   LIBS=""
61917   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
61918 $as_echo_n "checking for dlopen in -ldl... " >&6; }
61919 if ${ac_cv_lib_dl_dlopen+:} false; then :
61920   $as_echo_n "(cached) " >&6
61921 else
61922   ac_check_lib_save_LIBS=$LIBS
61923 LIBS="-ldl  $LIBS"
61924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61925 /* end confdefs.h.  */
61926 
61927 /* Override any GCC internal prototype to avoid an error.
61928    Use char because int might match the return type of a GCC
61929    builtin and then its argument prototype would still apply.  */
61930 #ifdef __cplusplus
61931 extern "C"
61932 #endif
61933 char dlopen ();
61934 int
61935 main ()
61936 {
61937 return dlopen ();
61938   ;
61939   return 0;
61940 }
61941 _ACEOF
61942 if ac_fn_cxx_try_link "$LINENO"; then :
61943   ac_cv_lib_dl_dlopen=yes
61944 else
61945   ac_cv_lib_dl_dlopen=no
61946 fi
61947 rm -f core conftest.err conftest.$ac_objext \
61948     conftest$ac_exeext conftest.$ac_ext
61949 LIBS=$ac_check_lib_save_LIBS
61950 fi
61951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
61952 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
61953 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
61954   cat >>confdefs.h <<_ACEOF
61955 #define HAVE_LIBDL 1
61956 _ACEOF
61957 
61958   LIBS="-ldl $LIBS"
61959 
61960 fi
61961 
61962   LIBDL="$LIBS"
61963 
61964   LIBS="$save_LIBS"
61965 
61966   # Deprecated libraries, keep the flags for backwards compatibility
61967   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
61968 
61969 
61970 # Check whether --with-dxsdk was given.
61971 if test "${with_dxsdk+set}" = set; then :
61972   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
61973 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
61974 fi
61975 
61976 
61977 
61978 
61979 # Check whether --with-dxsdk-lib was given.
61980 if test "${with_dxsdk_lib+set}" = set; then :
61981   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
61982 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
61983 fi
61984 
61985 
61986 
61987 
61988 # Check whether --with-dxsdk-include was given.
61989 if test "${with_dxsdk_include+set}" = set; then :
61990   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
61991 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
61992 fi
61993 
61994 
61995   fi
61996 
61997   # Control if libzip can use mmap. Available for purposes of overriding.
61998   LIBZIP_CAN_USE_MMAP=true
61999 
62000 
62001 
62002 
62003 
62004 
62005 
62006 
62007 
62008 
62009 
62010 
62011 
62012 
62013 ###############################################################################
62014 #
62015 # We need to do some final tweaking, when everything else is done.
62016 #
62017 ###############################################################################
62018 
62019 
62020   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
62021 
62022 
62023 
62024   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
62025 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
62026 
62027   if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
62028     ENABLE_INTREE_EC=yes
62029     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62030 $as_echo "yes" >&6; }
62031   else
62032     ENABLE_INTREE_EC=no
62033     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62034 $as_echo "no" >&6; }
62035   fi
62036 
62037 
62038 
62039 
62040 ###############################################################################
62041 #
62042 # Configure parts of the build that only affect the build performance,
62043 # not the result.
62044 #
62045 ###############################################################################
62046 
62047 
62048   # How many cores do we have on this build system?
62049 
62050 # Check whether --with-num-cores was given.
62051 if test "${with_num_cores+set}" = set; then :
62052   withval=$with_num_cores;
62053 fi
62054 
62055   if test "x$with_num_cores" = x; then
62056     # The number of cores were not specified, try to probe them.
62057 
62058   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
62059 $as_echo_n "checking for number of cores... " >&6; }
62060   NUM_CORES=1
62061   FOUND_CORES=no
62062 
62063   if test -f /proc/cpuinfo; then
62064     # Looks like a Linux (or cygwin) system
62065     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
62066     FOUND_CORES=yes
62067   elif test -x /usr/sbin/psrinfo; then
62068     # Looks like a Solaris system
62069     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
62070     FOUND_CORES=yes
62071   elif test -x /usr/sbin/sysctl; then
62072     # Looks like a MacOSX system
62073     NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
62074     FOUND_CORES=yes
62075   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
62076     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
62077     FOUND_CORES=yes
62078   elif test -n "$NUMBER_OF_PROCESSORS"; then
62079     # On windows, look in the env
62080     NUM_CORES=$NUMBER_OF_PROCESSORS
62081     FOUND_CORES=yes
62082   fi
62083 
62084   if test "x$FOUND_CORES" = xyes; then
62085     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
62086 $as_echo "$NUM_CORES" >&6; }
62087   else
62088     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
62089 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
62090     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
62091 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
62092   fi
62093 
62094   else
62095     NUM_CORES=$with_num_cores
62096   fi
62097 
62098 
62099 
62100   # How much memory do we have on this build system?
62101 
62102 # Check whether --with-memory-size was given.
62103 if test "${with_memory_size+set}" = set; then :
62104   withval=$with_memory_size;
62105 fi
62106 
62107   if test "x$with_memory_size" = x; then
62108     # The memory size was not specified, try to probe it.
62109 
62110   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
62111 $as_echo_n "checking for memory size... " >&6; }
62112   # Default to 1024 MB
62113   MEMORY_SIZE=1024
62114   FOUND_MEM=no
62115 
62116   if test -f /proc/meminfo; then
62117     # Looks like a Linux (or cygwin) system
62118     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
62119     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
62120     FOUND_MEM=yes
62121   elif test -x /usr/sbin/prtconf; then
62122     # Looks like a Solaris or AIX system
62123     MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
62124     FOUND_MEM=yes
62125   elif test -x /usr/sbin/sysctl; then
62126     # Looks like a MacOSX system
62127     MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
62128     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
62129     FOUND_MEM=yes
62130   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
62131     # Windows, but without cygwin
62132     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
62133     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
62134     FOUND_MEM=yes
62135   fi
62136 
62137   if test "x$FOUND_MEM" = xyes; then
62138     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
62139 $as_echo "$MEMORY_SIZE MB" >&6; }
62140   else
62141     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
62142 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
62143     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
62144 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
62145   fi
62146 
62147   else
62148     MEMORY_SIZE=$with_memory_size
62149   fi
62150 
62151 
62152 
62153   # Provide a decent default number of parallel jobs for make depending on
62154   # number of cores, amount of memory and machine architecture.
62155 
62156 # Check whether --with-jobs was given.
62157 if test "${with_jobs+set}" = set; then :
62158   withval=$with_jobs;
62159 fi
62160 
62161   if test "x$with_jobs" = x; then
62162     # Number of jobs was not specified, calculate.
62163     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
62164 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
62165     # Approximate memory in GB.
62166     memory_gb=`expr $MEMORY_SIZE / 1024`
62167     # Pick the lowest of memory in gb and number of cores.
62168     if test "$memory_gb" -lt "$NUM_CORES"; then
62169       JOBS="$memory_gb"
62170     else
62171       JOBS="$NUM_CORES"
62172     fi
62173     if test "$JOBS" -eq "0"; then
62174       JOBS=1
62175     fi
62176     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
62177 $as_echo "$JOBS" >&6; }
62178   else
62179     JOBS=$with_jobs
62180   fi
62181 
62182 
62183 
62184   # The number of test jobs will be chosen automatically if TEST_JOBS is 0
62185 
62186 # Check whether --with-test-jobs was given.
62187 if test "${with_test_jobs+set}" = set; then :
62188   withval=$with_test_jobs;
62189 fi
62190 
62191   if test "x$with_test_jobs" = x; then
62192       TEST_JOBS=0
62193   else
62194       TEST_JOBS=$with_test_jobs
62195   fi
62196 
62197 
62198 
62199 # Setup arguments for the boot jdk (after cores and memory have been setup)
62200 
62201   ##############################################################################
62202   #
62203   # Specify jvm options for anything that is run with the Boot JDK.
62204   # Not all JVM:s accept the same arguments on the command line.
62205   #
62206 
62207 # Check whether --with-boot-jdk-jvmargs was given.
62208 if test "${with_boot_jdk_jvmargs+set}" = set; then :
62209   withval=$with_boot_jdk_jvmargs;
62210 fi
62211 
62212 
62213   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
62214 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
62215 
62216   # Disable special log output when a debug build is used as Boot JDK...
62217 
62218   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
62219   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
62220   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
62221   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62222   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62223   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62224     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
62225     JVM_ARG_OK=true
62226   else
62227     $ECHO "Arg failed:" >&5
62228     $ECHO "$OUTPUT" >&5
62229     JVM_ARG_OK=false
62230   fi
62231 
62232 
62233   # Apply user provided options.
62234 
62235   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
62236   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
62237   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
62238   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62239   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62240   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62241     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
62242     JVM_ARG_OK=true
62243   else
62244     $ECHO "Arg failed:" >&5
62245     $ECHO "$OUTPUT" >&5
62246     JVM_ARG_OK=false
62247   fi
62248 
62249 
62250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
62251 $as_echo "$boot_jdk_jvmargs" >&6; }
62252 
62253   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
62254   JAVA_FLAGS=$boot_jdk_jvmargs
62255 
62256 
62257 
62258   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
62259 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
62260 
62261   # Starting amount of heap memory.
62262 
62263   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
62264   $ECHO "Command: $JAVA -Xms64M -version" >&5
62265   OUTPUT=`$JAVA -Xms64M -version 2>&1`
62266   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62267   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62268   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62269     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
62270     JVM_ARG_OK=true
62271   else
62272     $ECHO "Arg failed:" >&5
62273     $ECHO "$OUTPUT" >&5
62274     JVM_ARG_OK=false
62275   fi
62276 
62277 
62278   # Maximum amount of heap memory.
62279   # Maximum stack size.
62280   JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
62281   if test "x$BOOT_JDK_BITS" = "x32"; then
62282     if test "$JVM_MAX_HEAP" -gt "1100"; then
62283       JVM_MAX_HEAP=1100
62284     elif test "$JVM_MAX_HEAP" -lt "512"; then
62285       JVM_MAX_HEAP=512
62286     fi
62287     STACK_SIZE=768
62288   else
62289     # Running a 64 bit JVM allows for and requires a bigger heap
62290     if test "$JVM_MAX_HEAP" -gt "1600"; then
62291       JVM_MAX_HEAP=1600
62292     elif test "$JVM_MAX_HEAP" -lt "512"; then
62293       JVM_MAX_HEAP=512
62294     fi
62295     STACK_SIZE=1536
62296   fi
62297 
62298   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
62299   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
62300   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
62301   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62302   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62303   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62304     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
62305     JVM_ARG_OK=true
62306   else
62307     $ECHO "Arg failed:" >&5
62308     $ECHO "$OUTPUT" >&5
62309     JVM_ARG_OK=false
62310   fi
62311 
62312 
62313   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
62314   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
62315   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
62316   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62317   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62318   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62319     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
62320     JVM_ARG_OK=true
62321   else
62322     $ECHO "Arg failed:" >&5
62323     $ECHO "$OUTPUT" >&5
62324     JVM_ARG_OK=false
62325   fi
62326 
62327 
62328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
62329 $as_echo "$boot_jdk_jvmargs_big" >&6; }
62330 
62331   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
62332 
62333 
62334   # By default, the main javac compilations use big
62335   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
62336 
62337 
62338   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
62339 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
62340 
62341   # Use serial gc for small short lived tools if possible
62342 
62343   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
62344   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
62345   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
62346   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62347   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62348   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62349     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
62350     JVM_ARG_OK=true
62351   else
62352     $ECHO "Arg failed:" >&5
62353     $ECHO "$OUTPUT" >&5
62354     JVM_ARG_OK=false
62355   fi
62356 
62357 
62358   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
62359   $ECHO "Command: $JAVA -Xms32M -version" >&5
62360   OUTPUT=`$JAVA -Xms32M -version 2>&1`
62361   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62362   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62363   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62364     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
62365     JVM_ARG_OK=true
62366   else
62367     $ECHO "Arg failed:" >&5
62368     $ECHO "$OUTPUT" >&5
62369     JVM_ARG_OK=false
62370   fi
62371 
62372 
62373   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
62374   $ECHO "Command: $JAVA -Xmx512M -version" >&5
62375   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
62376   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62377   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62378   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62379     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
62380     JVM_ARG_OK=true
62381   else
62382     $ECHO "Arg failed:" >&5
62383     $ECHO "$OUTPUT" >&5
62384     JVM_ARG_OK=false
62385   fi
62386 
62387 
62388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
62389 $as_echo "$boot_jdk_jvmargs_small" >&6; }
62390 
62391   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
62392 
62393 
62394   JAVA_TOOL_FLAGS_SMALL=""
62395   for f in $JAVA_FLAGS_SMALL; do
62396     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
62397   done
62398 
62399 
62400 
62401 # Setup smart javac (after cores and memory have been setup)
62402 
62403 
62404 # Check whether --with-sjavac-server-java was given.
62405 if test "${with_sjavac_server_java+set}" = set; then :
62406   withval=$with_sjavac_server_java;
62407 fi
62408 
62409 
62410   if test "x$with_sjavac_server_java" != x; then
62411     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
62412     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
62413     if test "x$FOUND_VERSION" = x; then
62414       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
62415     fi
62416   else
62417     SJAVAC_SERVER_JAVA="$JAVA"
62418   fi
62419 
62420 
62421   if test "$MEMORY_SIZE" -gt "3000"; then
62422 
62423   $ECHO "Check if jvm arg is ok: -d64" >&5
62424   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
62425   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
62426   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62427   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62428   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62429     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
62430     JVM_ARG_OK=true
62431   else
62432     $ECHO "Arg failed:" >&5
62433     $ECHO "$OUTPUT" >&5
62434     JVM_ARG_OK=false
62435   fi
62436 
62437     if test "$JVM_ARG_OK" = true; then
62438       JVM_64BIT=true
62439       JVM_ARG_OK=false
62440     fi
62441   fi
62442 
62443   MX_VALUE=`expr $MEMORY_SIZE / 2`
62444   if test "$JVM_64BIT" = true; then
62445     # Set ms lower than mx since more than one instance of the server might
62446     # get launched at the same time before they figure out which instance won.
62447     MS_VALUE=512
62448     if test "$MX_VALUE" -gt "2048"; then
62449       MX_VALUE=2048
62450     fi
62451   else
62452     MS_VALUE=256
62453     if test "$MX_VALUE" -gt "1500"; then
62454       MX_VALUE=1500
62455     fi
62456   fi
62457   if test "$MX_VALUE" -lt "512"; then
62458     MX_VALUE=512
62459   fi
62460 
62461   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
62462   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
62463   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
62464   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62465   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62466   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62467     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
62468     JVM_ARG_OK=true
62469   else
62470     $ECHO "Arg failed:" >&5
62471     $ECHO "$OUTPUT" >&5
62472     JVM_ARG_OK=false
62473   fi
62474 
62475 
62476 
62477   # Check whether --enable-sjavac was given.
62478 if test "${enable_sjavac+set}" = set; then :
62479   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
62480 else
62481   ENABLE_SJAVAC="no"
62482 fi
62483 
62484   if test "x$JVM_ARG_OK" = "xfalse"; then
62485     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
62486 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
62487     ENABLE_SJAVAC="no"
62488   fi
62489   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
62490 $as_echo_n "checking whether to use sjavac... " >&6; }
62491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
62492 $as_echo "$ENABLE_SJAVAC" >&6; }
62493 
62494 
62495   # Check whether --enable-javac-server was given.
62496 if test "${enable_javac_server+set}" = set; then :
62497   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
62498 else
62499   ENABLE_JAVAC_SERVER="yes"
62500 fi
62501 
62502   if test "x$JVM_ARG_OK" = "xfalse"; then
62503     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
62504 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
62505     ENABLE_JAVAC_SERVER="no"
62506   fi
62507   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
62508 $as_echo_n "checking whether to use javac server... " >&6; }
62509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
62510 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
62511 
62512 
62513   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
62514     # When using a server javac, the small client instances do not need much
62515     # resources.
62516     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
62517   fi
62518 
62519 
62520 # Setup use of icecc if requested
62521 
62522   # Check whether --enable-icecc was given.
62523 if test "${enable_icecc+set}" = set; then :
62524   enableval=$enable_icecc;
62525 fi
62526 
62527 
62528   if test "x${enable_icecc}" = "xyes"; then
62529 
62530 
62531 
62532   # Publish this variable in the help.
62533 
62534 
62535   if [ -z "${ICECC_CMD+x}" ]; then
62536     # The variable is not set by user, try to locate tool using the code snippet
62537     for ac_prog in icecc
62538 do
62539   # Extract the first word of "$ac_prog", so it can be a program name with args.
62540 set dummy $ac_prog; ac_word=$2
62541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62542 $as_echo_n "checking for $ac_word... " >&6; }
62543 if ${ac_cv_path_ICECC_CMD+:} false; then :
62544   $as_echo_n "(cached) " >&6
62545 else
62546   case $ICECC_CMD in
62547   [\\/]* | ?:[\\/]*)
62548   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
62549   ;;
62550   *)
62551   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62552 for as_dir in $PATH
62553 do
62554   IFS=$as_save_IFS
62555   test -z "$as_dir" && as_dir=.
62556     for ac_exec_ext in '' $ac_executable_extensions; do
62557   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62558     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
62559     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62560     break 2
62561   fi
62562 done
62563   done
62564 IFS=$as_save_IFS
62565 
62566   ;;
62567 esac
62568 fi
62569 ICECC_CMD=$ac_cv_path_ICECC_CMD
62570 if test -n "$ICECC_CMD"; then
62571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
62572 $as_echo "$ICECC_CMD" >&6; }
62573 else
62574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62575 $as_echo "no" >&6; }
62576 fi
62577 
62578 
62579   test -n "$ICECC_CMD" && break
62580 done
62581 
62582   else
62583     # The variable is set, but is it from the command line or the environment?
62584 
62585     # Try to remove the string !ICECC_CMD! from our list.
62586     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
62587     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
62588       # If it failed, the variable was not from the command line. Ignore it,
62589       # but warn the user (except for BASH, which is always set by the calling BASH).
62590       if test "xICECC_CMD" != xBASH; then
62591         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
62592 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
62593       fi
62594       # Try to locate tool using the code snippet
62595       for ac_prog in icecc
62596 do
62597   # Extract the first word of "$ac_prog", so it can be a program name with args.
62598 set dummy $ac_prog; ac_word=$2
62599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62600 $as_echo_n "checking for $ac_word... " >&6; }
62601 if ${ac_cv_path_ICECC_CMD+:} false; then :
62602   $as_echo_n "(cached) " >&6
62603 else
62604   case $ICECC_CMD in
62605   [\\/]* | ?:[\\/]*)
62606   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
62607   ;;
62608   *)
62609   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62610 for as_dir in $PATH
62611 do
62612   IFS=$as_save_IFS
62613   test -z "$as_dir" && as_dir=.
62614     for ac_exec_ext in '' $ac_executable_extensions; do
62615   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62616     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
62617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62618     break 2
62619   fi
62620 done
62621   done
62622 IFS=$as_save_IFS
62623 
62624   ;;
62625 esac
62626 fi
62627 ICECC_CMD=$ac_cv_path_ICECC_CMD
62628 if test -n "$ICECC_CMD"; then
62629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
62630 $as_echo "$ICECC_CMD" >&6; }
62631 else
62632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62633 $as_echo "no" >&6; }
62634 fi
62635 
62636 
62637   test -n "$ICECC_CMD" && break
62638 done
62639 
62640     else
62641       # If it succeeded, then it was overridden by the user. We will use it
62642       # for the tool.
62643 
62644       # First remove it from the list of overridden variables, so we can test
62645       # for unknown variables in the end.
62646       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
62647 
62648       # Check if we try to supply an empty value
62649       if test "x$ICECC_CMD" = x; then
62650         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
62651 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
62652         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
62653 $as_echo_n "checking for ICECC_CMD... " >&6; }
62654         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
62655 $as_echo "disabled" >&6; }
62656       else
62657         # Check if the provided tool contains a complete path.
62658         tool_specified="$ICECC_CMD"
62659         tool_basename="${tool_specified##*/}"
62660         if test "x$tool_basename" = "x$tool_specified"; then
62661           # A command without a complete path is provided, search $PATH.
62662           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
62663 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
62664           # Extract the first word of "$tool_basename", so it can be a program name with args.
62665 set dummy $tool_basename; ac_word=$2
62666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62667 $as_echo_n "checking for $ac_word... " >&6; }
62668 if ${ac_cv_path_ICECC_CMD+:} false; then :
62669   $as_echo_n "(cached) " >&6
62670 else
62671   case $ICECC_CMD in
62672   [\\/]* | ?:[\\/]*)
62673   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
62674   ;;
62675   *)
62676   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62677 for as_dir in $PATH
62678 do
62679   IFS=$as_save_IFS
62680   test -z "$as_dir" && as_dir=.
62681     for ac_exec_ext in '' $ac_executable_extensions; do
62682   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62683     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
62684     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62685     break 2
62686   fi
62687 done
62688   done
62689 IFS=$as_save_IFS
62690 
62691   ;;
62692 esac
62693 fi
62694 ICECC_CMD=$ac_cv_path_ICECC_CMD
62695 if test -n "$ICECC_CMD"; then
62696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
62697 $as_echo "$ICECC_CMD" >&6; }
62698 else
62699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62700 $as_echo "no" >&6; }
62701 fi
62702 
62703 
62704           if test "x$ICECC_CMD" = x; then
62705             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
62706           fi
62707         else
62708           # Otherwise we believe it is a complete path. Use it as it is.
62709           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
62710 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
62711           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
62712 $as_echo_n "checking for ICECC_CMD... " >&6; }
62713           if test ! -x "$tool_specified"; then
62714             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
62715 $as_echo "not found" >&6; }
62716             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
62717           fi
62718           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
62719 $as_echo "$tool_specified" >&6; }
62720         fi
62721       fi
62722     fi
62723 
62724   fi
62725 
62726 
62727 
62728   if test "x$ICECC_CMD" = x; then
62729     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
62730   fi
62731 
62732 
62733     old_path="$PATH"
62734 
62735     # Look for icecc-create-env in some known places
62736     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
62737 
62738 
62739 
62740   # Publish this variable in the help.
62741 
62742 
62743   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
62744     # The variable is not set by user, try to locate tool using the code snippet
62745     for ac_prog in icecc-create-env
62746 do
62747   # Extract the first word of "$ac_prog", so it can be a program name with args.
62748 set dummy $ac_prog; ac_word=$2
62749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62750 $as_echo_n "checking for $ac_word... " >&6; }
62751 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
62752   $as_echo_n "(cached) " >&6
62753 else
62754   case $ICECC_CREATE_ENV in
62755   [\\/]* | ?:[\\/]*)
62756   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
62757   ;;
62758   *)
62759   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62760 for as_dir in $PATH
62761 do
62762   IFS=$as_save_IFS
62763   test -z "$as_dir" && as_dir=.
62764     for ac_exec_ext in '' $ac_executable_extensions; do
62765   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62766     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
62767     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62768     break 2
62769   fi
62770 done
62771   done
62772 IFS=$as_save_IFS
62773 
62774   ;;
62775 esac
62776 fi
62777 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
62778 if test -n "$ICECC_CREATE_ENV"; then
62779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
62780 $as_echo "$ICECC_CREATE_ENV" >&6; }
62781 else
62782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62783 $as_echo "no" >&6; }
62784 fi
62785 
62786 
62787   test -n "$ICECC_CREATE_ENV" && break
62788 done
62789 
62790   else
62791     # The variable is set, but is it from the command line or the environment?
62792 
62793     # Try to remove the string !ICECC_CREATE_ENV! from our list.
62794     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
62795     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
62796       # If it failed, the variable was not from the command line. Ignore it,
62797       # but warn the user (except for BASH, which is always set by the calling BASH).
62798       if test "xICECC_CREATE_ENV" != xBASH; then
62799         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
62800 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
62801       fi
62802       # Try to locate tool using the code snippet
62803       for ac_prog in icecc-create-env
62804 do
62805   # Extract the first word of "$ac_prog", so it can be a program name with args.
62806 set dummy $ac_prog; ac_word=$2
62807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62808 $as_echo_n "checking for $ac_word... " >&6; }
62809 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
62810   $as_echo_n "(cached) " >&6
62811 else
62812   case $ICECC_CREATE_ENV in
62813   [\\/]* | ?:[\\/]*)
62814   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
62815   ;;
62816   *)
62817   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62818 for as_dir in $PATH
62819 do
62820   IFS=$as_save_IFS
62821   test -z "$as_dir" && as_dir=.
62822     for ac_exec_ext in '' $ac_executable_extensions; do
62823   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62824     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
62825     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62826     break 2
62827   fi
62828 done
62829   done
62830 IFS=$as_save_IFS
62831 
62832   ;;
62833 esac
62834 fi
62835 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
62836 if test -n "$ICECC_CREATE_ENV"; then
62837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
62838 $as_echo "$ICECC_CREATE_ENV" >&6; }
62839 else
62840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62841 $as_echo "no" >&6; }
62842 fi
62843 
62844 
62845   test -n "$ICECC_CREATE_ENV" && break
62846 done
62847 
62848     else
62849       # If it succeeded, then it was overridden by the user. We will use it
62850       # for the tool.
62851 
62852       # First remove it from the list of overridden variables, so we can test
62853       # for unknown variables in the end.
62854       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
62855 
62856       # Check if we try to supply an empty value
62857       if test "x$ICECC_CREATE_ENV" = x; then
62858         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
62859 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
62860         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
62861 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
62862         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
62863 $as_echo "disabled" >&6; }
62864       else
62865         # Check if the provided tool contains a complete path.
62866         tool_specified="$ICECC_CREATE_ENV"
62867         tool_basename="${tool_specified##*/}"
62868         if test "x$tool_basename" = "x$tool_specified"; then
62869           # A command without a complete path is provided, search $PATH.
62870           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
62871 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
62872           # Extract the first word of "$tool_basename", so it can be a program name with args.
62873 set dummy $tool_basename; ac_word=$2
62874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62875 $as_echo_n "checking for $ac_word... " >&6; }
62876 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
62877   $as_echo_n "(cached) " >&6
62878 else
62879   case $ICECC_CREATE_ENV in
62880   [\\/]* | ?:[\\/]*)
62881   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
62882   ;;
62883   *)
62884   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62885 for as_dir in $PATH
62886 do
62887   IFS=$as_save_IFS
62888   test -z "$as_dir" && as_dir=.
62889     for ac_exec_ext in '' $ac_executable_extensions; do
62890   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62891     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
62892     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62893     break 2
62894   fi
62895 done
62896   done
62897 IFS=$as_save_IFS
62898 
62899   ;;
62900 esac
62901 fi
62902 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
62903 if test -n "$ICECC_CREATE_ENV"; then
62904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
62905 $as_echo "$ICECC_CREATE_ENV" >&6; }
62906 else
62907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62908 $as_echo "no" >&6; }
62909 fi
62910 
62911 
62912           if test "x$ICECC_CREATE_ENV" = x; then
62913             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
62914           fi
62915         else
62916           # Otherwise we believe it is a complete path. Use it as it is.
62917           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
62918 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
62919           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
62920 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
62921           if test ! -x "$tool_specified"; then
62922             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
62923 $as_echo "not found" >&6; }
62924             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
62925           fi
62926           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
62927 $as_echo "$tool_specified" >&6; }
62928         fi
62929       fi
62930     fi
62931 
62932   fi
62933 
62934 
62935 
62936   if test "x$ICECC_CREATE_ENV" = x; then
62937     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
62938   fi
62939 
62940 
62941     # Use icecc-create-env to create a minimal compilation environment that can
62942     # be sent to the other hosts in the icecream cluster.
62943     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
62944     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
62945     # Older versions of icecc does not have the --gcc parameter
62946     if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
62947       icecc_gcc_arg="--gcc"
62948     fi
62949     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
62950 
62951   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
62952       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
62953           ${icecc_create_env_log} 2>&1 )
62954   if test "$?" != "0"; then
62955     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
62956 $as_echo "$as_me: icecc-create-env output:" >&6;}
62957     cat \
62958           ${icecc_create_env_log}
62959     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
62960   fi
62961 
62962     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
62963       # For clang, the icecc compilerwrapper is needed. It usually resides next
62964       # to icecc-create-env.
62965 
62966 
62967 
62968   # Publish this variable in the help.
62969 
62970 
62971   if [ -z "${ICECC_WRAPPER+x}" ]; then
62972     # The variable is not set by user, try to locate tool using the code snippet
62973     for ac_prog in compilerwrapper
62974 do
62975   # Extract the first word of "$ac_prog", so it can be a program name with args.
62976 set dummy $ac_prog; ac_word=$2
62977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62978 $as_echo_n "checking for $ac_word... " >&6; }
62979 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
62980   $as_echo_n "(cached) " >&6
62981 else
62982   case $ICECC_WRAPPER in
62983   [\\/]* | ?:[\\/]*)
62984   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
62985   ;;
62986   *)
62987   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62988 for as_dir in $PATH
62989 do
62990   IFS=$as_save_IFS
62991   test -z "$as_dir" && as_dir=.
62992     for ac_exec_ext in '' $ac_executable_extensions; do
62993   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62994     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
62995     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62996     break 2
62997   fi
62998 done
62999   done
63000 IFS=$as_save_IFS
63001 
63002   ;;
63003 esac
63004 fi
63005 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
63006 if test -n "$ICECC_WRAPPER"; then
63007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
63008 $as_echo "$ICECC_WRAPPER" >&6; }
63009 else
63010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63011 $as_echo "no" >&6; }
63012 fi
63013 
63014 
63015   test -n "$ICECC_WRAPPER" && break
63016 done
63017 
63018   else
63019     # The variable is set, but is it from the command line or the environment?
63020 
63021     # Try to remove the string !ICECC_WRAPPER! from our list.
63022     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
63023     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
63024       # If it failed, the variable was not from the command line. Ignore it,
63025       # but warn the user (except for BASH, which is always set by the calling BASH).
63026       if test "xICECC_WRAPPER" != xBASH; then
63027         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
63028 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
63029       fi
63030       # Try to locate tool using the code snippet
63031       for ac_prog in compilerwrapper
63032 do
63033   # Extract the first word of "$ac_prog", so it can be a program name with args.
63034 set dummy $ac_prog; ac_word=$2
63035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63036 $as_echo_n "checking for $ac_word... " >&6; }
63037 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
63038   $as_echo_n "(cached) " >&6
63039 else
63040   case $ICECC_WRAPPER in
63041   [\\/]* | ?:[\\/]*)
63042   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
63043   ;;
63044   *)
63045   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63046 for as_dir in $PATH
63047 do
63048   IFS=$as_save_IFS
63049   test -z "$as_dir" && as_dir=.
63050     for ac_exec_ext in '' $ac_executable_extensions; do
63051   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63052     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
63053     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63054     break 2
63055   fi
63056 done
63057   done
63058 IFS=$as_save_IFS
63059 
63060   ;;
63061 esac
63062 fi
63063 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
63064 if test -n "$ICECC_WRAPPER"; then
63065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
63066 $as_echo "$ICECC_WRAPPER" >&6; }
63067 else
63068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63069 $as_echo "no" >&6; }
63070 fi
63071 
63072 
63073   test -n "$ICECC_WRAPPER" && break
63074 done
63075 
63076     else
63077       # If it succeeded, then it was overridden by the user. We will use it
63078       # for the tool.
63079 
63080       # First remove it from the list of overridden variables, so we can test
63081       # for unknown variables in the end.
63082       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
63083 
63084       # Check if we try to supply an empty value
63085       if test "x$ICECC_WRAPPER" = x; then
63086         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
63087 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
63088         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
63089 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
63090         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
63091 $as_echo "disabled" >&6; }
63092       else
63093         # Check if the provided tool contains a complete path.
63094         tool_specified="$ICECC_WRAPPER"
63095         tool_basename="${tool_specified##*/}"
63096         if test "x$tool_basename" = "x$tool_specified"; then
63097           # A command without a complete path is provided, search $PATH.
63098           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
63099 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
63100           # Extract the first word of "$tool_basename", so it can be a program name with args.
63101 set dummy $tool_basename; ac_word=$2
63102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63103 $as_echo_n "checking for $ac_word... " >&6; }
63104 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
63105   $as_echo_n "(cached) " >&6
63106 else
63107   case $ICECC_WRAPPER in
63108   [\\/]* | ?:[\\/]*)
63109   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
63110   ;;
63111   *)
63112   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63113 for as_dir in $PATH
63114 do
63115   IFS=$as_save_IFS
63116   test -z "$as_dir" && as_dir=.
63117     for ac_exec_ext in '' $ac_executable_extensions; do
63118   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63119     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
63120     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63121     break 2
63122   fi
63123 done
63124   done
63125 IFS=$as_save_IFS
63126 
63127   ;;
63128 esac
63129 fi
63130 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
63131 if test -n "$ICECC_WRAPPER"; then
63132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
63133 $as_echo "$ICECC_WRAPPER" >&6; }
63134 else
63135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63136 $as_echo "no" >&6; }
63137 fi
63138 
63139 
63140           if test "x$ICECC_WRAPPER" = x; then
63141             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
63142           fi
63143         else
63144           # Otherwise we believe it is a complete path. Use it as it is.
63145           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
63146 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
63147           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
63148 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
63149           if test ! -x "$tool_specified"; then
63150             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
63151 $as_echo "not found" >&6; }
63152             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
63153           fi
63154           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
63155 $as_echo "$tool_specified" >&6; }
63156         fi
63157       fi
63158     fi
63159 
63160   fi
63161 
63162 
63163 
63164   if test "x$ICECC_WRAPPER" = x; then
63165     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
63166   fi
63167 
63168 
63169 
63170   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
63171       && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
63172   if test "$?" != "0"; then
63173     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
63174 $as_echo "$as_me: icecc-create-env output:" >&6;}
63175     cat ${icecc_create_env_log}
63176     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
63177   fi
63178 
63179     else
63180       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
63181     fi
63182     PATH="$old_path"
63183     # The bundle with the compiler gets a name based on checksums. Parse log file
63184     # to find it.
63185     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
63186     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
63187     if test ! -f ${ICECC_ENV_BUNDLE}; then
63188       as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
63189     fi
63190     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
63191 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
63192     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
63193 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
63194     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
63195 
63196     if test "x${COMPILE_TYPE}" = "xcross"; then
63197       # If cross compiling, create a separate env package for the build compiler
63198       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
63199       icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
63200       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
63201 
63202   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
63203       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
63204             ${icecc_create_env_log_build} 2>&1 )
63205   if test "$?" != "0"; then
63206     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
63207 $as_echo "$as_me: icecc-create-env output:" >&6;}
63208     cat \
63209             ${icecc_create_env_log_build}
63210     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
63211   fi
63212 
63213       elif test "x${BUILD_CC##*/}" = "xclang"; then
63214 
63215   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
63216       && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
63217   if test "$?" != "0"; then
63218     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
63219 $as_echo "$as_me: icecc-create-env output:" >&6;}
63220     cat ${icecc_create_env_log_build}
63221     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
63222   fi
63223 
63224       else
63225         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
63226       fi
63227       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
63228       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
63229       if test ! -f ${ICECC_ENV_BUNDLE}; then
63230         as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
63231       fi
63232       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
63233 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
63234       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
63235 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
63236       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
63237           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
63238     else
63239       BUILD_ICECC="${ICECC}"
63240     fi
63241 
63242 
63243   fi
63244 
63245 
63246 # Can the C/C++ compiler use precompiled headers?
63247 
63248 
63249   ###############################################################################
63250   #
63251   # Can the C/C++ compiler use precompiled headers?
63252   #
63253   # Check whether --enable-precompiled-headers was given.
63254 if test "${enable_precompiled_headers+set}" = set; then :
63255   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
63256 else
63257   ENABLE_PRECOMPH=yes
63258 fi
63259 
63260 
63261   USE_PRECOMPILED_HEADER=1
63262   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
63263 $as_echo_n "checking If precompiled header is enabled... " >&6; }
63264   if test "x$ENABLE_PRECOMPH" = xno; then
63265     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63266 $as_echo "no, forced" >&6; }
63267     USE_PRECOMPILED_HEADER=0
63268   elif test "x$ICECC" != "x"; then
63269     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
63270 $as_echo "no, does not work effectively with icecc" >&6; }
63271     USE_PRECOMPILED_HEADER=0
63272   else
63273     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63274 $as_echo "yes" >&6; }
63275   fi
63276 
63277   if test "x$ENABLE_PRECOMPH" = xyes; then
63278     # Check that the compiler actually supports precomp headers.
63279     if test "x$TOOLCHAIN_TYPE" = xgcc; then
63280       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
63281 $as_echo_n "checking that precompiled headers work... " >&6; }
63282       echo "int alfa();" > conftest.h
63283       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
63284       if test ! -f conftest.hpp.gch; then
63285         USE_PRECOMPILED_HEADER=0
63286         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63287 $as_echo "no" >&6; }
63288       else
63289         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63290 $as_echo "yes" >&6; }
63291       fi
63292       rm -f conftest.h conftest.hpp.gch
63293     fi
63294   fi
63295 
63296 
63297 
63298 
63299 # Setup use of ccache, if available
63300 
63301   # Check whether --enable-ccache was given.
63302 if test "${enable_ccache+set}" = set; then :
63303   enableval=$enable_ccache;
63304 fi
63305 
63306 
63307   CCACHE=
63308   CCACHE_STATUS=
63309   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
63310 $as_echo_n "checking is ccache enabled... " >&6; }
63311   if test "x$enable_ccache" = xyes; then
63312     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
63313       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63314 $as_echo "yes" >&6; }
63315       OLD_PATH="$PATH"
63316       if test "x$TOOLCHAIN_PATH" != x; then
63317         PATH=$TOOLCHAIN_PATH:$PATH
63318       fi
63319 
63320 
63321 
63322   # Publish this variable in the help.
63323 
63324 
63325   if [ -z "${CCACHE+x}" ]; then
63326     # The variable is not set by user, try to locate tool using the code snippet
63327     for ac_prog in ccache
63328 do
63329   # Extract the first word of "$ac_prog", so it can be a program name with args.
63330 set dummy $ac_prog; ac_word=$2
63331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63332 $as_echo_n "checking for $ac_word... " >&6; }
63333 if ${ac_cv_path_CCACHE+:} false; then :
63334   $as_echo_n "(cached) " >&6
63335 else
63336   case $CCACHE in
63337   [\\/]* | ?:[\\/]*)
63338   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
63339   ;;
63340   *)
63341   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63342 for as_dir in $PATH
63343 do
63344   IFS=$as_save_IFS
63345   test -z "$as_dir" && as_dir=.
63346     for ac_exec_ext in '' $ac_executable_extensions; do
63347   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63348     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
63349     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63350     break 2
63351   fi
63352 done
63353   done
63354 IFS=$as_save_IFS
63355 
63356   ;;
63357 esac
63358 fi
63359 CCACHE=$ac_cv_path_CCACHE
63360 if test -n "$CCACHE"; then
63361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
63362 $as_echo "$CCACHE" >&6; }
63363 else
63364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63365 $as_echo "no" >&6; }
63366 fi
63367 
63368 
63369   test -n "$CCACHE" && break
63370 done
63371 
63372   else
63373     # The variable is set, but is it from the command line or the environment?
63374 
63375     # Try to remove the string !CCACHE! from our list.
63376     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
63377     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
63378       # If it failed, the variable was not from the command line. Ignore it,
63379       # but warn the user (except for BASH, which is always set by the calling BASH).
63380       if test "xCCACHE" != xBASH; then
63381         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
63382 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
63383       fi
63384       # Try to locate tool using the code snippet
63385       for ac_prog in ccache
63386 do
63387   # Extract the first word of "$ac_prog", so it can be a program name with args.
63388 set dummy $ac_prog; ac_word=$2
63389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63390 $as_echo_n "checking for $ac_word... " >&6; }
63391 if ${ac_cv_path_CCACHE+:} false; then :
63392   $as_echo_n "(cached) " >&6
63393 else
63394   case $CCACHE in
63395   [\\/]* | ?:[\\/]*)
63396   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
63397   ;;
63398   *)
63399   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63400 for as_dir in $PATH
63401 do
63402   IFS=$as_save_IFS
63403   test -z "$as_dir" && as_dir=.
63404     for ac_exec_ext in '' $ac_executable_extensions; do
63405   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63406     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
63407     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63408     break 2
63409   fi
63410 done
63411   done
63412 IFS=$as_save_IFS
63413 
63414   ;;
63415 esac
63416 fi
63417 CCACHE=$ac_cv_path_CCACHE
63418 if test -n "$CCACHE"; then
63419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
63420 $as_echo "$CCACHE" >&6; }
63421 else
63422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63423 $as_echo "no" >&6; }
63424 fi
63425 
63426 
63427   test -n "$CCACHE" && break
63428 done
63429 
63430     else
63431       # If it succeeded, then it was overridden by the user. We will use it
63432       # for the tool.
63433 
63434       # First remove it from the list of overridden variables, so we can test
63435       # for unknown variables in the end.
63436       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
63437 
63438       # Check if we try to supply an empty value
63439       if test "x$CCACHE" = x; then
63440         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
63441 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
63442         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
63443 $as_echo_n "checking for CCACHE... " >&6; }
63444         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
63445 $as_echo "disabled" >&6; }
63446       else
63447         # Check if the provided tool contains a complete path.
63448         tool_specified="$CCACHE"
63449         tool_basename="${tool_specified##*/}"
63450         if test "x$tool_basename" = "x$tool_specified"; then
63451           # A command without a complete path is provided, search $PATH.
63452           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
63453 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
63454           # Extract the first word of "$tool_basename", so it can be a program name with args.
63455 set dummy $tool_basename; ac_word=$2
63456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63457 $as_echo_n "checking for $ac_word... " >&6; }
63458 if ${ac_cv_path_CCACHE+:} false; then :
63459   $as_echo_n "(cached) " >&6
63460 else
63461   case $CCACHE in
63462   [\\/]* | ?:[\\/]*)
63463   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
63464   ;;
63465   *)
63466   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63467 for as_dir in $PATH
63468 do
63469   IFS=$as_save_IFS
63470   test -z "$as_dir" && as_dir=.
63471     for ac_exec_ext in '' $ac_executable_extensions; do
63472   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63473     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
63474     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63475     break 2
63476   fi
63477 done
63478   done
63479 IFS=$as_save_IFS
63480 
63481   ;;
63482 esac
63483 fi
63484 CCACHE=$ac_cv_path_CCACHE
63485 if test -n "$CCACHE"; then
63486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
63487 $as_echo "$CCACHE" >&6; }
63488 else
63489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63490 $as_echo "no" >&6; }
63491 fi
63492 
63493 
63494           if test "x$CCACHE" = x; then
63495             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
63496           fi
63497         else
63498           # Otherwise we believe it is a complete path. Use it as it is.
63499           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
63500 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
63501           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
63502 $as_echo_n "checking for CCACHE... " >&6; }
63503           if test ! -x "$tool_specified"; then
63504             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
63505 $as_echo "not found" >&6; }
63506             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
63507           fi
63508           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
63509 $as_echo "$tool_specified" >&6; }
63510         fi
63511       fi
63512     fi
63513 
63514   fi
63515 
63516 
63517 
63518   if test "x$CCACHE" = x; then
63519     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
63520   fi
63521 
63522 
63523       PATH="$OLD_PATH"
63524       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
63525       CCACHE_STATUS="Active ($CCACHE_VERSION)"
63526     else
63527       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63528 $as_echo "no" >&6; }
63529       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
63530 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
63531     fi
63532   elif test "x$enable_ccache" = xno; then
63533     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
63534 $as_echo "no, explicitly disabled" >&6; }
63535     CCACHE_STATUS="Disabled"
63536   elif test "x$enable_ccache" = x; then
63537     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63538 $as_echo "no" >&6; }
63539   else
63540     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
63541 $as_echo "unknown" >&6; }
63542     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
63543   fi
63544 
63545 
63546 
63547 # Check whether --with-ccache-dir was given.
63548 if test "${with_ccache_dir+set}" = set; then :
63549   withval=$with_ccache_dir;
63550 fi
63551 
63552 
63553   if test "x$with_ccache_dir" != x; then
63554     # When using a non home ccache directory, assume the use is to share ccache files
63555     # with other users. Thus change the umask.
63556     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
63557     if test "x$CCACHE" = x; then
63558       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
63559 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
63560     fi
63561   fi
63562 
63563   if test "x$CCACHE" != x; then
63564 
63565   if test "x$CCACHE" != x; then
63566     if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
63567       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
63568           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
63569       if test "x$HAS_BAD_CCACHE" != "x"; then
63570         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
63571       fi
63572       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
63573 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
63574       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
63575       PUSHED_FLAGS="$CXXFLAGS"
63576       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
63577       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63578 /* end confdefs.h.  */
63579 
63580 int
63581 main ()
63582 {
63583 
63584   ;
63585   return 0;
63586 }
63587 _ACEOF
63588 if ac_fn_cxx_try_compile "$LINENO"; then :
63589   CC_KNOWS_CCACHE_TRICK=yes
63590 else
63591   CC_KNOWS_CCACHE_TRICK=no
63592 fi
63593 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
63594       CXXFLAGS="$PUSHED_FLAGS"
63595       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
63596         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63597 $as_echo "yes" >&6; }
63598         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
63599 
63600         CCACHE_SLOPPINESS=pch_defines,time_macros
63601       else
63602         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63603 $as_echo "no" >&6; }
63604         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
63605       fi
63606     fi
63607 
63608     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
63609         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
63610 
63611     if test "x$SET_CCACHE_DIR" != x; then
63612       mkdir -p $CCACHE_DIR > /dev/null 2>&1
63613       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
63614     fi
63615   fi
63616 
63617   fi
63618 
63619 
63620 ###############################################################################
63621 #
63622 # And now the finish...
63623 #
63624 ###############################################################################
63625 
63626 # Check for some common pitfalls
63627 
63628   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63629     file_to_test="$SRC_ROOT/LICENSE"
63630     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
63631       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
63632     fi
63633   fi
63634 
63635 
63636   # Did user specify any unknown variables?
63637 
63638   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
63639     # Replace the separating ! with spaces before presenting for end user.
63640     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
63641     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
63642 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
63643   fi
63644 
63645 
63646   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
63647 $as_echo_n "checking if build directory is on local disk... " >&6; }
63648 
63649   # df -l lists only local disks; if the given directory is not found then
63650   # a non-zero exit code is given
63651   if test "x$DF" = x; then
63652     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63653       # msys does not have df; use Windows "net use" instead.
63654       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
63655       if test "x$IS_NETWORK_DISK" = x; then
63656         OUTPUT_DIR_IS_LOCAL="yes"
63657       else
63658         OUTPUT_DIR_IS_LOCAL="no"
63659       fi
63660     else
63661       # No df here, say it's local
63662       OUTPUT_DIR_IS_LOCAL="yes"
63663     fi
63664   else
63665     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
63666       OUTPUT_DIR_IS_LOCAL="yes"
63667     else
63668       OUTPUT_DIR_IS_LOCAL="no"
63669     fi
63670   fi
63671 
63672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
63673 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
63674 
63675 
63676 
63677   # Check if the user has any old-style ALT_ variables set.
63678   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
63679 
63680   # Before generating output files, test if they exist. If they do, this is a reconfigure.
63681   # Since we can't properly handle the dependencies for this, warn the user about the situation
63682   if test -e $OUTPUT_ROOT/spec.gmk; then
63683     IS_RECONFIGURE=yes
63684   else
63685     IS_RECONFIGURE=no
63686   fi
63687 
63688 
63689 # At the end, call the custom hook. (Dummy macro if no custom sources available)
63690 
63691 
63692 # We're messing a bit with internal autoconf variables to put the config.status
63693 # in the output directory instead of the current directory.
63694 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
63695 
63696 # Create the actual output files. Now the main work of configure is done.
63697 cat >confcache <<\_ACEOF
63698 # This file is a shell script that caches the results of configure
63699 # tests run on this system so they can be shared between configure
63700 # scripts and configure runs, see configure's option --config-cache.
63701 # It is not useful on other systems.  If it contains results you don't
63702 # want to keep, you may remove or edit it.
63703 #
63704 # config.status only pays attention to the cache file if you give it
63705 # the --recheck option to rerun configure.
63706 #
63707 # `ac_cv_env_foo' variables (set or unset) will be overridden when
63708 # loading this file, other *unset* `ac_cv_foo' will be assigned the
63709 # following values.
63710 
63711 _ACEOF
63712 
63713 # The following way of writing the cache mishandles newlines in values,
63714 # but we know of no workaround that is simple, portable, and efficient.
63715 # So, we kill variables containing newlines.
63716 # Ultrix sh set writes to stderr and can't be redirected directly,
63717 # and sets the high bit in the cache file unless we assign to the vars.
63718 (
63719   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
63720     eval ac_val=\$$ac_var
63721     case $ac_val in #(
63722     *${as_nl}*)
63723       case $ac_var in #(
63724       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
63725 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
63726       esac
63727       case $ac_var in #(
63728       _ | IFS | as_nl) ;; #(
63729       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
63730       *) { eval $ac_var=; unset $ac_var;} ;;
63731       esac ;;
63732     esac
63733   done
63734 
63735   (set) 2>&1 |
63736     case $as_nl`(ac_space=' '; set) 2>&1` in #(
63737     *${as_nl}ac_space=\ *)
63738       # `set' does not quote correctly, so add quotes: double-quote
63739       # substitution turns \\\\ into \\, and sed turns \\ into \.
63740       sed -n \
63741         "s/'/'\\\\''/g;
63742           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
63743       ;; #(
63744     *)
63745       # `set' quotes correctly as required by POSIX, so do not add quotes.
63746       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
63747       ;;
63748     esac |
63749     sort
63750 ) |
63751   sed '
63752      /^ac_cv_env_/b end
63753      t clear
63754      :clear
63755      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
63756      t end
63757      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
63758      :end' >>confcache
63759 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
63760   if test -w "$cache_file"; then
63761     if test "x$cache_file" != "x/dev/null"; then
63762       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
63763 $as_echo "$as_me: updating cache $cache_file" >&6;}
63764       if test ! -f "$cache_file" || test -h "$cache_file"; then
63765         cat confcache >"$cache_file"
63766       else
63767         case $cache_file in #(
63768         */* | ?:*)
63769           mv -f confcache "$cache_file"$$ &&
63770           mv -f "$cache_file"$$ "$cache_file" ;; #(
63771         *)
63772           mv -f confcache "$cache_file" ;;
63773         esac
63774       fi
63775     fi
63776   else
63777     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
63778 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
63779   fi
63780 fi
63781 rm -f confcache
63782 
63783 test "x$prefix" = xNONE && prefix=$ac_default_prefix
63784 # Let make expand exec_prefix.
63785 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
63786 
63787 # Transform confdefs.h into DEFS.
63788 # Protect against shell expansion while executing Makefile rules.
63789 # Protect against Makefile macro expansion.
63790 #
63791 # If the first sed substitution is executed (which looks for macros that
63792 # take arguments), then branch to the quote section.  Otherwise,
63793 # look for a macro that doesn't take arguments.
63794 ac_script='
63795 :mline
63796 /\\$/{
63797  N
63798  s,\\\n,,
63799  b mline
63800 }
63801 t clear
63802 :clear
63803 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
63804 t quote
63805 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
63806 t quote
63807 b any
63808 :quote
63809 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
63810 s/\[/\\&/g
63811 s/\]/\\&/g
63812 s/\$/$$/g
63813 H
63814 :any
63815 ${
63816         g
63817         s/^\n//
63818         s/\n/ /g
63819         p
63820 }
63821 '
63822 DEFS=`sed -n "$ac_script" confdefs.h`
63823 
63824 
63825 ac_libobjs=
63826 ac_ltlibobjs=
63827 U=
63828 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
63829   # 1. Remove the extension, and $U if already installed.
63830   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
63831   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
63832   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
63833   #    will be set to the directory where LIBOBJS objects are built.
63834   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
63835   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
63836 done
63837 LIBOBJS=$ac_libobjs
63838 
63839 LTLIBOBJS=$ac_ltlibobjs
63840 
63841 
63842 
63843 : "${CONFIG_STATUS=./config.status}"
63844 ac_write_fail=0
63845 ac_clean_files_save=$ac_clean_files
63846 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
63847 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
63848 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
63849 as_write_fail=0
63850 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
63851 #! $SHELL
63852 # Generated by $as_me.
63853 # Run this file to recreate the current configuration.
63854 # Compiler output produced by configure, useful for debugging
63855 # configure, is in config.log if it exists.
63856 
63857 debug=false
63858 ac_cs_recheck=false
63859 ac_cs_silent=false
63860 
63861 SHELL=\${CONFIG_SHELL-$SHELL}
63862 export SHELL
63863 _ASEOF
63864 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
63865 ## -------------------- ##
63866 ## M4sh Initialization. ##
63867 ## -------------------- ##
63868 
63869 # Be more Bourne compatible
63870 DUALCASE=1; export DUALCASE # for MKS sh
63871 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
63872   emulate sh
63873   NULLCMD=:
63874   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
63875   # is contrary to our usage.  Disable this feature.
63876   alias -g '${1+"$@"}'='"$@"'
63877   setopt NO_GLOB_SUBST
63878 else
63879   case `(set -o) 2>/dev/null` in #(
63880   *posix*) :
63881     set -o posix ;; #(
63882   *) :
63883      ;;
63884 esac
63885 fi
63886 
63887 
63888 as_nl='
63889 '
63890 export as_nl
63891 # Printing a long string crashes Solaris 7 /usr/bin/printf.
63892 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
63893 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
63894 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
63895 # Prefer a ksh shell builtin over an external printf program on Solaris,
63896 # but without wasting forks for bash or zsh.
63897 if test -z "$BASH_VERSION$ZSH_VERSION" \
63898     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
63899   as_echo='print -r --'
63900   as_echo_n='print -rn --'
63901 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
63902   as_echo='printf %s\n'
63903   as_echo_n='printf %s'
63904 else
63905   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
63906     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
63907     as_echo_n='/usr/ucb/echo -n'
63908   else
63909     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
63910     as_echo_n_body='eval
63911       arg=$1;
63912       case $arg in #(
63913       *"$as_nl"*)
63914         expr "X$arg" : "X\\(.*\\)$as_nl";
63915         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
63916       esac;
63917       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
63918     '
63919     export as_echo_n_body
63920     as_echo_n='sh -c $as_echo_n_body as_echo'
63921   fi
63922   export as_echo_body
63923   as_echo='sh -c $as_echo_body as_echo'
63924 fi
63925 
63926 # The user is always right.
63927 if test "${PATH_SEPARATOR+set}" != set; then
63928   PATH_SEPARATOR=:
63929   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
63930     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
63931       PATH_SEPARATOR=';'
63932   }
63933 fi
63934 
63935 
63936 # IFS
63937 # We need space, tab and new line, in precisely that order.  Quoting is
63938 # there to prevent editors from complaining about space-tab.
63939 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
63940 # splitting by setting IFS to empty value.)
63941 IFS=" ""        $as_nl"
63942 
63943 # Find who we are.  Look in the path if we contain no directory separator.
63944 as_myself=
63945 case $0 in #((
63946   *[\\/]* ) as_myself=$0 ;;
63947   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63948 for as_dir in $PATH
63949 do
63950   IFS=$as_save_IFS
63951   test -z "$as_dir" && as_dir=.
63952     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
63953   done
63954 IFS=$as_save_IFS
63955 
63956      ;;
63957 esac
63958 # We did not find ourselves, most probably we were run as `sh COMMAND'
63959 # in which case we are not to be found in the path.
63960 if test "x$as_myself" = x; then
63961   as_myself=$0
63962 fi
63963 if test ! -f "$as_myself"; then
63964   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
63965   exit 1
63966 fi
63967 
63968 # Unset variables that we do not need and which cause bugs (e.g. in
63969 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
63970 # suppresses any "Segmentation fault" message there.  '((' could
63971 # trigger a bug in pdksh 5.2.14.
63972 for as_var in BASH_ENV ENV MAIL MAILPATH
63973 do eval test x\${$as_var+set} = xset \
63974   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
63975 done
63976 PS1='$ '
63977 PS2='> '
63978 PS4='+ '
63979 
63980 # NLS nuisances.
63981 LC_ALL=C
63982 export LC_ALL
63983 LANGUAGE=C
63984 export LANGUAGE
63985 
63986 # CDPATH.
63987 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
63988 
63989 
63990 # as_fn_error STATUS ERROR [LINENO LOG_FD]
63991 # ----------------------------------------
63992 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
63993 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
63994 # script with STATUS, using 1 if that was 0.
63995 as_fn_error ()
63996 {
63997   as_status=$1; test $as_status -eq 0 && as_status=1
63998   if test "$4"; then
63999     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
64000     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
64001   fi
64002   $as_echo "$as_me: error: $2" >&2
64003   as_fn_exit $as_status
64004 } # as_fn_error
64005 
64006 
64007 # as_fn_set_status STATUS
64008 # -----------------------
64009 # Set $? to STATUS, without forking.
64010 as_fn_set_status ()
64011 {
64012   return $1
64013 } # as_fn_set_status
64014 
64015 # as_fn_exit STATUS
64016 # -----------------
64017 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
64018 as_fn_exit ()
64019 {
64020   set +e
64021   as_fn_set_status $1
64022   exit $1
64023 } # as_fn_exit
64024 
64025 # as_fn_unset VAR
64026 # ---------------
64027 # Portably unset VAR.
64028 as_fn_unset ()
64029 {
64030   { eval $1=; unset $1;}
64031 }
64032 as_unset=as_fn_unset
64033 # as_fn_append VAR VALUE
64034 # ----------------------
64035 # Append the text in VALUE to the end of the definition contained in VAR. Take
64036 # advantage of any shell optimizations that allow amortized linear growth over
64037 # repeated appends, instead of the typical quadratic growth present in naive
64038 # implementations.
64039 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
64040   eval 'as_fn_append ()
64041   {
64042     eval $1+=\$2
64043   }'
64044 else
64045   as_fn_append ()
64046   {
64047     eval $1=\$$1\$2
64048   }
64049 fi # as_fn_append
64050 
64051 # as_fn_arith ARG...
64052 # ------------------
64053 # Perform arithmetic evaluation on the ARGs, and store the result in the
64054 # global $as_val. Take advantage of shells that can avoid forks. The arguments
64055 # must be portable across $(()) and expr.
64056 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
64057   eval 'as_fn_arith ()
64058   {
64059     as_val=$(( $* ))
64060   }'
64061 else
64062   as_fn_arith ()
64063   {
64064     as_val=`expr "$@" || test $? -eq 1`
64065   }
64066 fi # as_fn_arith
64067 
64068 
64069 if expr a : '\(a\)' >/dev/null 2>&1 &&
64070    test "X`expr 00001 : '.*\(...\)'`" = X001; then
64071   as_expr=expr
64072 else
64073   as_expr=false
64074 fi
64075 
64076 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
64077   as_basename=basename
64078 else
64079   as_basename=false
64080 fi
64081 
64082 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
64083   as_dirname=dirname
64084 else
64085   as_dirname=false
64086 fi
64087 
64088 as_me=`$as_basename -- "$0" ||
64089 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
64090          X"$0" : 'X\(//\)$' \| \
64091          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
64092 $as_echo X/"$0" |
64093     sed '/^.*\/\([^/][^/]*\)\/*$/{
64094             s//\1/
64095             q
64096           }
64097           /^X\/\(\/\/\)$/{
64098             s//\1/
64099             q
64100           }
64101           /^X\/\(\/\).*/{
64102             s//\1/
64103             q
64104           }
64105           s/.*/./; q'`
64106 
64107 # Avoid depending upon Character Ranges.
64108 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
64109 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
64110 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
64111 as_cr_digits='0123456789'
64112 as_cr_alnum=$as_cr_Letters$as_cr_digits
64113 
64114 ECHO_C= ECHO_N= ECHO_T=
64115 case `echo -n x` in #(((((
64116 -n*)
64117   case `echo 'xy\c'` in
64118   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
64119   xy)  ECHO_C='\c';;
64120   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
64121        ECHO_T=' ';;
64122   esac;;
64123 *)
64124   ECHO_N='-n';;
64125 esac
64126 
64127 rm -f conf$$ conf$$.exe conf$$.file
64128 if test -d conf$$.dir; then
64129   rm -f conf$$.dir/conf$$.file
64130 else
64131   rm -f conf$$.dir
64132   mkdir conf$$.dir 2>/dev/null
64133 fi
64134 if (echo >conf$$.file) 2>/dev/null; then
64135   if ln -s conf$$.file conf$$ 2>/dev/null; then
64136     as_ln_s='ln -s'
64137     # ... but there are two gotchas:
64138     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
64139     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
64140     # In both cases, we have to default to `cp -pR'.
64141     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
64142       as_ln_s='cp -pR'
64143   elif ln conf$$.file conf$$ 2>/dev/null; then
64144     as_ln_s=ln
64145   else
64146     as_ln_s='cp -pR'
64147   fi
64148 else
64149   as_ln_s='cp -pR'
64150 fi
64151 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
64152 rmdir conf$$.dir 2>/dev/null
64153 
64154 
64155 # as_fn_mkdir_p
64156 # -------------
64157 # Create "$as_dir" as a directory, including parents if necessary.
64158 as_fn_mkdir_p ()
64159 {
64160 
64161   case $as_dir in #(
64162   -*) as_dir=./$as_dir;;
64163   esac
64164   test -d "$as_dir" || eval $as_mkdir_p || {
64165     as_dirs=
64166     while :; do
64167       case $as_dir in #(
64168       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
64169       *) as_qdir=$as_dir;;
64170       esac
64171       as_dirs="'$as_qdir' $as_dirs"
64172       as_dir=`$as_dirname -- "$as_dir" ||
64173 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
64174          X"$as_dir" : 'X\(//\)[^/]' \| \
64175          X"$as_dir" : 'X\(//\)$' \| \
64176          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
64177 $as_echo X"$as_dir" |
64178     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
64179             s//\1/
64180             q
64181           }
64182           /^X\(\/\/\)[^/].*/{
64183             s//\1/
64184             q
64185           }
64186           /^X\(\/\/\)$/{
64187             s//\1/
64188             q
64189           }
64190           /^X\(\/\).*/{
64191             s//\1/
64192             q
64193           }
64194           s/.*/./; q'`
64195       test -d "$as_dir" && break
64196     done
64197     test -z "$as_dirs" || eval "mkdir $as_dirs"
64198   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
64199 
64200 
64201 } # as_fn_mkdir_p
64202 if mkdir -p . 2>/dev/null; then
64203   as_mkdir_p='mkdir -p "$as_dir"'
64204 else
64205   test -d ./-p && rmdir ./-p
64206   as_mkdir_p=false
64207 fi
64208 
64209 
64210 # as_fn_executable_p FILE
64211 # -----------------------
64212 # Test if FILE is an executable regular file.
64213 as_fn_executable_p ()
64214 {
64215   test -f "$1" && test -x "$1"
64216 } # as_fn_executable_p
64217 as_test_x='test -x'
64218 as_executable_p=as_fn_executable_p
64219 
64220 # Sed expression to map a string onto a valid CPP name.
64221 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
64222 
64223 # Sed expression to map a string onto a valid variable name.
64224 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
64225 
64226 
64227 exec 6>&1
64228 ## ----------------------------------- ##
64229 ## Main body of $CONFIG_STATUS script. ##
64230 ## ----------------------------------- ##
64231 _ASEOF
64232 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
64233 
64234 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
64235 # Save the log message, to keep $0 and so on meaningful, and to
64236 # report actual input values of CONFIG_FILES etc. instead of their
64237 # values after options handling.
64238 ac_log="
64239 This file was extended by OpenJDK $as_me jdk9, which was
64240 generated by GNU Autoconf 2.69.  Invocation command line was
64241 
64242   CONFIG_FILES    = $CONFIG_FILES
64243   CONFIG_HEADERS  = $CONFIG_HEADERS
64244   CONFIG_LINKS    = $CONFIG_LINKS
64245   CONFIG_COMMANDS = $CONFIG_COMMANDS
64246   $ $0 $@
64247 
64248 on `(hostname || uname -n) 2>/dev/null | sed 1q`
64249 "
64250 
64251 _ACEOF
64252 
64253 case $ac_config_files in *"
64254 "*) set x $ac_config_files; shift; ac_config_files=$*;;
64255 esac
64256 
64257 
64258 
64259 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
64260 # Files that config.status was made for.
64261 config_files="$ac_config_files"
64262 
64263 _ACEOF
64264 
64265 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
64266 ac_cs_usage="\
64267 \`$as_me' instantiates files and other configuration actions
64268 from templates according to the current configuration.  Unless the files
64269 and actions are specified as TAGs, all are instantiated by default.
64270 
64271 Usage: $0 [OPTION]... [TAG]...
64272 
64273   -h, --help       print this help, then exit
64274   -V, --version    print version number and configuration settings, then exit
64275       --config     print configuration, then exit
64276   -q, --quiet, --silent
64277                    do not print progress messages
64278   -d, --debug      don't remove temporary files
64279       --recheck    update $as_me by reconfiguring in the same conditions
64280       --file=FILE[:TEMPLATE]
64281                    instantiate the configuration file FILE
64282 
64283 Configuration files:
64284 $config_files
64285 
64286 Report bugs to <build-dev@openjdk.java.net>.
64287 OpenJDK home page: <http://openjdk.java.net>."
64288 
64289 _ACEOF
64290 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
64291 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
64292 ac_cs_version="\\
64293 OpenJDK config.status jdk9
64294 configured by $0, generated by GNU Autoconf 2.69,
64295   with options \\"\$ac_cs_config\\"
64296 
64297 Copyright (C) 2012 Free Software Foundation, Inc.
64298 This config.status script is free software; the Free Software Foundation
64299 gives unlimited permission to copy, distribute and modify it."
64300 
64301 ac_pwd='$ac_pwd'
64302 srcdir='$srcdir'
64303 AWK='$AWK'
64304 test -n "\$AWK" || AWK=awk
64305 _ACEOF
64306 
64307 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
64308 # The default lists apply if the user does not specify any file.
64309 ac_need_defaults=:
64310 while test $# != 0
64311 do
64312   case $1 in
64313   --*=?*)
64314     ac_option=`expr "X$1" : 'X\([^=]*\)='`
64315     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
64316     ac_shift=:
64317     ;;
64318   --*=)
64319     ac_option=`expr "X$1" : 'X\([^=]*\)='`
64320     ac_optarg=
64321     ac_shift=:
64322     ;;
64323   *)
64324     ac_option=$1
64325     ac_optarg=$2
64326     ac_shift=shift
64327     ;;
64328   esac
64329 
64330   case $ac_option in
64331   # Handling of the options.
64332   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
64333     ac_cs_recheck=: ;;
64334   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
64335     $as_echo "$ac_cs_version"; exit ;;
64336   --config | --confi | --conf | --con | --co | --c )
64337     $as_echo "$ac_cs_config"; exit ;;
64338   --debug | --debu | --deb | --de | --d | -d )
64339     debug=: ;;
64340   --file | --fil | --fi | --f )
64341     $ac_shift
64342     case $ac_optarg in
64343     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
64344     '') as_fn_error $? "missing file argument" ;;
64345     esac
64346     as_fn_append CONFIG_FILES " '$ac_optarg'"
64347     ac_need_defaults=false;;
64348   --he | --h |  --help | --hel | -h )
64349     $as_echo "$ac_cs_usage"; exit ;;
64350   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
64351   | -silent | --silent | --silen | --sile | --sil | --si | --s)
64352     ac_cs_silent=: ;;
64353 
64354   # This is an error.
64355   -*) as_fn_error $? "unrecognized option: \`$1'
64356 Try \`$0 --help' for more information." ;;
64357 
64358   *) as_fn_append ac_config_targets " $1"
64359      ac_need_defaults=false ;;
64360 
64361   esac
64362   shift
64363 done
64364 
64365 ac_configure_extra_args=
64366 
64367 if $ac_cs_silent; then
64368   exec 6>/dev/null
64369   ac_configure_extra_args="$ac_configure_extra_args --silent"
64370 fi
64371 
64372 _ACEOF
64373 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
64374 if \$ac_cs_recheck; then
64375   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
64376   shift
64377   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
64378   CONFIG_SHELL='$SHELL'
64379   export CONFIG_SHELL
64380   exec "\$@"
64381 fi
64382 
64383 _ACEOF
64384 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
64385 exec 5>>config.log
64386 {
64387   echo
64388   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
64389 ## Running $as_me. ##
64390 _ASBOX
64391   $as_echo "$ac_log"
64392 } >&5
64393 
64394 _ACEOF
64395 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
64396 _ACEOF
64397 
64398 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
64399 
64400 # Handling of arguments.
64401 for ac_config_target in $ac_config_targets
64402 do
64403   case $ac_config_target in
64404     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
64405     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
64406     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
64407     "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
64408     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
64409     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
64410 
64411   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
64412   esac
64413 done
64414 
64415 
64416 # If the user did not use the arguments to specify the items to instantiate,
64417 # then the envvar interface is used.  Set only those that are not.
64418 # We use the long form for the default assignment because of an extremely
64419 # bizarre bug on SunOS 4.1.3.
64420 if $ac_need_defaults; then
64421   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
64422 fi
64423 
64424 # Have a temporary directory for convenience.  Make it in the build tree
64425 # simply because there is no reason against having it here, and in addition,
64426 # creating and moving files from /tmp can sometimes cause problems.
64427 # Hook for its removal unless debugging.
64428 # Note that there is a small window in which the directory will not be cleaned:
64429 # after its creation but before its name has been assigned to `$tmp'.
64430 $debug ||
64431 {
64432   tmp= ac_tmp=
64433   trap 'exit_status=$?
64434   : "${ac_tmp:=$tmp}"
64435   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
64436 ' 0
64437   trap 'as_fn_exit 1' 1 2 13 15
64438 }
64439 # Create a (secure) tmp directory for tmp files.
64440 
64441 {
64442   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
64443   test -d "$tmp"
64444 }  ||
64445 {
64446   tmp=./conf$$-$RANDOM
64447   (umask 077 && mkdir "$tmp")
64448 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
64449 ac_tmp=$tmp
64450 
64451 # Set up the scripts for CONFIG_FILES section.
64452 # No need to generate them if there are no CONFIG_FILES.
64453 # This happens for instance with `./config.status config.h'.
64454 if test -n "$CONFIG_FILES"; then
64455 
64456 
64457 ac_cr=`echo X | tr X '\015'`
64458 # On cygwin, bash can eat \r inside `` if the user requested igncr.
64459 # But we know of no other shell where ac_cr would be empty at this
64460 # point, so we can use a bashism as a fallback.
64461 if test "x$ac_cr" = x; then
64462   eval ac_cr=\$\'\\r\'
64463 fi
64464 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
64465 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
64466   ac_cs_awk_cr='\\r'
64467 else
64468   ac_cs_awk_cr=$ac_cr
64469 fi
64470 
64471 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
64472 _ACEOF
64473 
64474 
64475 {
64476   echo "cat >conf$$subs.awk <<_ACEOF" &&
64477   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
64478   echo "_ACEOF"
64479 } >conf$$subs.sh ||
64480   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
64481 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
64482 ac_delim='%!_!# '
64483 for ac_last_try in false false false false false :; do
64484   . ./conf$$subs.sh ||
64485     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
64486 
64487   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
64488   if test $ac_delim_n = $ac_delim_num; then
64489     break
64490   elif $ac_last_try; then
64491     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
64492   else
64493     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
64494   fi
64495 done
64496 rm -f conf$$subs.sh
64497 
64498 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
64499 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
64500 _ACEOF
64501 sed -n '
64502 h
64503 s/^/S["/; s/!.*/"]=/
64504 p
64505 g
64506 s/^[^!]*!//
64507 :repl
64508 t repl
64509 s/'"$ac_delim"'$//
64510 t delim
64511 :nl
64512 h
64513 s/\(.\{148\}\)..*/\1/
64514 t more1
64515 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
64516 p
64517 n
64518 b repl
64519 :more1
64520 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
64521 p
64522 g
64523 s/.\{148\}//
64524 t nl
64525 :delim
64526 h
64527 s/\(.\{148\}\)..*/\1/
64528 t more2
64529 s/["\\]/\\&/g; s/^/"/; s/$/"/
64530 p
64531 b
64532 :more2
64533 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
64534 p
64535 g
64536 s/.\{148\}//
64537 t delim
64538 ' <conf$$subs.awk | sed '
64539 /^[^""]/{
64540   N
64541   s/\n//
64542 }
64543 ' >>$CONFIG_STATUS || ac_write_fail=1
64544 rm -f conf$$subs.awk
64545 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
64546 _ACAWK
64547 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
64548   for (key in S) S_is_set[key] = 1
64549   FS = ""
64550 
64551 }
64552 {
64553   line = $ 0
64554   nfields = split(line, field, "@")
64555   substed = 0
64556   len = length(field[1])
64557   for (i = 2; i < nfields; i++) {
64558     key = field[i]
64559     keylen = length(key)
64560     if (S_is_set[key]) {
64561       value = S[key]
64562       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
64563       len += length(value) + length(field[++i])
64564       substed = 1
64565     } else
64566       len += 1 + keylen
64567   }
64568 
64569   print line
64570 }
64571 
64572 _ACAWK
64573 _ACEOF
64574 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
64575 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
64576   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
64577 else
64578   cat
64579 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
64580   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
64581 _ACEOF
64582 
64583 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
64584 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
64585 # trailing colons and then remove the whole line if VPATH becomes empty
64586 # (actually we leave an empty line to preserve line numbers).
64587 if test "x$srcdir" = x.; then
64588   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
64589 h
64590 s///
64591 s/^/:/
64592 s/[      ]*$/:/
64593 s/:\$(srcdir):/:/g
64594 s/:\${srcdir}:/:/g
64595 s/:@srcdir@:/:/g
64596 s/^:*//
64597 s/:*$//
64598 x
64599 s/\(=[   ]*\).*/\1/
64600 G
64601 s/\n//
64602 s/^[^=]*=[       ]*$//
64603 }'
64604 fi
64605 
64606 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
64607 fi # test -n "$CONFIG_FILES"
64608 
64609 
64610 eval set X "  :F $CONFIG_FILES      "
64611 shift
64612 for ac_tag
64613 do
64614   case $ac_tag in
64615   :[FHLC]) ac_mode=$ac_tag; continue;;
64616   esac
64617   case $ac_mode$ac_tag in
64618   :[FHL]*:*);;
64619   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
64620   :[FH]-) ac_tag=-:-;;
64621   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
64622   esac
64623   ac_save_IFS=$IFS
64624   IFS=:
64625   set x $ac_tag
64626   IFS=$ac_save_IFS
64627   shift
64628   ac_file=$1
64629   shift
64630 
64631   case $ac_mode in
64632   :L) ac_source=$1;;
64633   :[FH])
64634     ac_file_inputs=
64635     for ac_f
64636     do
64637       case $ac_f in
64638       -) ac_f="$ac_tmp/stdin";;
64639       *) # Look for the file first in the build tree, then in the source tree
64640          # (if the path is not absolute).  The absolute path cannot be DOS-style,
64641          # because $ac_f cannot contain `:'.
64642          test -f "$ac_f" ||
64643            case $ac_f in
64644            [\\/$]*) false;;
64645            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
64646            esac ||
64647            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
64648       esac
64649       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
64650       as_fn_append ac_file_inputs " '$ac_f'"
64651     done
64652 
64653     # Let's still pretend it is `configure' which instantiates (i.e., don't
64654     # use $as_me), people would be surprised to read:
64655     #    /* config.h.  Generated by config.status.  */
64656     configure_input='Generated from '`
64657           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
64658         `' by configure.'
64659     if test x"$ac_file" != x-; then
64660       configure_input="$ac_file.  $configure_input"
64661       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
64662 $as_echo "$as_me: creating $ac_file" >&6;}
64663     fi
64664     # Neutralize special characters interpreted by sed in replacement strings.
64665     case $configure_input in #(
64666     *\&* | *\|* | *\\* )
64667        ac_sed_conf_input=`$as_echo "$configure_input" |
64668        sed 's/[\\\\&|]/\\\\&/g'`;; #(
64669     *) ac_sed_conf_input=$configure_input;;
64670     esac
64671 
64672     case $ac_tag in
64673     *:-:* | *:-) cat >"$ac_tmp/stdin" \
64674       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
64675     esac
64676     ;;
64677   esac
64678 
64679   ac_dir=`$as_dirname -- "$ac_file" ||
64680 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
64681          X"$ac_file" : 'X\(//\)[^/]' \| \
64682          X"$ac_file" : 'X\(//\)$' \| \
64683          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
64684 $as_echo X"$ac_file" |
64685     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
64686             s//\1/
64687             q
64688           }
64689           /^X\(\/\/\)[^/].*/{
64690             s//\1/
64691             q
64692           }
64693           /^X\(\/\/\)$/{
64694             s//\1/
64695             q
64696           }
64697           /^X\(\/\).*/{
64698             s//\1/
64699             q
64700           }
64701           s/.*/./; q'`
64702   as_dir="$ac_dir"; as_fn_mkdir_p
64703   ac_builddir=.
64704 
64705 case "$ac_dir" in
64706 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
64707 *)
64708   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
64709   # A ".." for each directory in $ac_dir_suffix.
64710   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
64711   case $ac_top_builddir_sub in
64712   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
64713   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
64714   esac ;;
64715 esac
64716 ac_abs_top_builddir=$ac_pwd
64717 ac_abs_builddir=$ac_pwd$ac_dir_suffix
64718 # for backward compatibility:
64719 ac_top_builddir=$ac_top_build_prefix
64720 
64721 case $srcdir in
64722   .)  # We are building in place.
64723     ac_srcdir=.
64724     ac_top_srcdir=$ac_top_builddir_sub
64725     ac_abs_top_srcdir=$ac_pwd ;;
64726   [\\/]* | ?:[\\/]* )  # Absolute name.
64727     ac_srcdir=$srcdir$ac_dir_suffix;
64728     ac_top_srcdir=$srcdir
64729     ac_abs_top_srcdir=$srcdir ;;
64730   *) # Relative name.
64731     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
64732     ac_top_srcdir=$ac_top_build_prefix$srcdir
64733     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
64734 esac
64735 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
64736 
64737 
64738   case $ac_mode in
64739   :F)
64740   #
64741   # CONFIG_FILE
64742   #
64743 
64744 _ACEOF
64745 
64746 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
64747 # If the template does not know about datarootdir, expand it.
64748 # FIXME: This hack should be removed a few years after 2.60.
64749 ac_datarootdir_hack=; ac_datarootdir_seen=
64750 ac_sed_dataroot='
64751 /datarootdir/ {
64752   p
64753   q
64754 }
64755 /@datadir@/p
64756 /@docdir@/p
64757 /@infodir@/p
64758 /@localedir@/p
64759 /@mandir@/p'
64760 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
64761 *datarootdir*) ac_datarootdir_seen=yes;;
64762 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
64763   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
64764 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
64765 _ACEOF
64766 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
64767   ac_datarootdir_hack='
64768   s&@datadir@&$datadir&g
64769   s&@docdir@&$docdir&g
64770   s&@infodir@&$infodir&g
64771   s&@localedir@&$localedir&g
64772   s&@mandir@&$mandir&g
64773   s&\\\${datarootdir}&$datarootdir&g' ;;
64774 esac
64775 _ACEOF
64776 
64777 # Neutralize VPATH when `$srcdir' = `.'.
64778 # Shell code in configure.ac might set extrasub.
64779 # FIXME: do we really want to maintain this feature?
64780 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
64781 ac_sed_extra="$ac_vpsub
64782 $extrasub
64783 _ACEOF
64784 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
64785 :t
64786 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
64787 s|@configure_input@|$ac_sed_conf_input|;t t
64788 s&@top_builddir@&$ac_top_builddir_sub&;t t
64789 s&@top_build_prefix@&$ac_top_build_prefix&;t t
64790 s&@srcdir@&$ac_srcdir&;t t
64791 s&@abs_srcdir@&$ac_abs_srcdir&;t t
64792 s&@top_srcdir@&$ac_top_srcdir&;t t
64793 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
64794 s&@builddir@&$ac_builddir&;t t
64795 s&@abs_builddir@&$ac_abs_builddir&;t t
64796 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
64797 $ac_datarootdir_hack
64798 "
64799 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
64800   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
64801 
64802 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
64803   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
64804   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
64805       "$ac_tmp/out"`; test -z "$ac_out"; } &&
64806   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
64807 which seems to be undefined.  Please make sure it is defined" >&5
64808 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
64809 which seems to be undefined.  Please make sure it is defined" >&2;}
64810 
64811   rm -f "$ac_tmp/stdin"
64812   case $ac_file in
64813   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
64814   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
64815   esac \
64816   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
64817  ;;
64818 
64819 
64820 
64821   esac
64822 
64823 done # for ac_tag
64824 
64825 
64826 as_fn_exit 0
64827 _ACEOF
64828 ac_clean_files=$ac_clean_files_save
64829 
64830 test $ac_write_fail = 0 ||
64831   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
64832 
64833 
64834 # configure is writing to config.log, and then calls config.status.
64835 # config.status does its own redirection, appending to config.log.
64836 # Unfortunately, on DOS this fails, as config.log is still kept open
64837 # by configure, so config.status won't be able to write to it; its
64838 # output is simply discarded.  So we exec the FD to /dev/null,
64839 # effectively closing config.log, so it can be properly (re)opened and
64840 # appended to by config.status.  When coming back to configure, we
64841 # need to make the FD available again.
64842 if test "$no_create" != yes; then
64843   ac_cs_success=:
64844   ac_config_status_args=
64845   test "$silent" = yes &&
64846     ac_config_status_args="$ac_config_status_args --quiet"
64847   exec 5>/dev/null
64848   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
64849   exec 5>>config.log
64850   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
64851   # would make configure fail if this is the last instruction.
64852   $ac_cs_success || as_fn_exit 1
64853 fi
64854 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
64855   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
64856 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
64857 fi
64858 
64859 
64860 # After AC_OUTPUT, we need to do final work
64861 
64862 
64863   # Try to move config.log (generated by autoconf) to the configure-support directory.
64864   if test -e ./config.log; then
64865     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
64866   fi
64867 
64868   # Rotate our log file (configure.log)
64869   if test -e "$OUTPUT_ROOT/configure.log.old"; then
64870     $RM -f "$OUTPUT_ROOT/configure.log.old"
64871   fi
64872   if test -e "$OUTPUT_ROOT/configure.log"; then
64873     $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
64874   fi
64875 
64876   # Move configure.log from current directory to the build output root
64877   if test -e ./configure.log; then
64878     $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
64879   fi
64880 
64881   # Make the compare script executable
64882   $CHMOD +x $OUTPUT_ROOT/compare.sh
64883 
64884 
64885 # Finally output some useful information to the user
64886 
64887   # Finally output some useful information to the user
64888 
64889   printf "\n"
64890   printf "====================================================\n"
64891   if test "x$no_create" != "xyes"; then
64892     if test "x$IS_RECONFIGURE" != "xyes"; then
64893       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
64894     else
64895       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
64896     fi
64897   else
64898     if test "x$IS_RECONFIGURE" != "xyes"; then
64899       printf "A configuration has been successfully checked but not created\n"
64900     else
64901       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
64902     fi
64903   fi
64904   if test "x$CONFIGURE_COMMAND_LINE" != x; then
64905     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
64906   else
64907     printf "using default settings.\n"
64908   fi
64909 
64910   printf "\n"
64911   printf "Configuration summary:\n"
64912   printf "* Debug level:    $DEBUG_LEVEL\n"
64913   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
64914   printf "* JDK variant:    $JDK_VARIANT\n"
64915   printf "* JVM variants:   $with_jvm_variants\n"
64916   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
64917   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
64918 
64919   printf "\n"
64920   printf "Tools summary:\n"
64921   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
64922     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
64923   fi
64924   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
64925   if test "x$TOOLCHAIN_VERSION" != "x"; then
64926     print_version=" $TOOLCHAIN_VERSION"
64927   fi
64928   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
64929   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
64930   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
64931 
64932   printf "\n"
64933   printf "Build performance summary:\n"
64934   printf "* Cores to use:   $JOBS\n"
64935   printf "* Memory limit:   $MEMORY_SIZE MB\n"
64936   if test "x$CCACHE_STATUS" != "x"; then
64937     printf "* ccache status:  $CCACHE_STATUS\n"
64938   fi
64939   printf "\n"
64940 
64941   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
64942     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
64943     printf "will result in longer build times.\n"
64944     printf "\n"
64945   fi
64946 
64947   if test "x$FOUND_ALT_VARIABLES" != "x"; then
64948     printf "WARNING: You have old-style ALT_ environment variables set.\n"
64949     printf "These are not respected, and will be ignored. It is recommended\n"
64950     printf "that you clean your environment. The following variables are set:\n"
64951     printf "$FOUND_ALT_VARIABLES\n"
64952     printf "\n"
64953   fi
64954 
64955   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
64956     printf "WARNING: Your build output directory is not on a local disk.\n"
64957     printf "This will severely degrade build performance!\n"
64958     printf "It is recommended that you create an output directory on a local disk,\n"
64959     printf "and run the configure script again from that directory.\n"
64960     printf "\n"
64961   fi
64962 
64963   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
64964     printf "WARNING: The result of this configuration has overridden an older\n"
64965     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
64966     printf "proper build. Failure to do so might result in strange build problems.\n"
64967     printf "\n"
64968   fi
64969 
64970   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
64971     printf "WARNING: The result of this configuration was not saved.\n"
64972     printf "You should run without '--no-create | -n' to create the configuration.\n"
64973     printf "\n"
64974   fi
64975 
64976 
64977 
64978   # Locate config.log.
64979   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
64980     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
64981   elif test -e "./config.log"; then
64982     CONFIG_LOG_PATH="."
64983   fi
64984 
64985   if test -e "$CONFIG_LOG_PATH/config.log"; then
64986     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
64987     if test $? -eq 0; then
64988       printf "The following warnings were produced. Repeated here for convenience:\n"
64989       # We must quote sed expression (using []) to stop m4 from eating the [].
64990       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
64991       printf "\n"
64992     fi
64993   fi
64994