1 #!/bin/bash
   2 #
   3 # ##########################################################
   4 # ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
   5 # ##########################################################
   6 #
   7 #! /bin/sh
   8 # Guess values for system-dependent variables and create Makefiles.
   9 # Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
  10 #
  11 # Report bugs to <build-dev@openjdk.java.net>.
  12 #
  13 #
  14 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
  15 #
  16 #
  17 # This configure script is free software; the Free Software Foundation
  18 # gives unlimited permission to copy, distribute and modify it.
  19 ## -------------------- ##
  20 ## M4sh Initialization. ##
  21 ## -------------------- ##
  22 
  23 # Be more Bourne compatible
  24 DUALCASE=1; export DUALCASE # for MKS sh
  25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  26   emulate sh
  27   NULLCMD=:
  28   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  29   # is contrary to our usage.  Disable this feature.
  30   alias -g '${1+"$@"}'='"$@"'
  31   setopt NO_GLOB_SUBST
  32 else
  33   case `(set -o) 2>/dev/null` in #(
  34   *posix*) :
  35     set -o posix ;; #(
  36   *) :
  37      ;;
  38 esac
  39 fi
  40 
  41 
  42 as_nl='
  43 '
  44 export as_nl
  45 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  46 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  47 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  48 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  49 # Prefer a ksh shell builtin over an external printf program on Solaris,
  50 # but without wasting forks for bash or zsh.
  51 if test -z "$BASH_VERSION$ZSH_VERSION" \
  52     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  53   as_echo='print -r --'
  54   as_echo_n='print -rn --'
  55 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  56   as_echo='printf %s\n'
  57   as_echo_n='printf %s'
  58 else
  59   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  60     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  61     as_echo_n='/usr/ucb/echo -n'
  62   else
  63     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  64     as_echo_n_body='eval
  65       arg=$1;
  66       case $arg in #(
  67       *"$as_nl"*)
  68         expr "X$arg" : "X\\(.*\\)$as_nl";
  69         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  70       esac;
  71       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  72     '
  73     export as_echo_n_body
  74     as_echo_n='sh -c $as_echo_n_body as_echo'
  75   fi
  76   export as_echo_body
  77   as_echo='sh -c $as_echo_body as_echo'
  78 fi
  79 
  80 # The user is always right.
  81 if test "${PATH_SEPARATOR+set}" != set; then
  82   PATH_SEPARATOR=:
  83   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  84     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  85       PATH_SEPARATOR=';'
  86   }
  87 fi
  88 
  89 
  90 # IFS
  91 # We need space, tab and new line, in precisely that order.  Quoting is
  92 # there to prevent editors from complaining about space-tab.
  93 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  94 # splitting by setting IFS to empty value.)
  95 IFS=" ""        $as_nl"
  96 
  97 # Find who we are.  Look in the path if we contain no directory separator.
  98 as_myself=
  99 case $0 in #((
 100   *[\\/]* ) as_myself=$0 ;;
 101   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 102 for as_dir in $PATH
 103 do
 104   IFS=$as_save_IFS
 105   test -z "$as_dir" && as_dir=.
 106     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 107   done
 108 IFS=$as_save_IFS
 109 
 110      ;;
 111 esac
 112 # We did not find ourselves, most probably we were run as `sh COMMAND'
 113 # in which case we are not to be found in the path.
 114 if test "x$as_myself" = x; then
 115   as_myself=$0
 116 fi
 117 if test ! -f "$as_myself"; then
 118   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 119   exit 1
 120 fi
 121 
 122 # Unset variables that we do not need and which cause bugs (e.g. in
 123 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 124 # suppresses any "Segmentation fault" message there.  '((' could
 125 # trigger a bug in pdksh 5.2.14.
 126 for as_var in BASH_ENV ENV MAIL MAILPATH
 127 do eval test x\${$as_var+set} = xset \
 128   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 129 done
 130 PS1='$ '
 131 PS2='> '
 132 PS4='+ '
 133 
 134 # NLS nuisances.
 135 LC_ALL=C
 136 export LC_ALL
 137 LANGUAGE=C
 138 export LANGUAGE
 139 
 140 # CDPATH.
 141 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 142 
 143 # Use a proper internal environment variable to ensure we don't fall
 144   # into an infinite loop, continuously re-executing ourselves.
 145   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
 146     _as_can_reexec=no; export _as_can_reexec;
 147     # We cannot yet assume a decent shell, so we have to provide a
 148 # neutralization value for shells without unset; and this also
 149 # works around shells that cannot unset nonexistent variables.
 150 # Preserve -v and -x to the replacement shell.
 151 BASH_ENV=/dev/null
 152 ENV=/dev/null
 153 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 154 case $- in # ((((
 155   *v*x* | *x*v* ) as_opts=-vx ;;
 156   *v* ) as_opts=-v ;;
 157   *x* ) as_opts=-x ;;
 158   * ) as_opts= ;;
 159 esac
 160 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 161 # Admittedly, this is quite paranoid, since all the known shells bail
 162 # out after a failed `exec'.
 163 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 164 as_fn_exit 255
 165   fi
 166   # We don't want this to propagate to other subprocesses.
 167           { _as_can_reexec=; unset _as_can_reexec;}
 168 if test "x$CONFIG_SHELL" = x; then
 169   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 170   emulate sh
 171   NULLCMD=:
 172   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 173   # is contrary to our usage.  Disable this feature.
 174   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 175   setopt NO_GLOB_SUBST
 176 else
 177   case \`(set -o) 2>/dev/null\` in #(
 178   *posix*) :
 179     set -o posix ;; #(
 180   *) :
 181      ;;
 182 esac
 183 fi
 184 "
 185   as_required="as_fn_return () { (exit \$1); }
 186 as_fn_success () { as_fn_return 0; }
 187 as_fn_failure () { as_fn_return 1; }
 188 as_fn_ret_success () { return 0; }
 189 as_fn_ret_failure () { return 1; }
 190 
 191 exitcode=0
 192 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 193 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 194 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 195 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 196 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 197 
 198 else
 199   exitcode=1; echo positional parameters were not saved.
 200 fi
 201 test x\$exitcode = x0 || exit 1
 202 test -x / || exit 1"
 203   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 204   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 205   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 206   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 207 test \$(( 1 + 1 )) = 2 || exit 1"
 208   if (eval "$as_required") 2>/dev/null; then :
 209   as_have_required=yes
 210 else
 211   as_have_required=no
 212 fi
 213   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 214 
 215 else
 216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 217 as_found=false
 218 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 219 do
 220   IFS=$as_save_IFS
 221   test -z "$as_dir" && as_dir=.
 222   as_found=:
 223   case $as_dir in #(
 224          /*)
 225            for as_base in sh bash ksh sh5; do
 226              # Try only shells that exist, to save several forks.
 227              as_shell=$as_dir/$as_base
 228              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 229                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 230   CONFIG_SHELL=$as_shell as_have_required=yes
 231                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 232   break 2
 233 fi
 234 fi
 235            done;;
 236        esac
 237   as_found=false
 238 done
 239 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 240               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 241   CONFIG_SHELL=$SHELL as_have_required=yes
 242 fi; }
 243 IFS=$as_save_IFS
 244 
 245 
 246       if test "x$CONFIG_SHELL" != x; then :
 247   export CONFIG_SHELL
 248              # We cannot yet assume a decent shell, so we have to provide a
 249 # neutralization value for shells without unset; and this also
 250 # works around shells that cannot unset nonexistent variables.
 251 # Preserve -v and -x to the replacement shell.
 252 BASH_ENV=/dev/null
 253 ENV=/dev/null
 254 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 255 case $- in # ((((
 256   *v*x* | *x*v* ) as_opts=-vx ;;
 257   *v* ) as_opts=-v ;;
 258   *x* ) as_opts=-x ;;
 259   * ) as_opts= ;;
 260 esac
 261 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 262 # Admittedly, this is quite paranoid, since all the known shells bail
 263 # out after a failed `exec'.
 264 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 265 exit 255
 266 fi
 267 
 268     if test x$as_have_required = xno; then :
 269   $as_echo "$0: This script requires a shell more modern than all"
 270   $as_echo "$0: the shells that I found on your system."
 271   if test x${ZSH_VERSION+set} = xset ; then
 272     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 273     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 274   else
 275     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 276 $0: build-dev@openjdk.java.net about your system, including
 277 $0: any error possibly output before this message. Then
 278 $0: install a modern shell, or manually run the script
 279 $0: under such a shell if you do have one."
 280   fi
 281   exit 1
 282 fi
 283 fi
 284 fi
 285 SHELL=${CONFIG_SHELL-/bin/sh}
 286 export SHELL
 287 # Unset more variables known to interfere with behavior of common tools.
 288 CLICOLOR_FORCE= GREP_OPTIONS=
 289 unset CLICOLOR_FORCE GREP_OPTIONS
 290 
 291 ## --------------------- ##
 292 ## M4sh Shell Functions. ##
 293 ## --------------------- ##
 294 # as_fn_unset VAR
 295 # ---------------
 296 # Portably unset VAR.
 297 as_fn_unset ()
 298 {
 299   { eval $1=; unset $1;}
 300 }
 301 as_unset=as_fn_unset
 302 
 303 # as_fn_set_status STATUS
 304 # -----------------------
 305 # Set $? to STATUS, without forking.
 306 as_fn_set_status ()
 307 {
 308   return $1
 309 } # as_fn_set_status
 310 
 311 # as_fn_exit STATUS
 312 # -----------------
 313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 314 as_fn_exit ()
 315 {
 316   set +e
 317   as_fn_set_status $1
 318   exit $1
 319 } # as_fn_exit
 320 
 321 # as_fn_mkdir_p
 322 # -------------
 323 # Create "$as_dir" as a directory, including parents if necessary.
 324 as_fn_mkdir_p ()
 325 {
 326 
 327   case $as_dir in #(
 328   -*) as_dir=./$as_dir;;
 329   esac
 330   test -d "$as_dir" || eval $as_mkdir_p || {
 331     as_dirs=
 332     while :; do
 333       case $as_dir in #(
 334       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 335       *) as_qdir=$as_dir;;
 336       esac
 337       as_dirs="'$as_qdir' $as_dirs"
 338       as_dir=`$as_dirname -- "$as_dir" ||
 339 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 340          X"$as_dir" : 'X\(//\)[^/]' \| \
 341          X"$as_dir" : 'X\(//\)$' \| \
 342          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 343 $as_echo X"$as_dir" |
 344     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 345             s//\1/
 346             q
 347           }
 348           /^X\(\/\/\)[^/].*/{
 349             s//\1/
 350             q
 351           }
 352           /^X\(\/\/\)$/{
 353             s//\1/
 354             q
 355           }
 356           /^X\(\/\).*/{
 357             s//\1/
 358             q
 359           }
 360           s/.*/./; q'`
 361       test -d "$as_dir" && break
 362     done
 363     test -z "$as_dirs" || eval "mkdir $as_dirs"
 364   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 365 
 366 
 367 } # as_fn_mkdir_p
 368 
 369 # as_fn_executable_p FILE
 370 # -----------------------
 371 # Test if FILE is an executable regular file.
 372 as_fn_executable_p ()
 373 {
 374   test -f "$1" && test -x "$1"
 375 } # as_fn_executable_p
 376 # as_fn_append VAR VALUE
 377 # ----------------------
 378 # Append the text in VALUE to the end of the definition contained in VAR. Take
 379 # advantage of any shell optimizations that allow amortized linear growth over
 380 # repeated appends, instead of the typical quadratic growth present in naive
 381 # implementations.
 382 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 383   eval 'as_fn_append ()
 384   {
 385     eval $1+=\$2
 386   }'
 387 else
 388   as_fn_append ()
 389   {
 390     eval $1=\$$1\$2
 391   }
 392 fi # as_fn_append
 393 
 394 # as_fn_arith ARG...
 395 # ------------------
 396 # Perform arithmetic evaluation on the ARGs, and store the result in the
 397 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 398 # must be portable across $(()) and expr.
 399 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 400   eval 'as_fn_arith ()
 401   {
 402     as_val=$(( $* ))
 403   }'
 404 else
 405   as_fn_arith ()
 406   {
 407     as_val=`expr "$@" || test $? -eq 1`
 408   }
 409 fi # as_fn_arith
 410 
 411 
 412 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 413 # ----------------------------------------
 414 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 415 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 416 # script with STATUS, using 1 if that was 0.
 417 as_fn_error ()
 418 {
 419   as_status=$1; test $as_status -eq 0 && as_status=1
 420   if test "$4"; then
 421     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 422     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 423   fi
 424   $as_echo "$as_me: error: $2" >&2
 425   as_fn_exit $as_status
 426 } # as_fn_error
 427 
 428 if expr a : '\(a\)' >/dev/null 2>&1 &&
 429    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 430   as_expr=expr
 431 else
 432   as_expr=false
 433 fi
 434 
 435 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 436   as_basename=basename
 437 else
 438   as_basename=false
 439 fi
 440 
 441 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 442   as_dirname=dirname
 443 else
 444   as_dirname=false
 445 fi
 446 
 447 as_me=`$as_basename -- "$0" ||
 448 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 449          X"$0" : 'X\(//\)$' \| \
 450          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 451 $as_echo X/"$0" |
 452     sed '/^.*\/\([^/][^/]*\)\/*$/{
 453             s//\1/
 454             q
 455           }
 456           /^X\/\(\/\/\)$/{
 457             s//\1/
 458             q
 459           }
 460           /^X\/\(\/\).*/{
 461             s//\1/
 462             q
 463           }
 464           s/.*/./; q'`
 465 
 466 # Avoid depending upon Character Ranges.
 467 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 468 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 469 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 470 as_cr_digits='0123456789'
 471 as_cr_alnum=$as_cr_Letters$as_cr_digits
 472 
 473 
 474   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 475   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 476   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 477   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 478   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 479   sed -n '
 480     p
 481     /[$]LINENO/=
 482   ' <$as_myself |
 483     sed '
 484       s/[$]LINENO.*/&-/
 485       t lineno
 486       b
 487       :lineno
 488       N
 489       :loop
 490       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 491       t loop
 492       s/-\n.*//
 493     ' >$as_me.lineno &&
 494   chmod +x "$as_me.lineno" ||
 495     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 496 
 497   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
 498   # already done that, so ensure we don't try to do so again and fall
 499   # in an infinite loop.  This has already happened in practice.
 500   _as_can_reexec=no; export _as_can_reexec
 501   # Don't try to exec as it changes $[0], causing all sort of problems
 502   # (the dirname of $[0] is not the place where we might find the
 503   # original and so on.  Autoconf is especially sensitive to this).
 504   . "./$as_me.lineno"
 505   # Exit status is that of the last command.
 506   exit
 507 }
 508 
 509 ECHO_C= ECHO_N= ECHO_T=
 510 case `echo -n x` in #(((((
 511 -n*)
 512   case `echo 'xy\c'` in
 513   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 514   xy)  ECHO_C='\c';;
 515   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 516        ECHO_T=' ';;
 517   esac;;
 518 *)
 519   ECHO_N='-n';;
 520 esac
 521 
 522 rm -f conf$$ conf$$.exe conf$$.file
 523 if test -d conf$$.dir; then
 524   rm -f conf$$.dir/conf$$.file
 525 else
 526   rm -f conf$$.dir
 527   mkdir conf$$.dir 2>/dev/null
 528 fi
 529 if (echo >conf$$.file) 2>/dev/null; then
 530   if ln -s conf$$.file conf$$ 2>/dev/null; then
 531     as_ln_s='ln -s'
 532     # ... but there are two gotchas:
 533     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 534     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 535     # In both cases, we have to default to `cp -pR'.
 536     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 537       as_ln_s='cp -pR'
 538   elif ln conf$$.file conf$$ 2>/dev/null; then
 539     as_ln_s=ln
 540   else
 541     as_ln_s='cp -pR'
 542   fi
 543 else
 544   as_ln_s='cp -pR'
 545 fi
 546 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 547 rmdir conf$$.dir 2>/dev/null
 548 
 549 if mkdir -p . 2>/dev/null; then
 550   as_mkdir_p='mkdir -p "$as_dir"'
 551 else
 552   test -d ./-p && rmdir ./-p
 553   as_mkdir_p=false
 554 fi
 555 
 556 as_test_x='test -x'
 557 as_executable_p=as_fn_executable_p
 558 
 559 # Sed expression to map a string onto a valid CPP name.
 560 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 561 
 562 # Sed expression to map a string onto a valid variable name.
 563 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 564 
 565 
 566 test -n "$DJDIR" || exec 7<&0 </dev/null
 567 exec 6>&1
 568 
 569 # Name of the host.
 570 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 571 # so uname gets run too.
 572 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 573 
 574 #
 575 # Initializations.
 576 #
 577 ac_default_prefix=/usr/local
 578 ac_clean_files=
 579 ac_config_libobj_dir=.
 580 LIBOBJS=
 581 cross_compiling=no
 582 subdirs=
 583 MFLAGS=
 584 MAKEFLAGS=
 585 
 586 # Identity of this package.
 587 PACKAGE_NAME='OpenJDK'
 588 PACKAGE_TARNAME='openjdk'
 589 PACKAGE_VERSION='jdk9'
 590 PACKAGE_STRING='OpenJDK jdk9'
 591 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 592 PACKAGE_URL='http://openjdk.java.net'
 593 
 594 # Factoring default headers for most tests.
 595 ac_includes_default="\
 596 #include <stdio.h>
 597 #ifdef HAVE_SYS_TYPES_H
 598 # include <sys/types.h>
 599 #endif
 600 #ifdef HAVE_SYS_STAT_H
 601 # include <sys/stat.h>
 602 #endif
 603 #ifdef STDC_HEADERS
 604 # include <stdlib.h>
 605 # include <stddef.h>
 606 #else
 607 # ifdef HAVE_STDLIB_H
 608 #  include <stdlib.h>
 609 # endif
 610 #endif
 611 #ifdef HAVE_STRING_H
 612 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 613 #  include <memory.h>
 614 # endif
 615 # include <string.h>
 616 #endif
 617 #ifdef HAVE_STRINGS_H
 618 # include <strings.h>
 619 #endif
 620 #ifdef HAVE_INTTYPES_H
 621 # include <inttypes.h>
 622 #endif
 623 #ifdef HAVE_STDINT_H
 624 # include <stdint.h>
 625 #endif
 626 #ifdef HAVE_UNISTD_H
 627 # include <unistd.h>
 628 #endif"
 629 
 630 ac_subst_vars='LTLIBOBJS
 631 LIBOBJS
 632 CFLAGS_CCACHE
 633 CCACHE
 634 USE_PRECOMPILED_HEADER
 635 BUILD_ICECC
 636 ICECC
 637 ICECC_WRAPPER
 638 ICECC_CREATE_ENV
 639 ICECC_CMD
 640 ENABLE_JAVAC_SERVER
 641 ENABLE_SJAVAC
 642 SJAVAC_SERVER_JAVA_FLAGS
 643 SJAVAC_SERVER_JAVA
 644 JAVA_TOOL_FLAGS_SMALL
 645 JAVA_FLAGS_SMALL
 646 JAVA_FLAGS_JAVAC
 647 BOOTCYCLE_JVM_ARGS_BIG
 648 JAVA_FLAGS_BIG
 649 JAVA_FLAGS
 650 TEST_JOBS
 651 JOBS
 652 MEMORY_SIZE
 653 NUM_CORES
 654 ENABLE_GENERATE_CLASSLIST
 655 BUILD_FAILURE_HANDLER
 656 ENABLE_INTREE_EC
 657 STLPORT_LIB
 658 LIBZIP_CAN_USE_MMAP
 659 LIBDL
 660 LIBM
 661 USE_EXTERNAL_LCMS
 662 LCMS_LIBS
 663 LCMS_CFLAGS
 664 USE_EXTERNAL_LIBZ
 665 USE_EXTERNAL_LIBPNG
 666 PNG_LIBS
 667 PNG_CFLAGS
 668 USE_EXTERNAL_LIBGIF
 669 USE_EXTERNAL_LIBJPEG
 670 LLVM_LIBS
 671 LLVM_LDFLAGS
 672 LLVM_CFLAGS
 673 LLVM_CONFIG
 674 LIBFFI_LIBS
 675 LIBFFI_CFLAGS
 676 ALSA_LIBS
 677 ALSA_CFLAGS
 678 FREETYPE_BUNDLE_LIB_PATH
 679 FREETYPE_LIBS
 680 FREETYPE_CFLAGS
 681 CUPS_CFLAGS
 682 X_EXTRA_LIBS
 683 X_LIBS
 684 X_PRE_LIBS
 685 X_CFLAGS
 686 XMKMF
 687 MSVCP_DLL
 688 MSVCR_DLL
 689 LIBCXX
 690 FIXPATH_DETACH_FLAG
 691 FIXPATH
 692 BUILD_GTEST
 693 VALID_JVM_FEATURES
 694 JVM_FEATURES_custom
 695 JVM_FEATURES_zeroshark
 696 JVM_FEATURES_zero
 697 JVM_FEATURES_minimal
 698 JVM_FEATURES_core
 699 JVM_FEATURES_client
 700 JVM_FEATURES_server
 701 INCLUDE_DTRACE
 702 GCOV_ENABLED
 703 STRIP_POLICY
 704 DEBUG_BINARIES
 705 ZIP_EXTERNAL_DEBUG_SYMBOLS
 706 COPY_DEBUG_SYMBOLS
 707 COMPILE_WITH_DEBUG_SYMBOLS
 708 CFLAGS_WARNINGS_ARE_ERRORS
 709 BUILD_CC_DISABLE_WARNING_PREFIX
 710 DISABLE_WARNING_PREFIX
 711 HOTSPOT_SET_WARNINGS_AS_ERRORS
 712 WARNINGS_AS_ERRORS
 713 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 714 ZERO_ARCHFLAG
 715 LDFLAGS_TESTEXE
 716 LDFLAGS_TESTLIB
 717 CXXFLAGS_TESTEXE
 718 CXXFLAGS_TESTLIB
 719 CFLAGS_TESTEXE
 720 CFLAGS_TESTLIB
 721 OPENJDK_BUILD_JVM_LIBS
 722 OPENJDK_BUILD_JVM_ASFLAGS
 723 OPENJDK_BUILD_JVM_LDFLAGS
 724 OPENJDK_BUILD_JVM_CFLAGS
 725 OPENJDK_BUILD_LDFLAGS_HASH_STYLE
 726 OPENJDK_BUILD_LDFLAGS_CXX_JDK
 727 OPENJDK_BUILD_JDKEXE_LIBS
 728 OPENJDK_BUILD_JDKLIB_LIBS
 729 OPENJDK_BUILD_LDFLAGS_JDKEXE
 730 OPENJDK_BUILD_LDFLAGS_JDKLIB
 731 OPENJDK_BUILD_CXXFLAGS_JDKEXE
 732 OPENJDK_BUILD_CXXFLAGS_JDKLIB
 733 OPENJDK_BUILD_CFLAGS_JDKEXE
 734 OPENJDK_BUILD_CFLAGS_JDKLIB
 735 OPENJDK_BUILD_CXXSTD_CXXFLAG
 736 JVM_LIBS
 737 JVM_ASFLAGS
 738 JVM_LDFLAGS
 739 JVM_CFLAGS
 740 LDFLAGS_HASH_STYLE
 741 LDFLAGS_CXX_JDK
 742 JDKEXE_LIBS
 743 JDKLIB_LIBS
 744 LDFLAGS_JDKEXE
 745 LDFLAGS_JDKLIB
 746 CXXFLAGS_JDKEXE
 747 CXXFLAGS_JDKLIB
 748 CFLAGS_JDKEXE
 749 CFLAGS_JDKLIB
 750 MACOSX_VERSION_MIN
 751 CXXSTD_CXXFLAG
 752 CXX_O_FLAG_SIZE
 753 CXX_O_FLAG_NONE
 754 CXX_O_FLAG_DEBUG
 755 CXX_O_FLAG_NORM
 756 CXX_O_FLAG_HI
 757 CXX_O_FLAG_HIGHEST
 758 CXX_O_FLAG_HIGHEST_JVM
 759 C_O_FLAG_SIZE
 760 C_O_FLAG_NONE
 761 C_O_FLAG_DEBUG
 762 C_O_FLAG_NORM
 763 C_O_FLAG_HI
 764 C_O_FLAG_HIGHEST
 765 C_O_FLAG_HIGHEST_JVM
 766 JVM_CFLAGS_SYMBOLS
 767 CXXFLAGS_DEBUG_SYMBOLS
 768 CFLAGS_DEBUG_SYMBOLS
 769 CXX_FLAG_DEPS
 770 C_FLAG_DEPS
 771 SHARED_LIBRARY_FLAGS
 772 SET_SHARED_LIBRARY_MAPFILE
 773 SET_SHARED_LIBRARY_NAME
 774 SET_SHARED_LIBRARY_ORIGIN
 775 SET_EXECUTABLE_ORIGIN
 776 CXX_FLAG_REORDER
 777 C_FLAG_REORDER
 778 JVM_RCFLAGS
 779 RC_FLAGS
 780 AR_OUT_OPTION
 781 LD_OUT_OPTION
 782 EXE_OUT_OPTION
 783 CC_OUT_OPTION
 784 STRIPFLAGS
 785 ARFLAGS
 786 COMPILER_BINDCMD_FILE_FLAG
 787 COMPILER_COMMAND_FILE_FLAG
 788 COMPILER_TARGET_BITS_FLAG
 789 JT_HOME
 790 JTREGEXE
 791 HOTSPOT_TOOLCHAIN_TYPE
 792 USING_BROKEN_SUSE_LD
 793 PACKAGE_PATH
 794 USE_CLANG
 795 HOTSPOT_LD
 796 HOTSPOT_CXX
 797 HOTSPOT_RC
 798 HOTSPOT_MT
 799 BUILD_AS
 800 BUILD_LDCXX
 801 BUILD_LD
 802 BUILD_STRIP
 803 BUILD_OBJCOPY
 804 BUILD_AR
 805 BUILD_NM
 806 BUILD_CXX
 807 BUILD_CC
 808 BUILD_SYSROOT_LDFLAGS
 809 BUILD_SYSROOT_CFLAGS
 810 ac_ct_OBJDUMP
 811 OBJDUMP
 812 ac_ct_OBJCOPY
 813 OBJCOPY
 814 ac_ct_NM
 815 ac_ct_STRIP
 816 GNM
 817 NM
 818 STRIP
 819 MSBUILD
 820 DUMPBIN
 821 RC
 822 MT
 823 LIPO
 824 ac_ct_AR
 825 AR
 826 AS
 827 LDCXX
 828 LD
 829 CXXCPP
 830 CPP
 831 CXX_VERSION_NUMBER
 832 CC_VERSION_NUMBER
 833 ac_ct_CXX
 834 CXXFLAGS
 835 CXX
 836 TOOLCHAIN_PATH_CXX
 837 POTENTIAL_CXX
 838 OBJEXT
 839 EXEEXT
 840 ac_ct_CC
 841 CPPFLAGS
 842 LDFLAGS
 843 CFLAGS
 844 CC
 845 TOOLCHAIN_PATH_CC
 846 POTENTIAL_CC
 847 TOOLCHAIN_VERSION
 848 VS_LIB
 849 VS_INCLUDE
 850 VS_PATH
 851 CYGWIN_LINK
 852 SYSROOT_LDFLAGS
 853 SYSROOT_CFLAGS
 854 EXTRA_LDFLAGS
 855 EXTRA_CXXFLAGS
 856 EXTRA_CFLAGS
 857 LEGACY_EXTRA_LDFLAGS
 858 LEGACY_EXTRA_CXXFLAGS
 859 LEGACY_EXTRA_CFLAGS
 860 EXE_SUFFIX
 861 OBJ_SUFFIX
 862 STATIC_LIBRARY
 863 SHARED_LIBRARY
 864 STATIC_LIBRARY_SUFFIX
 865 SHARED_LIBRARY_SUFFIX
 866 LIBRARY_PREFIX
 867 TOOLCHAIN_TYPE
 868 STATIC_BUILD
 869 IMPORT_MODULES_MAKE
 870 IMPORT_MODULES_SRC
 871 IMPORT_MODULES_CONF
 872 IMPORT_MODULES_LIBS
 873 IMPORT_MODULES_CMDS
 874 IMPORT_MODULES_CLASSES
 875 BUILD_HOTSPOT
 876 HOTSPOT_DIST
 877 BUILD_OUTPUT
 878 JDK_TOPDIR
 879 NASHORN_TOPDIR
 880 HOTSPOT_TOPDIR
 881 JAXWS_TOPDIR
 882 JAXP_TOPDIR
 883 CORBA_TOPDIR
 884 LANGTOOLS_TOPDIR
 885 EXTERNAL_BUILDJDK
 886 BUILD_JDK
 887 CREATE_BUILDJDK
 888 JLINK
 889 JMOD
 890 BOOT_JDK_BITS
 891 JAVAC_FLAGS
 892 BOOT_JDK_MODULAR
 893 BOOT_JDK_SOURCETARGET
 894 JARSIGNER
 895 JAR
 896 JAVAH
 897 JAVAC
 898 JAVA
 899 BOOT_JDK
 900 JAVA_CHECK
 901 JAVAC_CHECK
 902 VERSION_IS_GA
 903 VERSION_SHORT
 904 VERSION_STRING
 905 VERSION_NUMBER_FOUR_POSITIONS
 906 VERSION_NUMBER
 907 VERSION_OPT
 908 VERSION_BUILD
 909 VERSION_PRE
 910 VERSION_PATCH
 911 VERSION_SECURITY
 912 VERSION_MINOR
 913 VERSION_MAJOR
 914 MACOSX_BUNDLE_ID_BASE
 915 MACOSX_BUNDLE_NAME_BASE
 916 HOTSPOT_VM_DISTRO
 917 COMPANY_NAME
 918 JDK_RC_PLATFORM_NAME
 919 PRODUCT_SUFFIX
 920 PRODUCT_NAME
 921 LAUNCHER_NAME
 922 JLINK_KEEP_PACKAGED_MODULES
 923 COPYRIGHT_YEAR
 924 COMPRESS_JARS
 925 INCLUDE_SA
 926 UNLIMITED_CRYPTO
 927 CACERTS_FILE
 928 ENABLE_HEADLESS_ONLY
 929 DEFAULT_MAKE_TARGET
 930 OS_VERSION_MICRO
 931 OS_VERSION_MINOR
 932 OS_VERSION_MAJOR
 933 PKG_CONFIG
 934 BASH_ARGS
 935 SETFILE
 936 CODESIGN
 937 XATTR
 938 DSYMUTIL
 939 IS_GNU_TIME
 940 PATCH
 941 DTRACE
 942 TIME
 943 STAT
 944 HG
 945 READELF
 946 OTOOL
 947 LDD
 948 ZIP
 949 UNZIP
 950 TAR_SUPPORTS_TRANSFORM
 951 TAR_INCLUDE_PARAM
 952 TAR_CREATE_EXTRA_PARAM
 953 TAR_TYPE
 954 FIND_DELETE
 955 OUTPUT_SYNC
 956 OUTPUT_SYNC_SUPPORTED
 957 CHECK_TOOLSDIR_MAKE
 958 CHECK_TOOLSDIR_GMAKE
 959 CHECK_MAKE
 960 CHECK_GMAKE
 961 MAKE
 962 PKGHANDLER
 963 CONFIGURESUPPORT_OUTPUTDIR
 964 OUTPUT_ROOT
 965 CONF_NAME
 966 SPEC
 967 SDKROOT
 968 XCODEBUILD
 969 VALID_JVM_VARIANTS
 970 JVM_VARIANTS
 971 DEBUG_LEVEL
 972 HOTSPOT_DEBUG_LEVEL
 973 JDK_VARIANT
 974 USERNAME
 975 CANONICAL_TOPDIR
 976 ORIGINAL_TOPDIR
 977 TOPDIR
 978 PATH_SEP
 979 ZERO_ARCHDEF
 980 HOTSPOT_BUILD_CPU_DEFINE
 981 HOTSPOT_BUILD_CPU_ARCH
 982 HOTSPOT_BUILD_CPU
 983 HOTSPOT_BUILD_OS_TYPE
 984 HOTSPOT_BUILD_OS
 985 OPENJDK_BUILD_BUNDLE_PLATFORM
 986 OPENJDK_BUILD_CPU_BUNDLE
 987 OPENJDK_BUILD_OS_BUNDLE
 988 OPENJDK_BUILD_OS_EXPORT_DIR
 989 OPENJDK_BUILD_CPU_JLI_CFLAGS
 990 OPENJDK_BUILD_CPU_OSARCH
 991 OPENJDK_BUILD_CPU_ISADIR
 992 OPENJDK_BUILD_CPU_LIBDIR
 993 OPENJDK_BUILD_CPU_LEGACY_LIB
 994 OPENJDK_BUILD_CPU_LEGACY
 995 HOTSPOT_TARGET_CPU_DEFINE
 996 HOTSPOT_TARGET_CPU_ARCH
 997 HOTSPOT_TARGET_CPU
 998 HOTSPOT_TARGET_OS_TYPE
 999 HOTSPOT_TARGET_OS
1000 DEFINE_CROSS_COMPILE_ARCH
1001 LP64
1002 OPENJDK_TARGET_BUNDLE_PLATFORM
1003 OPENJDK_TARGET_CPU_BUNDLE
1004 OPENJDK_TARGET_OS_BUNDLE
1005 OPENJDK_TARGET_OS_EXPORT_DIR
1006 OPENJDK_TARGET_CPU_JLI_CFLAGS
1007 OPENJDK_TARGET_CPU_OSARCH
1008 OPENJDK_TARGET_CPU_ISADIR
1009 OPENJDK_TARGET_CPU_LIBDIR
1010 OPENJDK_TARGET_CPU_LEGACY_LIB
1011 OPENJDK_TARGET_CPU_LEGACY
1012 REQUIRED_OS_VERSION
1013 REQUIRED_OS_NAME
1014 COMPILE_TYPE
1015 OPENJDK_TARGET_CPU_ENDIAN
1016 OPENJDK_TARGET_CPU_BITS
1017 OPENJDK_TARGET_CPU_ARCH
1018 OPENJDK_TARGET_CPU
1019 OPENJDK_TARGET_OS_ENV
1020 OPENJDK_TARGET_OS_TYPE
1021 OPENJDK_TARGET_OS
1022 OPENJDK_BUILD_CPU_ENDIAN
1023 OPENJDK_BUILD_CPU_BITS
1024 OPENJDK_BUILD_CPU_ARCH
1025 OPENJDK_BUILD_CPU
1026 OPENJDK_BUILD_OS_ENV
1027 OPENJDK_BUILD_OS_TYPE
1028 OPENJDK_BUILD_OS
1029 OPENJDK_BUILD_AUTOCONF_NAME
1030 OPENJDK_TARGET_AUTOCONF_NAME
1031 target_os
1032 target_vendor
1033 target_cpu
1034 target
1035 host_os
1036 host_vendor
1037 host_cpu
1038 host
1039 build_os
1040 build_vendor
1041 build_cpu
1042 build
1043 NICE
1044 CPIO
1045 DF
1046 READLINK
1047 CYGPATH
1048 SED
1049 FGREP
1050 EGREP
1051 GREP
1052 AWK
1053 XARGS
1054 WHICH
1055 WC
1056 UNIQ
1057 UNAME
1058 TR
1059 TOUCH
1060 TEE
1061 TAR
1062 TAIL
1063 SORT
1064 SH
1065 RMDIR
1066 RM
1067 PRINTF
1068 NAWK
1069 MV
1070 MKTEMP
1071 MKDIR
1072 LS
1073 LN
1074 GZIP
1075 GUNZIP
1076 HEAD
1077 FIND
1078 FILE
1079 EXPR
1080 ECHO
1081 DIRNAME
1082 DIFF
1083 DATE
1084 CUT
1085 CP
1086 COMM
1087 CMP
1088 CHMOD
1089 CAT
1090 BASH
1091 BASENAME
1092 DATE_WHEN_CONFIGURED
1093 ORIGINAL_PATH
1094 CONFIGURE_COMMAND_LINE
1095 target_alias
1096 host_alias
1097 build_alias
1098 LIBS
1099 ECHO_T
1100 ECHO_N
1101 ECHO_C
1102 DEFS
1103 mandir
1104 localedir
1105 libdir
1106 psdir
1107 pdfdir
1108 dvidir
1109 htmldir
1110 infodir
1111 docdir
1112 oldincludedir
1113 includedir
1114 localstatedir
1115 sharedstatedir
1116 sysconfdir
1117 datadir
1118 datarootdir
1119 libexecdir
1120 sbindir
1121 bindir
1122 program_transform_name
1123 prefix
1124 exec_prefix
1125 PACKAGE_URL
1126 PACKAGE_BUGREPORT
1127 PACKAGE_STRING
1128 PACKAGE_VERSION
1129 PACKAGE_TARNAME
1130 PACKAGE_NAME
1131 PATH_SEPARATOR
1132 SHELL'
1133 ac_subst_files=''
1134 ac_user_opts='
1135 enable_option_checking
1136 with_target_bits
1137 enable_openjdk_only
1138 with_custom_make_dir
1139 with_jdk_variant
1140 enable_debug
1141 with_debug_level
1142 with_jvm_variants
1143 with_devkit
1144 with_sys_root
1145 with_sysroot
1146 with_tools_dir
1147 with_toolchain_path
1148 with_extra_path
1149 with_sdk_name
1150 with_conf_name
1151 with_output_sync
1152 with_default_make_target
1153 enable_headless_only
1154 with_cacerts_file
1155 enable_unlimited_crypto
1156 with_copyright_year
1157 enable_keep_packaged_modules
1158 with_milestone
1159 with_update_version
1160 with_user_release_suffix
1161 with_build_number
1162 with_version_string
1163 with_version_pre
1164 with_version_opt
1165 with_version_build
1166 with_version_major
1167 with_version_minor
1168 with_version_security
1169 with_version_patch
1170 with_boot_jdk
1171 with_build_jdk
1172 with_add_source_root
1173 with_override_source_root
1174 with_adds_and_overrides
1175 with_override_langtools
1176 with_override_corba
1177 with_override_jaxp
1178 with_override_jaxws
1179 with_override_hotspot
1180 with_override_nashorn
1181 with_override_jdk
1182 with_import_hotspot
1183 with_import_modules
1184 enable_static_build
1185 with_toolchain_type
1186 with_extra_cflags
1187 with_extra_cxxflags
1188 with_extra_ldflags
1189 with_toolchain_version
1190 with_build_devkit
1191 with_jtreg
1192 enable_warnings_as_errors
1193 with_native_debug_symbols
1194 enable_debug_symbols
1195 enable_zip_debug_info
1196 enable_native_coverage
1197 enable_dtrace
1198 with_jvm_features
1199 with_jvm_interpreter
1200 enable_hotspot_gtest
1201 with_stdc__lib
1202 with_msvcr_dll
1203 with_msvcp_dll
1204 with_x
1205 with_cups
1206 with_cups_include
1207 with_freetype
1208 with_freetype_include
1209 with_freetype_lib
1210 with_freetype_src
1211 enable_freetype_bundling
1212 with_alsa
1213 with_alsa_include
1214 with_alsa_lib
1215 with_libffi
1216 with_libffi_include
1217 with_libffi_lib
1218 with_libjpeg
1219 with_giflib
1220 with_libpng
1221 with_zlib
1222 with_lcms
1223 with_dxsdk
1224 with_dxsdk_lib
1225 with_dxsdk_include
1226 enable_jtreg_failure_handler
1227 enable_generate_classlist
1228 with_num_cores
1229 with_memory_size
1230 with_jobs
1231 with_test_jobs
1232 with_boot_jdk_jvmargs
1233 with_sjavac_server_java
1234 enable_sjavac
1235 enable_javac_server
1236 enable_icecc
1237 enable_precompiled_headers
1238 enable_ccache
1239 with_ccache_dir
1240 '
1241       ac_precious_vars='build_alias
1242 host_alias
1243 target_alias
1244 BASENAME
1245 BASH
1246 CAT
1247 CHMOD
1248 CMP
1249 COMM
1250 CP
1251 CUT
1252 DATE
1253 DIFF
1254 DIRNAME
1255 ECHO
1256 EXPR
1257 FILE
1258 FIND
1259 HEAD
1260 GUNZIP
1261 GZIP
1262 LN
1263 LS
1264 MKDIR
1265 MKTEMP
1266 MV
1267 NAWK
1268 PRINTF
1269 RM
1270 RMDIR
1271 SH
1272 SORT
1273 TAIL
1274 TAR
1275 TEE
1276 TOUCH
1277 TR
1278 UNAME
1279 UNIQ
1280 WC
1281 WHICH
1282 XARGS
1283 AWK
1284 GREP
1285 EGREP
1286 FGREP
1287 SED
1288 CYGPATH
1289 READLINK
1290 DF
1291 CPIO
1292 NICE
1293 MAKE
1294 UNZIP
1295 ZIP
1296 LDD
1297 OTOOL
1298 READELF
1299 HG
1300 STAT
1301 TIME
1302 DTRACE
1303 PATCH
1304 DSYMUTIL
1305 XATTR
1306 CODESIGN
1307 SETFILE
1308 PKG_CONFIG
1309 JAVA
1310 JAVAC
1311 JAVAH
1312 JAR
1313 JARSIGNER
1314 CC
1315 CFLAGS
1316 LDFLAGS
1317 LIBS
1318 CPPFLAGS
1319 CXX
1320 CXXFLAGS
1321 CCC
1322 CPP
1323 CXXCPP
1324 AS
1325 AR
1326 LIPO
1327 STRIP
1328 NM
1329 GNM
1330 OBJCOPY
1331 OBJDUMP
1332 BUILD_CC
1333 BUILD_CXX
1334 BUILD_NM
1335 BUILD_AR
1336 BUILD_OBJCOPY
1337 BUILD_STRIP
1338 JTREGEXE
1339 XMKMF
1340 FREETYPE_CFLAGS
1341 FREETYPE_LIBS
1342 ALSA_CFLAGS
1343 ALSA_LIBS
1344 LIBFFI_CFLAGS
1345 LIBFFI_LIBS
1346 PNG_CFLAGS
1347 PNG_LIBS
1348 LCMS_CFLAGS
1349 LCMS_LIBS
1350 ICECC_CMD
1351 ICECC_CREATE_ENV
1352 ICECC_WRAPPER
1353 CCACHE'
1354 
1355 
1356 # Initialize some variables set by options.
1357 ac_init_help=
1358 ac_init_version=false
1359 ac_unrecognized_opts=
1360 ac_unrecognized_sep=
1361 # The variables have the same names as the options, with
1362 # dashes changed to underlines.
1363 cache_file=/dev/null
1364 exec_prefix=NONE
1365 no_create=
1366 no_recursion=
1367 prefix=NONE
1368 program_prefix=NONE
1369 program_suffix=NONE
1370 program_transform_name=s,x,x,
1371 silent=
1372 site=
1373 srcdir=
1374 verbose=
1375 x_includes=NONE
1376 x_libraries=NONE
1377 
1378 # Installation directory options.
1379 # These are left unexpanded so users can "make install exec_prefix=/foo"
1380 # and all the variables that are supposed to be based on exec_prefix
1381 # by default will actually change.
1382 # Use braces instead of parens because sh, perl, etc. also accept them.
1383 # (The list follows the same order as the GNU Coding Standards.)
1384 bindir='${exec_prefix}/bin'
1385 sbindir='${exec_prefix}/sbin'
1386 libexecdir='${exec_prefix}/libexec'
1387 datarootdir='${prefix}/share'
1388 datadir='${datarootdir}'
1389 sysconfdir='${prefix}/etc'
1390 sharedstatedir='${prefix}/com'
1391 localstatedir='${prefix}/var'
1392 includedir='${prefix}/include'
1393 oldincludedir='/usr/include'
1394 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1395 infodir='${datarootdir}/info'
1396 htmldir='${docdir}'
1397 dvidir='${docdir}'
1398 pdfdir='${docdir}'
1399 psdir='${docdir}'
1400 libdir='${exec_prefix}/lib'
1401 localedir='${datarootdir}/locale'
1402 mandir='${datarootdir}/man'
1403 
1404 ac_prev=
1405 ac_dashdash=
1406 for ac_option
1407 do
1408   # If the previous option needs an argument, assign it.
1409   if test -n "$ac_prev"; then
1410     eval $ac_prev=\$ac_option
1411     ac_prev=
1412     continue
1413   fi
1414 
1415   case $ac_option in
1416   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1417   *=)   ac_optarg= ;;
1418   *)    ac_optarg=yes ;;
1419   esac
1420 
1421   # Accept the important Cygnus configure options, so we can diagnose typos.
1422 
1423   case $ac_dashdash$ac_option in
1424   --)
1425     ac_dashdash=yes ;;
1426 
1427   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1428     ac_prev=bindir ;;
1429   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1430     bindir=$ac_optarg ;;
1431 
1432   -build | --build | --buil | --bui | --bu)
1433     ac_prev=build_alias ;;
1434   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1435     build_alias=$ac_optarg ;;
1436 
1437   -cache-file | --cache-file | --cache-fil | --cache-fi \
1438   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1439     ac_prev=cache_file ;;
1440   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1441   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1442     cache_file=$ac_optarg ;;
1443 
1444   --config-cache | -C)
1445     cache_file=config.cache ;;
1446 
1447   -datadir | --datadir | --datadi | --datad)
1448     ac_prev=datadir ;;
1449   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1450     datadir=$ac_optarg ;;
1451 
1452   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1453   | --dataroo | --dataro | --datar)
1454     ac_prev=datarootdir ;;
1455   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1456   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1457     datarootdir=$ac_optarg ;;
1458 
1459   -disable-* | --disable-*)
1460     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1461     # Reject names that are not valid shell variable names.
1462     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1463       as_fn_error $? "invalid feature name: $ac_useropt"
1464     ac_useropt_orig=$ac_useropt
1465     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1466     case $ac_user_opts in
1467       *"
1468 "enable_$ac_useropt"
1469 "*) ;;
1470       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1471          ac_unrecognized_sep=', ';;
1472     esac
1473     eval enable_$ac_useropt=no ;;
1474 
1475   -docdir | --docdir | --docdi | --doc | --do)
1476     ac_prev=docdir ;;
1477   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1478     docdir=$ac_optarg ;;
1479 
1480   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1481     ac_prev=dvidir ;;
1482   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1483     dvidir=$ac_optarg ;;
1484 
1485   -enable-* | --enable-*)
1486     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1487     # Reject names that are not valid shell variable names.
1488     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1489       as_fn_error $? "invalid feature name: $ac_useropt"
1490     ac_useropt_orig=$ac_useropt
1491     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1492     case $ac_user_opts in
1493       *"
1494 "enable_$ac_useropt"
1495 "*) ;;
1496       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1497          ac_unrecognized_sep=', ';;
1498     esac
1499     eval enable_$ac_useropt=\$ac_optarg ;;
1500 
1501   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1502   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1503   | --exec | --exe | --ex)
1504     ac_prev=exec_prefix ;;
1505   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1506   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1507   | --exec=* | --exe=* | --ex=*)
1508     exec_prefix=$ac_optarg ;;
1509 
1510   -gas | --gas | --ga | --g)
1511     # Obsolete; use --with-gas.
1512     with_gas=yes ;;
1513 
1514   -help | --help | --hel | --he | -h)
1515     ac_init_help=long ;;
1516   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1517     ac_init_help=recursive ;;
1518   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1519     ac_init_help=short ;;
1520 
1521   -host | --host | --hos | --ho)
1522     ac_prev=host_alias ;;
1523   -host=* | --host=* | --hos=* | --ho=*)
1524     host_alias=$ac_optarg ;;
1525 
1526   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1527     ac_prev=htmldir ;;
1528   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1529   | --ht=*)
1530     htmldir=$ac_optarg ;;
1531 
1532   -includedir | --includedir | --includedi | --included | --include \
1533   | --includ | --inclu | --incl | --inc)
1534     ac_prev=includedir ;;
1535   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1536   | --includ=* | --inclu=* | --incl=* | --inc=*)
1537     includedir=$ac_optarg ;;
1538 
1539   -infodir | --infodir | --infodi | --infod | --info | --inf)
1540     ac_prev=infodir ;;
1541   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1542     infodir=$ac_optarg ;;
1543 
1544   -libdir | --libdir | --libdi | --libd)
1545     ac_prev=libdir ;;
1546   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1547     libdir=$ac_optarg ;;
1548 
1549   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1550   | --libexe | --libex | --libe)
1551     ac_prev=libexecdir ;;
1552   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1553   | --libexe=* | --libex=* | --libe=*)
1554     libexecdir=$ac_optarg ;;
1555 
1556   -localedir | --localedir | --localedi | --localed | --locale)
1557     ac_prev=localedir ;;
1558   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1559     localedir=$ac_optarg ;;
1560 
1561   -localstatedir | --localstatedir | --localstatedi | --localstated \
1562   | --localstate | --localstat | --localsta | --localst | --locals)
1563     ac_prev=localstatedir ;;
1564   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1565   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1566     localstatedir=$ac_optarg ;;
1567 
1568   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1569     ac_prev=mandir ;;
1570   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1571     mandir=$ac_optarg ;;
1572 
1573   -nfp | --nfp | --nf)
1574     # Obsolete; use --without-fp.
1575     with_fp=no ;;
1576 
1577   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1578   | --no-cr | --no-c | -n)
1579     no_create=yes ;;
1580 
1581   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1582   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1583     no_recursion=yes ;;
1584 
1585   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1586   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1587   | --oldin | --oldi | --old | --ol | --o)
1588     ac_prev=oldincludedir ;;
1589   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1590   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1591   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1592     oldincludedir=$ac_optarg ;;
1593 
1594   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1595     ac_prev=prefix ;;
1596   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1597     prefix=$ac_optarg ;;
1598 
1599   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1600   | --program-pre | --program-pr | --program-p)
1601     ac_prev=program_prefix ;;
1602   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1603   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1604     program_prefix=$ac_optarg ;;
1605 
1606   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1607   | --program-suf | --program-su | --program-s)
1608     ac_prev=program_suffix ;;
1609   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1610   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1611     program_suffix=$ac_optarg ;;
1612 
1613   -program-transform-name | --program-transform-name \
1614   | --program-transform-nam | --program-transform-na \
1615   | --program-transform-n | --program-transform- \
1616   | --program-transform | --program-transfor \
1617   | --program-transfo | --program-transf \
1618   | --program-trans | --program-tran \
1619   | --progr-tra | --program-tr | --program-t)
1620     ac_prev=program_transform_name ;;
1621   -program-transform-name=* | --program-transform-name=* \
1622   | --program-transform-nam=* | --program-transform-na=* \
1623   | --program-transform-n=* | --program-transform-=* \
1624   | --program-transform=* | --program-transfor=* \
1625   | --program-transfo=* | --program-transf=* \
1626   | --program-trans=* | --program-tran=* \
1627   | --progr-tra=* | --program-tr=* | --program-t=*)
1628     program_transform_name=$ac_optarg ;;
1629 
1630   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1631     ac_prev=pdfdir ;;
1632   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1633     pdfdir=$ac_optarg ;;
1634 
1635   -psdir | --psdir | --psdi | --psd | --ps)
1636     ac_prev=psdir ;;
1637   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1638     psdir=$ac_optarg ;;
1639 
1640   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1641   | -silent | --silent | --silen | --sile | --sil)
1642     silent=yes ;;
1643 
1644   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1645     ac_prev=sbindir ;;
1646   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1647   | --sbi=* | --sb=*)
1648     sbindir=$ac_optarg ;;
1649 
1650   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1651   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1652   | --sharedst | --shareds | --shared | --share | --shar \
1653   | --sha | --sh)
1654     ac_prev=sharedstatedir ;;
1655   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1656   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1657   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1658   | --sha=* | --sh=*)
1659     sharedstatedir=$ac_optarg ;;
1660 
1661   -site | --site | --sit)
1662     ac_prev=site ;;
1663   -site=* | --site=* | --sit=*)
1664     site=$ac_optarg ;;
1665 
1666   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1667     ac_prev=srcdir ;;
1668   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1669     srcdir=$ac_optarg ;;
1670 
1671   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1672   | --syscon | --sysco | --sysc | --sys | --sy)
1673     ac_prev=sysconfdir ;;
1674   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1675   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1676     sysconfdir=$ac_optarg ;;
1677 
1678   -target | --target | --targe | --targ | --tar | --ta | --t)
1679     ac_prev=target_alias ;;
1680   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1681     target_alias=$ac_optarg ;;
1682 
1683   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1684     verbose=yes ;;
1685 
1686   -version | --version | --versio | --versi | --vers | -V)
1687     ac_init_version=: ;;
1688 
1689   -with-* | --with-*)
1690     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1691     # Reject names that are not valid shell variable names.
1692     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1693       as_fn_error $? "invalid package name: $ac_useropt"
1694     ac_useropt_orig=$ac_useropt
1695     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1696     case $ac_user_opts in
1697       *"
1698 "with_$ac_useropt"
1699 "*) ;;
1700       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1701          ac_unrecognized_sep=', ';;
1702     esac
1703     eval with_$ac_useropt=\$ac_optarg ;;
1704 
1705   -without-* | --without-*)
1706     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1707     # Reject names that are not valid shell variable names.
1708     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1709       as_fn_error $? "invalid package name: $ac_useropt"
1710     ac_useropt_orig=$ac_useropt
1711     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1712     case $ac_user_opts in
1713       *"
1714 "with_$ac_useropt"
1715 "*) ;;
1716       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1717          ac_unrecognized_sep=', ';;
1718     esac
1719     eval with_$ac_useropt=no ;;
1720 
1721   --x)
1722     # Obsolete; use --with-x.
1723     with_x=yes ;;
1724 
1725   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1726   | --x-incl | --x-inc | --x-in | --x-i)
1727     ac_prev=x_includes ;;
1728   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1729   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1730     x_includes=$ac_optarg ;;
1731 
1732   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1733   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1734     ac_prev=x_libraries ;;
1735   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1736   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1737     x_libraries=$ac_optarg ;;
1738 
1739   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1740 Try \`$0 --help' for more information"
1741     ;;
1742 
1743   *=*)
1744     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1745     # Reject names that are not valid shell variable names.
1746     case $ac_envvar in #(
1747       '' | [0-9]* | *[!_$as_cr_alnum]* )
1748       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1749     esac
1750     eval $ac_envvar=\$ac_optarg
1751     export $ac_envvar ;;
1752 
1753   *)
1754     # FIXME: should be removed in autoconf 3.0.
1755     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1756     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1757       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1758     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1759     ;;
1760 
1761   esac
1762 done
1763 
1764 if test -n "$ac_prev"; then
1765   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1766   as_fn_error $? "missing argument to $ac_option"
1767 fi
1768 
1769 if test -n "$ac_unrecognized_opts"; then
1770   case $enable_option_checking in
1771     no) ;;
1772     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1773     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1774   esac
1775 fi
1776 
1777 # Check all directory arguments for consistency.
1778 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1779                 datadir sysconfdir sharedstatedir localstatedir includedir \
1780                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1781                 libdir localedir mandir
1782 do
1783   eval ac_val=\$$ac_var
1784   # Remove trailing slashes.
1785   case $ac_val in
1786     */ )
1787       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1788       eval $ac_var=\$ac_val;;
1789   esac
1790   # Be sure to have absolute directory names.
1791   case $ac_val in
1792     [\\/$]* | ?:[\\/]* )  continue;;
1793     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1794   esac
1795   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1796 done
1797 
1798 # There might be people who depend on the old broken behavior: `$host'
1799 # used to hold the argument of --host etc.
1800 # FIXME: To remove some day.
1801 build=$build_alias
1802 host=$host_alias
1803 target=$target_alias
1804 
1805 # FIXME: To remove some day.
1806 if test "x$host_alias" != x; then
1807   if test "x$build_alias" = x; then
1808     cross_compiling=maybe
1809   elif test "x$build_alias" != "x$host_alias"; then
1810     cross_compiling=yes
1811   fi
1812 fi
1813 
1814 ac_tool_prefix=
1815 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1816 
1817 test "$silent" = yes && exec 6>/dev/null
1818 
1819 
1820 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1821 ac_ls_di=`ls -di .` &&
1822 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1823   as_fn_error $? "working directory cannot be determined"
1824 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1825   as_fn_error $? "pwd does not report name of working directory"
1826 
1827 
1828 # Find the source files, if location was not specified.
1829 if test -z "$srcdir"; then
1830   ac_srcdir_defaulted=yes
1831   # Try the directory containing this script, then the parent directory.
1832   ac_confdir=`$as_dirname -- "$as_myself" ||
1833 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1834          X"$as_myself" : 'X\(//\)[^/]' \| \
1835          X"$as_myself" : 'X\(//\)$' \| \
1836          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1837 $as_echo X"$as_myself" |
1838     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1839             s//\1/
1840             q
1841           }
1842           /^X\(\/\/\)[^/].*/{
1843             s//\1/
1844             q
1845           }
1846           /^X\(\/\/\)$/{
1847             s//\1/
1848             q
1849           }
1850           /^X\(\/\).*/{
1851             s//\1/
1852             q
1853           }
1854           s/.*/./; q'`
1855   srcdir=$ac_confdir
1856   if test ! -r "$srcdir/$ac_unique_file"; then
1857     srcdir=..
1858   fi
1859 else
1860   ac_srcdir_defaulted=no
1861 fi
1862 if test ! -r "$srcdir/$ac_unique_file"; then
1863   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1864   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1865 fi
1866 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1867 ac_abs_confdir=`(
1868         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1869         pwd)`
1870 # When building in place, set srcdir=.
1871 if test "$ac_abs_confdir" = "$ac_pwd"; then
1872   srcdir=.
1873 fi
1874 # Remove unnecessary trailing slashes from srcdir.
1875 # Double slashes in file names in object file debugging info
1876 # mess up M-x gdb in Emacs.
1877 case $srcdir in
1878 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1879 esac
1880 for ac_var in $ac_precious_vars; do
1881   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1882   eval ac_env_${ac_var}_value=\$${ac_var}
1883   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1884   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1885 done
1886 
1887 #
1888 # Report the --help message.
1889 #
1890 if test "$ac_init_help" = "long"; then
1891   # Omit some internal or obsolete options to make the list less imposing.
1892   # This message is too long to be a string in the A/UX 3.1 sh.
1893   cat <<_ACEOF
1894 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1895 
1896 Usage: $0 [OPTION]... [VAR=VALUE]...
1897 
1898 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1899 VAR=VALUE.  See below for descriptions of some of the useful variables.
1900 
1901 Defaults for the options are specified in brackets.
1902 
1903 Configuration:
1904   -h, --help              display this help and exit
1905       --help=short        display options specific to this package
1906       --help=recursive    display the short help of all the included packages
1907   -V, --version           display version information and exit
1908   -q, --quiet, --silent   do not print \`checking ...' messages
1909       --cache-file=FILE   cache test results in FILE [disabled]
1910   -C, --config-cache      alias for \`--cache-file=config.cache'
1911   -n, --no-create         do not create output files
1912       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1913 
1914 Installation directories:
1915   --prefix=PREFIX         install architecture-independent files in PREFIX
1916                           [$ac_default_prefix]
1917   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1918                           [PREFIX]
1919 
1920 By default, \`make install' will install all the files in
1921 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1922 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1923 for instance \`--prefix=\$HOME'.
1924 
1925 For better control, use the options below.
1926 
1927 Fine tuning of the installation directories:
1928   --bindir=DIR            user executables [EPREFIX/bin]
1929   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1930   --libexecdir=DIR        program executables [EPREFIX/libexec]
1931   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1932   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1933   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1934   --libdir=DIR            object code libraries [EPREFIX/lib]
1935   --includedir=DIR        C header files [PREFIX/include]
1936   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1937   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1938   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1939   --infodir=DIR           info documentation [DATAROOTDIR/info]
1940   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1941   --mandir=DIR            man documentation [DATAROOTDIR/man]
1942   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1943   --htmldir=DIR           html documentation [DOCDIR]
1944   --dvidir=DIR            dvi documentation [DOCDIR]
1945   --pdfdir=DIR            pdf documentation [DOCDIR]
1946   --psdir=DIR             ps documentation [DOCDIR]
1947 _ACEOF
1948 
1949   cat <<\_ACEOF
1950 
1951 X features:
1952   --x-includes=DIR    X include files are in DIR
1953   --x-libraries=DIR   X library files are in DIR
1954 
1955 System types:
1956   --build=BUILD     configure for building on BUILD [guessed]
1957   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1958   --target=TARGET   configure for building compilers for TARGET [HOST]
1959 _ACEOF
1960 fi
1961 
1962 if test -n "$ac_init_help"; then
1963   case $ac_init_help in
1964      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1965    esac
1966   cat <<\_ACEOF
1967 
1968 Optional Features:
1969   --disable-option-checking  ignore unrecognized --enable/--with options
1970   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1971   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1972   --enable-openjdk-only   suppress building custom source even if present
1973                           [disabled]
1974   --enable-debug          set the debug level to fastdebug (shorthand for
1975                           --with-debug-level=fastdebug) [disabled]
1976   --enable-headless-only  only build headless (no GUI) support [disabled]
1977   --enable-unlimited-crypto
1978                           Enable unlimited crypto policy [disabled]
1979   --disable-keep-packaged-modules
1980                           Do not keep packaged modules in jdk image [enable]
1981   --enable-static-build   enable static library build [disabled]
1982   --disable-warnings-as-errors
1983                           do not consider native warnings to be an error
1984                           [enabled]
1985   --enable-debug-symbols  Deprecated. Option is kept for backwards
1986                           compatibility and is ignored
1987   --enable-zip-debug-info Deprecated. Option is kept for backwards
1988                           compatibility and is ignored
1989   --enable-native-coverage
1990                           enable native compilation with code coverage
1991                           data[disabled]
1992   --enable-dtrace[=yes/no/auto]
1993                           enable dtrace. Default is auto, where dtrace is
1994                           enabled if all dependencies are present.
1995   --disable-hotspot-gtest Disables building of the Hotspot unit tests
1996   --disable-freetype-bundling
1997                           disable bundling of the freetype library with the
1998                           build result [enabled on Windows or when using
1999                           --with-freetype, disabled otherwise]
2000   --enable-jtreg-failure-handler
2001                           forces build of the jtreg failure handler to be
2002                           enabled, missing dependencies become fatal errors.
2003                           Default is auto, where the failure handler is built
2004                           if all dependencies are present and otherwise just
2005                           disabled.
2006   --disable-generate-classlist
2007                           forces enabling or disabling of the generation of a
2008                           CDS classlist at build time. Default is to generate
2009                           it when either the server or client JVMs are built.
2010   --enable-sjavac         use sjavac to do fast incremental compiles
2011                           [disabled]
2012   --disable-javac-server  disable javac server [enabled]
2013   --enable-icecc          enable distribted compilation of native code using
2014                           icecc/icecream [disabled]
2015   --disable-precompiled-headers
2016                           disable using precompiled headers when compiling C++
2017                           [enabled]
2018   --enable-ccache         enable using ccache to speed up recompilations
2019                           [disabled]
2020 
2021 Optional Packages:
2022   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2023   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2024   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2025                           support it), e.g. --with-target-bits=32 [guessed]
2026   --with-custom-make-dir  Deprecated. Option is kept for backwards
2027                           compatibility and is ignored
2028   --with-jdk-variant      JDK variant to build (normal) [normal]
2029   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2030                           optimized) [release]
2031   --with-jvm-variants     JVM variants (separated by commas) to build
2032                           (server,client,minimal,core,zero,zeroshark,custom)
2033                           [server]
2034   --with-devkit           use this devkit for compilers, tools and resources
2035   --with-sys-root         alias for --with-sysroot for backwards compatability
2036   --with-sysroot          use this directory as sysroot
2037   --with-tools-dir        alias for --with-toolchain-path for backwards
2038                           compatibility
2039   --with-toolchain-path   prepend these directories when searching for
2040                           toolchain binaries (compilers etc)
2041   --with-extra-path       prepend these directories to the default path
2042   --with-sdk-name         use the platform SDK of the given name. [macosx]
2043   --with-conf-name        use this as the name of the configuration [generated
2044                           from important configuration options]
2045   --with-output-sync      set make output sync type if supported by make.
2046                           [recurse]
2047   --with-default-make-target
2048                           set the default make target [exploded-image]
2049   --with-cacerts-file     specify alternative cacerts file
2050   --with-copyright-year   Set copyright year value for build [current year]
2051   --with-milestone        Deprecated. Option is kept for backwards
2052                           compatibility and is ignored
2053   --with-update-version   Deprecated. Option is kept for backwards
2054                           compatibility and is ignored
2055   --with-user-release-suffix
2056                           Deprecated. Option is kept for backwards
2057                           compatibility and is ignored
2058   --with-build-number     Deprecated. Option is kept for backwards
2059                           compatibility and is ignored
2060   --with-version-string   Set version string [calculated]
2061   --with-version-pre      Set the base part of the version 'PRE' field
2062                           (pre-release identifier) ['internal']
2063   --with-version-opt      Set version 'OPT' field (build metadata)
2064                           [<timestamp>.<user>.<dirname>]
2065   --with-version-build    Set version 'BUILD' field (build number) [not
2066                           specified]
2067   --with-version-major    Set version 'MAJOR' field (first number) [current
2068                           source value]
2069   --with-version-minor    Set version 'MINOR' field (second number) [current
2070                           source value]
2071   --with-version-security Set version 'SECURITY' field (third number) [current
2072                           source value]
2073   --with-version-patch    Set version 'PATCH' field (fourth number) [not
2074                           specified]
2075   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2076   --with-build-jdk        path to JDK of same version as is being built[the
2077                           newly built JDK]
2078   --with-add-source-root  Deprecated. Option is kept for backwards
2079                           compatibility and is ignored
2080   --with-override-source-root
2081                           Deprecated. Option is kept for backwards
2082                           compatibility and is ignored
2083   --with-adds-and-overrides
2084                           Deprecated. Option is kept for backwards
2085                           compatibility and is ignored
2086   --with-override-langtools
2087                           Deprecated. Option is kept for backwards
2088                           compatibility and is ignored
2089   --with-override-corba   Deprecated. Option is kept for backwards
2090                           compatibility and is ignored
2091   --with-override-jaxp    Deprecated. Option is kept for backwards
2092                           compatibility and is ignored
2093   --with-override-jaxws   Deprecated. Option is kept for backwards
2094                           compatibility and is ignored
2095   --with-override-hotspot Deprecated. Option is kept for backwards
2096                           compatibility and is ignored
2097   --with-override-nashorn Deprecated. Option is kept for backwards
2098                           compatibility and is ignored
2099   --with-override-jdk     Deprecated. Option is kept for backwards
2100                           compatibility and is ignored
2101   --with-import-hotspot   import hotspot binaries from this jdk image or
2102                           hotspot build dist dir instead of building from
2103                           source
2104   --with-import-modules   import a set of prebuilt modules either as a zip
2105                           file or an exploded directory
2106   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2107                           to show possible values [platform dependent]
2108   --with-extra-cflags     extra flags to be used when compiling jdk c-files
2109   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2110   --with-extra-ldflags    extra flags to be used when linking jdk
2111   --with-toolchain-version
2112                           the version of the toolchain to look for, use
2113                           '--help' to show possible values [platform
2114                           dependent]
2115   --with-build-devkit     Devkit to use for the build platform toolchain
2116   --with-jtreg            Regression Test Harness [probed]
2117   --with-native-debug-symbols
2118                           set the native debug symbol configuration (none,
2119                           internal, external, zipped) [varying]
2120   --with-jvm-features     additional JVM features to enable (separated by
2121                           comma), use '--help' to show possible values [none]
2122   --with-jvm-interpreter  Deprecated. Option is kept for backwards
2123                           compatibility and is ignored
2124   --with-stdc++lib=<static>,<dynamic>,<default>
2125                           force linking of the C++ runtime on Linux to either
2126                           static or dynamic, default is static with dynamic as
2127                           fallback
2128   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2129                           (Windows only) [probed]
2130   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2131                           (Windows only) [probed]
2132   --with-x                use the X Window System
2133   --with-cups             specify prefix directory for the cups package
2134                           (expecting the headers under PATH/include)
2135   --with-cups-include     specify directory for the cups include files
2136   --with-freetype         specify prefix directory for the freetype package
2137                           (expecting the libraries under PATH/lib and the
2138                           headers under PATH/include)
2139   --with-freetype-include specify directory for the freetype include files
2140   --with-freetype-lib     specify directory for the freetype library
2141   --with-freetype-src     specify directory with freetype sources to
2142                           automatically build the library (experimental,
2143                           Windows-only)
2144   --with-alsa             specify prefix directory for the alsa package
2145                           (expecting the libraries under PATH/lib and the
2146                           headers under PATH/include)
2147   --with-alsa-include     specify directory for the alsa include files
2148   --with-alsa-lib         specify directory for the alsa library
2149   --with-libffi           specify prefix directory for the libffi package
2150                           (expecting the libraries under PATH/lib and the
2151                           headers under PATH/include)
2152   --with-libffi-include   specify directory for the libffi include files
2153   --with-libffi-lib       specify directory for the libffi library
2154   --with-libjpeg          use libjpeg from build system or OpenJDK source
2155                           (system, bundled) [bundled]
2156   --with-giflib           use giflib from build system or OpenJDK source
2157                           (system, bundled) [bundled]
2158   --with-libpng           use libpng from build system or OpenJDK source
2159                           (system, bundled) [bundled]
2160   --with-zlib             use zlib from build system or OpenJDK source
2161                           (system, bundled) [bundled]
2162   --with-lcms             use lcms2 from build system or OpenJDK source
2163                           (system, bundled) [bundled]
2164   --with-dxsdk            Deprecated. Option is kept for backwards
2165                           compatibility and is ignored
2166   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2167                           compatibility and is ignored
2168   --with-dxsdk-include    Deprecated. Option is kept for backwards
2169                           compatibility and is ignored
2170   --with-num-cores        number of cores in the build system, e.g.
2171                           --with-num-cores=8 [probed]
2172   --with-memory-size      memory (in MB) available in the build system, e.g.
2173                           --with-memory-size=1024 [probed]
2174   --with-jobs             number of parallel jobs to let make run [calculated
2175                           based on cores and memory]
2176   --with-test-jobs        number of parallel tests jobs to run [based on build
2177                           jobs]
2178   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2179                           invocations of boot JDK, overriding the default
2180                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2181                           -enableassertions"
2182   --with-sjavac-server-java
2183                           use this java binary for running the sjavac
2184                           background server [Boot JDK java]
2185   --with-ccache-dir       where to store ccache files [~/.ccache]
2186 
2187 Some influential environment variables:
2188   BASENAME    Override default value for BASENAME
2189   BASH        Override default value for BASH
2190   CAT         Override default value for CAT
2191   CHMOD       Override default value for CHMOD
2192   CMP         Override default value for CMP
2193   COMM        Override default value for COMM
2194   CP          Override default value for CP
2195   CUT         Override default value for CUT
2196   DATE        Override default value for DATE
2197   DIFF        Override default value for DIFF
2198   DIRNAME     Override default value for DIRNAME
2199   ECHO        Override default value for ECHO
2200   EXPR        Override default value for EXPR
2201   FILE        Override default value for FILE
2202   FIND        Override default value for FIND
2203   HEAD        Override default value for HEAD
2204   GUNZIP      Override default value for GUNZIP
2205   GZIP        Override default value for GZIP
2206   LN          Override default value for LN
2207   LS          Override default value for LS
2208   MKDIR       Override default value for MKDIR
2209   MKTEMP      Override default value for MKTEMP
2210   MV          Override default value for MV
2211   NAWK        Override default value for NAWK
2212   PRINTF      Override default value for PRINTF
2213   RM          Override default value for RM
2214   RMDIR       Override default value for RMDIR
2215   SH          Override default value for SH
2216   SORT        Override default value for SORT
2217   TAIL        Override default value for TAIL
2218   TAR         Override default value for TAR
2219   TEE         Override default value for TEE
2220   TOUCH       Override default value for TOUCH
2221   TR          Override default value for TR
2222   UNAME       Override default value for UNAME
2223   UNIQ        Override default value for UNIQ
2224   WC          Override default value for WC
2225   WHICH       Override default value for WHICH
2226   XARGS       Override default value for XARGS
2227   AWK         Override default value for AWK
2228   GREP        Override default value for GREP
2229   EGREP       Override default value for EGREP
2230   FGREP       Override default value for FGREP
2231   SED         Override default value for SED
2232   CYGPATH     Override default value for CYGPATH
2233   READLINK    Override default value for READLINK
2234   DF          Override default value for DF
2235   CPIO        Override default value for CPIO
2236   NICE        Override default value for NICE
2237   MAKE        Override default value for MAKE
2238   UNZIP       Override default value for UNZIP
2239   ZIP         Override default value for ZIP
2240   LDD         Override default value for LDD
2241   OTOOL       Override default value for OTOOL
2242   READELF     Override default value for READELF
2243   HG          Override default value for HG
2244   STAT        Override default value for STAT
2245   TIME        Override default value for TIME
2246   DTRACE      Override default value for DTRACE
2247   PATCH       Override default value for PATCH
2248   DSYMUTIL    Override default value for DSYMUTIL
2249   XATTR       Override default value for XATTR
2250   CODESIGN    Override default value for CODESIGN
2251   SETFILE     Override default value for SETFILE
2252   PKG_CONFIG  path to pkg-config utility
2253   JAVA        Override default value for JAVA
2254   JAVAC       Override default value for JAVAC
2255   JAVAH       Override default value for JAVAH
2256   JAR         Override default value for JAR
2257   JARSIGNER   Override default value for JARSIGNER
2258   CC          C compiler command
2259   CFLAGS      C compiler flags
2260   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2261               nonstandard directory <lib dir>
2262   LIBS        libraries to pass to the linker, e.g. -l<library>
2263   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2264               you have headers in a nonstandard directory <include dir>
2265   CXX         C++ compiler command
2266   CXXFLAGS    C++ compiler flags
2267   CPP         C preprocessor
2268   CXXCPP      C++ preprocessor
2269   AS          Override default value for AS
2270   AR          Override default value for AR
2271   LIPO        Override default value for LIPO
2272   STRIP       Override default value for STRIP
2273   NM          Override default value for NM
2274   GNM         Override default value for GNM
2275   OBJCOPY     Override default value for OBJCOPY
2276   OBJDUMP     Override default value for OBJDUMP
2277   BUILD_CC    Override default value for BUILD_CC
2278   BUILD_CXX   Override default value for BUILD_CXX
2279   BUILD_NM    Override default value for BUILD_NM
2280   BUILD_AR    Override default value for BUILD_AR
2281   BUILD_OBJCOPY
2282               Override default value for BUILD_OBJCOPY
2283   BUILD_STRIP Override default value for BUILD_STRIP
2284   JTREGEXE    Override default value for JTREGEXE
2285   XMKMF       Path to xmkmf, Makefile generator for X Window System
2286   FREETYPE_CFLAGS
2287               C compiler flags for FREETYPE, overriding pkg-config
2288   FREETYPE_LIBS
2289               linker flags for FREETYPE, overriding pkg-config
2290   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2291   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2292   LIBFFI_CFLAGS
2293               C compiler flags for LIBFFI, overriding pkg-config
2294   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2295   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2296   PNG_LIBS    linker flags for PNG, overriding pkg-config
2297   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2298   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2299   ICECC_CMD   Override default value for ICECC_CMD
2300   ICECC_CREATE_ENV
2301               Override default value for ICECC_CREATE_ENV
2302   ICECC_WRAPPER
2303               Override default value for ICECC_WRAPPER
2304   CCACHE      Override default value for CCACHE
2305 
2306 Use these variables to override the choices made by `configure' or to help
2307 it to find libraries and programs with nonstandard names/locations.
2308 
2309 Report bugs to <build-dev@openjdk.java.net>.
2310 OpenJDK home page: <http://openjdk.java.net>.
2311 _ACEOF
2312 ac_status=$?
2313 fi
2314 
2315 if test "$ac_init_help" = "recursive"; then
2316   # If there are subdirs, report their specific --help.
2317   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2318     test -d "$ac_dir" ||
2319       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2320       continue
2321     ac_builddir=.
2322 
2323 case "$ac_dir" in
2324 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2325 *)
2326   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2327   # A ".." for each directory in $ac_dir_suffix.
2328   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2329   case $ac_top_builddir_sub in
2330   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2331   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2332   esac ;;
2333 esac
2334 ac_abs_top_builddir=$ac_pwd
2335 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2336 # for backward compatibility:
2337 ac_top_builddir=$ac_top_build_prefix
2338 
2339 case $srcdir in
2340   .)  # We are building in place.
2341     ac_srcdir=.
2342     ac_top_srcdir=$ac_top_builddir_sub
2343     ac_abs_top_srcdir=$ac_pwd ;;
2344   [\\/]* | ?:[\\/]* )  # Absolute name.
2345     ac_srcdir=$srcdir$ac_dir_suffix;
2346     ac_top_srcdir=$srcdir
2347     ac_abs_top_srcdir=$srcdir ;;
2348   *) # Relative name.
2349     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2350     ac_top_srcdir=$ac_top_build_prefix$srcdir
2351     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2352 esac
2353 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2354 
2355     cd "$ac_dir" || { ac_status=$?; continue; }
2356     # Check for guested configure.
2357     if test -f "$ac_srcdir/configure.gnu"; then
2358       echo &&
2359       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2360     elif test -f "$ac_srcdir/configure"; then
2361       echo &&
2362       $SHELL "$ac_srcdir/configure" --help=recursive
2363     else
2364       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2365     fi || ac_status=$?
2366     cd "$ac_pwd" || { ac_status=$?; break; }
2367   done
2368 fi
2369 
2370 test -n "$ac_init_help" && exit $ac_status
2371 if $ac_init_version; then
2372   cat <<\_ACEOF
2373 OpenJDK configure jdk9
2374 generated by GNU Autoconf 2.69
2375 
2376 Copyright (C) 2012 Free Software Foundation, Inc.
2377 This configure script is free software; the Free Software Foundation
2378 gives unlimited permission to copy, distribute and modify it.
2379 _ACEOF
2380   exit
2381 fi
2382 
2383 ## ------------------------ ##
2384 ## Autoconf initialization. ##
2385 ## ------------------------ ##
2386 
2387 # ac_fn_c_try_compile LINENO
2388 # --------------------------
2389 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2390 ac_fn_c_try_compile ()
2391 {
2392   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2393   rm -f conftest.$ac_objext
2394   if { { ac_try="$ac_compile"
2395 case "(($ac_try" in
2396   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2397   *) ac_try_echo=$ac_try;;
2398 esac
2399 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2400 $as_echo "$ac_try_echo"; } >&5
2401   (eval "$ac_compile") 2>conftest.err
2402   ac_status=$?
2403   if test -s conftest.err; then
2404     grep -v '^ *+' conftest.err >conftest.er1
2405     cat conftest.er1 >&5
2406     mv -f conftest.er1 conftest.err
2407   fi
2408   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2409   test $ac_status = 0; } && {
2410          test -z "$ac_c_werror_flag" ||
2411          test ! -s conftest.err
2412        } && test -s conftest.$ac_objext; then :
2413   ac_retval=0
2414 else
2415   $as_echo "$as_me: failed program was:" >&5
2416 sed 's/^/| /' conftest.$ac_ext >&5
2417 
2418         ac_retval=1
2419 fi
2420   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2421   as_fn_set_status $ac_retval
2422 
2423 } # ac_fn_c_try_compile
2424 
2425 # ac_fn_cxx_try_compile LINENO
2426 # ----------------------------
2427 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2428 ac_fn_cxx_try_compile ()
2429 {
2430   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2431   rm -f conftest.$ac_objext
2432   if { { ac_try="$ac_compile"
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_compile") 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; } && {
2448          test -z "$ac_cxx_werror_flag" ||
2449          test ! -s conftest.err
2450        } && test -s conftest.$ac_objext; 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_compile
2462 
2463 # ac_fn_c_try_cpp LINENO
2464 # ----------------------
2465 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2466 ac_fn_c_try_cpp ()
2467 {
2468   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2469   if { { ac_try="$ac_cpp conftest.$ac_ext"
2470 case "(($ac_try" in
2471   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2472   *) ac_try_echo=$ac_try;;
2473 esac
2474 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2475 $as_echo "$ac_try_echo"; } >&5
2476   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2477   ac_status=$?
2478   if test -s conftest.err; then
2479     grep -v '^ *+' conftest.err >conftest.er1
2480     cat conftest.er1 >&5
2481     mv -f conftest.er1 conftest.err
2482   fi
2483   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2484   test $ac_status = 0; } > conftest.i && {
2485          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2486          test ! -s conftest.err
2487        }; then :
2488   ac_retval=0
2489 else
2490   $as_echo "$as_me: failed program was:" >&5
2491 sed 's/^/| /' conftest.$ac_ext >&5
2492 
2493     ac_retval=1
2494 fi
2495   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2496   as_fn_set_status $ac_retval
2497 
2498 } # ac_fn_c_try_cpp
2499 
2500 # ac_fn_cxx_try_cpp LINENO
2501 # ------------------------
2502 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2503 ac_fn_cxx_try_cpp ()
2504 {
2505   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2506   if { { ac_try="$ac_cpp conftest.$ac_ext"
2507 case "(($ac_try" in
2508   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2509   *) ac_try_echo=$ac_try;;
2510 esac
2511 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2512 $as_echo "$ac_try_echo"; } >&5
2513   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2514   ac_status=$?
2515   if test -s conftest.err; then
2516     grep -v '^ *+' conftest.err >conftest.er1
2517     cat conftest.er1 >&5
2518     mv -f conftest.er1 conftest.err
2519   fi
2520   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2521   test $ac_status = 0; } > conftest.i && {
2522          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2523          test ! -s conftest.err
2524        }; then :
2525   ac_retval=0
2526 else
2527   $as_echo "$as_me: failed program was:" >&5
2528 sed 's/^/| /' conftest.$ac_ext >&5
2529 
2530     ac_retval=1
2531 fi
2532   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2533   as_fn_set_status $ac_retval
2534 
2535 } # ac_fn_cxx_try_cpp
2536 
2537 # ac_fn_c_try_link LINENO
2538 # -----------------------
2539 # Try to link conftest.$ac_ext, and return whether this succeeded.
2540 ac_fn_c_try_link ()
2541 {
2542   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2543   rm -f conftest.$ac_objext conftest$ac_exeext
2544   if { { ac_try="$ac_link"
2545 case "(($ac_try" in
2546   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2547   *) ac_try_echo=$ac_try;;
2548 esac
2549 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2550 $as_echo "$ac_try_echo"; } >&5
2551   (eval "$ac_link") 2>conftest.err
2552   ac_status=$?
2553   if test -s conftest.err; then
2554     grep -v '^ *+' conftest.err >conftest.er1
2555     cat conftest.er1 >&5
2556     mv -f conftest.er1 conftest.err
2557   fi
2558   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2559   test $ac_status = 0; } && {
2560          test -z "$ac_c_werror_flag" ||
2561          test ! -s conftest.err
2562        } && test -s conftest$ac_exeext && {
2563          test "$cross_compiling" = yes ||
2564          test -x conftest$ac_exeext
2565        }; then :
2566   ac_retval=0
2567 else
2568   $as_echo "$as_me: failed program was:" >&5
2569 sed 's/^/| /' conftest.$ac_ext >&5
2570 
2571         ac_retval=1
2572 fi
2573   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2574   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2575   # interfere with the next link command; also delete a directory that is
2576   # left behind by Apple's compiler.  We do this before executing the actions.
2577   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2578   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2579   as_fn_set_status $ac_retval
2580 
2581 } # ac_fn_c_try_link
2582 
2583 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2584 # ---------------------------------------------------------
2585 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2586 # the include files in INCLUDES and setting the cache variable VAR
2587 # accordingly.
2588 ac_fn_cxx_check_header_mongrel ()
2589 {
2590   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2591   if eval \${$3+:} false; then :
2592   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2593 $as_echo_n "checking for $2... " >&6; }
2594 if eval \${$3+:} false; then :
2595   $as_echo_n "(cached) " >&6
2596 fi
2597 eval ac_res=\$$3
2598                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2599 $as_echo "$ac_res" >&6; }
2600 else
2601   # Is the header compilable?
2602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2603 $as_echo_n "checking $2 usability... " >&6; }
2604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2605 /* end confdefs.h.  */
2606 $4
2607 #include <$2>
2608 _ACEOF
2609 if ac_fn_cxx_try_compile "$LINENO"; then :
2610   ac_header_compiler=yes
2611 else
2612   ac_header_compiler=no
2613 fi
2614 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2616 $as_echo "$ac_header_compiler" >&6; }
2617 
2618 # Is the header present?
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2620 $as_echo_n "checking $2 presence... " >&6; }
2621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2622 /* end confdefs.h.  */
2623 #include <$2>
2624 _ACEOF
2625 if ac_fn_cxx_try_cpp "$LINENO"; then :
2626   ac_header_preproc=yes
2627 else
2628   ac_header_preproc=no
2629 fi
2630 rm -f conftest.err conftest.i conftest.$ac_ext
2631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2632 $as_echo "$ac_header_preproc" >&6; }
2633 
2634 # So?  What about this header?
2635 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2636   yes:no: )
2637     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2638 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2639     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2640 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2641     ;;
2642   no:yes:* )
2643     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2644 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2645     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2646 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2647     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2648 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2649     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2650 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2651     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2652 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2653 ( $as_echo "## ----------------------------------------- ##
2654 ## Report this to build-dev@openjdk.java.net ##
2655 ## ----------------------------------------- ##"
2656      ) | sed "s/^/$as_me: WARNING:     /" >&2
2657     ;;
2658 esac
2659   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2660 $as_echo_n "checking for $2... " >&6; }
2661 if eval \${$3+:} false; then :
2662   $as_echo_n "(cached) " >&6
2663 else
2664   eval "$3=\$ac_header_compiler"
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 fi
2670   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2671 
2672 } # ac_fn_cxx_check_header_mongrel
2673 
2674 # ac_fn_cxx_try_run LINENO
2675 # ------------------------
2676 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2677 # that executables *can* be run.
2678 ac_fn_cxx_try_run ()
2679 {
2680   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2681   if { { ac_try="$ac_link"
2682 case "(($ac_try" in
2683   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2684   *) ac_try_echo=$ac_try;;
2685 esac
2686 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2687 $as_echo "$ac_try_echo"; } >&5
2688   (eval "$ac_link") 2>&5
2689   ac_status=$?
2690   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2691   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2692   { { case "(($ac_try" in
2693   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2694   *) ac_try_echo=$ac_try;;
2695 esac
2696 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2697 $as_echo "$ac_try_echo"; } >&5
2698   (eval "$ac_try") 2>&5
2699   ac_status=$?
2700   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2701   test $ac_status = 0; }; }; then :
2702   ac_retval=0
2703 else
2704   $as_echo "$as_me: program exited with status $ac_status" >&5
2705        $as_echo "$as_me: failed program was:" >&5
2706 sed 's/^/| /' conftest.$ac_ext >&5
2707 
2708        ac_retval=$ac_status
2709 fi
2710   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2711   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2712   as_fn_set_status $ac_retval
2713 
2714 } # ac_fn_cxx_try_run
2715 
2716 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2717 # ---------------------------------------------------------
2718 # Tests whether HEADER exists and can be compiled using the include files in
2719 # INCLUDES, setting the cache variable VAR accordingly.
2720 ac_fn_cxx_check_header_compile ()
2721 {
2722   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2723   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2724 $as_echo_n "checking for $2... " >&6; }
2725 if eval \${$3+:} false; then :
2726   $as_echo_n "(cached) " >&6
2727 else
2728   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2729 /* end confdefs.h.  */
2730 $4
2731 #include <$2>
2732 _ACEOF
2733 if ac_fn_cxx_try_compile "$LINENO"; then :
2734   eval "$3=yes"
2735 else
2736   eval "$3=no"
2737 fi
2738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2739 fi
2740 eval ac_res=\$$3
2741                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2742 $as_echo "$ac_res" >&6; }
2743   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2744 
2745 } # ac_fn_cxx_check_header_compile
2746 
2747 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2748 # ----------------------------------------------
2749 # Tries to find the compile-time value of EXPR in a program that includes
2750 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2751 # computed
2752 ac_fn_cxx_compute_int ()
2753 {
2754   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2755   if test "$cross_compiling" = yes; then
2756     # Depending upon the size, compute the lo and hi bounds.
2757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2758 /* end confdefs.h.  */
2759 $4
2760 int
2761 main ()
2762 {
2763 static int test_array [1 - 2 * !(($2) >= 0)];
2764 test_array [0] = 0;
2765 return test_array [0];
2766 
2767   ;
2768   return 0;
2769 }
2770 _ACEOF
2771 if ac_fn_cxx_try_compile "$LINENO"; then :
2772   ac_lo=0 ac_mid=0
2773   while :; do
2774     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2775 /* end confdefs.h.  */
2776 $4
2777 int
2778 main ()
2779 {
2780 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2781 test_array [0] = 0;
2782 return test_array [0];
2783 
2784   ;
2785   return 0;
2786 }
2787 _ACEOF
2788 if ac_fn_cxx_try_compile "$LINENO"; then :
2789   ac_hi=$ac_mid; break
2790 else
2791   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2792                         if test $ac_lo -le $ac_mid; then
2793                           ac_lo= ac_hi=
2794                           break
2795                         fi
2796                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2797 fi
2798 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2799   done
2800 else
2801   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2802 /* end confdefs.h.  */
2803 $4
2804 int
2805 main ()
2806 {
2807 static int test_array [1 - 2 * !(($2) < 0)];
2808 test_array [0] = 0;
2809 return test_array [0];
2810 
2811   ;
2812   return 0;
2813 }
2814 _ACEOF
2815 if ac_fn_cxx_try_compile "$LINENO"; then :
2816   ac_hi=-1 ac_mid=-1
2817   while :; do
2818     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2819 /* end confdefs.h.  */
2820 $4
2821 int
2822 main ()
2823 {
2824 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2825 test_array [0] = 0;
2826 return test_array [0];
2827 
2828   ;
2829   return 0;
2830 }
2831 _ACEOF
2832 if ac_fn_cxx_try_compile "$LINENO"; then :
2833   ac_lo=$ac_mid; break
2834 else
2835   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2836                         if test $ac_mid -le $ac_hi; then
2837                           ac_lo= ac_hi=
2838                           break
2839                         fi
2840                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2841 fi
2842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2843   done
2844 else
2845   ac_lo= ac_hi=
2846 fi
2847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2848 fi
2849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2850 # Binary search between lo and hi bounds.
2851 while test "x$ac_lo" != "x$ac_hi"; do
2852   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2853   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2854 /* end confdefs.h.  */
2855 $4
2856 int
2857 main ()
2858 {
2859 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2860 test_array [0] = 0;
2861 return test_array [0];
2862 
2863   ;
2864   return 0;
2865 }
2866 _ACEOF
2867 if ac_fn_cxx_try_compile "$LINENO"; then :
2868   ac_hi=$ac_mid
2869 else
2870   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2871 fi
2872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2873 done
2874 case $ac_lo in #((
2875 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2876 '') ac_retval=1 ;;
2877 esac
2878   else
2879     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2880 /* end confdefs.h.  */
2881 $4
2882 static long int longval () { return $2; }
2883 static unsigned long int ulongval () { return $2; }
2884 #include <stdio.h>
2885 #include <stdlib.h>
2886 int
2887 main ()
2888 {
2889 
2890   FILE *f = fopen ("conftest.val", "w");
2891   if (! f)
2892     return 1;
2893   if (($2) < 0)
2894     {
2895       long int i = longval ();
2896       if (i != ($2))
2897         return 1;
2898       fprintf (f, "%ld", i);
2899     }
2900   else
2901     {
2902       unsigned long int i = ulongval ();
2903       if (i != ($2))
2904         return 1;
2905       fprintf (f, "%lu", i);
2906     }
2907   /* Do not output a trailing newline, as this causes \r\n confusion
2908      on some platforms.  */
2909   return ferror (f) || fclose (f) != 0;
2910 
2911   ;
2912   return 0;
2913 }
2914 _ACEOF
2915 if ac_fn_cxx_try_run "$LINENO"; then :
2916   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2917 else
2918   ac_retval=1
2919 fi
2920 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2921   conftest.$ac_objext conftest.beam conftest.$ac_ext
2922 rm -f conftest.val
2923 
2924   fi
2925   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2926   as_fn_set_status $ac_retval
2927 
2928 } # ac_fn_cxx_compute_int
2929 
2930 # ac_fn_cxx_try_link LINENO
2931 # -------------------------
2932 # Try to link conftest.$ac_ext, and return whether this succeeded.
2933 ac_fn_cxx_try_link ()
2934 {
2935   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2936   rm -f conftest.$ac_objext conftest$ac_exeext
2937   if { { ac_try="$ac_link"
2938 case "(($ac_try" in
2939   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2940   *) ac_try_echo=$ac_try;;
2941 esac
2942 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2943 $as_echo "$ac_try_echo"; } >&5
2944   (eval "$ac_link") 2>conftest.err
2945   ac_status=$?
2946   if test -s conftest.err; then
2947     grep -v '^ *+' conftest.err >conftest.er1
2948     cat conftest.er1 >&5
2949     mv -f conftest.er1 conftest.err
2950   fi
2951   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2952   test $ac_status = 0; } && {
2953          test -z "$ac_cxx_werror_flag" ||
2954          test ! -s conftest.err
2955        } && test -s conftest$ac_exeext && {
2956          test "$cross_compiling" = yes ||
2957          test -x conftest$ac_exeext
2958        }; then :
2959   ac_retval=0
2960 else
2961   $as_echo "$as_me: failed program was:" >&5
2962 sed 's/^/| /' conftest.$ac_ext >&5
2963 
2964         ac_retval=1
2965 fi
2966   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2967   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2968   # interfere with the next link command; also delete a directory that is
2969   # left behind by Apple's compiler.  We do this before executing the actions.
2970   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2971   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2972   as_fn_set_status $ac_retval
2973 
2974 } # ac_fn_cxx_try_link
2975 
2976 # ac_fn_cxx_check_func LINENO FUNC VAR
2977 # ------------------------------------
2978 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2979 ac_fn_cxx_check_func ()
2980 {
2981   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2982   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2983 $as_echo_n "checking for $2... " >&6; }
2984 if eval \${$3+:} false; then :
2985   $as_echo_n "(cached) " >&6
2986 else
2987   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2988 /* end confdefs.h.  */
2989 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2990    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2991 #define $2 innocuous_$2
2992 
2993 /* System header to define __stub macros and hopefully few prototypes,
2994     which can conflict with char $2 (); below.
2995     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2996     <limits.h> exists even on freestanding compilers.  */
2997 
2998 #ifdef __STDC__
2999 # include <limits.h>
3000 #else
3001 # include <assert.h>
3002 #endif
3003 
3004 #undef $2
3005 
3006 /* Override any GCC internal prototype to avoid an error.
3007    Use char because int might match the return type of a GCC
3008    builtin and then its argument prototype would still apply.  */
3009 #ifdef __cplusplus
3010 extern "C"
3011 #endif
3012 char $2 ();
3013 /* The GNU C library defines this for functions which it implements
3014     to always fail with ENOSYS.  Some functions are actually named
3015     something starting with __ and the normal name is an alias.  */
3016 #if defined __stub_$2 || defined __stub___$2
3017 choke me
3018 #endif
3019 
3020 int
3021 main ()
3022 {
3023 return $2 ();
3024   ;
3025   return 0;
3026 }
3027 _ACEOF
3028 if ac_fn_cxx_try_link "$LINENO"; then :
3029   eval "$3=yes"
3030 else
3031   eval "$3=no"
3032 fi
3033 rm -f core conftest.err conftest.$ac_objext \
3034     conftest$ac_exeext conftest.$ac_ext
3035 fi
3036 eval ac_res=\$$3
3037                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3038 $as_echo "$ac_res" >&6; }
3039   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3040 
3041 } # ac_fn_cxx_check_func
3042 
3043 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3044 # -------------------------------------------------------
3045 # Tests whether HEADER exists and can be compiled using the include files in
3046 # INCLUDES, setting the cache variable VAR accordingly.
3047 ac_fn_c_check_header_compile ()
3048 {
3049   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3050   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3051 $as_echo_n "checking for $2... " >&6; }
3052 if eval \${$3+:} false; then :
3053   $as_echo_n "(cached) " >&6
3054 else
3055   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3056 /* end confdefs.h.  */
3057 $4
3058 #include <$2>
3059 _ACEOF
3060 if ac_fn_c_try_compile "$LINENO"; then :
3061   eval "$3=yes"
3062 else
3063   eval "$3=no"
3064 fi
3065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3066 fi
3067 eval ac_res=\$$3
3068                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3069 $as_echo "$ac_res" >&6; }
3070   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3071 
3072 } # ac_fn_c_check_header_compile
3073 cat >config.log <<_ACEOF
3074 This file contains any messages produced by compilers while
3075 running configure, to aid debugging if configure makes a mistake.
3076 
3077 It was created by OpenJDK $as_me jdk9, which was
3078 generated by GNU Autoconf 2.69.  Invocation command line was
3079 
3080   $ $0 $@
3081 
3082 _ACEOF
3083 exec 5>>config.log
3084 {
3085 cat <<_ASUNAME
3086 ## --------- ##
3087 ## Platform. ##
3088 ## --------- ##
3089 
3090 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3091 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3092 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3093 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3094 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3095 
3096 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3097 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3098 
3099 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3100 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3101 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3102 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3103 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3104 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3105 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3106 
3107 _ASUNAME
3108 
3109 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3110 for as_dir in $PATH
3111 do
3112   IFS=$as_save_IFS
3113   test -z "$as_dir" && as_dir=.
3114     $as_echo "PATH: $as_dir"
3115   done
3116 IFS=$as_save_IFS
3117 
3118 } >&5
3119 
3120 cat >&5 <<_ACEOF
3121 
3122 
3123 ## ----------- ##
3124 ## Core tests. ##
3125 ## ----------- ##
3126 
3127 _ACEOF
3128 
3129 
3130 # Keep a trace of the command line.
3131 # Strip out --no-create and --no-recursion so they do not pile up.
3132 # Strip out --silent because we don't want to record it for future runs.
3133 # Also quote any args containing shell meta-characters.
3134 # Make two passes to allow for proper duplicate-argument suppression.
3135 ac_configure_args=
3136 ac_configure_args0=
3137 ac_configure_args1=
3138 ac_must_keep_next=false
3139 for ac_pass in 1 2
3140 do
3141   for ac_arg
3142   do
3143     case $ac_arg in
3144     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3145     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3146     | -silent | --silent | --silen | --sile | --sil)
3147       continue ;;
3148     *\'*)
3149       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3150     esac
3151     case $ac_pass in
3152     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3153     2)
3154       as_fn_append ac_configure_args1 " '$ac_arg'"
3155       if test $ac_must_keep_next = true; then
3156         ac_must_keep_next=false # Got value, back to normal.
3157       else
3158         case $ac_arg in
3159           *=* | --config-cache | -C | -disable-* | --disable-* \
3160           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3161           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3162           | -with-* | --with-* | -without-* | --without-* | --x)
3163             case "$ac_configure_args0 " in
3164               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3165             esac
3166             ;;
3167           -* ) ac_must_keep_next=true ;;
3168         esac
3169       fi
3170       as_fn_append ac_configure_args " '$ac_arg'"
3171       ;;
3172     esac
3173   done
3174 done
3175 { ac_configure_args0=; unset ac_configure_args0;}
3176 { ac_configure_args1=; unset ac_configure_args1;}
3177 
3178 # When interrupted or exit'd, cleanup temporary files, and complete
3179 # config.log.  We remove comments because anyway the quotes in there
3180 # would cause problems or look ugly.
3181 # WARNING: Use '\'' to represent an apostrophe within the trap.
3182 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3183 trap 'exit_status=$?
3184   # Save into config.log some information that might help in debugging.
3185   {
3186     echo
3187 
3188     $as_echo "## ---------------- ##
3189 ## Cache variables. ##
3190 ## ---------------- ##"
3191     echo
3192     # The following way of writing the cache mishandles newlines in values,
3193 (
3194   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3195     eval ac_val=\$$ac_var
3196     case $ac_val in #(
3197     *${as_nl}*)
3198       case $ac_var in #(
3199       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3200 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3201       esac
3202       case $ac_var in #(
3203       _ | IFS | as_nl) ;; #(
3204       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3205       *) { eval $ac_var=; unset $ac_var;} ;;
3206       esac ;;
3207     esac
3208   done
3209   (set) 2>&1 |
3210     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3211     *${as_nl}ac_space=\ *)
3212       sed -n \
3213         "s/'\''/'\''\\\\'\'''\''/g;
3214           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3215       ;; #(
3216     *)
3217       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3218       ;;
3219     esac |
3220     sort
3221 )
3222     echo
3223 
3224     $as_echo "## ----------------- ##
3225 ## Output variables. ##
3226 ## ----------------- ##"
3227     echo
3228     for ac_var in $ac_subst_vars
3229     do
3230       eval ac_val=\$$ac_var
3231       case $ac_val in
3232       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3233       esac
3234       $as_echo "$ac_var='\''$ac_val'\''"
3235     done | sort
3236     echo
3237 
3238     if test -n "$ac_subst_files"; then
3239       $as_echo "## ------------------- ##
3240 ## File substitutions. ##
3241 ## ------------------- ##"
3242       echo
3243       for ac_var in $ac_subst_files
3244       do
3245         eval ac_val=\$$ac_var
3246         case $ac_val in
3247         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3248         esac
3249         $as_echo "$ac_var='\''$ac_val'\''"
3250       done | sort
3251       echo
3252     fi
3253 
3254     if test -s confdefs.h; then
3255       $as_echo "## ----------- ##
3256 ## confdefs.h. ##
3257 ## ----------- ##"
3258       echo
3259       cat confdefs.h
3260       echo
3261     fi
3262     test "$ac_signal" != 0 &&
3263       $as_echo "$as_me: caught signal $ac_signal"
3264     $as_echo "$as_me: exit $exit_status"
3265   } >&5
3266   rm -f core *.core core.conftest.* &&
3267     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3268     exit $exit_status
3269 ' 0
3270 for ac_signal in 1 2 13 15; do
3271   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3272 done
3273 ac_signal=0
3274 
3275 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3276 rm -f -r conftest* confdefs.h
3277 
3278 $as_echo "/* confdefs.h */" > confdefs.h
3279 
3280 # Predefined preprocessor variables.
3281 
3282 cat >>confdefs.h <<_ACEOF
3283 #define PACKAGE_NAME "$PACKAGE_NAME"
3284 _ACEOF
3285 
3286 cat >>confdefs.h <<_ACEOF
3287 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3288 _ACEOF
3289 
3290 cat >>confdefs.h <<_ACEOF
3291 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3292 _ACEOF
3293 
3294 cat >>confdefs.h <<_ACEOF
3295 #define PACKAGE_STRING "$PACKAGE_STRING"
3296 _ACEOF
3297 
3298 cat >>confdefs.h <<_ACEOF
3299 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3300 _ACEOF
3301 
3302 cat >>confdefs.h <<_ACEOF
3303 #define PACKAGE_URL "$PACKAGE_URL"
3304 _ACEOF
3305 
3306 
3307 # Let the site file select an alternate cache file if it wants to.
3308 # Prefer an explicitly selected file to automatically selected ones.
3309 ac_site_file1=NONE
3310 ac_site_file2=NONE
3311 if test -n "$CONFIG_SITE"; then
3312   # We do not want a PATH search for config.site.
3313   case $CONFIG_SITE in #((
3314     -*)  ac_site_file1=./$CONFIG_SITE;;
3315     */*) ac_site_file1=$CONFIG_SITE;;
3316     *)   ac_site_file1=./$CONFIG_SITE;;
3317   esac
3318 elif test "x$prefix" != xNONE; then
3319   ac_site_file1=$prefix/share/config.site
3320   ac_site_file2=$prefix/etc/config.site
3321 else
3322   ac_site_file1=$ac_default_prefix/share/config.site
3323   ac_site_file2=$ac_default_prefix/etc/config.site
3324 fi
3325 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3326 do
3327   test "x$ac_site_file" = xNONE && continue
3328   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3329     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3330 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3331     sed 's/^/| /' "$ac_site_file" >&5
3332     . "$ac_site_file" \
3333       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3334 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3335 as_fn_error $? "failed to load site script $ac_site_file
3336 See \`config.log' for more details" "$LINENO" 5; }
3337   fi
3338 done
3339 
3340 if test -r "$cache_file"; then
3341   # Some versions of bash will fail to source /dev/null (special files
3342   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3343   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3344     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3345 $as_echo "$as_me: loading cache $cache_file" >&6;}
3346     case $cache_file in
3347       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3348       *)                      . "./$cache_file";;
3349     esac
3350   fi
3351 else
3352   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3353 $as_echo "$as_me: creating cache $cache_file" >&6;}
3354   >$cache_file
3355 fi
3356 
3357 # Check that the precious variables saved in the cache have kept the same
3358 # value.
3359 ac_cache_corrupted=false
3360 for ac_var in $ac_precious_vars; do
3361   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3362   eval ac_new_set=\$ac_env_${ac_var}_set
3363   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3364   eval ac_new_val=\$ac_env_${ac_var}_value
3365   case $ac_old_set,$ac_new_set in
3366     set,)
3367       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3368 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3369       ac_cache_corrupted=: ;;
3370     ,set)
3371       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3372 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3373       ac_cache_corrupted=: ;;
3374     ,);;
3375     *)
3376       if test "x$ac_old_val" != "x$ac_new_val"; then
3377         # differences in whitespace do not lead to failure.
3378         ac_old_val_w=`echo x $ac_old_val`
3379         ac_new_val_w=`echo x $ac_new_val`
3380         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3381           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3382 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3383           ac_cache_corrupted=:
3384         else
3385           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3386 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3387           eval $ac_var=\$ac_old_val
3388         fi
3389         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3390 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3391         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3392 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3393       fi;;
3394   esac
3395   # Pass precious variables to config.status.
3396   if test "$ac_new_set" = set; then
3397     case $ac_new_val in
3398     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3399     *) ac_arg=$ac_var=$ac_new_val ;;
3400     esac
3401     case " $ac_configure_args " in
3402       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3403       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3404     esac
3405   fi
3406 done
3407 if $ac_cache_corrupted; then
3408   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3409 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3410   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3411 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3412   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3413 fi
3414 ## -------------------- ##
3415 ## Main body of script. ##
3416 ## -------------------- ##
3417 
3418 ac_ext=c
3419 ac_cpp='$CPP $CPPFLAGS'
3420 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3421 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3422 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3423 
3424 
3425 
3426 ac_aux_dir=
3427 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3428   if test -f "$ac_dir/install-sh"; then
3429     ac_aux_dir=$ac_dir
3430     ac_install_sh="$ac_aux_dir/install-sh -c"
3431     break
3432   elif test -f "$ac_dir/install.sh"; then
3433     ac_aux_dir=$ac_dir
3434     ac_install_sh="$ac_aux_dir/install.sh -c"
3435     break
3436   elif test -f "$ac_dir/shtool"; then
3437     ac_aux_dir=$ac_dir
3438     ac_install_sh="$ac_aux_dir/shtool install -c"
3439     break
3440   fi
3441 done
3442 if test -z "$ac_aux_dir"; then
3443   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
3444 fi
3445 
3446 # These three variables are undocumented and unsupported,
3447 # and are intended to be withdrawn in a future Autoconf release.
3448 # They can cause serious problems if a builder's source tree is in a directory
3449 # whose full name contains unusual characters.
3450 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3451 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3452 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3453 
3454 
3455 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3456 
3457 #
3458 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3459 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3460 #
3461 # This code is free software; you can redistribute it and/or modify it
3462 # under the terms of the GNU General Public License version 2 only, as
3463 # published by the Free Software Foundation.  Oracle designates this
3464 # particular file as subject to the "Classpath" exception as provided
3465 # by Oracle in the LICENSE file that accompanied this code.
3466 #
3467 # This code is distributed in the hope that it will be useful, but WITHOUT
3468 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3469 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3470 # version 2 for more details (a copy is included in the LICENSE file that
3471 # accompanied this code).
3472 #
3473 # You should have received a copy of the GNU General Public License version
3474 # 2 along with this work; if not, write to the Free Software Foundation,
3475 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3476 #
3477 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3478 # or visit www.oracle.com if you need additional information or have any
3479 # questions.
3480 #
3481 
3482 #
3483 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3484 #
3485 # This program is free software; you can redistribute it and/or modify
3486 # it under the terms of the GNU General Public License as published by
3487 # the Free Software Foundation; either version 2 of the License, or
3488 # (at your option) any later version.
3489 #
3490 # This program is distributed in the hope that it will be useful, but
3491 # WITHOUT ANY WARRANTY; without even the implied warranty of
3492 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3493 # General Public License for more details.
3494 #
3495 # You should have received a copy of the GNU General Public License
3496 # along with this program; if not, write to the Free Software
3497 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3498 #
3499 # As a special exception to the GNU General Public License, if you
3500 # distribute this file as part of a program that contains a
3501 # configuration script generated by Autoconf, you may include it under
3502 # the same distribution terms that you use for the rest of that program.
3503 
3504 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3505 # ----------------------------------
3506 # PKG_PROG_PKG_CONFIG
3507 
3508 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3509 #
3510 # Check to see whether a particular set of modules exists.  Similar
3511 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3512 #
3513 #
3514 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3515 # this or PKG_CHECK_MODULES is called, or make sure to call
3516 # PKG_CHECK_EXISTS manually
3517 # --------------------------------------------------------------
3518 
3519 
3520 
3521 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3522 # ---------------------------------------------
3523 # _PKG_CONFIG
3524 
3525 # _PKG_SHORT_ERRORS_SUPPORTED
3526 # -----------------------------
3527 # _PKG_SHORT_ERRORS_SUPPORTED
3528 
3529 
3530 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3531 # [ACTION-IF-NOT-FOUND])
3532 #
3533 #
3534 # Note that if there is a possibility the first call to
3535 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3536 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3537 #
3538 #
3539 # --------------------------------------------------------------
3540 # PKG_CHECK_MODULES
3541 
3542 
3543 # Include these first...
3544 #
3545 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3546 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3547 #
3548 # This code is free software; you can redistribute it and/or modify it
3549 # under the terms of the GNU General Public License version 2 only, as
3550 # published by the Free Software Foundation.  Oracle designates this
3551 # particular file as subject to the "Classpath" exception as provided
3552 # by Oracle in the LICENSE file that accompanied this code.
3553 #
3554 # This code is distributed in the hope that it will be useful, but WITHOUT
3555 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3556 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3557 # version 2 for more details (a copy is included in the LICENSE file that
3558 # accompanied this code).
3559 #
3560 # You should have received a copy of the GNU General Public License version
3561 # 2 along with this work; if not, write to the Free Software Foundation,
3562 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3563 #
3564 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3565 # or visit www.oracle.com if you need additional information or have any
3566 # questions.
3567 #
3568 
3569 # Create a function/macro that takes a series of named arguments. The call is
3570 # similar to AC_DEFUN, but the setup of the function looks like this:
3571 # BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3572 # ... do something
3573 #   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3574 # ])
3575 # A star (*) in front of a named argument means that it is required and it's
3576 # presence will be verified. To pass e.g. the first value as a normal indexed
3577 # argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3578 # arguments are referenced in the function by their name prefixed by ARG_, e.g.
3579 # "ARG_FOO".
3580 #
3581 # The generated function can be called like this:
3582 # MYFUNC(FOO: [foo-val],
3583 #     BAR: [
3584 #         $ECHO hello world
3585 #     ])
3586 # Note that the argument value must start on the same line as the argument name.
3587 #
3588 # Argument 1: Name of the function to define
3589 # Argument 2: List of legal named arguments, with a * prefix for required arguments
3590 # Argument 3: Argument array to treat as named, typically $@
3591 # Argument 4: The main function body
3592 
3593 
3594 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3595 # If so, then append $1 to $2 \
3596 # Also set JVM_ARG_OK to true/false depending on outcome.
3597 
3598 
3599 # Appends a string to a path variable, only adding the : when needed.
3600 
3601 
3602 # Prepends a string to a path variable, only adding the : when needed.
3603 
3604 
3605 # This will make sure the given variable points to a full and proper
3606 # path. This means:
3607 # 1) There will be no spaces in the path. On unix platforms,
3608 #    spaces in the path will result in an error. On Windows,
3609 #    the path will be rewritten using short-style to be space-free.
3610 # 2) The path will be absolute, and it will be in unix-style (on
3611 #     cygwin).
3612 # $1: The name of the variable to fix
3613 
3614 
3615 # This will make sure the given variable points to a executable
3616 # with a full and proper path. This means:
3617 # 1) There will be no spaces in the path. On unix platforms,
3618 #    spaces in the path will result in an error. On Windows,
3619 #    the path will be rewritten using short-style to be space-free.
3620 # 2) The path will be absolute, and it will be in unix-style (on
3621 #     cygwin).
3622 # Any arguments given to the executable is preserved.
3623 # If the input variable does not have a directory specification, then
3624 # it need to be in the PATH.
3625 # $1: The name of the variable to fix
3626 
3627 
3628 
3629 
3630 # Register a --with argument but mark it as deprecated
3631 # $1: The name of the with argument to deprecate, not including --with-
3632 
3633 
3634 # Register a --enable argument but mark it as deprecated
3635 # $1: The name of the with argument to deprecate, not including --enable-
3636 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3637 # $3: Messages to user.
3638 
3639 
3640 
3641 
3642 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3643 # $1: variable to check
3644 
3645 
3646 # Check that there are no unprocessed overridden variables left.
3647 # If so, they are an incorrect argument and we will exit with an error.
3648 
3649 
3650 # Setup a tool for the given variable. If correctly specified by the user,
3651 # use that value, otherwise search for the tool using the supplied code snippet.
3652 # $1: variable to set
3653 # $2: code snippet to call to look for the tool
3654 # $3: code snippet to call if variable was used to find tool
3655 
3656 
3657 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3658 # $1: variable to set
3659 # $2: executable name (or list of names) to look for
3660 # $3: [path]
3661 
3662 
3663 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3664 # $1: variable to set
3665 # $2: executable name (or list of names) to look for
3666 
3667 
3668 # Like BASIC_PATH_PROGS but fails if no tool was found.
3669 # $1: variable to set
3670 # $2: executable name (or list of names) to look for
3671 # $3: [path]
3672 
3673 
3674 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3675 # $1: variable to set
3676 # $2: autoconf macro to call to look for the special tool
3677 
3678 
3679 # Setup the most fundamental tools that relies on not much else to set up,
3680 # but is used by much of the early bootstrap code.
3681 
3682 
3683 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3684 
3685 
3686 # Evaluates platform specific overrides for devkit variables.
3687 # $1: Name of variable
3688 
3689 
3690 
3691 
3692 
3693 
3694 #%%% Simple tools %%%
3695 
3696 # Check if we have found a usable version of make
3697 # $1: the path to a potential make binary (or empty)
3698 # $2: the description on how we found this
3699 
3700 
3701 
3702 
3703 # Goes looking for a usable version of GNU make.
3704 
3705 
3706 
3707 
3708 
3709 
3710 
3711 
3712 # Check if build directory is on local disk. If not possible to determine,
3713 # we prefer to claim it's local.
3714 # Argument 1: directory to test
3715 # Argument 2: what to do if it is on local disk
3716 # Argument 3: what to do otherwise (remote disk or failure)
3717 
3718 
3719 # Check that source files have basic read permissions set. This might
3720 # not be the case in cygwin in certain conditions.
3721 
3722 
3723 
3724 
3725 # Check for support for specific options in bash
3726 
3727 
3728 ################################################################################
3729 #
3730 # Default make target
3731 #
3732 
3733 
3734 # Code to run after AC_OUTPUT
3735 
3736 
3737 #
3738 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3739 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3740 #
3741 # This code is free software; you can redistribute it and/or modify it
3742 # under the terms of the GNU General Public License version 2 only, as
3743 # published by the Free Software Foundation.  Oracle designates this
3744 # particular file as subject to the "Classpath" exception as provided
3745 # by Oracle in the LICENSE file that accompanied this code.
3746 #
3747 # This code is distributed in the hope that it will be useful, but WITHOUT
3748 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3749 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3750 # version 2 for more details (a copy is included in the LICENSE file that
3751 # accompanied this code).
3752 #
3753 # You should have received a copy of the GNU General Public License version
3754 # 2 along with this work; if not, write to the Free Software Foundation,
3755 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3756 #
3757 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3758 # or visit www.oracle.com if you need additional information or have any
3759 # questions.
3760 #
3761 
3762 
3763 
3764 
3765 
3766 # Helper function which possibly converts a path using DOS-style short mode.
3767 # If so, the updated path is stored in $new_path.
3768 # $1: The path to check
3769 
3770 
3771 # Helper function which possibly converts a path using DOS-style short mode.
3772 # If so, the updated path is stored in $new_path.
3773 # $1: The path to check
3774 
3775 
3776 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3777 # and could probably be heavily simplified. However, all changes in this
3778 # area tend to need lot of testing in different scenarios, and in lack of
3779 # proper unit testing, cleaning this up has not been deemed worth the effort
3780 # at the moment.
3781 
3782 
3783 
3784 
3785 
3786 
3787 
3788 
3789 
3790 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3791 
3792 
3793 
3794 
3795 # ... then the rest
3796 #
3797 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3798 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3799 #
3800 # This code is free software; you can redistribute it and/or modify it
3801 # under the terms of the GNU General Public License version 2 only, as
3802 # published by the Free Software Foundation.  Oracle designates this
3803 # particular file as subject to the "Classpath" exception as provided
3804 # by Oracle in the LICENSE file that accompanied this code.
3805 #
3806 # This code is distributed in the hope that it will be useful, but WITHOUT
3807 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3808 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3809 # version 2 for more details (a copy is included in the LICENSE file that
3810 # accompanied this code).
3811 #
3812 # You should have received a copy of the GNU General Public License version
3813 # 2 along with this work; if not, write to the Free Software Foundation,
3814 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3815 #
3816 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3817 # or visit www.oracle.com if you need additional information or have any
3818 # questions.
3819 #
3820 
3821 ########################################################################
3822 # This file handles detection of the Boot JDK. The Boot JDK detection
3823 # process has been developed as a response to solve a complex real-world
3824 # problem. Initially, it was simple, but it has grown as platform after
3825 # platform, idiosyncracy after idiosyncracy has been supported.
3826 #
3827 # The basic idea is this:
3828 # 1) You need an acceptable *) JDK to use as a Boot JDK
3829 # 2) There are several ways to locate a JDK, that are mostly platform
3830 #    dependent **)
3831 # 3) You can have multiple JDKs installed
3832 # 4) If possible, configure should try to dig out an acceptable JDK
3833 #    automatically, without having to resort to command-line options
3834 #
3835 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3836 #     javac) and not a JRE, etc.
3837 #
3838 # **) On Windows we typically use a well-known path.
3839 #     On MacOSX we typically use the tool java_home.
3840 #     On Linux we typically find javac in the $PATH, and then follow a
3841 #     chain of symlinks that often ends up in a real JDK.
3842 #
3843 # This leads to the code where we check in different ways to locate a
3844 # JDK, and if one is found, check if it is acceptable. If not, we print
3845 # our reasons for rejecting it (useful when debugging non-working
3846 # configure situations) and continue checking the next one.
3847 ########################################################################
3848 
3849 # Execute the check given as argument, and verify the result
3850 # If the Boot JDK was previously found, do nothing
3851 # $1 A command line (typically autoconf macro) to execute
3852 
3853 
3854 # Test: Is bootjdk explicitely set by command line arguments?
3855 
3856 
3857 # Test: Is $JAVA_HOME set?
3858 
3859 
3860 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3861 
3862 
3863 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3864 # $1: Argument to the java_home binary (optional)
3865 
3866 
3867 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3868 
3869 
3870 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3871 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3872 # $1 = Path to directory containing jdk installations.
3873 # $2 = String to append to the found JDK directory to get the proper JDK home
3874 
3875 
3876 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3877 # environmental variable as base for where to look.
3878 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3879 
3880 
3881 # Test: Is there a JDK installed in default, well-known locations?
3882 
3883 
3884 # Check that a command-line tool in the Boot JDK is correct
3885 # $1 = name of variable to assign
3886 # $2 = name of binary
3887 
3888 
3889 ###############################################################################
3890 #
3891 # We need a Boot JDK to bootstrap the build.
3892 #
3893 
3894 
3895 
3896 
3897 
3898 # BUILD_JDK: the location of the latest JDK that can run
3899 #   on the host system and supports the target class file version
3900 #   generated in this JDK build.  This variable should only be
3901 #   used after the launchers are built.
3902 #
3903 
3904 # Execute the check given as argument, and verify the result.
3905 # If the JDK was previously found, do nothing.
3906 # $1 A command line (typically autoconf macro) to execute
3907 
3908 
3909 # By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3910 # is different than the host system doing the build (e.g. cross-compilation),
3911 # a special BUILD_JDK is built as part of the build process.  An external
3912 # prebuilt BUILD_JDK can also be supplied.
3913 
3914 
3915 #
3916 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3917 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3918 #
3919 # This code is free software; you can redistribute it and/or modify it
3920 # under the terms of the GNU General Public License version 2 only, as
3921 # published by the Free Software Foundation.  Oracle designates this
3922 # particular file as subject to the "Classpath" exception as provided
3923 # by Oracle in the LICENSE file that accompanied this code.
3924 #
3925 # This code is distributed in the hope that it will be useful, but WITHOUT
3926 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3927 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3928 # version 2 for more details (a copy is included in the LICENSE file that
3929 # accompanied this code).
3930 #
3931 # You should have received a copy of the GNU General Public License version
3932 # 2 along with this work; if not, write to the Free Software Foundation,
3933 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3934 #
3935 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3936 # or visit www.oracle.com if you need additional information or have any
3937 # questions.
3938 #
3939 
3940 
3941 
3942 
3943 
3944 
3945 
3946 
3947 
3948 
3949 
3950 
3951 
3952 
3953 
3954 
3955 
3956 ################################################################################
3957 #
3958 # Runs icecc-create-env once and prints the error if it fails
3959 #
3960 # $1: arguments to icecc-create-env
3961 # $2: log file
3962 #
3963 
3964 
3965 ################################################################################
3966 #
3967 # Optionally enable distributed compilation of native code using icecc/icecream
3968 #
3969 
3970 
3971 
3972 
3973 
3974 
3975 
3976 #
3977 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3978 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3979 #
3980 # This code is free software; you can redistribute it and/or modify it
3981 # under the terms of the GNU General Public License version 2 only, as
3982 # published by the Free Software Foundation.  Oracle designates this
3983 # particular file as subject to the "Classpath" exception as provided
3984 # by Oracle in the LICENSE file that accompanied this code.
3985 #
3986 # This code is distributed in the hope that it will be useful, but WITHOUT
3987 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3988 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3989 # version 2 for more details (a copy is included in the LICENSE file that
3990 # accompanied this code).
3991 #
3992 # You should have received a copy of the GNU General Public License version
3993 # 2 along with this work; if not, write to the Free Software Foundation,
3994 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3995 #
3996 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3997 # or visit www.oracle.com if you need additional information or have any
3998 # questions.
3999 #
4000 
4001 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4002 # corresponding configure arguments instead
4003 
4004 
4005 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4006 # that configure can use them while detecting compilers.
4007 # TOOLCHAIN_TYPE is available here.
4008 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
4009 
4010 
4011 
4012 
4013 
4014 
4015 # Documentation on common flags used for solstudio in HIGHEST.
4016 #
4017 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4018 #          done with care, there are some assumptions below that need to
4019 #          be understood about the use of pointers, and IEEE behavior.
4020 #
4021 # -fns: Use non-standard floating point mode (not IEEE 754)
4022 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4023 # -fsingle: Use single precision floating point with 'float'
4024 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
4025 #   (Source with excessing pointer casting and data access with mixed
4026 #    pointer types are not recommended)
4027 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4028 #   (If you expect perfect errno behavior, do not use this)
4029 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4030 # -xrestrict: Pointer parameters to functions do not overlap
4031 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4032 #    If you pass in multiple pointers to the same data, do not use this)
4033 # -xlibmil: Inline some library routines
4034 #   (If you expect perfect errno behavior, do not use this)
4035 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4036 #   (If you expect perfect errno behavior, do not use this)
4037 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4038 
4039     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4040     # Bug?
4041     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4042     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4043     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4044     #fi
4045 
4046 
4047 
4048 
4049 
4050 
4051 ################################################################################
4052 # $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4053 #      conditionals against.
4054 # $2 - Optional prefix for each variable defined.
4055 
4056 
4057 # FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4058 #                                  IF_FALSE: [RUN-IF-FALSE])
4059 # ------------------------------------------------------------
4060 # Check that the C compiler supports an argument
4061 
4062 
4063 
4064 
4065 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4066 #                                    IF_FALSE: [RUN-IF-FALSE])
4067 # ------------------------------------------------------------
4068 # Check that the C++ compiler supports an argument
4069 
4070 
4071 
4072 
4073 # FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4074 #                                IF_FALSE: [RUN-IF-FALSE])
4075 # ------------------------------------------------------------
4076 # Check that the C and C++ compilers support an argument
4077 
4078 
4079 
4080 
4081 # FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4082 #                                   IF_FALSE: [RUN-IF-FALSE])
4083 # ------------------------------------------------------------
4084 # Check that the linker support an argument
4085 
4086 
4087 
4088 
4089 
4090 
4091 # FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4092 # Arguments:
4093 # $1 - Optional prefix for each variable defined.
4094 
4095 
4096 #
4097 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4098 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4099 #
4100 # This code is free software; you can redistribute it and/or modify it
4101 # under the terms of the GNU General Public License version 2 only, as
4102 # published by the Free Software Foundation.  Oracle designates this
4103 # particular file as subject to the "Classpath" exception as provided
4104 # by Oracle in the LICENSE file that accompanied this code.
4105 #
4106 # This code is distributed in the hope that it will be useful, but WITHOUT
4107 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4108 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4109 # version 2 for more details (a copy is included in the LICENSE file that
4110 # accompanied this code).
4111 #
4112 # You should have received a copy of the GNU General Public License version
4113 # 2 along with this work; if not, write to the Free Software Foundation,
4114 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4115 #
4116 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4117 # or visit www.oracle.com if you need additional information or have any
4118 # questions.
4119 #
4120 
4121 
4122 
4123 
4124 
4125 cygwin_help() {
4126   case $1 in
4127     unzip)
4128       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4129       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4130       ;;
4131     zip)
4132       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4133       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4134       ;;
4135     make)
4136       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4137       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4138       ;;
4139     freetype)
4140       HELP_MSG="
4141 The freetype library can now be build during the configure process.
4142 Download the freetype sources and unpack them into an arbitrary directory:
4143 
4144 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4145 tar -xzf freetype-2.5.3.tar.gz
4146 
4147 Then run configure with '--with-freetype-src=<freetype_src>'. This will
4148 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4149 builds or into '<freetype_src>/lib32' for 32-bit builds.
4150 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4151 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4152 
4153 Alternatively you can unpack the sources like this to use the default directory:
4154 
4155 tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4156       ;;
4157   esac
4158 }
4159 
4160 msys_help() {
4161   PKGHANDLER_COMMAND=""
4162 }
4163 
4164 apt_help() {
4165   case $1 in
4166     reduced)
4167       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4168     devkit)
4169       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4170     openjdk)
4171       PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4172     alsa)
4173       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4174     cups)
4175       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4176     freetype)
4177       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4178     ffi)
4179       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4180     x11)
4181       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4182     ccache)
4183       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4184     dtrace)
4185       PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4186   esac
4187 }
4188 
4189 yum_help() {
4190   case $1 in
4191     devkit)
4192       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4193     openjdk)
4194       PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4195     alsa)
4196       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4197     cups)
4198       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4199     freetype)
4200       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4201     x11)
4202       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4203     ccache)
4204       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4205   esac
4206 }
4207 
4208 port_help() {
4209   PKGHANDLER_COMMAND=""
4210 }
4211 
4212 pkgutil_help() {
4213   PKGHANDLER_COMMAND=""
4214 }
4215 
4216 pkgadd_help() {
4217   PKGHANDLER_COMMAND=""
4218 }
4219 
4220 # This function will check if we're called from the "configure" wrapper while
4221 # printing --help. If so, we will print out additional information that can
4222 # only be extracted within the autoconf script, and then exit. This must be
4223 # called at the very beginning in configure.ac.
4224 
4225 
4226 
4227 
4228 
4229 
4230 #
4231 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4232 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4233 #
4234 # This code is free software; you can redistribute it and/or modify it
4235 # under the terms of the GNU General Public License version 2 only, as
4236 # published by the Free Software Foundation.  Oracle designates this
4237 # particular file as subject to the "Classpath" exception as provided
4238 # by Oracle in the LICENSE file that accompanied this code.
4239 #
4240 # This code is distributed in the hope that it will be useful, but WITHOUT
4241 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4242 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4243 # version 2 for more details (a copy is included in the LICENSE file that
4244 # accompanied this code).
4245 #
4246 # You should have received a copy of the GNU General Public License version
4247 # 2 along with this work; if not, write to the Free Software Foundation,
4248 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4249 #
4250 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4251 # or visit www.oracle.com if you need additional information or have any
4252 # questions.
4253 #
4254 
4255 # All valid JVM features, regardless of platform
4256 VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4257     fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4258 
4259 # All valid JVM variants
4260 VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4261 
4262 ###############################################################################
4263 # Check if the specified JVM variant should be built. To be used in shell if
4264 # constructs, like this:
4265 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
4266 #
4267 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4268 
4269 # Definition kept in one line to allow inlining in if statements.
4270 # Additional [] needed to keep m4 from mangling shell constructs.
4271 
4272 
4273 ###############################################################################
4274 # Check if the specified JVM features are explicitly enabled. To be used in
4275 # shell if constructs, like this:
4276 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4277 #
4278 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4279 
4280 # Definition kept in one line to allow inlining in if statements.
4281 # Additional [] needed to keep m4 from mangling shell constructs.
4282 
4283 
4284 ###############################################################################
4285 # Check which variants of the JVM that we want to build. Available variants are:
4286 #   server: normal interpreter, and a tiered C1/C2 compiler
4287 #   client: normal interpreter, and C1 (no C2 compiler)
4288 #   minimal: reduced form of client with optional features stripped out
4289 #   core: normal interpreter only, no compiler
4290 #   zero: C++ based interpreter only, no compiler
4291 #   zeroshark: C++ based interpreter, and a llvm-based compiler
4292 #   custom: baseline JVM with no default features
4293 #
4294 
4295 
4296 ###############################################################################
4297 # Check if dtrace should be enabled and has all prerequisites present.
4298 #
4299 
4300 
4301 ###############################################################################
4302 # Set up all JVM features for each JVM variant.
4303 #
4304 
4305 
4306 ###############################################################################
4307 # Validate JVM features once all setup is complete, including custom setup.
4308 #
4309 
4310 
4311 ################################################################################
4312 # Check if gtest should be built
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 ###############################################################################
4342 # Check which variant of the JDK that we want to build.
4343 # Currently we have:
4344 #    normal:   standard edition
4345 # but the custom make system may add other variants
4346 #
4347 # Effectively the JDK variant gives a name to a specific set of
4348 # modules to compile into the JDK.
4349 
4350 
4351 ###############################################################################
4352 # Set the debug level
4353 #    release: no debug information, all optimizations, no asserts.
4354 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4355 #    fastdebug: debug information (-g), all optimizations, all asserts
4356 #    slowdebug: debug information (-g), no optimizations, all asserts
4357 
4358 
4359 ###############################################################################
4360 #
4361 # Should we build only OpenJDK even if closed sources are present?
4362 #
4363 
4364 
4365 
4366 
4367 ###############################################################################
4368 #
4369 # Enable or disable the elliptic curve crypto implementation
4370 #
4371 
4372 
4373 
4374 
4375 ################################################################################
4376 #
4377 # Gcov coverage data for hotspot
4378 #
4379 
4380 
4381 ################################################################################
4382 #
4383 # Static build support.  When enabled will generate static
4384 # libraries instead of shared libraries for all JDK libs.
4385 #
4386 
4387 
4388 ################################################################################
4389 #
4390 # jlink options.
4391 # We always keep packaged modules in JDK image.
4392 #
4393 
4394 
4395 ################################################################################
4396 #
4397 # Check if building of the jtreg failure handler should be enabled.
4398 #
4399 
4400 
4401 ################################################################################
4402 #
4403 # Enable or disable generation of the classlist at build time
4404 #
4405 
4406 
4407 #
4408 # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4409 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4410 #
4411 # This code is free software; you can redistribute it and/or modify it
4412 # under the terms of the GNU General Public License version 2 only, as
4413 # published by the Free Software Foundation.  Oracle designates this
4414 # particular file as subject to the "Classpath" exception as provided
4415 # by Oracle in the LICENSE file that accompanied this code.
4416 #
4417 # This code is distributed in the hope that it will be useful, but WITHOUT
4418 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4419 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4420 # version 2 for more details (a copy is included in the LICENSE file that
4421 # accompanied this code).
4422 #
4423 # You should have received a copy of the GNU General Public License version
4424 # 2 along with this work; if not, write to the Free Software Foundation,
4425 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4426 #
4427 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4428 # or visit www.oracle.com if you need additional information or have any
4429 # questions.
4430 #
4431 
4432 ###############################################################################
4433 #
4434 # Setup version numbers
4435 #
4436 
4437 # Verify that a given string represents a valid version number, and assign it
4438 # to a variable.
4439 
4440 # Argument 1: the variable to assign to
4441 # Argument 2: the value given by the user
4442 
4443 
4444 
4445 
4446 #
4447 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4448 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4449 #
4450 # This code is free software; you can redistribute it and/or modify it
4451 # under the terms of the GNU General Public License version 2 only, as
4452 # published by the Free Software Foundation.  Oracle designates this
4453 # particular file as subject to the "Classpath" exception as provided
4454 # by Oracle in the LICENSE file that accompanied this code.
4455 #
4456 # This code is distributed in the hope that it will be useful, but WITHOUT
4457 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4458 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4459 # version 2 for more details (a copy is included in the LICENSE file that
4460 # accompanied this code).
4461 #
4462 # You should have received a copy of the GNU General Public License version
4463 # 2 along with this work; if not, write to the Free Software Foundation,
4464 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4465 #
4466 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4467 # or visit www.oracle.com if you need additional information or have any
4468 # questions.
4469 #
4470 
4471 # Major library component reside in separate files.
4472 #
4473 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4474 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4475 #
4476 # This code is free software; you can redistribute it and/or modify it
4477 # under the terms of the GNU General Public License version 2 only, as
4478 # published by the Free Software Foundation.  Oracle designates this
4479 # particular file as subject to the "Classpath" exception as provided
4480 # by Oracle in the LICENSE file that accompanied this code.
4481 #
4482 # This code is distributed in the hope that it will be useful, but WITHOUT
4483 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4484 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4485 # version 2 for more details (a copy is included in the LICENSE file that
4486 # accompanied this code).
4487 #
4488 # You should have received a copy of the GNU General Public License version
4489 # 2 along with this work; if not, write to the Free Software Foundation,
4490 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4491 #
4492 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4493 # or visit www.oracle.com if you need additional information or have any
4494 # questions.
4495 #
4496 
4497 ################################################################################
4498 # Setup alsa (Advanced Linux Sound Architecture)
4499 ################################################################################
4500 
4501 
4502 #
4503 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4504 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4505 #
4506 # This code is free software; you can redistribute it and/or modify it
4507 # under the terms of the GNU General Public License version 2 only, as
4508 # published by the Free Software Foundation.  Oracle designates this
4509 # particular file as subject to the "Classpath" exception as provided
4510 # by Oracle in the LICENSE file that accompanied this code.
4511 #
4512 # This code is distributed in the hope that it will be useful, but WITHOUT
4513 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4514 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4515 # version 2 for more details (a copy is included in the LICENSE file that
4516 # accompanied this code).
4517 #
4518 # You should have received a copy of the GNU General Public License version
4519 # 2 along with this work; if not, write to the Free Software Foundation,
4520 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4521 #
4522 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4523 # or visit www.oracle.com if you need additional information or have any
4524 # questions.
4525 #
4526 
4527 ################################################################################
4528 # Setup bundled libraries.
4529 #
4530 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4531 # OpenJDK repository. Default is to use these libraries as bundled, but they
4532 # might be replaced by en external version by the user.
4533 ################################################################################
4534 
4535 
4536 ################################################################################
4537 # Setup libjpeg
4538 ################################################################################
4539 
4540 
4541 ################################################################################
4542 # Setup giflib
4543 ################################################################################
4544 
4545 
4546 ################################################################################
4547 # Setup libpng
4548 ################################################################################
4549 
4550 
4551 ################################################################################
4552 # Setup zlib
4553 ################################################################################
4554 
4555 
4556 ################################################################################
4557 # Setup lcms (Little CMS)
4558 ################################################################################
4559 
4560 
4561 #
4562 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4563 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4564 #
4565 # This code is free software; you can redistribute it and/or modify it
4566 # under the terms of the GNU General Public License version 2 only, as
4567 # published by the Free Software Foundation.  Oracle designates this
4568 # particular file as subject to the "Classpath" exception as provided
4569 # by Oracle in the LICENSE file that accompanied this code.
4570 #
4571 # This code is distributed in the hope that it will be useful, but WITHOUT
4572 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4573 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4574 # version 2 for more details (a copy is included in the LICENSE file that
4575 # accompanied this code).
4576 #
4577 # You should have received a copy of the GNU General Public License version
4578 # 2 along with this work; if not, write to the Free Software Foundation,
4579 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4580 #
4581 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4582 # or visit www.oracle.com if you need additional information or have any
4583 # questions.
4584 #
4585 
4586 ################################################################################
4587 # Setup cups (Common Unix Printing System)
4588 ################################################################################
4589 
4590 
4591 #
4592 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4593 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4594 #
4595 # This code is free software; you can redistribute it and/or modify it
4596 # under the terms of the GNU General Public License version 2 only, as
4597 # published by the Free Software Foundation.  Oracle designates this
4598 # particular file as subject to the "Classpath" exception as provided
4599 # by Oracle in the LICENSE file that accompanied this code.
4600 #
4601 # This code is distributed in the hope that it will be useful, but WITHOUT
4602 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4603 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4604 # version 2 for more details (a copy is included in the LICENSE file that
4605 # accompanied this code).
4606 #
4607 # You should have received a copy of the GNU General Public License version
4608 # 2 along with this work; if not, write to the Free Software Foundation,
4609 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4610 #
4611 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4612 # or visit www.oracle.com if you need additional information or have any
4613 # questions.
4614 #
4615 
4616 ################################################################################
4617 # Setup libffi (Foreign Function Interface)
4618 ################################################################################
4619 
4620 
4621 #
4622 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4623 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4624 #
4625 # This code is free software; you can redistribute it and/or modify it
4626 # under the terms of the GNU General Public License version 2 only, as
4627 # published by the Free Software Foundation.  Oracle designates this
4628 # particular file as subject to the "Classpath" exception as provided
4629 # by Oracle in the LICENSE file that accompanied this code.
4630 #
4631 # This code is distributed in the hope that it will be useful, but WITHOUT
4632 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4633 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4634 # version 2 for more details (a copy is included in the LICENSE file that
4635 # accompanied this code).
4636 #
4637 # You should have received a copy of the GNU General Public License version
4638 # 2 along with this work; if not, write to the Free Software Foundation,
4639 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4640 #
4641 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4642 # or visit www.oracle.com if you need additional information or have any
4643 # questions.
4644 #
4645 
4646 ################################################################################
4647 # Build the freetype lib from source
4648 ################################################################################
4649 
4650 
4651 ################################################################################
4652 # Check if a potential freeype library match is correct and usable
4653 ################################################################################
4654 
4655 
4656 ################################################################################
4657 # Setup freetype (The FreeType2 font rendering library)
4658 ################################################################################
4659 
4660 
4661 #
4662 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4663 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4664 #
4665 # This code is free software; you can redistribute it and/or modify it
4666 # under the terms of the GNU General Public License version 2 only, as
4667 # published by the Free Software Foundation.  Oracle designates this
4668 # particular file as subject to the "Classpath" exception as provided
4669 # by Oracle in the LICENSE file that accompanied this code.
4670 #
4671 # This code is distributed in the hope that it will be useful, but WITHOUT
4672 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4673 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4674 # version 2 for more details (a copy is included in the LICENSE file that
4675 # accompanied this code).
4676 #
4677 # You should have received a copy of the GNU General Public License version
4678 # 2 along with this work; if not, write to the Free Software Foundation,
4679 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4680 #
4681 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4682 # or visit www.oracle.com if you need additional information or have any
4683 # questions.
4684 #
4685 
4686 ################################################################################
4687 # Setup the standard C/C++ runtime libraries.
4688 #
4689 # Most importantly, determine if stdc++ should be linked statically or
4690 # dynamically.
4691 ################################################################################
4692 
4693 
4694 #
4695 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4696 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4697 #
4698 # This code is free software; you can redistribute it and/or modify it
4699 # under the terms of the GNU General Public License version 2 only, as
4700 # published by the Free Software Foundation.  Oracle designates this
4701 # particular file as subject to the "Classpath" exception as provided
4702 # by Oracle in the LICENSE file that accompanied this code.
4703 #
4704 # This code is distributed in the hope that it will be useful, but WITHOUT
4705 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4706 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4707 # version 2 for more details (a copy is included in the LICENSE file that
4708 # accompanied this code).
4709 #
4710 # You should have received a copy of the GNU General Public License version
4711 # 2 along with this work; if not, write to the Free Software Foundation,
4712 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4713 #
4714 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4715 # or visit www.oracle.com if you need additional information or have any
4716 # questions.
4717 #
4718 
4719 ################################################################################
4720 # Setup X11 Windows system
4721 ################################################################################
4722 
4723 
4724 
4725 ################################################################################
4726 # Determine which libraries are needed for this configuration
4727 ################################################################################
4728 
4729 
4730 ################################################################################
4731 # Parse library options, and setup needed libraries
4732 ################################################################################
4733 
4734 
4735 ################################################################################
4736 # Setup llvm (Low-Level VM)
4737 ################################################################################
4738 
4739 
4740 ################################################################################
4741 # Setup various libraries, typically small system libraries
4742 ################################################################################
4743 
4744 
4745 ################################################################################
4746 # libstlport.so.1 is needed for running gtest on Solaris. Find it to
4747 # redistribute it in the test image.
4748 ################################################################################
4749 
4750 
4751 
4752 #
4753 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4754 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4755 #
4756 # This code is free software; you can redistribute it and/or modify it
4757 # under the terms of the GNU General Public License version 2 only, as
4758 # published by the Free Software Foundation.  Oracle designates this
4759 # particular file as subject to the "Classpath" exception as provided
4760 # by Oracle in the LICENSE file that accompanied this code.
4761 #
4762 # This code is distributed in the hope that it will be useful, but WITHOUT
4763 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4764 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4765 # version 2 for more details (a copy is included in the LICENSE file that
4766 # accompanied this code).
4767 #
4768 # You should have received a copy of the GNU General Public License version
4769 # 2 along with this work; if not, write to the Free Software Foundation,
4770 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4771 #
4772 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4773 # or visit www.oracle.com if you need additional information or have any
4774 # questions.
4775 #
4776 
4777 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4778 # Converts autoconf style CPU name to OpenJDK style, into
4779 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4780 
4781 
4782 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4783 # Converts autoconf style OS name to OpenJDK style, into
4784 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4785 
4786 
4787 # Expects $host_os $host_cpu $build_os and $build_cpu
4788 # and $with_target_bits to have been setup!
4789 #
4790 # Translate the standard triplet(quadruplet) definition
4791 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4792 # OPENJDK_BUILD_OS, etc.
4793 
4794 
4795 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4796 # accordingly. Must be done after setting up build and target system, but before
4797 # doing anything else with these values.
4798 
4799 
4800 # Setup the legacy variables, for controlling the old makefiles.
4801 #
4802 
4803 
4804 # $1 - Either TARGET or BUILD to setup the variables for.
4805 
4806 
4807 
4808 
4809 #%%% Build and target systems %%%
4810 
4811 
4812 
4813 
4814 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4815 # Add -mX to various FLAGS variables.
4816 
4817 
4818 
4819 
4820 
4821 
4822 #
4823 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4824 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4825 #
4826 # This code is free software; you can redistribute it and/or modify it
4827 # under the terms of the GNU General Public License version 2 only, as
4828 # published by the Free Software Foundation.  Oracle designates this
4829 # particular file as subject to the "Classpath" exception as provided
4830 # by Oracle in the LICENSE file that accompanied this code.
4831 #
4832 # This code is distributed in the hope that it will be useful, but WITHOUT
4833 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4834 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4835 # version 2 for more details (a copy is included in the LICENSE file that
4836 # accompanied this code).
4837 #
4838 # You should have received a copy of the GNU General Public License version
4839 # 2 along with this work; if not, write to the Free Software Foundation,
4840 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4841 #
4842 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4843 # or visit www.oracle.com if you need additional information or have any
4844 # questions.
4845 #
4846 
4847 
4848 
4849 
4850 
4851 
4852 
4853 ################################################################################
4854 # Define a mechanism for importing extra prebuilt modules
4855 #
4856 
4857 
4858 
4859 #
4860 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4861 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4862 #
4863 # This code is free software; you can redistribute it and/or modify it
4864 # under the terms of the GNU General Public License version 2 only, as
4865 # published by the Free Software Foundation.  Oracle designates this
4866 # particular file as subject to the "Classpath" exception as provided
4867 # by Oracle in the LICENSE file that accompanied this code.
4868 #
4869 # This code is distributed in the hope that it will be useful, but WITHOUT
4870 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4871 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4872 # version 2 for more details (a copy is included in the LICENSE file that
4873 # accompanied this code).
4874 #
4875 # You should have received a copy of the GNU General Public License version
4876 # 2 along with this work; if not, write to the Free Software Foundation,
4877 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4878 #
4879 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4880 # or visit www.oracle.com if you need additional information or have any
4881 # questions.
4882 #
4883 
4884 ########################################################################
4885 # This file is responsible for detecting, verifying and setting up the
4886 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4887 # proper paths to the binaries, but it will not setup any flags.
4888 #
4889 # The binaries used is determined by the toolchain type, which is the family of
4890 # compilers and related tools that are used.
4891 ########################################################################
4892 
4893 
4894 # All valid toolchains, regardless of platform (used by help.m4)
4895 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4896 
4897 # These toolchains are valid on different platforms
4898 VALID_TOOLCHAINS_linux="gcc clang"
4899 VALID_TOOLCHAINS_solaris="solstudio"
4900 VALID_TOOLCHAINS_macosx="gcc clang"
4901 VALID_TOOLCHAINS_aix="xlc"
4902 VALID_TOOLCHAINS_windows="microsoft"
4903 
4904 # Toolchain descriptions
4905 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4906 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4907 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4908 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4909 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4910 
4911 # Minimum supported versions, empty means unspecified
4912 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4913 TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4914 TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4915 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4916 TOOLCHAIN_MINIMUM_VERSION_xlc=""
4917 
4918 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4919 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4920 # $1 - optional variable prefix for compiler and version variables (BUILD_)
4921 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4922 
4923 
4924 # Check if the configured compiler (C and C++) is of a specific version or
4925 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4926 #
4927 # Arguments:
4928 #   VERSION:   The version string to check against the found version
4929 #   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4930 #   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4931 #   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4932 
4933 
4934 
4935 
4936 # Setup a number of variables describing how native output files are
4937 # named on this platform/toolchain.
4938 
4939 
4940 # Determine which toolchain type to use, and make sure it is valid for this
4941 # platform. Setup various information about the selected toolchain.
4942 
4943 
4944 # Before we start detecting the toolchain executables, we might need some
4945 # special setup, e.g. additional paths etc.
4946 
4947 
4948 # Restore path, etc
4949 
4950 
4951 # Check if a compiler is of the toolchain type we expect, and save the version
4952 # information from it. If the compiler does not match the expected type,
4953 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4954 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4955 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4956 #
4957 # $1 = compiler to test (CC or CXX)
4958 # $2 = human readable name of compiler (C or C++)
4959 
4960 
4961 # Try to locate the given C or C++ compiler in the path, or otherwise.
4962 #
4963 # $1 = compiler to test (CC or CXX)
4964 # $2 = human readable name of compiler (C or C++)
4965 # $3 = list of compiler names to search for
4966 
4967 
4968 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4969 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4970 # archiver (AR). Verify that the compilers are correct according to the
4971 # toolchain type.
4972 
4973 
4974 # Setup additional tools that is considered a part of the toolchain, but not the
4975 # core part. Many of these are highly platform-specific and do not exist,
4976 # and/or are not needed on all platforms.
4977 
4978 
4979 # Setup the build tools (i.e, the compiler and linker used to build programs
4980 # that should be run on the build platform, not the target platform, as a build
4981 # helper). Since the non-cross-compile case uses the normal, target compilers
4982 # for this, we can only do this after these have been setup.
4983 
4984 
4985 # Setup legacy variables that are still needed as alternative ways to refer to
4986 # parts of the toolchain.
4987 
4988 
4989 # Do some additional checks on the detected tools.
4990 
4991 
4992 # Setup the JTReg Regression Test Harness.
4993 
4994 
4995 #
4996 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4997 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4998 #
4999 # This code is free software; you can redistribute it and/or modify it
5000 # under the terms of the GNU General Public License version 2 only, as
5001 # published by the Free Software Foundation.  Oracle designates this
5002 # particular file as subject to the "Classpath" exception as provided
5003 # by Oracle in the LICENSE file that accompanied this code.
5004 #
5005 # This code is distributed in the hope that it will be useful, but WITHOUT
5006 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5007 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5008 # version 2 for more details (a copy is included in the LICENSE file that
5009 # accompanied this code).
5010 #
5011 # You should have received a copy of the GNU General Public License version
5012 # 2 along with this work; if not, write to the Free Software Foundation,
5013 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5014 #
5015 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5016 # or visit www.oracle.com if you need additional information or have any
5017 # questions.
5018 #
5019 
5020 ################################################################################
5021 # The order of these defines the priority by which we try to find them.
5022 VALID_VS_VERSIONS="2013 2012 2010"
5023 
5024 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5025 VS_VERSION_INTERNAL_2010=100
5026 VS_MSVCR_2010=msvcr100.dll
5027 # We don't use msvcp on Visual Studio 2010
5028 #VS_MSVCP_2010=msvcp100.dll
5029 VS_ENVVAR_2010="VS100COMNTOOLS"
5030 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5031 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5032 VS_VS_PLATFORM_NAME_2010="v100"
5033 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5034 
5035 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5036 VS_VERSION_INTERNAL_2012=110
5037 VS_MSVCR_2012=msvcr110.dll
5038 VS_MSVCP_2012=msvcp110.dll
5039 VS_ENVVAR_2012="VS110COMNTOOLS"
5040 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5041 VS_SDK_INSTALLDIR_2012=
5042 VS_VS_PLATFORM_NAME_2012="v110"
5043 VS_SDK_PLATFORM_NAME_2012=
5044 
5045 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5046 VS_VERSION_INTERNAL_2013=120
5047 VS_MSVCR_2013=msvcr120.dll
5048 VS_MSVCP_2013=msvcp120.dll
5049 VS_ENVVAR_2013="VS120COMNTOOLS"
5050 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5051 VS_SDK_INSTALLDIR_2013=
5052 VS_VS_PLATFORM_NAME_2013="v120"
5053 VS_SDK_PLATFORM_NAME_2013=
5054 
5055 ################################################################################
5056 
5057 
5058 
5059 ################################################################################
5060 
5061 
5062 
5063 ################################################################################
5064 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5065 # build environment and assigns it to VS_ENV_CMD
5066 
5067 
5068 ################################################################################
5069 
5070 
5071 
5072 ################################################################################
5073 # Check if the VS env variables were setup prior to running configure.
5074 # If not, then find vcvarsall.bat and run it automatically, and integrate
5075 # the set env variables into the spec file.
5076 
5077 
5078 
5079 
5080 
5081 
5082 
5083 
5084 
5085 
5086 
5087 
5088 
5089 
5090 # This line needs to be here, verbatim, after all includes and the dummy hook
5091 # definitions. It is replaced with custom functionality when building
5092 # custom sources.
5093 #CUSTOM_AUTOCONF_INCLUDE
5094 
5095 # Do not change or remove the following line, it is needed for consistency checks:
5096 DATE_WHEN_GENERATED=1476374246
5097 
5098 ###############################################################################
5099 #
5100 # Initialization / Boot-strapping
5101 #
5102 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5103 # thus it jumps back and forth, each time gaining something needed later on.
5104 #
5105 ###############################################################################
5106 
5107 # If we are requested to print additional help, do that and then exit.
5108 # This must be the very first call.
5109 
5110   if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5111 
5112     # Print available toolchains
5113     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5114     $PRINTF "Which are valid to use depends on the build platform.\n"
5115     for toolchain in $VALID_TOOLCHAINS_all; do
5116       # Use indirect variable referencing
5117       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5118       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5119       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5120     done
5121     $PRINTF "\n"
5122 
5123     # Print available jvm features
5124     $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5125     $PRINTF "Which are valid to use depends on the target platform.\n  "
5126     $PRINTF "%s " $VALID_JVM_FEATURES
5127     $PRINTF "\n"
5128 
5129     # And now exit directly
5130     exit 0
5131   fi
5132 
5133 
5134 # Basic initialization that must happen first of all in the normal process.
5135 
5136   # Save the original command line. This is passed to us by the wrapper configure script.
5137 
5138   # Save the path variable before it gets changed
5139   ORIGINAL_PATH="$PATH"
5140 
5141   DATE_WHEN_CONFIGURED=`LANG=C date`
5142 
5143   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5144 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5145   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5146 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5147 
5148 
5149   # Start with tools that do not need have cross compilation support
5150   # and can be expected to be found in the default PATH. These tools are
5151   # used by configure.
5152 
5153   # First are all the simple required tools.
5154 
5155 
5156 
5157   # Publish this variable in the help.
5158 
5159 
5160   if [ -z "${BASENAME+x}" ]; then
5161     # The variable is not set by user, try to locate tool using the code snippet
5162     for ac_prog in basename
5163 do
5164   # Extract the first word of "$ac_prog", so it can be a program name with args.
5165 set dummy $ac_prog; ac_word=$2
5166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5167 $as_echo_n "checking for $ac_word... " >&6; }
5168 if ${ac_cv_path_BASENAME+:} false; then :
5169   $as_echo_n "(cached) " >&6
5170 else
5171   case $BASENAME in
5172   [\\/]* | ?:[\\/]*)
5173   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5174   ;;
5175   *)
5176   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5177 for as_dir in $PATH
5178 do
5179   IFS=$as_save_IFS
5180   test -z "$as_dir" && as_dir=.
5181     for ac_exec_ext in '' $ac_executable_extensions; do
5182   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5183     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5184     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5185     break 2
5186   fi
5187 done
5188   done
5189 IFS=$as_save_IFS
5190 
5191   ;;
5192 esac
5193 fi
5194 BASENAME=$ac_cv_path_BASENAME
5195 if test -n "$BASENAME"; then
5196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5197 $as_echo "$BASENAME" >&6; }
5198 else
5199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5200 $as_echo "no" >&6; }
5201 fi
5202 
5203 
5204   test -n "$BASENAME" && break
5205 done
5206 
5207   else
5208     # The variable is set, but is it from the command line or the environment?
5209 
5210     # Try to remove the string !BASENAME! from our list.
5211     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5212     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5213       # If it failed, the variable was not from the command line. Ignore it,
5214       # but warn the user (except for BASH, which is always set by the calling BASH).
5215       if test "xBASENAME" != xBASH; then
5216         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5217 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5218       fi
5219       # Try to locate tool using the code snippet
5220       for ac_prog in basename
5221 do
5222   # Extract the first word of "$ac_prog", so it can be a program name with args.
5223 set dummy $ac_prog; ac_word=$2
5224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5225 $as_echo_n "checking for $ac_word... " >&6; }
5226 if ${ac_cv_path_BASENAME+:} false; then :
5227   $as_echo_n "(cached) " >&6
5228 else
5229   case $BASENAME in
5230   [\\/]* | ?:[\\/]*)
5231   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5232   ;;
5233   *)
5234   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5235 for as_dir in $PATH
5236 do
5237   IFS=$as_save_IFS
5238   test -z "$as_dir" && as_dir=.
5239     for ac_exec_ext in '' $ac_executable_extensions; do
5240   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5241     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5242     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5243     break 2
5244   fi
5245 done
5246   done
5247 IFS=$as_save_IFS
5248 
5249   ;;
5250 esac
5251 fi
5252 BASENAME=$ac_cv_path_BASENAME
5253 if test -n "$BASENAME"; then
5254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5255 $as_echo "$BASENAME" >&6; }
5256 else
5257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5258 $as_echo "no" >&6; }
5259 fi
5260 
5261 
5262   test -n "$BASENAME" && break
5263 done
5264 
5265     else
5266       # If it succeeded, then it was overridden by the user. We will use it
5267       # for the tool.
5268 
5269       # First remove it from the list of overridden variables, so we can test
5270       # for unknown variables in the end.
5271       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5272 
5273       # Check if we try to supply an empty value
5274       if test "x$BASENAME" = x; then
5275         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5276 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5277         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5278 $as_echo_n "checking for BASENAME... " >&6; }
5279         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5280 $as_echo "disabled" >&6; }
5281       else
5282         # Check if the provided tool contains a complete path.
5283         tool_specified="$BASENAME"
5284         tool_basename="${tool_specified##*/}"
5285         if test "x$tool_basename" = "x$tool_specified"; then
5286           # A command without a complete path is provided, search $PATH.
5287           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5288 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5289           # Extract the first word of "$tool_basename", so it can be a program name with args.
5290 set dummy $tool_basename; ac_word=$2
5291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5292 $as_echo_n "checking for $ac_word... " >&6; }
5293 if ${ac_cv_path_BASENAME+:} false; then :
5294   $as_echo_n "(cached) " >&6
5295 else
5296   case $BASENAME in
5297   [\\/]* | ?:[\\/]*)
5298   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5299   ;;
5300   *)
5301   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5302 for as_dir in $PATH
5303 do
5304   IFS=$as_save_IFS
5305   test -z "$as_dir" && as_dir=.
5306     for ac_exec_ext in '' $ac_executable_extensions; do
5307   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5308     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5309     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5310     break 2
5311   fi
5312 done
5313   done
5314 IFS=$as_save_IFS
5315 
5316   ;;
5317 esac
5318 fi
5319 BASENAME=$ac_cv_path_BASENAME
5320 if test -n "$BASENAME"; then
5321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5322 $as_echo "$BASENAME" >&6; }
5323 else
5324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5325 $as_echo "no" >&6; }
5326 fi
5327 
5328 
5329           if test "x$BASENAME" = x; then
5330             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5331           fi
5332         else
5333           # Otherwise we believe it is a complete path. Use it as it is.
5334           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5335 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5336           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5337 $as_echo_n "checking for BASENAME... " >&6; }
5338           if test ! -x "$tool_specified"; then
5339             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5340 $as_echo "not found" >&6; }
5341             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5342           fi
5343           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5344 $as_echo "$tool_specified" >&6; }
5345         fi
5346       fi
5347     fi
5348 
5349   fi
5350 
5351 
5352 
5353   if test "x$BASENAME" = x; then
5354     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5355   fi
5356 
5357 
5358 
5359 
5360 
5361   # Publish this variable in the help.
5362 
5363 
5364   if [ -z "${BASH+x}" ]; then
5365     # The variable is not set by user, try to locate tool using the code snippet
5366     for ac_prog in bash
5367 do
5368   # Extract the first word of "$ac_prog", so it can be a program name with args.
5369 set dummy $ac_prog; ac_word=$2
5370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5371 $as_echo_n "checking for $ac_word... " >&6; }
5372 if ${ac_cv_path_BASH+:} false; then :
5373   $as_echo_n "(cached) " >&6
5374 else
5375   case $BASH in
5376   [\\/]* | ?:[\\/]*)
5377   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5378   ;;
5379   *)
5380   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5381 for as_dir in $PATH
5382 do
5383   IFS=$as_save_IFS
5384   test -z "$as_dir" && as_dir=.
5385     for ac_exec_ext in '' $ac_executable_extensions; do
5386   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5387     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5388     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5389     break 2
5390   fi
5391 done
5392   done
5393 IFS=$as_save_IFS
5394 
5395   ;;
5396 esac
5397 fi
5398 BASH=$ac_cv_path_BASH
5399 if test -n "$BASH"; then
5400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5401 $as_echo "$BASH" >&6; }
5402 else
5403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5404 $as_echo "no" >&6; }
5405 fi
5406 
5407 
5408   test -n "$BASH" && break
5409 done
5410 
5411   else
5412     # The variable is set, but is it from the command line or the environment?
5413 
5414     # Try to remove the string !BASH! from our list.
5415     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5416     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5417       # If it failed, the variable was not from the command line. Ignore it,
5418       # but warn the user (except for BASH, which is always set by the calling BASH).
5419       if test "xBASH" != xBASH; then
5420         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5421 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5422       fi
5423       # Try to locate tool using the code snippet
5424       for ac_prog in bash
5425 do
5426   # Extract the first word of "$ac_prog", so it can be a program name with args.
5427 set dummy $ac_prog; ac_word=$2
5428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5429 $as_echo_n "checking for $ac_word... " >&6; }
5430 if ${ac_cv_path_BASH+:} false; then :
5431   $as_echo_n "(cached) " >&6
5432 else
5433   case $BASH in
5434   [\\/]* | ?:[\\/]*)
5435   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5436   ;;
5437   *)
5438   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5439 for as_dir in $PATH
5440 do
5441   IFS=$as_save_IFS
5442   test -z "$as_dir" && as_dir=.
5443     for ac_exec_ext in '' $ac_executable_extensions; do
5444   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5445     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5446     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5447     break 2
5448   fi
5449 done
5450   done
5451 IFS=$as_save_IFS
5452 
5453   ;;
5454 esac
5455 fi
5456 BASH=$ac_cv_path_BASH
5457 if test -n "$BASH"; then
5458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5459 $as_echo "$BASH" >&6; }
5460 else
5461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5462 $as_echo "no" >&6; }
5463 fi
5464 
5465 
5466   test -n "$BASH" && break
5467 done
5468 
5469     else
5470       # If it succeeded, then it was overridden by the user. We will use it
5471       # for the tool.
5472 
5473       # First remove it from the list of overridden variables, so we can test
5474       # for unknown variables in the end.
5475       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5476 
5477       # Check if we try to supply an empty value
5478       if test "x$BASH" = x; then
5479         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5480 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5481         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5482 $as_echo_n "checking for BASH... " >&6; }
5483         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5484 $as_echo "disabled" >&6; }
5485       else
5486         # Check if the provided tool contains a complete path.
5487         tool_specified="$BASH"
5488         tool_basename="${tool_specified##*/}"
5489         if test "x$tool_basename" = "x$tool_specified"; then
5490           # A command without a complete path is provided, search $PATH.
5491           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5492 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5493           # Extract the first word of "$tool_basename", so it can be a program name with args.
5494 set dummy $tool_basename; ac_word=$2
5495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5496 $as_echo_n "checking for $ac_word... " >&6; }
5497 if ${ac_cv_path_BASH+:} false; then :
5498   $as_echo_n "(cached) " >&6
5499 else
5500   case $BASH in
5501   [\\/]* | ?:[\\/]*)
5502   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5503   ;;
5504   *)
5505   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5506 for as_dir in $PATH
5507 do
5508   IFS=$as_save_IFS
5509   test -z "$as_dir" && as_dir=.
5510     for ac_exec_ext in '' $ac_executable_extensions; do
5511   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5512     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5513     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5514     break 2
5515   fi
5516 done
5517   done
5518 IFS=$as_save_IFS
5519 
5520   ;;
5521 esac
5522 fi
5523 BASH=$ac_cv_path_BASH
5524 if test -n "$BASH"; then
5525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5526 $as_echo "$BASH" >&6; }
5527 else
5528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5529 $as_echo "no" >&6; }
5530 fi
5531 
5532 
5533           if test "x$BASH" = x; then
5534             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5535           fi
5536         else
5537           # Otherwise we believe it is a complete path. Use it as it is.
5538           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5539 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5540           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5541 $as_echo_n "checking for BASH... " >&6; }
5542           if test ! -x "$tool_specified"; then
5543             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5544 $as_echo "not found" >&6; }
5545             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5546           fi
5547           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5548 $as_echo "$tool_specified" >&6; }
5549         fi
5550       fi
5551     fi
5552 
5553   fi
5554 
5555 
5556 
5557   if test "x$BASH" = x; then
5558     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5559   fi
5560 
5561 
5562 
5563 
5564 
5565   # Publish this variable in the help.
5566 
5567 
5568   if [ -z "${CAT+x}" ]; then
5569     # The variable is not set by user, try to locate tool using the code snippet
5570     for ac_prog in cat
5571 do
5572   # Extract the first word of "$ac_prog", so it can be a program name with args.
5573 set dummy $ac_prog; ac_word=$2
5574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5575 $as_echo_n "checking for $ac_word... " >&6; }
5576 if ${ac_cv_path_CAT+:} false; then :
5577   $as_echo_n "(cached) " >&6
5578 else
5579   case $CAT in
5580   [\\/]* | ?:[\\/]*)
5581   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5582   ;;
5583   *)
5584   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5585 for as_dir in $PATH
5586 do
5587   IFS=$as_save_IFS
5588   test -z "$as_dir" && as_dir=.
5589     for ac_exec_ext in '' $ac_executable_extensions; do
5590   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5591     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5592     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5593     break 2
5594   fi
5595 done
5596   done
5597 IFS=$as_save_IFS
5598 
5599   ;;
5600 esac
5601 fi
5602 CAT=$ac_cv_path_CAT
5603 if test -n "$CAT"; then
5604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5605 $as_echo "$CAT" >&6; }
5606 else
5607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5608 $as_echo "no" >&6; }
5609 fi
5610 
5611 
5612   test -n "$CAT" && break
5613 done
5614 
5615   else
5616     # The variable is set, but is it from the command line or the environment?
5617 
5618     # Try to remove the string !CAT! from our list.
5619     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5620     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5621       # If it failed, the variable was not from the command line. Ignore it,
5622       # but warn the user (except for BASH, which is always set by the calling BASH).
5623       if test "xCAT" != xBASH; then
5624         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5625 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5626       fi
5627       # Try to locate tool using the code snippet
5628       for ac_prog in cat
5629 do
5630   # Extract the first word of "$ac_prog", so it can be a program name with args.
5631 set dummy $ac_prog; ac_word=$2
5632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5633 $as_echo_n "checking for $ac_word... " >&6; }
5634 if ${ac_cv_path_CAT+:} false; then :
5635   $as_echo_n "(cached) " >&6
5636 else
5637   case $CAT in
5638   [\\/]* | ?:[\\/]*)
5639   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5640   ;;
5641   *)
5642   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5643 for as_dir in $PATH
5644 do
5645   IFS=$as_save_IFS
5646   test -z "$as_dir" && as_dir=.
5647     for ac_exec_ext in '' $ac_executable_extensions; do
5648   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5649     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5650     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5651     break 2
5652   fi
5653 done
5654   done
5655 IFS=$as_save_IFS
5656 
5657   ;;
5658 esac
5659 fi
5660 CAT=$ac_cv_path_CAT
5661 if test -n "$CAT"; then
5662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5663 $as_echo "$CAT" >&6; }
5664 else
5665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5666 $as_echo "no" >&6; }
5667 fi
5668 
5669 
5670   test -n "$CAT" && break
5671 done
5672 
5673     else
5674       # If it succeeded, then it was overridden by the user. We will use it
5675       # for the tool.
5676 
5677       # First remove it from the list of overridden variables, so we can test
5678       # for unknown variables in the end.
5679       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5680 
5681       # Check if we try to supply an empty value
5682       if test "x$CAT" = x; then
5683         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5684 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5685         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5686 $as_echo_n "checking for CAT... " >&6; }
5687         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5688 $as_echo "disabled" >&6; }
5689       else
5690         # Check if the provided tool contains a complete path.
5691         tool_specified="$CAT"
5692         tool_basename="${tool_specified##*/}"
5693         if test "x$tool_basename" = "x$tool_specified"; then
5694           # A command without a complete path is provided, search $PATH.
5695           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5696 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5697           # Extract the first word of "$tool_basename", so it can be a program name with args.
5698 set dummy $tool_basename; ac_word=$2
5699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5700 $as_echo_n "checking for $ac_word... " >&6; }
5701 if ${ac_cv_path_CAT+:} false; then :
5702   $as_echo_n "(cached) " >&6
5703 else
5704   case $CAT in
5705   [\\/]* | ?:[\\/]*)
5706   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5707   ;;
5708   *)
5709   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5710 for as_dir in $PATH
5711 do
5712   IFS=$as_save_IFS
5713   test -z "$as_dir" && as_dir=.
5714     for ac_exec_ext in '' $ac_executable_extensions; do
5715   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5716     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5717     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5718     break 2
5719   fi
5720 done
5721   done
5722 IFS=$as_save_IFS
5723 
5724   ;;
5725 esac
5726 fi
5727 CAT=$ac_cv_path_CAT
5728 if test -n "$CAT"; then
5729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5730 $as_echo "$CAT" >&6; }
5731 else
5732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5733 $as_echo "no" >&6; }
5734 fi
5735 
5736 
5737           if test "x$CAT" = x; then
5738             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5739           fi
5740         else
5741           # Otherwise we believe it is a complete path. Use it as it is.
5742           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5743 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5744           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5745 $as_echo_n "checking for CAT... " >&6; }
5746           if test ! -x "$tool_specified"; then
5747             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5748 $as_echo "not found" >&6; }
5749             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5750           fi
5751           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5752 $as_echo "$tool_specified" >&6; }
5753         fi
5754       fi
5755     fi
5756 
5757   fi
5758 
5759 
5760 
5761   if test "x$CAT" = x; then
5762     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5763   fi
5764 
5765 
5766 
5767 
5768 
5769   # Publish this variable in the help.
5770 
5771 
5772   if [ -z "${CHMOD+x}" ]; then
5773     # The variable is not set by user, try to locate tool using the code snippet
5774     for ac_prog in chmod
5775 do
5776   # Extract the first word of "$ac_prog", so it can be a program name with args.
5777 set dummy $ac_prog; ac_word=$2
5778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5779 $as_echo_n "checking for $ac_word... " >&6; }
5780 if ${ac_cv_path_CHMOD+:} false; then :
5781   $as_echo_n "(cached) " >&6
5782 else
5783   case $CHMOD in
5784   [\\/]* | ?:[\\/]*)
5785   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5786   ;;
5787   *)
5788   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5789 for as_dir in $PATH
5790 do
5791   IFS=$as_save_IFS
5792   test -z "$as_dir" && as_dir=.
5793     for ac_exec_ext in '' $ac_executable_extensions; do
5794   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5795     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5796     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5797     break 2
5798   fi
5799 done
5800   done
5801 IFS=$as_save_IFS
5802 
5803   ;;
5804 esac
5805 fi
5806 CHMOD=$ac_cv_path_CHMOD
5807 if test -n "$CHMOD"; then
5808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5809 $as_echo "$CHMOD" >&6; }
5810 else
5811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5812 $as_echo "no" >&6; }
5813 fi
5814 
5815 
5816   test -n "$CHMOD" && break
5817 done
5818 
5819   else
5820     # The variable is set, but is it from the command line or the environment?
5821 
5822     # Try to remove the string !CHMOD! from our list.
5823     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5824     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5825       # If it failed, the variable was not from the command line. Ignore it,
5826       # but warn the user (except for BASH, which is always set by the calling BASH).
5827       if test "xCHMOD" != xBASH; then
5828         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5829 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5830       fi
5831       # Try to locate tool using the code snippet
5832       for ac_prog in chmod
5833 do
5834   # Extract the first word of "$ac_prog", so it can be a program name with args.
5835 set dummy $ac_prog; ac_word=$2
5836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5837 $as_echo_n "checking for $ac_word... " >&6; }
5838 if ${ac_cv_path_CHMOD+:} false; then :
5839   $as_echo_n "(cached) " >&6
5840 else
5841   case $CHMOD in
5842   [\\/]* | ?:[\\/]*)
5843   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5844   ;;
5845   *)
5846   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5847 for as_dir in $PATH
5848 do
5849   IFS=$as_save_IFS
5850   test -z "$as_dir" && as_dir=.
5851     for ac_exec_ext in '' $ac_executable_extensions; do
5852   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5853     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5855     break 2
5856   fi
5857 done
5858   done
5859 IFS=$as_save_IFS
5860 
5861   ;;
5862 esac
5863 fi
5864 CHMOD=$ac_cv_path_CHMOD
5865 if test -n "$CHMOD"; then
5866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5867 $as_echo "$CHMOD" >&6; }
5868 else
5869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5870 $as_echo "no" >&6; }
5871 fi
5872 
5873 
5874   test -n "$CHMOD" && break
5875 done
5876 
5877     else
5878       # If it succeeded, then it was overridden by the user. We will use it
5879       # for the tool.
5880 
5881       # First remove it from the list of overridden variables, so we can test
5882       # for unknown variables in the end.
5883       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5884 
5885       # Check if we try to supply an empty value
5886       if test "x$CHMOD" = x; then
5887         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5888 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5889         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5890 $as_echo_n "checking for CHMOD... " >&6; }
5891         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5892 $as_echo "disabled" >&6; }
5893       else
5894         # Check if the provided tool contains a complete path.
5895         tool_specified="$CHMOD"
5896         tool_basename="${tool_specified##*/}"
5897         if test "x$tool_basename" = "x$tool_specified"; then
5898           # A command without a complete path is provided, search $PATH.
5899           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5900 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5901           # Extract the first word of "$tool_basename", so it can be a program name with args.
5902 set dummy $tool_basename; ac_word=$2
5903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5904 $as_echo_n "checking for $ac_word... " >&6; }
5905 if ${ac_cv_path_CHMOD+:} false; then :
5906   $as_echo_n "(cached) " >&6
5907 else
5908   case $CHMOD in
5909   [\\/]* | ?:[\\/]*)
5910   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5911   ;;
5912   *)
5913   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5914 for as_dir in $PATH
5915 do
5916   IFS=$as_save_IFS
5917   test -z "$as_dir" && as_dir=.
5918     for ac_exec_ext in '' $ac_executable_extensions; do
5919   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5920     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5921     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5922     break 2
5923   fi
5924 done
5925   done
5926 IFS=$as_save_IFS
5927 
5928   ;;
5929 esac
5930 fi
5931 CHMOD=$ac_cv_path_CHMOD
5932 if test -n "$CHMOD"; then
5933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5934 $as_echo "$CHMOD" >&6; }
5935 else
5936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5937 $as_echo "no" >&6; }
5938 fi
5939 
5940 
5941           if test "x$CHMOD" = x; then
5942             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5943           fi
5944         else
5945           # Otherwise we believe it is a complete path. Use it as it is.
5946           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5947 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5948           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5949 $as_echo_n "checking for CHMOD... " >&6; }
5950           if test ! -x "$tool_specified"; then
5951             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5952 $as_echo "not found" >&6; }
5953             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5954           fi
5955           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5956 $as_echo "$tool_specified" >&6; }
5957         fi
5958       fi
5959     fi
5960 
5961   fi
5962 
5963 
5964 
5965   if test "x$CHMOD" = x; then
5966     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5967   fi
5968 
5969 
5970 
5971 
5972 
5973   # Publish this variable in the help.
5974 
5975 
5976   if [ -z "${CMP+x}" ]; then
5977     # The variable is not set by user, try to locate tool using the code snippet
5978     for ac_prog in cmp
5979 do
5980   # Extract the first word of "$ac_prog", so it can be a program name with args.
5981 set dummy $ac_prog; ac_word=$2
5982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5983 $as_echo_n "checking for $ac_word... " >&6; }
5984 if ${ac_cv_path_CMP+:} false; then :
5985   $as_echo_n "(cached) " >&6
5986 else
5987   case $CMP in
5988   [\\/]* | ?:[\\/]*)
5989   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5990   ;;
5991   *)
5992   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5993 for as_dir in $PATH
5994 do
5995   IFS=$as_save_IFS
5996   test -z "$as_dir" && as_dir=.
5997     for ac_exec_ext in '' $ac_executable_extensions; do
5998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5999     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6001     break 2
6002   fi
6003 done
6004   done
6005 IFS=$as_save_IFS
6006 
6007   ;;
6008 esac
6009 fi
6010 CMP=$ac_cv_path_CMP
6011 if test -n "$CMP"; then
6012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6013 $as_echo "$CMP" >&6; }
6014 else
6015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6016 $as_echo "no" >&6; }
6017 fi
6018 
6019 
6020   test -n "$CMP" && break
6021 done
6022 
6023   else
6024     # The variable is set, but is it from the command line or the environment?
6025 
6026     # Try to remove the string !CMP! from our list.
6027     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6028     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6029       # If it failed, the variable was not from the command line. Ignore it,
6030       # but warn the user (except for BASH, which is always set by the calling BASH).
6031       if test "xCMP" != xBASH; then
6032         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6033 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6034       fi
6035       # Try to locate tool using the code snippet
6036       for ac_prog in cmp
6037 do
6038   # Extract the first word of "$ac_prog", so it can be a program name with args.
6039 set dummy $ac_prog; ac_word=$2
6040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6041 $as_echo_n "checking for $ac_word... " >&6; }
6042 if ${ac_cv_path_CMP+:} false; then :
6043   $as_echo_n "(cached) " >&6
6044 else
6045   case $CMP in
6046   [\\/]* | ?:[\\/]*)
6047   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6048   ;;
6049   *)
6050   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6051 for as_dir in $PATH
6052 do
6053   IFS=$as_save_IFS
6054   test -z "$as_dir" && as_dir=.
6055     for ac_exec_ext in '' $ac_executable_extensions; do
6056   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6057     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6059     break 2
6060   fi
6061 done
6062   done
6063 IFS=$as_save_IFS
6064 
6065   ;;
6066 esac
6067 fi
6068 CMP=$ac_cv_path_CMP
6069 if test -n "$CMP"; then
6070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6071 $as_echo "$CMP" >&6; }
6072 else
6073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6074 $as_echo "no" >&6; }
6075 fi
6076 
6077 
6078   test -n "$CMP" && break
6079 done
6080 
6081     else
6082       # If it succeeded, then it was overridden by the user. We will use it
6083       # for the tool.
6084 
6085       # First remove it from the list of overridden variables, so we can test
6086       # for unknown variables in the end.
6087       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6088 
6089       # Check if we try to supply an empty value
6090       if test "x$CMP" = x; then
6091         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6092 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6093         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6094 $as_echo_n "checking for CMP... " >&6; }
6095         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6096 $as_echo "disabled" >&6; }
6097       else
6098         # Check if the provided tool contains a complete path.
6099         tool_specified="$CMP"
6100         tool_basename="${tool_specified##*/}"
6101         if test "x$tool_basename" = "x$tool_specified"; then
6102           # A command without a complete path is provided, search $PATH.
6103           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6104 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6105           # Extract the first word of "$tool_basename", so it can be a program name with args.
6106 set dummy $tool_basename; ac_word=$2
6107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6108 $as_echo_n "checking for $ac_word... " >&6; }
6109 if ${ac_cv_path_CMP+:} false; then :
6110   $as_echo_n "(cached) " >&6
6111 else
6112   case $CMP in
6113   [\\/]* | ?:[\\/]*)
6114   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6115   ;;
6116   *)
6117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6118 for as_dir in $PATH
6119 do
6120   IFS=$as_save_IFS
6121   test -z "$as_dir" && as_dir=.
6122     for ac_exec_ext in '' $ac_executable_extensions; do
6123   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6124     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6126     break 2
6127   fi
6128 done
6129   done
6130 IFS=$as_save_IFS
6131 
6132   ;;
6133 esac
6134 fi
6135 CMP=$ac_cv_path_CMP
6136 if test -n "$CMP"; then
6137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6138 $as_echo "$CMP" >&6; }
6139 else
6140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6141 $as_echo "no" >&6; }
6142 fi
6143 
6144 
6145           if test "x$CMP" = x; then
6146             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6147           fi
6148         else
6149           # Otherwise we believe it is a complete path. Use it as it is.
6150           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6151 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6152           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6153 $as_echo_n "checking for CMP... " >&6; }
6154           if test ! -x "$tool_specified"; then
6155             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6156 $as_echo "not found" >&6; }
6157             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6158           fi
6159           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6160 $as_echo "$tool_specified" >&6; }
6161         fi
6162       fi
6163     fi
6164 
6165   fi
6166 
6167 
6168 
6169   if test "x$CMP" = x; then
6170     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6171   fi
6172 
6173 
6174 
6175 
6176 
6177   # Publish this variable in the help.
6178 
6179 
6180   if [ -z "${COMM+x}" ]; then
6181     # The variable is not set by user, try to locate tool using the code snippet
6182     for ac_prog in comm
6183 do
6184   # Extract the first word of "$ac_prog", so it can be a program name with args.
6185 set dummy $ac_prog; ac_word=$2
6186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6187 $as_echo_n "checking for $ac_word... " >&6; }
6188 if ${ac_cv_path_COMM+:} false; then :
6189   $as_echo_n "(cached) " >&6
6190 else
6191   case $COMM in
6192   [\\/]* | ?:[\\/]*)
6193   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6194   ;;
6195   *)
6196   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6197 for as_dir in $PATH
6198 do
6199   IFS=$as_save_IFS
6200   test -z "$as_dir" && as_dir=.
6201     for ac_exec_ext in '' $ac_executable_extensions; do
6202   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6203     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6204     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6205     break 2
6206   fi
6207 done
6208   done
6209 IFS=$as_save_IFS
6210 
6211   ;;
6212 esac
6213 fi
6214 COMM=$ac_cv_path_COMM
6215 if test -n "$COMM"; then
6216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6217 $as_echo "$COMM" >&6; }
6218 else
6219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6220 $as_echo "no" >&6; }
6221 fi
6222 
6223 
6224   test -n "$COMM" && break
6225 done
6226 
6227   else
6228     # The variable is set, but is it from the command line or the environment?
6229 
6230     # Try to remove the string !COMM! from our list.
6231     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6232     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6233       # If it failed, the variable was not from the command line. Ignore it,
6234       # but warn the user (except for BASH, which is always set by the calling BASH).
6235       if test "xCOMM" != xBASH; then
6236         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6237 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6238       fi
6239       # Try to locate tool using the code snippet
6240       for ac_prog in comm
6241 do
6242   # Extract the first word of "$ac_prog", so it can be a program name with args.
6243 set dummy $ac_prog; ac_word=$2
6244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6245 $as_echo_n "checking for $ac_word... " >&6; }
6246 if ${ac_cv_path_COMM+:} false; then :
6247   $as_echo_n "(cached) " >&6
6248 else
6249   case $COMM in
6250   [\\/]* | ?:[\\/]*)
6251   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6252   ;;
6253   *)
6254   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6255 for as_dir in $PATH
6256 do
6257   IFS=$as_save_IFS
6258   test -z "$as_dir" && as_dir=.
6259     for ac_exec_ext in '' $ac_executable_extensions; do
6260   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6261     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6262     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6263     break 2
6264   fi
6265 done
6266   done
6267 IFS=$as_save_IFS
6268 
6269   ;;
6270 esac
6271 fi
6272 COMM=$ac_cv_path_COMM
6273 if test -n "$COMM"; then
6274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6275 $as_echo "$COMM" >&6; }
6276 else
6277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6278 $as_echo "no" >&6; }
6279 fi
6280 
6281 
6282   test -n "$COMM" && break
6283 done
6284 
6285     else
6286       # If it succeeded, then it was overridden by the user. We will use it
6287       # for the tool.
6288 
6289       # First remove it from the list of overridden variables, so we can test
6290       # for unknown variables in the end.
6291       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6292 
6293       # Check if we try to supply an empty value
6294       if test "x$COMM" = x; then
6295         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6296 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6297         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6298 $as_echo_n "checking for COMM... " >&6; }
6299         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6300 $as_echo "disabled" >&6; }
6301       else
6302         # Check if the provided tool contains a complete path.
6303         tool_specified="$COMM"
6304         tool_basename="${tool_specified##*/}"
6305         if test "x$tool_basename" = "x$tool_specified"; then
6306           # A command without a complete path is provided, search $PATH.
6307           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6308 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6309           # Extract the first word of "$tool_basename", so it can be a program name with args.
6310 set dummy $tool_basename; ac_word=$2
6311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6312 $as_echo_n "checking for $ac_word... " >&6; }
6313 if ${ac_cv_path_COMM+:} false; then :
6314   $as_echo_n "(cached) " >&6
6315 else
6316   case $COMM in
6317   [\\/]* | ?:[\\/]*)
6318   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6319   ;;
6320   *)
6321   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6322 for as_dir in $PATH
6323 do
6324   IFS=$as_save_IFS
6325   test -z "$as_dir" && as_dir=.
6326     for ac_exec_ext in '' $ac_executable_extensions; do
6327   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6328     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6329     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6330     break 2
6331   fi
6332 done
6333   done
6334 IFS=$as_save_IFS
6335 
6336   ;;
6337 esac
6338 fi
6339 COMM=$ac_cv_path_COMM
6340 if test -n "$COMM"; then
6341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6342 $as_echo "$COMM" >&6; }
6343 else
6344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6345 $as_echo "no" >&6; }
6346 fi
6347 
6348 
6349           if test "x$COMM" = x; then
6350             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6351           fi
6352         else
6353           # Otherwise we believe it is a complete path. Use it as it is.
6354           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6355 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6356           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6357 $as_echo_n "checking for COMM... " >&6; }
6358           if test ! -x "$tool_specified"; then
6359             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6360 $as_echo "not found" >&6; }
6361             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6362           fi
6363           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6364 $as_echo "$tool_specified" >&6; }
6365         fi
6366       fi
6367     fi
6368 
6369   fi
6370 
6371 
6372 
6373   if test "x$COMM" = x; then
6374     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6375   fi
6376 
6377 
6378 
6379 
6380 
6381   # Publish this variable in the help.
6382 
6383 
6384   if [ -z "${CP+x}" ]; then
6385     # The variable is not set by user, try to locate tool using the code snippet
6386     for ac_prog in cp
6387 do
6388   # Extract the first word of "$ac_prog", so it can be a program name with args.
6389 set dummy $ac_prog; ac_word=$2
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6391 $as_echo_n "checking for $ac_word... " >&6; }
6392 if ${ac_cv_path_CP+:} false; then :
6393   $as_echo_n "(cached) " >&6
6394 else
6395   case $CP in
6396   [\\/]* | ?:[\\/]*)
6397   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6398   ;;
6399   *)
6400   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6401 for as_dir in $PATH
6402 do
6403   IFS=$as_save_IFS
6404   test -z "$as_dir" && as_dir=.
6405     for ac_exec_ext in '' $ac_executable_extensions; do
6406   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6407     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6408     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6409     break 2
6410   fi
6411 done
6412   done
6413 IFS=$as_save_IFS
6414 
6415   ;;
6416 esac
6417 fi
6418 CP=$ac_cv_path_CP
6419 if test -n "$CP"; then
6420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6421 $as_echo "$CP" >&6; }
6422 else
6423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6424 $as_echo "no" >&6; }
6425 fi
6426 
6427 
6428   test -n "$CP" && break
6429 done
6430 
6431   else
6432     # The variable is set, but is it from the command line or the environment?
6433 
6434     # Try to remove the string !CP! from our list.
6435     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6436     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6437       # If it failed, the variable was not from the command line. Ignore it,
6438       # but warn the user (except for BASH, which is always set by the calling BASH).
6439       if test "xCP" != xBASH; then
6440         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6441 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6442       fi
6443       # Try to locate tool using the code snippet
6444       for ac_prog in cp
6445 do
6446   # Extract the first word of "$ac_prog", so it can be a program name with args.
6447 set dummy $ac_prog; ac_word=$2
6448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6449 $as_echo_n "checking for $ac_word... " >&6; }
6450 if ${ac_cv_path_CP+:} false; then :
6451   $as_echo_n "(cached) " >&6
6452 else
6453   case $CP in
6454   [\\/]* | ?:[\\/]*)
6455   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6456   ;;
6457   *)
6458   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6459 for as_dir in $PATH
6460 do
6461   IFS=$as_save_IFS
6462   test -z "$as_dir" && as_dir=.
6463     for ac_exec_ext in '' $ac_executable_extensions; do
6464   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6465     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6466     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6467     break 2
6468   fi
6469 done
6470   done
6471 IFS=$as_save_IFS
6472 
6473   ;;
6474 esac
6475 fi
6476 CP=$ac_cv_path_CP
6477 if test -n "$CP"; then
6478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6479 $as_echo "$CP" >&6; }
6480 else
6481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6482 $as_echo "no" >&6; }
6483 fi
6484 
6485 
6486   test -n "$CP" && break
6487 done
6488 
6489     else
6490       # If it succeeded, then it was overridden by the user. We will use it
6491       # for the tool.
6492 
6493       # First remove it from the list of overridden variables, so we can test
6494       # for unknown variables in the end.
6495       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6496 
6497       # Check if we try to supply an empty value
6498       if test "x$CP" = x; then
6499         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6500 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6501         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6502 $as_echo_n "checking for CP... " >&6; }
6503         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6504 $as_echo "disabled" >&6; }
6505       else
6506         # Check if the provided tool contains a complete path.
6507         tool_specified="$CP"
6508         tool_basename="${tool_specified##*/}"
6509         if test "x$tool_basename" = "x$tool_specified"; then
6510           # A command without a complete path is provided, search $PATH.
6511           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6512 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6513           # Extract the first word of "$tool_basename", so it can be a program name with args.
6514 set dummy $tool_basename; ac_word=$2
6515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6516 $as_echo_n "checking for $ac_word... " >&6; }
6517 if ${ac_cv_path_CP+:} false; then :
6518   $as_echo_n "(cached) " >&6
6519 else
6520   case $CP in
6521   [\\/]* | ?:[\\/]*)
6522   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6523   ;;
6524   *)
6525   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6526 for as_dir in $PATH
6527 do
6528   IFS=$as_save_IFS
6529   test -z "$as_dir" && as_dir=.
6530     for ac_exec_ext in '' $ac_executable_extensions; do
6531   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6532     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6533     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6534     break 2
6535   fi
6536 done
6537   done
6538 IFS=$as_save_IFS
6539 
6540   ;;
6541 esac
6542 fi
6543 CP=$ac_cv_path_CP
6544 if test -n "$CP"; then
6545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6546 $as_echo "$CP" >&6; }
6547 else
6548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6549 $as_echo "no" >&6; }
6550 fi
6551 
6552 
6553           if test "x$CP" = x; then
6554             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6555           fi
6556         else
6557           # Otherwise we believe it is a complete path. Use it as it is.
6558           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6559 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6560           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6561 $as_echo_n "checking for CP... " >&6; }
6562           if test ! -x "$tool_specified"; then
6563             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6564 $as_echo "not found" >&6; }
6565             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6566           fi
6567           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6568 $as_echo "$tool_specified" >&6; }
6569         fi
6570       fi
6571     fi
6572 
6573   fi
6574 
6575 
6576 
6577   if test "x$CP" = x; then
6578     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6579   fi
6580 
6581 
6582 
6583 
6584 
6585   # Publish this variable in the help.
6586 
6587 
6588   if [ -z "${CUT+x}" ]; then
6589     # The variable is not set by user, try to locate tool using the code snippet
6590     for ac_prog in cut
6591 do
6592   # Extract the first word of "$ac_prog", so it can be a program name with args.
6593 set dummy $ac_prog; ac_word=$2
6594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6595 $as_echo_n "checking for $ac_word... " >&6; }
6596 if ${ac_cv_path_CUT+:} false; then :
6597   $as_echo_n "(cached) " >&6
6598 else
6599   case $CUT in
6600   [\\/]* | ?:[\\/]*)
6601   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6602   ;;
6603   *)
6604   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6605 for as_dir in $PATH
6606 do
6607   IFS=$as_save_IFS
6608   test -z "$as_dir" && as_dir=.
6609     for ac_exec_ext in '' $ac_executable_extensions; do
6610   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6611     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6612     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6613     break 2
6614   fi
6615 done
6616   done
6617 IFS=$as_save_IFS
6618 
6619   ;;
6620 esac
6621 fi
6622 CUT=$ac_cv_path_CUT
6623 if test -n "$CUT"; then
6624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6625 $as_echo "$CUT" >&6; }
6626 else
6627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6628 $as_echo "no" >&6; }
6629 fi
6630 
6631 
6632   test -n "$CUT" && break
6633 done
6634 
6635   else
6636     # The variable is set, but is it from the command line or the environment?
6637 
6638     # Try to remove the string !CUT! from our list.
6639     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6640     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6641       # If it failed, the variable was not from the command line. Ignore it,
6642       # but warn the user (except for BASH, which is always set by the calling BASH).
6643       if test "xCUT" != xBASH; then
6644         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6645 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6646       fi
6647       # Try to locate tool using the code snippet
6648       for ac_prog in cut
6649 do
6650   # Extract the first word of "$ac_prog", so it can be a program name with args.
6651 set dummy $ac_prog; ac_word=$2
6652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6653 $as_echo_n "checking for $ac_word... " >&6; }
6654 if ${ac_cv_path_CUT+:} false; then :
6655   $as_echo_n "(cached) " >&6
6656 else
6657   case $CUT in
6658   [\\/]* | ?:[\\/]*)
6659   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6660   ;;
6661   *)
6662   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6663 for as_dir in $PATH
6664 do
6665   IFS=$as_save_IFS
6666   test -z "$as_dir" && as_dir=.
6667     for ac_exec_ext in '' $ac_executable_extensions; do
6668   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6669     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6670     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6671     break 2
6672   fi
6673 done
6674   done
6675 IFS=$as_save_IFS
6676 
6677   ;;
6678 esac
6679 fi
6680 CUT=$ac_cv_path_CUT
6681 if test -n "$CUT"; then
6682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6683 $as_echo "$CUT" >&6; }
6684 else
6685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6686 $as_echo "no" >&6; }
6687 fi
6688 
6689 
6690   test -n "$CUT" && break
6691 done
6692 
6693     else
6694       # If it succeeded, then it was overridden by the user. We will use it
6695       # for the tool.
6696 
6697       # First remove it from the list of overridden variables, so we can test
6698       # for unknown variables in the end.
6699       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6700 
6701       # Check if we try to supply an empty value
6702       if test "x$CUT" = x; then
6703         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6704 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6705         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6706 $as_echo_n "checking for CUT... " >&6; }
6707         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6708 $as_echo "disabled" >&6; }
6709       else
6710         # Check if the provided tool contains a complete path.
6711         tool_specified="$CUT"
6712         tool_basename="${tool_specified##*/}"
6713         if test "x$tool_basename" = "x$tool_specified"; then
6714           # A command without a complete path is provided, search $PATH.
6715           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6716 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6717           # Extract the first word of "$tool_basename", so it can be a program name with args.
6718 set dummy $tool_basename; ac_word=$2
6719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6720 $as_echo_n "checking for $ac_word... " >&6; }
6721 if ${ac_cv_path_CUT+:} false; then :
6722   $as_echo_n "(cached) " >&6
6723 else
6724   case $CUT in
6725   [\\/]* | ?:[\\/]*)
6726   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6727   ;;
6728   *)
6729   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6730 for as_dir in $PATH
6731 do
6732   IFS=$as_save_IFS
6733   test -z "$as_dir" && as_dir=.
6734     for ac_exec_ext in '' $ac_executable_extensions; do
6735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6736     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6738     break 2
6739   fi
6740 done
6741   done
6742 IFS=$as_save_IFS
6743 
6744   ;;
6745 esac
6746 fi
6747 CUT=$ac_cv_path_CUT
6748 if test -n "$CUT"; then
6749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6750 $as_echo "$CUT" >&6; }
6751 else
6752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6753 $as_echo "no" >&6; }
6754 fi
6755 
6756 
6757           if test "x$CUT" = x; then
6758             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6759           fi
6760         else
6761           # Otherwise we believe it is a complete path. Use it as it is.
6762           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6763 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6764           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6765 $as_echo_n "checking for CUT... " >&6; }
6766           if test ! -x "$tool_specified"; then
6767             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6768 $as_echo "not found" >&6; }
6769             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6770           fi
6771           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6772 $as_echo "$tool_specified" >&6; }
6773         fi
6774       fi
6775     fi
6776 
6777   fi
6778 
6779 
6780 
6781   if test "x$CUT" = x; then
6782     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6783   fi
6784 
6785 
6786 
6787 
6788 
6789   # Publish this variable in the help.
6790 
6791 
6792   if [ -z "${DATE+x}" ]; then
6793     # The variable is not set by user, try to locate tool using the code snippet
6794     for ac_prog in date
6795 do
6796   # Extract the first word of "$ac_prog", so it can be a program name with args.
6797 set dummy $ac_prog; ac_word=$2
6798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6799 $as_echo_n "checking for $ac_word... " >&6; }
6800 if ${ac_cv_path_DATE+:} false; then :
6801   $as_echo_n "(cached) " >&6
6802 else
6803   case $DATE in
6804   [\\/]* | ?:[\\/]*)
6805   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6806   ;;
6807   *)
6808   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6809 for as_dir in $PATH
6810 do
6811   IFS=$as_save_IFS
6812   test -z "$as_dir" && as_dir=.
6813     for ac_exec_ext in '' $ac_executable_extensions; do
6814   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6815     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6816     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6817     break 2
6818   fi
6819 done
6820   done
6821 IFS=$as_save_IFS
6822 
6823   ;;
6824 esac
6825 fi
6826 DATE=$ac_cv_path_DATE
6827 if test -n "$DATE"; then
6828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6829 $as_echo "$DATE" >&6; }
6830 else
6831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6832 $as_echo "no" >&6; }
6833 fi
6834 
6835 
6836   test -n "$DATE" && break
6837 done
6838 
6839   else
6840     # The variable is set, but is it from the command line or the environment?
6841 
6842     # Try to remove the string !DATE! from our list.
6843     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6844     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6845       # If it failed, the variable was not from the command line. Ignore it,
6846       # but warn the user (except for BASH, which is always set by the calling BASH).
6847       if test "xDATE" != xBASH; then
6848         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6849 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6850       fi
6851       # Try to locate tool using the code snippet
6852       for ac_prog in date
6853 do
6854   # Extract the first word of "$ac_prog", so it can be a program name with args.
6855 set dummy $ac_prog; ac_word=$2
6856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6857 $as_echo_n "checking for $ac_word... " >&6; }
6858 if ${ac_cv_path_DATE+:} false; then :
6859   $as_echo_n "(cached) " >&6
6860 else
6861   case $DATE in
6862   [\\/]* | ?:[\\/]*)
6863   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6864   ;;
6865   *)
6866   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6867 for as_dir in $PATH
6868 do
6869   IFS=$as_save_IFS
6870   test -z "$as_dir" && as_dir=.
6871     for ac_exec_ext in '' $ac_executable_extensions; do
6872   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6873     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6875     break 2
6876   fi
6877 done
6878   done
6879 IFS=$as_save_IFS
6880 
6881   ;;
6882 esac
6883 fi
6884 DATE=$ac_cv_path_DATE
6885 if test -n "$DATE"; then
6886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6887 $as_echo "$DATE" >&6; }
6888 else
6889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6890 $as_echo "no" >&6; }
6891 fi
6892 
6893 
6894   test -n "$DATE" && break
6895 done
6896 
6897     else
6898       # If it succeeded, then it was overridden by the user. We will use it
6899       # for the tool.
6900 
6901       # First remove it from the list of overridden variables, so we can test
6902       # for unknown variables in the end.
6903       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6904 
6905       # Check if we try to supply an empty value
6906       if test "x$DATE" = x; then
6907         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6908 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6909         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6910 $as_echo_n "checking for DATE... " >&6; }
6911         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6912 $as_echo "disabled" >&6; }
6913       else
6914         # Check if the provided tool contains a complete path.
6915         tool_specified="$DATE"
6916         tool_basename="${tool_specified##*/}"
6917         if test "x$tool_basename" = "x$tool_specified"; then
6918           # A command without a complete path is provided, search $PATH.
6919           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6920 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6921           # Extract the first word of "$tool_basename", so it can be a program name with args.
6922 set dummy $tool_basename; ac_word=$2
6923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6924 $as_echo_n "checking for $ac_word... " >&6; }
6925 if ${ac_cv_path_DATE+:} false; then :
6926   $as_echo_n "(cached) " >&6
6927 else
6928   case $DATE in
6929   [\\/]* | ?:[\\/]*)
6930   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6931   ;;
6932   *)
6933   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6934 for as_dir in $PATH
6935 do
6936   IFS=$as_save_IFS
6937   test -z "$as_dir" && as_dir=.
6938     for ac_exec_ext in '' $ac_executable_extensions; do
6939   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6940     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6941     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6942     break 2
6943   fi
6944 done
6945   done
6946 IFS=$as_save_IFS
6947 
6948   ;;
6949 esac
6950 fi
6951 DATE=$ac_cv_path_DATE
6952 if test -n "$DATE"; then
6953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6954 $as_echo "$DATE" >&6; }
6955 else
6956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6957 $as_echo "no" >&6; }
6958 fi
6959 
6960 
6961           if test "x$DATE" = x; then
6962             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6963           fi
6964         else
6965           # Otherwise we believe it is a complete path. Use it as it is.
6966           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6967 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6968           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6969 $as_echo_n "checking for DATE... " >&6; }
6970           if test ! -x "$tool_specified"; then
6971             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6972 $as_echo "not found" >&6; }
6973             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6974           fi
6975           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6976 $as_echo "$tool_specified" >&6; }
6977         fi
6978       fi
6979     fi
6980 
6981   fi
6982 
6983 
6984 
6985   if test "x$DATE" = x; then
6986     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6987   fi
6988 
6989 
6990 
6991 
6992 
6993   # Publish this variable in the help.
6994 
6995 
6996   if [ -z "${DIFF+x}" ]; then
6997     # The variable is not set by user, try to locate tool using the code snippet
6998     for ac_prog in gdiff diff
6999 do
7000   # Extract the first word of "$ac_prog", so it can be a program name with args.
7001 set dummy $ac_prog; ac_word=$2
7002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7003 $as_echo_n "checking for $ac_word... " >&6; }
7004 if ${ac_cv_path_DIFF+:} false; then :
7005   $as_echo_n "(cached) " >&6
7006 else
7007   case $DIFF in
7008   [\\/]* | ?:[\\/]*)
7009   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7010   ;;
7011   *)
7012   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7013 for as_dir in $PATH
7014 do
7015   IFS=$as_save_IFS
7016   test -z "$as_dir" && as_dir=.
7017     for ac_exec_ext in '' $ac_executable_extensions; do
7018   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7019     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7020     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7021     break 2
7022   fi
7023 done
7024   done
7025 IFS=$as_save_IFS
7026 
7027   ;;
7028 esac
7029 fi
7030 DIFF=$ac_cv_path_DIFF
7031 if test -n "$DIFF"; then
7032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7033 $as_echo "$DIFF" >&6; }
7034 else
7035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7036 $as_echo "no" >&6; }
7037 fi
7038 
7039 
7040   test -n "$DIFF" && break
7041 done
7042 
7043   else
7044     # The variable is set, but is it from the command line or the environment?
7045 
7046     # Try to remove the string !DIFF! from our list.
7047     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7048     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7049       # If it failed, the variable was not from the command line. Ignore it,
7050       # but warn the user (except for BASH, which is always set by the calling BASH).
7051       if test "xDIFF" != xBASH; then
7052         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7053 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7054       fi
7055       # Try to locate tool using the code snippet
7056       for ac_prog in gdiff diff
7057 do
7058   # Extract the first word of "$ac_prog", so it can be a program name with args.
7059 set dummy $ac_prog; ac_word=$2
7060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7061 $as_echo_n "checking for $ac_word... " >&6; }
7062 if ${ac_cv_path_DIFF+:} false; then :
7063   $as_echo_n "(cached) " >&6
7064 else
7065   case $DIFF in
7066   [\\/]* | ?:[\\/]*)
7067   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7068   ;;
7069   *)
7070   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7071 for as_dir in $PATH
7072 do
7073   IFS=$as_save_IFS
7074   test -z "$as_dir" && as_dir=.
7075     for ac_exec_ext in '' $ac_executable_extensions; do
7076   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7077     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7079     break 2
7080   fi
7081 done
7082   done
7083 IFS=$as_save_IFS
7084 
7085   ;;
7086 esac
7087 fi
7088 DIFF=$ac_cv_path_DIFF
7089 if test -n "$DIFF"; then
7090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7091 $as_echo "$DIFF" >&6; }
7092 else
7093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7094 $as_echo "no" >&6; }
7095 fi
7096 
7097 
7098   test -n "$DIFF" && break
7099 done
7100 
7101     else
7102       # If it succeeded, then it was overridden by the user. We will use it
7103       # for the tool.
7104 
7105       # First remove it from the list of overridden variables, so we can test
7106       # for unknown variables in the end.
7107       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7108 
7109       # Check if we try to supply an empty value
7110       if test "x$DIFF" = x; then
7111         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7112 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7113         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7114 $as_echo_n "checking for DIFF... " >&6; }
7115         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7116 $as_echo "disabled" >&6; }
7117       else
7118         # Check if the provided tool contains a complete path.
7119         tool_specified="$DIFF"
7120         tool_basename="${tool_specified##*/}"
7121         if test "x$tool_basename" = "x$tool_specified"; then
7122           # A command without a complete path is provided, search $PATH.
7123           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7124 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7125           # Extract the first word of "$tool_basename", so it can be a program name with args.
7126 set dummy $tool_basename; ac_word=$2
7127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7128 $as_echo_n "checking for $ac_word... " >&6; }
7129 if ${ac_cv_path_DIFF+:} false; then :
7130   $as_echo_n "(cached) " >&6
7131 else
7132   case $DIFF in
7133   [\\/]* | ?:[\\/]*)
7134   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7135   ;;
7136   *)
7137   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7138 for as_dir in $PATH
7139 do
7140   IFS=$as_save_IFS
7141   test -z "$as_dir" && as_dir=.
7142     for ac_exec_ext in '' $ac_executable_extensions; do
7143   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7144     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7145     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7146     break 2
7147   fi
7148 done
7149   done
7150 IFS=$as_save_IFS
7151 
7152   ;;
7153 esac
7154 fi
7155 DIFF=$ac_cv_path_DIFF
7156 if test -n "$DIFF"; then
7157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7158 $as_echo "$DIFF" >&6; }
7159 else
7160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7161 $as_echo "no" >&6; }
7162 fi
7163 
7164 
7165           if test "x$DIFF" = x; then
7166             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7167           fi
7168         else
7169           # Otherwise we believe it is a complete path. Use it as it is.
7170           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7171 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7172           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7173 $as_echo_n "checking for DIFF... " >&6; }
7174           if test ! -x "$tool_specified"; then
7175             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7176 $as_echo "not found" >&6; }
7177             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7178           fi
7179           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7180 $as_echo "$tool_specified" >&6; }
7181         fi
7182       fi
7183     fi
7184 
7185   fi
7186 
7187 
7188 
7189   if test "x$DIFF" = x; then
7190     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7191   fi
7192 
7193 
7194 
7195 
7196 
7197   # Publish this variable in the help.
7198 
7199 
7200   if [ -z "${DIRNAME+x}" ]; then
7201     # The variable is not set by user, try to locate tool using the code snippet
7202     for ac_prog in dirname
7203 do
7204   # Extract the first word of "$ac_prog", so it can be a program name with args.
7205 set dummy $ac_prog; ac_word=$2
7206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7207 $as_echo_n "checking for $ac_word... " >&6; }
7208 if ${ac_cv_path_DIRNAME+:} false; then :
7209   $as_echo_n "(cached) " >&6
7210 else
7211   case $DIRNAME in
7212   [\\/]* | ?:[\\/]*)
7213   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7214   ;;
7215   *)
7216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7217 for as_dir in $PATH
7218 do
7219   IFS=$as_save_IFS
7220   test -z "$as_dir" && as_dir=.
7221     for ac_exec_ext in '' $ac_executable_extensions; do
7222   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7223     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7225     break 2
7226   fi
7227 done
7228   done
7229 IFS=$as_save_IFS
7230 
7231   ;;
7232 esac
7233 fi
7234 DIRNAME=$ac_cv_path_DIRNAME
7235 if test -n "$DIRNAME"; then
7236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7237 $as_echo "$DIRNAME" >&6; }
7238 else
7239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7240 $as_echo "no" >&6; }
7241 fi
7242 
7243 
7244   test -n "$DIRNAME" && break
7245 done
7246 
7247   else
7248     # The variable is set, but is it from the command line or the environment?
7249 
7250     # Try to remove the string !DIRNAME! from our list.
7251     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7252     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7253       # If it failed, the variable was not from the command line. Ignore it,
7254       # but warn the user (except for BASH, which is always set by the calling BASH).
7255       if test "xDIRNAME" != xBASH; then
7256         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7257 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7258       fi
7259       # Try to locate tool using the code snippet
7260       for ac_prog in dirname
7261 do
7262   # Extract the first word of "$ac_prog", so it can be a program name with args.
7263 set dummy $ac_prog; ac_word=$2
7264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7265 $as_echo_n "checking for $ac_word... " >&6; }
7266 if ${ac_cv_path_DIRNAME+:} false; then :
7267   $as_echo_n "(cached) " >&6
7268 else
7269   case $DIRNAME in
7270   [\\/]* | ?:[\\/]*)
7271   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7272   ;;
7273   *)
7274   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7275 for as_dir in $PATH
7276 do
7277   IFS=$as_save_IFS
7278   test -z "$as_dir" && as_dir=.
7279     for ac_exec_ext in '' $ac_executable_extensions; do
7280   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7281     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7282     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7283     break 2
7284   fi
7285 done
7286   done
7287 IFS=$as_save_IFS
7288 
7289   ;;
7290 esac
7291 fi
7292 DIRNAME=$ac_cv_path_DIRNAME
7293 if test -n "$DIRNAME"; then
7294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7295 $as_echo "$DIRNAME" >&6; }
7296 else
7297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7298 $as_echo "no" >&6; }
7299 fi
7300 
7301 
7302   test -n "$DIRNAME" && break
7303 done
7304 
7305     else
7306       # If it succeeded, then it was overridden by the user. We will use it
7307       # for the tool.
7308 
7309       # First remove it from the list of overridden variables, so we can test
7310       # for unknown variables in the end.
7311       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7312 
7313       # Check if we try to supply an empty value
7314       if test "x$DIRNAME" = x; then
7315         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7316 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7317         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7318 $as_echo_n "checking for DIRNAME... " >&6; }
7319         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7320 $as_echo "disabled" >&6; }
7321       else
7322         # Check if the provided tool contains a complete path.
7323         tool_specified="$DIRNAME"
7324         tool_basename="${tool_specified##*/}"
7325         if test "x$tool_basename" = "x$tool_specified"; then
7326           # A command without a complete path is provided, search $PATH.
7327           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7328 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7329           # Extract the first word of "$tool_basename", so it can be a program name with args.
7330 set dummy $tool_basename; ac_word=$2
7331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7332 $as_echo_n "checking for $ac_word... " >&6; }
7333 if ${ac_cv_path_DIRNAME+:} false; then :
7334   $as_echo_n "(cached) " >&6
7335 else
7336   case $DIRNAME in
7337   [\\/]* | ?:[\\/]*)
7338   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7339   ;;
7340   *)
7341   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7342 for as_dir in $PATH
7343 do
7344   IFS=$as_save_IFS
7345   test -z "$as_dir" && as_dir=.
7346     for ac_exec_ext in '' $ac_executable_extensions; do
7347   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7348     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7349     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7350     break 2
7351   fi
7352 done
7353   done
7354 IFS=$as_save_IFS
7355 
7356   ;;
7357 esac
7358 fi
7359 DIRNAME=$ac_cv_path_DIRNAME
7360 if test -n "$DIRNAME"; then
7361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7362 $as_echo "$DIRNAME" >&6; }
7363 else
7364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7365 $as_echo "no" >&6; }
7366 fi
7367 
7368 
7369           if test "x$DIRNAME" = x; then
7370             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7371           fi
7372         else
7373           # Otherwise we believe it is a complete path. Use it as it is.
7374           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7375 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7376           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7377 $as_echo_n "checking for DIRNAME... " >&6; }
7378           if test ! -x "$tool_specified"; then
7379             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7380 $as_echo "not found" >&6; }
7381             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7382           fi
7383           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7384 $as_echo "$tool_specified" >&6; }
7385         fi
7386       fi
7387     fi
7388 
7389   fi
7390 
7391 
7392 
7393   if test "x$DIRNAME" = x; then
7394     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7395   fi
7396 
7397 
7398 
7399 
7400 
7401   # Publish this variable in the help.
7402 
7403 
7404   if [ -z "${ECHO+x}" ]; then
7405     # The variable is not set by user, try to locate tool using the code snippet
7406     for ac_prog in echo
7407 do
7408   # Extract the first word of "$ac_prog", so it can be a program name with args.
7409 set dummy $ac_prog; ac_word=$2
7410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7411 $as_echo_n "checking for $ac_word... " >&6; }
7412 if ${ac_cv_path_ECHO+:} false; then :
7413   $as_echo_n "(cached) " >&6
7414 else
7415   case $ECHO in
7416   [\\/]* | ?:[\\/]*)
7417   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7418   ;;
7419   *)
7420   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7421 for as_dir in $PATH
7422 do
7423   IFS=$as_save_IFS
7424   test -z "$as_dir" && as_dir=.
7425     for ac_exec_ext in '' $ac_executable_extensions; do
7426   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7427     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7428     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7429     break 2
7430   fi
7431 done
7432   done
7433 IFS=$as_save_IFS
7434 
7435   ;;
7436 esac
7437 fi
7438 ECHO=$ac_cv_path_ECHO
7439 if test -n "$ECHO"; then
7440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7441 $as_echo "$ECHO" >&6; }
7442 else
7443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7444 $as_echo "no" >&6; }
7445 fi
7446 
7447 
7448   test -n "$ECHO" && break
7449 done
7450 
7451   else
7452     # The variable is set, but is it from the command line or the environment?
7453 
7454     # Try to remove the string !ECHO! from our list.
7455     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7456     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7457       # If it failed, the variable was not from the command line. Ignore it,
7458       # but warn the user (except for BASH, which is always set by the calling BASH).
7459       if test "xECHO" != xBASH; then
7460         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7461 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7462       fi
7463       # Try to locate tool using the code snippet
7464       for ac_prog in echo
7465 do
7466   # Extract the first word of "$ac_prog", so it can be a program name with args.
7467 set dummy $ac_prog; ac_word=$2
7468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7469 $as_echo_n "checking for $ac_word... " >&6; }
7470 if ${ac_cv_path_ECHO+:} false; then :
7471   $as_echo_n "(cached) " >&6
7472 else
7473   case $ECHO in
7474   [\\/]* | ?:[\\/]*)
7475   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7476   ;;
7477   *)
7478   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7479 for as_dir in $PATH
7480 do
7481   IFS=$as_save_IFS
7482   test -z "$as_dir" && as_dir=.
7483     for ac_exec_ext in '' $ac_executable_extensions; do
7484   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7485     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7486     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7487     break 2
7488   fi
7489 done
7490   done
7491 IFS=$as_save_IFS
7492 
7493   ;;
7494 esac
7495 fi
7496 ECHO=$ac_cv_path_ECHO
7497 if test -n "$ECHO"; then
7498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7499 $as_echo "$ECHO" >&6; }
7500 else
7501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7502 $as_echo "no" >&6; }
7503 fi
7504 
7505 
7506   test -n "$ECHO" && break
7507 done
7508 
7509     else
7510       # If it succeeded, then it was overridden by the user. We will use it
7511       # for the tool.
7512 
7513       # First remove it from the list of overridden variables, so we can test
7514       # for unknown variables in the end.
7515       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7516 
7517       # Check if we try to supply an empty value
7518       if test "x$ECHO" = x; then
7519         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7520 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7521         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7522 $as_echo_n "checking for ECHO... " >&6; }
7523         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7524 $as_echo "disabled" >&6; }
7525       else
7526         # Check if the provided tool contains a complete path.
7527         tool_specified="$ECHO"
7528         tool_basename="${tool_specified##*/}"
7529         if test "x$tool_basename" = "x$tool_specified"; then
7530           # A command without a complete path is provided, search $PATH.
7531           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7532 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7533           # Extract the first word of "$tool_basename", so it can be a program name with args.
7534 set dummy $tool_basename; ac_word=$2
7535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7536 $as_echo_n "checking for $ac_word... " >&6; }
7537 if ${ac_cv_path_ECHO+:} false; then :
7538   $as_echo_n "(cached) " >&6
7539 else
7540   case $ECHO in
7541   [\\/]* | ?:[\\/]*)
7542   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7543   ;;
7544   *)
7545   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7546 for as_dir in $PATH
7547 do
7548   IFS=$as_save_IFS
7549   test -z "$as_dir" && as_dir=.
7550     for ac_exec_ext in '' $ac_executable_extensions; do
7551   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7552     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7554     break 2
7555   fi
7556 done
7557   done
7558 IFS=$as_save_IFS
7559 
7560   ;;
7561 esac
7562 fi
7563 ECHO=$ac_cv_path_ECHO
7564 if test -n "$ECHO"; then
7565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7566 $as_echo "$ECHO" >&6; }
7567 else
7568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7569 $as_echo "no" >&6; }
7570 fi
7571 
7572 
7573           if test "x$ECHO" = x; then
7574             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7575           fi
7576         else
7577           # Otherwise we believe it is a complete path. Use it as it is.
7578           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7579 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7580           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7581 $as_echo_n "checking for ECHO... " >&6; }
7582           if test ! -x "$tool_specified"; then
7583             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7584 $as_echo "not found" >&6; }
7585             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7586           fi
7587           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7588 $as_echo "$tool_specified" >&6; }
7589         fi
7590       fi
7591     fi
7592 
7593   fi
7594 
7595 
7596 
7597   if test "x$ECHO" = x; then
7598     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7599   fi
7600 
7601 
7602 
7603 
7604 
7605   # Publish this variable in the help.
7606 
7607 
7608   if [ -z "${EXPR+x}" ]; then
7609     # The variable is not set by user, try to locate tool using the code snippet
7610     for ac_prog in expr
7611 do
7612   # Extract the first word of "$ac_prog", so it can be a program name with args.
7613 set dummy $ac_prog; ac_word=$2
7614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7615 $as_echo_n "checking for $ac_word... " >&6; }
7616 if ${ac_cv_path_EXPR+:} false; then :
7617   $as_echo_n "(cached) " >&6
7618 else
7619   case $EXPR in
7620   [\\/]* | ?:[\\/]*)
7621   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7622   ;;
7623   *)
7624   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7625 for as_dir in $PATH
7626 do
7627   IFS=$as_save_IFS
7628   test -z "$as_dir" && as_dir=.
7629     for ac_exec_ext in '' $ac_executable_extensions; do
7630   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7631     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7632     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7633     break 2
7634   fi
7635 done
7636   done
7637 IFS=$as_save_IFS
7638 
7639   ;;
7640 esac
7641 fi
7642 EXPR=$ac_cv_path_EXPR
7643 if test -n "$EXPR"; then
7644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7645 $as_echo "$EXPR" >&6; }
7646 else
7647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7648 $as_echo "no" >&6; }
7649 fi
7650 
7651 
7652   test -n "$EXPR" && break
7653 done
7654 
7655   else
7656     # The variable is set, but is it from the command line or the environment?
7657 
7658     # Try to remove the string !EXPR! from our list.
7659     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7660     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7661       # If it failed, the variable was not from the command line. Ignore it,
7662       # but warn the user (except for BASH, which is always set by the calling BASH).
7663       if test "xEXPR" != xBASH; then
7664         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7665 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7666       fi
7667       # Try to locate tool using the code snippet
7668       for ac_prog in expr
7669 do
7670   # Extract the first word of "$ac_prog", so it can be a program name with args.
7671 set dummy $ac_prog; ac_word=$2
7672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7673 $as_echo_n "checking for $ac_word... " >&6; }
7674 if ${ac_cv_path_EXPR+:} false; then :
7675   $as_echo_n "(cached) " >&6
7676 else
7677   case $EXPR in
7678   [\\/]* | ?:[\\/]*)
7679   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7680   ;;
7681   *)
7682   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7683 for as_dir in $PATH
7684 do
7685   IFS=$as_save_IFS
7686   test -z "$as_dir" && as_dir=.
7687     for ac_exec_ext in '' $ac_executable_extensions; do
7688   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7689     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7690     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7691     break 2
7692   fi
7693 done
7694   done
7695 IFS=$as_save_IFS
7696 
7697   ;;
7698 esac
7699 fi
7700 EXPR=$ac_cv_path_EXPR
7701 if test -n "$EXPR"; then
7702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7703 $as_echo "$EXPR" >&6; }
7704 else
7705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7706 $as_echo "no" >&6; }
7707 fi
7708 
7709 
7710   test -n "$EXPR" && break
7711 done
7712 
7713     else
7714       # If it succeeded, then it was overridden by the user. We will use it
7715       # for the tool.
7716 
7717       # First remove it from the list of overridden variables, so we can test
7718       # for unknown variables in the end.
7719       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7720 
7721       # Check if we try to supply an empty value
7722       if test "x$EXPR" = x; then
7723         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7724 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7725         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7726 $as_echo_n "checking for EXPR... " >&6; }
7727         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7728 $as_echo "disabled" >&6; }
7729       else
7730         # Check if the provided tool contains a complete path.
7731         tool_specified="$EXPR"
7732         tool_basename="${tool_specified##*/}"
7733         if test "x$tool_basename" = "x$tool_specified"; then
7734           # A command without a complete path is provided, search $PATH.
7735           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7736 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7737           # Extract the first word of "$tool_basename", so it can be a program name with args.
7738 set dummy $tool_basename; ac_word=$2
7739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7740 $as_echo_n "checking for $ac_word... " >&6; }
7741 if ${ac_cv_path_EXPR+:} false; then :
7742   $as_echo_n "(cached) " >&6
7743 else
7744   case $EXPR in
7745   [\\/]* | ?:[\\/]*)
7746   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7747   ;;
7748   *)
7749   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7750 for as_dir in $PATH
7751 do
7752   IFS=$as_save_IFS
7753   test -z "$as_dir" && as_dir=.
7754     for ac_exec_ext in '' $ac_executable_extensions; do
7755   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7756     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7758     break 2
7759   fi
7760 done
7761   done
7762 IFS=$as_save_IFS
7763 
7764   ;;
7765 esac
7766 fi
7767 EXPR=$ac_cv_path_EXPR
7768 if test -n "$EXPR"; then
7769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7770 $as_echo "$EXPR" >&6; }
7771 else
7772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7773 $as_echo "no" >&6; }
7774 fi
7775 
7776 
7777           if test "x$EXPR" = x; then
7778             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7779           fi
7780         else
7781           # Otherwise we believe it is a complete path. Use it as it is.
7782           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7783 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7784           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7785 $as_echo_n "checking for EXPR... " >&6; }
7786           if test ! -x "$tool_specified"; then
7787             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7788 $as_echo "not found" >&6; }
7789             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7790           fi
7791           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7792 $as_echo "$tool_specified" >&6; }
7793         fi
7794       fi
7795     fi
7796 
7797   fi
7798 
7799 
7800 
7801   if test "x$EXPR" = x; then
7802     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7803   fi
7804 
7805 
7806 
7807 
7808 
7809   # Publish this variable in the help.
7810 
7811 
7812   if [ -z "${FILE+x}" ]; then
7813     # The variable is not set by user, try to locate tool using the code snippet
7814     for ac_prog in file
7815 do
7816   # Extract the first word of "$ac_prog", so it can be a program name with args.
7817 set dummy $ac_prog; ac_word=$2
7818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7819 $as_echo_n "checking for $ac_word... " >&6; }
7820 if ${ac_cv_path_FILE+:} false; then :
7821   $as_echo_n "(cached) " >&6
7822 else
7823   case $FILE in
7824   [\\/]* | ?:[\\/]*)
7825   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7826   ;;
7827   *)
7828   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7829 for as_dir in $PATH
7830 do
7831   IFS=$as_save_IFS
7832   test -z "$as_dir" && as_dir=.
7833     for ac_exec_ext in '' $ac_executable_extensions; do
7834   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7835     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7836     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7837     break 2
7838   fi
7839 done
7840   done
7841 IFS=$as_save_IFS
7842 
7843   ;;
7844 esac
7845 fi
7846 FILE=$ac_cv_path_FILE
7847 if test -n "$FILE"; then
7848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7849 $as_echo "$FILE" >&6; }
7850 else
7851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7852 $as_echo "no" >&6; }
7853 fi
7854 
7855 
7856   test -n "$FILE" && break
7857 done
7858 
7859   else
7860     # The variable is set, but is it from the command line or the environment?
7861 
7862     # Try to remove the string !FILE! from our list.
7863     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7864     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7865       # If it failed, the variable was not from the command line. Ignore it,
7866       # but warn the user (except for BASH, which is always set by the calling BASH).
7867       if test "xFILE" != xBASH; then
7868         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7869 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7870       fi
7871       # Try to locate tool using the code snippet
7872       for ac_prog in file
7873 do
7874   # Extract the first word of "$ac_prog", so it can be a program name with args.
7875 set dummy $ac_prog; ac_word=$2
7876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7877 $as_echo_n "checking for $ac_word... " >&6; }
7878 if ${ac_cv_path_FILE+:} false; then :
7879   $as_echo_n "(cached) " >&6
7880 else
7881   case $FILE in
7882   [\\/]* | ?:[\\/]*)
7883   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7884   ;;
7885   *)
7886   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7887 for as_dir in $PATH
7888 do
7889   IFS=$as_save_IFS
7890   test -z "$as_dir" && as_dir=.
7891     for ac_exec_ext in '' $ac_executable_extensions; do
7892   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7893     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7894     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7895     break 2
7896   fi
7897 done
7898   done
7899 IFS=$as_save_IFS
7900 
7901   ;;
7902 esac
7903 fi
7904 FILE=$ac_cv_path_FILE
7905 if test -n "$FILE"; then
7906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7907 $as_echo "$FILE" >&6; }
7908 else
7909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7910 $as_echo "no" >&6; }
7911 fi
7912 
7913 
7914   test -n "$FILE" && break
7915 done
7916 
7917     else
7918       # If it succeeded, then it was overridden by the user. We will use it
7919       # for the tool.
7920 
7921       # First remove it from the list of overridden variables, so we can test
7922       # for unknown variables in the end.
7923       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7924 
7925       # Check if we try to supply an empty value
7926       if test "x$FILE" = x; then
7927         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7928 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7929         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7930 $as_echo_n "checking for FILE... " >&6; }
7931         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7932 $as_echo "disabled" >&6; }
7933       else
7934         # Check if the provided tool contains a complete path.
7935         tool_specified="$FILE"
7936         tool_basename="${tool_specified##*/}"
7937         if test "x$tool_basename" = "x$tool_specified"; then
7938           # A command without a complete path is provided, search $PATH.
7939           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7940 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7941           # Extract the first word of "$tool_basename", so it can be a program name with args.
7942 set dummy $tool_basename; ac_word=$2
7943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7944 $as_echo_n "checking for $ac_word... " >&6; }
7945 if ${ac_cv_path_FILE+:} false; then :
7946   $as_echo_n "(cached) " >&6
7947 else
7948   case $FILE in
7949   [\\/]* | ?:[\\/]*)
7950   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7951   ;;
7952   *)
7953   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7954 for as_dir in $PATH
7955 do
7956   IFS=$as_save_IFS
7957   test -z "$as_dir" && as_dir=.
7958     for ac_exec_ext in '' $ac_executable_extensions; do
7959   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7960     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7961     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7962     break 2
7963   fi
7964 done
7965   done
7966 IFS=$as_save_IFS
7967 
7968   ;;
7969 esac
7970 fi
7971 FILE=$ac_cv_path_FILE
7972 if test -n "$FILE"; then
7973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7974 $as_echo "$FILE" >&6; }
7975 else
7976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7977 $as_echo "no" >&6; }
7978 fi
7979 
7980 
7981           if test "x$FILE" = x; then
7982             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7983           fi
7984         else
7985           # Otherwise we believe it is a complete path. Use it as it is.
7986           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7987 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7988           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7989 $as_echo_n "checking for FILE... " >&6; }
7990           if test ! -x "$tool_specified"; then
7991             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7992 $as_echo "not found" >&6; }
7993             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7994           fi
7995           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7996 $as_echo "$tool_specified" >&6; }
7997         fi
7998       fi
7999     fi
8000 
8001   fi
8002 
8003 
8004 
8005   if test "x$FILE" = x; then
8006     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8007   fi
8008 
8009 
8010 
8011 
8012 
8013   # Publish this variable in the help.
8014 
8015 
8016   if [ -z "${FIND+x}" ]; then
8017     # The variable is not set by user, try to locate tool using the code snippet
8018     for ac_prog in find
8019 do
8020   # Extract the first word of "$ac_prog", so it can be a program name with args.
8021 set dummy $ac_prog; ac_word=$2
8022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8023 $as_echo_n "checking for $ac_word... " >&6; }
8024 if ${ac_cv_path_FIND+:} false; then :
8025   $as_echo_n "(cached) " >&6
8026 else
8027   case $FIND in
8028   [\\/]* | ?:[\\/]*)
8029   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8030   ;;
8031   *)
8032   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8033 for as_dir in $PATH
8034 do
8035   IFS=$as_save_IFS
8036   test -z "$as_dir" && as_dir=.
8037     for ac_exec_ext in '' $ac_executable_extensions; do
8038   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8039     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8041     break 2
8042   fi
8043 done
8044   done
8045 IFS=$as_save_IFS
8046 
8047   ;;
8048 esac
8049 fi
8050 FIND=$ac_cv_path_FIND
8051 if test -n "$FIND"; then
8052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8053 $as_echo "$FIND" >&6; }
8054 else
8055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8056 $as_echo "no" >&6; }
8057 fi
8058 
8059 
8060   test -n "$FIND" && break
8061 done
8062 
8063   else
8064     # The variable is set, but is it from the command line or the environment?
8065 
8066     # Try to remove the string !FIND! from our list.
8067     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8068     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8069       # If it failed, the variable was not from the command line. Ignore it,
8070       # but warn the user (except for BASH, which is always set by the calling BASH).
8071       if test "xFIND" != xBASH; then
8072         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8073 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8074       fi
8075       # Try to locate tool using the code snippet
8076       for ac_prog in find
8077 do
8078   # Extract the first word of "$ac_prog", so it can be a program name with args.
8079 set dummy $ac_prog; ac_word=$2
8080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8081 $as_echo_n "checking for $ac_word... " >&6; }
8082 if ${ac_cv_path_FIND+:} false; then :
8083   $as_echo_n "(cached) " >&6
8084 else
8085   case $FIND in
8086   [\\/]* | ?:[\\/]*)
8087   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8088   ;;
8089   *)
8090   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8091 for as_dir in $PATH
8092 do
8093   IFS=$as_save_IFS
8094   test -z "$as_dir" && as_dir=.
8095     for ac_exec_ext in '' $ac_executable_extensions; do
8096   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8097     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8098     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8099     break 2
8100   fi
8101 done
8102   done
8103 IFS=$as_save_IFS
8104 
8105   ;;
8106 esac
8107 fi
8108 FIND=$ac_cv_path_FIND
8109 if test -n "$FIND"; then
8110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8111 $as_echo "$FIND" >&6; }
8112 else
8113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8114 $as_echo "no" >&6; }
8115 fi
8116 
8117 
8118   test -n "$FIND" && break
8119 done
8120 
8121     else
8122       # If it succeeded, then it was overridden by the user. We will use it
8123       # for the tool.
8124 
8125       # First remove it from the list of overridden variables, so we can test
8126       # for unknown variables in the end.
8127       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8128 
8129       # Check if we try to supply an empty value
8130       if test "x$FIND" = x; then
8131         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8132 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8133         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8134 $as_echo_n "checking for FIND... " >&6; }
8135         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8136 $as_echo "disabled" >&6; }
8137       else
8138         # Check if the provided tool contains a complete path.
8139         tool_specified="$FIND"
8140         tool_basename="${tool_specified##*/}"
8141         if test "x$tool_basename" = "x$tool_specified"; then
8142           # A command without a complete path is provided, search $PATH.
8143           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8144 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8145           # Extract the first word of "$tool_basename", so it can be a program name with args.
8146 set dummy $tool_basename; ac_word=$2
8147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8148 $as_echo_n "checking for $ac_word... " >&6; }
8149 if ${ac_cv_path_FIND+:} false; then :
8150   $as_echo_n "(cached) " >&6
8151 else
8152   case $FIND in
8153   [\\/]* | ?:[\\/]*)
8154   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8155   ;;
8156   *)
8157   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8158 for as_dir in $PATH
8159 do
8160   IFS=$as_save_IFS
8161   test -z "$as_dir" && as_dir=.
8162     for ac_exec_ext in '' $ac_executable_extensions; do
8163   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8164     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8165     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8166     break 2
8167   fi
8168 done
8169   done
8170 IFS=$as_save_IFS
8171 
8172   ;;
8173 esac
8174 fi
8175 FIND=$ac_cv_path_FIND
8176 if test -n "$FIND"; then
8177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8178 $as_echo "$FIND" >&6; }
8179 else
8180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8181 $as_echo "no" >&6; }
8182 fi
8183 
8184 
8185           if test "x$FIND" = x; then
8186             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8187           fi
8188         else
8189           # Otherwise we believe it is a complete path. Use it as it is.
8190           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8191 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8192           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8193 $as_echo_n "checking for FIND... " >&6; }
8194           if test ! -x "$tool_specified"; then
8195             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8196 $as_echo "not found" >&6; }
8197             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8198           fi
8199           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8200 $as_echo "$tool_specified" >&6; }
8201         fi
8202       fi
8203     fi
8204 
8205   fi
8206 
8207 
8208 
8209   if test "x$FIND" = x; then
8210     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8211   fi
8212 
8213 
8214 
8215 
8216 
8217   # Publish this variable in the help.
8218 
8219 
8220   if [ -z "${HEAD+x}" ]; then
8221     # The variable is not set by user, try to locate tool using the code snippet
8222     for ac_prog in head
8223 do
8224   # Extract the first word of "$ac_prog", so it can be a program name with args.
8225 set dummy $ac_prog; ac_word=$2
8226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8227 $as_echo_n "checking for $ac_word... " >&6; }
8228 if ${ac_cv_path_HEAD+:} false; then :
8229   $as_echo_n "(cached) " >&6
8230 else
8231   case $HEAD in
8232   [\\/]* | ?:[\\/]*)
8233   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8234   ;;
8235   *)
8236   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8237 for as_dir in $PATH
8238 do
8239   IFS=$as_save_IFS
8240   test -z "$as_dir" && as_dir=.
8241     for ac_exec_ext in '' $ac_executable_extensions; do
8242   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8243     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8244     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8245     break 2
8246   fi
8247 done
8248   done
8249 IFS=$as_save_IFS
8250 
8251   ;;
8252 esac
8253 fi
8254 HEAD=$ac_cv_path_HEAD
8255 if test -n "$HEAD"; then
8256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8257 $as_echo "$HEAD" >&6; }
8258 else
8259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8260 $as_echo "no" >&6; }
8261 fi
8262 
8263 
8264   test -n "$HEAD" && break
8265 done
8266 
8267   else
8268     # The variable is set, but is it from the command line or the environment?
8269 
8270     # Try to remove the string !HEAD! from our list.
8271     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8272     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8273       # If it failed, the variable was not from the command line. Ignore it,
8274       # but warn the user (except for BASH, which is always set by the calling BASH).
8275       if test "xHEAD" != xBASH; then
8276         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8277 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8278       fi
8279       # Try to locate tool using the code snippet
8280       for ac_prog in head
8281 do
8282   # Extract the first word of "$ac_prog", so it can be a program name with args.
8283 set dummy $ac_prog; ac_word=$2
8284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8285 $as_echo_n "checking for $ac_word... " >&6; }
8286 if ${ac_cv_path_HEAD+:} false; then :
8287   $as_echo_n "(cached) " >&6
8288 else
8289   case $HEAD in
8290   [\\/]* | ?:[\\/]*)
8291   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8292   ;;
8293   *)
8294   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8295 for as_dir in $PATH
8296 do
8297   IFS=$as_save_IFS
8298   test -z "$as_dir" && as_dir=.
8299     for ac_exec_ext in '' $ac_executable_extensions; do
8300   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8301     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8302     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8303     break 2
8304   fi
8305 done
8306   done
8307 IFS=$as_save_IFS
8308 
8309   ;;
8310 esac
8311 fi
8312 HEAD=$ac_cv_path_HEAD
8313 if test -n "$HEAD"; then
8314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8315 $as_echo "$HEAD" >&6; }
8316 else
8317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8318 $as_echo "no" >&6; }
8319 fi
8320 
8321 
8322   test -n "$HEAD" && break
8323 done
8324 
8325     else
8326       # If it succeeded, then it was overridden by the user. We will use it
8327       # for the tool.
8328 
8329       # First remove it from the list of overridden variables, so we can test
8330       # for unknown variables in the end.
8331       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8332 
8333       # Check if we try to supply an empty value
8334       if test "x$HEAD" = x; then
8335         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8336 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8337         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8338 $as_echo_n "checking for HEAD... " >&6; }
8339         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8340 $as_echo "disabled" >&6; }
8341       else
8342         # Check if the provided tool contains a complete path.
8343         tool_specified="$HEAD"
8344         tool_basename="${tool_specified##*/}"
8345         if test "x$tool_basename" = "x$tool_specified"; then
8346           # A command without a complete path is provided, search $PATH.
8347           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8348 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8349           # Extract the first word of "$tool_basename", so it can be a program name with args.
8350 set dummy $tool_basename; ac_word=$2
8351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8352 $as_echo_n "checking for $ac_word... " >&6; }
8353 if ${ac_cv_path_HEAD+:} false; then :
8354   $as_echo_n "(cached) " >&6
8355 else
8356   case $HEAD in
8357   [\\/]* | ?:[\\/]*)
8358   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8359   ;;
8360   *)
8361   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8362 for as_dir in $PATH
8363 do
8364   IFS=$as_save_IFS
8365   test -z "$as_dir" && as_dir=.
8366     for ac_exec_ext in '' $ac_executable_extensions; do
8367   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8368     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8369     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8370     break 2
8371   fi
8372 done
8373   done
8374 IFS=$as_save_IFS
8375 
8376   ;;
8377 esac
8378 fi
8379 HEAD=$ac_cv_path_HEAD
8380 if test -n "$HEAD"; then
8381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8382 $as_echo "$HEAD" >&6; }
8383 else
8384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8385 $as_echo "no" >&6; }
8386 fi
8387 
8388 
8389           if test "x$HEAD" = x; then
8390             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8391           fi
8392         else
8393           # Otherwise we believe it is a complete path. Use it as it is.
8394           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8395 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8396           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8397 $as_echo_n "checking for HEAD... " >&6; }
8398           if test ! -x "$tool_specified"; then
8399             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8400 $as_echo "not found" >&6; }
8401             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8402           fi
8403           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8404 $as_echo "$tool_specified" >&6; }
8405         fi
8406       fi
8407     fi
8408 
8409   fi
8410 
8411 
8412 
8413   if test "x$HEAD" = x; then
8414     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8415   fi
8416 
8417 
8418 
8419 
8420 
8421   # Publish this variable in the help.
8422 
8423 
8424   if [ -z "${GUNZIP+x}" ]; then
8425     # The variable is not set by user, try to locate tool using the code snippet
8426     for ac_prog in gunzip
8427 do
8428   # Extract the first word of "$ac_prog", so it can be a program name with args.
8429 set dummy $ac_prog; ac_word=$2
8430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8431 $as_echo_n "checking for $ac_word... " >&6; }
8432 if ${ac_cv_path_GUNZIP+:} false; then :
8433   $as_echo_n "(cached) " >&6
8434 else
8435   case $GUNZIP in
8436   [\\/]* | ?:[\\/]*)
8437   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8438   ;;
8439   *)
8440   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8441 for as_dir in $PATH
8442 do
8443   IFS=$as_save_IFS
8444   test -z "$as_dir" && as_dir=.
8445     for ac_exec_ext in '' $ac_executable_extensions; do
8446   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8447     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8448     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8449     break 2
8450   fi
8451 done
8452   done
8453 IFS=$as_save_IFS
8454 
8455   ;;
8456 esac
8457 fi
8458 GUNZIP=$ac_cv_path_GUNZIP
8459 if test -n "$GUNZIP"; then
8460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8461 $as_echo "$GUNZIP" >&6; }
8462 else
8463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8464 $as_echo "no" >&6; }
8465 fi
8466 
8467 
8468   test -n "$GUNZIP" && break
8469 done
8470 
8471   else
8472     # The variable is set, but is it from the command line or the environment?
8473 
8474     # Try to remove the string !GUNZIP! from our list.
8475     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8476     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8477       # If it failed, the variable was not from the command line. Ignore it,
8478       # but warn the user (except for BASH, which is always set by the calling BASH).
8479       if test "xGUNZIP" != xBASH; then
8480         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8481 $as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8482       fi
8483       # Try to locate tool using the code snippet
8484       for ac_prog in gunzip
8485 do
8486   # Extract the first word of "$ac_prog", so it can be a program name with args.
8487 set dummy $ac_prog; ac_word=$2
8488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8489 $as_echo_n "checking for $ac_word... " >&6; }
8490 if ${ac_cv_path_GUNZIP+:} false; then :
8491   $as_echo_n "(cached) " >&6
8492 else
8493   case $GUNZIP in
8494   [\\/]* | ?:[\\/]*)
8495   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8496   ;;
8497   *)
8498   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8499 for as_dir in $PATH
8500 do
8501   IFS=$as_save_IFS
8502   test -z "$as_dir" && as_dir=.
8503     for ac_exec_ext in '' $ac_executable_extensions; do
8504   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8505     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8506     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8507     break 2
8508   fi
8509 done
8510   done
8511 IFS=$as_save_IFS
8512 
8513   ;;
8514 esac
8515 fi
8516 GUNZIP=$ac_cv_path_GUNZIP
8517 if test -n "$GUNZIP"; then
8518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8519 $as_echo "$GUNZIP" >&6; }
8520 else
8521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8522 $as_echo "no" >&6; }
8523 fi
8524 
8525 
8526   test -n "$GUNZIP" && break
8527 done
8528 
8529     else
8530       # If it succeeded, then it was overridden by the user. We will use it
8531       # for the tool.
8532 
8533       # First remove it from the list of overridden variables, so we can test
8534       # for unknown variables in the end.
8535       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8536 
8537       # Check if we try to supply an empty value
8538       if test "x$GUNZIP" = x; then
8539         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8540 $as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8541         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8542 $as_echo_n "checking for GUNZIP... " >&6; }
8543         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8544 $as_echo "disabled" >&6; }
8545       else
8546         # Check if the provided tool contains a complete path.
8547         tool_specified="$GUNZIP"
8548         tool_basename="${tool_specified##*/}"
8549         if test "x$tool_basename" = "x$tool_specified"; then
8550           # A command without a complete path is provided, search $PATH.
8551           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8552 $as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8553           # Extract the first word of "$tool_basename", so it can be a program name with args.
8554 set dummy $tool_basename; ac_word=$2
8555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8556 $as_echo_n "checking for $ac_word... " >&6; }
8557 if ${ac_cv_path_GUNZIP+:} false; then :
8558   $as_echo_n "(cached) " >&6
8559 else
8560   case $GUNZIP in
8561   [\\/]* | ?:[\\/]*)
8562   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8563   ;;
8564   *)
8565   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8566 for as_dir in $PATH
8567 do
8568   IFS=$as_save_IFS
8569   test -z "$as_dir" && as_dir=.
8570     for ac_exec_ext in '' $ac_executable_extensions; do
8571   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8572     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8573     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8574     break 2
8575   fi
8576 done
8577   done
8578 IFS=$as_save_IFS
8579 
8580   ;;
8581 esac
8582 fi
8583 GUNZIP=$ac_cv_path_GUNZIP
8584 if test -n "$GUNZIP"; then
8585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8586 $as_echo "$GUNZIP" >&6; }
8587 else
8588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8589 $as_echo "no" >&6; }
8590 fi
8591 
8592 
8593           if test "x$GUNZIP" = x; then
8594             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8595           fi
8596         else
8597           # Otherwise we believe it is a complete path. Use it as it is.
8598           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8599 $as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8600           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8601 $as_echo_n "checking for GUNZIP... " >&6; }
8602           if test ! -x "$tool_specified"; then
8603             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8604 $as_echo "not found" >&6; }
8605             as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8606           fi
8607           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8608 $as_echo "$tool_specified" >&6; }
8609         fi
8610       fi
8611     fi
8612 
8613   fi
8614 
8615 
8616 
8617   if test "x$GUNZIP" = x; then
8618     as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8619   fi
8620 
8621 
8622 
8623 
8624 
8625   # Publish this variable in the help.
8626 
8627 
8628   if [ -z "${GZIP+x}" ]; then
8629     # The variable is not set by user, try to locate tool using the code snippet
8630     for ac_prog in pigz gzip
8631 do
8632   # Extract the first word of "$ac_prog", so it can be a program name with args.
8633 set dummy $ac_prog; ac_word=$2
8634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8635 $as_echo_n "checking for $ac_word... " >&6; }
8636 if ${ac_cv_path_GZIP+:} false; then :
8637   $as_echo_n "(cached) " >&6
8638 else
8639   case $GZIP in
8640   [\\/]* | ?:[\\/]*)
8641   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8642   ;;
8643   *)
8644   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8645 for as_dir in $PATH
8646 do
8647   IFS=$as_save_IFS
8648   test -z "$as_dir" && as_dir=.
8649     for ac_exec_ext in '' $ac_executable_extensions; do
8650   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8651     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8652     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8653     break 2
8654   fi
8655 done
8656   done
8657 IFS=$as_save_IFS
8658 
8659   ;;
8660 esac
8661 fi
8662 GZIP=$ac_cv_path_GZIP
8663 if test -n "$GZIP"; then
8664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8665 $as_echo "$GZIP" >&6; }
8666 else
8667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8668 $as_echo "no" >&6; }
8669 fi
8670 
8671 
8672   test -n "$GZIP" && break
8673 done
8674 
8675   else
8676     # The variable is set, but is it from the command line or the environment?
8677 
8678     # Try to remove the string !GZIP! from our list.
8679     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8680     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8681       # If it failed, the variable was not from the command line. Ignore it,
8682       # but warn the user (except for BASH, which is always set by the calling BASH).
8683       if test "xGZIP" != xBASH; then
8684         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8685 $as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8686       fi
8687       # Try to locate tool using the code snippet
8688       for ac_prog in pigz gzip
8689 do
8690   # Extract the first word of "$ac_prog", so it can be a program name with args.
8691 set dummy $ac_prog; ac_word=$2
8692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8693 $as_echo_n "checking for $ac_word... " >&6; }
8694 if ${ac_cv_path_GZIP+:} false; then :
8695   $as_echo_n "(cached) " >&6
8696 else
8697   case $GZIP in
8698   [\\/]* | ?:[\\/]*)
8699   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8700   ;;
8701   *)
8702   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8703 for as_dir in $PATH
8704 do
8705   IFS=$as_save_IFS
8706   test -z "$as_dir" && as_dir=.
8707     for ac_exec_ext in '' $ac_executable_extensions; do
8708   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8709     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8710     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8711     break 2
8712   fi
8713 done
8714   done
8715 IFS=$as_save_IFS
8716 
8717   ;;
8718 esac
8719 fi
8720 GZIP=$ac_cv_path_GZIP
8721 if test -n "$GZIP"; then
8722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8723 $as_echo "$GZIP" >&6; }
8724 else
8725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8726 $as_echo "no" >&6; }
8727 fi
8728 
8729 
8730   test -n "$GZIP" && break
8731 done
8732 
8733     else
8734       # If it succeeded, then it was overridden by the user. We will use it
8735       # for the tool.
8736 
8737       # First remove it from the list of overridden variables, so we can test
8738       # for unknown variables in the end.
8739       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8740 
8741       # Check if we try to supply an empty value
8742       if test "x$GZIP" = x; then
8743         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8744 $as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8745         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8746 $as_echo_n "checking for GZIP... " >&6; }
8747         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8748 $as_echo "disabled" >&6; }
8749       else
8750         # Check if the provided tool contains a complete path.
8751         tool_specified="$GZIP"
8752         tool_basename="${tool_specified##*/}"
8753         if test "x$tool_basename" = "x$tool_specified"; then
8754           # A command without a complete path is provided, search $PATH.
8755           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8756 $as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8757           # Extract the first word of "$tool_basename", so it can be a program name with args.
8758 set dummy $tool_basename; ac_word=$2
8759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8760 $as_echo_n "checking for $ac_word... " >&6; }
8761 if ${ac_cv_path_GZIP+:} false; then :
8762   $as_echo_n "(cached) " >&6
8763 else
8764   case $GZIP in
8765   [\\/]* | ?:[\\/]*)
8766   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8767   ;;
8768   *)
8769   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8770 for as_dir in $PATH
8771 do
8772   IFS=$as_save_IFS
8773   test -z "$as_dir" && as_dir=.
8774     for ac_exec_ext in '' $ac_executable_extensions; do
8775   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8776     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8777     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8778     break 2
8779   fi
8780 done
8781   done
8782 IFS=$as_save_IFS
8783 
8784   ;;
8785 esac
8786 fi
8787 GZIP=$ac_cv_path_GZIP
8788 if test -n "$GZIP"; then
8789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8790 $as_echo "$GZIP" >&6; }
8791 else
8792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8793 $as_echo "no" >&6; }
8794 fi
8795 
8796 
8797           if test "x$GZIP" = x; then
8798             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8799           fi
8800         else
8801           # Otherwise we believe it is a complete path. Use it as it is.
8802           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8803 $as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8804           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8805 $as_echo_n "checking for GZIP... " >&6; }
8806           if test ! -x "$tool_specified"; then
8807             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8808 $as_echo "not found" >&6; }
8809             as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8810           fi
8811           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8812 $as_echo "$tool_specified" >&6; }
8813         fi
8814       fi
8815     fi
8816 
8817   fi
8818 
8819 
8820 
8821   if test "x$GZIP" = x; then
8822     as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8823   fi
8824 
8825 
8826 
8827 
8828 
8829   # Publish this variable in the help.
8830 
8831 
8832   if [ -z "${LN+x}" ]; then
8833     # The variable is not set by user, try to locate tool using the code snippet
8834     for ac_prog in ln
8835 do
8836   # Extract the first word of "$ac_prog", so it can be a program name with args.
8837 set dummy $ac_prog; ac_word=$2
8838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8839 $as_echo_n "checking for $ac_word... " >&6; }
8840 if ${ac_cv_path_LN+:} false; then :
8841   $as_echo_n "(cached) " >&6
8842 else
8843   case $LN in
8844   [\\/]* | ?:[\\/]*)
8845   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8846   ;;
8847   *)
8848   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8849 for as_dir in $PATH
8850 do
8851   IFS=$as_save_IFS
8852   test -z "$as_dir" && as_dir=.
8853     for ac_exec_ext in '' $ac_executable_extensions; do
8854   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8855     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8856     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8857     break 2
8858   fi
8859 done
8860   done
8861 IFS=$as_save_IFS
8862 
8863   ;;
8864 esac
8865 fi
8866 LN=$ac_cv_path_LN
8867 if test -n "$LN"; then
8868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8869 $as_echo "$LN" >&6; }
8870 else
8871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8872 $as_echo "no" >&6; }
8873 fi
8874 
8875 
8876   test -n "$LN" && break
8877 done
8878 
8879   else
8880     # The variable is set, but is it from the command line or the environment?
8881 
8882     # Try to remove the string !LN! from our list.
8883     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8884     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8885       # If it failed, the variable was not from the command line. Ignore it,
8886       # but warn the user (except for BASH, which is always set by the calling BASH).
8887       if test "xLN" != xBASH; then
8888         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8889 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8890       fi
8891       # Try to locate tool using the code snippet
8892       for ac_prog in ln
8893 do
8894   # Extract the first word of "$ac_prog", so it can be a program name with args.
8895 set dummy $ac_prog; ac_word=$2
8896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8897 $as_echo_n "checking for $ac_word... " >&6; }
8898 if ${ac_cv_path_LN+:} false; then :
8899   $as_echo_n "(cached) " >&6
8900 else
8901   case $LN in
8902   [\\/]* | ?:[\\/]*)
8903   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8904   ;;
8905   *)
8906   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8907 for as_dir in $PATH
8908 do
8909   IFS=$as_save_IFS
8910   test -z "$as_dir" && as_dir=.
8911     for ac_exec_ext in '' $ac_executable_extensions; do
8912   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8913     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8914     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8915     break 2
8916   fi
8917 done
8918   done
8919 IFS=$as_save_IFS
8920 
8921   ;;
8922 esac
8923 fi
8924 LN=$ac_cv_path_LN
8925 if test -n "$LN"; then
8926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8927 $as_echo "$LN" >&6; }
8928 else
8929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8930 $as_echo "no" >&6; }
8931 fi
8932 
8933 
8934   test -n "$LN" && break
8935 done
8936 
8937     else
8938       # If it succeeded, then it was overridden by the user. We will use it
8939       # for the tool.
8940 
8941       # First remove it from the list of overridden variables, so we can test
8942       # for unknown variables in the end.
8943       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8944 
8945       # Check if we try to supply an empty value
8946       if test "x$LN" = x; then
8947         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8948 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8949         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8950 $as_echo_n "checking for LN... " >&6; }
8951         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8952 $as_echo "disabled" >&6; }
8953       else
8954         # Check if the provided tool contains a complete path.
8955         tool_specified="$LN"
8956         tool_basename="${tool_specified##*/}"
8957         if test "x$tool_basename" = "x$tool_specified"; then
8958           # A command without a complete path is provided, search $PATH.
8959           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8960 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8961           # Extract the first word of "$tool_basename", so it can be a program name with args.
8962 set dummy $tool_basename; ac_word=$2
8963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8964 $as_echo_n "checking for $ac_word... " >&6; }
8965 if ${ac_cv_path_LN+:} false; then :
8966   $as_echo_n "(cached) " >&6
8967 else
8968   case $LN in
8969   [\\/]* | ?:[\\/]*)
8970   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8971   ;;
8972   *)
8973   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8974 for as_dir in $PATH
8975 do
8976   IFS=$as_save_IFS
8977   test -z "$as_dir" && as_dir=.
8978     for ac_exec_ext in '' $ac_executable_extensions; do
8979   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8980     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8981     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8982     break 2
8983   fi
8984 done
8985   done
8986 IFS=$as_save_IFS
8987 
8988   ;;
8989 esac
8990 fi
8991 LN=$ac_cv_path_LN
8992 if test -n "$LN"; then
8993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8994 $as_echo "$LN" >&6; }
8995 else
8996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8997 $as_echo "no" >&6; }
8998 fi
8999 
9000 
9001           if test "x$LN" = x; then
9002             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9003           fi
9004         else
9005           # Otherwise we believe it is a complete path. Use it as it is.
9006           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9007 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9008           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9009 $as_echo_n "checking for LN... " >&6; }
9010           if test ! -x "$tool_specified"; then
9011             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9012 $as_echo "not found" >&6; }
9013             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9014           fi
9015           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9016 $as_echo "$tool_specified" >&6; }
9017         fi
9018       fi
9019     fi
9020 
9021   fi
9022 
9023 
9024 
9025   if test "x$LN" = x; then
9026     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9027   fi
9028 
9029 
9030 
9031 
9032 
9033   # Publish this variable in the help.
9034 
9035 
9036   if [ -z "${LS+x}" ]; then
9037     # The variable is not set by user, try to locate tool using the code snippet
9038     for ac_prog in ls
9039 do
9040   # Extract the first word of "$ac_prog", so it can be a program name with args.
9041 set dummy $ac_prog; ac_word=$2
9042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9043 $as_echo_n "checking for $ac_word... " >&6; }
9044 if ${ac_cv_path_LS+:} false; then :
9045   $as_echo_n "(cached) " >&6
9046 else
9047   case $LS in
9048   [\\/]* | ?:[\\/]*)
9049   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9050   ;;
9051   *)
9052   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9053 for as_dir in $PATH
9054 do
9055   IFS=$as_save_IFS
9056   test -z "$as_dir" && as_dir=.
9057     for ac_exec_ext in '' $ac_executable_extensions; do
9058   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9059     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9060     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9061     break 2
9062   fi
9063 done
9064   done
9065 IFS=$as_save_IFS
9066 
9067   ;;
9068 esac
9069 fi
9070 LS=$ac_cv_path_LS
9071 if test -n "$LS"; then
9072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9073 $as_echo "$LS" >&6; }
9074 else
9075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9076 $as_echo "no" >&6; }
9077 fi
9078 
9079 
9080   test -n "$LS" && break
9081 done
9082 
9083   else
9084     # The variable is set, but is it from the command line or the environment?
9085 
9086     # Try to remove the string !LS! from our list.
9087     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9088     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9089       # If it failed, the variable was not from the command line. Ignore it,
9090       # but warn the user (except for BASH, which is always set by the calling BASH).
9091       if test "xLS" != xBASH; then
9092         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9093 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9094       fi
9095       # Try to locate tool using the code snippet
9096       for ac_prog in ls
9097 do
9098   # Extract the first word of "$ac_prog", so it can be a program name with args.
9099 set dummy $ac_prog; ac_word=$2
9100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9101 $as_echo_n "checking for $ac_word... " >&6; }
9102 if ${ac_cv_path_LS+:} false; then :
9103   $as_echo_n "(cached) " >&6
9104 else
9105   case $LS in
9106   [\\/]* | ?:[\\/]*)
9107   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9108   ;;
9109   *)
9110   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9111 for as_dir in $PATH
9112 do
9113   IFS=$as_save_IFS
9114   test -z "$as_dir" && as_dir=.
9115     for ac_exec_ext in '' $ac_executable_extensions; do
9116   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9117     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9118     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9119     break 2
9120   fi
9121 done
9122   done
9123 IFS=$as_save_IFS
9124 
9125   ;;
9126 esac
9127 fi
9128 LS=$ac_cv_path_LS
9129 if test -n "$LS"; then
9130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9131 $as_echo "$LS" >&6; }
9132 else
9133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9134 $as_echo "no" >&6; }
9135 fi
9136 
9137 
9138   test -n "$LS" && break
9139 done
9140 
9141     else
9142       # If it succeeded, then it was overridden by the user. We will use it
9143       # for the tool.
9144 
9145       # First remove it from the list of overridden variables, so we can test
9146       # for unknown variables in the end.
9147       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9148 
9149       # Check if we try to supply an empty value
9150       if test "x$LS" = x; then
9151         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9152 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9153         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9154 $as_echo_n "checking for LS... " >&6; }
9155         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9156 $as_echo "disabled" >&6; }
9157       else
9158         # Check if the provided tool contains a complete path.
9159         tool_specified="$LS"
9160         tool_basename="${tool_specified##*/}"
9161         if test "x$tool_basename" = "x$tool_specified"; then
9162           # A command without a complete path is provided, search $PATH.
9163           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9164 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9165           # Extract the first word of "$tool_basename", so it can be a program name with args.
9166 set dummy $tool_basename; ac_word=$2
9167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9168 $as_echo_n "checking for $ac_word... " >&6; }
9169 if ${ac_cv_path_LS+:} false; then :
9170   $as_echo_n "(cached) " >&6
9171 else
9172   case $LS in
9173   [\\/]* | ?:[\\/]*)
9174   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9175   ;;
9176   *)
9177   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9178 for as_dir in $PATH
9179 do
9180   IFS=$as_save_IFS
9181   test -z "$as_dir" && as_dir=.
9182     for ac_exec_ext in '' $ac_executable_extensions; do
9183   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9184     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9186     break 2
9187   fi
9188 done
9189   done
9190 IFS=$as_save_IFS
9191 
9192   ;;
9193 esac
9194 fi
9195 LS=$ac_cv_path_LS
9196 if test -n "$LS"; then
9197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9198 $as_echo "$LS" >&6; }
9199 else
9200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9201 $as_echo "no" >&6; }
9202 fi
9203 
9204 
9205           if test "x$LS" = x; then
9206             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9207           fi
9208         else
9209           # Otherwise we believe it is a complete path. Use it as it is.
9210           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9211 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9212           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9213 $as_echo_n "checking for LS... " >&6; }
9214           if test ! -x "$tool_specified"; then
9215             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9216 $as_echo "not found" >&6; }
9217             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9218           fi
9219           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9220 $as_echo "$tool_specified" >&6; }
9221         fi
9222       fi
9223     fi
9224 
9225   fi
9226 
9227 
9228 
9229   if test "x$LS" = x; then
9230     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9231   fi
9232 
9233 
9234 
9235 
9236 
9237   # Publish this variable in the help.
9238 
9239 
9240   if [ -z "${MKDIR+x}" ]; then
9241     # The variable is not set by user, try to locate tool using the code snippet
9242     for ac_prog in mkdir
9243 do
9244   # Extract the first word of "$ac_prog", so it can be a program name with args.
9245 set dummy $ac_prog; ac_word=$2
9246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9247 $as_echo_n "checking for $ac_word... " >&6; }
9248 if ${ac_cv_path_MKDIR+:} false; then :
9249   $as_echo_n "(cached) " >&6
9250 else
9251   case $MKDIR in
9252   [\\/]* | ?:[\\/]*)
9253   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9254   ;;
9255   *)
9256   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9257 for as_dir in $PATH
9258 do
9259   IFS=$as_save_IFS
9260   test -z "$as_dir" && as_dir=.
9261     for ac_exec_ext in '' $ac_executable_extensions; do
9262   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9263     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9264     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9265     break 2
9266   fi
9267 done
9268   done
9269 IFS=$as_save_IFS
9270 
9271   ;;
9272 esac
9273 fi
9274 MKDIR=$ac_cv_path_MKDIR
9275 if test -n "$MKDIR"; then
9276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9277 $as_echo "$MKDIR" >&6; }
9278 else
9279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9280 $as_echo "no" >&6; }
9281 fi
9282 
9283 
9284   test -n "$MKDIR" && break
9285 done
9286 
9287   else
9288     # The variable is set, but is it from the command line or the environment?
9289 
9290     # Try to remove the string !MKDIR! from our list.
9291     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9292     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9293       # If it failed, the variable was not from the command line. Ignore it,
9294       # but warn the user (except for BASH, which is always set by the calling BASH).
9295       if test "xMKDIR" != xBASH; then
9296         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9297 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9298       fi
9299       # Try to locate tool using the code snippet
9300       for ac_prog in mkdir
9301 do
9302   # Extract the first word of "$ac_prog", so it can be a program name with args.
9303 set dummy $ac_prog; ac_word=$2
9304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9305 $as_echo_n "checking for $ac_word... " >&6; }
9306 if ${ac_cv_path_MKDIR+:} false; then :
9307   $as_echo_n "(cached) " >&6
9308 else
9309   case $MKDIR in
9310   [\\/]* | ?:[\\/]*)
9311   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9312   ;;
9313   *)
9314   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9315 for as_dir in $PATH
9316 do
9317   IFS=$as_save_IFS
9318   test -z "$as_dir" && as_dir=.
9319     for ac_exec_ext in '' $ac_executable_extensions; do
9320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9321     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9323     break 2
9324   fi
9325 done
9326   done
9327 IFS=$as_save_IFS
9328 
9329   ;;
9330 esac
9331 fi
9332 MKDIR=$ac_cv_path_MKDIR
9333 if test -n "$MKDIR"; then
9334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9335 $as_echo "$MKDIR" >&6; }
9336 else
9337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9338 $as_echo "no" >&6; }
9339 fi
9340 
9341 
9342   test -n "$MKDIR" && break
9343 done
9344 
9345     else
9346       # If it succeeded, then it was overridden by the user. We will use it
9347       # for the tool.
9348 
9349       # First remove it from the list of overridden variables, so we can test
9350       # for unknown variables in the end.
9351       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9352 
9353       # Check if we try to supply an empty value
9354       if test "x$MKDIR" = x; then
9355         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9356 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9357         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9358 $as_echo_n "checking for MKDIR... " >&6; }
9359         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9360 $as_echo "disabled" >&6; }
9361       else
9362         # Check if the provided tool contains a complete path.
9363         tool_specified="$MKDIR"
9364         tool_basename="${tool_specified##*/}"
9365         if test "x$tool_basename" = "x$tool_specified"; then
9366           # A command without a complete path is provided, search $PATH.
9367           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9368 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9369           # Extract the first word of "$tool_basename", so it can be a program name with args.
9370 set dummy $tool_basename; ac_word=$2
9371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9372 $as_echo_n "checking for $ac_word... " >&6; }
9373 if ${ac_cv_path_MKDIR+:} false; then :
9374   $as_echo_n "(cached) " >&6
9375 else
9376   case $MKDIR in
9377   [\\/]* | ?:[\\/]*)
9378   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9379   ;;
9380   *)
9381   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9382 for as_dir in $PATH
9383 do
9384   IFS=$as_save_IFS
9385   test -z "$as_dir" && as_dir=.
9386     for ac_exec_ext in '' $ac_executable_extensions; do
9387   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9388     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9390     break 2
9391   fi
9392 done
9393   done
9394 IFS=$as_save_IFS
9395 
9396   ;;
9397 esac
9398 fi
9399 MKDIR=$ac_cv_path_MKDIR
9400 if test -n "$MKDIR"; then
9401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9402 $as_echo "$MKDIR" >&6; }
9403 else
9404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9405 $as_echo "no" >&6; }
9406 fi
9407 
9408 
9409           if test "x$MKDIR" = x; then
9410             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9411           fi
9412         else
9413           # Otherwise we believe it is a complete path. Use it as it is.
9414           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9415 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9416           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9417 $as_echo_n "checking for MKDIR... " >&6; }
9418           if test ! -x "$tool_specified"; then
9419             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9420 $as_echo "not found" >&6; }
9421             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9422           fi
9423           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9424 $as_echo "$tool_specified" >&6; }
9425         fi
9426       fi
9427     fi
9428 
9429   fi
9430 
9431 
9432 
9433   if test "x$MKDIR" = x; then
9434     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9435   fi
9436 
9437 
9438 
9439 
9440 
9441   # Publish this variable in the help.
9442 
9443 
9444   if [ -z "${MKTEMP+x}" ]; then
9445     # The variable is not set by user, try to locate tool using the code snippet
9446     for ac_prog in mktemp
9447 do
9448   # Extract the first word of "$ac_prog", so it can be a program name with args.
9449 set dummy $ac_prog; ac_word=$2
9450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9451 $as_echo_n "checking for $ac_word... " >&6; }
9452 if ${ac_cv_path_MKTEMP+:} false; then :
9453   $as_echo_n "(cached) " >&6
9454 else
9455   case $MKTEMP in
9456   [\\/]* | ?:[\\/]*)
9457   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9458   ;;
9459   *)
9460   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9461 for as_dir in $PATH
9462 do
9463   IFS=$as_save_IFS
9464   test -z "$as_dir" && as_dir=.
9465     for ac_exec_ext in '' $ac_executable_extensions; do
9466   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9467     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9468     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9469     break 2
9470   fi
9471 done
9472   done
9473 IFS=$as_save_IFS
9474 
9475   ;;
9476 esac
9477 fi
9478 MKTEMP=$ac_cv_path_MKTEMP
9479 if test -n "$MKTEMP"; then
9480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9481 $as_echo "$MKTEMP" >&6; }
9482 else
9483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9484 $as_echo "no" >&6; }
9485 fi
9486 
9487 
9488   test -n "$MKTEMP" && break
9489 done
9490 
9491   else
9492     # The variable is set, but is it from the command line or the environment?
9493 
9494     # Try to remove the string !MKTEMP! from our list.
9495     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9496     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9497       # If it failed, the variable was not from the command line. Ignore it,
9498       # but warn the user (except for BASH, which is always set by the calling BASH).
9499       if test "xMKTEMP" != xBASH; then
9500         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9501 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9502       fi
9503       # Try to locate tool using the code snippet
9504       for ac_prog in mktemp
9505 do
9506   # Extract the first word of "$ac_prog", so it can be a program name with args.
9507 set dummy $ac_prog; ac_word=$2
9508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9509 $as_echo_n "checking for $ac_word... " >&6; }
9510 if ${ac_cv_path_MKTEMP+:} false; then :
9511   $as_echo_n "(cached) " >&6
9512 else
9513   case $MKTEMP in
9514   [\\/]* | ?:[\\/]*)
9515   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9516   ;;
9517   *)
9518   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9519 for as_dir in $PATH
9520 do
9521   IFS=$as_save_IFS
9522   test -z "$as_dir" && as_dir=.
9523     for ac_exec_ext in '' $ac_executable_extensions; do
9524   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9525     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9526     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9527     break 2
9528   fi
9529 done
9530   done
9531 IFS=$as_save_IFS
9532 
9533   ;;
9534 esac
9535 fi
9536 MKTEMP=$ac_cv_path_MKTEMP
9537 if test -n "$MKTEMP"; then
9538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9539 $as_echo "$MKTEMP" >&6; }
9540 else
9541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9542 $as_echo "no" >&6; }
9543 fi
9544 
9545 
9546   test -n "$MKTEMP" && break
9547 done
9548 
9549     else
9550       # If it succeeded, then it was overridden by the user. We will use it
9551       # for the tool.
9552 
9553       # First remove it from the list of overridden variables, so we can test
9554       # for unknown variables in the end.
9555       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9556 
9557       # Check if we try to supply an empty value
9558       if test "x$MKTEMP" = x; then
9559         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9560 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9561         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9562 $as_echo_n "checking for MKTEMP... " >&6; }
9563         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9564 $as_echo "disabled" >&6; }
9565       else
9566         # Check if the provided tool contains a complete path.
9567         tool_specified="$MKTEMP"
9568         tool_basename="${tool_specified##*/}"
9569         if test "x$tool_basename" = "x$tool_specified"; then
9570           # A command without a complete path is provided, search $PATH.
9571           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9572 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9573           # Extract the first word of "$tool_basename", so it can be a program name with args.
9574 set dummy $tool_basename; ac_word=$2
9575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9576 $as_echo_n "checking for $ac_word... " >&6; }
9577 if ${ac_cv_path_MKTEMP+:} false; then :
9578   $as_echo_n "(cached) " >&6
9579 else
9580   case $MKTEMP in
9581   [\\/]* | ?:[\\/]*)
9582   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9583   ;;
9584   *)
9585   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9586 for as_dir in $PATH
9587 do
9588   IFS=$as_save_IFS
9589   test -z "$as_dir" && as_dir=.
9590     for ac_exec_ext in '' $ac_executable_extensions; do
9591   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9592     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9593     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9594     break 2
9595   fi
9596 done
9597   done
9598 IFS=$as_save_IFS
9599 
9600   ;;
9601 esac
9602 fi
9603 MKTEMP=$ac_cv_path_MKTEMP
9604 if test -n "$MKTEMP"; then
9605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9606 $as_echo "$MKTEMP" >&6; }
9607 else
9608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9609 $as_echo "no" >&6; }
9610 fi
9611 
9612 
9613           if test "x$MKTEMP" = x; then
9614             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9615           fi
9616         else
9617           # Otherwise we believe it is a complete path. Use it as it is.
9618           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9619 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9620           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9621 $as_echo_n "checking for MKTEMP... " >&6; }
9622           if test ! -x "$tool_specified"; then
9623             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9624 $as_echo "not found" >&6; }
9625             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9626           fi
9627           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9628 $as_echo "$tool_specified" >&6; }
9629         fi
9630       fi
9631     fi
9632 
9633   fi
9634 
9635 
9636 
9637   if test "x$MKTEMP" = x; then
9638     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9639   fi
9640 
9641 
9642 
9643 
9644 
9645   # Publish this variable in the help.
9646 
9647 
9648   if [ -z "${MV+x}" ]; then
9649     # The variable is not set by user, try to locate tool using the code snippet
9650     for ac_prog in mv
9651 do
9652   # Extract the first word of "$ac_prog", so it can be a program name with args.
9653 set dummy $ac_prog; ac_word=$2
9654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9655 $as_echo_n "checking for $ac_word... " >&6; }
9656 if ${ac_cv_path_MV+:} false; then :
9657   $as_echo_n "(cached) " >&6
9658 else
9659   case $MV in
9660   [\\/]* | ?:[\\/]*)
9661   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9662   ;;
9663   *)
9664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9665 for as_dir in $PATH
9666 do
9667   IFS=$as_save_IFS
9668   test -z "$as_dir" && as_dir=.
9669     for ac_exec_ext in '' $ac_executable_extensions; do
9670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9671     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9673     break 2
9674   fi
9675 done
9676   done
9677 IFS=$as_save_IFS
9678 
9679   ;;
9680 esac
9681 fi
9682 MV=$ac_cv_path_MV
9683 if test -n "$MV"; then
9684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9685 $as_echo "$MV" >&6; }
9686 else
9687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9688 $as_echo "no" >&6; }
9689 fi
9690 
9691 
9692   test -n "$MV" && break
9693 done
9694 
9695   else
9696     # The variable is set, but is it from the command line or the environment?
9697 
9698     # Try to remove the string !MV! from our list.
9699     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9700     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9701       # If it failed, the variable was not from the command line. Ignore it,
9702       # but warn the user (except for BASH, which is always set by the calling BASH).
9703       if test "xMV" != xBASH; then
9704         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9705 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9706       fi
9707       # Try to locate tool using the code snippet
9708       for ac_prog in mv
9709 do
9710   # Extract the first word of "$ac_prog", so it can be a program name with args.
9711 set dummy $ac_prog; ac_word=$2
9712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9713 $as_echo_n "checking for $ac_word... " >&6; }
9714 if ${ac_cv_path_MV+:} false; then :
9715   $as_echo_n "(cached) " >&6
9716 else
9717   case $MV in
9718   [\\/]* | ?:[\\/]*)
9719   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9720   ;;
9721   *)
9722   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9723 for as_dir in $PATH
9724 do
9725   IFS=$as_save_IFS
9726   test -z "$as_dir" && as_dir=.
9727     for ac_exec_ext in '' $ac_executable_extensions; do
9728   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9729     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9730     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9731     break 2
9732   fi
9733 done
9734   done
9735 IFS=$as_save_IFS
9736 
9737   ;;
9738 esac
9739 fi
9740 MV=$ac_cv_path_MV
9741 if test -n "$MV"; then
9742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9743 $as_echo "$MV" >&6; }
9744 else
9745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9746 $as_echo "no" >&6; }
9747 fi
9748 
9749 
9750   test -n "$MV" && break
9751 done
9752 
9753     else
9754       # If it succeeded, then it was overridden by the user. We will use it
9755       # for the tool.
9756 
9757       # First remove it from the list of overridden variables, so we can test
9758       # for unknown variables in the end.
9759       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9760 
9761       # Check if we try to supply an empty value
9762       if test "x$MV" = x; then
9763         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9764 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9765         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9766 $as_echo_n "checking for MV... " >&6; }
9767         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9768 $as_echo "disabled" >&6; }
9769       else
9770         # Check if the provided tool contains a complete path.
9771         tool_specified="$MV"
9772         tool_basename="${tool_specified##*/}"
9773         if test "x$tool_basename" = "x$tool_specified"; then
9774           # A command without a complete path is provided, search $PATH.
9775           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9776 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9777           # Extract the first word of "$tool_basename", so it can be a program name with args.
9778 set dummy $tool_basename; ac_word=$2
9779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9780 $as_echo_n "checking for $ac_word... " >&6; }
9781 if ${ac_cv_path_MV+:} false; then :
9782   $as_echo_n "(cached) " >&6
9783 else
9784   case $MV in
9785   [\\/]* | ?:[\\/]*)
9786   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9787   ;;
9788   *)
9789   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9790 for as_dir in $PATH
9791 do
9792   IFS=$as_save_IFS
9793   test -z "$as_dir" && as_dir=.
9794     for ac_exec_ext in '' $ac_executable_extensions; do
9795   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9796     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9797     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9798     break 2
9799   fi
9800 done
9801   done
9802 IFS=$as_save_IFS
9803 
9804   ;;
9805 esac
9806 fi
9807 MV=$ac_cv_path_MV
9808 if test -n "$MV"; then
9809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9810 $as_echo "$MV" >&6; }
9811 else
9812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9813 $as_echo "no" >&6; }
9814 fi
9815 
9816 
9817           if test "x$MV" = x; then
9818             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9819           fi
9820         else
9821           # Otherwise we believe it is a complete path. Use it as it is.
9822           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9823 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9824           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9825 $as_echo_n "checking for MV... " >&6; }
9826           if test ! -x "$tool_specified"; then
9827             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9828 $as_echo "not found" >&6; }
9829             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9830           fi
9831           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9832 $as_echo "$tool_specified" >&6; }
9833         fi
9834       fi
9835     fi
9836 
9837   fi
9838 
9839 
9840 
9841   if test "x$MV" = x; then
9842     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9843   fi
9844 
9845 
9846 
9847 
9848 
9849   # Publish this variable in the help.
9850 
9851 
9852   if [ -z "${NAWK+x}" ]; then
9853     # The variable is not set by user, try to locate tool using the code snippet
9854     for ac_prog in nawk gawk awk
9855 do
9856   # Extract the first word of "$ac_prog", so it can be a program name with args.
9857 set dummy $ac_prog; ac_word=$2
9858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9859 $as_echo_n "checking for $ac_word... " >&6; }
9860 if ${ac_cv_path_NAWK+:} false; then :
9861   $as_echo_n "(cached) " >&6
9862 else
9863   case $NAWK in
9864   [\\/]* | ?:[\\/]*)
9865   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9866   ;;
9867   *)
9868   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9869 for as_dir in $PATH
9870 do
9871   IFS=$as_save_IFS
9872   test -z "$as_dir" && as_dir=.
9873     for ac_exec_ext in '' $ac_executable_extensions; do
9874   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9875     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9876     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9877     break 2
9878   fi
9879 done
9880   done
9881 IFS=$as_save_IFS
9882 
9883   ;;
9884 esac
9885 fi
9886 NAWK=$ac_cv_path_NAWK
9887 if test -n "$NAWK"; then
9888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9889 $as_echo "$NAWK" >&6; }
9890 else
9891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9892 $as_echo "no" >&6; }
9893 fi
9894 
9895 
9896   test -n "$NAWK" && break
9897 done
9898 
9899   else
9900     # The variable is set, but is it from the command line or the environment?
9901 
9902     # Try to remove the string !NAWK! from our list.
9903     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9904     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9905       # If it failed, the variable was not from the command line. Ignore it,
9906       # but warn the user (except for BASH, which is always set by the calling BASH).
9907       if test "xNAWK" != xBASH; then
9908         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9909 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9910       fi
9911       # Try to locate tool using the code snippet
9912       for ac_prog in nawk gawk awk
9913 do
9914   # Extract the first word of "$ac_prog", so it can be a program name with args.
9915 set dummy $ac_prog; ac_word=$2
9916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9917 $as_echo_n "checking for $ac_word... " >&6; }
9918 if ${ac_cv_path_NAWK+:} false; then :
9919   $as_echo_n "(cached) " >&6
9920 else
9921   case $NAWK in
9922   [\\/]* | ?:[\\/]*)
9923   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9924   ;;
9925   *)
9926   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9927 for as_dir in $PATH
9928 do
9929   IFS=$as_save_IFS
9930   test -z "$as_dir" && as_dir=.
9931     for ac_exec_ext in '' $ac_executable_extensions; do
9932   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9933     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9934     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9935     break 2
9936   fi
9937 done
9938   done
9939 IFS=$as_save_IFS
9940 
9941   ;;
9942 esac
9943 fi
9944 NAWK=$ac_cv_path_NAWK
9945 if test -n "$NAWK"; then
9946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9947 $as_echo "$NAWK" >&6; }
9948 else
9949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9950 $as_echo "no" >&6; }
9951 fi
9952 
9953 
9954   test -n "$NAWK" && break
9955 done
9956 
9957     else
9958       # If it succeeded, then it was overridden by the user. We will use it
9959       # for the tool.
9960 
9961       # First remove it from the list of overridden variables, so we can test
9962       # for unknown variables in the end.
9963       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9964 
9965       # Check if we try to supply an empty value
9966       if test "x$NAWK" = x; then
9967         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9968 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9969         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9970 $as_echo_n "checking for NAWK... " >&6; }
9971         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9972 $as_echo "disabled" >&6; }
9973       else
9974         # Check if the provided tool contains a complete path.
9975         tool_specified="$NAWK"
9976         tool_basename="${tool_specified##*/}"
9977         if test "x$tool_basename" = "x$tool_specified"; then
9978           # A command without a complete path is provided, search $PATH.
9979           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9980 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9981           # Extract the first word of "$tool_basename", so it can be a program name with args.
9982 set dummy $tool_basename; ac_word=$2
9983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9984 $as_echo_n "checking for $ac_word... " >&6; }
9985 if ${ac_cv_path_NAWK+:} false; then :
9986   $as_echo_n "(cached) " >&6
9987 else
9988   case $NAWK in
9989   [\\/]* | ?:[\\/]*)
9990   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9991   ;;
9992   *)
9993   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9994 for as_dir in $PATH
9995 do
9996   IFS=$as_save_IFS
9997   test -z "$as_dir" && as_dir=.
9998     for ac_exec_ext in '' $ac_executable_extensions; do
9999   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10000     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10001     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10002     break 2
10003   fi
10004 done
10005   done
10006 IFS=$as_save_IFS
10007 
10008   ;;
10009 esac
10010 fi
10011 NAWK=$ac_cv_path_NAWK
10012 if test -n "$NAWK"; then
10013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10014 $as_echo "$NAWK" >&6; }
10015 else
10016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10017 $as_echo "no" >&6; }
10018 fi
10019 
10020 
10021           if test "x$NAWK" = x; then
10022             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10023           fi
10024         else
10025           # Otherwise we believe it is a complete path. Use it as it is.
10026           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10027 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10028           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10029 $as_echo_n "checking for NAWK... " >&6; }
10030           if test ! -x "$tool_specified"; then
10031             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10032 $as_echo "not found" >&6; }
10033             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10034           fi
10035           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10036 $as_echo "$tool_specified" >&6; }
10037         fi
10038       fi
10039     fi
10040 
10041   fi
10042 
10043 
10044 
10045   if test "x$NAWK" = x; then
10046     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10047   fi
10048 
10049 
10050 
10051 
10052 
10053   # Publish this variable in the help.
10054 
10055 
10056   if [ -z "${PRINTF+x}" ]; then
10057     # The variable is not set by user, try to locate tool using the code snippet
10058     for ac_prog in printf
10059 do
10060   # Extract the first word of "$ac_prog", so it can be a program name with args.
10061 set dummy $ac_prog; ac_word=$2
10062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10063 $as_echo_n "checking for $ac_word... " >&6; }
10064 if ${ac_cv_path_PRINTF+:} false; then :
10065   $as_echo_n "(cached) " >&6
10066 else
10067   case $PRINTF in
10068   [\\/]* | ?:[\\/]*)
10069   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10070   ;;
10071   *)
10072   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10073 for as_dir in $PATH
10074 do
10075   IFS=$as_save_IFS
10076   test -z "$as_dir" && as_dir=.
10077     for ac_exec_ext in '' $ac_executable_extensions; do
10078   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10079     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10080     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10081     break 2
10082   fi
10083 done
10084   done
10085 IFS=$as_save_IFS
10086 
10087   ;;
10088 esac
10089 fi
10090 PRINTF=$ac_cv_path_PRINTF
10091 if test -n "$PRINTF"; then
10092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10093 $as_echo "$PRINTF" >&6; }
10094 else
10095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10096 $as_echo "no" >&6; }
10097 fi
10098 
10099 
10100   test -n "$PRINTF" && break
10101 done
10102 
10103   else
10104     # The variable is set, but is it from the command line or the environment?
10105 
10106     # Try to remove the string !PRINTF! from our list.
10107     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10108     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10109       # If it failed, the variable was not from the command line. Ignore it,
10110       # but warn the user (except for BASH, which is always set by the calling BASH).
10111       if test "xPRINTF" != xBASH; then
10112         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10113 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10114       fi
10115       # Try to locate tool using the code snippet
10116       for ac_prog in printf
10117 do
10118   # Extract the first word of "$ac_prog", so it can be a program name with args.
10119 set dummy $ac_prog; ac_word=$2
10120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10121 $as_echo_n "checking for $ac_word... " >&6; }
10122 if ${ac_cv_path_PRINTF+:} false; then :
10123   $as_echo_n "(cached) " >&6
10124 else
10125   case $PRINTF in
10126   [\\/]* | ?:[\\/]*)
10127   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10128   ;;
10129   *)
10130   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10131 for as_dir in $PATH
10132 do
10133   IFS=$as_save_IFS
10134   test -z "$as_dir" && as_dir=.
10135     for ac_exec_ext in '' $ac_executable_extensions; do
10136   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10137     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10138     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10139     break 2
10140   fi
10141 done
10142   done
10143 IFS=$as_save_IFS
10144 
10145   ;;
10146 esac
10147 fi
10148 PRINTF=$ac_cv_path_PRINTF
10149 if test -n "$PRINTF"; then
10150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10151 $as_echo "$PRINTF" >&6; }
10152 else
10153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10154 $as_echo "no" >&6; }
10155 fi
10156 
10157 
10158   test -n "$PRINTF" && break
10159 done
10160 
10161     else
10162       # If it succeeded, then it was overridden by the user. We will use it
10163       # for the tool.
10164 
10165       # First remove it from the list of overridden variables, so we can test
10166       # for unknown variables in the end.
10167       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10168 
10169       # Check if we try to supply an empty value
10170       if test "x$PRINTF" = x; then
10171         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10172 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10173         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10174 $as_echo_n "checking for PRINTF... " >&6; }
10175         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10176 $as_echo "disabled" >&6; }
10177       else
10178         # Check if the provided tool contains a complete path.
10179         tool_specified="$PRINTF"
10180         tool_basename="${tool_specified##*/}"
10181         if test "x$tool_basename" = "x$tool_specified"; then
10182           # A command without a complete path is provided, search $PATH.
10183           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10184 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10185           # Extract the first word of "$tool_basename", so it can be a program name with args.
10186 set dummy $tool_basename; ac_word=$2
10187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10188 $as_echo_n "checking for $ac_word... " >&6; }
10189 if ${ac_cv_path_PRINTF+:} false; then :
10190   $as_echo_n "(cached) " >&6
10191 else
10192   case $PRINTF in
10193   [\\/]* | ?:[\\/]*)
10194   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10195   ;;
10196   *)
10197   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10198 for as_dir in $PATH
10199 do
10200   IFS=$as_save_IFS
10201   test -z "$as_dir" && as_dir=.
10202     for ac_exec_ext in '' $ac_executable_extensions; do
10203   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10204     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10205     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10206     break 2
10207   fi
10208 done
10209   done
10210 IFS=$as_save_IFS
10211 
10212   ;;
10213 esac
10214 fi
10215 PRINTF=$ac_cv_path_PRINTF
10216 if test -n "$PRINTF"; then
10217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10218 $as_echo "$PRINTF" >&6; }
10219 else
10220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10221 $as_echo "no" >&6; }
10222 fi
10223 
10224 
10225           if test "x$PRINTF" = x; then
10226             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10227           fi
10228         else
10229           # Otherwise we believe it is a complete path. Use it as it is.
10230           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10231 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10232           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10233 $as_echo_n "checking for PRINTF... " >&6; }
10234           if test ! -x "$tool_specified"; then
10235             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10236 $as_echo "not found" >&6; }
10237             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10238           fi
10239           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10240 $as_echo "$tool_specified" >&6; }
10241         fi
10242       fi
10243     fi
10244 
10245   fi
10246 
10247 
10248 
10249   if test "x$PRINTF" = x; then
10250     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10251   fi
10252 
10253 
10254 
10255 
10256 
10257   # Publish this variable in the help.
10258 
10259 
10260   if [ -z "${RM+x}" ]; then
10261     # The variable is not set by user, try to locate tool using the code snippet
10262     for ac_prog in rm
10263 do
10264   # Extract the first word of "$ac_prog", so it can be a program name with args.
10265 set dummy $ac_prog; ac_word=$2
10266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10267 $as_echo_n "checking for $ac_word... " >&6; }
10268 if ${ac_cv_path_RM+:} false; then :
10269   $as_echo_n "(cached) " >&6
10270 else
10271   case $RM in
10272   [\\/]* | ?:[\\/]*)
10273   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10274   ;;
10275   *)
10276   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10277 for as_dir in $PATH
10278 do
10279   IFS=$as_save_IFS
10280   test -z "$as_dir" && as_dir=.
10281     for ac_exec_ext in '' $ac_executable_extensions; do
10282   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10283     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10284     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10285     break 2
10286   fi
10287 done
10288   done
10289 IFS=$as_save_IFS
10290 
10291   ;;
10292 esac
10293 fi
10294 RM=$ac_cv_path_RM
10295 if test -n "$RM"; then
10296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10297 $as_echo "$RM" >&6; }
10298 else
10299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10300 $as_echo "no" >&6; }
10301 fi
10302 
10303 
10304   test -n "$RM" && break
10305 done
10306 
10307   else
10308     # The variable is set, but is it from the command line or the environment?
10309 
10310     # Try to remove the string !RM! from our list.
10311     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10312     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10313       # If it failed, the variable was not from the command line. Ignore it,
10314       # but warn the user (except for BASH, which is always set by the calling BASH).
10315       if test "xRM" != xBASH; then
10316         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10317 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10318       fi
10319       # Try to locate tool using the code snippet
10320       for ac_prog in rm
10321 do
10322   # Extract the first word of "$ac_prog", so it can be a program name with args.
10323 set dummy $ac_prog; ac_word=$2
10324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10325 $as_echo_n "checking for $ac_word... " >&6; }
10326 if ${ac_cv_path_RM+:} false; then :
10327   $as_echo_n "(cached) " >&6
10328 else
10329   case $RM in
10330   [\\/]* | ?:[\\/]*)
10331   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10332   ;;
10333   *)
10334   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10335 for as_dir in $PATH
10336 do
10337   IFS=$as_save_IFS
10338   test -z "$as_dir" && as_dir=.
10339     for ac_exec_ext in '' $ac_executable_extensions; do
10340   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10341     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10342     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10343     break 2
10344   fi
10345 done
10346   done
10347 IFS=$as_save_IFS
10348 
10349   ;;
10350 esac
10351 fi
10352 RM=$ac_cv_path_RM
10353 if test -n "$RM"; then
10354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10355 $as_echo "$RM" >&6; }
10356 else
10357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10358 $as_echo "no" >&6; }
10359 fi
10360 
10361 
10362   test -n "$RM" && break
10363 done
10364 
10365     else
10366       # If it succeeded, then it was overridden by the user. We will use it
10367       # for the tool.
10368 
10369       # First remove it from the list of overridden variables, so we can test
10370       # for unknown variables in the end.
10371       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10372 
10373       # Check if we try to supply an empty value
10374       if test "x$RM" = x; then
10375         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10376 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10377         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10378 $as_echo_n "checking for RM... " >&6; }
10379         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10380 $as_echo "disabled" >&6; }
10381       else
10382         # Check if the provided tool contains a complete path.
10383         tool_specified="$RM"
10384         tool_basename="${tool_specified##*/}"
10385         if test "x$tool_basename" = "x$tool_specified"; then
10386           # A command without a complete path is provided, search $PATH.
10387           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10388 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10389           # Extract the first word of "$tool_basename", so it can be a program name with args.
10390 set dummy $tool_basename; ac_word=$2
10391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10392 $as_echo_n "checking for $ac_word... " >&6; }
10393 if ${ac_cv_path_RM+:} false; then :
10394   $as_echo_n "(cached) " >&6
10395 else
10396   case $RM in
10397   [\\/]* | ?:[\\/]*)
10398   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10399   ;;
10400   *)
10401   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10402 for as_dir in $PATH
10403 do
10404   IFS=$as_save_IFS
10405   test -z "$as_dir" && as_dir=.
10406     for ac_exec_ext in '' $ac_executable_extensions; do
10407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10408     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10410     break 2
10411   fi
10412 done
10413   done
10414 IFS=$as_save_IFS
10415 
10416   ;;
10417 esac
10418 fi
10419 RM=$ac_cv_path_RM
10420 if test -n "$RM"; then
10421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10422 $as_echo "$RM" >&6; }
10423 else
10424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10425 $as_echo "no" >&6; }
10426 fi
10427 
10428 
10429           if test "x$RM" = x; then
10430             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10431           fi
10432         else
10433           # Otherwise we believe it is a complete path. Use it as it is.
10434           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10435 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10436           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10437 $as_echo_n "checking for RM... " >&6; }
10438           if test ! -x "$tool_specified"; then
10439             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10440 $as_echo "not found" >&6; }
10441             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10442           fi
10443           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10444 $as_echo "$tool_specified" >&6; }
10445         fi
10446       fi
10447     fi
10448 
10449   fi
10450 
10451 
10452 
10453   if test "x$RM" = x; then
10454     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10455   fi
10456 
10457 
10458 
10459 
10460 
10461   # Publish this variable in the help.
10462 
10463 
10464   if [ -z "${RMDIR+x}" ]; then
10465     # The variable is not set by user, try to locate tool using the code snippet
10466     for ac_prog in rmdir
10467 do
10468   # Extract the first word of "$ac_prog", so it can be a program name with args.
10469 set dummy $ac_prog; ac_word=$2
10470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10471 $as_echo_n "checking for $ac_word... " >&6; }
10472 if ${ac_cv_path_RMDIR+:} false; then :
10473   $as_echo_n "(cached) " >&6
10474 else
10475   case $RMDIR in
10476   [\\/]* | ?:[\\/]*)
10477   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10478   ;;
10479   *)
10480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10481 for as_dir in $PATH
10482 do
10483   IFS=$as_save_IFS
10484   test -z "$as_dir" && as_dir=.
10485     for ac_exec_ext in '' $ac_executable_extensions; do
10486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10487     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10489     break 2
10490   fi
10491 done
10492   done
10493 IFS=$as_save_IFS
10494 
10495   ;;
10496 esac
10497 fi
10498 RMDIR=$ac_cv_path_RMDIR
10499 if test -n "$RMDIR"; then
10500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10501 $as_echo "$RMDIR" >&6; }
10502 else
10503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10504 $as_echo "no" >&6; }
10505 fi
10506 
10507 
10508   test -n "$RMDIR" && break
10509 done
10510 
10511   else
10512     # The variable is set, but is it from the command line or the environment?
10513 
10514     # Try to remove the string !RMDIR! from our list.
10515     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10516     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10517       # If it failed, the variable was not from the command line. Ignore it,
10518       # but warn the user (except for BASH, which is always set by the calling BASH).
10519       if test "xRMDIR" != xBASH; then
10520         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10521 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10522       fi
10523       # Try to locate tool using the code snippet
10524       for ac_prog in rmdir
10525 do
10526   # Extract the first word of "$ac_prog", so it can be a program name with args.
10527 set dummy $ac_prog; ac_word=$2
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10529 $as_echo_n "checking for $ac_word... " >&6; }
10530 if ${ac_cv_path_RMDIR+:} false; then :
10531   $as_echo_n "(cached) " >&6
10532 else
10533   case $RMDIR in
10534   [\\/]* | ?:[\\/]*)
10535   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10536   ;;
10537   *)
10538   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10539 for as_dir in $PATH
10540 do
10541   IFS=$as_save_IFS
10542   test -z "$as_dir" && as_dir=.
10543     for ac_exec_ext in '' $ac_executable_extensions; do
10544   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10545     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10546     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10547     break 2
10548   fi
10549 done
10550   done
10551 IFS=$as_save_IFS
10552 
10553   ;;
10554 esac
10555 fi
10556 RMDIR=$ac_cv_path_RMDIR
10557 if test -n "$RMDIR"; then
10558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10559 $as_echo "$RMDIR" >&6; }
10560 else
10561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10562 $as_echo "no" >&6; }
10563 fi
10564 
10565 
10566   test -n "$RMDIR" && break
10567 done
10568 
10569     else
10570       # If it succeeded, then it was overridden by the user. We will use it
10571       # for the tool.
10572 
10573       # First remove it from the list of overridden variables, so we can test
10574       # for unknown variables in the end.
10575       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10576 
10577       # Check if we try to supply an empty value
10578       if test "x$RMDIR" = x; then
10579         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10580 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10581         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10582 $as_echo_n "checking for RMDIR... " >&6; }
10583         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10584 $as_echo "disabled" >&6; }
10585       else
10586         # Check if the provided tool contains a complete path.
10587         tool_specified="$RMDIR"
10588         tool_basename="${tool_specified##*/}"
10589         if test "x$tool_basename" = "x$tool_specified"; then
10590           # A command without a complete path is provided, search $PATH.
10591           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10592 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10593           # Extract the first word of "$tool_basename", so it can be a program name with args.
10594 set dummy $tool_basename; ac_word=$2
10595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10596 $as_echo_n "checking for $ac_word... " >&6; }
10597 if ${ac_cv_path_RMDIR+:} false; then :
10598   $as_echo_n "(cached) " >&6
10599 else
10600   case $RMDIR in
10601   [\\/]* | ?:[\\/]*)
10602   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10603   ;;
10604   *)
10605   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10606 for as_dir in $PATH
10607 do
10608   IFS=$as_save_IFS
10609   test -z "$as_dir" && as_dir=.
10610     for ac_exec_ext in '' $ac_executable_extensions; do
10611   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10612     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10613     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10614     break 2
10615   fi
10616 done
10617   done
10618 IFS=$as_save_IFS
10619 
10620   ;;
10621 esac
10622 fi
10623 RMDIR=$ac_cv_path_RMDIR
10624 if test -n "$RMDIR"; then
10625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10626 $as_echo "$RMDIR" >&6; }
10627 else
10628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10629 $as_echo "no" >&6; }
10630 fi
10631 
10632 
10633           if test "x$RMDIR" = x; then
10634             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10635           fi
10636         else
10637           # Otherwise we believe it is a complete path. Use it as it is.
10638           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10639 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10640           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10641 $as_echo_n "checking for RMDIR... " >&6; }
10642           if test ! -x "$tool_specified"; then
10643             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10644 $as_echo "not found" >&6; }
10645             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10646           fi
10647           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10648 $as_echo "$tool_specified" >&6; }
10649         fi
10650       fi
10651     fi
10652 
10653   fi
10654 
10655 
10656 
10657   if test "x$RMDIR" = x; then
10658     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10659   fi
10660 
10661 
10662 
10663 
10664 
10665   # Publish this variable in the help.
10666 
10667 
10668   if [ -z "${SH+x}" ]; then
10669     # The variable is not set by user, try to locate tool using the code snippet
10670     for ac_prog in sh
10671 do
10672   # Extract the first word of "$ac_prog", so it can be a program name with args.
10673 set dummy $ac_prog; ac_word=$2
10674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10675 $as_echo_n "checking for $ac_word... " >&6; }
10676 if ${ac_cv_path_SH+:} false; then :
10677   $as_echo_n "(cached) " >&6
10678 else
10679   case $SH in
10680   [\\/]* | ?:[\\/]*)
10681   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10682   ;;
10683   *)
10684   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10685 for as_dir in $PATH
10686 do
10687   IFS=$as_save_IFS
10688   test -z "$as_dir" && as_dir=.
10689     for ac_exec_ext in '' $ac_executable_extensions; do
10690   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10691     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10692     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10693     break 2
10694   fi
10695 done
10696   done
10697 IFS=$as_save_IFS
10698 
10699   ;;
10700 esac
10701 fi
10702 SH=$ac_cv_path_SH
10703 if test -n "$SH"; then
10704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10705 $as_echo "$SH" >&6; }
10706 else
10707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10708 $as_echo "no" >&6; }
10709 fi
10710 
10711 
10712   test -n "$SH" && break
10713 done
10714 
10715   else
10716     # The variable is set, but is it from the command line or the environment?
10717 
10718     # Try to remove the string !SH! from our list.
10719     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10720     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10721       # If it failed, the variable was not from the command line. Ignore it,
10722       # but warn the user (except for BASH, which is always set by the calling BASH).
10723       if test "xSH" != xBASH; then
10724         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10725 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10726       fi
10727       # Try to locate tool using the code snippet
10728       for ac_prog in sh
10729 do
10730   # Extract the first word of "$ac_prog", so it can be a program name with args.
10731 set dummy $ac_prog; ac_word=$2
10732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10733 $as_echo_n "checking for $ac_word... " >&6; }
10734 if ${ac_cv_path_SH+:} false; then :
10735   $as_echo_n "(cached) " >&6
10736 else
10737   case $SH in
10738   [\\/]* | ?:[\\/]*)
10739   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10740   ;;
10741   *)
10742   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10743 for as_dir in $PATH
10744 do
10745   IFS=$as_save_IFS
10746   test -z "$as_dir" && as_dir=.
10747     for ac_exec_ext in '' $ac_executable_extensions; do
10748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10749     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10750     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10751     break 2
10752   fi
10753 done
10754   done
10755 IFS=$as_save_IFS
10756 
10757   ;;
10758 esac
10759 fi
10760 SH=$ac_cv_path_SH
10761 if test -n "$SH"; then
10762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10763 $as_echo "$SH" >&6; }
10764 else
10765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10766 $as_echo "no" >&6; }
10767 fi
10768 
10769 
10770   test -n "$SH" && break
10771 done
10772 
10773     else
10774       # If it succeeded, then it was overridden by the user. We will use it
10775       # for the tool.
10776 
10777       # First remove it from the list of overridden variables, so we can test
10778       # for unknown variables in the end.
10779       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10780 
10781       # Check if we try to supply an empty value
10782       if test "x$SH" = x; then
10783         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10784 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10785         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10786 $as_echo_n "checking for SH... " >&6; }
10787         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10788 $as_echo "disabled" >&6; }
10789       else
10790         # Check if the provided tool contains a complete path.
10791         tool_specified="$SH"
10792         tool_basename="${tool_specified##*/}"
10793         if test "x$tool_basename" = "x$tool_specified"; then
10794           # A command without a complete path is provided, search $PATH.
10795           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10796 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10797           # Extract the first word of "$tool_basename", so it can be a program name with args.
10798 set dummy $tool_basename; ac_word=$2
10799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10800 $as_echo_n "checking for $ac_word... " >&6; }
10801 if ${ac_cv_path_SH+:} false; then :
10802   $as_echo_n "(cached) " >&6
10803 else
10804   case $SH in
10805   [\\/]* | ?:[\\/]*)
10806   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10807   ;;
10808   *)
10809   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10810 for as_dir in $PATH
10811 do
10812   IFS=$as_save_IFS
10813   test -z "$as_dir" && as_dir=.
10814     for ac_exec_ext in '' $ac_executable_extensions; do
10815   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10816     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10817     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10818     break 2
10819   fi
10820 done
10821   done
10822 IFS=$as_save_IFS
10823 
10824   ;;
10825 esac
10826 fi
10827 SH=$ac_cv_path_SH
10828 if test -n "$SH"; then
10829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10830 $as_echo "$SH" >&6; }
10831 else
10832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10833 $as_echo "no" >&6; }
10834 fi
10835 
10836 
10837           if test "x$SH" = x; then
10838             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10839           fi
10840         else
10841           # Otherwise we believe it is a complete path. Use it as it is.
10842           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10843 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10844           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10845 $as_echo_n "checking for SH... " >&6; }
10846           if test ! -x "$tool_specified"; then
10847             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10848 $as_echo "not found" >&6; }
10849             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10850           fi
10851           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10852 $as_echo "$tool_specified" >&6; }
10853         fi
10854       fi
10855     fi
10856 
10857   fi
10858 
10859 
10860 
10861   if test "x$SH" = x; then
10862     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10863   fi
10864 
10865 
10866 
10867 
10868 
10869   # Publish this variable in the help.
10870 
10871 
10872   if [ -z "${SORT+x}" ]; then
10873     # The variable is not set by user, try to locate tool using the code snippet
10874     for ac_prog in sort
10875 do
10876   # Extract the first word of "$ac_prog", so it can be a program name with args.
10877 set dummy $ac_prog; ac_word=$2
10878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10879 $as_echo_n "checking for $ac_word... " >&6; }
10880 if ${ac_cv_path_SORT+:} false; then :
10881   $as_echo_n "(cached) " >&6
10882 else
10883   case $SORT in
10884   [\\/]* | ?:[\\/]*)
10885   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10886   ;;
10887   *)
10888   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10889 for as_dir in $PATH
10890 do
10891   IFS=$as_save_IFS
10892   test -z "$as_dir" && as_dir=.
10893     for ac_exec_ext in '' $ac_executable_extensions; do
10894   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10895     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10896     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10897     break 2
10898   fi
10899 done
10900   done
10901 IFS=$as_save_IFS
10902 
10903   ;;
10904 esac
10905 fi
10906 SORT=$ac_cv_path_SORT
10907 if test -n "$SORT"; then
10908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10909 $as_echo "$SORT" >&6; }
10910 else
10911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10912 $as_echo "no" >&6; }
10913 fi
10914 
10915 
10916   test -n "$SORT" && break
10917 done
10918 
10919   else
10920     # The variable is set, but is it from the command line or the environment?
10921 
10922     # Try to remove the string !SORT! from our list.
10923     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10924     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10925       # If it failed, the variable was not from the command line. Ignore it,
10926       # but warn the user (except for BASH, which is always set by the calling BASH).
10927       if test "xSORT" != xBASH; then
10928         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10929 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10930       fi
10931       # Try to locate tool using the code snippet
10932       for ac_prog in sort
10933 do
10934   # Extract the first word of "$ac_prog", so it can be a program name with args.
10935 set dummy $ac_prog; ac_word=$2
10936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10937 $as_echo_n "checking for $ac_word... " >&6; }
10938 if ${ac_cv_path_SORT+:} false; then :
10939   $as_echo_n "(cached) " >&6
10940 else
10941   case $SORT in
10942   [\\/]* | ?:[\\/]*)
10943   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10944   ;;
10945   *)
10946   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10947 for as_dir in $PATH
10948 do
10949   IFS=$as_save_IFS
10950   test -z "$as_dir" && as_dir=.
10951     for ac_exec_ext in '' $ac_executable_extensions; do
10952   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10953     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10954     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10955     break 2
10956   fi
10957 done
10958   done
10959 IFS=$as_save_IFS
10960 
10961   ;;
10962 esac
10963 fi
10964 SORT=$ac_cv_path_SORT
10965 if test -n "$SORT"; then
10966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10967 $as_echo "$SORT" >&6; }
10968 else
10969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10970 $as_echo "no" >&6; }
10971 fi
10972 
10973 
10974   test -n "$SORT" && break
10975 done
10976 
10977     else
10978       # If it succeeded, then it was overridden by the user. We will use it
10979       # for the tool.
10980 
10981       # First remove it from the list of overridden variables, so we can test
10982       # for unknown variables in the end.
10983       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10984 
10985       # Check if we try to supply an empty value
10986       if test "x$SORT" = x; then
10987         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10988 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10989         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10990 $as_echo_n "checking for SORT... " >&6; }
10991         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10992 $as_echo "disabled" >&6; }
10993       else
10994         # Check if the provided tool contains a complete path.
10995         tool_specified="$SORT"
10996         tool_basename="${tool_specified##*/}"
10997         if test "x$tool_basename" = "x$tool_specified"; then
10998           # A command without a complete path is provided, search $PATH.
10999           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11000 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11001           # Extract the first word of "$tool_basename", so it can be a program name with args.
11002 set dummy $tool_basename; ac_word=$2
11003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11004 $as_echo_n "checking for $ac_word... " >&6; }
11005 if ${ac_cv_path_SORT+:} false; then :
11006   $as_echo_n "(cached) " >&6
11007 else
11008   case $SORT in
11009   [\\/]* | ?:[\\/]*)
11010   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11011   ;;
11012   *)
11013   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11014 for as_dir in $PATH
11015 do
11016   IFS=$as_save_IFS
11017   test -z "$as_dir" && as_dir=.
11018     for ac_exec_ext in '' $ac_executable_extensions; do
11019   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11020     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11021     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11022     break 2
11023   fi
11024 done
11025   done
11026 IFS=$as_save_IFS
11027 
11028   ;;
11029 esac
11030 fi
11031 SORT=$ac_cv_path_SORT
11032 if test -n "$SORT"; then
11033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11034 $as_echo "$SORT" >&6; }
11035 else
11036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11037 $as_echo "no" >&6; }
11038 fi
11039 
11040 
11041           if test "x$SORT" = x; then
11042             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11043           fi
11044         else
11045           # Otherwise we believe it is a complete path. Use it as it is.
11046           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11047 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11048           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11049 $as_echo_n "checking for SORT... " >&6; }
11050           if test ! -x "$tool_specified"; then
11051             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11052 $as_echo "not found" >&6; }
11053             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11054           fi
11055           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11056 $as_echo "$tool_specified" >&6; }
11057         fi
11058       fi
11059     fi
11060 
11061   fi
11062 
11063 
11064 
11065   if test "x$SORT" = x; then
11066     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11067   fi
11068 
11069 
11070 
11071 
11072 
11073   # Publish this variable in the help.
11074 
11075 
11076   if [ -z "${TAIL+x}" ]; then
11077     # The variable is not set by user, try to locate tool using the code snippet
11078     for ac_prog in tail
11079 do
11080   # Extract the first word of "$ac_prog", so it can be a program name with args.
11081 set dummy $ac_prog; ac_word=$2
11082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11083 $as_echo_n "checking for $ac_word... " >&6; }
11084 if ${ac_cv_path_TAIL+:} false; then :
11085   $as_echo_n "(cached) " >&6
11086 else
11087   case $TAIL in
11088   [\\/]* | ?:[\\/]*)
11089   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11090   ;;
11091   *)
11092   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11093 for as_dir in $PATH
11094 do
11095   IFS=$as_save_IFS
11096   test -z "$as_dir" && as_dir=.
11097     for ac_exec_ext in '' $ac_executable_extensions; do
11098   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11099     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11100     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11101     break 2
11102   fi
11103 done
11104   done
11105 IFS=$as_save_IFS
11106 
11107   ;;
11108 esac
11109 fi
11110 TAIL=$ac_cv_path_TAIL
11111 if test -n "$TAIL"; then
11112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11113 $as_echo "$TAIL" >&6; }
11114 else
11115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11116 $as_echo "no" >&6; }
11117 fi
11118 
11119 
11120   test -n "$TAIL" && break
11121 done
11122 
11123   else
11124     # The variable is set, but is it from the command line or the environment?
11125 
11126     # Try to remove the string !TAIL! from our list.
11127     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11128     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11129       # If it failed, the variable was not from the command line. Ignore it,
11130       # but warn the user (except for BASH, which is always set by the calling BASH).
11131       if test "xTAIL" != xBASH; then
11132         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11133 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11134       fi
11135       # Try to locate tool using the code snippet
11136       for ac_prog in tail
11137 do
11138   # Extract the first word of "$ac_prog", so it can be a program name with args.
11139 set dummy $ac_prog; ac_word=$2
11140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11141 $as_echo_n "checking for $ac_word... " >&6; }
11142 if ${ac_cv_path_TAIL+:} false; then :
11143   $as_echo_n "(cached) " >&6
11144 else
11145   case $TAIL in
11146   [\\/]* | ?:[\\/]*)
11147   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11148   ;;
11149   *)
11150   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11151 for as_dir in $PATH
11152 do
11153   IFS=$as_save_IFS
11154   test -z "$as_dir" && as_dir=.
11155     for ac_exec_ext in '' $ac_executable_extensions; do
11156   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11157     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11158     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11159     break 2
11160   fi
11161 done
11162   done
11163 IFS=$as_save_IFS
11164 
11165   ;;
11166 esac
11167 fi
11168 TAIL=$ac_cv_path_TAIL
11169 if test -n "$TAIL"; then
11170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11171 $as_echo "$TAIL" >&6; }
11172 else
11173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11174 $as_echo "no" >&6; }
11175 fi
11176 
11177 
11178   test -n "$TAIL" && break
11179 done
11180 
11181     else
11182       # If it succeeded, then it was overridden by the user. We will use it
11183       # for the tool.
11184 
11185       # First remove it from the list of overridden variables, so we can test
11186       # for unknown variables in the end.
11187       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11188 
11189       # Check if we try to supply an empty value
11190       if test "x$TAIL" = x; then
11191         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11192 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11193         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11194 $as_echo_n "checking for TAIL... " >&6; }
11195         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11196 $as_echo "disabled" >&6; }
11197       else
11198         # Check if the provided tool contains a complete path.
11199         tool_specified="$TAIL"
11200         tool_basename="${tool_specified##*/}"
11201         if test "x$tool_basename" = "x$tool_specified"; then
11202           # A command without a complete path is provided, search $PATH.
11203           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11204 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11205           # Extract the first word of "$tool_basename", so it can be a program name with args.
11206 set dummy $tool_basename; ac_word=$2
11207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11208 $as_echo_n "checking for $ac_word... " >&6; }
11209 if ${ac_cv_path_TAIL+:} false; then :
11210   $as_echo_n "(cached) " >&6
11211 else
11212   case $TAIL in
11213   [\\/]* | ?:[\\/]*)
11214   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11215   ;;
11216   *)
11217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11218 for as_dir in $PATH
11219 do
11220   IFS=$as_save_IFS
11221   test -z "$as_dir" && as_dir=.
11222     for ac_exec_ext in '' $ac_executable_extensions; do
11223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11224     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11226     break 2
11227   fi
11228 done
11229   done
11230 IFS=$as_save_IFS
11231 
11232   ;;
11233 esac
11234 fi
11235 TAIL=$ac_cv_path_TAIL
11236 if test -n "$TAIL"; then
11237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11238 $as_echo "$TAIL" >&6; }
11239 else
11240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11241 $as_echo "no" >&6; }
11242 fi
11243 
11244 
11245           if test "x$TAIL" = x; then
11246             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11247           fi
11248         else
11249           # Otherwise we believe it is a complete path. Use it as it is.
11250           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11251 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11252           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11253 $as_echo_n "checking for TAIL... " >&6; }
11254           if test ! -x "$tool_specified"; then
11255             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11256 $as_echo "not found" >&6; }
11257             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11258           fi
11259           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11260 $as_echo "$tool_specified" >&6; }
11261         fi
11262       fi
11263     fi
11264 
11265   fi
11266 
11267 
11268 
11269   if test "x$TAIL" = x; then
11270     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11271   fi
11272 
11273 
11274 
11275 
11276 
11277   # Publish this variable in the help.
11278 
11279 
11280   if [ -z "${TAR+x}" ]; then
11281     # The variable is not set by user, try to locate tool using the code snippet
11282     for ac_prog in gtar tar
11283 do
11284   # Extract the first word of "$ac_prog", so it can be a program name with args.
11285 set dummy $ac_prog; ac_word=$2
11286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11287 $as_echo_n "checking for $ac_word... " >&6; }
11288 if ${ac_cv_path_TAR+:} false; then :
11289   $as_echo_n "(cached) " >&6
11290 else
11291   case $TAR in
11292   [\\/]* | ?:[\\/]*)
11293   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11294   ;;
11295   *)
11296   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11297 for as_dir in $PATH
11298 do
11299   IFS=$as_save_IFS
11300   test -z "$as_dir" && as_dir=.
11301     for ac_exec_ext in '' $ac_executable_extensions; do
11302   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11303     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11304     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11305     break 2
11306   fi
11307 done
11308   done
11309 IFS=$as_save_IFS
11310 
11311   ;;
11312 esac
11313 fi
11314 TAR=$ac_cv_path_TAR
11315 if test -n "$TAR"; then
11316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11317 $as_echo "$TAR" >&6; }
11318 else
11319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11320 $as_echo "no" >&6; }
11321 fi
11322 
11323 
11324   test -n "$TAR" && break
11325 done
11326 
11327   else
11328     # The variable is set, but is it from the command line or the environment?
11329 
11330     # Try to remove the string !TAR! from our list.
11331     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11332     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11333       # If it failed, the variable was not from the command line. Ignore it,
11334       # but warn the user (except for BASH, which is always set by the calling BASH).
11335       if test "xTAR" != xBASH; then
11336         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11337 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11338       fi
11339       # Try to locate tool using the code snippet
11340       for ac_prog in gtar tar
11341 do
11342   # Extract the first word of "$ac_prog", so it can be a program name with args.
11343 set dummy $ac_prog; ac_word=$2
11344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11345 $as_echo_n "checking for $ac_word... " >&6; }
11346 if ${ac_cv_path_TAR+:} false; then :
11347   $as_echo_n "(cached) " >&6
11348 else
11349   case $TAR in
11350   [\\/]* | ?:[\\/]*)
11351   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11352   ;;
11353   *)
11354   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11355 for as_dir in $PATH
11356 do
11357   IFS=$as_save_IFS
11358   test -z "$as_dir" && as_dir=.
11359     for ac_exec_ext in '' $ac_executable_extensions; do
11360   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11361     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11362     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11363     break 2
11364   fi
11365 done
11366   done
11367 IFS=$as_save_IFS
11368 
11369   ;;
11370 esac
11371 fi
11372 TAR=$ac_cv_path_TAR
11373 if test -n "$TAR"; then
11374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11375 $as_echo "$TAR" >&6; }
11376 else
11377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11378 $as_echo "no" >&6; }
11379 fi
11380 
11381 
11382   test -n "$TAR" && break
11383 done
11384 
11385     else
11386       # If it succeeded, then it was overridden by the user. We will use it
11387       # for the tool.
11388 
11389       # First remove it from the list of overridden variables, so we can test
11390       # for unknown variables in the end.
11391       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11392 
11393       # Check if we try to supply an empty value
11394       if test "x$TAR" = x; then
11395         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11396 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11397         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11398 $as_echo_n "checking for TAR... " >&6; }
11399         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11400 $as_echo "disabled" >&6; }
11401       else
11402         # Check if the provided tool contains a complete path.
11403         tool_specified="$TAR"
11404         tool_basename="${tool_specified##*/}"
11405         if test "x$tool_basename" = "x$tool_specified"; then
11406           # A command without a complete path is provided, search $PATH.
11407           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11408 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11409           # Extract the first word of "$tool_basename", so it can be a program name with args.
11410 set dummy $tool_basename; ac_word=$2
11411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11412 $as_echo_n "checking for $ac_word... " >&6; }
11413 if ${ac_cv_path_TAR+:} false; then :
11414   $as_echo_n "(cached) " >&6
11415 else
11416   case $TAR in
11417   [\\/]* | ?:[\\/]*)
11418   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11419   ;;
11420   *)
11421   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11422 for as_dir in $PATH
11423 do
11424   IFS=$as_save_IFS
11425   test -z "$as_dir" && as_dir=.
11426     for ac_exec_ext in '' $ac_executable_extensions; do
11427   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11428     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11430     break 2
11431   fi
11432 done
11433   done
11434 IFS=$as_save_IFS
11435 
11436   ;;
11437 esac
11438 fi
11439 TAR=$ac_cv_path_TAR
11440 if test -n "$TAR"; then
11441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11442 $as_echo "$TAR" >&6; }
11443 else
11444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11445 $as_echo "no" >&6; }
11446 fi
11447 
11448 
11449           if test "x$TAR" = x; then
11450             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11451           fi
11452         else
11453           # Otherwise we believe it is a complete path. Use it as it is.
11454           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11455 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11456           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11457 $as_echo_n "checking for TAR... " >&6; }
11458           if test ! -x "$tool_specified"; then
11459             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11460 $as_echo "not found" >&6; }
11461             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11462           fi
11463           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11464 $as_echo "$tool_specified" >&6; }
11465         fi
11466       fi
11467     fi
11468 
11469   fi
11470 
11471 
11472 
11473   if test "x$TAR" = x; then
11474     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11475   fi
11476 
11477 
11478 
11479 
11480 
11481   # Publish this variable in the help.
11482 
11483 
11484   if [ -z "${TEE+x}" ]; then
11485     # The variable is not set by user, try to locate tool using the code snippet
11486     for ac_prog in tee
11487 do
11488   # Extract the first word of "$ac_prog", so it can be a program name with args.
11489 set dummy $ac_prog; ac_word=$2
11490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11491 $as_echo_n "checking for $ac_word... " >&6; }
11492 if ${ac_cv_path_TEE+:} false; then :
11493   $as_echo_n "(cached) " >&6
11494 else
11495   case $TEE in
11496   [\\/]* | ?:[\\/]*)
11497   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11498   ;;
11499   *)
11500   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11501 for as_dir in $PATH
11502 do
11503   IFS=$as_save_IFS
11504   test -z "$as_dir" && as_dir=.
11505     for ac_exec_ext in '' $ac_executable_extensions; do
11506   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11507     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11508     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11509     break 2
11510   fi
11511 done
11512   done
11513 IFS=$as_save_IFS
11514 
11515   ;;
11516 esac
11517 fi
11518 TEE=$ac_cv_path_TEE
11519 if test -n "$TEE"; then
11520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11521 $as_echo "$TEE" >&6; }
11522 else
11523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11524 $as_echo "no" >&6; }
11525 fi
11526 
11527 
11528   test -n "$TEE" && break
11529 done
11530 
11531   else
11532     # The variable is set, but is it from the command line or the environment?
11533 
11534     # Try to remove the string !TEE! from our list.
11535     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11536     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11537       # If it failed, the variable was not from the command line. Ignore it,
11538       # but warn the user (except for BASH, which is always set by the calling BASH).
11539       if test "xTEE" != xBASH; then
11540         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11541 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11542       fi
11543       # Try to locate tool using the code snippet
11544       for ac_prog in tee
11545 do
11546   # Extract the first word of "$ac_prog", so it can be a program name with args.
11547 set dummy $ac_prog; ac_word=$2
11548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11549 $as_echo_n "checking for $ac_word... " >&6; }
11550 if ${ac_cv_path_TEE+:} false; then :
11551   $as_echo_n "(cached) " >&6
11552 else
11553   case $TEE in
11554   [\\/]* | ?:[\\/]*)
11555   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11556   ;;
11557   *)
11558   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11559 for as_dir in $PATH
11560 do
11561   IFS=$as_save_IFS
11562   test -z "$as_dir" && as_dir=.
11563     for ac_exec_ext in '' $ac_executable_extensions; do
11564   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11565     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11566     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11567     break 2
11568   fi
11569 done
11570   done
11571 IFS=$as_save_IFS
11572 
11573   ;;
11574 esac
11575 fi
11576 TEE=$ac_cv_path_TEE
11577 if test -n "$TEE"; then
11578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11579 $as_echo "$TEE" >&6; }
11580 else
11581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11582 $as_echo "no" >&6; }
11583 fi
11584 
11585 
11586   test -n "$TEE" && break
11587 done
11588 
11589     else
11590       # If it succeeded, then it was overridden by the user. We will use it
11591       # for the tool.
11592 
11593       # First remove it from the list of overridden variables, so we can test
11594       # for unknown variables in the end.
11595       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11596 
11597       # Check if we try to supply an empty value
11598       if test "x$TEE" = x; then
11599         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11600 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11601         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11602 $as_echo_n "checking for TEE... " >&6; }
11603         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11604 $as_echo "disabled" >&6; }
11605       else
11606         # Check if the provided tool contains a complete path.
11607         tool_specified="$TEE"
11608         tool_basename="${tool_specified##*/}"
11609         if test "x$tool_basename" = "x$tool_specified"; then
11610           # A command without a complete path is provided, search $PATH.
11611           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11612 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11613           # Extract the first word of "$tool_basename", so it can be a program name with args.
11614 set dummy $tool_basename; ac_word=$2
11615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11616 $as_echo_n "checking for $ac_word... " >&6; }
11617 if ${ac_cv_path_TEE+:} false; then :
11618   $as_echo_n "(cached) " >&6
11619 else
11620   case $TEE in
11621   [\\/]* | ?:[\\/]*)
11622   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11623   ;;
11624   *)
11625   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11626 for as_dir in $PATH
11627 do
11628   IFS=$as_save_IFS
11629   test -z "$as_dir" && as_dir=.
11630     for ac_exec_ext in '' $ac_executable_extensions; do
11631   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11632     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11633     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11634     break 2
11635   fi
11636 done
11637   done
11638 IFS=$as_save_IFS
11639 
11640   ;;
11641 esac
11642 fi
11643 TEE=$ac_cv_path_TEE
11644 if test -n "$TEE"; then
11645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11646 $as_echo "$TEE" >&6; }
11647 else
11648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11649 $as_echo "no" >&6; }
11650 fi
11651 
11652 
11653           if test "x$TEE" = x; then
11654             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11655           fi
11656         else
11657           # Otherwise we believe it is a complete path. Use it as it is.
11658           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11659 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11660           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11661 $as_echo_n "checking for TEE... " >&6; }
11662           if test ! -x "$tool_specified"; then
11663             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11664 $as_echo "not found" >&6; }
11665             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11666           fi
11667           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11668 $as_echo "$tool_specified" >&6; }
11669         fi
11670       fi
11671     fi
11672 
11673   fi
11674 
11675 
11676 
11677   if test "x$TEE" = x; then
11678     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11679   fi
11680 
11681 
11682 
11683 
11684 
11685   # Publish this variable in the help.
11686 
11687 
11688   if [ -z "${TOUCH+x}" ]; then
11689     # The variable is not set by user, try to locate tool using the code snippet
11690     for ac_prog in touch
11691 do
11692   # Extract the first word of "$ac_prog", so it can be a program name with args.
11693 set dummy $ac_prog; ac_word=$2
11694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11695 $as_echo_n "checking for $ac_word... " >&6; }
11696 if ${ac_cv_path_TOUCH+:} false; then :
11697   $as_echo_n "(cached) " >&6
11698 else
11699   case $TOUCH in
11700   [\\/]* | ?:[\\/]*)
11701   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11702   ;;
11703   *)
11704   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11705 for as_dir in $PATH
11706 do
11707   IFS=$as_save_IFS
11708   test -z "$as_dir" && as_dir=.
11709     for ac_exec_ext in '' $ac_executable_extensions; do
11710   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11711     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11712     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11713     break 2
11714   fi
11715 done
11716   done
11717 IFS=$as_save_IFS
11718 
11719   ;;
11720 esac
11721 fi
11722 TOUCH=$ac_cv_path_TOUCH
11723 if test -n "$TOUCH"; then
11724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11725 $as_echo "$TOUCH" >&6; }
11726 else
11727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11728 $as_echo "no" >&6; }
11729 fi
11730 
11731 
11732   test -n "$TOUCH" && break
11733 done
11734 
11735   else
11736     # The variable is set, but is it from the command line or the environment?
11737 
11738     # Try to remove the string !TOUCH! from our list.
11739     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11740     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11741       # If it failed, the variable was not from the command line. Ignore it,
11742       # but warn the user (except for BASH, which is always set by the calling BASH).
11743       if test "xTOUCH" != xBASH; then
11744         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11745 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11746       fi
11747       # Try to locate tool using the code snippet
11748       for ac_prog in touch
11749 do
11750   # Extract the first word of "$ac_prog", so it can be a program name with args.
11751 set dummy $ac_prog; ac_word=$2
11752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11753 $as_echo_n "checking for $ac_word... " >&6; }
11754 if ${ac_cv_path_TOUCH+:} false; then :
11755   $as_echo_n "(cached) " >&6
11756 else
11757   case $TOUCH in
11758   [\\/]* | ?:[\\/]*)
11759   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11760   ;;
11761   *)
11762   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11763 for as_dir in $PATH
11764 do
11765   IFS=$as_save_IFS
11766   test -z "$as_dir" && as_dir=.
11767     for ac_exec_ext in '' $ac_executable_extensions; do
11768   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11769     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11770     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11771     break 2
11772   fi
11773 done
11774   done
11775 IFS=$as_save_IFS
11776 
11777   ;;
11778 esac
11779 fi
11780 TOUCH=$ac_cv_path_TOUCH
11781 if test -n "$TOUCH"; then
11782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11783 $as_echo "$TOUCH" >&6; }
11784 else
11785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11786 $as_echo "no" >&6; }
11787 fi
11788 
11789 
11790   test -n "$TOUCH" && break
11791 done
11792 
11793     else
11794       # If it succeeded, then it was overridden by the user. We will use it
11795       # for the tool.
11796 
11797       # First remove it from the list of overridden variables, so we can test
11798       # for unknown variables in the end.
11799       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11800 
11801       # Check if we try to supply an empty value
11802       if test "x$TOUCH" = x; then
11803         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11804 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11805         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11806 $as_echo_n "checking for TOUCH... " >&6; }
11807         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11808 $as_echo "disabled" >&6; }
11809       else
11810         # Check if the provided tool contains a complete path.
11811         tool_specified="$TOUCH"
11812         tool_basename="${tool_specified##*/}"
11813         if test "x$tool_basename" = "x$tool_specified"; then
11814           # A command without a complete path is provided, search $PATH.
11815           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11816 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11817           # Extract the first word of "$tool_basename", so it can be a program name with args.
11818 set dummy $tool_basename; ac_word=$2
11819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11820 $as_echo_n "checking for $ac_word... " >&6; }
11821 if ${ac_cv_path_TOUCH+:} false; then :
11822   $as_echo_n "(cached) " >&6
11823 else
11824   case $TOUCH in
11825   [\\/]* | ?:[\\/]*)
11826   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11827   ;;
11828   *)
11829   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11830 for as_dir in $PATH
11831 do
11832   IFS=$as_save_IFS
11833   test -z "$as_dir" && as_dir=.
11834     for ac_exec_ext in '' $ac_executable_extensions; do
11835   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11836     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11837     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11838     break 2
11839   fi
11840 done
11841   done
11842 IFS=$as_save_IFS
11843 
11844   ;;
11845 esac
11846 fi
11847 TOUCH=$ac_cv_path_TOUCH
11848 if test -n "$TOUCH"; then
11849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11850 $as_echo "$TOUCH" >&6; }
11851 else
11852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11853 $as_echo "no" >&6; }
11854 fi
11855 
11856 
11857           if test "x$TOUCH" = x; then
11858             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11859           fi
11860         else
11861           # Otherwise we believe it is a complete path. Use it as it is.
11862           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11863 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11864           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11865 $as_echo_n "checking for TOUCH... " >&6; }
11866           if test ! -x "$tool_specified"; then
11867             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11868 $as_echo "not found" >&6; }
11869             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11870           fi
11871           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11872 $as_echo "$tool_specified" >&6; }
11873         fi
11874       fi
11875     fi
11876 
11877   fi
11878 
11879 
11880 
11881   if test "x$TOUCH" = x; then
11882     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11883   fi
11884 
11885 
11886 
11887 
11888 
11889   # Publish this variable in the help.
11890 
11891 
11892   if [ -z "${TR+x}" ]; then
11893     # The variable is not set by user, try to locate tool using the code snippet
11894     for ac_prog in tr
11895 do
11896   # Extract the first word of "$ac_prog", so it can be a program name with args.
11897 set dummy $ac_prog; ac_word=$2
11898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11899 $as_echo_n "checking for $ac_word... " >&6; }
11900 if ${ac_cv_path_TR+:} false; then :
11901   $as_echo_n "(cached) " >&6
11902 else
11903   case $TR in
11904   [\\/]* | ?:[\\/]*)
11905   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11906   ;;
11907   *)
11908   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11909 for as_dir in $PATH
11910 do
11911   IFS=$as_save_IFS
11912   test -z "$as_dir" && as_dir=.
11913     for ac_exec_ext in '' $ac_executable_extensions; do
11914   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11915     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11916     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11917     break 2
11918   fi
11919 done
11920   done
11921 IFS=$as_save_IFS
11922 
11923   ;;
11924 esac
11925 fi
11926 TR=$ac_cv_path_TR
11927 if test -n "$TR"; then
11928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11929 $as_echo "$TR" >&6; }
11930 else
11931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11932 $as_echo "no" >&6; }
11933 fi
11934 
11935 
11936   test -n "$TR" && break
11937 done
11938 
11939   else
11940     # The variable is set, but is it from the command line or the environment?
11941 
11942     # Try to remove the string !TR! from our list.
11943     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11944     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11945       # If it failed, the variable was not from the command line. Ignore it,
11946       # but warn the user (except for BASH, which is always set by the calling BASH).
11947       if test "xTR" != xBASH; then
11948         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11949 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11950       fi
11951       # Try to locate tool using the code snippet
11952       for ac_prog in tr
11953 do
11954   # Extract the first word of "$ac_prog", so it can be a program name with args.
11955 set dummy $ac_prog; ac_word=$2
11956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11957 $as_echo_n "checking for $ac_word... " >&6; }
11958 if ${ac_cv_path_TR+:} false; then :
11959   $as_echo_n "(cached) " >&6
11960 else
11961   case $TR in
11962   [\\/]* | ?:[\\/]*)
11963   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11964   ;;
11965   *)
11966   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11967 for as_dir in $PATH
11968 do
11969   IFS=$as_save_IFS
11970   test -z "$as_dir" && as_dir=.
11971     for ac_exec_ext in '' $ac_executable_extensions; do
11972   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11973     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11974     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11975     break 2
11976   fi
11977 done
11978   done
11979 IFS=$as_save_IFS
11980 
11981   ;;
11982 esac
11983 fi
11984 TR=$ac_cv_path_TR
11985 if test -n "$TR"; then
11986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11987 $as_echo "$TR" >&6; }
11988 else
11989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11990 $as_echo "no" >&6; }
11991 fi
11992 
11993 
11994   test -n "$TR" && break
11995 done
11996 
11997     else
11998       # If it succeeded, then it was overridden by the user. We will use it
11999       # for the tool.
12000 
12001       # First remove it from the list of overridden variables, so we can test
12002       # for unknown variables in the end.
12003       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12004 
12005       # Check if we try to supply an empty value
12006       if test "x$TR" = x; then
12007         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12008 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12009         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12010 $as_echo_n "checking for TR... " >&6; }
12011         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12012 $as_echo "disabled" >&6; }
12013       else
12014         # Check if the provided tool contains a complete path.
12015         tool_specified="$TR"
12016         tool_basename="${tool_specified##*/}"
12017         if test "x$tool_basename" = "x$tool_specified"; then
12018           # A command without a complete path is provided, search $PATH.
12019           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12020 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12021           # Extract the first word of "$tool_basename", so it can be a program name with args.
12022 set dummy $tool_basename; ac_word=$2
12023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12024 $as_echo_n "checking for $ac_word... " >&6; }
12025 if ${ac_cv_path_TR+:} false; then :
12026   $as_echo_n "(cached) " >&6
12027 else
12028   case $TR in
12029   [\\/]* | ?:[\\/]*)
12030   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12031   ;;
12032   *)
12033   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12034 for as_dir in $PATH
12035 do
12036   IFS=$as_save_IFS
12037   test -z "$as_dir" && as_dir=.
12038     for ac_exec_ext in '' $ac_executable_extensions; do
12039   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12040     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12042     break 2
12043   fi
12044 done
12045   done
12046 IFS=$as_save_IFS
12047 
12048   ;;
12049 esac
12050 fi
12051 TR=$ac_cv_path_TR
12052 if test -n "$TR"; then
12053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12054 $as_echo "$TR" >&6; }
12055 else
12056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12057 $as_echo "no" >&6; }
12058 fi
12059 
12060 
12061           if test "x$TR" = x; then
12062             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12063           fi
12064         else
12065           # Otherwise we believe it is a complete path. Use it as it is.
12066           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12067 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12068           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12069 $as_echo_n "checking for TR... " >&6; }
12070           if test ! -x "$tool_specified"; then
12071             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12072 $as_echo "not found" >&6; }
12073             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12074           fi
12075           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12076 $as_echo "$tool_specified" >&6; }
12077         fi
12078       fi
12079     fi
12080 
12081   fi
12082 
12083 
12084 
12085   if test "x$TR" = x; then
12086     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12087   fi
12088 
12089 
12090 
12091 
12092 
12093   # Publish this variable in the help.
12094 
12095 
12096   if [ -z "${UNAME+x}" ]; then
12097     # The variable is not set by user, try to locate tool using the code snippet
12098     for ac_prog in uname
12099 do
12100   # Extract the first word of "$ac_prog", so it can be a program name with args.
12101 set dummy $ac_prog; ac_word=$2
12102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12103 $as_echo_n "checking for $ac_word... " >&6; }
12104 if ${ac_cv_path_UNAME+:} false; then :
12105   $as_echo_n "(cached) " >&6
12106 else
12107   case $UNAME in
12108   [\\/]* | ?:[\\/]*)
12109   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12110   ;;
12111   *)
12112   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12113 for as_dir in $PATH
12114 do
12115   IFS=$as_save_IFS
12116   test -z "$as_dir" && as_dir=.
12117     for ac_exec_ext in '' $ac_executable_extensions; do
12118   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12119     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12120     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12121     break 2
12122   fi
12123 done
12124   done
12125 IFS=$as_save_IFS
12126 
12127   ;;
12128 esac
12129 fi
12130 UNAME=$ac_cv_path_UNAME
12131 if test -n "$UNAME"; then
12132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12133 $as_echo "$UNAME" >&6; }
12134 else
12135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12136 $as_echo "no" >&6; }
12137 fi
12138 
12139 
12140   test -n "$UNAME" && break
12141 done
12142 
12143   else
12144     # The variable is set, but is it from the command line or the environment?
12145 
12146     # Try to remove the string !UNAME! from our list.
12147     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12148     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12149       # If it failed, the variable was not from the command line. Ignore it,
12150       # but warn the user (except for BASH, which is always set by the calling BASH).
12151       if test "xUNAME" != xBASH; then
12152         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12153 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12154       fi
12155       # Try to locate tool using the code snippet
12156       for ac_prog in uname
12157 do
12158   # Extract the first word of "$ac_prog", so it can be a program name with args.
12159 set dummy $ac_prog; ac_word=$2
12160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12161 $as_echo_n "checking for $ac_word... " >&6; }
12162 if ${ac_cv_path_UNAME+:} false; then :
12163   $as_echo_n "(cached) " >&6
12164 else
12165   case $UNAME in
12166   [\\/]* | ?:[\\/]*)
12167   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12168   ;;
12169   *)
12170   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12171 for as_dir in $PATH
12172 do
12173   IFS=$as_save_IFS
12174   test -z "$as_dir" && as_dir=.
12175     for ac_exec_ext in '' $ac_executable_extensions; do
12176   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12177     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12178     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12179     break 2
12180   fi
12181 done
12182   done
12183 IFS=$as_save_IFS
12184 
12185   ;;
12186 esac
12187 fi
12188 UNAME=$ac_cv_path_UNAME
12189 if test -n "$UNAME"; then
12190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12191 $as_echo "$UNAME" >&6; }
12192 else
12193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12194 $as_echo "no" >&6; }
12195 fi
12196 
12197 
12198   test -n "$UNAME" && break
12199 done
12200 
12201     else
12202       # If it succeeded, then it was overridden by the user. We will use it
12203       # for the tool.
12204 
12205       # First remove it from the list of overridden variables, so we can test
12206       # for unknown variables in the end.
12207       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12208 
12209       # Check if we try to supply an empty value
12210       if test "x$UNAME" = x; then
12211         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12212 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12213         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12214 $as_echo_n "checking for UNAME... " >&6; }
12215         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12216 $as_echo "disabled" >&6; }
12217       else
12218         # Check if the provided tool contains a complete path.
12219         tool_specified="$UNAME"
12220         tool_basename="${tool_specified##*/}"
12221         if test "x$tool_basename" = "x$tool_specified"; then
12222           # A command without a complete path is provided, search $PATH.
12223           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12224 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12225           # Extract the first word of "$tool_basename", so it can be a program name with args.
12226 set dummy $tool_basename; ac_word=$2
12227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12228 $as_echo_n "checking for $ac_word... " >&6; }
12229 if ${ac_cv_path_UNAME+:} false; then :
12230   $as_echo_n "(cached) " >&6
12231 else
12232   case $UNAME in
12233   [\\/]* | ?:[\\/]*)
12234   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12235   ;;
12236   *)
12237   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12238 for as_dir in $PATH
12239 do
12240   IFS=$as_save_IFS
12241   test -z "$as_dir" && as_dir=.
12242     for ac_exec_ext in '' $ac_executable_extensions; do
12243   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12244     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12245     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12246     break 2
12247   fi
12248 done
12249   done
12250 IFS=$as_save_IFS
12251 
12252   ;;
12253 esac
12254 fi
12255 UNAME=$ac_cv_path_UNAME
12256 if test -n "$UNAME"; then
12257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12258 $as_echo "$UNAME" >&6; }
12259 else
12260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12261 $as_echo "no" >&6; }
12262 fi
12263 
12264 
12265           if test "x$UNAME" = x; then
12266             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12267           fi
12268         else
12269           # Otherwise we believe it is a complete path. Use it as it is.
12270           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12271 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12272           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12273 $as_echo_n "checking for UNAME... " >&6; }
12274           if test ! -x "$tool_specified"; then
12275             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12276 $as_echo "not found" >&6; }
12277             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12278           fi
12279           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12280 $as_echo "$tool_specified" >&6; }
12281         fi
12282       fi
12283     fi
12284 
12285   fi
12286 
12287 
12288 
12289   if test "x$UNAME" = x; then
12290     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12291   fi
12292 
12293 
12294 
12295 
12296 
12297   # Publish this variable in the help.
12298 
12299 
12300   if [ -z "${UNIQ+x}" ]; then
12301     # The variable is not set by user, try to locate tool using the code snippet
12302     for ac_prog in uniq
12303 do
12304   # Extract the first word of "$ac_prog", so it can be a program name with args.
12305 set dummy $ac_prog; ac_word=$2
12306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12307 $as_echo_n "checking for $ac_word... " >&6; }
12308 if ${ac_cv_path_UNIQ+:} false; then :
12309   $as_echo_n "(cached) " >&6
12310 else
12311   case $UNIQ in
12312   [\\/]* | ?:[\\/]*)
12313   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12314   ;;
12315   *)
12316   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12317 for as_dir in $PATH
12318 do
12319   IFS=$as_save_IFS
12320   test -z "$as_dir" && as_dir=.
12321     for ac_exec_ext in '' $ac_executable_extensions; do
12322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12323     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12325     break 2
12326   fi
12327 done
12328   done
12329 IFS=$as_save_IFS
12330 
12331   ;;
12332 esac
12333 fi
12334 UNIQ=$ac_cv_path_UNIQ
12335 if test -n "$UNIQ"; then
12336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12337 $as_echo "$UNIQ" >&6; }
12338 else
12339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12340 $as_echo "no" >&6; }
12341 fi
12342 
12343 
12344   test -n "$UNIQ" && break
12345 done
12346 
12347   else
12348     # The variable is set, but is it from the command line or the environment?
12349 
12350     # Try to remove the string !UNIQ! from our list.
12351     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12352     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12353       # If it failed, the variable was not from the command line. Ignore it,
12354       # but warn the user (except for BASH, which is always set by the calling BASH).
12355       if test "xUNIQ" != xBASH; then
12356         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12357 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12358       fi
12359       # Try to locate tool using the code snippet
12360       for ac_prog in uniq
12361 do
12362   # Extract the first word of "$ac_prog", so it can be a program name with args.
12363 set dummy $ac_prog; ac_word=$2
12364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12365 $as_echo_n "checking for $ac_word... " >&6; }
12366 if ${ac_cv_path_UNIQ+:} false; then :
12367   $as_echo_n "(cached) " >&6
12368 else
12369   case $UNIQ in
12370   [\\/]* | ?:[\\/]*)
12371   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12372   ;;
12373   *)
12374   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12375 for as_dir in $PATH
12376 do
12377   IFS=$as_save_IFS
12378   test -z "$as_dir" && as_dir=.
12379     for ac_exec_ext in '' $ac_executable_extensions; do
12380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12381     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12383     break 2
12384   fi
12385 done
12386   done
12387 IFS=$as_save_IFS
12388 
12389   ;;
12390 esac
12391 fi
12392 UNIQ=$ac_cv_path_UNIQ
12393 if test -n "$UNIQ"; then
12394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12395 $as_echo "$UNIQ" >&6; }
12396 else
12397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12398 $as_echo "no" >&6; }
12399 fi
12400 
12401 
12402   test -n "$UNIQ" && break
12403 done
12404 
12405     else
12406       # If it succeeded, then it was overridden by the user. We will use it
12407       # for the tool.
12408 
12409       # First remove it from the list of overridden variables, so we can test
12410       # for unknown variables in the end.
12411       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12412 
12413       # Check if we try to supply an empty value
12414       if test "x$UNIQ" = x; then
12415         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12416 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12417         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12418 $as_echo_n "checking for UNIQ... " >&6; }
12419         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12420 $as_echo "disabled" >&6; }
12421       else
12422         # Check if the provided tool contains a complete path.
12423         tool_specified="$UNIQ"
12424         tool_basename="${tool_specified##*/}"
12425         if test "x$tool_basename" = "x$tool_specified"; then
12426           # A command without a complete path is provided, search $PATH.
12427           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12428 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12429           # Extract the first word of "$tool_basename", so it can be a program name with args.
12430 set dummy $tool_basename; ac_word=$2
12431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12432 $as_echo_n "checking for $ac_word... " >&6; }
12433 if ${ac_cv_path_UNIQ+:} false; then :
12434   $as_echo_n "(cached) " >&6
12435 else
12436   case $UNIQ in
12437   [\\/]* | ?:[\\/]*)
12438   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12439   ;;
12440   *)
12441   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12442 for as_dir in $PATH
12443 do
12444   IFS=$as_save_IFS
12445   test -z "$as_dir" && as_dir=.
12446     for ac_exec_ext in '' $ac_executable_extensions; do
12447   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12448     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12449     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12450     break 2
12451   fi
12452 done
12453   done
12454 IFS=$as_save_IFS
12455 
12456   ;;
12457 esac
12458 fi
12459 UNIQ=$ac_cv_path_UNIQ
12460 if test -n "$UNIQ"; then
12461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12462 $as_echo "$UNIQ" >&6; }
12463 else
12464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12465 $as_echo "no" >&6; }
12466 fi
12467 
12468 
12469           if test "x$UNIQ" = x; then
12470             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12471           fi
12472         else
12473           # Otherwise we believe it is a complete path. Use it as it is.
12474           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12475 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12476           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12477 $as_echo_n "checking for UNIQ... " >&6; }
12478           if test ! -x "$tool_specified"; then
12479             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12480 $as_echo "not found" >&6; }
12481             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12482           fi
12483           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12484 $as_echo "$tool_specified" >&6; }
12485         fi
12486       fi
12487     fi
12488 
12489   fi
12490 
12491 
12492 
12493   if test "x$UNIQ" = x; then
12494     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12495   fi
12496 
12497 
12498 
12499 
12500 
12501   # Publish this variable in the help.
12502 
12503 
12504   if [ -z "${WC+x}" ]; then
12505     # The variable is not set by user, try to locate tool using the code snippet
12506     for ac_prog in wc
12507 do
12508   # Extract the first word of "$ac_prog", so it can be a program name with args.
12509 set dummy $ac_prog; ac_word=$2
12510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12511 $as_echo_n "checking for $ac_word... " >&6; }
12512 if ${ac_cv_path_WC+:} false; then :
12513   $as_echo_n "(cached) " >&6
12514 else
12515   case $WC in
12516   [\\/]* | ?:[\\/]*)
12517   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12518   ;;
12519   *)
12520   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12521 for as_dir in $PATH
12522 do
12523   IFS=$as_save_IFS
12524   test -z "$as_dir" && as_dir=.
12525     for ac_exec_ext in '' $ac_executable_extensions; do
12526   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12527     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12528     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12529     break 2
12530   fi
12531 done
12532   done
12533 IFS=$as_save_IFS
12534 
12535   ;;
12536 esac
12537 fi
12538 WC=$ac_cv_path_WC
12539 if test -n "$WC"; then
12540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12541 $as_echo "$WC" >&6; }
12542 else
12543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12544 $as_echo "no" >&6; }
12545 fi
12546 
12547 
12548   test -n "$WC" && break
12549 done
12550 
12551   else
12552     # The variable is set, but is it from the command line or the environment?
12553 
12554     # Try to remove the string !WC! from our list.
12555     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12556     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12557       # If it failed, the variable was not from the command line. Ignore it,
12558       # but warn the user (except for BASH, which is always set by the calling BASH).
12559       if test "xWC" != xBASH; then
12560         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12561 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12562       fi
12563       # Try to locate tool using the code snippet
12564       for ac_prog in wc
12565 do
12566   # Extract the first word of "$ac_prog", so it can be a program name with args.
12567 set dummy $ac_prog; ac_word=$2
12568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12569 $as_echo_n "checking for $ac_word... " >&6; }
12570 if ${ac_cv_path_WC+:} false; then :
12571   $as_echo_n "(cached) " >&6
12572 else
12573   case $WC in
12574   [\\/]* | ?:[\\/]*)
12575   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12576   ;;
12577   *)
12578   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12579 for as_dir in $PATH
12580 do
12581   IFS=$as_save_IFS
12582   test -z "$as_dir" && as_dir=.
12583     for ac_exec_ext in '' $ac_executable_extensions; do
12584   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12585     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12587     break 2
12588   fi
12589 done
12590   done
12591 IFS=$as_save_IFS
12592 
12593   ;;
12594 esac
12595 fi
12596 WC=$ac_cv_path_WC
12597 if test -n "$WC"; then
12598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12599 $as_echo "$WC" >&6; }
12600 else
12601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12602 $as_echo "no" >&6; }
12603 fi
12604 
12605 
12606   test -n "$WC" && break
12607 done
12608 
12609     else
12610       # If it succeeded, then it was overridden by the user. We will use it
12611       # for the tool.
12612 
12613       # First remove it from the list of overridden variables, so we can test
12614       # for unknown variables in the end.
12615       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12616 
12617       # Check if we try to supply an empty value
12618       if test "x$WC" = x; then
12619         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12620 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12621         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12622 $as_echo_n "checking for WC... " >&6; }
12623         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12624 $as_echo "disabled" >&6; }
12625       else
12626         # Check if the provided tool contains a complete path.
12627         tool_specified="$WC"
12628         tool_basename="${tool_specified##*/}"
12629         if test "x$tool_basename" = "x$tool_specified"; then
12630           # A command without a complete path is provided, search $PATH.
12631           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12632 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12633           # Extract the first word of "$tool_basename", so it can be a program name with args.
12634 set dummy $tool_basename; ac_word=$2
12635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12636 $as_echo_n "checking for $ac_word... " >&6; }
12637 if ${ac_cv_path_WC+:} false; then :
12638   $as_echo_n "(cached) " >&6
12639 else
12640   case $WC in
12641   [\\/]* | ?:[\\/]*)
12642   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12643   ;;
12644   *)
12645   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12646 for as_dir in $PATH
12647 do
12648   IFS=$as_save_IFS
12649   test -z "$as_dir" && as_dir=.
12650     for ac_exec_ext in '' $ac_executable_extensions; do
12651   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12652     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12653     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12654     break 2
12655   fi
12656 done
12657   done
12658 IFS=$as_save_IFS
12659 
12660   ;;
12661 esac
12662 fi
12663 WC=$ac_cv_path_WC
12664 if test -n "$WC"; then
12665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12666 $as_echo "$WC" >&6; }
12667 else
12668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12669 $as_echo "no" >&6; }
12670 fi
12671 
12672 
12673           if test "x$WC" = x; then
12674             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12675           fi
12676         else
12677           # Otherwise we believe it is a complete path. Use it as it is.
12678           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12679 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12680           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12681 $as_echo_n "checking for WC... " >&6; }
12682           if test ! -x "$tool_specified"; then
12683             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12684 $as_echo "not found" >&6; }
12685             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12686           fi
12687           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12688 $as_echo "$tool_specified" >&6; }
12689         fi
12690       fi
12691     fi
12692 
12693   fi
12694 
12695 
12696 
12697   if test "x$WC" = x; then
12698     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12699   fi
12700 
12701 
12702 
12703 
12704 
12705   # Publish this variable in the help.
12706 
12707 
12708   if [ -z "${WHICH+x}" ]; then
12709     # The variable is not set by user, try to locate tool using the code snippet
12710     for ac_prog in which
12711 do
12712   # Extract the first word of "$ac_prog", so it can be a program name with args.
12713 set dummy $ac_prog; ac_word=$2
12714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12715 $as_echo_n "checking for $ac_word... " >&6; }
12716 if ${ac_cv_path_WHICH+:} false; then :
12717   $as_echo_n "(cached) " >&6
12718 else
12719   case $WHICH in
12720   [\\/]* | ?:[\\/]*)
12721   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12722   ;;
12723   *)
12724   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12725 for as_dir in $PATH
12726 do
12727   IFS=$as_save_IFS
12728   test -z "$as_dir" && as_dir=.
12729     for ac_exec_ext in '' $ac_executable_extensions; do
12730   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12731     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12732     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12733     break 2
12734   fi
12735 done
12736   done
12737 IFS=$as_save_IFS
12738 
12739   ;;
12740 esac
12741 fi
12742 WHICH=$ac_cv_path_WHICH
12743 if test -n "$WHICH"; then
12744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12745 $as_echo "$WHICH" >&6; }
12746 else
12747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12748 $as_echo "no" >&6; }
12749 fi
12750 
12751 
12752   test -n "$WHICH" && break
12753 done
12754 
12755   else
12756     # The variable is set, but is it from the command line or the environment?
12757 
12758     # Try to remove the string !WHICH! from our list.
12759     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12760     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12761       # If it failed, the variable was not from the command line. Ignore it,
12762       # but warn the user (except for BASH, which is always set by the calling BASH).
12763       if test "xWHICH" != xBASH; then
12764         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12765 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12766       fi
12767       # Try to locate tool using the code snippet
12768       for ac_prog in which
12769 do
12770   # Extract the first word of "$ac_prog", so it can be a program name with args.
12771 set dummy $ac_prog; ac_word=$2
12772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12773 $as_echo_n "checking for $ac_word... " >&6; }
12774 if ${ac_cv_path_WHICH+:} false; then :
12775   $as_echo_n "(cached) " >&6
12776 else
12777   case $WHICH in
12778   [\\/]* | ?:[\\/]*)
12779   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12780   ;;
12781   *)
12782   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12783 for as_dir in $PATH
12784 do
12785   IFS=$as_save_IFS
12786   test -z "$as_dir" && as_dir=.
12787     for ac_exec_ext in '' $ac_executable_extensions; do
12788   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12789     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12790     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12791     break 2
12792   fi
12793 done
12794   done
12795 IFS=$as_save_IFS
12796 
12797   ;;
12798 esac
12799 fi
12800 WHICH=$ac_cv_path_WHICH
12801 if test -n "$WHICH"; then
12802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12803 $as_echo "$WHICH" >&6; }
12804 else
12805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12806 $as_echo "no" >&6; }
12807 fi
12808 
12809 
12810   test -n "$WHICH" && break
12811 done
12812 
12813     else
12814       # If it succeeded, then it was overridden by the user. We will use it
12815       # for the tool.
12816 
12817       # First remove it from the list of overridden variables, so we can test
12818       # for unknown variables in the end.
12819       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12820 
12821       # Check if we try to supply an empty value
12822       if test "x$WHICH" = x; then
12823         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12824 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12825         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12826 $as_echo_n "checking for WHICH... " >&6; }
12827         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12828 $as_echo "disabled" >&6; }
12829       else
12830         # Check if the provided tool contains a complete path.
12831         tool_specified="$WHICH"
12832         tool_basename="${tool_specified##*/}"
12833         if test "x$tool_basename" = "x$tool_specified"; then
12834           # A command without a complete path is provided, search $PATH.
12835           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12836 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12837           # Extract the first word of "$tool_basename", so it can be a program name with args.
12838 set dummy $tool_basename; ac_word=$2
12839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12840 $as_echo_n "checking for $ac_word... " >&6; }
12841 if ${ac_cv_path_WHICH+:} false; then :
12842   $as_echo_n "(cached) " >&6
12843 else
12844   case $WHICH in
12845   [\\/]* | ?:[\\/]*)
12846   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12847   ;;
12848   *)
12849   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12850 for as_dir in $PATH
12851 do
12852   IFS=$as_save_IFS
12853   test -z "$as_dir" && as_dir=.
12854     for ac_exec_ext in '' $ac_executable_extensions; do
12855   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12856     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12857     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12858     break 2
12859   fi
12860 done
12861   done
12862 IFS=$as_save_IFS
12863 
12864   ;;
12865 esac
12866 fi
12867 WHICH=$ac_cv_path_WHICH
12868 if test -n "$WHICH"; then
12869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12870 $as_echo "$WHICH" >&6; }
12871 else
12872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12873 $as_echo "no" >&6; }
12874 fi
12875 
12876 
12877           if test "x$WHICH" = x; then
12878             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12879           fi
12880         else
12881           # Otherwise we believe it is a complete path. Use it as it is.
12882           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12883 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12884           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12885 $as_echo_n "checking for WHICH... " >&6; }
12886           if test ! -x "$tool_specified"; then
12887             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12888 $as_echo "not found" >&6; }
12889             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12890           fi
12891           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12892 $as_echo "$tool_specified" >&6; }
12893         fi
12894       fi
12895     fi
12896 
12897   fi
12898 
12899 
12900 
12901   if test "x$WHICH" = x; then
12902     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12903   fi
12904 
12905 
12906 
12907 
12908 
12909   # Publish this variable in the help.
12910 
12911 
12912   if [ -z "${XARGS+x}" ]; then
12913     # The variable is not set by user, try to locate tool using the code snippet
12914     for ac_prog in xargs
12915 do
12916   # Extract the first word of "$ac_prog", so it can be a program name with args.
12917 set dummy $ac_prog; ac_word=$2
12918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12919 $as_echo_n "checking for $ac_word... " >&6; }
12920 if ${ac_cv_path_XARGS+:} false; then :
12921   $as_echo_n "(cached) " >&6
12922 else
12923   case $XARGS in
12924   [\\/]* | ?:[\\/]*)
12925   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12926   ;;
12927   *)
12928   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12929 for as_dir in $PATH
12930 do
12931   IFS=$as_save_IFS
12932   test -z "$as_dir" && as_dir=.
12933     for ac_exec_ext in '' $ac_executable_extensions; do
12934   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12935     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12936     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12937     break 2
12938   fi
12939 done
12940   done
12941 IFS=$as_save_IFS
12942 
12943   ;;
12944 esac
12945 fi
12946 XARGS=$ac_cv_path_XARGS
12947 if test -n "$XARGS"; then
12948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12949 $as_echo "$XARGS" >&6; }
12950 else
12951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12952 $as_echo "no" >&6; }
12953 fi
12954 
12955 
12956   test -n "$XARGS" && break
12957 done
12958 
12959   else
12960     # The variable is set, but is it from the command line or the environment?
12961 
12962     # Try to remove the string !XARGS! from our list.
12963     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12964     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12965       # If it failed, the variable was not from the command line. Ignore it,
12966       # but warn the user (except for BASH, which is always set by the calling BASH).
12967       if test "xXARGS" != xBASH; then
12968         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12969 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12970       fi
12971       # Try to locate tool using the code snippet
12972       for ac_prog in xargs
12973 do
12974   # Extract the first word of "$ac_prog", so it can be a program name with args.
12975 set dummy $ac_prog; ac_word=$2
12976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12977 $as_echo_n "checking for $ac_word... " >&6; }
12978 if ${ac_cv_path_XARGS+:} false; then :
12979   $as_echo_n "(cached) " >&6
12980 else
12981   case $XARGS in
12982   [\\/]* | ?:[\\/]*)
12983   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12984   ;;
12985   *)
12986   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12987 for as_dir in $PATH
12988 do
12989   IFS=$as_save_IFS
12990   test -z "$as_dir" && as_dir=.
12991     for ac_exec_ext in '' $ac_executable_extensions; do
12992   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12993     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12994     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12995     break 2
12996   fi
12997 done
12998   done
12999 IFS=$as_save_IFS
13000 
13001   ;;
13002 esac
13003 fi
13004 XARGS=$ac_cv_path_XARGS
13005 if test -n "$XARGS"; then
13006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13007 $as_echo "$XARGS" >&6; }
13008 else
13009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13010 $as_echo "no" >&6; }
13011 fi
13012 
13013 
13014   test -n "$XARGS" && break
13015 done
13016 
13017     else
13018       # If it succeeded, then it was overridden by the user. We will use it
13019       # for the tool.
13020 
13021       # First remove it from the list of overridden variables, so we can test
13022       # for unknown variables in the end.
13023       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13024 
13025       # Check if we try to supply an empty value
13026       if test "x$XARGS" = x; then
13027         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13028 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13029         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13030 $as_echo_n "checking for XARGS... " >&6; }
13031         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13032 $as_echo "disabled" >&6; }
13033       else
13034         # Check if the provided tool contains a complete path.
13035         tool_specified="$XARGS"
13036         tool_basename="${tool_specified##*/}"
13037         if test "x$tool_basename" = "x$tool_specified"; then
13038           # A command without a complete path is provided, search $PATH.
13039           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13040 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13041           # Extract the first word of "$tool_basename", so it can be a program name with args.
13042 set dummy $tool_basename; ac_word=$2
13043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13044 $as_echo_n "checking for $ac_word... " >&6; }
13045 if ${ac_cv_path_XARGS+:} false; then :
13046   $as_echo_n "(cached) " >&6
13047 else
13048   case $XARGS in
13049   [\\/]* | ?:[\\/]*)
13050   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13051   ;;
13052   *)
13053   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13054 for as_dir in $PATH
13055 do
13056   IFS=$as_save_IFS
13057   test -z "$as_dir" && as_dir=.
13058     for ac_exec_ext in '' $ac_executable_extensions; do
13059   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13060     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13061     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13062     break 2
13063   fi
13064 done
13065   done
13066 IFS=$as_save_IFS
13067 
13068   ;;
13069 esac
13070 fi
13071 XARGS=$ac_cv_path_XARGS
13072 if test -n "$XARGS"; then
13073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13074 $as_echo "$XARGS" >&6; }
13075 else
13076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13077 $as_echo "no" >&6; }
13078 fi
13079 
13080 
13081           if test "x$XARGS" = x; then
13082             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13083           fi
13084         else
13085           # Otherwise we believe it is a complete path. Use it as it is.
13086           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13087 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13088           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13089 $as_echo_n "checking for XARGS... " >&6; }
13090           if test ! -x "$tool_specified"; then
13091             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13092 $as_echo "not found" >&6; }
13093             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13094           fi
13095           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13096 $as_echo "$tool_specified" >&6; }
13097         fi
13098       fi
13099     fi
13100 
13101   fi
13102 
13103 
13104 
13105   if test "x$XARGS" = x; then
13106     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13107   fi
13108 
13109 
13110 
13111   # Then required tools that require some special treatment.
13112 
13113 
13114   # Publish this variable in the help.
13115 
13116 
13117   if [ -z "${AWK+x}" ]; then
13118     # The variable is not set by user, try to locate tool using the code snippet
13119     for ac_prog in gawk mawk nawk awk
13120 do
13121   # Extract the first word of "$ac_prog", so it can be a program name with args.
13122 set dummy $ac_prog; ac_word=$2
13123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13124 $as_echo_n "checking for $ac_word... " >&6; }
13125 if ${ac_cv_prog_AWK+:} false; then :
13126   $as_echo_n "(cached) " >&6
13127 else
13128   if test -n "$AWK"; then
13129   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13130 else
13131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13132 for as_dir in $PATH
13133 do
13134   IFS=$as_save_IFS
13135   test -z "$as_dir" && as_dir=.
13136     for ac_exec_ext in '' $ac_executable_extensions; do
13137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13138     ac_cv_prog_AWK="$ac_prog"
13139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13140     break 2
13141   fi
13142 done
13143   done
13144 IFS=$as_save_IFS
13145 
13146 fi
13147 fi
13148 AWK=$ac_cv_prog_AWK
13149 if test -n "$AWK"; then
13150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13151 $as_echo "$AWK" >&6; }
13152 else
13153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13154 $as_echo "no" >&6; }
13155 fi
13156 
13157 
13158   test -n "$AWK" && break
13159 done
13160 
13161   else
13162     # The variable is set, but is it from the command line or the environment?
13163 
13164     # Try to remove the string !AWK! from our list.
13165     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13166     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13167       # If it failed, the variable was not from the command line. Ignore it,
13168       # but warn the user (except for BASH, which is always set by the calling BASH).
13169       if test "xAWK" != xBASH; then
13170         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13171 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13172       fi
13173       # Try to locate tool using the code snippet
13174       for ac_prog in gawk mawk nawk awk
13175 do
13176   # Extract the first word of "$ac_prog", so it can be a program name with args.
13177 set dummy $ac_prog; ac_word=$2
13178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13179 $as_echo_n "checking for $ac_word... " >&6; }
13180 if ${ac_cv_prog_AWK+:} false; then :
13181   $as_echo_n "(cached) " >&6
13182 else
13183   if test -n "$AWK"; then
13184   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13185 else
13186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13187 for as_dir in $PATH
13188 do
13189   IFS=$as_save_IFS
13190   test -z "$as_dir" && as_dir=.
13191     for ac_exec_ext in '' $ac_executable_extensions; do
13192   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13193     ac_cv_prog_AWK="$ac_prog"
13194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13195     break 2
13196   fi
13197 done
13198   done
13199 IFS=$as_save_IFS
13200 
13201 fi
13202 fi
13203 AWK=$ac_cv_prog_AWK
13204 if test -n "$AWK"; then
13205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13206 $as_echo "$AWK" >&6; }
13207 else
13208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13209 $as_echo "no" >&6; }
13210 fi
13211 
13212 
13213   test -n "$AWK" && break
13214 done
13215 
13216     else
13217       # If it succeeded, then it was overridden by the user. We will use it
13218       # for the tool.
13219 
13220       # First remove it from the list of overridden variables, so we can test
13221       # for unknown variables in the end.
13222       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13223 
13224       # Check if we try to supply an empty value
13225       if test "x$AWK" = x; then
13226         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13227 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13228         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13229 $as_echo_n "checking for AWK... " >&6; }
13230         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13231 $as_echo "disabled" >&6; }
13232       else
13233         # Check if the provided tool contains a complete path.
13234         tool_specified="$AWK"
13235         tool_basename="${tool_specified##*/}"
13236         if test "x$tool_basename" = "x$tool_specified"; then
13237           # A command without a complete path is provided, search $PATH.
13238           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13239 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13240           # Extract the first word of "$tool_basename", so it can be a program name with args.
13241 set dummy $tool_basename; ac_word=$2
13242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13243 $as_echo_n "checking for $ac_word... " >&6; }
13244 if ${ac_cv_path_AWK+:} false; then :
13245   $as_echo_n "(cached) " >&6
13246 else
13247   case $AWK in
13248   [\\/]* | ?:[\\/]*)
13249   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13250   ;;
13251   *)
13252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13253 for as_dir in $PATH
13254 do
13255   IFS=$as_save_IFS
13256   test -z "$as_dir" && as_dir=.
13257     for ac_exec_ext in '' $ac_executable_extensions; do
13258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13259     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13261     break 2
13262   fi
13263 done
13264   done
13265 IFS=$as_save_IFS
13266 
13267   ;;
13268 esac
13269 fi
13270 AWK=$ac_cv_path_AWK
13271 if test -n "$AWK"; then
13272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13273 $as_echo "$AWK" >&6; }
13274 else
13275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13276 $as_echo "no" >&6; }
13277 fi
13278 
13279 
13280           if test "x$AWK" = x; then
13281             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13282           fi
13283         else
13284           # Otherwise we believe it is a complete path. Use it as it is.
13285           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13286 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13287           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13288 $as_echo_n "checking for AWK... " >&6; }
13289           if test ! -x "$tool_specified"; then
13290             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13291 $as_echo "not found" >&6; }
13292             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13293           fi
13294           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13295 $as_echo "$tool_specified" >&6; }
13296         fi
13297       fi
13298     fi
13299 
13300   fi
13301 
13302 
13303   if test "x$AWK" = x; then
13304     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13305   fi
13306 
13307 
13308 
13309 
13310   # Publish this variable in the help.
13311 
13312 
13313   if [ -z "${GREP+x}" ]; then
13314     # The variable is not set by user, try to locate tool using the code snippet
13315     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13316 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13317 if ${ac_cv_path_GREP+:} false; then :
13318   $as_echo_n "(cached) " >&6
13319 else
13320   if test -z "$GREP"; then
13321   ac_path_GREP_found=false
13322   # Loop through the user's path and test for each of PROGNAME-LIST
13323   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13324 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13325 do
13326   IFS=$as_save_IFS
13327   test -z "$as_dir" && as_dir=.
13328     for ac_prog in grep ggrep; do
13329     for ac_exec_ext in '' $ac_executable_extensions; do
13330       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13331       as_fn_executable_p "$ac_path_GREP" || continue
13332 # Check for GNU ac_path_GREP and select it if it is found.
13333   # Check for GNU $ac_path_GREP
13334 case `"$ac_path_GREP" --version 2>&1` in
13335 *GNU*)
13336   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13337 *)
13338   ac_count=0
13339   $as_echo_n 0123456789 >"conftest.in"
13340   while :
13341   do
13342     cat "conftest.in" "conftest.in" >"conftest.tmp"
13343     mv "conftest.tmp" "conftest.in"
13344     cp "conftest.in" "conftest.nl"
13345     $as_echo 'GREP' >> "conftest.nl"
13346     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13347     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13348     as_fn_arith $ac_count + 1 && ac_count=$as_val
13349     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13350       # Best one so far, save it but keep looking for a better one
13351       ac_cv_path_GREP="$ac_path_GREP"
13352       ac_path_GREP_max=$ac_count
13353     fi
13354     # 10*(2^10) chars as input seems more than enough
13355     test $ac_count -gt 10 && break
13356   done
13357   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13358 esac
13359 
13360       $ac_path_GREP_found && break 3
13361     done
13362   done
13363   done
13364 IFS=$as_save_IFS
13365   if test -z "$ac_cv_path_GREP"; then
13366     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13367   fi
13368 else
13369   ac_cv_path_GREP=$GREP
13370 fi
13371 
13372 fi
13373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13374 $as_echo "$ac_cv_path_GREP" >&6; }
13375  GREP="$ac_cv_path_GREP"
13376 
13377 
13378   else
13379     # The variable is set, but is it from the command line or the environment?
13380 
13381     # Try to remove the string !GREP! from our list.
13382     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13383     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13384       # If it failed, the variable was not from the command line. Ignore it,
13385       # but warn the user (except for BASH, which is always set by the calling BASH).
13386       if test "xGREP" != xBASH; then
13387         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13388 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13389       fi
13390       # Try to locate tool using the code snippet
13391       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13392 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13393 if ${ac_cv_path_GREP+:} false; then :
13394   $as_echo_n "(cached) " >&6
13395 else
13396   if test -z "$GREP"; then
13397   ac_path_GREP_found=false
13398   # Loop through the user's path and test for each of PROGNAME-LIST
13399   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13400 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13401 do
13402   IFS=$as_save_IFS
13403   test -z "$as_dir" && as_dir=.
13404     for ac_prog in grep ggrep; do
13405     for ac_exec_ext in '' $ac_executable_extensions; do
13406       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13407       as_fn_executable_p "$ac_path_GREP" || continue
13408 # Check for GNU ac_path_GREP and select it if it is found.
13409   # Check for GNU $ac_path_GREP
13410 case `"$ac_path_GREP" --version 2>&1` in
13411 *GNU*)
13412   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13413 *)
13414   ac_count=0
13415   $as_echo_n 0123456789 >"conftest.in"
13416   while :
13417   do
13418     cat "conftest.in" "conftest.in" >"conftest.tmp"
13419     mv "conftest.tmp" "conftest.in"
13420     cp "conftest.in" "conftest.nl"
13421     $as_echo 'GREP' >> "conftest.nl"
13422     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13423     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13424     as_fn_arith $ac_count + 1 && ac_count=$as_val
13425     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13426       # Best one so far, save it but keep looking for a better one
13427       ac_cv_path_GREP="$ac_path_GREP"
13428       ac_path_GREP_max=$ac_count
13429     fi
13430     # 10*(2^10) chars as input seems more than enough
13431     test $ac_count -gt 10 && break
13432   done
13433   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13434 esac
13435 
13436       $ac_path_GREP_found && break 3
13437     done
13438   done
13439   done
13440 IFS=$as_save_IFS
13441   if test -z "$ac_cv_path_GREP"; then
13442     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13443   fi
13444 else
13445   ac_cv_path_GREP=$GREP
13446 fi
13447 
13448 fi
13449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13450 $as_echo "$ac_cv_path_GREP" >&6; }
13451  GREP="$ac_cv_path_GREP"
13452 
13453 
13454     else
13455       # If it succeeded, then it was overridden by the user. We will use it
13456       # for the tool.
13457 
13458       # First remove it from the list of overridden variables, so we can test
13459       # for unknown variables in the end.
13460       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13461 
13462       # Check if we try to supply an empty value
13463       if test "x$GREP" = x; then
13464         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13465 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13466         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13467 $as_echo_n "checking for GREP... " >&6; }
13468         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13469 $as_echo "disabled" >&6; }
13470       else
13471         # Check if the provided tool contains a complete path.
13472         tool_specified="$GREP"
13473         tool_basename="${tool_specified##*/}"
13474         if test "x$tool_basename" = "x$tool_specified"; then
13475           # A command without a complete path is provided, search $PATH.
13476           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13477 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13478           # Extract the first word of "$tool_basename", so it can be a program name with args.
13479 set dummy $tool_basename; ac_word=$2
13480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13481 $as_echo_n "checking for $ac_word... " >&6; }
13482 if ${ac_cv_path_GREP+:} false; then :
13483   $as_echo_n "(cached) " >&6
13484 else
13485   case $GREP in
13486   [\\/]* | ?:[\\/]*)
13487   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13488   ;;
13489   *)
13490   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13491 for as_dir in $PATH
13492 do
13493   IFS=$as_save_IFS
13494   test -z "$as_dir" && as_dir=.
13495     for ac_exec_ext in '' $ac_executable_extensions; do
13496   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13497     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13498     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13499     break 2
13500   fi
13501 done
13502   done
13503 IFS=$as_save_IFS
13504 
13505   ;;
13506 esac
13507 fi
13508 GREP=$ac_cv_path_GREP
13509 if test -n "$GREP"; then
13510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13511 $as_echo "$GREP" >&6; }
13512 else
13513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13514 $as_echo "no" >&6; }
13515 fi
13516 
13517 
13518           if test "x$GREP" = x; then
13519             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13520           fi
13521         else
13522           # Otherwise we believe it is a complete path. Use it as it is.
13523           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13524 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13525           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13526 $as_echo_n "checking for GREP... " >&6; }
13527           if test ! -x "$tool_specified"; then
13528             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13529 $as_echo "not found" >&6; }
13530             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13531           fi
13532           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13533 $as_echo "$tool_specified" >&6; }
13534         fi
13535       fi
13536     fi
13537 
13538   fi
13539 
13540 
13541   if test "x$GREP" = x; then
13542     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13543   fi
13544 
13545 
13546 
13547 
13548   # Publish this variable in the help.
13549 
13550 
13551   if [ -z "${EGREP+x}" ]; then
13552     # The variable is not set by user, try to locate tool using the code snippet
13553     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13554 $as_echo_n "checking for egrep... " >&6; }
13555 if ${ac_cv_path_EGREP+:} false; then :
13556   $as_echo_n "(cached) " >&6
13557 else
13558   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13559    then ac_cv_path_EGREP="$GREP -E"
13560    else
13561      if test -z "$EGREP"; then
13562   ac_path_EGREP_found=false
13563   # Loop through the user's path and test for each of PROGNAME-LIST
13564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13565 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13566 do
13567   IFS=$as_save_IFS
13568   test -z "$as_dir" && as_dir=.
13569     for ac_prog in egrep; do
13570     for ac_exec_ext in '' $ac_executable_extensions; do
13571       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13572       as_fn_executable_p "$ac_path_EGREP" || continue
13573 # Check for GNU ac_path_EGREP and select it if it is found.
13574   # Check for GNU $ac_path_EGREP
13575 case `"$ac_path_EGREP" --version 2>&1` in
13576 *GNU*)
13577   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13578 *)
13579   ac_count=0
13580   $as_echo_n 0123456789 >"conftest.in"
13581   while :
13582   do
13583     cat "conftest.in" "conftest.in" >"conftest.tmp"
13584     mv "conftest.tmp" "conftest.in"
13585     cp "conftest.in" "conftest.nl"
13586     $as_echo 'EGREP' >> "conftest.nl"
13587     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13588     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13589     as_fn_arith $ac_count + 1 && ac_count=$as_val
13590     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13591       # Best one so far, save it but keep looking for a better one
13592       ac_cv_path_EGREP="$ac_path_EGREP"
13593       ac_path_EGREP_max=$ac_count
13594     fi
13595     # 10*(2^10) chars as input seems more than enough
13596     test $ac_count -gt 10 && break
13597   done
13598   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13599 esac
13600 
13601       $ac_path_EGREP_found && break 3
13602     done
13603   done
13604   done
13605 IFS=$as_save_IFS
13606   if test -z "$ac_cv_path_EGREP"; then
13607     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13608   fi
13609 else
13610   ac_cv_path_EGREP=$EGREP
13611 fi
13612 
13613    fi
13614 fi
13615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13616 $as_echo "$ac_cv_path_EGREP" >&6; }
13617  EGREP="$ac_cv_path_EGREP"
13618 
13619 
13620   else
13621     # The variable is set, but is it from the command line or the environment?
13622 
13623     # Try to remove the string !EGREP! from our list.
13624     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13625     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13626       # If it failed, the variable was not from the command line. Ignore it,
13627       # but warn the user (except for BASH, which is always set by the calling BASH).
13628       if test "xEGREP" != xBASH; then
13629         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13630 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13631       fi
13632       # Try to locate tool using the code snippet
13633       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13634 $as_echo_n "checking for egrep... " >&6; }
13635 if ${ac_cv_path_EGREP+:} false; then :
13636   $as_echo_n "(cached) " >&6
13637 else
13638   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13639    then ac_cv_path_EGREP="$GREP -E"
13640    else
13641      if test -z "$EGREP"; then
13642   ac_path_EGREP_found=false
13643   # Loop through the user's path and test for each of PROGNAME-LIST
13644   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13645 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13646 do
13647   IFS=$as_save_IFS
13648   test -z "$as_dir" && as_dir=.
13649     for ac_prog in egrep; do
13650     for ac_exec_ext in '' $ac_executable_extensions; do
13651       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13652       as_fn_executable_p "$ac_path_EGREP" || continue
13653 # Check for GNU ac_path_EGREP and select it if it is found.
13654   # Check for GNU $ac_path_EGREP
13655 case `"$ac_path_EGREP" --version 2>&1` in
13656 *GNU*)
13657   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13658 *)
13659   ac_count=0
13660   $as_echo_n 0123456789 >"conftest.in"
13661   while :
13662   do
13663     cat "conftest.in" "conftest.in" >"conftest.tmp"
13664     mv "conftest.tmp" "conftest.in"
13665     cp "conftest.in" "conftest.nl"
13666     $as_echo 'EGREP' >> "conftest.nl"
13667     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13668     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13669     as_fn_arith $ac_count + 1 && ac_count=$as_val
13670     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13671       # Best one so far, save it but keep looking for a better one
13672       ac_cv_path_EGREP="$ac_path_EGREP"
13673       ac_path_EGREP_max=$ac_count
13674     fi
13675     # 10*(2^10) chars as input seems more than enough
13676     test $ac_count -gt 10 && break
13677   done
13678   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13679 esac
13680 
13681       $ac_path_EGREP_found && break 3
13682     done
13683   done
13684   done
13685 IFS=$as_save_IFS
13686   if test -z "$ac_cv_path_EGREP"; then
13687     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13688   fi
13689 else
13690   ac_cv_path_EGREP=$EGREP
13691 fi
13692 
13693    fi
13694 fi
13695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13696 $as_echo "$ac_cv_path_EGREP" >&6; }
13697  EGREP="$ac_cv_path_EGREP"
13698 
13699 
13700     else
13701       # If it succeeded, then it was overridden by the user. We will use it
13702       # for the tool.
13703 
13704       # First remove it from the list of overridden variables, so we can test
13705       # for unknown variables in the end.
13706       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13707 
13708       # Check if we try to supply an empty value
13709       if test "x$EGREP" = x; then
13710         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13711 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13712         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13713 $as_echo_n "checking for EGREP... " >&6; }
13714         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13715 $as_echo "disabled" >&6; }
13716       else
13717         # Check if the provided tool contains a complete path.
13718         tool_specified="$EGREP"
13719         tool_basename="${tool_specified##*/}"
13720         if test "x$tool_basename" = "x$tool_specified"; then
13721           # A command without a complete path is provided, search $PATH.
13722           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13723 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13724           # Extract the first word of "$tool_basename", so it can be a program name with args.
13725 set dummy $tool_basename; ac_word=$2
13726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13727 $as_echo_n "checking for $ac_word... " >&6; }
13728 if ${ac_cv_path_EGREP+:} false; then :
13729   $as_echo_n "(cached) " >&6
13730 else
13731   case $EGREP in
13732   [\\/]* | ?:[\\/]*)
13733   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13734   ;;
13735   *)
13736   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13737 for as_dir in $PATH
13738 do
13739   IFS=$as_save_IFS
13740   test -z "$as_dir" && as_dir=.
13741     for ac_exec_ext in '' $ac_executable_extensions; do
13742   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13743     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13744     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13745     break 2
13746   fi
13747 done
13748   done
13749 IFS=$as_save_IFS
13750 
13751   ;;
13752 esac
13753 fi
13754 EGREP=$ac_cv_path_EGREP
13755 if test -n "$EGREP"; then
13756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13757 $as_echo "$EGREP" >&6; }
13758 else
13759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13760 $as_echo "no" >&6; }
13761 fi
13762 
13763 
13764           if test "x$EGREP" = x; then
13765             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13766           fi
13767         else
13768           # Otherwise we believe it is a complete path. Use it as it is.
13769           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13770 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13771           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13772 $as_echo_n "checking for EGREP... " >&6; }
13773           if test ! -x "$tool_specified"; then
13774             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13775 $as_echo "not found" >&6; }
13776             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13777           fi
13778           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13779 $as_echo "$tool_specified" >&6; }
13780         fi
13781       fi
13782     fi
13783 
13784   fi
13785 
13786 
13787   if test "x$EGREP" = x; then
13788     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13789   fi
13790 
13791 
13792 
13793 
13794   # Publish this variable in the help.
13795 
13796 
13797   if [ -z "${FGREP+x}" ]; then
13798     # The variable is not set by user, try to locate tool using the code snippet
13799     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13800 $as_echo_n "checking for fgrep... " >&6; }
13801 if ${ac_cv_path_FGREP+:} false; then :
13802   $as_echo_n "(cached) " >&6
13803 else
13804   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13805    then ac_cv_path_FGREP="$GREP -F"
13806    else
13807      if test -z "$FGREP"; then
13808   ac_path_FGREP_found=false
13809   # Loop through the user's path and test for each of PROGNAME-LIST
13810   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13811 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13812 do
13813   IFS=$as_save_IFS
13814   test -z "$as_dir" && as_dir=.
13815     for ac_prog in fgrep; do
13816     for ac_exec_ext in '' $ac_executable_extensions; do
13817       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13818       as_fn_executable_p "$ac_path_FGREP" || continue
13819 # Check for GNU ac_path_FGREP and select it if it is found.
13820   # Check for GNU $ac_path_FGREP
13821 case `"$ac_path_FGREP" --version 2>&1` in
13822 *GNU*)
13823   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13824 *)
13825   ac_count=0
13826   $as_echo_n 0123456789 >"conftest.in"
13827   while :
13828   do
13829     cat "conftest.in" "conftest.in" >"conftest.tmp"
13830     mv "conftest.tmp" "conftest.in"
13831     cp "conftest.in" "conftest.nl"
13832     $as_echo 'FGREP' >> "conftest.nl"
13833     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13834     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13835     as_fn_arith $ac_count + 1 && ac_count=$as_val
13836     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13837       # Best one so far, save it but keep looking for a better one
13838       ac_cv_path_FGREP="$ac_path_FGREP"
13839       ac_path_FGREP_max=$ac_count
13840     fi
13841     # 10*(2^10) chars as input seems more than enough
13842     test $ac_count -gt 10 && break
13843   done
13844   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13845 esac
13846 
13847       $ac_path_FGREP_found && break 3
13848     done
13849   done
13850   done
13851 IFS=$as_save_IFS
13852   if test -z "$ac_cv_path_FGREP"; then
13853     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13854   fi
13855 else
13856   ac_cv_path_FGREP=$FGREP
13857 fi
13858 
13859    fi
13860 fi
13861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13862 $as_echo "$ac_cv_path_FGREP" >&6; }
13863  FGREP="$ac_cv_path_FGREP"
13864 
13865 
13866   else
13867     # The variable is set, but is it from the command line or the environment?
13868 
13869     # Try to remove the string !FGREP! from our list.
13870     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13871     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13872       # If it failed, the variable was not from the command line. Ignore it,
13873       # but warn the user (except for BASH, which is always set by the calling BASH).
13874       if test "xFGREP" != xBASH; then
13875         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13876 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13877       fi
13878       # Try to locate tool using the code snippet
13879       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13880 $as_echo_n "checking for fgrep... " >&6; }
13881 if ${ac_cv_path_FGREP+:} false; then :
13882   $as_echo_n "(cached) " >&6
13883 else
13884   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13885    then ac_cv_path_FGREP="$GREP -F"
13886    else
13887      if test -z "$FGREP"; then
13888   ac_path_FGREP_found=false
13889   # Loop through the user's path and test for each of PROGNAME-LIST
13890   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13891 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13892 do
13893   IFS=$as_save_IFS
13894   test -z "$as_dir" && as_dir=.
13895     for ac_prog in fgrep; do
13896     for ac_exec_ext in '' $ac_executable_extensions; do
13897       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13898       as_fn_executable_p "$ac_path_FGREP" || continue
13899 # Check for GNU ac_path_FGREP and select it if it is found.
13900   # Check for GNU $ac_path_FGREP
13901 case `"$ac_path_FGREP" --version 2>&1` in
13902 *GNU*)
13903   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13904 *)
13905   ac_count=0
13906   $as_echo_n 0123456789 >"conftest.in"
13907   while :
13908   do
13909     cat "conftest.in" "conftest.in" >"conftest.tmp"
13910     mv "conftest.tmp" "conftest.in"
13911     cp "conftest.in" "conftest.nl"
13912     $as_echo 'FGREP' >> "conftest.nl"
13913     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13914     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13915     as_fn_arith $ac_count + 1 && ac_count=$as_val
13916     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13917       # Best one so far, save it but keep looking for a better one
13918       ac_cv_path_FGREP="$ac_path_FGREP"
13919       ac_path_FGREP_max=$ac_count
13920     fi
13921     # 10*(2^10) chars as input seems more than enough
13922     test $ac_count -gt 10 && break
13923   done
13924   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13925 esac
13926 
13927       $ac_path_FGREP_found && break 3
13928     done
13929   done
13930   done
13931 IFS=$as_save_IFS
13932   if test -z "$ac_cv_path_FGREP"; then
13933     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13934   fi
13935 else
13936   ac_cv_path_FGREP=$FGREP
13937 fi
13938 
13939    fi
13940 fi
13941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13942 $as_echo "$ac_cv_path_FGREP" >&6; }
13943  FGREP="$ac_cv_path_FGREP"
13944 
13945 
13946     else
13947       # If it succeeded, then it was overridden by the user. We will use it
13948       # for the tool.
13949 
13950       # First remove it from the list of overridden variables, so we can test
13951       # for unknown variables in the end.
13952       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13953 
13954       # Check if we try to supply an empty value
13955       if test "x$FGREP" = x; then
13956         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13957 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13958         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13959 $as_echo_n "checking for FGREP... " >&6; }
13960         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13961 $as_echo "disabled" >&6; }
13962       else
13963         # Check if the provided tool contains a complete path.
13964         tool_specified="$FGREP"
13965         tool_basename="${tool_specified##*/}"
13966         if test "x$tool_basename" = "x$tool_specified"; then
13967           # A command without a complete path is provided, search $PATH.
13968           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13969 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13970           # Extract the first word of "$tool_basename", so it can be a program name with args.
13971 set dummy $tool_basename; ac_word=$2
13972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13973 $as_echo_n "checking for $ac_word... " >&6; }
13974 if ${ac_cv_path_FGREP+:} false; then :
13975   $as_echo_n "(cached) " >&6
13976 else
13977   case $FGREP in
13978   [\\/]* | ?:[\\/]*)
13979   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13980   ;;
13981   *)
13982   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13983 for as_dir in $PATH
13984 do
13985   IFS=$as_save_IFS
13986   test -z "$as_dir" && as_dir=.
13987     for ac_exec_ext in '' $ac_executable_extensions; do
13988   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13989     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13991     break 2
13992   fi
13993 done
13994   done
13995 IFS=$as_save_IFS
13996 
13997   ;;
13998 esac
13999 fi
14000 FGREP=$ac_cv_path_FGREP
14001 if test -n "$FGREP"; then
14002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14003 $as_echo "$FGREP" >&6; }
14004 else
14005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14006 $as_echo "no" >&6; }
14007 fi
14008 
14009 
14010           if test "x$FGREP" = x; then
14011             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14012           fi
14013         else
14014           # Otherwise we believe it is a complete path. Use it as it is.
14015           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14016 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14017           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14018 $as_echo_n "checking for FGREP... " >&6; }
14019           if test ! -x "$tool_specified"; then
14020             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14021 $as_echo "not found" >&6; }
14022             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14023           fi
14024           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14025 $as_echo "$tool_specified" >&6; }
14026         fi
14027       fi
14028     fi
14029 
14030   fi
14031 
14032 
14033   if test "x$FGREP" = x; then
14034     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14035   fi
14036 
14037 
14038 
14039 
14040   # Publish this variable in the help.
14041 
14042 
14043   if [ -z "${SED+x}" ]; then
14044     # The variable is not set by user, try to locate tool using the code snippet
14045     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14046 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14047 if ${ac_cv_path_SED+:} false; then :
14048   $as_echo_n "(cached) " >&6
14049 else
14050             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14051      for ac_i in 1 2 3 4 5 6 7; do
14052        ac_script="$ac_script$as_nl$ac_script"
14053      done
14054      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14055      { ac_script=; unset ac_script;}
14056      if test -z "$SED"; then
14057   ac_path_SED_found=false
14058   # Loop through the user's path and test for each of PROGNAME-LIST
14059   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14060 for as_dir in $PATH
14061 do
14062   IFS=$as_save_IFS
14063   test -z "$as_dir" && as_dir=.
14064     for ac_prog in sed gsed; do
14065     for ac_exec_ext in '' $ac_executable_extensions; do
14066       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14067       as_fn_executable_p "$ac_path_SED" || continue
14068 # Check for GNU ac_path_SED and select it if it is found.
14069   # Check for GNU $ac_path_SED
14070 case `"$ac_path_SED" --version 2>&1` in
14071 *GNU*)
14072   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14073 *)
14074   ac_count=0
14075   $as_echo_n 0123456789 >"conftest.in"
14076   while :
14077   do
14078     cat "conftest.in" "conftest.in" >"conftest.tmp"
14079     mv "conftest.tmp" "conftest.in"
14080     cp "conftest.in" "conftest.nl"
14081     $as_echo '' >> "conftest.nl"
14082     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14083     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14084     as_fn_arith $ac_count + 1 && ac_count=$as_val
14085     if test $ac_count -gt ${ac_path_SED_max-0}; then
14086       # Best one so far, save it but keep looking for a better one
14087       ac_cv_path_SED="$ac_path_SED"
14088       ac_path_SED_max=$ac_count
14089     fi
14090     # 10*(2^10) chars as input seems more than enough
14091     test $ac_count -gt 10 && break
14092   done
14093   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14094 esac
14095 
14096       $ac_path_SED_found && break 3
14097     done
14098   done
14099   done
14100 IFS=$as_save_IFS
14101   if test -z "$ac_cv_path_SED"; then
14102     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14103   fi
14104 else
14105   ac_cv_path_SED=$SED
14106 fi
14107 
14108 fi
14109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14110 $as_echo "$ac_cv_path_SED" >&6; }
14111  SED="$ac_cv_path_SED"
14112   rm -f conftest.sed
14113 
14114   else
14115     # The variable is set, but is it from the command line or the environment?
14116 
14117     # Try to remove the string !SED! from our list.
14118     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14119     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14120       # If it failed, the variable was not from the command line. Ignore it,
14121       # but warn the user (except for BASH, which is always set by the calling BASH).
14122       if test "xSED" != xBASH; then
14123         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14124 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14125       fi
14126       # Try to locate tool using the code snippet
14127       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14128 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14129 if ${ac_cv_path_SED+:} false; then :
14130   $as_echo_n "(cached) " >&6
14131 else
14132             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14133      for ac_i in 1 2 3 4 5 6 7; do
14134        ac_script="$ac_script$as_nl$ac_script"
14135      done
14136      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14137      { ac_script=; unset ac_script;}
14138      if test -z "$SED"; then
14139   ac_path_SED_found=false
14140   # Loop through the user's path and test for each of PROGNAME-LIST
14141   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14142 for as_dir in $PATH
14143 do
14144   IFS=$as_save_IFS
14145   test -z "$as_dir" && as_dir=.
14146     for ac_prog in sed gsed; do
14147     for ac_exec_ext in '' $ac_executable_extensions; do
14148       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14149       as_fn_executable_p "$ac_path_SED" || continue
14150 # Check for GNU ac_path_SED and select it if it is found.
14151   # Check for GNU $ac_path_SED
14152 case `"$ac_path_SED" --version 2>&1` in
14153 *GNU*)
14154   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14155 *)
14156   ac_count=0
14157   $as_echo_n 0123456789 >"conftest.in"
14158   while :
14159   do
14160     cat "conftest.in" "conftest.in" >"conftest.tmp"
14161     mv "conftest.tmp" "conftest.in"
14162     cp "conftest.in" "conftest.nl"
14163     $as_echo '' >> "conftest.nl"
14164     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14165     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14166     as_fn_arith $ac_count + 1 && ac_count=$as_val
14167     if test $ac_count -gt ${ac_path_SED_max-0}; then
14168       # Best one so far, save it but keep looking for a better one
14169       ac_cv_path_SED="$ac_path_SED"
14170       ac_path_SED_max=$ac_count
14171     fi
14172     # 10*(2^10) chars as input seems more than enough
14173     test $ac_count -gt 10 && break
14174   done
14175   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14176 esac
14177 
14178       $ac_path_SED_found && break 3
14179     done
14180   done
14181   done
14182 IFS=$as_save_IFS
14183   if test -z "$ac_cv_path_SED"; then
14184     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14185   fi
14186 else
14187   ac_cv_path_SED=$SED
14188 fi
14189 
14190 fi
14191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14192 $as_echo "$ac_cv_path_SED" >&6; }
14193  SED="$ac_cv_path_SED"
14194   rm -f conftest.sed
14195 
14196     else
14197       # If it succeeded, then it was overridden by the user. We will use it
14198       # for the tool.
14199 
14200       # First remove it from the list of overridden variables, so we can test
14201       # for unknown variables in the end.
14202       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14203 
14204       # Check if we try to supply an empty value
14205       if test "x$SED" = x; then
14206         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14207 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14208         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14209 $as_echo_n "checking for SED... " >&6; }
14210         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14211 $as_echo "disabled" >&6; }
14212       else
14213         # Check if the provided tool contains a complete path.
14214         tool_specified="$SED"
14215         tool_basename="${tool_specified##*/}"
14216         if test "x$tool_basename" = "x$tool_specified"; then
14217           # A command without a complete path is provided, search $PATH.
14218           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14219 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14220           # Extract the first word of "$tool_basename", so it can be a program name with args.
14221 set dummy $tool_basename; ac_word=$2
14222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14223 $as_echo_n "checking for $ac_word... " >&6; }
14224 if ${ac_cv_path_SED+:} false; then :
14225   $as_echo_n "(cached) " >&6
14226 else
14227   case $SED in
14228   [\\/]* | ?:[\\/]*)
14229   ac_cv_path_SED="$SED" # Let the user override the test with a path.
14230   ;;
14231   *)
14232   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14233 for as_dir in $PATH
14234 do
14235   IFS=$as_save_IFS
14236   test -z "$as_dir" && as_dir=.
14237     for ac_exec_ext in '' $ac_executable_extensions; do
14238   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14239     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14240     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14241     break 2
14242   fi
14243 done
14244   done
14245 IFS=$as_save_IFS
14246 
14247   ;;
14248 esac
14249 fi
14250 SED=$ac_cv_path_SED
14251 if test -n "$SED"; then
14252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14253 $as_echo "$SED" >&6; }
14254 else
14255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14256 $as_echo "no" >&6; }
14257 fi
14258 
14259 
14260           if test "x$SED" = x; then
14261             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14262           fi
14263         else
14264           # Otherwise we believe it is a complete path. Use it as it is.
14265           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14266 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14267           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14268 $as_echo_n "checking for SED... " >&6; }
14269           if test ! -x "$tool_specified"; then
14270             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14271 $as_echo "not found" >&6; }
14272             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14273           fi
14274           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14275 $as_echo "$tool_specified" >&6; }
14276         fi
14277       fi
14278     fi
14279 
14280   fi
14281 
14282 
14283   if test "x$SED" = x; then
14284     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14285   fi
14286 
14287 
14288 
14289   # Always force rm.
14290   RM="$RM -f"
14291 
14292   # pwd behaves differently on various platforms and some don't support the -L flag.
14293   # Always use the bash builtin pwd to get uniform behavior.
14294   THEPWDCMD=pwd
14295 
14296   # These are not required on all platforms
14297 
14298 
14299   # Publish this variable in the help.
14300 
14301 
14302   if [ -z "${CYGPATH+x}" ]; then
14303     # The variable is not set by user, try to locate tool using the code snippet
14304     for ac_prog in cygpath
14305 do
14306   # Extract the first word of "$ac_prog", so it can be a program name with args.
14307 set dummy $ac_prog; ac_word=$2
14308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14309 $as_echo_n "checking for $ac_word... " >&6; }
14310 if ${ac_cv_path_CYGPATH+:} false; then :
14311   $as_echo_n "(cached) " >&6
14312 else
14313   case $CYGPATH in
14314   [\\/]* | ?:[\\/]*)
14315   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14316   ;;
14317   *)
14318   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14319 for as_dir in $PATH
14320 do
14321   IFS=$as_save_IFS
14322   test -z "$as_dir" && as_dir=.
14323     for ac_exec_ext in '' $ac_executable_extensions; do
14324   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14325     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14327     break 2
14328   fi
14329 done
14330   done
14331 IFS=$as_save_IFS
14332 
14333   ;;
14334 esac
14335 fi
14336 CYGPATH=$ac_cv_path_CYGPATH
14337 if test -n "$CYGPATH"; then
14338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14339 $as_echo "$CYGPATH" >&6; }
14340 else
14341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14342 $as_echo "no" >&6; }
14343 fi
14344 
14345 
14346   test -n "$CYGPATH" && break
14347 done
14348 
14349   else
14350     # The variable is set, but is it from the command line or the environment?
14351 
14352     # Try to remove the string !CYGPATH! from our list.
14353     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14354     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14355       # If it failed, the variable was not from the command line. Ignore it,
14356       # but warn the user (except for BASH, which is always set by the calling BASH).
14357       if test "xCYGPATH" != xBASH; then
14358         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14359 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14360       fi
14361       # Try to locate tool using the code snippet
14362       for ac_prog in cygpath
14363 do
14364   # Extract the first word of "$ac_prog", so it can be a program name with args.
14365 set dummy $ac_prog; ac_word=$2
14366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14367 $as_echo_n "checking for $ac_word... " >&6; }
14368 if ${ac_cv_path_CYGPATH+:} false; then :
14369   $as_echo_n "(cached) " >&6
14370 else
14371   case $CYGPATH in
14372   [\\/]* | ?:[\\/]*)
14373   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14374   ;;
14375   *)
14376   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14377 for as_dir in $PATH
14378 do
14379   IFS=$as_save_IFS
14380   test -z "$as_dir" && as_dir=.
14381     for ac_exec_ext in '' $ac_executable_extensions; do
14382   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14383     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14384     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14385     break 2
14386   fi
14387 done
14388   done
14389 IFS=$as_save_IFS
14390 
14391   ;;
14392 esac
14393 fi
14394 CYGPATH=$ac_cv_path_CYGPATH
14395 if test -n "$CYGPATH"; then
14396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14397 $as_echo "$CYGPATH" >&6; }
14398 else
14399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14400 $as_echo "no" >&6; }
14401 fi
14402 
14403 
14404   test -n "$CYGPATH" && break
14405 done
14406 
14407     else
14408       # If it succeeded, then it was overridden by the user. We will use it
14409       # for the tool.
14410 
14411       # First remove it from the list of overridden variables, so we can test
14412       # for unknown variables in the end.
14413       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14414 
14415       # Check if we try to supply an empty value
14416       if test "x$CYGPATH" = x; then
14417         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14418 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14419         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14420 $as_echo_n "checking for CYGPATH... " >&6; }
14421         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14422 $as_echo "disabled" >&6; }
14423       else
14424         # Check if the provided tool contains a complete path.
14425         tool_specified="$CYGPATH"
14426         tool_basename="${tool_specified##*/}"
14427         if test "x$tool_basename" = "x$tool_specified"; then
14428           # A command without a complete path is provided, search $PATH.
14429           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14430 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14431           # Extract the first word of "$tool_basename", so it can be a program name with args.
14432 set dummy $tool_basename; ac_word=$2
14433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14434 $as_echo_n "checking for $ac_word... " >&6; }
14435 if ${ac_cv_path_CYGPATH+:} false; then :
14436   $as_echo_n "(cached) " >&6
14437 else
14438   case $CYGPATH in
14439   [\\/]* | ?:[\\/]*)
14440   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14441   ;;
14442   *)
14443   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14444 for as_dir in $PATH
14445 do
14446   IFS=$as_save_IFS
14447   test -z "$as_dir" && as_dir=.
14448     for ac_exec_ext in '' $ac_executable_extensions; do
14449   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14450     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14452     break 2
14453   fi
14454 done
14455   done
14456 IFS=$as_save_IFS
14457 
14458   ;;
14459 esac
14460 fi
14461 CYGPATH=$ac_cv_path_CYGPATH
14462 if test -n "$CYGPATH"; then
14463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14464 $as_echo "$CYGPATH" >&6; }
14465 else
14466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14467 $as_echo "no" >&6; }
14468 fi
14469 
14470 
14471           if test "x$CYGPATH" = x; then
14472             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14473           fi
14474         else
14475           # Otherwise we believe it is a complete path. Use it as it is.
14476           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14477 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14478           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14479 $as_echo_n "checking for CYGPATH... " >&6; }
14480           if test ! -x "$tool_specified"; then
14481             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14482 $as_echo "not found" >&6; }
14483             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14484           fi
14485           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14486 $as_echo "$tool_specified" >&6; }
14487         fi
14488       fi
14489     fi
14490 
14491   fi
14492 
14493 
14494 
14495 
14496   # Publish this variable in the help.
14497 
14498 
14499   if [ -z "${READLINK+x}" ]; then
14500     # The variable is not set by user, try to locate tool using the code snippet
14501     for ac_prog in greadlink readlink
14502 do
14503   # Extract the first word of "$ac_prog", so it can be a program name with args.
14504 set dummy $ac_prog; ac_word=$2
14505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14506 $as_echo_n "checking for $ac_word... " >&6; }
14507 if ${ac_cv_path_READLINK+:} false; then :
14508   $as_echo_n "(cached) " >&6
14509 else
14510   case $READLINK in
14511   [\\/]* | ?:[\\/]*)
14512   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14513   ;;
14514   *)
14515   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14516 for as_dir in $PATH
14517 do
14518   IFS=$as_save_IFS
14519   test -z "$as_dir" && as_dir=.
14520     for ac_exec_ext in '' $ac_executable_extensions; do
14521   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14522     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14523     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14524     break 2
14525   fi
14526 done
14527   done
14528 IFS=$as_save_IFS
14529 
14530   ;;
14531 esac
14532 fi
14533 READLINK=$ac_cv_path_READLINK
14534 if test -n "$READLINK"; then
14535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14536 $as_echo "$READLINK" >&6; }
14537 else
14538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14539 $as_echo "no" >&6; }
14540 fi
14541 
14542 
14543   test -n "$READLINK" && break
14544 done
14545 
14546   else
14547     # The variable is set, but is it from the command line or the environment?
14548 
14549     # Try to remove the string !READLINK! from our list.
14550     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14551     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14552       # If it failed, the variable was not from the command line. Ignore it,
14553       # but warn the user (except for BASH, which is always set by the calling BASH).
14554       if test "xREADLINK" != xBASH; then
14555         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14556 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14557       fi
14558       # Try to locate tool using the code snippet
14559       for ac_prog in greadlink readlink
14560 do
14561   # Extract the first word of "$ac_prog", so it can be a program name with args.
14562 set dummy $ac_prog; ac_word=$2
14563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14564 $as_echo_n "checking for $ac_word... " >&6; }
14565 if ${ac_cv_path_READLINK+:} false; then :
14566   $as_echo_n "(cached) " >&6
14567 else
14568   case $READLINK in
14569   [\\/]* | ?:[\\/]*)
14570   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14571   ;;
14572   *)
14573   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14574 for as_dir in $PATH
14575 do
14576   IFS=$as_save_IFS
14577   test -z "$as_dir" && as_dir=.
14578     for ac_exec_ext in '' $ac_executable_extensions; do
14579   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14580     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14581     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14582     break 2
14583   fi
14584 done
14585   done
14586 IFS=$as_save_IFS
14587 
14588   ;;
14589 esac
14590 fi
14591 READLINK=$ac_cv_path_READLINK
14592 if test -n "$READLINK"; then
14593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14594 $as_echo "$READLINK" >&6; }
14595 else
14596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14597 $as_echo "no" >&6; }
14598 fi
14599 
14600 
14601   test -n "$READLINK" && break
14602 done
14603 
14604     else
14605       # If it succeeded, then it was overridden by the user. We will use it
14606       # for the tool.
14607 
14608       # First remove it from the list of overridden variables, so we can test
14609       # for unknown variables in the end.
14610       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14611 
14612       # Check if we try to supply an empty value
14613       if test "x$READLINK" = x; then
14614         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14615 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14616         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14617 $as_echo_n "checking for READLINK... " >&6; }
14618         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14619 $as_echo "disabled" >&6; }
14620       else
14621         # Check if the provided tool contains a complete path.
14622         tool_specified="$READLINK"
14623         tool_basename="${tool_specified##*/}"
14624         if test "x$tool_basename" = "x$tool_specified"; then
14625           # A command without a complete path is provided, search $PATH.
14626           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14627 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14628           # Extract the first word of "$tool_basename", so it can be a program name with args.
14629 set dummy $tool_basename; ac_word=$2
14630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14631 $as_echo_n "checking for $ac_word... " >&6; }
14632 if ${ac_cv_path_READLINK+:} false; then :
14633   $as_echo_n "(cached) " >&6
14634 else
14635   case $READLINK in
14636   [\\/]* | ?:[\\/]*)
14637   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14638   ;;
14639   *)
14640   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14641 for as_dir in $PATH
14642 do
14643   IFS=$as_save_IFS
14644   test -z "$as_dir" && as_dir=.
14645     for ac_exec_ext in '' $ac_executable_extensions; do
14646   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14647     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14648     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14649     break 2
14650   fi
14651 done
14652   done
14653 IFS=$as_save_IFS
14654 
14655   ;;
14656 esac
14657 fi
14658 READLINK=$ac_cv_path_READLINK
14659 if test -n "$READLINK"; then
14660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14661 $as_echo "$READLINK" >&6; }
14662 else
14663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14664 $as_echo "no" >&6; }
14665 fi
14666 
14667 
14668           if test "x$READLINK" = x; then
14669             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14670           fi
14671         else
14672           # Otherwise we believe it is a complete path. Use it as it is.
14673           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14674 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14675           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14676 $as_echo_n "checking for READLINK... " >&6; }
14677           if test ! -x "$tool_specified"; then
14678             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14679 $as_echo "not found" >&6; }
14680             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14681           fi
14682           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14683 $as_echo "$tool_specified" >&6; }
14684         fi
14685       fi
14686     fi
14687 
14688   fi
14689 
14690 
14691 
14692 
14693   # Publish this variable in the help.
14694 
14695 
14696   if [ -z "${DF+x}" ]; then
14697     # The variable is not set by user, try to locate tool using the code snippet
14698     for ac_prog in df
14699 do
14700   # Extract the first word of "$ac_prog", so it can be a program name with args.
14701 set dummy $ac_prog; ac_word=$2
14702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14703 $as_echo_n "checking for $ac_word... " >&6; }
14704 if ${ac_cv_path_DF+:} false; then :
14705   $as_echo_n "(cached) " >&6
14706 else
14707   case $DF in
14708   [\\/]* | ?:[\\/]*)
14709   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14710   ;;
14711   *)
14712   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14713 for as_dir in $PATH
14714 do
14715   IFS=$as_save_IFS
14716   test -z "$as_dir" && as_dir=.
14717     for ac_exec_ext in '' $ac_executable_extensions; do
14718   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14719     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14720     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14721     break 2
14722   fi
14723 done
14724   done
14725 IFS=$as_save_IFS
14726 
14727   ;;
14728 esac
14729 fi
14730 DF=$ac_cv_path_DF
14731 if test -n "$DF"; then
14732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14733 $as_echo "$DF" >&6; }
14734 else
14735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14736 $as_echo "no" >&6; }
14737 fi
14738 
14739 
14740   test -n "$DF" && break
14741 done
14742 
14743   else
14744     # The variable is set, but is it from the command line or the environment?
14745 
14746     # Try to remove the string !DF! from our list.
14747     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14748     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14749       # If it failed, the variable was not from the command line. Ignore it,
14750       # but warn the user (except for BASH, which is always set by the calling BASH).
14751       if test "xDF" != xBASH; then
14752         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14753 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14754       fi
14755       # Try to locate tool using the code snippet
14756       for ac_prog in df
14757 do
14758   # Extract the first word of "$ac_prog", so it can be a program name with args.
14759 set dummy $ac_prog; ac_word=$2
14760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14761 $as_echo_n "checking for $ac_word... " >&6; }
14762 if ${ac_cv_path_DF+:} false; then :
14763   $as_echo_n "(cached) " >&6
14764 else
14765   case $DF in
14766   [\\/]* | ?:[\\/]*)
14767   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14768   ;;
14769   *)
14770   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14771 for as_dir in $PATH
14772 do
14773   IFS=$as_save_IFS
14774   test -z "$as_dir" && as_dir=.
14775     for ac_exec_ext in '' $ac_executable_extensions; do
14776   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14777     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14778     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14779     break 2
14780   fi
14781 done
14782   done
14783 IFS=$as_save_IFS
14784 
14785   ;;
14786 esac
14787 fi
14788 DF=$ac_cv_path_DF
14789 if test -n "$DF"; then
14790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14791 $as_echo "$DF" >&6; }
14792 else
14793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14794 $as_echo "no" >&6; }
14795 fi
14796 
14797 
14798   test -n "$DF" && break
14799 done
14800 
14801     else
14802       # If it succeeded, then it was overridden by the user. We will use it
14803       # for the tool.
14804 
14805       # First remove it from the list of overridden variables, so we can test
14806       # for unknown variables in the end.
14807       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14808 
14809       # Check if we try to supply an empty value
14810       if test "x$DF" = x; then
14811         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14812 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14813         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14814 $as_echo_n "checking for DF... " >&6; }
14815         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14816 $as_echo "disabled" >&6; }
14817       else
14818         # Check if the provided tool contains a complete path.
14819         tool_specified="$DF"
14820         tool_basename="${tool_specified##*/}"
14821         if test "x$tool_basename" = "x$tool_specified"; then
14822           # A command without a complete path is provided, search $PATH.
14823           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14824 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14825           # Extract the first word of "$tool_basename", so it can be a program name with args.
14826 set dummy $tool_basename; ac_word=$2
14827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14828 $as_echo_n "checking for $ac_word... " >&6; }
14829 if ${ac_cv_path_DF+:} false; then :
14830   $as_echo_n "(cached) " >&6
14831 else
14832   case $DF in
14833   [\\/]* | ?:[\\/]*)
14834   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14835   ;;
14836   *)
14837   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14838 for as_dir in $PATH
14839 do
14840   IFS=$as_save_IFS
14841   test -z "$as_dir" && as_dir=.
14842     for ac_exec_ext in '' $ac_executable_extensions; do
14843   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14844     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14845     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14846     break 2
14847   fi
14848 done
14849   done
14850 IFS=$as_save_IFS
14851 
14852   ;;
14853 esac
14854 fi
14855 DF=$ac_cv_path_DF
14856 if test -n "$DF"; then
14857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14858 $as_echo "$DF" >&6; }
14859 else
14860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14861 $as_echo "no" >&6; }
14862 fi
14863 
14864 
14865           if test "x$DF" = x; then
14866             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14867           fi
14868         else
14869           # Otherwise we believe it is a complete path. Use it as it is.
14870           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14871 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14872           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14873 $as_echo_n "checking for DF... " >&6; }
14874           if test ! -x "$tool_specified"; then
14875             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14876 $as_echo "not found" >&6; }
14877             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14878           fi
14879           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14880 $as_echo "$tool_specified" >&6; }
14881         fi
14882       fi
14883     fi
14884 
14885   fi
14886 
14887 
14888 
14889 
14890   # Publish this variable in the help.
14891 
14892 
14893   if [ -z "${CPIO+x}" ]; then
14894     # The variable is not set by user, try to locate tool using the code snippet
14895     for ac_prog in cpio bsdcpio
14896 do
14897   # Extract the first word of "$ac_prog", so it can be a program name with args.
14898 set dummy $ac_prog; ac_word=$2
14899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14900 $as_echo_n "checking for $ac_word... " >&6; }
14901 if ${ac_cv_path_CPIO+:} false; then :
14902   $as_echo_n "(cached) " >&6
14903 else
14904   case $CPIO in
14905   [\\/]* | ?:[\\/]*)
14906   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14907   ;;
14908   *)
14909   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14910 for as_dir in $PATH
14911 do
14912   IFS=$as_save_IFS
14913   test -z "$as_dir" && as_dir=.
14914     for ac_exec_ext in '' $ac_executable_extensions; do
14915   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14916     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14917     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14918     break 2
14919   fi
14920 done
14921   done
14922 IFS=$as_save_IFS
14923 
14924   ;;
14925 esac
14926 fi
14927 CPIO=$ac_cv_path_CPIO
14928 if test -n "$CPIO"; then
14929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14930 $as_echo "$CPIO" >&6; }
14931 else
14932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14933 $as_echo "no" >&6; }
14934 fi
14935 
14936 
14937   test -n "$CPIO" && break
14938 done
14939 
14940   else
14941     # The variable is set, but is it from the command line or the environment?
14942 
14943     # Try to remove the string !CPIO! from our list.
14944     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14945     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14946       # If it failed, the variable was not from the command line. Ignore it,
14947       # but warn the user (except for BASH, which is always set by the calling BASH).
14948       if test "xCPIO" != xBASH; then
14949         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14950 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14951       fi
14952       # Try to locate tool using the code snippet
14953       for ac_prog in cpio bsdcpio
14954 do
14955   # Extract the first word of "$ac_prog", so it can be a program name with args.
14956 set dummy $ac_prog; ac_word=$2
14957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14958 $as_echo_n "checking for $ac_word... " >&6; }
14959 if ${ac_cv_path_CPIO+:} false; then :
14960   $as_echo_n "(cached) " >&6
14961 else
14962   case $CPIO in
14963   [\\/]* | ?:[\\/]*)
14964   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14965   ;;
14966   *)
14967   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14968 for as_dir in $PATH
14969 do
14970   IFS=$as_save_IFS
14971   test -z "$as_dir" && as_dir=.
14972     for ac_exec_ext in '' $ac_executable_extensions; do
14973   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14974     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14975     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14976     break 2
14977   fi
14978 done
14979   done
14980 IFS=$as_save_IFS
14981 
14982   ;;
14983 esac
14984 fi
14985 CPIO=$ac_cv_path_CPIO
14986 if test -n "$CPIO"; then
14987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14988 $as_echo "$CPIO" >&6; }
14989 else
14990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14991 $as_echo "no" >&6; }
14992 fi
14993 
14994 
14995   test -n "$CPIO" && break
14996 done
14997 
14998     else
14999       # If it succeeded, then it was overridden by the user. We will use it
15000       # for the tool.
15001 
15002       # First remove it from the list of overridden variables, so we can test
15003       # for unknown variables in the end.
15004       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15005 
15006       # Check if we try to supply an empty value
15007       if test "x$CPIO" = x; then
15008         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15009 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15010         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15011 $as_echo_n "checking for CPIO... " >&6; }
15012         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15013 $as_echo "disabled" >&6; }
15014       else
15015         # Check if the provided tool contains a complete path.
15016         tool_specified="$CPIO"
15017         tool_basename="${tool_specified##*/}"
15018         if test "x$tool_basename" = "x$tool_specified"; then
15019           # A command without a complete path is provided, search $PATH.
15020           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15021 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15022           # Extract the first word of "$tool_basename", so it can be a program name with args.
15023 set dummy $tool_basename; ac_word=$2
15024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15025 $as_echo_n "checking for $ac_word... " >&6; }
15026 if ${ac_cv_path_CPIO+:} false; then :
15027   $as_echo_n "(cached) " >&6
15028 else
15029   case $CPIO in
15030   [\\/]* | ?:[\\/]*)
15031   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15032   ;;
15033   *)
15034   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15035 for as_dir in $PATH
15036 do
15037   IFS=$as_save_IFS
15038   test -z "$as_dir" && as_dir=.
15039     for ac_exec_ext in '' $ac_executable_extensions; do
15040   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15041     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15042     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15043     break 2
15044   fi
15045 done
15046   done
15047 IFS=$as_save_IFS
15048 
15049   ;;
15050 esac
15051 fi
15052 CPIO=$ac_cv_path_CPIO
15053 if test -n "$CPIO"; then
15054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15055 $as_echo "$CPIO" >&6; }
15056 else
15057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15058 $as_echo "no" >&6; }
15059 fi
15060 
15061 
15062           if test "x$CPIO" = x; then
15063             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15064           fi
15065         else
15066           # Otherwise we believe it is a complete path. Use it as it is.
15067           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15068 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15069           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15070 $as_echo_n "checking for CPIO... " >&6; }
15071           if test ! -x "$tool_specified"; then
15072             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15073 $as_echo "not found" >&6; }
15074             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15075           fi
15076           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15077 $as_echo "$tool_specified" >&6; }
15078         fi
15079       fi
15080     fi
15081 
15082   fi
15083 
15084 
15085 
15086 
15087   # Publish this variable in the help.
15088 
15089 
15090   if [ -z "${NICE+x}" ]; then
15091     # The variable is not set by user, try to locate tool using the code snippet
15092     for ac_prog in nice
15093 do
15094   # Extract the first word of "$ac_prog", so it can be a program name with args.
15095 set dummy $ac_prog; ac_word=$2
15096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15097 $as_echo_n "checking for $ac_word... " >&6; }
15098 if ${ac_cv_path_NICE+:} false; then :
15099   $as_echo_n "(cached) " >&6
15100 else
15101   case $NICE in
15102   [\\/]* | ?:[\\/]*)
15103   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15104   ;;
15105   *)
15106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15107 for as_dir in $PATH
15108 do
15109   IFS=$as_save_IFS
15110   test -z "$as_dir" && as_dir=.
15111     for ac_exec_ext in '' $ac_executable_extensions; do
15112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15113     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15115     break 2
15116   fi
15117 done
15118   done
15119 IFS=$as_save_IFS
15120 
15121   ;;
15122 esac
15123 fi
15124 NICE=$ac_cv_path_NICE
15125 if test -n "$NICE"; then
15126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15127 $as_echo "$NICE" >&6; }
15128 else
15129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15130 $as_echo "no" >&6; }
15131 fi
15132 
15133 
15134   test -n "$NICE" && break
15135 done
15136 
15137   else
15138     # The variable is set, but is it from the command line or the environment?
15139 
15140     # Try to remove the string !NICE! from our list.
15141     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15142     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15143       # If it failed, the variable was not from the command line. Ignore it,
15144       # but warn the user (except for BASH, which is always set by the calling BASH).
15145       if test "xNICE" != xBASH; then
15146         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15147 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15148       fi
15149       # Try to locate tool using the code snippet
15150       for ac_prog in nice
15151 do
15152   # Extract the first word of "$ac_prog", so it can be a program name with args.
15153 set dummy $ac_prog; ac_word=$2
15154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15155 $as_echo_n "checking for $ac_word... " >&6; }
15156 if ${ac_cv_path_NICE+:} false; then :
15157   $as_echo_n "(cached) " >&6
15158 else
15159   case $NICE in
15160   [\\/]* | ?:[\\/]*)
15161   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15162   ;;
15163   *)
15164   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15165 for as_dir in $PATH
15166 do
15167   IFS=$as_save_IFS
15168   test -z "$as_dir" && as_dir=.
15169     for ac_exec_ext in '' $ac_executable_extensions; do
15170   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15171     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15173     break 2
15174   fi
15175 done
15176   done
15177 IFS=$as_save_IFS
15178 
15179   ;;
15180 esac
15181 fi
15182 NICE=$ac_cv_path_NICE
15183 if test -n "$NICE"; then
15184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15185 $as_echo "$NICE" >&6; }
15186 else
15187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15188 $as_echo "no" >&6; }
15189 fi
15190 
15191 
15192   test -n "$NICE" && break
15193 done
15194 
15195     else
15196       # If it succeeded, then it was overridden by the user. We will use it
15197       # for the tool.
15198 
15199       # First remove it from the list of overridden variables, so we can test
15200       # for unknown variables in the end.
15201       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15202 
15203       # Check if we try to supply an empty value
15204       if test "x$NICE" = x; then
15205         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15206 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15207         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15208 $as_echo_n "checking for NICE... " >&6; }
15209         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15210 $as_echo "disabled" >&6; }
15211       else
15212         # Check if the provided tool contains a complete path.
15213         tool_specified="$NICE"
15214         tool_basename="${tool_specified##*/}"
15215         if test "x$tool_basename" = "x$tool_specified"; then
15216           # A command without a complete path is provided, search $PATH.
15217           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15218 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15219           # Extract the first word of "$tool_basename", so it can be a program name with args.
15220 set dummy $tool_basename; ac_word=$2
15221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15222 $as_echo_n "checking for $ac_word... " >&6; }
15223 if ${ac_cv_path_NICE+:} false; then :
15224   $as_echo_n "(cached) " >&6
15225 else
15226   case $NICE in
15227   [\\/]* | ?:[\\/]*)
15228   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15229   ;;
15230   *)
15231   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15232 for as_dir in $PATH
15233 do
15234   IFS=$as_save_IFS
15235   test -z "$as_dir" && as_dir=.
15236     for ac_exec_ext in '' $ac_executable_extensions; do
15237   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15238     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15240     break 2
15241   fi
15242 done
15243   done
15244 IFS=$as_save_IFS
15245 
15246   ;;
15247 esac
15248 fi
15249 NICE=$ac_cv_path_NICE
15250 if test -n "$NICE"; then
15251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15252 $as_echo "$NICE" >&6; }
15253 else
15254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15255 $as_echo "no" >&6; }
15256 fi
15257 
15258 
15259           if test "x$NICE" = x; then
15260             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15261           fi
15262         else
15263           # Otherwise we believe it is a complete path. Use it as it is.
15264           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15265 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15266           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15267 $as_echo_n "checking for NICE... " >&6; }
15268           if test ! -x "$tool_specified"; then
15269             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15270 $as_echo "not found" >&6; }
15271             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15272           fi
15273           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15274 $as_echo "$tool_specified" >&6; }
15275         fi
15276       fi
15277     fi
15278 
15279   fi
15280 
15281 
15282 
15283 
15284 # Now we can determine OpenJDK build and target platforms. This is required to
15285 # have early on.
15286 # Make sure we can run config.sub.
15287 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15288   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15289 
15290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15291 $as_echo_n "checking build system type... " >&6; }
15292 if ${ac_cv_build+:} false; then :
15293   $as_echo_n "(cached) " >&6
15294 else
15295   ac_build_alias=$build_alias
15296 test "x$ac_build_alias" = x &&
15297   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15298 test "x$ac_build_alias" = x &&
15299   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15300 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15301   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15302 
15303 fi
15304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15305 $as_echo "$ac_cv_build" >&6; }
15306 case $ac_cv_build in
15307 *-*-*) ;;
15308 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15309 esac
15310 build=$ac_cv_build
15311 ac_save_IFS=$IFS; IFS='-'
15312 set x $ac_cv_build
15313 shift
15314 build_cpu=$1
15315 build_vendor=$2
15316 shift; shift
15317 # Remember, the first character of IFS is used to create $*,
15318 # except with old shells:
15319 build_os=$*
15320 IFS=$ac_save_IFS
15321 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15322 
15323 
15324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15325 $as_echo_n "checking host system type... " >&6; }
15326 if ${ac_cv_host+:} false; then :
15327   $as_echo_n "(cached) " >&6
15328 else
15329   if test "x$host_alias" = x; then
15330   ac_cv_host=$ac_cv_build
15331 else
15332   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15333     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15334 fi
15335 
15336 fi
15337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15338 $as_echo "$ac_cv_host" >&6; }
15339 case $ac_cv_host in
15340 *-*-*) ;;
15341 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15342 esac
15343 host=$ac_cv_host
15344 ac_save_IFS=$IFS; IFS='-'
15345 set x $ac_cv_host
15346 shift
15347 host_cpu=$1
15348 host_vendor=$2
15349 shift; shift
15350 # Remember, the first character of IFS is used to create $*,
15351 # except with old shells:
15352 host_os=$*
15353 IFS=$ac_save_IFS
15354 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15355 
15356 
15357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15358 $as_echo_n "checking target system type... " >&6; }
15359 if ${ac_cv_target+:} false; then :
15360   $as_echo_n "(cached) " >&6
15361 else
15362   if test "x$target_alias" = x; then
15363   ac_cv_target=$ac_cv_host
15364 else
15365   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15366     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15367 fi
15368 
15369 fi
15370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15371 $as_echo "$ac_cv_target" >&6; }
15372 case $ac_cv_target in
15373 *-*-*) ;;
15374 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15375 esac
15376 target=$ac_cv_target
15377 ac_save_IFS=$IFS; IFS='-'
15378 set x $ac_cv_target
15379 shift
15380 target_cpu=$1
15381 target_vendor=$2
15382 shift; shift
15383 # Remember, the first character of IFS is used to create $*,
15384 # except with old shells:
15385 target_os=$*
15386 IFS=$ac_save_IFS
15387 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15388 
15389 
15390 # The aliases save the names the user supplied, while $host etc.
15391 # will get canonicalized.
15392 test -n "$target_alias" &&
15393   test "$program_prefix$program_suffix$program_transform_name" = \
15394     NONENONEs,x,x, &&
15395   program_prefix=${target_alias}-
15396 
15397   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15398   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15399   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15400   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15401   # to use the configure naming style.
15402 
15403 
15404 
15405 
15406 
15407   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15408   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15409   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15410   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15411   OPENJDK_TARGET_AUTOCONF_NAME="$host"
15412   OPENJDK_BUILD_AUTOCONF_NAME="$build"
15413 
15414 
15415 
15416   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15417 
15418   case "$build_os" in
15419     *linux*)
15420       VAR_OS=linux
15421       VAR_OS_TYPE=unix
15422       ;;
15423     *solaris*)
15424       VAR_OS=solaris
15425       VAR_OS_TYPE=unix
15426       ;;
15427     *darwin*)
15428       VAR_OS=macosx
15429       VAR_OS_TYPE=unix
15430       ;;
15431     *bsd*)
15432       VAR_OS=bsd
15433       VAR_OS_TYPE=unix
15434       ;;
15435     *cygwin*)
15436       VAR_OS=windows
15437       VAR_OS_ENV=windows.cygwin
15438       ;;
15439     *mingw*)
15440       VAR_OS=windows
15441       VAR_OS_ENV=windows.msys
15442       ;;
15443     *aix*)
15444       VAR_OS=aix
15445       VAR_OS_TYPE=unix
15446       ;;
15447     *)
15448       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15449       ;;
15450   esac
15451 
15452 
15453   # First argument is the cpu name from the trip/quad
15454   case "$build_cpu" in
15455     x86_64)
15456       VAR_CPU=x86_64
15457       VAR_CPU_ARCH=x86
15458       VAR_CPU_BITS=64
15459       VAR_CPU_ENDIAN=little
15460       ;;
15461     i?86)
15462       VAR_CPU=x86
15463       VAR_CPU_ARCH=x86
15464       VAR_CPU_BITS=32
15465       VAR_CPU_ENDIAN=little
15466       ;;
15467     arm*)
15468       VAR_CPU=arm
15469       VAR_CPU_ARCH=arm
15470       VAR_CPU_BITS=32
15471       VAR_CPU_ENDIAN=little
15472       ;;
15473     aarch64)
15474       VAR_CPU=aarch64
15475       VAR_CPU_ARCH=aarch64
15476       VAR_CPU_BITS=64
15477       VAR_CPU_ENDIAN=little
15478       ;;
15479     powerpc)
15480       VAR_CPU=ppc
15481       VAR_CPU_ARCH=ppc
15482       VAR_CPU_BITS=32
15483       VAR_CPU_ENDIAN=big
15484       ;;
15485     powerpc64)
15486       VAR_CPU=ppc64
15487       VAR_CPU_ARCH=ppc
15488       VAR_CPU_BITS=64
15489       VAR_CPU_ENDIAN=big
15490       ;;
15491     powerpc64le)
15492       VAR_CPU=ppc64le
15493       VAR_CPU_ARCH=ppc
15494       VAR_CPU_BITS=64
15495       VAR_CPU_ENDIAN=little
15496       ;;
15497     s390)
15498       VAR_CPU=s390
15499       VAR_CPU_ARCH=s390
15500       VAR_CPU_BITS=32
15501       VAR_CPU_ENDIAN=big
15502       ;;
15503     s390x)
15504       VAR_CPU=s390x
15505       VAR_CPU_ARCH=s390
15506       VAR_CPU_BITS=64
15507       VAR_CPU_ENDIAN=big
15508       ;;
15509     sparc)
15510       VAR_CPU=sparc
15511       VAR_CPU_ARCH=sparc
15512       VAR_CPU_BITS=32
15513       VAR_CPU_ENDIAN=big
15514       ;;
15515     sparcv9|sparc64)
15516       VAR_CPU=sparcv9
15517       VAR_CPU_ARCH=sparc
15518       VAR_CPU_BITS=64
15519       VAR_CPU_ENDIAN=big
15520       ;;
15521     *)
15522       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15523       ;;
15524   esac
15525 
15526   # ..and setup our own variables. (Do this explicitely to facilitate searching)
15527   OPENJDK_BUILD_OS="$VAR_OS"
15528   if test "x$VAR_OS_TYPE" != x; then
15529     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15530   else
15531     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15532   fi
15533   if test "x$VAR_OS_ENV" != x; then
15534     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15535   else
15536     OPENJDK_BUILD_OS_ENV="$VAR_OS"
15537   fi
15538   OPENJDK_BUILD_CPU="$VAR_CPU"
15539   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15540   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15541   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15542 
15543 
15544 
15545 
15546 
15547 
15548 
15549 
15550   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15551 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
15552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15553 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15554 
15555   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15556 
15557   case "$host_os" in
15558     *linux*)
15559       VAR_OS=linux
15560       VAR_OS_TYPE=unix
15561       ;;
15562     *solaris*)
15563       VAR_OS=solaris
15564       VAR_OS_TYPE=unix
15565       ;;
15566     *darwin*)
15567       VAR_OS=macosx
15568       VAR_OS_TYPE=unix
15569       ;;
15570     *bsd*)
15571       VAR_OS=bsd
15572       VAR_OS_TYPE=unix
15573       ;;
15574     *cygwin*)
15575       VAR_OS=windows
15576       VAR_OS_ENV=windows.cygwin
15577       ;;
15578     *mingw*)
15579       VAR_OS=windows
15580       VAR_OS_ENV=windows.msys
15581       ;;
15582     *aix*)
15583       VAR_OS=aix
15584       VAR_OS_TYPE=unix
15585       ;;
15586     *)
15587       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15588       ;;
15589   esac
15590 
15591 
15592   # First argument is the cpu name from the trip/quad
15593   case "$host_cpu" in
15594     x86_64)
15595       VAR_CPU=x86_64
15596       VAR_CPU_ARCH=x86
15597       VAR_CPU_BITS=64
15598       VAR_CPU_ENDIAN=little
15599       ;;
15600     i?86)
15601       VAR_CPU=x86
15602       VAR_CPU_ARCH=x86
15603       VAR_CPU_BITS=32
15604       VAR_CPU_ENDIAN=little
15605       ;;
15606     arm*)
15607       VAR_CPU=arm
15608       VAR_CPU_ARCH=arm
15609       VAR_CPU_BITS=32
15610       VAR_CPU_ENDIAN=little
15611       ;;
15612     aarch64)
15613       VAR_CPU=aarch64
15614       VAR_CPU_ARCH=aarch64
15615       VAR_CPU_BITS=64
15616       VAR_CPU_ENDIAN=little
15617       ;;
15618     powerpc)
15619       VAR_CPU=ppc
15620       VAR_CPU_ARCH=ppc
15621       VAR_CPU_BITS=32
15622       VAR_CPU_ENDIAN=big
15623       ;;
15624     powerpc64)
15625       VAR_CPU=ppc64
15626       VAR_CPU_ARCH=ppc
15627       VAR_CPU_BITS=64
15628       VAR_CPU_ENDIAN=big
15629       ;;
15630     powerpc64le)
15631       VAR_CPU=ppc64le
15632       VAR_CPU_ARCH=ppc
15633       VAR_CPU_BITS=64
15634       VAR_CPU_ENDIAN=little
15635       ;;
15636     s390)
15637       VAR_CPU=s390
15638       VAR_CPU_ARCH=s390
15639       VAR_CPU_BITS=32
15640       VAR_CPU_ENDIAN=big
15641       ;;
15642     s390x)
15643       VAR_CPU=s390x
15644       VAR_CPU_ARCH=s390
15645       VAR_CPU_BITS=64
15646       VAR_CPU_ENDIAN=big
15647       ;;
15648     sparc)
15649       VAR_CPU=sparc
15650       VAR_CPU_ARCH=sparc
15651       VAR_CPU_BITS=32
15652       VAR_CPU_ENDIAN=big
15653       ;;
15654     sparcv9|sparc64)
15655       VAR_CPU=sparcv9
15656       VAR_CPU_ARCH=sparc
15657       VAR_CPU_BITS=64
15658       VAR_CPU_ENDIAN=big
15659       ;;
15660     *)
15661       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15662       ;;
15663   esac
15664 
15665   # ... and setup our own variables. (Do this explicitely to facilitate searching)
15666   OPENJDK_TARGET_OS="$VAR_OS"
15667   if test "x$VAR_OS_TYPE" != x; then
15668     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15669   else
15670     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15671   fi
15672   if test "x$VAR_OS_ENV" != x; then
15673     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15674   else
15675     OPENJDK_TARGET_OS_ENV="$VAR_OS"
15676   fi
15677   OPENJDK_TARGET_CPU="$VAR_CPU"
15678   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15679   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15680   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15681 
15682 
15683 
15684 
15685 
15686 
15687 
15688 
15689   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15690 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
15691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15692 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15693 
15694 
15695 
15696 # Check whether --with-target-bits was given.
15697 if test "${with_target_bits+set}" = set; then :
15698   withval=$with_target_bits;
15699 fi
15700 
15701 
15702   # We have three types of compiles:
15703   # native  == normal compilation, target system == build system
15704   # cross   == traditional cross compilation, target system != build system; special toolchain needed
15705   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15706   #
15707   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15708     # We're doing a proper cross-compilation
15709     COMPILE_TYPE="cross"
15710   else
15711     COMPILE_TYPE="native"
15712   fi
15713 
15714   if test "x$with_target_bits" != x; then
15715     if test "x$COMPILE_TYPE" = "xcross"; then
15716       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15717     fi
15718 
15719     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15720       # A reduced build is requested
15721       COMPILE_TYPE="reduced"
15722       OPENJDK_TARGET_CPU_BITS=32
15723       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15724         OPENJDK_TARGET_CPU=x86
15725       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15726         OPENJDK_TARGET_CPU=sparc
15727       else
15728         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15729       fi
15730     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15731       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
15732     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15733       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15734 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15735     else
15736       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15737     fi
15738   fi
15739 
15740 
15741   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15742 $as_echo_n "checking compilation type... " >&6; }
15743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15744 $as_echo "$COMPILE_TYPE" >&6; }
15745 
15746 
15747   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15748     REQUIRED_OS_NAME=SunOS
15749     REQUIRED_OS_VERSION=5.10
15750   fi
15751   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15752     REQUIRED_OS_NAME=Linux
15753     REQUIRED_OS_VERSION=2.6
15754   fi
15755   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15756     REQUIRED_OS_NAME=Windows
15757     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15758       REQUIRED_OS_VERSION=5.2
15759     else
15760       REQUIRED_OS_VERSION=5.1
15761     fi
15762   fi
15763   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15764     REQUIRED_OS_NAME=Darwin
15765     REQUIRED_OS_VERSION=11.2
15766   fi
15767   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15768     REQUIRED_OS_NAME=AIX
15769     REQUIRED_OS_VERSION=7.1
15770   fi
15771 
15772 
15773 
15774 
15775 
15776 
15777   # Also store the legacy naming of the cpu.
15778   # Ie i586 and amd64 instead of x86 and x86_64
15779   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15780   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15781     OPENJDK_TARGET_CPU_LEGACY="i586"
15782   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15783     # On all platforms except MacOSX replace x86_64 with amd64.
15784     OPENJDK_TARGET_CPU_LEGACY="amd64"
15785   fi
15786 
15787 
15788   # And the second legacy naming of the cpu.
15789   # Ie i386 and amd64 instead of x86 and x86_64.
15790   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15791   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15792     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15793   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15794     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15795   fi
15796 
15797 
15798   # This is the name of the cpu (but using i386 and amd64 instead of
15799   # x86 and x86_64, respectively), preceeded by a /, to be used when
15800   # locating libraries. On macosx, it's empty, though.
15801   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15802   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15803     OPENJDK_TARGET_CPU_LIBDIR=""
15804   fi
15805 
15806 
15807   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15808   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15809   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15810   OPENJDK_TARGET_CPU_ISADIR=""
15811   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15812     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15813       OPENJDK_TARGET_CPU_ISADIR="/amd64"
15814     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15815       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15816     fi
15817   fi
15818 
15819 
15820   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15821   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15822   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15823     # On linux only, we replace x86 with i386.
15824     OPENJDK_TARGET_CPU_OSARCH="i386"
15825   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15826     # On all platforms except macosx, we replace x86_64 with amd64.
15827     OPENJDK_TARGET_CPU_OSARCH="amd64"
15828   fi
15829 
15830 
15831   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15832   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15833     OPENJDK_TARGET_CPU_JLI="i386"
15834   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15835     # On all platforms except macosx, we replace x86_64 with amd64.
15836     OPENJDK_TARGET_CPU_JLI="amd64"
15837   fi
15838   # Now setup the -D flags for building libjli.
15839   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15840   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15841     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15842       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15843     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15844       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15845     fi
15846   fi
15847 
15848 
15849   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15850       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15851   else
15852       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15853   fi
15854 
15855 
15856   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15857   # Macosx is osx and x86_64 is x64
15858   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15859     OPENJDK_TARGET_OS_BUNDLE="osx"
15860   else
15861     OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15862   fi
15863   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15864     OPENJDK_TARGET_CPU_BUNDLE="x64"
15865   else
15866     OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15867   fi
15868   OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15869 
15870 
15871 
15872 
15873   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15874     A_LP64="LP64:="
15875     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15876     # unpack200.exe
15877     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15878       OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15879     fi
15880   fi
15881   LP64=$A_LP64
15882 
15883 
15884   if test "x$COMPILE_TYPE" = "xcross"; then
15885     # FIXME: ... or should this include reduced builds..?
15886     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15887   else
15888     DEFINE_CROSS_COMPILE_ARCH=""
15889   fi
15890 
15891 
15892   # Convert openjdk platform names to hotspot names
15893 
15894   HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15895   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15896     HOTSPOT_TARGET_OS=bsd
15897   fi
15898 
15899 
15900   HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15901   if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15902     HOTSPOT_TARGET_OS_TYPE=posix
15903   fi
15904 
15905 
15906   HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15907   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15908     HOTSPOT_TARGET_CPU=x86_32
15909   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15910     HOTSPOT_TARGET_CPU=sparc
15911   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15912     HOTSPOT_TARGET_CPU=ppc_64
15913   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15914     HOTSPOT_TARGET_CPU=ppc_64
15915   fi
15916 
15917 
15918   # This is identical with OPENJDK_*, but define anyway for consistency.
15919   HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15920 
15921 
15922   # Setup HOTSPOT_TARGET_CPU_DEFINE
15923   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15924     HOTSPOT_TARGET_CPU_DEFINE=IA32
15925   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15926     HOTSPOT_TARGET_CPU_DEFINE=AMD64
15927   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15928     HOTSPOT_TARGET_CPU_DEFINE=SPARC
15929   elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15930     HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15931   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15932     HOTSPOT_TARGET_CPU_DEFINE=PPC64
15933   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15934     HOTSPOT_TARGET_CPU_DEFINE=PPC64
15935 
15936   # The cpu defines below are for zero, we don't support them directly.
15937   elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15938     HOTSPOT_TARGET_CPU_DEFINE=SPARC
15939   elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15940     HOTSPOT_TARGET_CPU_DEFINE=PPC32
15941   elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15942     HOTSPOT_TARGET_CPU_DEFINE=S390
15943   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15944     HOTSPOT_TARGET_CPU_DEFINE=S390
15945   elif test "x$OPENJDK_TARGET_CPU" != x; then
15946     HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15947   fi
15948 
15949 
15950 
15951 
15952   # Also store the legacy naming of the cpu.
15953   # Ie i586 and amd64 instead of x86 and x86_64
15954   OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15955   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15956     OPENJDK_BUILD_CPU_LEGACY="i586"
15957   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15958     # On all platforms except MacOSX replace x86_64 with amd64.
15959     OPENJDK_BUILD_CPU_LEGACY="amd64"
15960   fi
15961 
15962 
15963   # And the second legacy naming of the cpu.
15964   # Ie i386 and amd64 instead of x86 and x86_64.
15965   OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15966   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15967     OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15968   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15969     OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15970   fi
15971 
15972 
15973   # This is the name of the cpu (but using i386 and amd64 instead of
15974   # x86 and x86_64, respectively), preceeded by a /, to be used when
15975   # locating libraries. On macosx, it's empty, though.
15976   OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15977   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15978     OPENJDK_BUILD_CPU_LIBDIR=""
15979   fi
15980 
15981 
15982   # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15983   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15984   # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15985   OPENJDK_BUILD_CPU_ISADIR=""
15986   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15987     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15988       OPENJDK_BUILD_CPU_ISADIR="/amd64"
15989     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15990       OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15991     fi
15992   fi
15993 
15994 
15995   # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15996   OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15997   if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15998     # On linux only, we replace x86 with i386.
15999     OPENJDK_BUILD_CPU_OSARCH="i386"
16000   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16001     # On all platforms except macosx, we replace x86_64 with amd64.
16002     OPENJDK_BUILD_CPU_OSARCH="amd64"
16003   fi
16004 
16005 
16006   OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16007   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16008     OPENJDK_BUILD_CPU_JLI="i386"
16009   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16010     # On all platforms except macosx, we replace x86_64 with amd64.
16011     OPENJDK_BUILD_CPU_JLI="amd64"
16012   fi
16013   # Now setup the -D flags for building libjli.
16014   OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16015   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16016     if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16017       OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16018     elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16019       OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16020     fi
16021   fi
16022 
16023 
16024   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16025       OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16026   else
16027       OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16028   fi
16029 
16030 
16031   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16032   # Macosx is osx and x86_64 is x64
16033   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16034     OPENJDK_BUILD_OS_BUNDLE="osx"
16035   else
16036     OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16037   fi
16038   if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16039     OPENJDK_BUILD_CPU_BUNDLE="x64"
16040   else
16041     OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16042   fi
16043   OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16044 
16045 
16046 
16047 
16048   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16049     A_LP64="LP64:="
16050     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16051     # unpack200.exe
16052     if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16053       OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16054     fi
16055   fi
16056   LP64=$A_LP64
16057 
16058 
16059   if test "x$COMPILE_TYPE" = "xcross"; then
16060     # FIXME: ... or should this include reduced builds..?
16061     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16062   else
16063     DEFINE_CROSS_COMPILE_ARCH=""
16064   fi
16065 
16066 
16067   # Convert openjdk platform names to hotspot names
16068 
16069   HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16070   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16071     HOTSPOT_BUILD_OS=bsd
16072   fi
16073 
16074 
16075   HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16076   if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16077     HOTSPOT_BUILD_OS_TYPE=posix
16078   fi
16079 
16080 
16081   HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16082   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16083     HOTSPOT_BUILD_CPU=x86_32
16084   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16085     HOTSPOT_BUILD_CPU=sparc
16086   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16087     HOTSPOT_BUILD_CPU=ppc_64
16088   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16089     HOTSPOT_BUILD_CPU=ppc_64
16090   fi
16091 
16092 
16093   # This is identical with OPENJDK_*, but define anyway for consistency.
16094   HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16095 
16096 
16097   # Setup HOTSPOT_BUILD_CPU_DEFINE
16098   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16099     HOTSPOT_BUILD_CPU_DEFINE=IA32
16100   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16101     HOTSPOT_BUILD_CPU_DEFINE=AMD64
16102   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16103     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16104   elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16105     HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16106   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16107     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16108   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16109     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16110 
16111   # The cpu defines below are for zero, we don't support them directly.
16112   elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16113     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16114   elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16115     HOTSPOT_BUILD_CPU_DEFINE=PPC32
16116   elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16117     HOTSPOT_BUILD_CPU_DEFINE=S390
16118   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16119     HOTSPOT_BUILD_CPU_DEFINE=S390
16120   elif test "x$OPENJDK_BUILD_CPU" != x; then
16121     HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16122   fi
16123 
16124 
16125 
16126 
16127   # ZERO_ARCHDEF is used to enable architecture-specific code.
16128   # This is used in legacy hotspot build.
16129   ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16130 
16131 
16132 
16133 
16134 
16135 # Continue setting up basic stuff. Most remaining code require fundamental tools.
16136 
16137   # Save the current directory this script was started from
16138   CURDIR="$PWD"
16139 
16140   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16141   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16142   # was not available at that time.
16143   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16144   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16145     ORIGINAL_PATH="$REWRITTEN_PATH"
16146     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16147 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16148   fi
16149 
16150   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16151     PATH_SEP=";"
16152 
16153   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16154   if test $SRC_ROOT_LENGTH -gt 100; then
16155     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16156   fi
16157 
16158   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16159     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16160 $as_echo_n "checking cygwin release... " >&6; }
16161     CYGWIN_VERSION=`$UNAME -r`
16162     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16163 $as_echo "$CYGWIN_VERSION" >&6; }
16164     WINDOWS_ENV_VENDOR='cygwin'
16165     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16166 
16167     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16168     if test "x$CYGWIN_VERSION_OLD" != x; then
16169       { $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
16170 $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;}
16171       as_fn_error $? "Cannot continue" "$LINENO" 5
16172     fi
16173     if test "x$CYGPATH" = x; then
16174       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16175     fi
16176     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16177 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16178     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16179     cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16180     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16181     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16182     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16183 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
16184     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16185     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16186     if test "x$test_cygdrive_prefix" = x; then
16187       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16188     fi
16189   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16190     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16191 $as_echo_n "checking msys release... " >&6; }
16192     MSYS_VERSION=`$UNAME -r`
16193     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16194 $as_echo "$MSYS_VERSION" >&6; }
16195 
16196     WINDOWS_ENV_VENDOR='msys'
16197     WINDOWS_ENV_VERSION="$MSYS_VERSION"
16198 
16199     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16200 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
16201     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16202     MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16203 
16204   windows_path="$MSYS_ROOT_PATH"
16205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16206     unix_path=`$CYGPATH -u "$windows_path"`
16207     MSYS_ROOT_PATH="$unix_path"
16208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16209     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16210     MSYS_ROOT_PATH="$unix_path"
16211   fi
16212 
16213     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16214 $as_echo "$MSYS_ROOT_PATH" >&6; }
16215     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16216   else
16217     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16218   fi
16219 
16220   # Test if windows or unix (cygwin/msys) find is first in path.
16221   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16222 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16223   FIND_BINARY_OUTPUT=`find --version 2>&1`
16224   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16225     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16226 $as_echo "unix style" >&6; }
16227   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16228     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16229 $as_echo "Windows" >&6; }
16230     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16231 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16232     { $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
16233 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16234     as_fn_error $? "Cannot continue" "$LINENO" 5
16235   else
16236     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16237 $as_echo "unknown" >&6; }
16238     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16239 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16240   fi
16241 
16242   else
16243     PATH_SEP=":"
16244   fi
16245 
16246 
16247   # We get the top-level directory from the supporting wrappers.
16248   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16249 $as_echo_n "checking for top-level directory... " >&6; }
16250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16251 $as_echo "$TOPDIR" >&6; }
16252 
16253 
16254   # Save the original version of TOPDIR for string comparisons
16255   ORIGINAL_TOPDIR="$TOPDIR"
16256 
16257 
16258   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16259 
16260   # Only process if variable expands to non-empty
16261 
16262   if test "x$CURDIR" != x; then
16263     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16264 
16265   # Input might be given as Windows format, start by converting to
16266   # unix format.
16267   path="$CURDIR"
16268   new_path=`$CYGPATH -u "$path"`
16269 
16270   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16271   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16272   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16273   # "foo.exe" is OK but "foo" is an error.
16274   #
16275   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16276   # It is also a way to make sure we got the proper file name for the real test later on.
16277   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16278   if test "x$test_shortpath" = x; then
16279     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16280 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16281     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16282   fi
16283 
16284   # Call helper function which possibly converts this using DOS-style short mode.
16285   # If so, the updated path is stored in $new_path.
16286 
16287   input_path="$new_path"
16288   # Check if we need to convert this using DOS-style short mode. If the path
16289   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16290   # take no chances and rewrite it.
16291   # Note: m4 eats our [], so we need to use [ and ] instead.
16292   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16293   if test "x$has_forbidden_chars" != x; then
16294     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16295     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16296     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16297     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16298       # Going to short mode and back again did indeed matter. Since short mode is
16299       # case insensitive, let's make it lowercase to improve readability.
16300       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16301       # Now convert it back to Unix-style (cygpath)
16302       input_path=`$CYGPATH -u "$shortmode_path"`
16303       new_path="$input_path"
16304     fi
16305   fi
16306 
16307   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16308   if test "x$test_cygdrive_prefix" = x; then
16309     # As a simple fix, exclude /usr/bin since it's not a real path.
16310     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16311       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16312       # a path prefixed by /cygdrive for fixpath to work.
16313       new_path="$CYGWIN_ROOT_PATH$input_path"
16314     fi
16315   fi
16316 
16317 
16318   if test "x$path" != "x$new_path"; then
16319     CURDIR="$new_path"
16320     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16321 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16322   fi
16323 
16324     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16325 
16326   path="$CURDIR"
16327   has_colon=`$ECHO $path | $GREP ^.:`
16328   new_path="$path"
16329   if test "x$has_colon" = x; then
16330     # Not in mixed or Windows style, start by that.
16331     new_path=`cmd //c echo $path`
16332   fi
16333 
16334 
16335   input_path="$new_path"
16336   # Check if we need to convert this using DOS-style short mode. If the path
16337   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16338   # take no chances and rewrite it.
16339   # Note: m4 eats our [], so we need to use [ and ] instead.
16340   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16341   if test "x$has_forbidden_chars" != x; then
16342     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16343     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16344   fi
16345 
16346 
16347   windows_path="$new_path"
16348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16349     unix_path=`$CYGPATH -u "$windows_path"`
16350     new_path="$unix_path"
16351   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16352     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16353     new_path="$unix_path"
16354   fi
16355 
16356   if test "x$path" != "x$new_path"; then
16357     CURDIR="$new_path"
16358     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16359 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16360   fi
16361 
16362   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16363   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16364 
16365     else
16366       # We're on a unix platform. Hooray! :)
16367       path="$CURDIR"
16368       has_space=`$ECHO "$path" | $GREP " "`
16369       if test "x$has_space" != x; then
16370         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16371 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16372         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16373       fi
16374 
16375       # Use eval to expand a potential ~
16376       eval path="$path"
16377       if test ! -f "$path" && test ! -d "$path"; then
16378         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16379       fi
16380 
16381       if test -d "$path"; then
16382         CURDIR="`cd "$path"; $THEPWDCMD -L`"
16383       else
16384         dir="`$DIRNAME "$path"`"
16385         base="`$BASENAME "$path"`"
16386         CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16387       fi
16388     fi
16389   fi
16390 
16391 
16392   # Only process if variable expands to non-empty
16393 
16394   if test "x$TOPDIR" != x; then
16395     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16396 
16397   # Input might be given as Windows format, start by converting to
16398   # unix format.
16399   path="$TOPDIR"
16400   new_path=`$CYGPATH -u "$path"`
16401 
16402   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16403   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16404   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16405   # "foo.exe" is OK but "foo" is an error.
16406   #
16407   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16408   # It is also a way to make sure we got the proper file name for the real test later on.
16409   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16410   if test "x$test_shortpath" = x; then
16411     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16412 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16413     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16414   fi
16415 
16416   # Call helper function which possibly converts this using DOS-style short mode.
16417   # If so, the updated path is stored in $new_path.
16418 
16419   input_path="$new_path"
16420   # Check if we need to convert this using DOS-style short mode. If the path
16421   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16422   # take no chances and rewrite it.
16423   # Note: m4 eats our [], so we need to use [ and ] instead.
16424   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16425   if test "x$has_forbidden_chars" != x; then
16426     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16427     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16428     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16429     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16430       # Going to short mode and back again did indeed matter. Since short mode is
16431       # case insensitive, let's make it lowercase to improve readability.
16432       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16433       # Now convert it back to Unix-style (cygpath)
16434       input_path=`$CYGPATH -u "$shortmode_path"`
16435       new_path="$input_path"
16436     fi
16437   fi
16438 
16439   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16440   if test "x$test_cygdrive_prefix" = x; then
16441     # As a simple fix, exclude /usr/bin since it's not a real path.
16442     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16443       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16444       # a path prefixed by /cygdrive for fixpath to work.
16445       new_path="$CYGWIN_ROOT_PATH$input_path"
16446     fi
16447   fi
16448 
16449 
16450   if test "x$path" != "x$new_path"; then
16451     TOPDIR="$new_path"
16452     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16453 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16454   fi
16455 
16456     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16457 
16458   path="$TOPDIR"
16459   has_colon=`$ECHO $path | $GREP ^.:`
16460   new_path="$path"
16461   if test "x$has_colon" = x; then
16462     # Not in mixed or Windows style, start by that.
16463     new_path=`cmd //c echo $path`
16464   fi
16465 
16466 
16467   input_path="$new_path"
16468   # Check if we need to convert this using DOS-style short mode. If the path
16469   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16470   # take no chances and rewrite it.
16471   # Note: m4 eats our [], so we need to use [ and ] instead.
16472   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16473   if test "x$has_forbidden_chars" != x; then
16474     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16475     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16476   fi
16477 
16478 
16479   windows_path="$new_path"
16480   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16481     unix_path=`$CYGPATH -u "$windows_path"`
16482     new_path="$unix_path"
16483   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16484     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16485     new_path="$unix_path"
16486   fi
16487 
16488   if test "x$path" != "x$new_path"; then
16489     TOPDIR="$new_path"
16490     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16491 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16492   fi
16493 
16494   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16495   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16496 
16497     else
16498       # We're on a unix platform. Hooray! :)
16499       path="$TOPDIR"
16500       has_space=`$ECHO "$path" | $GREP " "`
16501       if test "x$has_space" != x; then
16502         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16503 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16504         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16505       fi
16506 
16507       # Use eval to expand a potential ~
16508       eval path="$path"
16509       if test ! -f "$path" && test ! -d "$path"; then
16510         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16511       fi
16512 
16513       if test -d "$path"; then
16514         TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16515       else
16516         dir="`$DIRNAME "$path"`"
16517         base="`$BASENAME "$path"`"
16518         TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16519       fi
16520     fi
16521   fi
16522 
16523   # SRC_ROOT is a traditional alias for TOPDIR.
16524   SRC_ROOT=$TOPDIR
16525 
16526   # Calculate a canonical version of TOPDIR for string comparisons
16527   CANONICAL_TOPDIR=$TOPDIR
16528 
16529   if test "x$OPENJDK_BUILD_OS" != xwindows; then
16530     # Follow a chain of symbolic links. Use readlink
16531     # where it exists, else fall back to horribly
16532     # complicated shell code.
16533     if test "x$READLINK_TESTED" != yes; then
16534       # On MacOSX there is a readlink tool with a different
16535       # purpose than the GNU readlink tool. Check the found readlink.
16536       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16537       if test "x$ISGNU" = x; then
16538         # A readlink that we do not know how to use.
16539         # Are there other non-GNU readlinks out there?
16540         READLINK_TESTED=yes
16541         READLINK=
16542       fi
16543     fi
16544 
16545     if test "x$READLINK" != x; then
16546       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16547     else
16548       # Save the current directory for restoring afterwards
16549       STARTDIR=$PWD
16550       COUNTER=0
16551       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16552       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16553       cd $sym_link_dir
16554       # Use -P flag to resolve symlinks in directories.
16555       cd `$THEPWDCMD -P`
16556       sym_link_dir=`$THEPWDCMD -P`
16557       # Resolve file symlinks
16558       while test $COUNTER -lt 20; do
16559         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16560         if test "x$ISLINK" == x; then
16561           # This is not a symbolic link! We are done!
16562           break
16563         fi
16564         # Again resolve directory symlinks since the target of the just found
16565         # link could be in a different directory
16566         cd `$DIRNAME $ISLINK`
16567         sym_link_dir=`$THEPWDCMD -P`
16568         sym_link_file=`$BASENAME $ISLINK`
16569         let COUNTER=COUNTER+1
16570       done
16571       cd $STARTDIR
16572       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16573     fi
16574   fi
16575 
16576 
16577 
16578   # Locate the directory of this script.
16579   AUTOCONF_DIR=$TOPDIR/common/autoconf
16580 
16581   # Setup username (for use in adhoc version strings etc)
16582   # Outer [ ] to quote m4.
16583    USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16584 
16585 
16586 
16587 # Check if it's a pure open build or if custom sources are to be used.
16588 
16589   # Check whether --enable-openjdk-only was given.
16590 if test "${enable_openjdk_only+set}" = set; then :
16591   enableval=$enable_openjdk_only;
16592 else
16593   enable_openjdk_only="no"
16594 fi
16595 
16596 
16597   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16598 $as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16600 $as_echo "$enable_openjdk_only" >&6; }
16601   if test "x$enable_openjdk_only" = "xyes"; then
16602     SUPPRESS_CUSTOM_EXTENSIONS="true"
16603   elif test "x$enable_openjdk_only" = "xno"; then
16604     SUPPRESS_CUSTOM_EXTENSIONS="false"
16605   else
16606     as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16607   fi
16608 
16609   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16610   # the IncludeCustomExtension macro.
16611 
16612 
16613 # Check whether --with-custom-make-dir was given.
16614 if test "${with_custom_make_dir+set}" = set; then :
16615   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
16616 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16617 fi
16618 
16619 
16620 
16621 
16622 # These are needed to be able to create a configuration name (and thus the output directory)
16623 
16624   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16625 $as_echo_n "checking which variant of the JDK to build... " >&6; }
16626 
16627 # Check whether --with-jdk-variant was given.
16628 if test "${with_jdk_variant+set}" = set; then :
16629   withval=$with_jdk_variant;
16630 fi
16631 
16632 
16633   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16634     JDK_VARIANT="normal"
16635   else
16636     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16637   fi
16638 
16639 
16640 
16641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16642 $as_echo "$JDK_VARIANT" >&6; }
16643 
16644 
16645   DEBUG_LEVEL="release"
16646   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16647 $as_echo_n "checking which debug level to use... " >&6; }
16648   # Check whether --enable-debug was given.
16649 if test "${enable_debug+set}" = set; then :
16650   enableval=$enable_debug;
16651         ENABLE_DEBUG="${enableval}"
16652         DEBUG_LEVEL="fastdebug"
16653 
16654 else
16655   ENABLE_DEBUG="no"
16656 fi
16657 
16658 
16659 
16660 # Check whether --with-debug-level was given.
16661 if test "${with_debug_level+set}" = set; then :
16662   withval=$with_debug_level;
16663         DEBUG_LEVEL="${withval}"
16664         if test "x$ENABLE_DEBUG" = xyes; then
16665           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16666         fi
16667 
16668 fi
16669 
16670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16671 $as_echo "$DEBUG_LEVEL" >&6; }
16672 
16673   if test "x$DEBUG_LEVEL" != xrelease && \
16674       test "x$DEBUG_LEVEL" != xoptimized && \
16675       test "x$DEBUG_LEVEL" != xfastdebug && \
16676       test "x$DEBUG_LEVEL" != xslowdebug; then
16677     as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16678   fi
16679 
16680   # Translate DEBUG_LEVEL to debug level used by Hotspot
16681   HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16682   if test "x$DEBUG_LEVEL" = xrelease; then
16683     HOTSPOT_DEBUG_LEVEL="product"
16684   elif test "x$DEBUG_LEVEL" = xslowdebug; then
16685     HOTSPOT_DEBUG_LEVEL="debug"
16686   fi
16687 
16688   if test "x$DEBUG_LEVEL" = xoptimized; then
16689     # The debug level 'optimized' is a little special because it is currently only
16690     # applicable to the HotSpot build where it means to build a completely
16691     # optimized version of the VM without any debugging code (like for the
16692     # 'release' debug level which is called 'product' in the HotSpot build) but
16693     # with the exception that it can contain additional code which is otherwise
16694     # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16695     # test new and/or experimental features which are not intended for customer
16696     # shipment. Because these new features need to be tested and benchmarked in
16697     # real world scenarios, we want to build the containing JDK at the 'release'
16698     # debug level.
16699     DEBUG_LEVEL="release"
16700   fi
16701 
16702 
16703 
16704 
16705 
16706 
16707 # Check whether --with-jvm-variants was given.
16708 if test "${with_jvm_variants+set}" = set; then :
16709   withval=$with_jvm_variants;
16710 fi
16711 
16712 
16713   if test "x$with_jvm_variants" = x; then
16714     with_jvm_variants="server"
16715   fi
16716   JVM_VARIANTS_OPT="$with_jvm_variants"
16717 
16718   # Has the user listed more than one variant?
16719   # Additional [] needed to keep m4 from mangling shell constructs.
16720   if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16721     BUILDING_MULTIPLE_JVM_VARIANTS=true
16722   else
16723     BUILDING_MULTIPLE_JVM_VARIANTS=false
16724   fi
16725   # Replace the commas with AND for use in the build directory name.
16726   JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16727 
16728   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16729 $as_echo_n "checking which variants of the JVM to build... " >&6; }
16730   # JVM_VARIANTS is a space-separated list.
16731   # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16732   JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16734 $as_echo "$JVM_VARIANTS" >&6; }
16735 
16736   # Check that the selected variants are valid
16737 
16738   # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16739   # Notice that the original variant failes on SLES 10 and 11
16740   NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16741   STACK=${JVM_VARIANTS// /$'\n'}
16742   INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16743   if test "x$INVALID_VARIANTS" != x; then
16744     { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16745 $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16746     as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16747   fi
16748 
16749   # All "special" variants share the same output directory ("server")
16750   VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16751   NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16752   STACK=${JVM_VARIANTS// /$'\n'}
16753   INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16754   if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16755     as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16756   fi
16757 
16758 
16759 
16760 
16761   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16762     # zero behaves as a platform and rewrites these values. This is really weird. :(
16763     # We are guaranteed that we do not build any other variants when building zero.
16764     HOTSPOT_TARGET_CPU=zero
16765     HOTSPOT_TARGET_CPU_ARCH=zero
16766   fi
16767 
16768 
16769 # With basic setup done, call the custom early hook.
16770 
16771 
16772 # Check if we have devkits, extra paths or sysroot set.
16773 
16774 
16775 # Check whether --with-devkit was given.
16776 if test "${with_devkit+set}" = set; then :
16777   withval=$with_devkit;
16778 
16779   # Only process if variable expands to non-empty
16780 
16781   if test "x$with_devkit" != x; then
16782     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16783 
16784   # Input might be given as Windows format, start by converting to
16785   # unix format.
16786   path="$with_devkit"
16787   new_path=`$CYGPATH -u "$path"`
16788 
16789   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16790   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16791   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16792   # "foo.exe" is OK but "foo" is an error.
16793   #
16794   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16795   # It is also a way to make sure we got the proper file name for the real test later on.
16796   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16797   if test "x$test_shortpath" = x; then
16798     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16799 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16800     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16801   fi
16802 
16803   # Call helper function which possibly converts this using DOS-style short mode.
16804   # If so, the updated path is stored in $new_path.
16805 
16806   input_path="$new_path"
16807   # Check if we need to convert this using DOS-style short mode. If the path
16808   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16809   # take no chances and rewrite it.
16810   # Note: m4 eats our [], so we need to use [ and ] instead.
16811   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16812   if test "x$has_forbidden_chars" != x; then
16813     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16814     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16815     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16816     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16817       # Going to short mode and back again did indeed matter. Since short mode is
16818       # case insensitive, let's make it lowercase to improve readability.
16819       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16820       # Now convert it back to Unix-style (cygpath)
16821       input_path=`$CYGPATH -u "$shortmode_path"`
16822       new_path="$input_path"
16823     fi
16824   fi
16825 
16826   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16827   if test "x$test_cygdrive_prefix" = x; then
16828     # As a simple fix, exclude /usr/bin since it's not a real path.
16829     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16830       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16831       # a path prefixed by /cygdrive for fixpath to work.
16832       new_path="$CYGWIN_ROOT_PATH$input_path"
16833     fi
16834   fi
16835 
16836 
16837   if test "x$path" != "x$new_path"; then
16838     with_devkit="$new_path"
16839     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16840 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16841   fi
16842 
16843     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16844 
16845   path="$with_devkit"
16846   has_colon=`$ECHO $path | $GREP ^.:`
16847   new_path="$path"
16848   if test "x$has_colon" = x; then
16849     # Not in mixed or Windows style, start by that.
16850     new_path=`cmd //c echo $path`
16851   fi
16852 
16853 
16854   input_path="$new_path"
16855   # Check if we need to convert this using DOS-style short mode. If the path
16856   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16857   # take no chances and rewrite it.
16858   # Note: m4 eats our [], so we need to use [ and ] instead.
16859   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16860   if test "x$has_forbidden_chars" != x; then
16861     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16862     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16863   fi
16864 
16865 
16866   windows_path="$new_path"
16867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16868     unix_path=`$CYGPATH -u "$windows_path"`
16869     new_path="$unix_path"
16870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16872     new_path="$unix_path"
16873   fi
16874 
16875   if test "x$path" != "x$new_path"; then
16876     with_devkit="$new_path"
16877     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16878 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16879   fi
16880 
16881   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16882   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16883 
16884     else
16885       # We're on a unix platform. Hooray! :)
16886       path="$with_devkit"
16887       has_space=`$ECHO "$path" | $GREP " "`
16888       if test "x$has_space" != x; then
16889         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16890 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16891         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16892       fi
16893 
16894       # Use eval to expand a potential ~
16895       eval path="$path"
16896       if test ! -f "$path" && test ! -d "$path"; then
16897         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16898       fi
16899 
16900       if test -d "$path"; then
16901         with_devkit="`cd "$path"; $THEPWDCMD -L`"
16902       else
16903         dir="`$DIRNAME "$path"`"
16904         base="`$BASENAME "$path"`"
16905         with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16906       fi
16907     fi
16908   fi
16909 
16910         DEVKIT_ROOT="$with_devkit"
16911         # Check for a meta data info file in the root of the devkit
16912         if test -f "$DEVKIT_ROOT/devkit.info"; then
16913           . $DEVKIT_ROOT/devkit.info
16914           # This potentially sets the following:
16915           # A descriptive name of the devkit
16916 
16917   if test "x$DEVKIT_NAME" = x; then
16918     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16919   fi
16920 
16921           # Corresponds to --with-extra-path
16922 
16923   if test "x$DEVKIT_EXTRA_PATH" = x; then
16924     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16925   fi
16926 
16927           # Corresponds to --with-toolchain-path
16928 
16929   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16930     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16931   fi
16932 
16933           # Corresponds to --with-sysroot
16934 
16935   if test "x$DEVKIT_SYSROOT" = x; then
16936     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16937   fi
16938 
16939 
16940           # Identifies the Visual Studio version in the devkit
16941 
16942   if test "x$DEVKIT_VS_VERSION" = x; then
16943     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16944   fi
16945 
16946           # The Visual Studio include environment variable
16947 
16948   if test "x$DEVKIT_VS_INCLUDE" = x; then
16949     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16950   fi
16951 
16952           # The Visual Studio lib environment variable
16953 
16954   if test "x$DEVKIT_VS_LIB" = x; then
16955     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16956   fi
16957 
16958           # Corresponds to --with-msvcr-dll
16959 
16960   if test "x$DEVKIT_MSVCR_DLL" = x; then
16961     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16962   fi
16963 
16964           # Corresponds to --with-msvcp-dll
16965 
16966   if test "x$DEVKIT_MSVCP_DLL" = x; then
16967     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16968   fi
16969 
16970         fi
16971 
16972         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16973 $as_echo_n "checking for devkit... " >&6; }
16974         if test "x$DEVKIT_NAME" != x; then
16975           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16976 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16977         else
16978           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16979 $as_echo "$DEVKIT_ROOT" >&6; }
16980         fi
16981 
16982 
16983   if test "x$DEVKIT_EXTRA_PATH" != x; then
16984     if test "x$EXTRA_PATH" = x; then
16985       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16986     else
16987       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16988     fi
16989   fi
16990 
16991 
16992         # Fallback default of just /bin if DEVKIT_PATH is not defined
16993         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16994           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16995         fi
16996 
16997   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16998     if test "x$TOOLCHAIN_PATH" = x; then
16999       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17000     else
17001       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17002     fi
17003   fi
17004 
17005 
17006         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17007         # places for backwards compatiblity.
17008         if test "x$DEVKIT_SYSROOT" != x; then
17009           SYSROOT="$DEVKIT_SYSROOT"
17010         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17011           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17012         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17013           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17014         fi
17015 
17016 
17017 fi
17018 
17019 
17020   # You can force the sysroot if the sysroot encoded into the compiler tools
17021   # is not correct.
17022 
17023 # Check whether --with-sys-root was given.
17024 if test "${with_sys_root+set}" = set; then :
17025   withval=$with_sys_root; SYSROOT=$with_sys_root
17026 
17027 fi
17028 
17029 
17030 
17031 # Check whether --with-sysroot was given.
17032 if test "${with_sysroot+set}" = set; then :
17033   withval=$with_sysroot; SYSROOT=$with_sysroot
17034 
17035 fi
17036 
17037 
17038 
17039 # Check whether --with-tools-dir was given.
17040 if test "${with_tools_dir+set}" = set; then :
17041   withval=$with_tools_dir;
17042   if test "x$with_tools_dir" != x; then
17043     if test "x$TOOLCHAIN_PATH" = x; then
17044       TOOLCHAIN_PATH="$with_tools_dir"
17045     else
17046       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17047     fi
17048   fi
17049 
17050 
17051 fi
17052 
17053 
17054 
17055 # Check whether --with-toolchain-path was given.
17056 if test "${with_toolchain_path+set}" = set; then :
17057   withval=$with_toolchain_path;
17058   if test "x$with_toolchain_path" != x; then
17059     if test "x$TOOLCHAIN_PATH" = x; then
17060       TOOLCHAIN_PATH="$with_toolchain_path"
17061     else
17062       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17063     fi
17064   fi
17065 
17066 
17067 fi
17068 
17069 
17070 
17071 # Check whether --with-extra-path was given.
17072 if test "${with_extra_path+set}" = set; then :
17073   withval=$with_extra_path;
17074   if test "x$with_extra_path" != x; then
17075     if test "x$EXTRA_PATH" = x; then
17076       EXTRA_PATH="$with_extra_path"
17077     else
17078       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17079     fi
17080   fi
17081 
17082 
17083 fi
17084 
17085 
17086   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17087     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17088     # If not, detect if Xcode is installed by running xcodebuild -version
17089     # if no Xcode installed, xcodebuild exits with 1
17090     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17091     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17092       # We need to use xcodebuild in the toolchain dir provided by the user, this will
17093       # fall back on the stub binary in /usr/bin/xcodebuild
17094       # Extract the first word of "xcodebuild", so it can be a program name with args.
17095 set dummy xcodebuild; ac_word=$2
17096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17097 $as_echo_n "checking for $ac_word... " >&6; }
17098 if ${ac_cv_path_XCODEBUILD+:} false; then :
17099   $as_echo_n "(cached) " >&6
17100 else
17101   case $XCODEBUILD in
17102   [\\/]* | ?:[\\/]*)
17103   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17104   ;;
17105   *)
17106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17107 for as_dir in $TOOLCHAIN_PATH
17108 do
17109   IFS=$as_save_IFS
17110   test -z "$as_dir" && as_dir=.
17111     for ac_exec_ext in '' $ac_executable_extensions; do
17112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17113     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17115     break 2
17116   fi
17117 done
17118   done
17119 IFS=$as_save_IFS
17120 
17121   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17122   ;;
17123 esac
17124 fi
17125 XCODEBUILD=$ac_cv_path_XCODEBUILD
17126 if test -n "$XCODEBUILD"; then
17127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17128 $as_echo "$XCODEBUILD" >&6; }
17129 else
17130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17131 $as_echo "no" >&6; }
17132 fi
17133 
17134 
17135     else
17136       # this should result in SYSROOT being empty, unless --with-sysroot is provided
17137       # when only the command line tools are installed there are no SDKs, so headers
17138       # are copied into the system frameworks
17139       XCODEBUILD=
17140 
17141     fi
17142 
17143     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17144 $as_echo_n "checking for sdk name... " >&6; }
17145 
17146 # Check whether --with-sdk-name was given.
17147 if test "${with_sdk_name+set}" = set; then :
17148   withval=$with_sdk_name; SDKNAME=$with_sdk_name
17149 
17150 fi
17151 
17152     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17153 $as_echo "$SDKNAME" >&6; }
17154 
17155     # if toolchain path is specified then don't rely on system headers, they may not compile
17156     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17157     test -z "$TOOLCHAIN_PATH" && \
17158       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17159 
17160     if test -z "$SYSROOT"; then
17161       if test -n "$XCODEBUILD"; then
17162         # if we don't have system headers, use default SDK name (last resort)
17163         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17164           SDKNAME=${SDKNAME:-macosx}
17165         fi
17166 
17167         if test -n "$SDKNAME"; then
17168           # Call xcodebuild to determine SYSROOT
17169           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17170         fi
17171       else
17172         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17173           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
17174         fi
17175       fi
17176     else
17177       # warn user if --with-sdk-name was also set
17178       if test -n "$with_sdk_name"; then
17179         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17180 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17181       fi
17182     fi
17183 
17184     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17185       # If no system framework headers, then SYSROOT must be set, or we won't build
17186       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
17187     fi
17188 
17189     # Perform a basic sanity test
17190     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17191       if test -z "$SYSROOT"; then
17192         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
17193       else
17194         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17195       fi
17196     fi
17197 
17198     # set SDKROOT too, Xcode tools will pick it up
17199     SDKROOT=$SYSROOT
17200 
17201   fi
17202 
17203   # Prepend the extra path to the global path
17204 
17205   if test "x$EXTRA_PATH" != x; then
17206     if test "x$PATH" = x; then
17207       PATH="$EXTRA_PATH"
17208     else
17209       PATH="$EXTRA_PATH:$PATH"
17210     fi
17211   fi
17212 
17213 
17214   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17215 $as_echo_n "checking for sysroot... " >&6; }
17216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17217 $as_echo "$SYSROOT" >&6; }
17218   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17219 $as_echo_n "checking for toolchain path... " >&6; }
17220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17221 $as_echo "$TOOLCHAIN_PATH" >&6; }
17222   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17223 $as_echo_n "checking for extra path... " >&6; }
17224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17225 $as_echo "$EXTRA_PATH" >&6; }
17226 
17227 
17228 # To properly create a configuration name, we need to have the OpenJDK target
17229 # and options (variants and debug level) parsed.
17230 
17231 
17232 
17233 # Check whether --with-conf-name was given.
17234 if test "${with_conf_name+set}" = set; then :
17235   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17236 fi
17237 
17238 
17239   # Test from where we are running configure, in or outside of src root.
17240   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17241 $as_echo_n "checking where to store configuration... " >&6; }
17242   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17243       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17244       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17245     # We are running configure from the src root.
17246     # Create a default ./build/target-variant-debuglevel output root.
17247     if test "x${CONF_NAME}" = x; then
17248       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17249 $as_echo "in default location" >&6; }
17250       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17251     else
17252       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17253 $as_echo "in build directory with custom name" >&6; }
17254     fi
17255     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17256     $MKDIR -p "$OUTPUT_ROOT"
17257     if test ! -d "$OUTPUT_ROOT"; then
17258       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17259     fi
17260   else
17261     # We are running configure from outside of the src dir.
17262     # Then use the current directory as output dir!
17263     # If configuration is situated in normal build directory, just use the build
17264     # directory name as configuration name, otherwise use the complete path.
17265     if test "x${CONF_NAME}" = x; then
17266       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17267     fi
17268     OUTPUT_ROOT="$CURDIR"
17269     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17270 $as_echo "in current directory" >&6; }
17271 
17272     # WARNING: This might be a bad thing to do. You need to be sure you want to
17273     # have a configuration in this directory. Do some sanity checks!
17274 
17275     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17276       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17277       # other files
17278       files_present=`$LS $OUTPUT_ROOT`
17279       # Configure has already touched config.log and confdefs.h in the current dir when this check
17280       # is performed.
17281       filtered_files=`$ECHO "$files_present" \
17282           | $SED -e 's/config.log//g' \
17283               -e 's/configure.log//g' \
17284               -e 's/confdefs.h//g' \
17285               -e 's/ //g' \
17286           | $TR -d '\n'`
17287       if test "x$filtered_files" != x; then
17288         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17289 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
17290         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17291 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17292         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17293 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17294         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17295 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17296         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17297 $as_echo "$as_me: seriously mess up just about everything." >&6;}
17298         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17299 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17300         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17301 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17302         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17303       fi
17304     fi
17305   fi
17306   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17307 $as_echo_n "checking what configuration name to use... " >&6; }
17308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17309 $as_echo "$CONF_NAME" >&6; }
17310 
17311 
17312   # Only process if variable expands to non-empty
17313 
17314   if test "x$OUTPUT_ROOT" != x; then
17315     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17316 
17317   # Input might be given as Windows format, start by converting to
17318   # unix format.
17319   path="$OUTPUT_ROOT"
17320   new_path=`$CYGPATH -u "$path"`
17321 
17322   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17323   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17324   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17325   # "foo.exe" is OK but "foo" is an error.
17326   #
17327   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17328   # It is also a way to make sure we got the proper file name for the real test later on.
17329   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17330   if test "x$test_shortpath" = x; then
17331     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17332 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17333     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17334   fi
17335 
17336   # Call helper function which possibly converts this using DOS-style short mode.
17337   # If so, the updated path is stored in $new_path.
17338 
17339   input_path="$new_path"
17340   # Check if we need to convert this using DOS-style short mode. If the path
17341   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17342   # take no chances and rewrite it.
17343   # Note: m4 eats our [], so we need to use [ and ] instead.
17344   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17345   if test "x$has_forbidden_chars" != x; then
17346     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17347     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17348     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17349     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17350       # Going to short mode and back again did indeed matter. Since short mode is
17351       # case insensitive, let's make it lowercase to improve readability.
17352       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17353       # Now convert it back to Unix-style (cygpath)
17354       input_path=`$CYGPATH -u "$shortmode_path"`
17355       new_path="$input_path"
17356     fi
17357   fi
17358 
17359   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17360   if test "x$test_cygdrive_prefix" = x; then
17361     # As a simple fix, exclude /usr/bin since it's not a real path.
17362     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17363       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17364       # a path prefixed by /cygdrive for fixpath to work.
17365       new_path="$CYGWIN_ROOT_PATH$input_path"
17366     fi
17367   fi
17368 
17369 
17370   if test "x$path" != "x$new_path"; then
17371     OUTPUT_ROOT="$new_path"
17372     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17373 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17374   fi
17375 
17376     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17377 
17378   path="$OUTPUT_ROOT"
17379   has_colon=`$ECHO $path | $GREP ^.:`
17380   new_path="$path"
17381   if test "x$has_colon" = x; then
17382     # Not in mixed or Windows style, start by that.
17383     new_path=`cmd //c echo $path`
17384   fi
17385 
17386 
17387   input_path="$new_path"
17388   # Check if we need to convert this using DOS-style short mode. If the path
17389   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17390   # take no chances and rewrite it.
17391   # Note: m4 eats our [], so we need to use [ and ] instead.
17392   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17393   if test "x$has_forbidden_chars" != x; then
17394     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17395     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17396   fi
17397 
17398 
17399   windows_path="$new_path"
17400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17401     unix_path=`$CYGPATH -u "$windows_path"`
17402     new_path="$unix_path"
17403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17405     new_path="$unix_path"
17406   fi
17407 
17408   if test "x$path" != "x$new_path"; then
17409     OUTPUT_ROOT="$new_path"
17410     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17411 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17412   fi
17413 
17414   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17415   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17416 
17417     else
17418       # We're on a unix platform. Hooray! :)
17419       path="$OUTPUT_ROOT"
17420       has_space=`$ECHO "$path" | $GREP " "`
17421       if test "x$has_space" != x; then
17422         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17423 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17424         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17425       fi
17426 
17427       # Use eval to expand a potential ~
17428       eval path="$path"
17429       if test ! -f "$path" && test ! -d "$path"; then
17430         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17431       fi
17432 
17433       if test -d "$path"; then
17434         OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17435       else
17436         dir="`$DIRNAME "$path"`"
17437         base="`$BASENAME "$path"`"
17438         OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17439       fi
17440     fi
17441   fi
17442 
17443 
17444   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17445   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17446 
17447   SPEC=$OUTPUT_ROOT/spec.gmk
17448 
17449   CONF_NAME=$CONF_NAME
17450 
17451   OUTPUT_ROOT=$OUTPUT_ROOT
17452 
17453 
17454 
17455   # The spec.gmk file contains all variables for the make system.
17456   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17457 
17458   # The bootcycle-spec.gmk file contains support for boot cycle builds.
17459   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17460 
17461   # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17462   ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17463 
17464   # The compare.sh is used to compare the build output to other builds.
17465   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17466 
17467   # The generated Makefile knows where the spec.gmk is and where the source is.
17468   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17469   # which will look for generated configurations
17470   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17471 
17472 
17473 
17474 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17475 
17476   for ac_prog in apt-get yum port pkgutil pkgadd
17477 do
17478   # Extract the first word of "$ac_prog", so it can be a program name with args.
17479 set dummy $ac_prog; ac_word=$2
17480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17481 $as_echo_n "checking for $ac_word... " >&6; }
17482 if ${ac_cv_prog_PKGHANDLER+:} false; then :
17483   $as_echo_n "(cached) " >&6
17484 else
17485   if test -n "$PKGHANDLER"; then
17486   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17487 else
17488 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17489 for as_dir in $PATH
17490 do
17491   IFS=$as_save_IFS
17492   test -z "$as_dir" && as_dir=.
17493     for ac_exec_ext in '' $ac_executable_extensions; do
17494   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17495     ac_cv_prog_PKGHANDLER="$ac_prog"
17496     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17497     break 2
17498   fi
17499 done
17500   done
17501 IFS=$as_save_IFS
17502 
17503 fi
17504 fi
17505 PKGHANDLER=$ac_cv_prog_PKGHANDLER
17506 if test -n "$PKGHANDLER"; then
17507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17508 $as_echo "$PKGHANDLER" >&6; }
17509 else
17510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17511 $as_echo "no" >&6; }
17512 fi
17513 
17514 
17515   test -n "$PKGHANDLER" && break
17516 done
17517 
17518 
17519 
17520 # Setup tools that requires more complex handling, or that is not needed by the configure script.
17521 
17522 
17523 
17524   # Publish this variable in the help.
17525 
17526 
17527   if [ -z "${MAKE+x}" ]; then
17528     # The variable is not set by user, try to locate tool using the code snippet
17529 
17530     # Try our hardest to locate a correct version of GNU make
17531     for ac_prog in gmake
17532 do
17533   # Extract the first word of "$ac_prog", so it can be a program name with args.
17534 set dummy $ac_prog; ac_word=$2
17535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17536 $as_echo_n "checking for $ac_word... " >&6; }
17537 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17538   $as_echo_n "(cached) " >&6
17539 else
17540   case $CHECK_GMAKE in
17541   [\\/]* | ?:[\\/]*)
17542   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17543   ;;
17544   *)
17545   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17546 for as_dir in $PATH
17547 do
17548   IFS=$as_save_IFS
17549   test -z "$as_dir" && as_dir=.
17550     for ac_exec_ext in '' $ac_executable_extensions; do
17551   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17552     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17554     break 2
17555   fi
17556 done
17557   done
17558 IFS=$as_save_IFS
17559 
17560   ;;
17561 esac
17562 fi
17563 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17564 if test -n "$CHECK_GMAKE"; then
17565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17566 $as_echo "$CHECK_GMAKE" >&6; }
17567 else
17568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17569 $as_echo "no" >&6; }
17570 fi
17571 
17572 
17573   test -n "$CHECK_GMAKE" && break
17574 done
17575 
17576 
17577   MAKE_CANDIDATE=""$CHECK_GMAKE""
17578   DESCRIPTION="gmake in PATH"
17579 
17580   # On Cygwin, we require a newer version of make than on other platforms
17581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17582     MAKE_VERSION_EXPR="-e 4\."
17583     MAKE_REQUIRED_VERSION="4.0"
17584    else
17585     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17586     MAKE_REQUIRED_VERSION="3.81"
17587   fi
17588 
17589   if test "x$MAKE_CANDIDATE" != x; then
17590     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17591 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17592     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17593     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17594     if test "x$IS_GNU_MAKE" = x; then
17595       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17596 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17597     else
17598       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17599       if test "x$IS_MODERN_MAKE" = x; then
17600         { $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
17601 $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;}
17602       else
17603         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17604           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17605             MAKE_EXPECTED_ENV='cygwin'
17606           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17607             MAKE_EXPECTED_ENV='msys'
17608           else
17609             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17610           fi
17611           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17612           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17613         else
17614           # Not relevant for non-Windows
17615           IS_MAKE_CORRECT_ENV=true
17616         fi
17617         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17618           { $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
17619 $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;}
17620         else
17621           FOUND_MAKE=$MAKE_CANDIDATE
17622 
17623   # Only process if variable expands to non-empty
17624 
17625   if test "x$FOUND_MAKE" != x; then
17626     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17627 
17628   # First separate the path from the arguments. This will split at the first
17629   # space.
17630   complete="$FOUND_MAKE"
17631   path="${complete%% *}"
17632   tmp="$complete EOL"
17633   arguments="${tmp#* }"
17634 
17635   # Input might be given as Windows format, start by converting to
17636   # unix format.
17637   new_path=`$CYGPATH -u "$path"`
17638 
17639   # Now try to locate executable using which
17640   new_path=`$WHICH "$new_path" 2> /dev/null`
17641   # bat and cmd files are not always considered executable in cygwin causing which
17642   # to not find them
17643   if test "x$new_path" = x \
17644       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17645       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17646     new_path=`$CYGPATH -u "$path"`
17647   fi
17648   if test "x$new_path" = x; then
17649     # Oops. Which didn't find the executable.
17650     # The splitting of arguments from the executable at a space might have been incorrect,
17651     # since paths with space are more likely in Windows. Give it another try with the whole
17652     # argument.
17653     path="$complete"
17654     arguments="EOL"
17655     new_path=`$CYGPATH -u "$path"`
17656     new_path=`$WHICH "$new_path" 2> /dev/null`
17657     # bat and cmd files are not always considered executable in cygwin causing which
17658     # to not find them
17659     if test "x$new_path" = x \
17660         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17661         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17662       new_path=`$CYGPATH -u "$path"`
17663     fi
17664     if test "x$new_path" = x; then
17665       # It's still not found. Now this is an unrecoverable error.
17666       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17667 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17668       has_space=`$ECHO "$complete" | $GREP " "`
17669       if test "x$has_space" != x; then
17670         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17671 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17672       fi
17673       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17674     fi
17675   fi
17676 
17677   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17678   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17679   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17680   # "foo.exe" is OK but "foo" is an error.
17681   #
17682   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17683   # It is also a way to make sure we got the proper file name for the real test later on.
17684   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17685   if test "x$test_shortpath" = x; then
17686     # Short path failed, file does not exist as specified.
17687     # Try adding .exe or .cmd
17688     if test -f "${new_path}.exe"; then
17689       input_to_shortpath="${new_path}.exe"
17690     elif test -f "${new_path}.cmd"; then
17691       input_to_shortpath="${new_path}.cmd"
17692     else
17693       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17694 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17695       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17696 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17697       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17698     fi
17699   else
17700     input_to_shortpath="$new_path"
17701   fi
17702 
17703   # Call helper function which possibly converts this using DOS-style short mode.
17704   # If so, the updated path is stored in $new_path.
17705   new_path="$input_to_shortpath"
17706 
17707   input_path="$input_to_shortpath"
17708   # Check if we need to convert this using DOS-style short mode. If the path
17709   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17710   # take no chances and rewrite it.
17711   # Note: m4 eats our [], so we need to use [ and ] instead.
17712   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17713   if test "x$has_forbidden_chars" != x; then
17714     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17715     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17716     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17717     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17718       # Going to short mode and back again did indeed matter. Since short mode is
17719       # case insensitive, let's make it lowercase to improve readability.
17720       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17721       # Now convert it back to Unix-style (cygpath)
17722       input_path=`$CYGPATH -u "$shortmode_path"`
17723       new_path="$input_path"
17724     fi
17725   fi
17726 
17727   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17728   if test "x$test_cygdrive_prefix" = x; then
17729     # As a simple fix, exclude /usr/bin since it's not a real path.
17730     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17731       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17732       # a path prefixed by /cygdrive for fixpath to work.
17733       new_path="$CYGWIN_ROOT_PATH$input_path"
17734     fi
17735   fi
17736 
17737   # remove trailing .exe if any
17738   new_path="${new_path/%.exe/}"
17739 
17740     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17741 
17742   # First separate the path from the arguments. This will split at the first
17743   # space.
17744   complete="$FOUND_MAKE"
17745   path="${complete%% *}"
17746   tmp="$complete EOL"
17747   arguments="${tmp#* }"
17748 
17749   # Input might be given as Windows format, start by converting to
17750   # unix format.
17751   new_path="$path"
17752 
17753   windows_path="$new_path"
17754   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17755     unix_path=`$CYGPATH -u "$windows_path"`
17756     new_path="$unix_path"
17757   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17758     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17759     new_path="$unix_path"
17760   fi
17761 
17762 
17763   # Now try to locate executable using which
17764   new_path=`$WHICH "$new_path" 2> /dev/null`
17765 
17766   if test "x$new_path" = x; then
17767     # Oops. Which didn't find the executable.
17768     # The splitting of arguments from the executable at a space might have been incorrect,
17769     # since paths with space are more likely in Windows. Give it another try with the whole
17770     # argument.
17771     path="$complete"
17772     arguments="EOL"
17773     new_path="$path"
17774 
17775   windows_path="$new_path"
17776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17777     unix_path=`$CYGPATH -u "$windows_path"`
17778     new_path="$unix_path"
17779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17780     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17781     new_path="$unix_path"
17782   fi
17783 
17784 
17785     new_path=`$WHICH "$new_path" 2> /dev/null`
17786     # bat and cmd files are not always considered executable in MSYS causing which
17787     # to not find them
17788     if test "x$new_path" = x \
17789         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17790         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17791       new_path="$path"
17792 
17793   windows_path="$new_path"
17794   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17795     unix_path=`$CYGPATH -u "$windows_path"`
17796     new_path="$unix_path"
17797   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17798     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17799     new_path="$unix_path"
17800   fi
17801 
17802     fi
17803 
17804     if test "x$new_path" = x; then
17805       # It's still not found. Now this is an unrecoverable error.
17806       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17807 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17808       has_space=`$ECHO "$complete" | $GREP " "`
17809       if test "x$has_space" != x; then
17810         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17811 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17812       fi
17813       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17814     fi
17815   fi
17816 
17817   # Now new_path has a complete unix path to the binary
17818   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17819     # Keep paths in /bin as-is, but remove trailing .exe if any
17820     new_path="${new_path/%.exe/}"
17821     # Do not save /bin paths to all_fixpath_prefixes!
17822   else
17823     # Not in mixed or Windows style, start by that.
17824     new_path=`cmd //c echo $new_path`
17825 
17826   input_path="$new_path"
17827   # Check if we need to convert this using DOS-style short mode. If the path
17828   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17829   # take no chances and rewrite it.
17830   # Note: m4 eats our [], so we need to use [ and ] instead.
17831   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17832   if test "x$has_forbidden_chars" != x; then
17833     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17834     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17835   fi
17836 
17837     # Output is in $new_path
17838 
17839   windows_path="$new_path"
17840   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17841     unix_path=`$CYGPATH -u "$windows_path"`
17842     new_path="$unix_path"
17843   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17844     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17845     new_path="$unix_path"
17846   fi
17847 
17848     # remove trailing .exe if any
17849     new_path="${new_path/%.exe/}"
17850 
17851     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17852     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17853   fi
17854 
17855     else
17856       # We're on a unix platform. Hooray! :)
17857       # First separate the path from the arguments. This will split at the first
17858       # space.
17859       complete="$FOUND_MAKE"
17860       path="${complete%% *}"
17861       tmp="$complete EOL"
17862       arguments="${tmp#* }"
17863 
17864       # Cannot rely on the command "which" here since it doesn't always work.
17865       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17866       if test -z "$is_absolute_path"; then
17867         # Path to executable is not absolute. Find it.
17868         IFS_save="$IFS"
17869         IFS=:
17870         for p in $PATH; do
17871           if test -f "$p/$path" && test -x "$p/$path"; then
17872             new_path="$p/$path"
17873             break
17874           fi
17875         done
17876         IFS="$IFS_save"
17877       else
17878         # This is an absolute path, we can use it without further modifications.
17879         new_path="$path"
17880       fi
17881 
17882       if test "x$new_path" = x; then
17883         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17884 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17885         has_space=`$ECHO "$complete" | $GREP " "`
17886         if test "x$has_space" != x; then
17887           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17888 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17889         fi
17890         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17891       fi
17892     fi
17893 
17894     # Now join together the path and the arguments once again
17895     if test "x$arguments" != xEOL; then
17896       new_complete="$new_path ${arguments% *}"
17897     else
17898       new_complete="$new_path"
17899     fi
17900 
17901     if test "x$complete" != "x$new_complete"; then
17902       FOUND_MAKE="$new_complete"
17903       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17904 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17905     fi
17906   fi
17907 
17908         fi
17909       fi
17910     fi
17911   fi
17912 
17913 
17914     if test "x$FOUND_MAKE" = x; then
17915       for ac_prog in make
17916 do
17917   # Extract the first word of "$ac_prog", so it can be a program name with args.
17918 set dummy $ac_prog; ac_word=$2
17919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17920 $as_echo_n "checking for $ac_word... " >&6; }
17921 if ${ac_cv_path_CHECK_MAKE+:} false; then :
17922   $as_echo_n "(cached) " >&6
17923 else
17924   case $CHECK_MAKE in
17925   [\\/]* | ?:[\\/]*)
17926   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17927   ;;
17928   *)
17929   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17930 for as_dir in $PATH
17931 do
17932   IFS=$as_save_IFS
17933   test -z "$as_dir" && as_dir=.
17934     for ac_exec_ext in '' $ac_executable_extensions; do
17935   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17936     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17937     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17938     break 2
17939   fi
17940 done
17941   done
17942 IFS=$as_save_IFS
17943 
17944   ;;
17945 esac
17946 fi
17947 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17948 if test -n "$CHECK_MAKE"; then
17949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17950 $as_echo "$CHECK_MAKE" >&6; }
17951 else
17952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17953 $as_echo "no" >&6; }
17954 fi
17955 
17956 
17957   test -n "$CHECK_MAKE" && break
17958 done
17959 
17960 
17961   MAKE_CANDIDATE=""$CHECK_MAKE""
17962   DESCRIPTION="make in PATH"
17963 
17964   # On Cygwin, we require a newer version of make than on other platforms
17965   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17966     MAKE_VERSION_EXPR="-e 4\."
17967     MAKE_REQUIRED_VERSION="4.0"
17968    else
17969     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17970     MAKE_REQUIRED_VERSION="3.81"
17971   fi
17972 
17973   if test "x$MAKE_CANDIDATE" != x; then
17974     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17975 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17976     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17977     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17978     if test "x$IS_GNU_MAKE" = x; then
17979       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17980 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17981     else
17982       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17983       if test "x$IS_MODERN_MAKE" = x; then
17984         { $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
17985 $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;}
17986       else
17987         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17988           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17989             MAKE_EXPECTED_ENV='cygwin'
17990           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17991             MAKE_EXPECTED_ENV='msys'
17992           else
17993             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17994           fi
17995           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17996           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17997         else
17998           # Not relevant for non-Windows
17999           IS_MAKE_CORRECT_ENV=true
18000         fi
18001         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18002           { $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
18003 $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;}
18004         else
18005           FOUND_MAKE=$MAKE_CANDIDATE
18006 
18007   # Only process if variable expands to non-empty
18008 
18009   if test "x$FOUND_MAKE" != x; then
18010     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18011 
18012   # First separate the path from the arguments. This will split at the first
18013   # space.
18014   complete="$FOUND_MAKE"
18015   path="${complete%% *}"
18016   tmp="$complete EOL"
18017   arguments="${tmp#* }"
18018 
18019   # Input might be given as Windows format, start by converting to
18020   # unix format.
18021   new_path=`$CYGPATH -u "$path"`
18022 
18023   # Now try to locate executable using which
18024   new_path=`$WHICH "$new_path" 2> /dev/null`
18025   # bat and cmd files are not always considered executable in cygwin causing which
18026   # to not find them
18027   if test "x$new_path" = x \
18028       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18029       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18030     new_path=`$CYGPATH -u "$path"`
18031   fi
18032   if test "x$new_path" = x; then
18033     # Oops. Which didn't find the executable.
18034     # The splitting of arguments from the executable at a space might have been incorrect,
18035     # since paths with space are more likely in Windows. Give it another try with the whole
18036     # argument.
18037     path="$complete"
18038     arguments="EOL"
18039     new_path=`$CYGPATH -u "$path"`
18040     new_path=`$WHICH "$new_path" 2> /dev/null`
18041     # bat and cmd files are not always considered executable in cygwin causing which
18042     # to not find them
18043     if test "x$new_path" = x \
18044         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18045         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18046       new_path=`$CYGPATH -u "$path"`
18047     fi
18048     if test "x$new_path" = x; then
18049       # It's still not found. Now this is an unrecoverable error.
18050       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18051 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18052       has_space=`$ECHO "$complete" | $GREP " "`
18053       if test "x$has_space" != x; then
18054         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18055 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18056       fi
18057       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18058     fi
18059   fi
18060 
18061   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18062   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18063   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18064   # "foo.exe" is OK but "foo" is an error.
18065   #
18066   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18067   # It is also a way to make sure we got the proper file name for the real test later on.
18068   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18069   if test "x$test_shortpath" = x; then
18070     # Short path failed, file does not exist as specified.
18071     # Try adding .exe or .cmd
18072     if test -f "${new_path}.exe"; then
18073       input_to_shortpath="${new_path}.exe"
18074     elif test -f "${new_path}.cmd"; then
18075       input_to_shortpath="${new_path}.cmd"
18076     else
18077       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18078 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18079       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18080 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18081       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18082     fi
18083   else
18084     input_to_shortpath="$new_path"
18085   fi
18086 
18087   # Call helper function which possibly converts this using DOS-style short mode.
18088   # If so, the updated path is stored in $new_path.
18089   new_path="$input_to_shortpath"
18090 
18091   input_path="$input_to_shortpath"
18092   # Check if we need to convert this using DOS-style short mode. If the path
18093   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18094   # take no chances and rewrite it.
18095   # Note: m4 eats our [], so we need to use [ and ] instead.
18096   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18097   if test "x$has_forbidden_chars" != x; then
18098     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18099     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18100     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18101     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18102       # Going to short mode and back again did indeed matter. Since short mode is
18103       # case insensitive, let's make it lowercase to improve readability.
18104       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18105       # Now convert it back to Unix-style (cygpath)
18106       input_path=`$CYGPATH -u "$shortmode_path"`
18107       new_path="$input_path"
18108     fi
18109   fi
18110 
18111   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18112   if test "x$test_cygdrive_prefix" = x; then
18113     # As a simple fix, exclude /usr/bin since it's not a real path.
18114     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18115       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18116       # a path prefixed by /cygdrive for fixpath to work.
18117       new_path="$CYGWIN_ROOT_PATH$input_path"
18118     fi
18119   fi
18120 
18121   # remove trailing .exe if any
18122   new_path="${new_path/%.exe/}"
18123 
18124     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18125 
18126   # First separate the path from the arguments. This will split at the first
18127   # space.
18128   complete="$FOUND_MAKE"
18129   path="${complete%% *}"
18130   tmp="$complete EOL"
18131   arguments="${tmp#* }"
18132 
18133   # Input might be given as Windows format, start by converting to
18134   # unix format.
18135   new_path="$path"
18136 
18137   windows_path="$new_path"
18138   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18139     unix_path=`$CYGPATH -u "$windows_path"`
18140     new_path="$unix_path"
18141   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18142     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18143     new_path="$unix_path"
18144   fi
18145 
18146 
18147   # Now try to locate executable using which
18148   new_path=`$WHICH "$new_path" 2> /dev/null`
18149 
18150   if test "x$new_path" = x; then
18151     # Oops. Which didn't find the executable.
18152     # The splitting of arguments from the executable at a space might have been incorrect,
18153     # since paths with space are more likely in Windows. Give it another try with the whole
18154     # argument.
18155     path="$complete"
18156     arguments="EOL"
18157     new_path="$path"
18158 
18159   windows_path="$new_path"
18160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18161     unix_path=`$CYGPATH -u "$windows_path"`
18162     new_path="$unix_path"
18163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18164     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18165     new_path="$unix_path"
18166   fi
18167 
18168 
18169     new_path=`$WHICH "$new_path" 2> /dev/null`
18170     # bat and cmd files are not always considered executable in MSYS causing which
18171     # to not find them
18172     if test "x$new_path" = x \
18173         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18174         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18175       new_path="$path"
18176 
18177   windows_path="$new_path"
18178   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18179     unix_path=`$CYGPATH -u "$windows_path"`
18180     new_path="$unix_path"
18181   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18182     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18183     new_path="$unix_path"
18184   fi
18185 
18186     fi
18187 
18188     if test "x$new_path" = x; then
18189       # It's still not found. Now this is an unrecoverable error.
18190       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18191 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18192       has_space=`$ECHO "$complete" | $GREP " "`
18193       if test "x$has_space" != x; then
18194         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18195 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18196       fi
18197       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18198     fi
18199   fi
18200 
18201   # Now new_path has a complete unix path to the binary
18202   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18203     # Keep paths in /bin as-is, but remove trailing .exe if any
18204     new_path="${new_path/%.exe/}"
18205     # Do not save /bin paths to all_fixpath_prefixes!
18206   else
18207     # Not in mixed or Windows style, start by that.
18208     new_path=`cmd //c echo $new_path`
18209 
18210   input_path="$new_path"
18211   # Check if we need to convert this using DOS-style short mode. If the path
18212   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18213   # take no chances and rewrite it.
18214   # Note: m4 eats our [], so we need to use [ and ] instead.
18215   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18216   if test "x$has_forbidden_chars" != x; then
18217     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18218     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18219   fi
18220 
18221     # Output is in $new_path
18222 
18223   windows_path="$new_path"
18224   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18225     unix_path=`$CYGPATH -u "$windows_path"`
18226     new_path="$unix_path"
18227   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18228     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18229     new_path="$unix_path"
18230   fi
18231 
18232     # remove trailing .exe if any
18233     new_path="${new_path/%.exe/}"
18234 
18235     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18236     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18237   fi
18238 
18239     else
18240       # We're on a unix platform. Hooray! :)
18241       # First separate the path from the arguments. This will split at the first
18242       # space.
18243       complete="$FOUND_MAKE"
18244       path="${complete%% *}"
18245       tmp="$complete EOL"
18246       arguments="${tmp#* }"
18247 
18248       # Cannot rely on the command "which" here since it doesn't always work.
18249       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18250       if test -z "$is_absolute_path"; then
18251         # Path to executable is not absolute. Find it.
18252         IFS_save="$IFS"
18253         IFS=:
18254         for p in $PATH; do
18255           if test -f "$p/$path" && test -x "$p/$path"; then
18256             new_path="$p/$path"
18257             break
18258           fi
18259         done
18260         IFS="$IFS_save"
18261       else
18262         # This is an absolute path, we can use it without further modifications.
18263         new_path="$path"
18264       fi
18265 
18266       if test "x$new_path" = x; then
18267         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18268 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18269         has_space=`$ECHO "$complete" | $GREP " "`
18270         if test "x$has_space" != x; then
18271           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18272 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18273         fi
18274         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18275       fi
18276     fi
18277 
18278     # Now join together the path and the arguments once again
18279     if test "x$arguments" != xEOL; then
18280       new_complete="$new_path ${arguments% *}"
18281     else
18282       new_complete="$new_path"
18283     fi
18284 
18285     if test "x$complete" != "x$new_complete"; then
18286       FOUND_MAKE="$new_complete"
18287       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18288 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18289     fi
18290   fi
18291 
18292         fi
18293       fi
18294     fi
18295   fi
18296 
18297     fi
18298 
18299     if test "x$FOUND_MAKE" = x; then
18300       if test "x$TOOLCHAIN_PATH" != x; then
18301         # We have a toolchain path, check that as well before giving up.
18302         OLD_PATH=$PATH
18303         PATH=$TOOLCHAIN_PATH:$PATH
18304         for ac_prog in gmake
18305 do
18306   # Extract the first word of "$ac_prog", so it can be a program name with args.
18307 set dummy $ac_prog; ac_word=$2
18308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18309 $as_echo_n "checking for $ac_word... " >&6; }
18310 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18311   $as_echo_n "(cached) " >&6
18312 else
18313   case $CHECK_TOOLSDIR_GMAKE in
18314   [\\/]* | ?:[\\/]*)
18315   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18316   ;;
18317   *)
18318   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18319 for as_dir in $PATH
18320 do
18321   IFS=$as_save_IFS
18322   test -z "$as_dir" && as_dir=.
18323     for ac_exec_ext in '' $ac_executable_extensions; do
18324   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18325     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18327     break 2
18328   fi
18329 done
18330   done
18331 IFS=$as_save_IFS
18332 
18333   ;;
18334 esac
18335 fi
18336 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18337 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18339 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18340 else
18341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18342 $as_echo "no" >&6; }
18343 fi
18344 
18345 
18346   test -n "$CHECK_TOOLSDIR_GMAKE" && break
18347 done
18348 
18349 
18350   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18351   DESCRIPTION="gmake in tools-dir"
18352 
18353   # On Cygwin, we require a newer version of make than on other platforms
18354   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18355     MAKE_VERSION_EXPR="-e 4\."
18356     MAKE_REQUIRED_VERSION="4.0"
18357    else
18358     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18359     MAKE_REQUIRED_VERSION="3.81"
18360   fi
18361 
18362   if test "x$MAKE_CANDIDATE" != x; then
18363     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18364 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18365     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18366     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18367     if test "x$IS_GNU_MAKE" = x; then
18368       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18369 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18370     else
18371       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18372       if test "x$IS_MODERN_MAKE" = x; then
18373         { $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
18374 $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;}
18375       else
18376         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18377           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18378             MAKE_EXPECTED_ENV='cygwin'
18379           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18380             MAKE_EXPECTED_ENV='msys'
18381           else
18382             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18383           fi
18384           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18385           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18386         else
18387           # Not relevant for non-Windows
18388           IS_MAKE_CORRECT_ENV=true
18389         fi
18390         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18391           { $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
18392 $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;}
18393         else
18394           FOUND_MAKE=$MAKE_CANDIDATE
18395 
18396   # Only process if variable expands to non-empty
18397 
18398   if test "x$FOUND_MAKE" != x; then
18399     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18400 
18401   # First separate the path from the arguments. This will split at the first
18402   # space.
18403   complete="$FOUND_MAKE"
18404   path="${complete%% *}"
18405   tmp="$complete EOL"
18406   arguments="${tmp#* }"
18407 
18408   # Input might be given as Windows format, start by converting to
18409   # unix format.
18410   new_path=`$CYGPATH -u "$path"`
18411 
18412   # Now try to locate executable using which
18413   new_path=`$WHICH "$new_path" 2> /dev/null`
18414   # bat and cmd files are not always considered executable in cygwin causing which
18415   # to not find them
18416   if test "x$new_path" = x \
18417       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18418       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18419     new_path=`$CYGPATH -u "$path"`
18420   fi
18421   if test "x$new_path" = x; then
18422     # Oops. Which didn't find the executable.
18423     # The splitting of arguments from the executable at a space might have been incorrect,
18424     # since paths with space are more likely in Windows. Give it another try with the whole
18425     # argument.
18426     path="$complete"
18427     arguments="EOL"
18428     new_path=`$CYGPATH -u "$path"`
18429     new_path=`$WHICH "$new_path" 2> /dev/null`
18430     # bat and cmd files are not always considered executable in cygwin causing which
18431     # to not find them
18432     if test "x$new_path" = x \
18433         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18434         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18435       new_path=`$CYGPATH -u "$path"`
18436     fi
18437     if test "x$new_path" = x; then
18438       # It's still not found. Now this is an unrecoverable error.
18439       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18440 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18441       has_space=`$ECHO "$complete" | $GREP " "`
18442       if test "x$has_space" != x; then
18443         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18444 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18445       fi
18446       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18447     fi
18448   fi
18449 
18450   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18451   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18452   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18453   # "foo.exe" is OK but "foo" is an error.
18454   #
18455   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18456   # It is also a way to make sure we got the proper file name for the real test later on.
18457   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18458   if test "x$test_shortpath" = x; then
18459     # Short path failed, file does not exist as specified.
18460     # Try adding .exe or .cmd
18461     if test -f "${new_path}.exe"; then
18462       input_to_shortpath="${new_path}.exe"
18463     elif test -f "${new_path}.cmd"; then
18464       input_to_shortpath="${new_path}.cmd"
18465     else
18466       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18467 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18468       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18469 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18470       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18471     fi
18472   else
18473     input_to_shortpath="$new_path"
18474   fi
18475 
18476   # Call helper function which possibly converts this using DOS-style short mode.
18477   # If so, the updated path is stored in $new_path.
18478   new_path="$input_to_shortpath"
18479 
18480   input_path="$input_to_shortpath"
18481   # Check if we need to convert this using DOS-style short mode. If the path
18482   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18483   # take no chances and rewrite it.
18484   # Note: m4 eats our [], so we need to use [ and ] instead.
18485   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18486   if test "x$has_forbidden_chars" != x; then
18487     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18488     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18489     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18490     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18491       # Going to short mode and back again did indeed matter. Since short mode is
18492       # case insensitive, let's make it lowercase to improve readability.
18493       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18494       # Now convert it back to Unix-style (cygpath)
18495       input_path=`$CYGPATH -u "$shortmode_path"`
18496       new_path="$input_path"
18497     fi
18498   fi
18499 
18500   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18501   if test "x$test_cygdrive_prefix" = x; then
18502     # As a simple fix, exclude /usr/bin since it's not a real path.
18503     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18504       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18505       # a path prefixed by /cygdrive for fixpath to work.
18506       new_path="$CYGWIN_ROOT_PATH$input_path"
18507     fi
18508   fi
18509 
18510   # remove trailing .exe if any
18511   new_path="${new_path/%.exe/}"
18512 
18513     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18514 
18515   # First separate the path from the arguments. This will split at the first
18516   # space.
18517   complete="$FOUND_MAKE"
18518   path="${complete%% *}"
18519   tmp="$complete EOL"
18520   arguments="${tmp#* }"
18521 
18522   # Input might be given as Windows format, start by converting to
18523   # unix format.
18524   new_path="$path"
18525 
18526   windows_path="$new_path"
18527   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18528     unix_path=`$CYGPATH -u "$windows_path"`
18529     new_path="$unix_path"
18530   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18531     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18532     new_path="$unix_path"
18533   fi
18534 
18535 
18536   # Now try to locate executable using which
18537   new_path=`$WHICH "$new_path" 2> /dev/null`
18538 
18539   if test "x$new_path" = x; then
18540     # Oops. Which didn't find the executable.
18541     # The splitting of arguments from the executable at a space might have been incorrect,
18542     # since paths with space are more likely in Windows. Give it another try with the whole
18543     # argument.
18544     path="$complete"
18545     arguments="EOL"
18546     new_path="$path"
18547 
18548   windows_path="$new_path"
18549   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18550     unix_path=`$CYGPATH -u "$windows_path"`
18551     new_path="$unix_path"
18552   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18553     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18554     new_path="$unix_path"
18555   fi
18556 
18557 
18558     new_path=`$WHICH "$new_path" 2> /dev/null`
18559     # bat and cmd files are not always considered executable in MSYS causing which
18560     # to not find them
18561     if test "x$new_path" = x \
18562         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18563         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18564       new_path="$path"
18565 
18566   windows_path="$new_path"
18567   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18568     unix_path=`$CYGPATH -u "$windows_path"`
18569     new_path="$unix_path"
18570   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18571     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18572     new_path="$unix_path"
18573   fi
18574 
18575     fi
18576 
18577     if test "x$new_path" = x; then
18578       # It's still not found. Now this is an unrecoverable error.
18579       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18580 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18581       has_space=`$ECHO "$complete" | $GREP " "`
18582       if test "x$has_space" != x; then
18583         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18584 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18585       fi
18586       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18587     fi
18588   fi
18589 
18590   # Now new_path has a complete unix path to the binary
18591   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18592     # Keep paths in /bin as-is, but remove trailing .exe if any
18593     new_path="${new_path/%.exe/}"
18594     # Do not save /bin paths to all_fixpath_prefixes!
18595   else
18596     # Not in mixed or Windows style, start by that.
18597     new_path=`cmd //c echo $new_path`
18598 
18599   input_path="$new_path"
18600   # Check if we need to convert this using DOS-style short mode. If the path
18601   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18602   # take no chances and rewrite it.
18603   # Note: m4 eats our [], so we need to use [ and ] instead.
18604   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18605   if test "x$has_forbidden_chars" != x; then
18606     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18607     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18608   fi
18609 
18610     # Output is in $new_path
18611 
18612   windows_path="$new_path"
18613   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18614     unix_path=`$CYGPATH -u "$windows_path"`
18615     new_path="$unix_path"
18616   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18617     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18618     new_path="$unix_path"
18619   fi
18620 
18621     # remove trailing .exe if any
18622     new_path="${new_path/%.exe/}"
18623 
18624     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18625     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18626   fi
18627 
18628     else
18629       # We're on a unix platform. Hooray! :)
18630       # First separate the path from the arguments. This will split at the first
18631       # space.
18632       complete="$FOUND_MAKE"
18633       path="${complete%% *}"
18634       tmp="$complete EOL"
18635       arguments="${tmp#* }"
18636 
18637       # Cannot rely on the command "which" here since it doesn't always work.
18638       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18639       if test -z "$is_absolute_path"; then
18640         # Path to executable is not absolute. Find it.
18641         IFS_save="$IFS"
18642         IFS=:
18643         for p in $PATH; do
18644           if test -f "$p/$path" && test -x "$p/$path"; then
18645             new_path="$p/$path"
18646             break
18647           fi
18648         done
18649         IFS="$IFS_save"
18650       else
18651         # This is an absolute path, we can use it without further modifications.
18652         new_path="$path"
18653       fi
18654 
18655       if test "x$new_path" = x; then
18656         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18657 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18658         has_space=`$ECHO "$complete" | $GREP " "`
18659         if test "x$has_space" != x; then
18660           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18661 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18662         fi
18663         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18664       fi
18665     fi
18666 
18667     # Now join together the path and the arguments once again
18668     if test "x$arguments" != xEOL; then
18669       new_complete="$new_path ${arguments% *}"
18670     else
18671       new_complete="$new_path"
18672     fi
18673 
18674     if test "x$complete" != "x$new_complete"; then
18675       FOUND_MAKE="$new_complete"
18676       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18677 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18678     fi
18679   fi
18680 
18681         fi
18682       fi
18683     fi
18684   fi
18685 
18686         if test "x$FOUND_MAKE" = x; then
18687           for ac_prog in make
18688 do
18689   # Extract the first word of "$ac_prog", so it can be a program name with args.
18690 set dummy $ac_prog; ac_word=$2
18691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18692 $as_echo_n "checking for $ac_word... " >&6; }
18693 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18694   $as_echo_n "(cached) " >&6
18695 else
18696   case $CHECK_TOOLSDIR_MAKE in
18697   [\\/]* | ?:[\\/]*)
18698   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18699   ;;
18700   *)
18701   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18702 for as_dir in $PATH
18703 do
18704   IFS=$as_save_IFS
18705   test -z "$as_dir" && as_dir=.
18706     for ac_exec_ext in '' $ac_executable_extensions; do
18707   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18708     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18709     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18710     break 2
18711   fi
18712 done
18713   done
18714 IFS=$as_save_IFS
18715 
18716   ;;
18717 esac
18718 fi
18719 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18720 if test -n "$CHECK_TOOLSDIR_MAKE"; then
18721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18722 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18723 else
18724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18725 $as_echo "no" >&6; }
18726 fi
18727 
18728 
18729   test -n "$CHECK_TOOLSDIR_MAKE" && break
18730 done
18731 
18732 
18733   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18734   DESCRIPTION="make in tools-dir"
18735 
18736   # On Cygwin, we require a newer version of make than on other platforms
18737   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18738     MAKE_VERSION_EXPR="-e 4\."
18739     MAKE_REQUIRED_VERSION="4.0"
18740    else
18741     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18742     MAKE_REQUIRED_VERSION="3.81"
18743   fi
18744 
18745   if test "x$MAKE_CANDIDATE" != x; then
18746     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18747 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18748     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18749     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18750     if test "x$IS_GNU_MAKE" = x; then
18751       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18752 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18753     else
18754       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18755       if test "x$IS_MODERN_MAKE" = x; then
18756         { $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
18757 $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;}
18758       else
18759         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18760           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18761             MAKE_EXPECTED_ENV='cygwin'
18762           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18763             MAKE_EXPECTED_ENV='msys'
18764           else
18765             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18766           fi
18767           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18768           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18769         else
18770           # Not relevant for non-Windows
18771           IS_MAKE_CORRECT_ENV=true
18772         fi
18773         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18774           { $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
18775 $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;}
18776         else
18777           FOUND_MAKE=$MAKE_CANDIDATE
18778 
18779   # Only process if variable expands to non-empty
18780 
18781   if test "x$FOUND_MAKE" != x; then
18782     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18783 
18784   # First separate the path from the arguments. This will split at the first
18785   # space.
18786   complete="$FOUND_MAKE"
18787   path="${complete%% *}"
18788   tmp="$complete EOL"
18789   arguments="${tmp#* }"
18790 
18791   # Input might be given as Windows format, start by converting to
18792   # unix format.
18793   new_path=`$CYGPATH -u "$path"`
18794 
18795   # Now try to locate executable using which
18796   new_path=`$WHICH "$new_path" 2> /dev/null`
18797   # bat and cmd files are not always considered executable in cygwin causing which
18798   # to not find them
18799   if test "x$new_path" = x \
18800       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18801       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18802     new_path=`$CYGPATH -u "$path"`
18803   fi
18804   if test "x$new_path" = x; then
18805     # Oops. Which didn't find the executable.
18806     # The splitting of arguments from the executable at a space might have been incorrect,
18807     # since paths with space are more likely in Windows. Give it another try with the whole
18808     # argument.
18809     path="$complete"
18810     arguments="EOL"
18811     new_path=`$CYGPATH -u "$path"`
18812     new_path=`$WHICH "$new_path" 2> /dev/null`
18813     # bat and cmd files are not always considered executable in cygwin causing which
18814     # to not find them
18815     if test "x$new_path" = x \
18816         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18817         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18818       new_path=`$CYGPATH -u "$path"`
18819     fi
18820     if test "x$new_path" = x; then
18821       # It's still not found. Now this is an unrecoverable error.
18822       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18823 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18824       has_space=`$ECHO "$complete" | $GREP " "`
18825       if test "x$has_space" != x; then
18826         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18827 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18828       fi
18829       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18830     fi
18831   fi
18832 
18833   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18834   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18835   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18836   # "foo.exe" is OK but "foo" is an error.
18837   #
18838   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18839   # It is also a way to make sure we got the proper file name for the real test later on.
18840   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18841   if test "x$test_shortpath" = x; then
18842     # Short path failed, file does not exist as specified.
18843     # Try adding .exe or .cmd
18844     if test -f "${new_path}.exe"; then
18845       input_to_shortpath="${new_path}.exe"
18846     elif test -f "${new_path}.cmd"; then
18847       input_to_shortpath="${new_path}.cmd"
18848     else
18849       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18850 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18851       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18852 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18853       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18854     fi
18855   else
18856     input_to_shortpath="$new_path"
18857   fi
18858 
18859   # Call helper function which possibly converts this using DOS-style short mode.
18860   # If so, the updated path is stored in $new_path.
18861   new_path="$input_to_shortpath"
18862 
18863   input_path="$input_to_shortpath"
18864   # Check if we need to convert this using DOS-style short mode. If the path
18865   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18866   # take no chances and rewrite it.
18867   # Note: m4 eats our [], so we need to use [ and ] instead.
18868   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18869   if test "x$has_forbidden_chars" != x; then
18870     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18871     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18872     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18873     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18874       # Going to short mode and back again did indeed matter. Since short mode is
18875       # case insensitive, let's make it lowercase to improve readability.
18876       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18877       # Now convert it back to Unix-style (cygpath)
18878       input_path=`$CYGPATH -u "$shortmode_path"`
18879       new_path="$input_path"
18880     fi
18881   fi
18882 
18883   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18884   if test "x$test_cygdrive_prefix" = x; then
18885     # As a simple fix, exclude /usr/bin since it's not a real path.
18886     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18887       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18888       # a path prefixed by /cygdrive for fixpath to work.
18889       new_path="$CYGWIN_ROOT_PATH$input_path"
18890     fi
18891   fi
18892 
18893   # remove trailing .exe if any
18894   new_path="${new_path/%.exe/}"
18895 
18896     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18897 
18898   # First separate the path from the arguments. This will split at the first
18899   # space.
18900   complete="$FOUND_MAKE"
18901   path="${complete%% *}"
18902   tmp="$complete EOL"
18903   arguments="${tmp#* }"
18904 
18905   # Input might be given as Windows format, start by converting to
18906   # unix format.
18907   new_path="$path"
18908 
18909   windows_path="$new_path"
18910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18911     unix_path=`$CYGPATH -u "$windows_path"`
18912     new_path="$unix_path"
18913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18915     new_path="$unix_path"
18916   fi
18917 
18918 
18919   # Now try to locate executable using which
18920   new_path=`$WHICH "$new_path" 2> /dev/null`
18921 
18922   if test "x$new_path" = x; then
18923     # Oops. Which didn't find the executable.
18924     # The splitting of arguments from the executable at a space might have been incorrect,
18925     # since paths with space are more likely in Windows. Give it another try with the whole
18926     # argument.
18927     path="$complete"
18928     arguments="EOL"
18929     new_path="$path"
18930 
18931   windows_path="$new_path"
18932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18933     unix_path=`$CYGPATH -u "$windows_path"`
18934     new_path="$unix_path"
18935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18937     new_path="$unix_path"
18938   fi
18939 
18940 
18941     new_path=`$WHICH "$new_path" 2> /dev/null`
18942     # bat and cmd files are not always considered executable in MSYS causing which
18943     # to not find them
18944     if test "x$new_path" = x \
18945         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18946         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18947       new_path="$path"
18948 
18949   windows_path="$new_path"
18950   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18951     unix_path=`$CYGPATH -u "$windows_path"`
18952     new_path="$unix_path"
18953   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18954     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18955     new_path="$unix_path"
18956   fi
18957 
18958     fi
18959 
18960     if test "x$new_path" = x; then
18961       # It's still not found. Now this is an unrecoverable error.
18962       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18963 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18964       has_space=`$ECHO "$complete" | $GREP " "`
18965       if test "x$has_space" != x; then
18966         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18967 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18968       fi
18969       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18970     fi
18971   fi
18972 
18973   # Now new_path has a complete unix path to the binary
18974   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18975     # Keep paths in /bin as-is, but remove trailing .exe if any
18976     new_path="${new_path/%.exe/}"
18977     # Do not save /bin paths to all_fixpath_prefixes!
18978   else
18979     # Not in mixed or Windows style, start by that.
18980     new_path=`cmd //c echo $new_path`
18981 
18982   input_path="$new_path"
18983   # Check if we need to convert this using DOS-style short mode. If the path
18984   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18985   # take no chances and rewrite it.
18986   # Note: m4 eats our [], so we need to use [ and ] instead.
18987   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18988   if test "x$has_forbidden_chars" != x; then
18989     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18990     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18991   fi
18992 
18993     # Output is in $new_path
18994 
18995   windows_path="$new_path"
18996   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18997     unix_path=`$CYGPATH -u "$windows_path"`
18998     new_path="$unix_path"
18999   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19000     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19001     new_path="$unix_path"
19002   fi
19003 
19004     # remove trailing .exe if any
19005     new_path="${new_path/%.exe/}"
19006 
19007     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19008     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19009   fi
19010 
19011     else
19012       # We're on a unix platform. Hooray! :)
19013       # First separate the path from the arguments. This will split at the first
19014       # space.
19015       complete="$FOUND_MAKE"
19016       path="${complete%% *}"
19017       tmp="$complete EOL"
19018       arguments="${tmp#* }"
19019 
19020       # Cannot rely on the command "which" here since it doesn't always work.
19021       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19022       if test -z "$is_absolute_path"; then
19023         # Path to executable is not absolute. Find it.
19024         IFS_save="$IFS"
19025         IFS=:
19026         for p in $PATH; do
19027           if test -f "$p/$path" && test -x "$p/$path"; then
19028             new_path="$p/$path"
19029             break
19030           fi
19031         done
19032         IFS="$IFS_save"
19033       else
19034         # This is an absolute path, we can use it without further modifications.
19035         new_path="$path"
19036       fi
19037 
19038       if test "x$new_path" = x; then
19039         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19040 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19041         has_space=`$ECHO "$complete" | $GREP " "`
19042         if test "x$has_space" != x; then
19043           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19044 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19045         fi
19046         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19047       fi
19048     fi
19049 
19050     # Now join together the path and the arguments once again
19051     if test "x$arguments" != xEOL; then
19052       new_complete="$new_path ${arguments% *}"
19053     else
19054       new_complete="$new_path"
19055     fi
19056 
19057     if test "x$complete" != "x$new_complete"; then
19058       FOUND_MAKE="$new_complete"
19059       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19060 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19061     fi
19062   fi
19063 
19064         fi
19065       fi
19066     fi
19067   fi
19068 
19069         fi
19070         PATH=$OLD_PATH
19071       fi
19072     fi
19073 
19074     if test "x$FOUND_MAKE" = x; then
19075       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
19076     fi
19077 
19078   else
19079     # The variable is set, but is it from the command line or the environment?
19080 
19081     # Try to remove the string !MAKE! from our list.
19082     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19083     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19084       # If it failed, the variable was not from the command line. Ignore it,
19085       # but warn the user (except for BASH, which is always set by the calling BASH).
19086       if test "xMAKE" != xBASH; then
19087         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19088 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19089       fi
19090       # Try to locate tool using the code snippet
19091 
19092     # Try our hardest to locate a correct version of GNU make
19093     for ac_prog in gmake
19094 do
19095   # Extract the first word of "$ac_prog", so it can be a program name with args.
19096 set dummy $ac_prog; ac_word=$2
19097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19098 $as_echo_n "checking for $ac_word... " >&6; }
19099 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19100   $as_echo_n "(cached) " >&6
19101 else
19102   case $CHECK_GMAKE in
19103   [\\/]* | ?:[\\/]*)
19104   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19105   ;;
19106   *)
19107   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19108 for as_dir in $PATH
19109 do
19110   IFS=$as_save_IFS
19111   test -z "$as_dir" && as_dir=.
19112     for ac_exec_ext in '' $ac_executable_extensions; do
19113   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19114     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19115     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19116     break 2
19117   fi
19118 done
19119   done
19120 IFS=$as_save_IFS
19121 
19122   ;;
19123 esac
19124 fi
19125 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19126 if test -n "$CHECK_GMAKE"; then
19127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19128 $as_echo "$CHECK_GMAKE" >&6; }
19129 else
19130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19131 $as_echo "no" >&6; }
19132 fi
19133 
19134 
19135   test -n "$CHECK_GMAKE" && break
19136 done
19137 
19138 
19139   MAKE_CANDIDATE=""$CHECK_GMAKE""
19140   DESCRIPTION="gmake in PATH"
19141 
19142   # On Cygwin, we require a newer version of make than on other platforms
19143   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19144     MAKE_VERSION_EXPR="-e 4\."
19145     MAKE_REQUIRED_VERSION="4.0"
19146    else
19147     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19148     MAKE_REQUIRED_VERSION="3.81"
19149   fi
19150 
19151   if test "x$MAKE_CANDIDATE" != x; then
19152     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19153 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19154     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19155     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19156     if test "x$IS_GNU_MAKE" = x; then
19157       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19158 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19159     else
19160       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19161       if test "x$IS_MODERN_MAKE" = x; then
19162         { $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
19163 $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;}
19164       else
19165         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19166           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19167             MAKE_EXPECTED_ENV='cygwin'
19168           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19169             MAKE_EXPECTED_ENV='msys'
19170           else
19171             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19172           fi
19173           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19174           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19175         else
19176           # Not relevant for non-Windows
19177           IS_MAKE_CORRECT_ENV=true
19178         fi
19179         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19180           { $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
19181 $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;}
19182         else
19183           FOUND_MAKE=$MAKE_CANDIDATE
19184 
19185   # Only process if variable expands to non-empty
19186 
19187   if test "x$FOUND_MAKE" != x; then
19188     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19189 
19190   # First separate the path from the arguments. This will split at the first
19191   # space.
19192   complete="$FOUND_MAKE"
19193   path="${complete%% *}"
19194   tmp="$complete EOL"
19195   arguments="${tmp#* }"
19196 
19197   # Input might be given as Windows format, start by converting to
19198   # unix format.
19199   new_path=`$CYGPATH -u "$path"`
19200 
19201   # Now try to locate executable using which
19202   new_path=`$WHICH "$new_path" 2> /dev/null`
19203   # bat and cmd files are not always considered executable in cygwin causing which
19204   # to not find them
19205   if test "x$new_path" = x \
19206       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19207       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19208     new_path=`$CYGPATH -u "$path"`
19209   fi
19210   if test "x$new_path" = x; then
19211     # Oops. Which didn't find the executable.
19212     # The splitting of arguments from the executable at a space might have been incorrect,
19213     # since paths with space are more likely in Windows. Give it another try with the whole
19214     # argument.
19215     path="$complete"
19216     arguments="EOL"
19217     new_path=`$CYGPATH -u "$path"`
19218     new_path=`$WHICH "$new_path" 2> /dev/null`
19219     # bat and cmd files are not always considered executable in cygwin causing which
19220     # to not find them
19221     if test "x$new_path" = x \
19222         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19223         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19224       new_path=`$CYGPATH -u "$path"`
19225     fi
19226     if test "x$new_path" = x; then
19227       # It's still not found. Now this is an unrecoverable error.
19228       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19229 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19230       has_space=`$ECHO "$complete" | $GREP " "`
19231       if test "x$has_space" != x; then
19232         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19233 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19234       fi
19235       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19236     fi
19237   fi
19238 
19239   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19240   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19241   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19242   # "foo.exe" is OK but "foo" is an error.
19243   #
19244   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19245   # It is also a way to make sure we got the proper file name for the real test later on.
19246   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19247   if test "x$test_shortpath" = x; then
19248     # Short path failed, file does not exist as specified.
19249     # Try adding .exe or .cmd
19250     if test -f "${new_path}.exe"; then
19251       input_to_shortpath="${new_path}.exe"
19252     elif test -f "${new_path}.cmd"; then
19253       input_to_shortpath="${new_path}.cmd"
19254     else
19255       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19256 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19257       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19258 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19259       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19260     fi
19261   else
19262     input_to_shortpath="$new_path"
19263   fi
19264 
19265   # Call helper function which possibly converts this using DOS-style short mode.
19266   # If so, the updated path is stored in $new_path.
19267   new_path="$input_to_shortpath"
19268 
19269   input_path="$input_to_shortpath"
19270   # Check if we need to convert this using DOS-style short mode. If the path
19271   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19272   # take no chances and rewrite it.
19273   # Note: m4 eats our [], so we need to use [ and ] instead.
19274   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19275   if test "x$has_forbidden_chars" != x; then
19276     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19277     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19278     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19279     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19280       # Going to short mode and back again did indeed matter. Since short mode is
19281       # case insensitive, let's make it lowercase to improve readability.
19282       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19283       # Now convert it back to Unix-style (cygpath)
19284       input_path=`$CYGPATH -u "$shortmode_path"`
19285       new_path="$input_path"
19286     fi
19287   fi
19288 
19289   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19290   if test "x$test_cygdrive_prefix" = x; then
19291     # As a simple fix, exclude /usr/bin since it's not a real path.
19292     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19293       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19294       # a path prefixed by /cygdrive for fixpath to work.
19295       new_path="$CYGWIN_ROOT_PATH$input_path"
19296     fi
19297   fi
19298 
19299   # remove trailing .exe if any
19300   new_path="${new_path/%.exe/}"
19301 
19302     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19303 
19304   # First separate the path from the arguments. This will split at the first
19305   # space.
19306   complete="$FOUND_MAKE"
19307   path="${complete%% *}"
19308   tmp="$complete EOL"
19309   arguments="${tmp#* }"
19310 
19311   # Input might be given as Windows format, start by converting to
19312   # unix format.
19313   new_path="$path"
19314 
19315   windows_path="$new_path"
19316   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19317     unix_path=`$CYGPATH -u "$windows_path"`
19318     new_path="$unix_path"
19319   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19320     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19321     new_path="$unix_path"
19322   fi
19323 
19324 
19325   # Now try to locate executable using which
19326   new_path=`$WHICH "$new_path" 2> /dev/null`
19327 
19328   if test "x$new_path" = x; then
19329     # Oops. Which didn't find the executable.
19330     # The splitting of arguments from the executable at a space might have been incorrect,
19331     # since paths with space are more likely in Windows. Give it another try with the whole
19332     # argument.
19333     path="$complete"
19334     arguments="EOL"
19335     new_path="$path"
19336 
19337   windows_path="$new_path"
19338   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19339     unix_path=`$CYGPATH -u "$windows_path"`
19340     new_path="$unix_path"
19341   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19342     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19343     new_path="$unix_path"
19344   fi
19345 
19346 
19347     new_path=`$WHICH "$new_path" 2> /dev/null`
19348     # bat and cmd files are not always considered executable in MSYS causing which
19349     # to not find them
19350     if test "x$new_path" = x \
19351         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19352         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19353       new_path="$path"
19354 
19355   windows_path="$new_path"
19356   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19357     unix_path=`$CYGPATH -u "$windows_path"`
19358     new_path="$unix_path"
19359   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19360     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19361     new_path="$unix_path"
19362   fi
19363 
19364     fi
19365 
19366     if test "x$new_path" = x; then
19367       # It's still not found. Now this is an unrecoverable error.
19368       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19369 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19370       has_space=`$ECHO "$complete" | $GREP " "`
19371       if test "x$has_space" != x; then
19372         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19373 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19374       fi
19375       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19376     fi
19377   fi
19378 
19379   # Now new_path has a complete unix path to the binary
19380   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19381     # Keep paths in /bin as-is, but remove trailing .exe if any
19382     new_path="${new_path/%.exe/}"
19383     # Do not save /bin paths to all_fixpath_prefixes!
19384   else
19385     # Not in mixed or Windows style, start by that.
19386     new_path=`cmd //c echo $new_path`
19387 
19388   input_path="$new_path"
19389   # Check if we need to convert this using DOS-style short mode. If the path
19390   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19391   # take no chances and rewrite it.
19392   # Note: m4 eats our [], so we need to use [ and ] instead.
19393   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19394   if test "x$has_forbidden_chars" != x; then
19395     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19396     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19397   fi
19398 
19399     # Output is in $new_path
19400 
19401   windows_path="$new_path"
19402   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19403     unix_path=`$CYGPATH -u "$windows_path"`
19404     new_path="$unix_path"
19405   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19406     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19407     new_path="$unix_path"
19408   fi
19409 
19410     # remove trailing .exe if any
19411     new_path="${new_path/%.exe/}"
19412 
19413     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19414     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19415   fi
19416 
19417     else
19418       # We're on a unix platform. Hooray! :)
19419       # First separate the path from the arguments. This will split at the first
19420       # space.
19421       complete="$FOUND_MAKE"
19422       path="${complete%% *}"
19423       tmp="$complete EOL"
19424       arguments="${tmp#* }"
19425 
19426       # Cannot rely on the command "which" here since it doesn't always work.
19427       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19428       if test -z "$is_absolute_path"; then
19429         # Path to executable is not absolute. Find it.
19430         IFS_save="$IFS"
19431         IFS=:
19432         for p in $PATH; do
19433           if test -f "$p/$path" && test -x "$p/$path"; then
19434             new_path="$p/$path"
19435             break
19436           fi
19437         done
19438         IFS="$IFS_save"
19439       else
19440         # This is an absolute path, we can use it without further modifications.
19441         new_path="$path"
19442       fi
19443 
19444       if test "x$new_path" = x; then
19445         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19446 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19447         has_space=`$ECHO "$complete" | $GREP " "`
19448         if test "x$has_space" != x; then
19449           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19450 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19451         fi
19452         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19453       fi
19454     fi
19455 
19456     # Now join together the path and the arguments once again
19457     if test "x$arguments" != xEOL; then
19458       new_complete="$new_path ${arguments% *}"
19459     else
19460       new_complete="$new_path"
19461     fi
19462 
19463     if test "x$complete" != "x$new_complete"; then
19464       FOUND_MAKE="$new_complete"
19465       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19466 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19467     fi
19468   fi
19469 
19470         fi
19471       fi
19472     fi
19473   fi
19474 
19475 
19476     if test "x$FOUND_MAKE" = x; then
19477       for ac_prog in make
19478 do
19479   # Extract the first word of "$ac_prog", so it can be a program name with args.
19480 set dummy $ac_prog; ac_word=$2
19481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19482 $as_echo_n "checking for $ac_word... " >&6; }
19483 if ${ac_cv_path_CHECK_MAKE+:} false; then :
19484   $as_echo_n "(cached) " >&6
19485 else
19486   case $CHECK_MAKE in
19487   [\\/]* | ?:[\\/]*)
19488   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19489   ;;
19490   *)
19491   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19492 for as_dir in $PATH
19493 do
19494   IFS=$as_save_IFS
19495   test -z "$as_dir" && as_dir=.
19496     for ac_exec_ext in '' $ac_executable_extensions; do
19497   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19498     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19499     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19500     break 2
19501   fi
19502 done
19503   done
19504 IFS=$as_save_IFS
19505 
19506   ;;
19507 esac
19508 fi
19509 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19510 if test -n "$CHECK_MAKE"; then
19511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19512 $as_echo "$CHECK_MAKE" >&6; }
19513 else
19514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19515 $as_echo "no" >&6; }
19516 fi
19517 
19518 
19519   test -n "$CHECK_MAKE" && break
19520 done
19521 
19522 
19523   MAKE_CANDIDATE=""$CHECK_MAKE""
19524   DESCRIPTION="make in PATH"
19525 
19526   # On Cygwin, we require a newer version of make than on other platforms
19527   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19528     MAKE_VERSION_EXPR="-e 4\."
19529     MAKE_REQUIRED_VERSION="4.0"
19530    else
19531     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19532     MAKE_REQUIRED_VERSION="3.81"
19533   fi
19534 
19535   if test "x$MAKE_CANDIDATE" != x; then
19536     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19537 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19538     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19539     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19540     if test "x$IS_GNU_MAKE" = x; then
19541       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19542 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19543     else
19544       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19545       if test "x$IS_MODERN_MAKE" = x; then
19546         { $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
19547 $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;}
19548       else
19549         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19550           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19551             MAKE_EXPECTED_ENV='cygwin'
19552           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19553             MAKE_EXPECTED_ENV='msys'
19554           else
19555             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19556           fi
19557           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19558           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19559         else
19560           # Not relevant for non-Windows
19561           IS_MAKE_CORRECT_ENV=true
19562         fi
19563         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19564           { $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
19565 $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;}
19566         else
19567           FOUND_MAKE=$MAKE_CANDIDATE
19568 
19569   # Only process if variable expands to non-empty
19570 
19571   if test "x$FOUND_MAKE" != x; then
19572     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19573 
19574   # First separate the path from the arguments. This will split at the first
19575   # space.
19576   complete="$FOUND_MAKE"
19577   path="${complete%% *}"
19578   tmp="$complete EOL"
19579   arguments="${tmp#* }"
19580 
19581   # Input might be given as Windows format, start by converting to
19582   # unix format.
19583   new_path=`$CYGPATH -u "$path"`
19584 
19585   # Now try to locate executable using which
19586   new_path=`$WHICH "$new_path" 2> /dev/null`
19587   # bat and cmd files are not always considered executable in cygwin causing which
19588   # to not find them
19589   if test "x$new_path" = x \
19590       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19591       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19592     new_path=`$CYGPATH -u "$path"`
19593   fi
19594   if test "x$new_path" = x; then
19595     # Oops. Which didn't find the executable.
19596     # The splitting of arguments from the executable at a space might have been incorrect,
19597     # since paths with space are more likely in Windows. Give it another try with the whole
19598     # argument.
19599     path="$complete"
19600     arguments="EOL"
19601     new_path=`$CYGPATH -u "$path"`
19602     new_path=`$WHICH "$new_path" 2> /dev/null`
19603     # bat and cmd files are not always considered executable in cygwin causing which
19604     # to not find them
19605     if test "x$new_path" = x \
19606         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19607         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19608       new_path=`$CYGPATH -u "$path"`
19609     fi
19610     if test "x$new_path" = x; then
19611       # It's still not found. Now this is an unrecoverable error.
19612       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19613 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19614       has_space=`$ECHO "$complete" | $GREP " "`
19615       if test "x$has_space" != x; then
19616         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19617 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19618       fi
19619       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19620     fi
19621   fi
19622 
19623   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19624   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19625   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19626   # "foo.exe" is OK but "foo" is an error.
19627   #
19628   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19629   # It is also a way to make sure we got the proper file name for the real test later on.
19630   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19631   if test "x$test_shortpath" = x; then
19632     # Short path failed, file does not exist as specified.
19633     # Try adding .exe or .cmd
19634     if test -f "${new_path}.exe"; then
19635       input_to_shortpath="${new_path}.exe"
19636     elif test -f "${new_path}.cmd"; then
19637       input_to_shortpath="${new_path}.cmd"
19638     else
19639       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19640 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19641       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19642 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19643       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19644     fi
19645   else
19646     input_to_shortpath="$new_path"
19647   fi
19648 
19649   # Call helper function which possibly converts this using DOS-style short mode.
19650   # If so, the updated path is stored in $new_path.
19651   new_path="$input_to_shortpath"
19652 
19653   input_path="$input_to_shortpath"
19654   # Check if we need to convert this using DOS-style short mode. If the path
19655   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19656   # take no chances and rewrite it.
19657   # Note: m4 eats our [], so we need to use [ and ] instead.
19658   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19659   if test "x$has_forbidden_chars" != x; then
19660     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19661     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19662     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19663     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19664       # Going to short mode and back again did indeed matter. Since short mode is
19665       # case insensitive, let's make it lowercase to improve readability.
19666       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19667       # Now convert it back to Unix-style (cygpath)
19668       input_path=`$CYGPATH -u "$shortmode_path"`
19669       new_path="$input_path"
19670     fi
19671   fi
19672 
19673   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19674   if test "x$test_cygdrive_prefix" = x; then
19675     # As a simple fix, exclude /usr/bin since it's not a real path.
19676     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19677       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19678       # a path prefixed by /cygdrive for fixpath to work.
19679       new_path="$CYGWIN_ROOT_PATH$input_path"
19680     fi
19681   fi
19682 
19683   # remove trailing .exe if any
19684   new_path="${new_path/%.exe/}"
19685 
19686     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19687 
19688   # First separate the path from the arguments. This will split at the first
19689   # space.
19690   complete="$FOUND_MAKE"
19691   path="${complete%% *}"
19692   tmp="$complete EOL"
19693   arguments="${tmp#* }"
19694 
19695   # Input might be given as Windows format, start by converting to
19696   # unix format.
19697   new_path="$path"
19698 
19699   windows_path="$new_path"
19700   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19701     unix_path=`$CYGPATH -u "$windows_path"`
19702     new_path="$unix_path"
19703   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19704     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19705     new_path="$unix_path"
19706   fi
19707 
19708 
19709   # Now try to locate executable using which
19710   new_path=`$WHICH "$new_path" 2> /dev/null`
19711 
19712   if test "x$new_path" = x; then
19713     # Oops. Which didn't find the executable.
19714     # The splitting of arguments from the executable at a space might have been incorrect,
19715     # since paths with space are more likely in Windows. Give it another try with the whole
19716     # argument.
19717     path="$complete"
19718     arguments="EOL"
19719     new_path="$path"
19720 
19721   windows_path="$new_path"
19722   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19723     unix_path=`$CYGPATH -u "$windows_path"`
19724     new_path="$unix_path"
19725   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19726     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19727     new_path="$unix_path"
19728   fi
19729 
19730 
19731     new_path=`$WHICH "$new_path" 2> /dev/null`
19732     # bat and cmd files are not always considered executable in MSYS causing which
19733     # to not find them
19734     if test "x$new_path" = x \
19735         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19736         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19737       new_path="$path"
19738 
19739   windows_path="$new_path"
19740   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19741     unix_path=`$CYGPATH -u "$windows_path"`
19742     new_path="$unix_path"
19743   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19744     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19745     new_path="$unix_path"
19746   fi
19747 
19748     fi
19749 
19750     if test "x$new_path" = x; then
19751       # It's still not found. Now this is an unrecoverable error.
19752       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19753 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19754       has_space=`$ECHO "$complete" | $GREP " "`
19755       if test "x$has_space" != x; then
19756         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19757 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19758       fi
19759       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19760     fi
19761   fi
19762 
19763   # Now new_path has a complete unix path to the binary
19764   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19765     # Keep paths in /bin as-is, but remove trailing .exe if any
19766     new_path="${new_path/%.exe/}"
19767     # Do not save /bin paths to all_fixpath_prefixes!
19768   else
19769     # Not in mixed or Windows style, start by that.
19770     new_path=`cmd //c echo $new_path`
19771 
19772   input_path="$new_path"
19773   # Check if we need to convert this using DOS-style short mode. If the path
19774   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19775   # take no chances and rewrite it.
19776   # Note: m4 eats our [], so we need to use [ and ] instead.
19777   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19778   if test "x$has_forbidden_chars" != x; then
19779     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19780     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19781   fi
19782 
19783     # Output is in $new_path
19784 
19785   windows_path="$new_path"
19786   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19787     unix_path=`$CYGPATH -u "$windows_path"`
19788     new_path="$unix_path"
19789   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19790     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19791     new_path="$unix_path"
19792   fi
19793 
19794     # remove trailing .exe if any
19795     new_path="${new_path/%.exe/}"
19796 
19797     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19798     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19799   fi
19800 
19801     else
19802       # We're on a unix platform. Hooray! :)
19803       # First separate the path from the arguments. This will split at the first
19804       # space.
19805       complete="$FOUND_MAKE"
19806       path="${complete%% *}"
19807       tmp="$complete EOL"
19808       arguments="${tmp#* }"
19809 
19810       # Cannot rely on the command "which" here since it doesn't always work.
19811       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19812       if test -z "$is_absolute_path"; then
19813         # Path to executable is not absolute. Find it.
19814         IFS_save="$IFS"
19815         IFS=:
19816         for p in $PATH; do
19817           if test -f "$p/$path" && test -x "$p/$path"; then
19818             new_path="$p/$path"
19819             break
19820           fi
19821         done
19822         IFS="$IFS_save"
19823       else
19824         # This is an absolute path, we can use it without further modifications.
19825         new_path="$path"
19826       fi
19827 
19828       if test "x$new_path" = x; then
19829         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19830 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19831         has_space=`$ECHO "$complete" | $GREP " "`
19832         if test "x$has_space" != x; then
19833           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19834 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19835         fi
19836         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19837       fi
19838     fi
19839 
19840     # Now join together the path and the arguments once again
19841     if test "x$arguments" != xEOL; then
19842       new_complete="$new_path ${arguments% *}"
19843     else
19844       new_complete="$new_path"
19845     fi
19846 
19847     if test "x$complete" != "x$new_complete"; then
19848       FOUND_MAKE="$new_complete"
19849       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19850 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19851     fi
19852   fi
19853 
19854         fi
19855       fi
19856     fi
19857   fi
19858 
19859     fi
19860 
19861     if test "x$FOUND_MAKE" = x; then
19862       if test "x$TOOLCHAIN_PATH" != x; then
19863         # We have a toolchain path, check that as well before giving up.
19864         OLD_PATH=$PATH
19865         PATH=$TOOLCHAIN_PATH:$PATH
19866         for ac_prog in gmake
19867 do
19868   # Extract the first word of "$ac_prog", so it can be a program name with args.
19869 set dummy $ac_prog; ac_word=$2
19870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19871 $as_echo_n "checking for $ac_word... " >&6; }
19872 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19873   $as_echo_n "(cached) " >&6
19874 else
19875   case $CHECK_TOOLSDIR_GMAKE in
19876   [\\/]* | ?:[\\/]*)
19877   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19878   ;;
19879   *)
19880   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19881 for as_dir in $PATH
19882 do
19883   IFS=$as_save_IFS
19884   test -z "$as_dir" && as_dir=.
19885     for ac_exec_ext in '' $ac_executable_extensions; do
19886   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19887     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19888     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19889     break 2
19890   fi
19891 done
19892   done
19893 IFS=$as_save_IFS
19894 
19895   ;;
19896 esac
19897 fi
19898 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19899 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19901 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19902 else
19903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19904 $as_echo "no" >&6; }
19905 fi
19906 
19907 
19908   test -n "$CHECK_TOOLSDIR_GMAKE" && break
19909 done
19910 
19911 
19912   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19913   DESCRIPTION="gmake in tools-dir"
19914 
19915   # On Cygwin, we require a newer version of make than on other platforms
19916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19917     MAKE_VERSION_EXPR="-e 4\."
19918     MAKE_REQUIRED_VERSION="4.0"
19919    else
19920     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19921     MAKE_REQUIRED_VERSION="3.81"
19922   fi
19923 
19924   if test "x$MAKE_CANDIDATE" != x; then
19925     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19926 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19927     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19928     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19929     if test "x$IS_GNU_MAKE" = x; then
19930       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19931 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19932     else
19933       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19934       if test "x$IS_MODERN_MAKE" = x; then
19935         { $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
19936 $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;}
19937       else
19938         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19939           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19940             MAKE_EXPECTED_ENV='cygwin'
19941           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19942             MAKE_EXPECTED_ENV='msys'
19943           else
19944             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19945           fi
19946           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19947           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19948         else
19949           # Not relevant for non-Windows
19950           IS_MAKE_CORRECT_ENV=true
19951         fi
19952         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19953           { $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
19954 $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;}
19955         else
19956           FOUND_MAKE=$MAKE_CANDIDATE
19957 
19958   # Only process if variable expands to non-empty
19959 
19960   if test "x$FOUND_MAKE" != x; then
19961     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19962 
19963   # First separate the path from the arguments. This will split at the first
19964   # space.
19965   complete="$FOUND_MAKE"
19966   path="${complete%% *}"
19967   tmp="$complete EOL"
19968   arguments="${tmp#* }"
19969 
19970   # Input might be given as Windows format, start by converting to
19971   # unix format.
19972   new_path=`$CYGPATH -u "$path"`
19973 
19974   # Now try to locate executable using which
19975   new_path=`$WHICH "$new_path" 2> /dev/null`
19976   # bat and cmd files are not always considered executable in cygwin causing which
19977   # to not find them
19978   if test "x$new_path" = x \
19979       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19980       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19981     new_path=`$CYGPATH -u "$path"`
19982   fi
19983   if test "x$new_path" = x; then
19984     # Oops. Which didn't find the executable.
19985     # The splitting of arguments from the executable at a space might have been incorrect,
19986     # since paths with space are more likely in Windows. Give it another try with the whole
19987     # argument.
19988     path="$complete"
19989     arguments="EOL"
19990     new_path=`$CYGPATH -u "$path"`
19991     new_path=`$WHICH "$new_path" 2> /dev/null`
19992     # bat and cmd files are not always considered executable in cygwin causing which
19993     # to not find them
19994     if test "x$new_path" = x \
19995         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19996         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19997       new_path=`$CYGPATH -u "$path"`
19998     fi
19999     if test "x$new_path" = x; then
20000       # It's still not found. Now this is an unrecoverable error.
20001       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20002 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20003       has_space=`$ECHO "$complete" | $GREP " "`
20004       if test "x$has_space" != x; then
20005         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20006 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20007       fi
20008       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20009     fi
20010   fi
20011 
20012   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20013   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20014   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20015   # "foo.exe" is OK but "foo" is an error.
20016   #
20017   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20018   # It is also a way to make sure we got the proper file name for the real test later on.
20019   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20020   if test "x$test_shortpath" = x; then
20021     # Short path failed, file does not exist as specified.
20022     # Try adding .exe or .cmd
20023     if test -f "${new_path}.exe"; then
20024       input_to_shortpath="${new_path}.exe"
20025     elif test -f "${new_path}.cmd"; then
20026       input_to_shortpath="${new_path}.cmd"
20027     else
20028       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20029 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20030       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20031 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20032       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20033     fi
20034   else
20035     input_to_shortpath="$new_path"
20036   fi
20037 
20038   # Call helper function which possibly converts this using DOS-style short mode.
20039   # If so, the updated path is stored in $new_path.
20040   new_path="$input_to_shortpath"
20041 
20042   input_path="$input_to_shortpath"
20043   # Check if we need to convert this using DOS-style short mode. If the path
20044   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20045   # take no chances and rewrite it.
20046   # Note: m4 eats our [], so we need to use [ and ] instead.
20047   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20048   if test "x$has_forbidden_chars" != x; then
20049     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20050     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20051     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20052     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20053       # Going to short mode and back again did indeed matter. Since short mode is
20054       # case insensitive, let's make it lowercase to improve readability.
20055       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20056       # Now convert it back to Unix-style (cygpath)
20057       input_path=`$CYGPATH -u "$shortmode_path"`
20058       new_path="$input_path"
20059     fi
20060   fi
20061 
20062   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20063   if test "x$test_cygdrive_prefix" = x; then
20064     # As a simple fix, exclude /usr/bin since it's not a real path.
20065     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20066       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20067       # a path prefixed by /cygdrive for fixpath to work.
20068       new_path="$CYGWIN_ROOT_PATH$input_path"
20069     fi
20070   fi
20071 
20072   # remove trailing .exe if any
20073   new_path="${new_path/%.exe/}"
20074 
20075     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20076 
20077   # First separate the path from the arguments. This will split at the first
20078   # space.
20079   complete="$FOUND_MAKE"
20080   path="${complete%% *}"
20081   tmp="$complete EOL"
20082   arguments="${tmp#* }"
20083 
20084   # Input might be given as Windows format, start by converting to
20085   # unix format.
20086   new_path="$path"
20087 
20088   windows_path="$new_path"
20089   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20090     unix_path=`$CYGPATH -u "$windows_path"`
20091     new_path="$unix_path"
20092   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20093     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20094     new_path="$unix_path"
20095   fi
20096 
20097 
20098   # Now try to locate executable using which
20099   new_path=`$WHICH "$new_path" 2> /dev/null`
20100 
20101   if test "x$new_path" = x; then
20102     # Oops. Which didn't find the executable.
20103     # The splitting of arguments from the executable at a space might have been incorrect,
20104     # since paths with space are more likely in Windows. Give it another try with the whole
20105     # argument.
20106     path="$complete"
20107     arguments="EOL"
20108     new_path="$path"
20109 
20110   windows_path="$new_path"
20111   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20112     unix_path=`$CYGPATH -u "$windows_path"`
20113     new_path="$unix_path"
20114   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20115     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20116     new_path="$unix_path"
20117   fi
20118 
20119 
20120     new_path=`$WHICH "$new_path" 2> /dev/null`
20121     # bat and cmd files are not always considered executable in MSYS causing which
20122     # to not find them
20123     if test "x$new_path" = x \
20124         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20125         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20126       new_path="$path"
20127 
20128   windows_path="$new_path"
20129   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20130     unix_path=`$CYGPATH -u "$windows_path"`
20131     new_path="$unix_path"
20132   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20133     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20134     new_path="$unix_path"
20135   fi
20136 
20137     fi
20138 
20139     if test "x$new_path" = x; then
20140       # It's still not found. Now this is an unrecoverable error.
20141       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20142 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20143       has_space=`$ECHO "$complete" | $GREP " "`
20144       if test "x$has_space" != x; then
20145         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20146 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20147       fi
20148       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20149     fi
20150   fi
20151 
20152   # Now new_path has a complete unix path to the binary
20153   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20154     # Keep paths in /bin as-is, but remove trailing .exe if any
20155     new_path="${new_path/%.exe/}"
20156     # Do not save /bin paths to all_fixpath_prefixes!
20157   else
20158     # Not in mixed or Windows style, start by that.
20159     new_path=`cmd //c echo $new_path`
20160 
20161   input_path="$new_path"
20162   # Check if we need to convert this using DOS-style short mode. If the path
20163   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20164   # take no chances and rewrite it.
20165   # Note: m4 eats our [], so we need to use [ and ] instead.
20166   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20167   if test "x$has_forbidden_chars" != x; then
20168     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20169     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20170   fi
20171 
20172     # Output is in $new_path
20173 
20174   windows_path="$new_path"
20175   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20176     unix_path=`$CYGPATH -u "$windows_path"`
20177     new_path="$unix_path"
20178   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20179     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20180     new_path="$unix_path"
20181   fi
20182 
20183     # remove trailing .exe if any
20184     new_path="${new_path/%.exe/}"
20185 
20186     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20187     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20188   fi
20189 
20190     else
20191       # We're on a unix platform. Hooray! :)
20192       # First separate the path from the arguments. This will split at the first
20193       # space.
20194       complete="$FOUND_MAKE"
20195       path="${complete%% *}"
20196       tmp="$complete EOL"
20197       arguments="${tmp#* }"
20198 
20199       # Cannot rely on the command "which" here since it doesn't always work.
20200       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20201       if test -z "$is_absolute_path"; then
20202         # Path to executable is not absolute. Find it.
20203         IFS_save="$IFS"
20204         IFS=:
20205         for p in $PATH; do
20206           if test -f "$p/$path" && test -x "$p/$path"; then
20207             new_path="$p/$path"
20208             break
20209           fi
20210         done
20211         IFS="$IFS_save"
20212       else
20213         # This is an absolute path, we can use it without further modifications.
20214         new_path="$path"
20215       fi
20216 
20217       if test "x$new_path" = x; then
20218         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20219 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20220         has_space=`$ECHO "$complete" | $GREP " "`
20221         if test "x$has_space" != x; then
20222           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20223 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20224         fi
20225         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20226       fi
20227     fi
20228 
20229     # Now join together the path and the arguments once again
20230     if test "x$arguments" != xEOL; then
20231       new_complete="$new_path ${arguments% *}"
20232     else
20233       new_complete="$new_path"
20234     fi
20235 
20236     if test "x$complete" != "x$new_complete"; then
20237       FOUND_MAKE="$new_complete"
20238       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20239 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20240     fi
20241   fi
20242 
20243         fi
20244       fi
20245     fi
20246   fi
20247 
20248         if test "x$FOUND_MAKE" = x; then
20249           for ac_prog in make
20250 do
20251   # Extract the first word of "$ac_prog", so it can be a program name with args.
20252 set dummy $ac_prog; ac_word=$2
20253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20254 $as_echo_n "checking for $ac_word... " >&6; }
20255 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20256   $as_echo_n "(cached) " >&6
20257 else
20258   case $CHECK_TOOLSDIR_MAKE in
20259   [\\/]* | ?:[\\/]*)
20260   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20261   ;;
20262   *)
20263   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20264 for as_dir in $PATH
20265 do
20266   IFS=$as_save_IFS
20267   test -z "$as_dir" && as_dir=.
20268     for ac_exec_ext in '' $ac_executable_extensions; do
20269   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20270     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20271     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20272     break 2
20273   fi
20274 done
20275   done
20276 IFS=$as_save_IFS
20277 
20278   ;;
20279 esac
20280 fi
20281 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20282 if test -n "$CHECK_TOOLSDIR_MAKE"; then
20283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20284 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20285 else
20286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20287 $as_echo "no" >&6; }
20288 fi
20289 
20290 
20291   test -n "$CHECK_TOOLSDIR_MAKE" && break
20292 done
20293 
20294 
20295   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20296   DESCRIPTION="make in tools-dir"
20297 
20298   # On Cygwin, we require a newer version of make than on other platforms
20299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20300     MAKE_VERSION_EXPR="-e 4\."
20301     MAKE_REQUIRED_VERSION="4.0"
20302    else
20303     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20304     MAKE_REQUIRED_VERSION="3.81"
20305   fi
20306 
20307   if test "x$MAKE_CANDIDATE" != x; then
20308     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20309 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20310     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20311     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20312     if test "x$IS_GNU_MAKE" = x; then
20313       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20314 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20315     else
20316       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20317       if test "x$IS_MODERN_MAKE" = x; then
20318         { $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
20319 $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;}
20320       else
20321         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20322           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20323             MAKE_EXPECTED_ENV='cygwin'
20324           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20325             MAKE_EXPECTED_ENV='msys'
20326           else
20327             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20328           fi
20329           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20330           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20331         else
20332           # Not relevant for non-Windows
20333           IS_MAKE_CORRECT_ENV=true
20334         fi
20335         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20336           { $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
20337 $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;}
20338         else
20339           FOUND_MAKE=$MAKE_CANDIDATE
20340 
20341   # Only process if variable expands to non-empty
20342 
20343   if test "x$FOUND_MAKE" != x; then
20344     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20345 
20346   # First separate the path from the arguments. This will split at the first
20347   # space.
20348   complete="$FOUND_MAKE"
20349   path="${complete%% *}"
20350   tmp="$complete EOL"
20351   arguments="${tmp#* }"
20352 
20353   # Input might be given as Windows format, start by converting to
20354   # unix format.
20355   new_path=`$CYGPATH -u "$path"`
20356 
20357   # Now try to locate executable using which
20358   new_path=`$WHICH "$new_path" 2> /dev/null`
20359   # bat and cmd files are not always considered executable in cygwin causing which
20360   # to not find them
20361   if test "x$new_path" = x \
20362       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20363       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20364     new_path=`$CYGPATH -u "$path"`
20365   fi
20366   if test "x$new_path" = x; then
20367     # Oops. Which didn't find the executable.
20368     # The splitting of arguments from the executable at a space might have been incorrect,
20369     # since paths with space are more likely in Windows. Give it another try with the whole
20370     # argument.
20371     path="$complete"
20372     arguments="EOL"
20373     new_path=`$CYGPATH -u "$path"`
20374     new_path=`$WHICH "$new_path" 2> /dev/null`
20375     # bat and cmd files are not always considered executable in cygwin causing which
20376     # to not find them
20377     if test "x$new_path" = x \
20378         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20379         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20380       new_path=`$CYGPATH -u "$path"`
20381     fi
20382     if test "x$new_path" = x; then
20383       # It's still not found. Now this is an unrecoverable error.
20384       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20385 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20386       has_space=`$ECHO "$complete" | $GREP " "`
20387       if test "x$has_space" != x; then
20388         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20389 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20390       fi
20391       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20392     fi
20393   fi
20394 
20395   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20396   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20397   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20398   # "foo.exe" is OK but "foo" is an error.
20399   #
20400   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20401   # It is also a way to make sure we got the proper file name for the real test later on.
20402   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20403   if test "x$test_shortpath" = x; then
20404     # Short path failed, file does not exist as specified.
20405     # Try adding .exe or .cmd
20406     if test -f "${new_path}.exe"; then
20407       input_to_shortpath="${new_path}.exe"
20408     elif test -f "${new_path}.cmd"; then
20409       input_to_shortpath="${new_path}.cmd"
20410     else
20411       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20412 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20413       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20414 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20415       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20416     fi
20417   else
20418     input_to_shortpath="$new_path"
20419   fi
20420 
20421   # Call helper function which possibly converts this using DOS-style short mode.
20422   # If so, the updated path is stored in $new_path.
20423   new_path="$input_to_shortpath"
20424 
20425   input_path="$input_to_shortpath"
20426   # Check if we need to convert this using DOS-style short mode. If the path
20427   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20428   # take no chances and rewrite it.
20429   # Note: m4 eats our [], so we need to use [ and ] instead.
20430   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20431   if test "x$has_forbidden_chars" != x; then
20432     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20433     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20434     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20435     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20436       # Going to short mode and back again did indeed matter. Since short mode is
20437       # case insensitive, let's make it lowercase to improve readability.
20438       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20439       # Now convert it back to Unix-style (cygpath)
20440       input_path=`$CYGPATH -u "$shortmode_path"`
20441       new_path="$input_path"
20442     fi
20443   fi
20444 
20445   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20446   if test "x$test_cygdrive_prefix" = x; then
20447     # As a simple fix, exclude /usr/bin since it's not a real path.
20448     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20449       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20450       # a path prefixed by /cygdrive for fixpath to work.
20451       new_path="$CYGWIN_ROOT_PATH$input_path"
20452     fi
20453   fi
20454 
20455   # remove trailing .exe if any
20456   new_path="${new_path/%.exe/}"
20457 
20458     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20459 
20460   # First separate the path from the arguments. This will split at the first
20461   # space.
20462   complete="$FOUND_MAKE"
20463   path="${complete%% *}"
20464   tmp="$complete EOL"
20465   arguments="${tmp#* }"
20466 
20467   # Input might be given as Windows format, start by converting to
20468   # unix format.
20469   new_path="$path"
20470 
20471   windows_path="$new_path"
20472   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20473     unix_path=`$CYGPATH -u "$windows_path"`
20474     new_path="$unix_path"
20475   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20476     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20477     new_path="$unix_path"
20478   fi
20479 
20480 
20481   # Now try to locate executable using which
20482   new_path=`$WHICH "$new_path" 2> /dev/null`
20483 
20484   if test "x$new_path" = x; then
20485     # Oops. Which didn't find the executable.
20486     # The splitting of arguments from the executable at a space might have been incorrect,
20487     # since paths with space are more likely in Windows. Give it another try with the whole
20488     # argument.
20489     path="$complete"
20490     arguments="EOL"
20491     new_path="$path"
20492 
20493   windows_path="$new_path"
20494   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20495     unix_path=`$CYGPATH -u "$windows_path"`
20496     new_path="$unix_path"
20497   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20498     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20499     new_path="$unix_path"
20500   fi
20501 
20502 
20503     new_path=`$WHICH "$new_path" 2> /dev/null`
20504     # bat and cmd files are not always considered executable in MSYS causing which
20505     # to not find them
20506     if test "x$new_path" = x \
20507         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20508         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20509       new_path="$path"
20510 
20511   windows_path="$new_path"
20512   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20513     unix_path=`$CYGPATH -u "$windows_path"`
20514     new_path="$unix_path"
20515   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20516     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20517     new_path="$unix_path"
20518   fi
20519 
20520     fi
20521 
20522     if test "x$new_path" = x; then
20523       # It's still not found. Now this is an unrecoverable error.
20524       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20525 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20526       has_space=`$ECHO "$complete" | $GREP " "`
20527       if test "x$has_space" != x; then
20528         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20529 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20530       fi
20531       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20532     fi
20533   fi
20534 
20535   # Now new_path has a complete unix path to the binary
20536   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20537     # Keep paths in /bin as-is, but remove trailing .exe if any
20538     new_path="${new_path/%.exe/}"
20539     # Do not save /bin paths to all_fixpath_prefixes!
20540   else
20541     # Not in mixed or Windows style, start by that.
20542     new_path=`cmd //c echo $new_path`
20543 
20544   input_path="$new_path"
20545   # Check if we need to convert this using DOS-style short mode. If the path
20546   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20547   # take no chances and rewrite it.
20548   # Note: m4 eats our [], so we need to use [ and ] instead.
20549   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20550   if test "x$has_forbidden_chars" != x; then
20551     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20552     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20553   fi
20554 
20555     # Output is in $new_path
20556 
20557   windows_path="$new_path"
20558   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20559     unix_path=`$CYGPATH -u "$windows_path"`
20560     new_path="$unix_path"
20561   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20562     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20563     new_path="$unix_path"
20564   fi
20565 
20566     # remove trailing .exe if any
20567     new_path="${new_path/%.exe/}"
20568 
20569     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20570     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20571   fi
20572 
20573     else
20574       # We're on a unix platform. Hooray! :)
20575       # First separate the path from the arguments. This will split at the first
20576       # space.
20577       complete="$FOUND_MAKE"
20578       path="${complete%% *}"
20579       tmp="$complete EOL"
20580       arguments="${tmp#* }"
20581 
20582       # Cannot rely on the command "which" here since it doesn't always work.
20583       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20584       if test -z "$is_absolute_path"; then
20585         # Path to executable is not absolute. Find it.
20586         IFS_save="$IFS"
20587         IFS=:
20588         for p in $PATH; do
20589           if test -f "$p/$path" && test -x "$p/$path"; then
20590             new_path="$p/$path"
20591             break
20592           fi
20593         done
20594         IFS="$IFS_save"
20595       else
20596         # This is an absolute path, we can use it without further modifications.
20597         new_path="$path"
20598       fi
20599 
20600       if test "x$new_path" = x; then
20601         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20602 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20603         has_space=`$ECHO "$complete" | $GREP " "`
20604         if test "x$has_space" != x; then
20605           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20606 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20607         fi
20608         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20609       fi
20610     fi
20611 
20612     # Now join together the path and the arguments once again
20613     if test "x$arguments" != xEOL; then
20614       new_complete="$new_path ${arguments% *}"
20615     else
20616       new_complete="$new_path"
20617     fi
20618 
20619     if test "x$complete" != "x$new_complete"; then
20620       FOUND_MAKE="$new_complete"
20621       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20622 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20623     fi
20624   fi
20625 
20626         fi
20627       fi
20628     fi
20629   fi
20630 
20631         fi
20632         PATH=$OLD_PATH
20633       fi
20634     fi
20635 
20636     if test "x$FOUND_MAKE" = x; then
20637       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
20638     fi
20639 
20640     else
20641       # If it succeeded, then it was overridden by the user. We will use it
20642       # for the tool.
20643 
20644       # First remove it from the list of overridden variables, so we can test
20645       # for unknown variables in the end.
20646       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20647 
20648       # Check if we try to supply an empty value
20649       if test "x$MAKE" = x; then
20650         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20651 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20652         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20653 $as_echo_n "checking for MAKE... " >&6; }
20654         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20655 $as_echo "disabled" >&6; }
20656       else
20657         # Check if the provided tool contains a complete path.
20658         tool_specified="$MAKE"
20659         tool_basename="${tool_specified##*/}"
20660         if test "x$tool_basename" = "x$tool_specified"; then
20661           # A command without a complete path is provided, search $PATH.
20662           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20663 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20664           # Extract the first word of "$tool_basename", so it can be a program name with args.
20665 set dummy $tool_basename; ac_word=$2
20666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20667 $as_echo_n "checking for $ac_word... " >&6; }
20668 if ${ac_cv_path_MAKE+:} false; then :
20669   $as_echo_n "(cached) " >&6
20670 else
20671   case $MAKE in
20672   [\\/]* | ?:[\\/]*)
20673   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20674   ;;
20675   *)
20676   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20677 for as_dir in $PATH
20678 do
20679   IFS=$as_save_IFS
20680   test -z "$as_dir" && as_dir=.
20681     for ac_exec_ext in '' $ac_executable_extensions; do
20682   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20683     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20684     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20685     break 2
20686   fi
20687 done
20688   done
20689 IFS=$as_save_IFS
20690 
20691   ;;
20692 esac
20693 fi
20694 MAKE=$ac_cv_path_MAKE
20695 if test -n "$MAKE"; then
20696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20697 $as_echo "$MAKE" >&6; }
20698 else
20699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20700 $as_echo "no" >&6; }
20701 fi
20702 
20703 
20704           if test "x$MAKE" = x; then
20705             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20706           fi
20707         else
20708           # Otherwise we believe it is a complete path. Use it as it is.
20709           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20710 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20711           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20712 $as_echo_n "checking for MAKE... " >&6; }
20713           if test ! -x "$tool_specified"; then
20714             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20715 $as_echo "not found" >&6; }
20716             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20717           fi
20718           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20719 $as_echo "$tool_specified" >&6; }
20720         fi
20721       fi
20722     fi
20723 
20724     # If MAKE was set by user, verify the version
20725 
20726   MAKE_CANDIDATE=""$MAKE""
20727   DESCRIPTION="user supplied MAKE=$MAKE"
20728 
20729   # On Cygwin, we require a newer version of make than on other platforms
20730   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20731     MAKE_VERSION_EXPR="-e 4\."
20732     MAKE_REQUIRED_VERSION="4.0"
20733    else
20734     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20735     MAKE_REQUIRED_VERSION="3.81"
20736   fi
20737 
20738   if test "x$MAKE_CANDIDATE" != x; then
20739     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20740 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20741     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20742     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20743     if test "x$IS_GNU_MAKE" = x; then
20744       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20745 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20746     else
20747       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20748       if test "x$IS_MODERN_MAKE" = x; then
20749         { $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
20750 $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;}
20751       else
20752         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20753           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20754             MAKE_EXPECTED_ENV='cygwin'
20755           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20756             MAKE_EXPECTED_ENV='msys'
20757           else
20758             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20759           fi
20760           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20761           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20762         else
20763           # Not relevant for non-Windows
20764           IS_MAKE_CORRECT_ENV=true
20765         fi
20766         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20767           { $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
20768 $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;}
20769         else
20770           FOUND_MAKE=$MAKE_CANDIDATE
20771 
20772   # Only process if variable expands to non-empty
20773 
20774   if test "x$FOUND_MAKE" != x; then
20775     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20776 
20777   # First separate the path from the arguments. This will split at the first
20778   # space.
20779   complete="$FOUND_MAKE"
20780   path="${complete%% *}"
20781   tmp="$complete EOL"
20782   arguments="${tmp#* }"
20783 
20784   # Input might be given as Windows format, start by converting to
20785   # unix format.
20786   new_path=`$CYGPATH -u "$path"`
20787 
20788   # Now try to locate executable using which
20789   new_path=`$WHICH "$new_path" 2> /dev/null`
20790   # bat and cmd files are not always considered executable in cygwin causing which
20791   # to not find them
20792   if test "x$new_path" = x \
20793       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20794       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20795     new_path=`$CYGPATH -u "$path"`
20796   fi
20797   if test "x$new_path" = x; then
20798     # Oops. Which didn't find the executable.
20799     # The splitting of arguments from the executable at a space might have been incorrect,
20800     # since paths with space are more likely in Windows. Give it another try with the whole
20801     # argument.
20802     path="$complete"
20803     arguments="EOL"
20804     new_path=`$CYGPATH -u "$path"`
20805     new_path=`$WHICH "$new_path" 2> /dev/null`
20806     # bat and cmd files are not always considered executable in cygwin causing which
20807     # to not find them
20808     if test "x$new_path" = x \
20809         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20810         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20811       new_path=`$CYGPATH -u "$path"`
20812     fi
20813     if test "x$new_path" = x; then
20814       # It's still not found. Now this is an unrecoverable error.
20815       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20816 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20817       has_space=`$ECHO "$complete" | $GREP " "`
20818       if test "x$has_space" != x; then
20819         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20820 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20821       fi
20822       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20823     fi
20824   fi
20825 
20826   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20827   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20828   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20829   # "foo.exe" is OK but "foo" is an error.
20830   #
20831   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20832   # It is also a way to make sure we got the proper file name for the real test later on.
20833   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20834   if test "x$test_shortpath" = x; then
20835     # Short path failed, file does not exist as specified.
20836     # Try adding .exe or .cmd
20837     if test -f "${new_path}.exe"; then
20838       input_to_shortpath="${new_path}.exe"
20839     elif test -f "${new_path}.cmd"; then
20840       input_to_shortpath="${new_path}.cmd"
20841     else
20842       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20843 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20844       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20845 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20846       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20847     fi
20848   else
20849     input_to_shortpath="$new_path"
20850   fi
20851 
20852   # Call helper function which possibly converts this using DOS-style short mode.
20853   # If so, the updated path is stored in $new_path.
20854   new_path="$input_to_shortpath"
20855 
20856   input_path="$input_to_shortpath"
20857   # Check if we need to convert this using DOS-style short mode. If the path
20858   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20859   # take no chances and rewrite it.
20860   # Note: m4 eats our [], so we need to use [ and ] instead.
20861   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20862   if test "x$has_forbidden_chars" != x; then
20863     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20864     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20865     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20866     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20867       # Going to short mode and back again did indeed matter. Since short mode is
20868       # case insensitive, let's make it lowercase to improve readability.
20869       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20870       # Now convert it back to Unix-style (cygpath)
20871       input_path=`$CYGPATH -u "$shortmode_path"`
20872       new_path="$input_path"
20873     fi
20874   fi
20875 
20876   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20877   if test "x$test_cygdrive_prefix" = x; then
20878     # As a simple fix, exclude /usr/bin since it's not a real path.
20879     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20880       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20881       # a path prefixed by /cygdrive for fixpath to work.
20882       new_path="$CYGWIN_ROOT_PATH$input_path"
20883     fi
20884   fi
20885 
20886   # remove trailing .exe if any
20887   new_path="${new_path/%.exe/}"
20888 
20889     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20890 
20891   # First separate the path from the arguments. This will split at the first
20892   # space.
20893   complete="$FOUND_MAKE"
20894   path="${complete%% *}"
20895   tmp="$complete EOL"
20896   arguments="${tmp#* }"
20897 
20898   # Input might be given as Windows format, start by converting to
20899   # unix format.
20900   new_path="$path"
20901 
20902   windows_path="$new_path"
20903   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20904     unix_path=`$CYGPATH -u "$windows_path"`
20905     new_path="$unix_path"
20906   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20907     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20908     new_path="$unix_path"
20909   fi
20910 
20911 
20912   # Now try to locate executable using which
20913   new_path=`$WHICH "$new_path" 2> /dev/null`
20914 
20915   if test "x$new_path" = x; then
20916     # Oops. Which didn't find the executable.
20917     # The splitting of arguments from the executable at a space might have been incorrect,
20918     # since paths with space are more likely in Windows. Give it another try with the whole
20919     # argument.
20920     path="$complete"
20921     arguments="EOL"
20922     new_path="$path"
20923 
20924   windows_path="$new_path"
20925   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20926     unix_path=`$CYGPATH -u "$windows_path"`
20927     new_path="$unix_path"
20928   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20929     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20930     new_path="$unix_path"
20931   fi
20932 
20933 
20934     new_path=`$WHICH "$new_path" 2> /dev/null`
20935     # bat and cmd files are not always considered executable in MSYS causing which
20936     # to not find them
20937     if test "x$new_path" = x \
20938         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20939         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20940       new_path="$path"
20941 
20942   windows_path="$new_path"
20943   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20944     unix_path=`$CYGPATH -u "$windows_path"`
20945     new_path="$unix_path"
20946   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20947     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20948     new_path="$unix_path"
20949   fi
20950 
20951     fi
20952 
20953     if test "x$new_path" = x; then
20954       # It's still not found. Now this is an unrecoverable error.
20955       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20956 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20957       has_space=`$ECHO "$complete" | $GREP " "`
20958       if test "x$has_space" != x; then
20959         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20960 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20961       fi
20962       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20963     fi
20964   fi
20965 
20966   # Now new_path has a complete unix path to the binary
20967   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20968     # Keep paths in /bin as-is, but remove trailing .exe if any
20969     new_path="${new_path/%.exe/}"
20970     # Do not save /bin paths to all_fixpath_prefixes!
20971   else
20972     # Not in mixed or Windows style, start by that.
20973     new_path=`cmd //c echo $new_path`
20974 
20975   input_path="$new_path"
20976   # Check if we need to convert this using DOS-style short mode. If the path
20977   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20978   # take no chances and rewrite it.
20979   # Note: m4 eats our [], so we need to use [ and ] instead.
20980   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20981   if test "x$has_forbidden_chars" != x; then
20982     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20983     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20984   fi
20985 
20986     # Output is in $new_path
20987 
20988   windows_path="$new_path"
20989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20990     unix_path=`$CYGPATH -u "$windows_path"`
20991     new_path="$unix_path"
20992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20993     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20994     new_path="$unix_path"
20995   fi
20996 
20997     # remove trailing .exe if any
20998     new_path="${new_path/%.exe/}"
20999 
21000     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21001     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21002   fi
21003 
21004     else
21005       # We're on a unix platform. Hooray! :)
21006       # First separate the path from the arguments. This will split at the first
21007       # space.
21008       complete="$FOUND_MAKE"
21009       path="${complete%% *}"
21010       tmp="$complete EOL"
21011       arguments="${tmp#* }"
21012 
21013       # Cannot rely on the command "which" here since it doesn't always work.
21014       is_absolute_path=`$ECHO "$path" | $GREP ^/`
21015       if test -z "$is_absolute_path"; then
21016         # Path to executable is not absolute. Find it.
21017         IFS_save="$IFS"
21018         IFS=:
21019         for p in $PATH; do
21020           if test -f "$p/$path" && test -x "$p/$path"; then
21021             new_path="$p/$path"
21022             break
21023           fi
21024         done
21025         IFS="$IFS_save"
21026       else
21027         # This is an absolute path, we can use it without further modifications.
21028         new_path="$path"
21029       fi
21030 
21031       if test "x$new_path" = x; then
21032         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21033 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21034         has_space=`$ECHO "$complete" | $GREP " "`
21035         if test "x$has_space" != x; then
21036           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21037 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21038         fi
21039         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21040       fi
21041     fi
21042 
21043     # Now join together the path and the arguments once again
21044     if test "x$arguments" != xEOL; then
21045       new_complete="$new_path ${arguments% *}"
21046     else
21047       new_complete="$new_path"
21048     fi
21049 
21050     if test "x$complete" != "x$new_complete"; then
21051       FOUND_MAKE="$new_complete"
21052       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21053 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21054     fi
21055   fi
21056 
21057         fi
21058       fi
21059     fi
21060   fi
21061 
21062     if test "x$FOUND_MAKE" = x; then
21063       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21064     fi
21065 
21066   fi
21067 
21068 
21069   MAKE=$FOUND_MAKE
21070 
21071   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21072 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21073 
21074 
21075   # Check if make supports the output sync option and if so, setup using it.
21076   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21077 $as_echo_n "checking if make --output-sync is supported... " >&6; }
21078   if $MAKE --version -O > /dev/null 2>&1; then
21079     OUTPUT_SYNC_SUPPORTED=true
21080     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21081 $as_echo "yes" >&6; }
21082     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21083 $as_echo_n "checking for output-sync value... " >&6; }
21084 
21085 # Check whether --with-output-sync was given.
21086 if test "${with_output_sync+set}" = set; then :
21087   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21088 fi
21089 
21090     if test "x$OUTPUT_SYNC" = "x"; then
21091       OUTPUT_SYNC=none
21092     fi
21093     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21094 $as_echo "$OUTPUT_SYNC" >&6; }
21095     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21096       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21097     fi
21098   else
21099     OUTPUT_SYNC_SUPPORTED=false
21100     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21101 $as_echo "no" >&6; }
21102   fi
21103 
21104 
21105 
21106 
21107 
21108 
21109   # Test if find supports -delete
21110   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21111 $as_echo_n "checking if find supports -delete... " >&6; }
21112   FIND_DELETE="-delete"
21113 
21114   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21115 
21116   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21117 
21118   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21119   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21120     # No, it does not.
21121     $RM $DELETEDIR/TestIfFindSupportsDelete
21122     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21123       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21124       FIND_DELETE="-print | $XARGS $RM"
21125     else
21126       FIND_DELETE="-exec $RM \{\} \+"
21127     fi
21128     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21129 $as_echo "no" >&6; }
21130   else
21131     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21132 $as_echo "yes" >&6; }
21133   fi
21134   $RMDIR $DELETEDIR
21135 
21136 
21137 
21138   # Test which kind of tar was found
21139   if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21140     TAR_TYPE="gnu"
21141   elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21142     TAR_TYPE="bsd"
21143   elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21144     TAR_TYPE="solaris"
21145   fi
21146   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21147 $as_echo_n "checking what type of tar was found... " >&6; }
21148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21149 $as_echo "$TAR_TYPE" >&6; }
21150 
21151   TAR_CREATE_FILE_PARAM=""
21152 
21153   if test "x$TAR_TYPE" = "xgnu"; then
21154     TAR_INCLUDE_PARAM="T"
21155     TAR_SUPPORTS_TRANSFORM="true"
21156     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21157       # When using gnu tar for Solaris targets, need to use compatibility mode
21158       TAR_CREATE_EXTRA_PARAM="--format=ustar"
21159     fi
21160   else
21161     TAR_INCLUDE_PARAM="I"
21162     TAR_SUPPORTS_TRANSFORM="false"
21163   fi
21164 
21165 
21166 
21167 
21168 
21169 
21170   # These tools might not be installed by default,
21171   # need hint on how to install them.
21172 
21173 
21174 
21175   # Publish this variable in the help.
21176 
21177 
21178   if [ -z "${UNZIP+x}" ]; then
21179     # The variable is not set by user, try to locate tool using the code snippet
21180     for ac_prog in unzip
21181 do
21182   # Extract the first word of "$ac_prog", so it can be a program name with args.
21183 set dummy $ac_prog; ac_word=$2
21184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21185 $as_echo_n "checking for $ac_word... " >&6; }
21186 if ${ac_cv_path_UNZIP+:} false; then :
21187   $as_echo_n "(cached) " >&6
21188 else
21189   case $UNZIP in
21190   [\\/]* | ?:[\\/]*)
21191   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21192   ;;
21193   *)
21194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21195 for as_dir in $PATH
21196 do
21197   IFS=$as_save_IFS
21198   test -z "$as_dir" && as_dir=.
21199     for ac_exec_ext in '' $ac_executable_extensions; do
21200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21201     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21203     break 2
21204   fi
21205 done
21206   done
21207 IFS=$as_save_IFS
21208 
21209   ;;
21210 esac
21211 fi
21212 UNZIP=$ac_cv_path_UNZIP
21213 if test -n "$UNZIP"; then
21214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21215 $as_echo "$UNZIP" >&6; }
21216 else
21217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21218 $as_echo "no" >&6; }
21219 fi
21220 
21221 
21222   test -n "$UNZIP" && break
21223 done
21224 
21225   else
21226     # The variable is set, but is it from the command line or the environment?
21227 
21228     # Try to remove the string !UNZIP! from our list.
21229     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21230     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21231       # If it failed, the variable was not from the command line. Ignore it,
21232       # but warn the user (except for BASH, which is always set by the calling BASH).
21233       if test "xUNZIP" != xBASH; then
21234         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21235 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21236       fi
21237       # Try to locate tool using the code snippet
21238       for ac_prog in unzip
21239 do
21240   # Extract the first word of "$ac_prog", so it can be a program name with args.
21241 set dummy $ac_prog; ac_word=$2
21242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21243 $as_echo_n "checking for $ac_word... " >&6; }
21244 if ${ac_cv_path_UNZIP+:} false; then :
21245   $as_echo_n "(cached) " >&6
21246 else
21247   case $UNZIP in
21248   [\\/]* | ?:[\\/]*)
21249   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21250   ;;
21251   *)
21252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21253 for as_dir in $PATH
21254 do
21255   IFS=$as_save_IFS
21256   test -z "$as_dir" && as_dir=.
21257     for ac_exec_ext in '' $ac_executable_extensions; do
21258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21259     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21261     break 2
21262   fi
21263 done
21264   done
21265 IFS=$as_save_IFS
21266 
21267   ;;
21268 esac
21269 fi
21270 UNZIP=$ac_cv_path_UNZIP
21271 if test -n "$UNZIP"; then
21272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21273 $as_echo "$UNZIP" >&6; }
21274 else
21275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21276 $as_echo "no" >&6; }
21277 fi
21278 
21279 
21280   test -n "$UNZIP" && break
21281 done
21282 
21283     else
21284       # If it succeeded, then it was overridden by the user. We will use it
21285       # for the tool.
21286 
21287       # First remove it from the list of overridden variables, so we can test
21288       # for unknown variables in the end.
21289       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21290 
21291       # Check if we try to supply an empty value
21292       if test "x$UNZIP" = x; then
21293         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21294 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21295         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21296 $as_echo_n "checking for UNZIP... " >&6; }
21297         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21298 $as_echo "disabled" >&6; }
21299       else
21300         # Check if the provided tool contains a complete path.
21301         tool_specified="$UNZIP"
21302         tool_basename="${tool_specified##*/}"
21303         if test "x$tool_basename" = "x$tool_specified"; then
21304           # A command without a complete path is provided, search $PATH.
21305           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21306 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21307           # Extract the first word of "$tool_basename", so it can be a program name with args.
21308 set dummy $tool_basename; ac_word=$2
21309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21310 $as_echo_n "checking for $ac_word... " >&6; }
21311 if ${ac_cv_path_UNZIP+:} false; then :
21312   $as_echo_n "(cached) " >&6
21313 else
21314   case $UNZIP in
21315   [\\/]* | ?:[\\/]*)
21316   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21317   ;;
21318   *)
21319   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21320 for as_dir in $PATH
21321 do
21322   IFS=$as_save_IFS
21323   test -z "$as_dir" && as_dir=.
21324     for ac_exec_ext in '' $ac_executable_extensions; do
21325   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21326     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21327     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21328     break 2
21329   fi
21330 done
21331   done
21332 IFS=$as_save_IFS
21333 
21334   ;;
21335 esac
21336 fi
21337 UNZIP=$ac_cv_path_UNZIP
21338 if test -n "$UNZIP"; then
21339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21340 $as_echo "$UNZIP" >&6; }
21341 else
21342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21343 $as_echo "no" >&6; }
21344 fi
21345 
21346 
21347           if test "x$UNZIP" = x; then
21348             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21349           fi
21350         else
21351           # Otherwise we believe it is a complete path. Use it as it is.
21352           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21353 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21354           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21355 $as_echo_n "checking for UNZIP... " >&6; }
21356           if test ! -x "$tool_specified"; then
21357             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21358 $as_echo "not found" >&6; }
21359             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21360           fi
21361           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21362 $as_echo "$tool_specified" >&6; }
21363         fi
21364       fi
21365     fi
21366 
21367   fi
21368 
21369 
21370 
21371   if test "x$UNZIP" = x; then
21372     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21373   fi
21374 
21375 
21376 
21377 
21378 
21379   # Publish this variable in the help.
21380 
21381 
21382   if [ -z "${ZIP+x}" ]; then
21383     # The variable is not set by user, try to locate tool using the code snippet
21384     for ac_prog in zip
21385 do
21386   # Extract the first word of "$ac_prog", so it can be a program name with args.
21387 set dummy $ac_prog; ac_word=$2
21388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21389 $as_echo_n "checking for $ac_word... " >&6; }
21390 if ${ac_cv_path_ZIP+:} false; then :
21391   $as_echo_n "(cached) " >&6
21392 else
21393   case $ZIP in
21394   [\\/]* | ?:[\\/]*)
21395   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21396   ;;
21397   *)
21398   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21399 for as_dir in $PATH
21400 do
21401   IFS=$as_save_IFS
21402   test -z "$as_dir" && as_dir=.
21403     for ac_exec_ext in '' $ac_executable_extensions; do
21404   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21405     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21406     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21407     break 2
21408   fi
21409 done
21410   done
21411 IFS=$as_save_IFS
21412 
21413   ;;
21414 esac
21415 fi
21416 ZIP=$ac_cv_path_ZIP
21417 if test -n "$ZIP"; then
21418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21419 $as_echo "$ZIP" >&6; }
21420 else
21421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21422 $as_echo "no" >&6; }
21423 fi
21424 
21425 
21426   test -n "$ZIP" && break
21427 done
21428 
21429   else
21430     # The variable is set, but is it from the command line or the environment?
21431 
21432     # Try to remove the string !ZIP! from our list.
21433     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21434     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21435       # If it failed, the variable was not from the command line. Ignore it,
21436       # but warn the user (except for BASH, which is always set by the calling BASH).
21437       if test "xZIP" != xBASH; then
21438         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21439 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21440       fi
21441       # Try to locate tool using the code snippet
21442       for ac_prog in zip
21443 do
21444   # Extract the first word of "$ac_prog", so it can be a program name with args.
21445 set dummy $ac_prog; ac_word=$2
21446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21447 $as_echo_n "checking for $ac_word... " >&6; }
21448 if ${ac_cv_path_ZIP+:} false; then :
21449   $as_echo_n "(cached) " >&6
21450 else
21451   case $ZIP in
21452   [\\/]* | ?:[\\/]*)
21453   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21454   ;;
21455   *)
21456   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21457 for as_dir in $PATH
21458 do
21459   IFS=$as_save_IFS
21460   test -z "$as_dir" && as_dir=.
21461     for ac_exec_ext in '' $ac_executable_extensions; do
21462   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21463     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21464     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21465     break 2
21466   fi
21467 done
21468   done
21469 IFS=$as_save_IFS
21470 
21471   ;;
21472 esac
21473 fi
21474 ZIP=$ac_cv_path_ZIP
21475 if test -n "$ZIP"; then
21476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21477 $as_echo "$ZIP" >&6; }
21478 else
21479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21480 $as_echo "no" >&6; }
21481 fi
21482 
21483 
21484   test -n "$ZIP" && break
21485 done
21486 
21487     else
21488       # If it succeeded, then it was overridden by the user. We will use it
21489       # for the tool.
21490 
21491       # First remove it from the list of overridden variables, so we can test
21492       # for unknown variables in the end.
21493       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21494 
21495       # Check if we try to supply an empty value
21496       if test "x$ZIP" = x; then
21497         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21498 $as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21499         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21500 $as_echo_n "checking for ZIP... " >&6; }
21501         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21502 $as_echo "disabled" >&6; }
21503       else
21504         # Check if the provided tool contains a complete path.
21505         tool_specified="$ZIP"
21506         tool_basename="${tool_specified##*/}"
21507         if test "x$tool_basename" = "x$tool_specified"; then
21508           # A command without a complete path is provided, search $PATH.
21509           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21510 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21511           # Extract the first word of "$tool_basename", so it can be a program name with args.
21512 set dummy $tool_basename; ac_word=$2
21513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21514 $as_echo_n "checking for $ac_word... " >&6; }
21515 if ${ac_cv_path_ZIP+:} false; then :
21516   $as_echo_n "(cached) " >&6
21517 else
21518   case $ZIP in
21519   [\\/]* | ?:[\\/]*)
21520   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21521   ;;
21522   *)
21523   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21524 for as_dir in $PATH
21525 do
21526   IFS=$as_save_IFS
21527   test -z "$as_dir" && as_dir=.
21528     for ac_exec_ext in '' $ac_executable_extensions; do
21529   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21530     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21532     break 2
21533   fi
21534 done
21535   done
21536 IFS=$as_save_IFS
21537 
21538   ;;
21539 esac
21540 fi
21541 ZIP=$ac_cv_path_ZIP
21542 if test -n "$ZIP"; then
21543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21544 $as_echo "$ZIP" >&6; }
21545 else
21546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21547 $as_echo "no" >&6; }
21548 fi
21549 
21550 
21551           if test "x$ZIP" = x; then
21552             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21553           fi
21554         else
21555           # Otherwise we believe it is a complete path. Use it as it is.
21556           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21557 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21558           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21559 $as_echo_n "checking for ZIP... " >&6; }
21560           if test ! -x "$tool_specified"; then
21561             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21562 $as_echo "not found" >&6; }
21563             as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21564           fi
21565           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21566 $as_echo "$tool_specified" >&6; }
21567         fi
21568       fi
21569     fi
21570 
21571   fi
21572 
21573 
21574 
21575   if test "x$ZIP" = x; then
21576     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21577   fi
21578 
21579 
21580 
21581   # Non-required basic tools
21582 
21583 
21584 
21585   # Publish this variable in the help.
21586 
21587 
21588   if [ -z "${LDD+x}" ]; then
21589     # The variable is not set by user, try to locate tool using the code snippet
21590     for ac_prog in ldd
21591 do
21592   # Extract the first word of "$ac_prog", so it can be a program name with args.
21593 set dummy $ac_prog; ac_word=$2
21594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21595 $as_echo_n "checking for $ac_word... " >&6; }
21596 if ${ac_cv_path_LDD+:} false; then :
21597   $as_echo_n "(cached) " >&6
21598 else
21599   case $LDD in
21600   [\\/]* | ?:[\\/]*)
21601   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21602   ;;
21603   *)
21604   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21605 for as_dir in $PATH
21606 do
21607   IFS=$as_save_IFS
21608   test -z "$as_dir" && as_dir=.
21609     for ac_exec_ext in '' $ac_executable_extensions; do
21610   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21611     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21612     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21613     break 2
21614   fi
21615 done
21616   done
21617 IFS=$as_save_IFS
21618 
21619   ;;
21620 esac
21621 fi
21622 LDD=$ac_cv_path_LDD
21623 if test -n "$LDD"; then
21624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21625 $as_echo "$LDD" >&6; }
21626 else
21627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21628 $as_echo "no" >&6; }
21629 fi
21630 
21631 
21632   test -n "$LDD" && break
21633 done
21634 
21635   else
21636     # The variable is set, but is it from the command line or the environment?
21637 
21638     # Try to remove the string !LDD! from our list.
21639     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21640     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21641       # If it failed, the variable was not from the command line. Ignore it,
21642       # but warn the user (except for BASH, which is always set by the calling BASH).
21643       if test "xLDD" != xBASH; then
21644         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21645 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21646       fi
21647       # Try to locate tool using the code snippet
21648       for ac_prog in ldd
21649 do
21650   # Extract the first word of "$ac_prog", so it can be a program name with args.
21651 set dummy $ac_prog; ac_word=$2
21652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21653 $as_echo_n "checking for $ac_word... " >&6; }
21654 if ${ac_cv_path_LDD+:} false; then :
21655   $as_echo_n "(cached) " >&6
21656 else
21657   case $LDD in
21658   [\\/]* | ?:[\\/]*)
21659   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21660   ;;
21661   *)
21662   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21663 for as_dir in $PATH
21664 do
21665   IFS=$as_save_IFS
21666   test -z "$as_dir" && as_dir=.
21667     for ac_exec_ext in '' $ac_executable_extensions; do
21668   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21669     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21670     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21671     break 2
21672   fi
21673 done
21674   done
21675 IFS=$as_save_IFS
21676 
21677   ;;
21678 esac
21679 fi
21680 LDD=$ac_cv_path_LDD
21681 if test -n "$LDD"; then
21682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21683 $as_echo "$LDD" >&6; }
21684 else
21685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21686 $as_echo "no" >&6; }
21687 fi
21688 
21689 
21690   test -n "$LDD" && break
21691 done
21692 
21693     else
21694       # If it succeeded, then it was overridden by the user. We will use it
21695       # for the tool.
21696 
21697       # First remove it from the list of overridden variables, so we can test
21698       # for unknown variables in the end.
21699       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21700 
21701       # Check if we try to supply an empty value
21702       if test "x$LDD" = x; then
21703         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21704 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21705         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21706 $as_echo_n "checking for LDD... " >&6; }
21707         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21708 $as_echo "disabled" >&6; }
21709       else
21710         # Check if the provided tool contains a complete path.
21711         tool_specified="$LDD"
21712         tool_basename="${tool_specified##*/}"
21713         if test "x$tool_basename" = "x$tool_specified"; then
21714           # A command without a complete path is provided, search $PATH.
21715           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21716 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21717           # Extract the first word of "$tool_basename", so it can be a program name with args.
21718 set dummy $tool_basename; ac_word=$2
21719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21720 $as_echo_n "checking for $ac_word... " >&6; }
21721 if ${ac_cv_path_LDD+:} false; then :
21722   $as_echo_n "(cached) " >&6
21723 else
21724   case $LDD in
21725   [\\/]* | ?:[\\/]*)
21726   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21727   ;;
21728   *)
21729   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21730 for as_dir in $PATH
21731 do
21732   IFS=$as_save_IFS
21733   test -z "$as_dir" && as_dir=.
21734     for ac_exec_ext in '' $ac_executable_extensions; do
21735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21736     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21738     break 2
21739   fi
21740 done
21741   done
21742 IFS=$as_save_IFS
21743 
21744   ;;
21745 esac
21746 fi
21747 LDD=$ac_cv_path_LDD
21748 if test -n "$LDD"; then
21749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21750 $as_echo "$LDD" >&6; }
21751 else
21752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21753 $as_echo "no" >&6; }
21754 fi
21755 
21756 
21757           if test "x$LDD" = x; then
21758             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21759           fi
21760         else
21761           # Otherwise we believe it is a complete path. Use it as it is.
21762           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21763 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21764           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21765 $as_echo_n "checking for LDD... " >&6; }
21766           if test ! -x "$tool_specified"; then
21767             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21768 $as_echo "not found" >&6; }
21769             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21770           fi
21771           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21772 $as_echo "$tool_specified" >&6; }
21773         fi
21774       fi
21775     fi
21776 
21777   fi
21778 
21779 
21780   if test "x$LDD" = "x"; then
21781     # List shared lib dependencies is used for
21782     # debug output and checking for forbidden dependencies.
21783     # We can build without it.
21784     LDD="true"
21785   fi
21786 
21787 
21788   # Publish this variable in the help.
21789 
21790 
21791   if [ -z "${OTOOL+x}" ]; then
21792     # The variable is not set by user, try to locate tool using the code snippet
21793     for ac_prog in otool
21794 do
21795   # Extract the first word of "$ac_prog", so it can be a program name with args.
21796 set dummy $ac_prog; ac_word=$2
21797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21798 $as_echo_n "checking for $ac_word... " >&6; }
21799 if ${ac_cv_path_OTOOL+:} false; then :
21800   $as_echo_n "(cached) " >&6
21801 else
21802   case $OTOOL in
21803   [\\/]* | ?:[\\/]*)
21804   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21805   ;;
21806   *)
21807   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21808 for as_dir in $PATH
21809 do
21810   IFS=$as_save_IFS
21811   test -z "$as_dir" && as_dir=.
21812     for ac_exec_ext in '' $ac_executable_extensions; do
21813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21814     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21816     break 2
21817   fi
21818 done
21819   done
21820 IFS=$as_save_IFS
21821 
21822   ;;
21823 esac
21824 fi
21825 OTOOL=$ac_cv_path_OTOOL
21826 if test -n "$OTOOL"; then
21827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21828 $as_echo "$OTOOL" >&6; }
21829 else
21830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21831 $as_echo "no" >&6; }
21832 fi
21833 
21834 
21835   test -n "$OTOOL" && break
21836 done
21837 
21838   else
21839     # The variable is set, but is it from the command line or the environment?
21840 
21841     # Try to remove the string !OTOOL! from our list.
21842     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21843     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21844       # If it failed, the variable was not from the command line. Ignore it,
21845       # but warn the user (except for BASH, which is always set by the calling BASH).
21846       if test "xOTOOL" != xBASH; then
21847         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21848 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21849       fi
21850       # Try to locate tool using the code snippet
21851       for ac_prog in otool
21852 do
21853   # Extract the first word of "$ac_prog", so it can be a program name with args.
21854 set dummy $ac_prog; ac_word=$2
21855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21856 $as_echo_n "checking for $ac_word... " >&6; }
21857 if ${ac_cv_path_OTOOL+:} false; then :
21858   $as_echo_n "(cached) " >&6
21859 else
21860   case $OTOOL in
21861   [\\/]* | ?:[\\/]*)
21862   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21863   ;;
21864   *)
21865   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21866 for as_dir in $PATH
21867 do
21868   IFS=$as_save_IFS
21869   test -z "$as_dir" && as_dir=.
21870     for ac_exec_ext in '' $ac_executable_extensions; do
21871   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21872     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21873     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21874     break 2
21875   fi
21876 done
21877   done
21878 IFS=$as_save_IFS
21879 
21880   ;;
21881 esac
21882 fi
21883 OTOOL=$ac_cv_path_OTOOL
21884 if test -n "$OTOOL"; then
21885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21886 $as_echo "$OTOOL" >&6; }
21887 else
21888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21889 $as_echo "no" >&6; }
21890 fi
21891 
21892 
21893   test -n "$OTOOL" && break
21894 done
21895 
21896     else
21897       # If it succeeded, then it was overridden by the user. We will use it
21898       # for the tool.
21899 
21900       # First remove it from the list of overridden variables, so we can test
21901       # for unknown variables in the end.
21902       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21903 
21904       # Check if we try to supply an empty value
21905       if test "x$OTOOL" = x; then
21906         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21907 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21908         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21909 $as_echo_n "checking for OTOOL... " >&6; }
21910         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21911 $as_echo "disabled" >&6; }
21912       else
21913         # Check if the provided tool contains a complete path.
21914         tool_specified="$OTOOL"
21915         tool_basename="${tool_specified##*/}"
21916         if test "x$tool_basename" = "x$tool_specified"; then
21917           # A command without a complete path is provided, search $PATH.
21918           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21919 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21920           # Extract the first word of "$tool_basename", so it can be a program name with args.
21921 set dummy $tool_basename; ac_word=$2
21922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21923 $as_echo_n "checking for $ac_word... " >&6; }
21924 if ${ac_cv_path_OTOOL+:} false; then :
21925   $as_echo_n "(cached) " >&6
21926 else
21927   case $OTOOL in
21928   [\\/]* | ?:[\\/]*)
21929   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21930   ;;
21931   *)
21932   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21933 for as_dir in $PATH
21934 do
21935   IFS=$as_save_IFS
21936   test -z "$as_dir" && as_dir=.
21937     for ac_exec_ext in '' $ac_executable_extensions; do
21938   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21939     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21940     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21941     break 2
21942   fi
21943 done
21944   done
21945 IFS=$as_save_IFS
21946 
21947   ;;
21948 esac
21949 fi
21950 OTOOL=$ac_cv_path_OTOOL
21951 if test -n "$OTOOL"; then
21952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21953 $as_echo "$OTOOL" >&6; }
21954 else
21955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21956 $as_echo "no" >&6; }
21957 fi
21958 
21959 
21960           if test "x$OTOOL" = x; then
21961             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21962           fi
21963         else
21964           # Otherwise we believe it is a complete path. Use it as it is.
21965           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21966 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21967           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21968 $as_echo_n "checking for OTOOL... " >&6; }
21969           if test ! -x "$tool_specified"; then
21970             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21971 $as_echo "not found" >&6; }
21972             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21973           fi
21974           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21975 $as_echo "$tool_specified" >&6; }
21976         fi
21977       fi
21978     fi
21979 
21980   fi
21981 
21982 
21983   if test "x$OTOOL" = "x"; then
21984     OTOOL="true"
21985   fi
21986 
21987 
21988   # Publish this variable in the help.
21989 
21990 
21991   if [ -z "${READELF+x}" ]; then
21992     # The variable is not set by user, try to locate tool using the code snippet
21993     for ac_prog in greadelf readelf
21994 do
21995   # Extract the first word of "$ac_prog", so it can be a program name with args.
21996 set dummy $ac_prog; ac_word=$2
21997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21998 $as_echo_n "checking for $ac_word... " >&6; }
21999 if ${ac_cv_path_READELF+:} false; then :
22000   $as_echo_n "(cached) " >&6
22001 else
22002   case $READELF in
22003   [\\/]* | ?:[\\/]*)
22004   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22005   ;;
22006   *)
22007   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22008 for as_dir in $PATH
22009 do
22010   IFS=$as_save_IFS
22011   test -z "$as_dir" && as_dir=.
22012     for ac_exec_ext in '' $ac_executable_extensions; do
22013   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22014     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22015     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22016     break 2
22017   fi
22018 done
22019   done
22020 IFS=$as_save_IFS
22021 
22022   ;;
22023 esac
22024 fi
22025 READELF=$ac_cv_path_READELF
22026 if test -n "$READELF"; then
22027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22028 $as_echo "$READELF" >&6; }
22029 else
22030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22031 $as_echo "no" >&6; }
22032 fi
22033 
22034 
22035   test -n "$READELF" && break
22036 done
22037 
22038   else
22039     # The variable is set, but is it from the command line or the environment?
22040 
22041     # Try to remove the string !READELF! from our list.
22042     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22043     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22044       # If it failed, the variable was not from the command line. Ignore it,
22045       # but warn the user (except for BASH, which is always set by the calling BASH).
22046       if test "xREADELF" != xBASH; then
22047         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22048 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22049       fi
22050       # Try to locate tool using the code snippet
22051       for ac_prog in greadelf readelf
22052 do
22053   # Extract the first word of "$ac_prog", so it can be a program name with args.
22054 set dummy $ac_prog; ac_word=$2
22055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22056 $as_echo_n "checking for $ac_word... " >&6; }
22057 if ${ac_cv_path_READELF+:} false; then :
22058   $as_echo_n "(cached) " >&6
22059 else
22060   case $READELF in
22061   [\\/]* | ?:[\\/]*)
22062   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22063   ;;
22064   *)
22065   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22066 for as_dir in $PATH
22067 do
22068   IFS=$as_save_IFS
22069   test -z "$as_dir" && as_dir=.
22070     for ac_exec_ext in '' $ac_executable_extensions; do
22071   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22072     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22073     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22074     break 2
22075   fi
22076 done
22077   done
22078 IFS=$as_save_IFS
22079 
22080   ;;
22081 esac
22082 fi
22083 READELF=$ac_cv_path_READELF
22084 if test -n "$READELF"; then
22085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22086 $as_echo "$READELF" >&6; }
22087 else
22088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22089 $as_echo "no" >&6; }
22090 fi
22091 
22092 
22093   test -n "$READELF" && break
22094 done
22095 
22096     else
22097       # If it succeeded, then it was overridden by the user. We will use it
22098       # for the tool.
22099 
22100       # First remove it from the list of overridden variables, so we can test
22101       # for unknown variables in the end.
22102       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22103 
22104       # Check if we try to supply an empty value
22105       if test "x$READELF" = x; then
22106         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22107 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22108         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22109 $as_echo_n "checking for READELF... " >&6; }
22110         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22111 $as_echo "disabled" >&6; }
22112       else
22113         # Check if the provided tool contains a complete path.
22114         tool_specified="$READELF"
22115         tool_basename="${tool_specified##*/}"
22116         if test "x$tool_basename" = "x$tool_specified"; then
22117           # A command without a complete path is provided, search $PATH.
22118           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22119 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22120           # Extract the first word of "$tool_basename", so it can be a program name with args.
22121 set dummy $tool_basename; ac_word=$2
22122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22123 $as_echo_n "checking for $ac_word... " >&6; }
22124 if ${ac_cv_path_READELF+:} false; then :
22125   $as_echo_n "(cached) " >&6
22126 else
22127   case $READELF in
22128   [\\/]* | ?:[\\/]*)
22129   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22130   ;;
22131   *)
22132   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22133 for as_dir in $PATH
22134 do
22135   IFS=$as_save_IFS
22136   test -z "$as_dir" && as_dir=.
22137     for ac_exec_ext in '' $ac_executable_extensions; do
22138   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22139     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22140     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22141     break 2
22142   fi
22143 done
22144   done
22145 IFS=$as_save_IFS
22146 
22147   ;;
22148 esac
22149 fi
22150 READELF=$ac_cv_path_READELF
22151 if test -n "$READELF"; then
22152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22153 $as_echo "$READELF" >&6; }
22154 else
22155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22156 $as_echo "no" >&6; }
22157 fi
22158 
22159 
22160           if test "x$READELF" = x; then
22161             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22162           fi
22163         else
22164           # Otherwise we believe it is a complete path. Use it as it is.
22165           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22166 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22167           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22168 $as_echo_n "checking for READELF... " >&6; }
22169           if test ! -x "$tool_specified"; then
22170             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22171 $as_echo "not found" >&6; }
22172             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22173           fi
22174           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22175 $as_echo "$tool_specified" >&6; }
22176         fi
22177       fi
22178     fi
22179 
22180   fi
22181 
22182 
22183 
22184 
22185   # Publish this variable in the help.
22186 
22187 
22188   if [ -z "${HG+x}" ]; then
22189     # The variable is not set by user, try to locate tool using the code snippet
22190     for ac_prog in hg
22191 do
22192   # Extract the first word of "$ac_prog", so it can be a program name with args.
22193 set dummy $ac_prog; ac_word=$2
22194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22195 $as_echo_n "checking for $ac_word... " >&6; }
22196 if ${ac_cv_path_HG+:} false; then :
22197   $as_echo_n "(cached) " >&6
22198 else
22199   case $HG in
22200   [\\/]* | ?:[\\/]*)
22201   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22202   ;;
22203   *)
22204   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22205 for as_dir in $PATH
22206 do
22207   IFS=$as_save_IFS
22208   test -z "$as_dir" && as_dir=.
22209     for ac_exec_ext in '' $ac_executable_extensions; do
22210   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22211     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22212     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22213     break 2
22214   fi
22215 done
22216   done
22217 IFS=$as_save_IFS
22218 
22219   ;;
22220 esac
22221 fi
22222 HG=$ac_cv_path_HG
22223 if test -n "$HG"; then
22224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22225 $as_echo "$HG" >&6; }
22226 else
22227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22228 $as_echo "no" >&6; }
22229 fi
22230 
22231 
22232   test -n "$HG" && break
22233 done
22234 
22235   else
22236     # The variable is set, but is it from the command line or the environment?
22237 
22238     # Try to remove the string !HG! from our list.
22239     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22240     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22241       # If it failed, the variable was not from the command line. Ignore it,
22242       # but warn the user (except for BASH, which is always set by the calling BASH).
22243       if test "xHG" != xBASH; then
22244         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22245 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22246       fi
22247       # Try to locate tool using the code snippet
22248       for ac_prog in hg
22249 do
22250   # Extract the first word of "$ac_prog", so it can be a program name with args.
22251 set dummy $ac_prog; ac_word=$2
22252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22253 $as_echo_n "checking for $ac_word... " >&6; }
22254 if ${ac_cv_path_HG+:} false; then :
22255   $as_echo_n "(cached) " >&6
22256 else
22257   case $HG in
22258   [\\/]* | ?:[\\/]*)
22259   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22260   ;;
22261   *)
22262   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22263 for as_dir in $PATH
22264 do
22265   IFS=$as_save_IFS
22266   test -z "$as_dir" && as_dir=.
22267     for ac_exec_ext in '' $ac_executable_extensions; do
22268   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22269     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22270     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22271     break 2
22272   fi
22273 done
22274   done
22275 IFS=$as_save_IFS
22276 
22277   ;;
22278 esac
22279 fi
22280 HG=$ac_cv_path_HG
22281 if test -n "$HG"; then
22282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22283 $as_echo "$HG" >&6; }
22284 else
22285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22286 $as_echo "no" >&6; }
22287 fi
22288 
22289 
22290   test -n "$HG" && break
22291 done
22292 
22293     else
22294       # If it succeeded, then it was overridden by the user. We will use it
22295       # for the tool.
22296 
22297       # First remove it from the list of overridden variables, so we can test
22298       # for unknown variables in the end.
22299       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22300 
22301       # Check if we try to supply an empty value
22302       if test "x$HG" = x; then
22303         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22304 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22305         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22306 $as_echo_n "checking for HG... " >&6; }
22307         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22308 $as_echo "disabled" >&6; }
22309       else
22310         # Check if the provided tool contains a complete path.
22311         tool_specified="$HG"
22312         tool_basename="${tool_specified##*/}"
22313         if test "x$tool_basename" = "x$tool_specified"; then
22314           # A command without a complete path is provided, search $PATH.
22315           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22316 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22317           # Extract the first word of "$tool_basename", so it can be a program name with args.
22318 set dummy $tool_basename; ac_word=$2
22319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22320 $as_echo_n "checking for $ac_word... " >&6; }
22321 if ${ac_cv_path_HG+:} false; then :
22322   $as_echo_n "(cached) " >&6
22323 else
22324   case $HG in
22325   [\\/]* | ?:[\\/]*)
22326   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22327   ;;
22328   *)
22329   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22330 for as_dir in $PATH
22331 do
22332   IFS=$as_save_IFS
22333   test -z "$as_dir" && as_dir=.
22334     for ac_exec_ext in '' $ac_executable_extensions; do
22335   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22336     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22337     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22338     break 2
22339   fi
22340 done
22341   done
22342 IFS=$as_save_IFS
22343 
22344   ;;
22345 esac
22346 fi
22347 HG=$ac_cv_path_HG
22348 if test -n "$HG"; then
22349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22350 $as_echo "$HG" >&6; }
22351 else
22352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22353 $as_echo "no" >&6; }
22354 fi
22355 
22356 
22357           if test "x$HG" = x; then
22358             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22359           fi
22360         else
22361           # Otherwise we believe it is a complete path. Use it as it is.
22362           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22363 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22364           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22365 $as_echo_n "checking for HG... " >&6; }
22366           if test ! -x "$tool_specified"; then
22367             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22368 $as_echo "not found" >&6; }
22369             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22370           fi
22371           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22372 $as_echo "$tool_specified" >&6; }
22373         fi
22374       fi
22375     fi
22376 
22377   fi
22378 
22379 
22380 
22381 
22382   # Publish this variable in the help.
22383 
22384 
22385   if [ -z "${STAT+x}" ]; then
22386     # The variable is not set by user, try to locate tool using the code snippet
22387     for ac_prog in stat
22388 do
22389   # Extract the first word of "$ac_prog", so it can be a program name with args.
22390 set dummy $ac_prog; ac_word=$2
22391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22392 $as_echo_n "checking for $ac_word... " >&6; }
22393 if ${ac_cv_path_STAT+:} false; then :
22394   $as_echo_n "(cached) " >&6
22395 else
22396   case $STAT in
22397   [\\/]* | ?:[\\/]*)
22398   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22399   ;;
22400   *)
22401   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22402 for as_dir in $PATH
22403 do
22404   IFS=$as_save_IFS
22405   test -z "$as_dir" && as_dir=.
22406     for ac_exec_ext in '' $ac_executable_extensions; do
22407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22408     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22410     break 2
22411   fi
22412 done
22413   done
22414 IFS=$as_save_IFS
22415 
22416   ;;
22417 esac
22418 fi
22419 STAT=$ac_cv_path_STAT
22420 if test -n "$STAT"; then
22421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22422 $as_echo "$STAT" >&6; }
22423 else
22424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22425 $as_echo "no" >&6; }
22426 fi
22427 
22428 
22429   test -n "$STAT" && break
22430 done
22431 
22432   else
22433     # The variable is set, but is it from the command line or the environment?
22434 
22435     # Try to remove the string !STAT! from our list.
22436     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22437     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22438       # If it failed, the variable was not from the command line. Ignore it,
22439       # but warn the user (except for BASH, which is always set by the calling BASH).
22440       if test "xSTAT" != xBASH; then
22441         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22442 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22443       fi
22444       # Try to locate tool using the code snippet
22445       for ac_prog in stat
22446 do
22447   # Extract the first word of "$ac_prog", so it can be a program name with args.
22448 set dummy $ac_prog; ac_word=$2
22449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22450 $as_echo_n "checking for $ac_word... " >&6; }
22451 if ${ac_cv_path_STAT+:} false; then :
22452   $as_echo_n "(cached) " >&6
22453 else
22454   case $STAT in
22455   [\\/]* | ?:[\\/]*)
22456   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22457   ;;
22458   *)
22459   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22460 for as_dir in $PATH
22461 do
22462   IFS=$as_save_IFS
22463   test -z "$as_dir" && as_dir=.
22464     for ac_exec_ext in '' $ac_executable_extensions; do
22465   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22466     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22468     break 2
22469   fi
22470 done
22471   done
22472 IFS=$as_save_IFS
22473 
22474   ;;
22475 esac
22476 fi
22477 STAT=$ac_cv_path_STAT
22478 if test -n "$STAT"; then
22479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22480 $as_echo "$STAT" >&6; }
22481 else
22482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22483 $as_echo "no" >&6; }
22484 fi
22485 
22486 
22487   test -n "$STAT" && break
22488 done
22489 
22490     else
22491       # If it succeeded, then it was overridden by the user. We will use it
22492       # for the tool.
22493 
22494       # First remove it from the list of overridden variables, so we can test
22495       # for unknown variables in the end.
22496       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22497 
22498       # Check if we try to supply an empty value
22499       if test "x$STAT" = x; then
22500         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22501 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22502         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22503 $as_echo_n "checking for STAT... " >&6; }
22504         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22505 $as_echo "disabled" >&6; }
22506       else
22507         # Check if the provided tool contains a complete path.
22508         tool_specified="$STAT"
22509         tool_basename="${tool_specified##*/}"
22510         if test "x$tool_basename" = "x$tool_specified"; then
22511           # A command without a complete path is provided, search $PATH.
22512           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22513 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22514           # Extract the first word of "$tool_basename", so it can be a program name with args.
22515 set dummy $tool_basename; ac_word=$2
22516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22517 $as_echo_n "checking for $ac_word... " >&6; }
22518 if ${ac_cv_path_STAT+:} false; then :
22519   $as_echo_n "(cached) " >&6
22520 else
22521   case $STAT in
22522   [\\/]* | ?:[\\/]*)
22523   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22524   ;;
22525   *)
22526   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22527 for as_dir in $PATH
22528 do
22529   IFS=$as_save_IFS
22530   test -z "$as_dir" && as_dir=.
22531     for ac_exec_ext in '' $ac_executable_extensions; do
22532   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22533     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22534     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22535     break 2
22536   fi
22537 done
22538   done
22539 IFS=$as_save_IFS
22540 
22541   ;;
22542 esac
22543 fi
22544 STAT=$ac_cv_path_STAT
22545 if test -n "$STAT"; then
22546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22547 $as_echo "$STAT" >&6; }
22548 else
22549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22550 $as_echo "no" >&6; }
22551 fi
22552 
22553 
22554           if test "x$STAT" = x; then
22555             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22556           fi
22557         else
22558           # Otherwise we believe it is a complete path. Use it as it is.
22559           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22560 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22561           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22562 $as_echo_n "checking for STAT... " >&6; }
22563           if test ! -x "$tool_specified"; then
22564             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22565 $as_echo "not found" >&6; }
22566             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22567           fi
22568           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22569 $as_echo "$tool_specified" >&6; }
22570         fi
22571       fi
22572     fi
22573 
22574   fi
22575 
22576 
22577 
22578 
22579   # Publish this variable in the help.
22580 
22581 
22582   if [ -z "${TIME+x}" ]; then
22583     # The variable is not set by user, try to locate tool using the code snippet
22584     for ac_prog in time
22585 do
22586   # Extract the first word of "$ac_prog", so it can be a program name with args.
22587 set dummy $ac_prog; ac_word=$2
22588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22589 $as_echo_n "checking for $ac_word... " >&6; }
22590 if ${ac_cv_path_TIME+:} false; then :
22591   $as_echo_n "(cached) " >&6
22592 else
22593   case $TIME in
22594   [\\/]* | ?:[\\/]*)
22595   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22596   ;;
22597   *)
22598   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22599 for as_dir in $PATH
22600 do
22601   IFS=$as_save_IFS
22602   test -z "$as_dir" && as_dir=.
22603     for ac_exec_ext in '' $ac_executable_extensions; do
22604   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22605     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22606     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22607     break 2
22608   fi
22609 done
22610   done
22611 IFS=$as_save_IFS
22612 
22613   ;;
22614 esac
22615 fi
22616 TIME=$ac_cv_path_TIME
22617 if test -n "$TIME"; then
22618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22619 $as_echo "$TIME" >&6; }
22620 else
22621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22622 $as_echo "no" >&6; }
22623 fi
22624 
22625 
22626   test -n "$TIME" && break
22627 done
22628 
22629   else
22630     # The variable is set, but is it from the command line or the environment?
22631 
22632     # Try to remove the string !TIME! from our list.
22633     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22634     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22635       # If it failed, the variable was not from the command line. Ignore it,
22636       # but warn the user (except for BASH, which is always set by the calling BASH).
22637       if test "xTIME" != xBASH; then
22638         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22639 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22640       fi
22641       # Try to locate tool using the code snippet
22642       for ac_prog in time
22643 do
22644   # Extract the first word of "$ac_prog", so it can be a program name with args.
22645 set dummy $ac_prog; ac_word=$2
22646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22647 $as_echo_n "checking for $ac_word... " >&6; }
22648 if ${ac_cv_path_TIME+:} false; then :
22649   $as_echo_n "(cached) " >&6
22650 else
22651   case $TIME in
22652   [\\/]* | ?:[\\/]*)
22653   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22654   ;;
22655   *)
22656   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22657 for as_dir in $PATH
22658 do
22659   IFS=$as_save_IFS
22660   test -z "$as_dir" && as_dir=.
22661     for ac_exec_ext in '' $ac_executable_extensions; do
22662   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22663     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22664     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22665     break 2
22666   fi
22667 done
22668   done
22669 IFS=$as_save_IFS
22670 
22671   ;;
22672 esac
22673 fi
22674 TIME=$ac_cv_path_TIME
22675 if test -n "$TIME"; then
22676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22677 $as_echo "$TIME" >&6; }
22678 else
22679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22680 $as_echo "no" >&6; }
22681 fi
22682 
22683 
22684   test -n "$TIME" && break
22685 done
22686 
22687     else
22688       # If it succeeded, then it was overridden by the user. We will use it
22689       # for the tool.
22690 
22691       # First remove it from the list of overridden variables, so we can test
22692       # for unknown variables in the end.
22693       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22694 
22695       # Check if we try to supply an empty value
22696       if test "x$TIME" = x; then
22697         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22698 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22699         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22700 $as_echo_n "checking for TIME... " >&6; }
22701         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22702 $as_echo "disabled" >&6; }
22703       else
22704         # Check if the provided tool contains a complete path.
22705         tool_specified="$TIME"
22706         tool_basename="${tool_specified##*/}"
22707         if test "x$tool_basename" = "x$tool_specified"; then
22708           # A command without a complete path is provided, search $PATH.
22709           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22710 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22711           # Extract the first word of "$tool_basename", so it can be a program name with args.
22712 set dummy $tool_basename; ac_word=$2
22713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22714 $as_echo_n "checking for $ac_word... " >&6; }
22715 if ${ac_cv_path_TIME+:} false; then :
22716   $as_echo_n "(cached) " >&6
22717 else
22718   case $TIME in
22719   [\\/]* | ?:[\\/]*)
22720   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22721   ;;
22722   *)
22723   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22724 for as_dir in $PATH
22725 do
22726   IFS=$as_save_IFS
22727   test -z "$as_dir" && as_dir=.
22728     for ac_exec_ext in '' $ac_executable_extensions; do
22729   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22730     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22731     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22732     break 2
22733   fi
22734 done
22735   done
22736 IFS=$as_save_IFS
22737 
22738   ;;
22739 esac
22740 fi
22741 TIME=$ac_cv_path_TIME
22742 if test -n "$TIME"; then
22743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22744 $as_echo "$TIME" >&6; }
22745 else
22746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22747 $as_echo "no" >&6; }
22748 fi
22749 
22750 
22751           if test "x$TIME" = x; then
22752             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22753           fi
22754         else
22755           # Otherwise we believe it is a complete path. Use it as it is.
22756           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22757 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22758           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22759 $as_echo_n "checking for TIME... " >&6; }
22760           if test ! -x "$tool_specified"; then
22761             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22762 $as_echo "not found" >&6; }
22763             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22764           fi
22765           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22766 $as_echo "$tool_specified" >&6; }
22767         fi
22768       fi
22769     fi
22770 
22771   fi
22772 
22773 
22774   # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22775   # be in the user path.
22776 
22777 
22778   # Publish this variable in the help.
22779 
22780 
22781   if [ -z "${DTRACE+x}" ]; then
22782     # The variable is not set by user, try to locate tool using the code snippet
22783     for ac_prog in dtrace
22784 do
22785   # Extract the first word of "$ac_prog", so it can be a program name with args.
22786 set dummy $ac_prog; ac_word=$2
22787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22788 $as_echo_n "checking for $ac_word... " >&6; }
22789 if ${ac_cv_path_DTRACE+:} false; then :
22790   $as_echo_n "(cached) " >&6
22791 else
22792   case $DTRACE in
22793   [\\/]* | ?:[\\/]*)
22794   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22795   ;;
22796   *)
22797   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22798 as_dummy="$PATH:/usr/sbin"
22799 for as_dir in $as_dummy
22800 do
22801   IFS=$as_save_IFS
22802   test -z "$as_dir" && as_dir=.
22803     for ac_exec_ext in '' $ac_executable_extensions; do
22804   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22805     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22806     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22807     break 2
22808   fi
22809 done
22810   done
22811 IFS=$as_save_IFS
22812 
22813   ;;
22814 esac
22815 fi
22816 DTRACE=$ac_cv_path_DTRACE
22817 if test -n "$DTRACE"; then
22818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22819 $as_echo "$DTRACE" >&6; }
22820 else
22821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22822 $as_echo "no" >&6; }
22823 fi
22824 
22825 
22826   test -n "$DTRACE" && break
22827 done
22828 
22829   else
22830     # The variable is set, but is it from the command line or the environment?
22831 
22832     # Try to remove the string !DTRACE! from our list.
22833     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22834     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22835       # If it failed, the variable was not from the command line. Ignore it,
22836       # but warn the user (except for BASH, which is always set by the calling BASH).
22837       if test "xDTRACE" != xBASH; then
22838         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22839 $as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22840       fi
22841       # Try to locate tool using the code snippet
22842       for ac_prog in dtrace
22843 do
22844   # Extract the first word of "$ac_prog", so it can be a program name with args.
22845 set dummy $ac_prog; ac_word=$2
22846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22847 $as_echo_n "checking for $ac_word... " >&6; }
22848 if ${ac_cv_path_DTRACE+:} false; then :
22849   $as_echo_n "(cached) " >&6
22850 else
22851   case $DTRACE in
22852   [\\/]* | ?:[\\/]*)
22853   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22854   ;;
22855   *)
22856   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22857 as_dummy="$PATH:/usr/sbin"
22858 for as_dir in $as_dummy
22859 do
22860   IFS=$as_save_IFS
22861   test -z "$as_dir" && as_dir=.
22862     for ac_exec_ext in '' $ac_executable_extensions; do
22863   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22864     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22865     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22866     break 2
22867   fi
22868 done
22869   done
22870 IFS=$as_save_IFS
22871 
22872   ;;
22873 esac
22874 fi
22875 DTRACE=$ac_cv_path_DTRACE
22876 if test -n "$DTRACE"; then
22877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22878 $as_echo "$DTRACE" >&6; }
22879 else
22880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22881 $as_echo "no" >&6; }
22882 fi
22883 
22884 
22885   test -n "$DTRACE" && break
22886 done
22887 
22888     else
22889       # If it succeeded, then it was overridden by the user. We will use it
22890       # for the tool.
22891 
22892       # First remove it from the list of overridden variables, so we can test
22893       # for unknown variables in the end.
22894       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22895 
22896       # Check if we try to supply an empty value
22897       if test "x$DTRACE" = x; then
22898         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22899 $as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22900         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22901 $as_echo_n "checking for DTRACE... " >&6; }
22902         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22903 $as_echo "disabled" >&6; }
22904       else
22905         # Check if the provided tool contains a complete path.
22906         tool_specified="$DTRACE"
22907         tool_basename="${tool_specified##*/}"
22908         if test "x$tool_basename" = "x$tool_specified"; then
22909           # A command without a complete path is provided, search $PATH.
22910           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22911 $as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22912           # Extract the first word of "$tool_basename", so it can be a program name with args.
22913 set dummy $tool_basename; ac_word=$2
22914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22915 $as_echo_n "checking for $ac_word... " >&6; }
22916 if ${ac_cv_path_DTRACE+:} false; then :
22917   $as_echo_n "(cached) " >&6
22918 else
22919   case $DTRACE in
22920   [\\/]* | ?:[\\/]*)
22921   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22922   ;;
22923   *)
22924   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22925 for as_dir in $PATH
22926 do
22927   IFS=$as_save_IFS
22928   test -z "$as_dir" && as_dir=.
22929     for ac_exec_ext in '' $ac_executable_extensions; do
22930   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22931     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22932     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22933     break 2
22934   fi
22935 done
22936   done
22937 IFS=$as_save_IFS
22938 
22939   ;;
22940 esac
22941 fi
22942 DTRACE=$ac_cv_path_DTRACE
22943 if test -n "$DTRACE"; then
22944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22945 $as_echo "$DTRACE" >&6; }
22946 else
22947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22948 $as_echo "no" >&6; }
22949 fi
22950 
22951 
22952           if test "x$DTRACE" = x; then
22953             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22954           fi
22955         else
22956           # Otherwise we believe it is a complete path. Use it as it is.
22957           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22958 $as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22959           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22960 $as_echo_n "checking for DTRACE... " >&6; }
22961           if test ! -x "$tool_specified"; then
22962             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22963 $as_echo "not found" >&6; }
22964             as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22965           fi
22966           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22967 $as_echo "$tool_specified" >&6; }
22968         fi
22969       fi
22970     fi
22971 
22972   fi
22973 
22974 
22975 
22976 
22977   # Publish this variable in the help.
22978 
22979 
22980   if [ -z "${PATCH+x}" ]; then
22981     # The variable is not set by user, try to locate tool using the code snippet
22982     for ac_prog in gpatch patch
22983 do
22984   # Extract the first word of "$ac_prog", so it can be a program name with args.
22985 set dummy $ac_prog; ac_word=$2
22986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22987 $as_echo_n "checking for $ac_word... " >&6; }
22988 if ${ac_cv_path_PATCH+:} false; then :
22989   $as_echo_n "(cached) " >&6
22990 else
22991   case $PATCH in
22992   [\\/]* | ?:[\\/]*)
22993   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22994   ;;
22995   *)
22996   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22997 for as_dir in $PATH
22998 do
22999   IFS=$as_save_IFS
23000   test -z "$as_dir" && as_dir=.
23001     for ac_exec_ext in '' $ac_executable_extensions; do
23002   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23003     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23004     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23005     break 2
23006   fi
23007 done
23008   done
23009 IFS=$as_save_IFS
23010 
23011   ;;
23012 esac
23013 fi
23014 PATCH=$ac_cv_path_PATCH
23015 if test -n "$PATCH"; then
23016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23017 $as_echo "$PATCH" >&6; }
23018 else
23019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23020 $as_echo "no" >&6; }
23021 fi
23022 
23023 
23024   test -n "$PATCH" && break
23025 done
23026 
23027   else
23028     # The variable is set, but is it from the command line or the environment?
23029 
23030     # Try to remove the string !PATCH! from our list.
23031     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23032     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23033       # If it failed, the variable was not from the command line. Ignore it,
23034       # but warn the user (except for BASH, which is always set by the calling BASH).
23035       if test "xPATCH" != xBASH; then
23036         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23037 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23038       fi
23039       # Try to locate tool using the code snippet
23040       for ac_prog in gpatch patch
23041 do
23042   # Extract the first word of "$ac_prog", so it can be a program name with args.
23043 set dummy $ac_prog; ac_word=$2
23044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23045 $as_echo_n "checking for $ac_word... " >&6; }
23046 if ${ac_cv_path_PATCH+:} false; then :
23047   $as_echo_n "(cached) " >&6
23048 else
23049   case $PATCH in
23050   [\\/]* | ?:[\\/]*)
23051   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23052   ;;
23053   *)
23054   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23055 for as_dir in $PATH
23056 do
23057   IFS=$as_save_IFS
23058   test -z "$as_dir" && as_dir=.
23059     for ac_exec_ext in '' $ac_executable_extensions; do
23060   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23061     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23062     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23063     break 2
23064   fi
23065 done
23066   done
23067 IFS=$as_save_IFS
23068 
23069   ;;
23070 esac
23071 fi
23072 PATCH=$ac_cv_path_PATCH
23073 if test -n "$PATCH"; then
23074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23075 $as_echo "$PATCH" >&6; }
23076 else
23077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23078 $as_echo "no" >&6; }
23079 fi
23080 
23081 
23082   test -n "$PATCH" && break
23083 done
23084 
23085     else
23086       # If it succeeded, then it was overridden by the user. We will use it
23087       # for the tool.
23088 
23089       # First remove it from the list of overridden variables, so we can test
23090       # for unknown variables in the end.
23091       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23092 
23093       # Check if we try to supply an empty value
23094       if test "x$PATCH" = x; then
23095         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23096 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23097         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23098 $as_echo_n "checking for PATCH... " >&6; }
23099         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23100 $as_echo "disabled" >&6; }
23101       else
23102         # Check if the provided tool contains a complete path.
23103         tool_specified="$PATCH"
23104         tool_basename="${tool_specified##*/}"
23105         if test "x$tool_basename" = "x$tool_specified"; then
23106           # A command without a complete path is provided, search $PATH.
23107           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23108 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23109           # Extract the first word of "$tool_basename", so it can be a program name with args.
23110 set dummy $tool_basename; ac_word=$2
23111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23112 $as_echo_n "checking for $ac_word... " >&6; }
23113 if ${ac_cv_path_PATCH+:} false; then :
23114   $as_echo_n "(cached) " >&6
23115 else
23116   case $PATCH in
23117   [\\/]* | ?:[\\/]*)
23118   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23119   ;;
23120   *)
23121   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23122 for as_dir in $PATH
23123 do
23124   IFS=$as_save_IFS
23125   test -z "$as_dir" && as_dir=.
23126     for ac_exec_ext in '' $ac_executable_extensions; do
23127   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23128     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23129     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23130     break 2
23131   fi
23132 done
23133   done
23134 IFS=$as_save_IFS
23135 
23136   ;;
23137 esac
23138 fi
23139 PATCH=$ac_cv_path_PATCH
23140 if test -n "$PATCH"; then
23141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23142 $as_echo "$PATCH" >&6; }
23143 else
23144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23145 $as_echo "no" >&6; }
23146 fi
23147 
23148 
23149           if test "x$PATCH" = x; then
23150             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23151           fi
23152         else
23153           # Otherwise we believe it is a complete path. Use it as it is.
23154           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23155 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23156           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23157 $as_echo_n "checking for PATCH... " >&6; }
23158           if test ! -x "$tool_specified"; then
23159             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23160 $as_echo "not found" >&6; }
23161             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23162           fi
23163           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23164 $as_echo "$tool_specified" >&6; }
23165         fi
23166       fi
23167     fi
23168 
23169   fi
23170 
23171 
23172   # Check if it's GNU time
23173   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23174   if test "x$IS_GNU_TIME" != x; then
23175     IS_GNU_TIME=yes
23176   else
23177     IS_GNU_TIME=no
23178   fi
23179 
23180 
23181   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23182 
23183 
23184 
23185   # Publish this variable in the help.
23186 
23187 
23188   if [ -z "${DSYMUTIL+x}" ]; then
23189     # The variable is not set by user, try to locate tool using the code snippet
23190     for ac_prog in dsymutil
23191 do
23192   # Extract the first word of "$ac_prog", so it can be a program name with args.
23193 set dummy $ac_prog; ac_word=$2
23194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23195 $as_echo_n "checking for $ac_word... " >&6; }
23196 if ${ac_cv_path_DSYMUTIL+:} false; then :
23197   $as_echo_n "(cached) " >&6
23198 else
23199   case $DSYMUTIL in
23200   [\\/]* | ?:[\\/]*)
23201   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23202   ;;
23203   *)
23204   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23205 for as_dir in $PATH
23206 do
23207   IFS=$as_save_IFS
23208   test -z "$as_dir" && as_dir=.
23209     for ac_exec_ext in '' $ac_executable_extensions; do
23210   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23211     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23212     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23213     break 2
23214   fi
23215 done
23216   done
23217 IFS=$as_save_IFS
23218 
23219   ;;
23220 esac
23221 fi
23222 DSYMUTIL=$ac_cv_path_DSYMUTIL
23223 if test -n "$DSYMUTIL"; then
23224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23225 $as_echo "$DSYMUTIL" >&6; }
23226 else
23227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23228 $as_echo "no" >&6; }
23229 fi
23230 
23231 
23232   test -n "$DSYMUTIL" && break
23233 done
23234 
23235   else
23236     # The variable is set, but is it from the command line or the environment?
23237 
23238     # Try to remove the string !DSYMUTIL! from our list.
23239     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23240     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23241       # If it failed, the variable was not from the command line. Ignore it,
23242       # but warn the user (except for BASH, which is always set by the calling BASH).
23243       if test "xDSYMUTIL" != xBASH; then
23244         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23245 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23246       fi
23247       # Try to locate tool using the code snippet
23248       for ac_prog in dsymutil
23249 do
23250   # Extract the first word of "$ac_prog", so it can be a program name with args.
23251 set dummy $ac_prog; ac_word=$2
23252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23253 $as_echo_n "checking for $ac_word... " >&6; }
23254 if ${ac_cv_path_DSYMUTIL+:} false; then :
23255   $as_echo_n "(cached) " >&6
23256 else
23257   case $DSYMUTIL in
23258   [\\/]* | ?:[\\/]*)
23259   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23260   ;;
23261   *)
23262   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23263 for as_dir in $PATH
23264 do
23265   IFS=$as_save_IFS
23266   test -z "$as_dir" && as_dir=.
23267     for ac_exec_ext in '' $ac_executable_extensions; do
23268   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23269     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23270     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23271     break 2
23272   fi
23273 done
23274   done
23275 IFS=$as_save_IFS
23276 
23277   ;;
23278 esac
23279 fi
23280 DSYMUTIL=$ac_cv_path_DSYMUTIL
23281 if test -n "$DSYMUTIL"; then
23282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23283 $as_echo "$DSYMUTIL" >&6; }
23284 else
23285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23286 $as_echo "no" >&6; }
23287 fi
23288 
23289 
23290   test -n "$DSYMUTIL" && break
23291 done
23292 
23293     else
23294       # If it succeeded, then it was overridden by the user. We will use it
23295       # for the tool.
23296 
23297       # First remove it from the list of overridden variables, so we can test
23298       # for unknown variables in the end.
23299       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23300 
23301       # Check if we try to supply an empty value
23302       if test "x$DSYMUTIL" = x; then
23303         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23304 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23305         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23306 $as_echo_n "checking for DSYMUTIL... " >&6; }
23307         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23308 $as_echo "disabled" >&6; }
23309       else
23310         # Check if the provided tool contains a complete path.
23311         tool_specified="$DSYMUTIL"
23312         tool_basename="${tool_specified##*/}"
23313         if test "x$tool_basename" = "x$tool_specified"; then
23314           # A command without a complete path is provided, search $PATH.
23315           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23316 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23317           # Extract the first word of "$tool_basename", so it can be a program name with args.
23318 set dummy $tool_basename; ac_word=$2
23319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23320 $as_echo_n "checking for $ac_word... " >&6; }
23321 if ${ac_cv_path_DSYMUTIL+:} false; then :
23322   $as_echo_n "(cached) " >&6
23323 else
23324   case $DSYMUTIL in
23325   [\\/]* | ?:[\\/]*)
23326   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23327   ;;
23328   *)
23329   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23330 for as_dir in $PATH
23331 do
23332   IFS=$as_save_IFS
23333   test -z "$as_dir" && as_dir=.
23334     for ac_exec_ext in '' $ac_executable_extensions; do
23335   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23336     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23337     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23338     break 2
23339   fi
23340 done
23341   done
23342 IFS=$as_save_IFS
23343 
23344   ;;
23345 esac
23346 fi
23347 DSYMUTIL=$ac_cv_path_DSYMUTIL
23348 if test -n "$DSYMUTIL"; then
23349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23350 $as_echo "$DSYMUTIL" >&6; }
23351 else
23352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23353 $as_echo "no" >&6; }
23354 fi
23355 
23356 
23357           if test "x$DSYMUTIL" = x; then
23358             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23359           fi
23360         else
23361           # Otherwise we believe it is a complete path. Use it as it is.
23362           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23363 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23364           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23365 $as_echo_n "checking for DSYMUTIL... " >&6; }
23366           if test ! -x "$tool_specified"; then
23367             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23368 $as_echo "not found" >&6; }
23369             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23370           fi
23371           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23372 $as_echo "$tool_specified" >&6; }
23373         fi
23374       fi
23375     fi
23376 
23377   fi
23378 
23379 
23380 
23381   if test "x$DSYMUTIL" = x; then
23382     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23383   fi
23384 
23385 
23386 
23387 
23388 
23389   # Publish this variable in the help.
23390 
23391 
23392   if [ -z "${XATTR+x}" ]; then
23393     # The variable is not set by user, try to locate tool using the code snippet
23394     for ac_prog in xattr
23395 do
23396   # Extract the first word of "$ac_prog", so it can be a program name with args.
23397 set dummy $ac_prog; ac_word=$2
23398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23399 $as_echo_n "checking for $ac_word... " >&6; }
23400 if ${ac_cv_path_XATTR+:} false; then :
23401   $as_echo_n "(cached) " >&6
23402 else
23403   case $XATTR in
23404   [\\/]* | ?:[\\/]*)
23405   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23406   ;;
23407   *)
23408   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23409 for as_dir in $PATH
23410 do
23411   IFS=$as_save_IFS
23412   test -z "$as_dir" && as_dir=.
23413     for ac_exec_ext in '' $ac_executable_extensions; do
23414   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23415     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23416     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23417     break 2
23418   fi
23419 done
23420   done
23421 IFS=$as_save_IFS
23422 
23423   ;;
23424 esac
23425 fi
23426 XATTR=$ac_cv_path_XATTR
23427 if test -n "$XATTR"; then
23428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23429 $as_echo "$XATTR" >&6; }
23430 else
23431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23432 $as_echo "no" >&6; }
23433 fi
23434 
23435 
23436   test -n "$XATTR" && break
23437 done
23438 
23439   else
23440     # The variable is set, but is it from the command line or the environment?
23441 
23442     # Try to remove the string !XATTR! from our list.
23443     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23444     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23445       # If it failed, the variable was not from the command line. Ignore it,
23446       # but warn the user (except for BASH, which is always set by the calling BASH).
23447       if test "xXATTR" != xBASH; then
23448         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23449 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23450       fi
23451       # Try to locate tool using the code snippet
23452       for ac_prog in xattr
23453 do
23454   # Extract the first word of "$ac_prog", so it can be a program name with args.
23455 set dummy $ac_prog; ac_word=$2
23456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23457 $as_echo_n "checking for $ac_word... " >&6; }
23458 if ${ac_cv_path_XATTR+:} false; then :
23459   $as_echo_n "(cached) " >&6
23460 else
23461   case $XATTR in
23462   [\\/]* | ?:[\\/]*)
23463   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23464   ;;
23465   *)
23466   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23467 for as_dir in $PATH
23468 do
23469   IFS=$as_save_IFS
23470   test -z "$as_dir" && as_dir=.
23471     for ac_exec_ext in '' $ac_executable_extensions; do
23472   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23473     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23474     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23475     break 2
23476   fi
23477 done
23478   done
23479 IFS=$as_save_IFS
23480 
23481   ;;
23482 esac
23483 fi
23484 XATTR=$ac_cv_path_XATTR
23485 if test -n "$XATTR"; then
23486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23487 $as_echo "$XATTR" >&6; }
23488 else
23489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23490 $as_echo "no" >&6; }
23491 fi
23492 
23493 
23494   test -n "$XATTR" && break
23495 done
23496 
23497     else
23498       # If it succeeded, then it was overridden by the user. We will use it
23499       # for the tool.
23500 
23501       # First remove it from the list of overridden variables, so we can test
23502       # for unknown variables in the end.
23503       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23504 
23505       # Check if we try to supply an empty value
23506       if test "x$XATTR" = x; then
23507         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23508 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23509         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23510 $as_echo_n "checking for XATTR... " >&6; }
23511         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23512 $as_echo "disabled" >&6; }
23513       else
23514         # Check if the provided tool contains a complete path.
23515         tool_specified="$XATTR"
23516         tool_basename="${tool_specified##*/}"
23517         if test "x$tool_basename" = "x$tool_specified"; then
23518           # A command without a complete path is provided, search $PATH.
23519           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23520 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23521           # Extract the first word of "$tool_basename", so it can be a program name with args.
23522 set dummy $tool_basename; ac_word=$2
23523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23524 $as_echo_n "checking for $ac_word... " >&6; }
23525 if ${ac_cv_path_XATTR+:} false; then :
23526   $as_echo_n "(cached) " >&6
23527 else
23528   case $XATTR in
23529   [\\/]* | ?:[\\/]*)
23530   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23531   ;;
23532   *)
23533   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23534 for as_dir in $PATH
23535 do
23536   IFS=$as_save_IFS
23537   test -z "$as_dir" && as_dir=.
23538     for ac_exec_ext in '' $ac_executable_extensions; do
23539   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23540     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23541     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23542     break 2
23543   fi
23544 done
23545   done
23546 IFS=$as_save_IFS
23547 
23548   ;;
23549 esac
23550 fi
23551 XATTR=$ac_cv_path_XATTR
23552 if test -n "$XATTR"; then
23553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23554 $as_echo "$XATTR" >&6; }
23555 else
23556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23557 $as_echo "no" >&6; }
23558 fi
23559 
23560 
23561           if test "x$XATTR" = x; then
23562             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23563           fi
23564         else
23565           # Otherwise we believe it is a complete path. Use it as it is.
23566           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23567 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23568           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23569 $as_echo_n "checking for XATTR... " >&6; }
23570           if test ! -x "$tool_specified"; then
23571             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23572 $as_echo "not found" >&6; }
23573             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23574           fi
23575           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23576 $as_echo "$tool_specified" >&6; }
23577         fi
23578       fi
23579     fi
23580 
23581   fi
23582 
23583 
23584 
23585   if test "x$XATTR" = x; then
23586     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23587   fi
23588 
23589 
23590 
23591 
23592   # Publish this variable in the help.
23593 
23594 
23595   if [ -z "${CODESIGN+x}" ]; then
23596     # The variable is not set by user, try to locate tool using the code snippet
23597     for ac_prog in codesign
23598 do
23599   # Extract the first word of "$ac_prog", so it can be a program name with args.
23600 set dummy $ac_prog; ac_word=$2
23601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23602 $as_echo_n "checking for $ac_word... " >&6; }
23603 if ${ac_cv_path_CODESIGN+:} false; then :
23604   $as_echo_n "(cached) " >&6
23605 else
23606   case $CODESIGN in
23607   [\\/]* | ?:[\\/]*)
23608   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23609   ;;
23610   *)
23611   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23612 for as_dir in $PATH
23613 do
23614   IFS=$as_save_IFS
23615   test -z "$as_dir" && as_dir=.
23616     for ac_exec_ext in '' $ac_executable_extensions; do
23617   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23618     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23619     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23620     break 2
23621   fi
23622 done
23623   done
23624 IFS=$as_save_IFS
23625 
23626   ;;
23627 esac
23628 fi
23629 CODESIGN=$ac_cv_path_CODESIGN
23630 if test -n "$CODESIGN"; then
23631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23632 $as_echo "$CODESIGN" >&6; }
23633 else
23634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23635 $as_echo "no" >&6; }
23636 fi
23637 
23638 
23639   test -n "$CODESIGN" && break
23640 done
23641 
23642   else
23643     # The variable is set, but is it from the command line or the environment?
23644 
23645     # Try to remove the string !CODESIGN! from our list.
23646     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23647     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23648       # If it failed, the variable was not from the command line. Ignore it,
23649       # but warn the user (except for BASH, which is always set by the calling BASH).
23650       if test "xCODESIGN" != xBASH; then
23651         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23652 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23653       fi
23654       # Try to locate tool using the code snippet
23655       for ac_prog in codesign
23656 do
23657   # Extract the first word of "$ac_prog", so it can be a program name with args.
23658 set dummy $ac_prog; ac_word=$2
23659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23660 $as_echo_n "checking for $ac_word... " >&6; }
23661 if ${ac_cv_path_CODESIGN+:} false; then :
23662   $as_echo_n "(cached) " >&6
23663 else
23664   case $CODESIGN in
23665   [\\/]* | ?:[\\/]*)
23666   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23667   ;;
23668   *)
23669   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23670 for as_dir in $PATH
23671 do
23672   IFS=$as_save_IFS
23673   test -z "$as_dir" && as_dir=.
23674     for ac_exec_ext in '' $ac_executable_extensions; do
23675   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23676     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23677     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23678     break 2
23679   fi
23680 done
23681   done
23682 IFS=$as_save_IFS
23683 
23684   ;;
23685 esac
23686 fi
23687 CODESIGN=$ac_cv_path_CODESIGN
23688 if test -n "$CODESIGN"; then
23689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23690 $as_echo "$CODESIGN" >&6; }
23691 else
23692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23693 $as_echo "no" >&6; }
23694 fi
23695 
23696 
23697   test -n "$CODESIGN" && break
23698 done
23699 
23700     else
23701       # If it succeeded, then it was overridden by the user. We will use it
23702       # for the tool.
23703 
23704       # First remove it from the list of overridden variables, so we can test
23705       # for unknown variables in the end.
23706       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23707 
23708       # Check if we try to supply an empty value
23709       if test "x$CODESIGN" = x; then
23710         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23711 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23712         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23713 $as_echo_n "checking for CODESIGN... " >&6; }
23714         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23715 $as_echo "disabled" >&6; }
23716       else
23717         # Check if the provided tool contains a complete path.
23718         tool_specified="$CODESIGN"
23719         tool_basename="${tool_specified##*/}"
23720         if test "x$tool_basename" = "x$tool_specified"; then
23721           # A command without a complete path is provided, search $PATH.
23722           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23723 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23724           # Extract the first word of "$tool_basename", so it can be a program name with args.
23725 set dummy $tool_basename; ac_word=$2
23726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23727 $as_echo_n "checking for $ac_word... " >&6; }
23728 if ${ac_cv_path_CODESIGN+:} false; then :
23729   $as_echo_n "(cached) " >&6
23730 else
23731   case $CODESIGN in
23732   [\\/]* | ?:[\\/]*)
23733   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23734   ;;
23735   *)
23736   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23737 for as_dir in $PATH
23738 do
23739   IFS=$as_save_IFS
23740   test -z "$as_dir" && as_dir=.
23741     for ac_exec_ext in '' $ac_executable_extensions; do
23742   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23743     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23744     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23745     break 2
23746   fi
23747 done
23748   done
23749 IFS=$as_save_IFS
23750 
23751   ;;
23752 esac
23753 fi
23754 CODESIGN=$ac_cv_path_CODESIGN
23755 if test -n "$CODESIGN"; then
23756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23757 $as_echo "$CODESIGN" >&6; }
23758 else
23759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23760 $as_echo "no" >&6; }
23761 fi
23762 
23763 
23764           if test "x$CODESIGN" = x; then
23765             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23766           fi
23767         else
23768           # Otherwise we believe it is a complete path. Use it as it is.
23769           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23770 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23771           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23772 $as_echo_n "checking for CODESIGN... " >&6; }
23773           if test ! -x "$tool_specified"; then
23774             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23775 $as_echo "not found" >&6; }
23776             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23777           fi
23778           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23779 $as_echo "$tool_specified" >&6; }
23780         fi
23781       fi
23782     fi
23783 
23784   fi
23785 
23786 
23787     if test "x$CODESIGN" != "x"; then
23788       # Verify that the openjdk_codesign certificate is present
23789       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23790 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23791       $RM codesign-testfile
23792       $TOUCH codesign-testfile
23793       $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23794       $RM codesign-testfile
23795       if test "x$CODESIGN" = x; then
23796         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23797 $as_echo "no" >&6; }
23798       else
23799         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23800 $as_echo "yes" >&6; }
23801       fi
23802     fi
23803 
23804 
23805 
23806   # Publish this variable in the help.
23807 
23808 
23809   if [ -z "${SETFILE+x}" ]; then
23810     # The variable is not set by user, try to locate tool using the code snippet
23811     for ac_prog in SetFile
23812 do
23813   # Extract the first word of "$ac_prog", so it can be a program name with args.
23814 set dummy $ac_prog; ac_word=$2
23815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23816 $as_echo_n "checking for $ac_word... " >&6; }
23817 if ${ac_cv_path_SETFILE+:} false; then :
23818   $as_echo_n "(cached) " >&6
23819 else
23820   case $SETFILE in
23821   [\\/]* | ?:[\\/]*)
23822   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23823   ;;
23824   *)
23825   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23826 for as_dir in $PATH
23827 do
23828   IFS=$as_save_IFS
23829   test -z "$as_dir" && as_dir=.
23830     for ac_exec_ext in '' $ac_executable_extensions; do
23831   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23832     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23833     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23834     break 2
23835   fi
23836 done
23837   done
23838 IFS=$as_save_IFS
23839 
23840   ;;
23841 esac
23842 fi
23843 SETFILE=$ac_cv_path_SETFILE
23844 if test -n "$SETFILE"; then
23845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23846 $as_echo "$SETFILE" >&6; }
23847 else
23848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23849 $as_echo "no" >&6; }
23850 fi
23851 
23852 
23853   test -n "$SETFILE" && break
23854 done
23855 
23856   else
23857     # The variable is set, but is it from the command line or the environment?
23858 
23859     # Try to remove the string !SETFILE! from our list.
23860     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23861     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23862       # If it failed, the variable was not from the command line. Ignore it,
23863       # but warn the user (except for BASH, which is always set by the calling BASH).
23864       if test "xSETFILE" != xBASH; then
23865         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23866 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23867       fi
23868       # Try to locate tool using the code snippet
23869       for ac_prog in SetFile
23870 do
23871   # Extract the first word of "$ac_prog", so it can be a program name with args.
23872 set dummy $ac_prog; ac_word=$2
23873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23874 $as_echo_n "checking for $ac_word... " >&6; }
23875 if ${ac_cv_path_SETFILE+:} false; then :
23876   $as_echo_n "(cached) " >&6
23877 else
23878   case $SETFILE in
23879   [\\/]* | ?:[\\/]*)
23880   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23881   ;;
23882   *)
23883   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23884 for as_dir in $PATH
23885 do
23886   IFS=$as_save_IFS
23887   test -z "$as_dir" && as_dir=.
23888     for ac_exec_ext in '' $ac_executable_extensions; do
23889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23890     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23892     break 2
23893   fi
23894 done
23895   done
23896 IFS=$as_save_IFS
23897 
23898   ;;
23899 esac
23900 fi
23901 SETFILE=$ac_cv_path_SETFILE
23902 if test -n "$SETFILE"; then
23903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23904 $as_echo "$SETFILE" >&6; }
23905 else
23906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23907 $as_echo "no" >&6; }
23908 fi
23909 
23910 
23911   test -n "$SETFILE" && break
23912 done
23913 
23914     else
23915       # If it succeeded, then it was overridden by the user. We will use it
23916       # for the tool.
23917 
23918       # First remove it from the list of overridden variables, so we can test
23919       # for unknown variables in the end.
23920       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23921 
23922       # Check if we try to supply an empty value
23923       if test "x$SETFILE" = x; then
23924         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23925 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23926         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23927 $as_echo_n "checking for SETFILE... " >&6; }
23928         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23929 $as_echo "disabled" >&6; }
23930       else
23931         # Check if the provided tool contains a complete path.
23932         tool_specified="$SETFILE"
23933         tool_basename="${tool_specified##*/}"
23934         if test "x$tool_basename" = "x$tool_specified"; then
23935           # A command without a complete path is provided, search $PATH.
23936           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23937 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23938           # Extract the first word of "$tool_basename", so it can be a program name with args.
23939 set dummy $tool_basename; ac_word=$2
23940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23941 $as_echo_n "checking for $ac_word... " >&6; }
23942 if ${ac_cv_path_SETFILE+:} false; then :
23943   $as_echo_n "(cached) " >&6
23944 else
23945   case $SETFILE in
23946   [\\/]* | ?:[\\/]*)
23947   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23948   ;;
23949   *)
23950   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23951 for as_dir in $PATH
23952 do
23953   IFS=$as_save_IFS
23954   test -z "$as_dir" && as_dir=.
23955     for ac_exec_ext in '' $ac_executable_extensions; do
23956   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23957     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23958     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23959     break 2
23960   fi
23961 done
23962   done
23963 IFS=$as_save_IFS
23964 
23965   ;;
23966 esac
23967 fi
23968 SETFILE=$ac_cv_path_SETFILE
23969 if test -n "$SETFILE"; then
23970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23971 $as_echo "$SETFILE" >&6; }
23972 else
23973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23974 $as_echo "no" >&6; }
23975 fi
23976 
23977 
23978           if test "x$SETFILE" = x; then
23979             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23980           fi
23981         else
23982           # Otherwise we believe it is a complete path. Use it as it is.
23983           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23984 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23985           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23986 $as_echo_n "checking for SETFILE... " >&6; }
23987           if test ! -x "$tool_specified"; then
23988             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23989 $as_echo "not found" >&6; }
23990             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23991           fi
23992           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23993 $as_echo "$tool_specified" >&6; }
23994         fi
23995       fi
23996     fi
23997 
23998   fi
23999 
24000 
24001 
24002   if test "x$SETFILE" = x; then
24003     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24004   fi
24005 
24006 
24007   fi
24008 
24009 
24010   # Test if bash supports pipefail.
24011   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24012 $as_echo_n "checking if bash supports pipefail... " >&6; }
24013   if ${BASH} -c 'set -o pipefail'; then
24014     BASH_ARGS="$BASH_ARGS -o pipefail"
24015     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24016 $as_echo "yes" >&6; }
24017   else
24018     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24019 $as_echo "no" >&6; }
24020   fi
24021 
24022   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24023 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24024   if ${BASH} -e -c 'true'; then
24025     BASH_ARGS="$BASH_ARGS -e"
24026     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24027 $as_echo "yes" >&6; }
24028   else
24029     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24030 $as_echo "no" >&6; }
24031   fi
24032 
24033 
24034 
24035 
24036 # Check if pkg-config is available.
24037 
24038 
24039 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24040         if test -n "$ac_tool_prefix"; then
24041   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24042 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24044 $as_echo_n "checking for $ac_word... " >&6; }
24045 if ${ac_cv_path_PKG_CONFIG+:} false; then :
24046   $as_echo_n "(cached) " >&6
24047 else
24048   case $PKG_CONFIG in
24049   [\\/]* | ?:[\\/]*)
24050   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24051   ;;
24052   *)
24053   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24054 for as_dir in $PATH
24055 do
24056   IFS=$as_save_IFS
24057   test -z "$as_dir" && as_dir=.
24058     for ac_exec_ext in '' $ac_executable_extensions; do
24059   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24060     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24061     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24062     break 2
24063   fi
24064 done
24065   done
24066 IFS=$as_save_IFS
24067 
24068   ;;
24069 esac
24070 fi
24071 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24072 if test -n "$PKG_CONFIG"; then
24073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24074 $as_echo "$PKG_CONFIG" >&6; }
24075 else
24076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24077 $as_echo "no" >&6; }
24078 fi
24079 
24080 
24081 fi
24082 if test -z "$ac_cv_path_PKG_CONFIG"; then
24083   ac_pt_PKG_CONFIG=$PKG_CONFIG
24084   # Extract the first word of "pkg-config", so it can be a program name with args.
24085 set dummy pkg-config; ac_word=$2
24086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24087 $as_echo_n "checking for $ac_word... " >&6; }
24088 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24089   $as_echo_n "(cached) " >&6
24090 else
24091   case $ac_pt_PKG_CONFIG in
24092   [\\/]* | ?:[\\/]*)
24093   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24094   ;;
24095   *)
24096   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24097 for as_dir in $PATH
24098 do
24099   IFS=$as_save_IFS
24100   test -z "$as_dir" && as_dir=.
24101     for ac_exec_ext in '' $ac_executable_extensions; do
24102   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24103     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24104     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24105     break 2
24106   fi
24107 done
24108   done
24109 IFS=$as_save_IFS
24110 
24111   ;;
24112 esac
24113 fi
24114 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24115 if test -n "$ac_pt_PKG_CONFIG"; then
24116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24117 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
24118 else
24119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24120 $as_echo "no" >&6; }
24121 fi
24122 
24123   if test "x$ac_pt_PKG_CONFIG" = x; then
24124     PKG_CONFIG=""
24125   else
24126     case $cross_compiling:$ac_tool_warned in
24127 yes:)
24128 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24129 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24130 ac_tool_warned=yes ;;
24131 esac
24132     PKG_CONFIG=$ac_pt_PKG_CONFIG
24133   fi
24134 else
24135   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24136 fi
24137 
24138 fi
24139 if test -n "$PKG_CONFIG"; then
24140         _pkg_min_version=0.9.0
24141         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24142 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24143         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24144                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24145 $as_echo "yes" >&6; }
24146         else
24147                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24148 $as_echo "no" >&6; }
24149                 PKG_CONFIG=""
24150         fi
24151 
24152 fi
24153 
24154 # After basic tools have been setup, we can check build os specific details.
24155 
24156   ###############################################################################
24157 
24158   # Note that this is the build platform OS version!
24159 
24160   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24161   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24162   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24163   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24164 
24165 
24166 
24167 
24168 
24169 # Misc basic settings
24170 
24171 
24172 # Check whether --with-default-make-target was given.
24173 if test "${with_default_make_target+set}" = set; then :
24174   withval=$with_default_make_target;
24175 fi
24176 
24177   if test "x$with_default_make_target" = "x" \
24178       || test "x$with_default_make_target" = "xyes"; then
24179     DEFAULT_MAKE_TARGET="exploded-image"
24180   elif test "x$with_default_make_target" = "xno"; then
24181     as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24182   else
24183     DEFAULT_MAKE_TARGET="$with_default_make_target"
24184   fi
24185 
24186 
24187 
24188 
24189 ###############################################################################
24190 #
24191 # Determine OpenJDK variants, options and version numbers.
24192 #
24193 ###############################################################################
24194 
24195 # We need build & target for this.
24196 
24197   # Should we build a JDK without a graphical UI?
24198   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24199 $as_echo_n "checking headless only... " >&6; }
24200   # Check whether --enable-headless-only was given.
24201 if test "${enable_headless_only+set}" = set; then :
24202   enableval=$enable_headless_only;
24203 fi
24204 
24205 
24206   if test "x$enable_headless_only" = "xyes"; then
24207     ENABLE_HEADLESS_ONLY="true"
24208     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24209 $as_echo "yes" >&6; }
24210   elif test "x$enable_headless_only" = "xno"; then
24211     ENABLE_HEADLESS_ONLY="false"
24212     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24213 $as_echo "no" >&6; }
24214   elif test "x$enable_headless_only" = "x"; then
24215     ENABLE_HEADLESS_ONLY="false"
24216     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24217 $as_echo "no" >&6; }
24218   else
24219     as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24220   fi
24221 
24222 
24223 
24224   # Choose cacerts source file
24225 
24226 # Check whether --with-cacerts-file was given.
24227 if test "${with_cacerts_file+set}" = set; then :
24228   withval=$with_cacerts_file;
24229 fi
24230 
24231   if test "x$with_cacerts_file" != x; then
24232     CACERTS_FILE=$with_cacerts_file
24233   fi
24234 
24235 
24236   # Enable or disable unlimited crypto
24237   # Check whether --enable-unlimited-crypto was given.
24238 if test "${enable_unlimited_crypto+set}" = set; then :
24239   enableval=$enable_unlimited_crypto;
24240 else
24241   enable_unlimited_crypto=no
24242 fi
24243 
24244   if test "x$enable_unlimited_crypto" = "xyes"; then
24245     UNLIMITED_CRYPTO=true
24246   else
24247     UNLIMITED_CRYPTO=false
24248   fi
24249 
24250 
24251   # Should we build the serviceability agent (SA)?
24252   INCLUDE_SA=true
24253   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24254     INCLUDE_SA=false
24255   fi
24256   if test "x$OPENJDK_TARGET_OS" = xaix ; then
24257     INCLUDE_SA=false
24258   fi
24259 
24260 
24261   # Compress jars
24262   COMPRESS_JARS=false
24263 
24264 
24265 
24266   # Setup default copyright year. Mostly overridden when building close to a new year.
24267 
24268 # Check whether --with-copyright-year was given.
24269 if test "${with_copyright_year+set}" = set; then :
24270   withval=$with_copyright_year;
24271 fi
24272 
24273   if test "x$with_copyright_year" = xyes; then
24274     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24275   elif test "x$with_copyright_year" != x; then
24276     COPYRIGHT_YEAR="$with_copyright_year"
24277   else
24278     COPYRIGHT_YEAR=`$DATE +'%Y'`
24279   fi
24280 
24281 
24282 
24283   # Check whether --enable-keep-packaged-modules was given.
24284 if test "${enable_keep_packaged_modules+set}" = set; then :
24285   enableval=$enable_keep_packaged_modules;
24286 fi
24287 
24288 
24289   if test "x$enable_keep_packaged_modules" = "xyes"; then
24290     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24291 $as_echo_n "checking if packaged modules are kept... " >&6; }
24292     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24293 $as_echo "yes" >&6; }
24294     JLINK_KEEP_PACKAGED_MODULES=true
24295   elif test "x$enable_keep_packaged_modules" = "xno"; then
24296     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24297 $as_echo_n "checking if packaged modules are kept... " >&6; }
24298     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24299 $as_echo "no" >&6; }
24300     JLINK_KEEP_PACKAGED_MODULES=false
24301   elif test "x$enable_keep_packaged_modules" = "x"; then
24302     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24303 $as_echo "yes (default)" >&6; }
24304     JLINK_KEEP_PACKAGED_MODULES=true
24305   else
24306     as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24307   fi
24308 
24309 
24310 
24311 
24312   # Warn user that old version arguments are deprecated.
24313 
24314 
24315 # Check whether --with-milestone was given.
24316 if test "${with_milestone+set}" = set; then :
24317   withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24318 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24319 fi
24320 
24321 
24322 
24323 
24324 # Check whether --with-update-version was given.
24325 if test "${with_update_version+set}" = set; then :
24326   withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24327 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24328 fi
24329 
24330 
24331 
24332 
24333 # Check whether --with-user-release-suffix was given.
24334 if test "${with_user_release_suffix+set}" = set; then :
24335   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
24336 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24337 fi
24338 
24339 
24340 
24341 
24342 # Check whether --with-build-number was given.
24343 if test "${with_build_number+set}" = set; then :
24344   withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24345 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24346 fi
24347 
24348 
24349 
24350   # Source the version numbers file
24351   . $AUTOCONF_DIR/version-numbers
24352 
24353   # Some non-version number information is set in that file
24354 
24355 
24356 
24357 
24358 
24359 
24360 
24361 
24362 
24363   # Override version from arguments
24364 
24365   # If --with-version-string is set, process it first. It is possible to
24366   # override parts with more specific flags, since these are processed later.
24367 
24368 # Check whether --with-version-string was given.
24369 if test "${with_version_string+set}" = set; then :
24370   withval=$with_version_string;
24371 fi
24372 
24373   if test "x$with_version_string" = xyes; then
24374     as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24375   elif test "x$with_version_string" != x; then
24376     # Additional [] needed to keep m4 from mangling shell constructs.
24377     if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24378       VERSION_MAJOR=${BASH_REMATCH[1]}
24379       VERSION_MINOR=${BASH_REMATCH[3]}
24380       VERSION_SECURITY=${BASH_REMATCH[5]}
24381       VERSION_PATCH=${BASH_REMATCH[7]}
24382       VERSION_PRE=${BASH_REMATCH[9]}
24383       version_plus_separator=${BASH_REMATCH[11]}
24384       VERSION_BUILD=${BASH_REMATCH[12]}
24385       VERSION_OPT=${BASH_REMATCH[14]}
24386       # Unspecified numerical fields are interpreted as 0.
24387       if test "x$VERSION_MINOR" = x; then
24388         VERSION_MINOR=0
24389       fi
24390       if test "x$VERSION_SECURITY" = x; then
24391         VERSION_SECURITY=0
24392       fi
24393       if test "x$VERSION_PATCH" = x; then
24394         VERSION_PATCH=0
24395       fi
24396       if test "x$version_plus_separator" != x \
24397           && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24398         as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24399       fi
24400       # Stop the version part process from setting default values.
24401       # We still allow them to explicitely override though.
24402       NO_DEFAULT_VERSION_PARTS=true
24403     else
24404       as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24405     fi
24406   fi
24407 
24408 
24409 # Check whether --with-version-pre was given.
24410 if test "${with_version_pre+set}" = set; then :
24411   withval=$with_version_pre; with_version_pre_present=true
24412 else
24413   with_version_pre_present=false
24414 fi
24415 
24416 
24417   if test "x$with_version_pre_present" = xtrue; then
24418     if test "x$with_version_pre" = xyes; then
24419       as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24420     elif test "x$with_version_pre" = xno; then
24421       # Interpret --without-* as empty string instead of the literal "no"
24422       VERSION_PRE=
24423     else
24424       # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24425        VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24426       if test "x$VERSION_PRE" != "x$with_version_pre"; then
24427         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24428 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24429       fi
24430     fi
24431   else
24432     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24433       # Default is to use "internal" as pre
24434       VERSION_PRE="internal"
24435     fi
24436   fi
24437 
24438 
24439 # Check whether --with-version-opt was given.
24440 if test "${with_version_opt+set}" = set; then :
24441   withval=$with_version_opt; with_version_opt_present=true
24442 else
24443   with_version_opt_present=false
24444 fi
24445 
24446 
24447   if test "x$with_version_opt_present" = xtrue; then
24448     if test "x$with_version_opt" = xyes; then
24449       as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24450     elif test "x$with_version_opt" = xno; then
24451       # Interpret --without-* as empty string instead of the literal "no"
24452       VERSION_OPT=
24453     else
24454       # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24455        VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24456       if test "x$VERSION_OPT" != "x$with_version_opt"; then
24457         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24458 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24459       fi
24460     fi
24461   else
24462     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24463       # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24464       timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24465       # Outer [ ] to quote m4.
24466        basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24467       VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24468     fi
24469   fi
24470 
24471 
24472 # Check whether --with-version-build was given.
24473 if test "${with_version_build+set}" = set; then :
24474   withval=$with_version_build; with_version_build_present=true
24475 else
24476   with_version_build_present=false
24477 fi
24478 
24479 
24480   if test "x$with_version_build_present" = xtrue; then
24481     if test "x$with_version_build" = xyes; then
24482       as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24483     elif test "x$with_version_build" = xno; then
24484       # Interpret --without-* as empty string instead of the literal "no"
24485       VERSION_BUILD=
24486     elif test "x$with_version_build" = x; then
24487       VERSION_BUILD=
24488     else
24489 
24490   # Additional [] needed to keep m4 from mangling shell constructs.
24491   if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24492     as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24493   fi
24494   # Extract the version number without leading zeros.
24495   cleaned_value=${BASH_REMATCH[1]}
24496   if test "x$cleaned_value" = x; then
24497     # Special case for zero
24498     cleaned_value=${BASH_REMATCH[2]}
24499   fi
24500 
24501   if test $cleaned_value -gt 255; then
24502     as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24503   fi
24504   if test "x$cleaned_value" != "x$with_version_build"; then
24505     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24506 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24507   fi
24508   VERSION_BUILD=$cleaned_value
24509 
24510     fi
24511   else
24512     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24513       # Default is to not have a build number.
24514       VERSION_BUILD=""
24515       # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24516       VERSION_BUILD=0
24517     fi
24518   fi
24519 
24520 
24521 # Check whether --with-version-major was given.
24522 if test "${with_version_major+set}" = set; then :
24523   withval=$with_version_major; with_version_major_present=true
24524 else
24525   with_version_major_present=false
24526 fi
24527 
24528 
24529   if test "x$with_version_major_present" = xtrue; then
24530     if test "x$with_version_major" = xyes; then
24531       as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24532     else
24533 
24534   # Additional [] needed to keep m4 from mangling shell constructs.
24535   if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24536     as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24537   fi
24538   # Extract the version number without leading zeros.
24539   cleaned_value=${BASH_REMATCH[1]}
24540   if test "x$cleaned_value" = x; then
24541     # Special case for zero
24542     cleaned_value=${BASH_REMATCH[2]}
24543   fi
24544 
24545   if test $cleaned_value -gt 255; then
24546     as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24547   fi
24548   if test "x$cleaned_value" != "x$with_version_major"; then
24549     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24550 $as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24551   fi
24552   VERSION_MAJOR=$cleaned_value
24553 
24554     fi
24555   else
24556     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24557       # Default is to get value from version-numbers
24558       VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24559     fi
24560   fi
24561 
24562 
24563 # Check whether --with-version-minor was given.
24564 if test "${with_version_minor+set}" = set; then :
24565   withval=$with_version_minor; with_version_minor_present=true
24566 else
24567   with_version_minor_present=false
24568 fi
24569 
24570 
24571   if test "x$with_version_minor_present" = xtrue; then
24572     if test "x$with_version_minor" = xyes; then
24573       as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24574     elif test "x$with_version_minor" = xno; then
24575       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24576       VERSION_MINOR=0
24577     elif test "x$with_version_minor" = x; then
24578       VERSION_MINOR=0
24579     else
24580 
24581   # Additional [] needed to keep m4 from mangling shell constructs.
24582   if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24583     as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24584   fi
24585   # Extract the version number without leading zeros.
24586   cleaned_value=${BASH_REMATCH[1]}
24587   if test "x$cleaned_value" = x; then
24588     # Special case for zero
24589     cleaned_value=${BASH_REMATCH[2]}
24590   fi
24591 
24592   if test $cleaned_value -gt 255; then
24593     as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24594   fi
24595   if test "x$cleaned_value" != "x$with_version_minor"; then
24596     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24597 $as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24598   fi
24599   VERSION_MINOR=$cleaned_value
24600 
24601     fi
24602   else
24603     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24604       # Default is 0, if unspecified
24605       VERSION_MINOR=0
24606     fi
24607   fi
24608 
24609 
24610 # Check whether --with-version-security was given.
24611 if test "${with_version_security+set}" = set; then :
24612   withval=$with_version_security; with_version_security_present=true
24613 else
24614   with_version_security_present=false
24615 fi
24616 
24617 
24618   if test "x$with_version_security_present" = xtrue; then
24619     if test "x$with_version_security" = xyes; then
24620       as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24621     elif test "x$with_version_security" = xno; then
24622       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24623       VERSION_SECURITY=0
24624     elif test "x$with_version_security" = x; then
24625       VERSION_SECURITY=0
24626     else
24627 
24628   # Additional [] needed to keep m4 from mangling shell constructs.
24629   if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24630     as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24631   fi
24632   # Extract the version number without leading zeros.
24633   cleaned_value=${BASH_REMATCH[1]}
24634   if test "x$cleaned_value" = x; then
24635     # Special case for zero
24636     cleaned_value=${BASH_REMATCH[2]}
24637   fi
24638 
24639   if test $cleaned_value -gt 255; then
24640     as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24641   fi
24642   if test "x$cleaned_value" != "x$with_version_security"; then
24643     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24644 $as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24645   fi
24646   VERSION_SECURITY=$cleaned_value
24647 
24648     fi
24649   else
24650     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24651       # Default is 0, if unspecified
24652       VERSION_SECURITY=0
24653     fi
24654   fi
24655 
24656 
24657 # Check whether --with-version-patch was given.
24658 if test "${with_version_patch+set}" = set; then :
24659   withval=$with_version_patch; with_version_patch_present=true
24660 else
24661   with_version_patch_present=false
24662 fi
24663 
24664 
24665   if test "x$with_version_patch_present" = xtrue; then
24666     if test "x$with_version_patch" = xyes; then
24667       as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24668     elif test "x$with_version_patch" = xno; then
24669       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24670       VERSION_PATCH=0
24671     elif test "x$with_version_patch" = x; then
24672       VERSION_PATCH=0
24673     else
24674 
24675   # Additional [] needed to keep m4 from mangling shell constructs.
24676   if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24677     as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24678   fi
24679   # Extract the version number without leading zeros.
24680   cleaned_value=${BASH_REMATCH[1]}
24681   if test "x$cleaned_value" = x; then
24682     # Special case for zero
24683     cleaned_value=${BASH_REMATCH[2]}
24684   fi
24685 
24686   if test $cleaned_value -gt 255; then
24687     as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24688   fi
24689   if test "x$cleaned_value" != "x$with_version_patch"; then
24690     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24691 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24692   fi
24693   VERSION_PATCH=$cleaned_value
24694 
24695     fi
24696   else
24697     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24698       # Default is 0, if unspecified
24699       VERSION_PATCH=0
24700     fi
24701   fi
24702 
24703   # Calculate derived version properties
24704 
24705   # Set VERSION_IS_GA based on if VERSION_PRE has a value
24706   if test "x$VERSION_PRE" = x; then
24707     VERSION_IS_GA=true
24708   else
24709     VERSION_IS_GA=false
24710   fi
24711 
24712   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24713   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24714 
24715   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24716   # Strip trailing zeroes from stripped_version_number
24717   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24718   VERSION_NUMBER=$stripped_version_number
24719 
24720   # The complete version string, with additional build information
24721   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24722     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24723   else
24724     # If either build or opt is set, we need a + separator
24725     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24726   fi
24727 
24728   # The short version string, just VERSION_NUMBER and PRE, if present.
24729   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24730 
24731   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24732 $as_echo_n "checking for version string... " >&6; }
24733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24734 $as_echo "$VERSION_STRING" >&6; }
24735 
24736 
24737 
24738 
24739 
24740 
24741 
24742 
24743 
24744 
24745 
24746 
24747 
24748 
24749 
24750 ###############################################################################
24751 #
24752 # Setup BootJDK, used to bootstrap the build.
24753 #
24754 ###############################################################################
24755 
24756 
24757   BOOT_JDK_FOUND=no
24758 
24759 # Check whether --with-boot-jdk was given.
24760 if test "${with_boot_jdk+set}" = set; then :
24761   withval=$with_boot_jdk;
24762 fi
24763 
24764 
24765   # We look for the Boot JDK through various means, going from more certain to
24766   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24767   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24768   # must check if this is indeed valid; otherwise we'll continue looking.
24769 
24770   # Test: Is bootjdk explicitely set by command line arguments?
24771 
24772   if test "x$BOOT_JDK_FOUND" = xno; then
24773     # Now execute the test
24774 
24775   if test "x$with_boot_jdk" != x; then
24776     BOOT_JDK=$with_boot_jdk
24777     BOOT_JDK_FOUND=maybe
24778     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24779 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24780   fi
24781 
24782 
24783     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24784     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24785       # Do we have a bin/java?
24786       if test ! -x "$BOOT_JDK/bin/java"; then
24787         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24788 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24789         BOOT_JDK_FOUND=no
24790       else
24791         # Do we have a bin/javac?
24792         if test ! -x "$BOOT_JDK/bin/javac"; then
24793           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24794 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24795           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24796 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24797           BOOT_JDK_FOUND=no
24798         else
24799           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24800           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24801 
24802           # Extra M4 quote needed to protect [] in grep expression.
24803           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24804           if test "x$FOUND_CORRECT_VERSION" = x; then
24805             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24806 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24807             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24808 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24809             BOOT_JDK_FOUND=no
24810           else
24811             # We're done! :-)
24812             BOOT_JDK_FOUND=yes
24813 
24814   # Only process if variable expands to non-empty
24815 
24816   if test "x$BOOT_JDK" != x; then
24817     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24818 
24819   # Input might be given as Windows format, start by converting to
24820   # unix format.
24821   path="$BOOT_JDK"
24822   new_path=`$CYGPATH -u "$path"`
24823 
24824   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24825   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24826   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24827   # "foo.exe" is OK but "foo" is an error.
24828   #
24829   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24830   # It is also a way to make sure we got the proper file name for the real test later on.
24831   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24832   if test "x$test_shortpath" = x; then
24833     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24834 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24835     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24836   fi
24837 
24838   # Call helper function which possibly converts this using DOS-style short mode.
24839   # If so, the updated path is stored in $new_path.
24840 
24841   input_path="$new_path"
24842   # Check if we need to convert this using DOS-style short mode. If the path
24843   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24844   # take no chances and rewrite it.
24845   # Note: m4 eats our [], so we need to use [ and ] instead.
24846   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24847   if test "x$has_forbidden_chars" != x; then
24848     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24849     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24850     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24851     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24852       # Going to short mode and back again did indeed matter. Since short mode is
24853       # case insensitive, let's make it lowercase to improve readability.
24854       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24855       # Now convert it back to Unix-style (cygpath)
24856       input_path=`$CYGPATH -u "$shortmode_path"`
24857       new_path="$input_path"
24858     fi
24859   fi
24860 
24861   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24862   if test "x$test_cygdrive_prefix" = x; then
24863     # As a simple fix, exclude /usr/bin since it's not a real path.
24864     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24865       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24866       # a path prefixed by /cygdrive for fixpath to work.
24867       new_path="$CYGWIN_ROOT_PATH$input_path"
24868     fi
24869   fi
24870 
24871 
24872   if test "x$path" != "x$new_path"; then
24873     BOOT_JDK="$new_path"
24874     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24875 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24876   fi
24877 
24878     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24879 
24880   path="$BOOT_JDK"
24881   has_colon=`$ECHO $path | $GREP ^.:`
24882   new_path="$path"
24883   if test "x$has_colon" = x; then
24884     # Not in mixed or Windows style, start by that.
24885     new_path=`cmd //c echo $path`
24886   fi
24887 
24888 
24889   input_path="$new_path"
24890   # Check if we need to convert this using DOS-style short mode. If the path
24891   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24892   # take no chances and rewrite it.
24893   # Note: m4 eats our [], so we need to use [ and ] instead.
24894   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24895   if test "x$has_forbidden_chars" != x; then
24896     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24897     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24898   fi
24899 
24900 
24901   windows_path="$new_path"
24902   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24903     unix_path=`$CYGPATH -u "$windows_path"`
24904     new_path="$unix_path"
24905   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24906     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24907     new_path="$unix_path"
24908   fi
24909 
24910   if test "x$path" != "x$new_path"; then
24911     BOOT_JDK="$new_path"
24912     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24913 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24914   fi
24915 
24916   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24917   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24918 
24919     else
24920       # We're on a unix platform. Hooray! :)
24921       path="$BOOT_JDK"
24922       has_space=`$ECHO "$path" | $GREP " "`
24923       if test "x$has_space" != x; then
24924         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24925 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24926         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24927       fi
24928 
24929       # Use eval to expand a potential ~
24930       eval path="$path"
24931       if test ! -f "$path" && test ! -d "$path"; then
24932         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24933       fi
24934 
24935       if test -d "$path"; then
24936         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24937       else
24938         dir="`$DIRNAME "$path"`"
24939         base="`$BASENAME "$path"`"
24940         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24941       fi
24942     fi
24943   fi
24944 
24945             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24946 $as_echo_n "checking for Boot JDK... " >&6; }
24947             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24948 $as_echo "$BOOT_JDK" >&6; }
24949             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24950 $as_echo_n "checking Boot JDK version... " >&6; }
24951             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24952             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24953 $as_echo "$BOOT_JDK_VERSION" >&6; }
24954           fi # end check jdk version
24955         fi # end check javac
24956       fi # end check java
24957     fi # end check boot jdk found
24958   fi
24959 
24960   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24961     # Having specified an argument which is incorrect will produce an instant failure;
24962     # we should not go on looking
24963     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24964   fi
24965 
24966   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24967 
24968   if test "x$BOOT_JDK_FOUND" = xno; then
24969     # Now execute the test
24970 
24971   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24972     # First check at user selected default
24973 
24974   if test "x$BOOT_JDK_FOUND" = xno; then
24975     # Now execute the test
24976 
24977   if test -x /usr/libexec/java_home; then
24978     BOOT_JDK=`/usr/libexec/java_home `
24979     BOOT_JDK_FOUND=maybe
24980     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24981 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24982   fi
24983 
24984 
24985     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24986     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24987       # Do we have a bin/java?
24988       if test ! -x "$BOOT_JDK/bin/java"; then
24989         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24990 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24991         BOOT_JDK_FOUND=no
24992       else
24993         # Do we have a bin/javac?
24994         if test ! -x "$BOOT_JDK/bin/javac"; then
24995           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24996 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24997           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24998 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24999           BOOT_JDK_FOUND=no
25000         else
25001           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25002           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25003 
25004           # Extra M4 quote needed to protect [] in grep expression.
25005           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25006           if test "x$FOUND_CORRECT_VERSION" = x; then
25007             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25008 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25009             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25010 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25011             BOOT_JDK_FOUND=no
25012           else
25013             # We're done! :-)
25014             BOOT_JDK_FOUND=yes
25015 
25016   # Only process if variable expands to non-empty
25017 
25018   if test "x$BOOT_JDK" != x; then
25019     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25020 
25021   # Input might be given as Windows format, start by converting to
25022   # unix format.
25023   path="$BOOT_JDK"
25024   new_path=`$CYGPATH -u "$path"`
25025 
25026   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25027   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25028   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25029   # "foo.exe" is OK but "foo" is an error.
25030   #
25031   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25032   # It is also a way to make sure we got the proper file name for the real test later on.
25033   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25034   if test "x$test_shortpath" = x; then
25035     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25036 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25037     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25038   fi
25039 
25040   # Call helper function which possibly converts this using DOS-style short mode.
25041   # If so, the updated path is stored in $new_path.
25042 
25043   input_path="$new_path"
25044   # Check if we need to convert this using DOS-style short mode. If the path
25045   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25046   # take no chances and rewrite it.
25047   # Note: m4 eats our [], so we need to use [ and ] instead.
25048   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25049   if test "x$has_forbidden_chars" != x; then
25050     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25051     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25052     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25053     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25054       # Going to short mode and back again did indeed matter. Since short mode is
25055       # case insensitive, let's make it lowercase to improve readability.
25056       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25057       # Now convert it back to Unix-style (cygpath)
25058       input_path=`$CYGPATH -u "$shortmode_path"`
25059       new_path="$input_path"
25060     fi
25061   fi
25062 
25063   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25064   if test "x$test_cygdrive_prefix" = x; then
25065     # As a simple fix, exclude /usr/bin since it's not a real path.
25066     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25067       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25068       # a path prefixed by /cygdrive for fixpath to work.
25069       new_path="$CYGWIN_ROOT_PATH$input_path"
25070     fi
25071   fi
25072 
25073 
25074   if test "x$path" != "x$new_path"; then
25075     BOOT_JDK="$new_path"
25076     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25077 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25078   fi
25079 
25080     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25081 
25082   path="$BOOT_JDK"
25083   has_colon=`$ECHO $path | $GREP ^.:`
25084   new_path="$path"
25085   if test "x$has_colon" = x; then
25086     # Not in mixed or Windows style, start by that.
25087     new_path=`cmd //c echo $path`
25088   fi
25089 
25090 
25091   input_path="$new_path"
25092   # Check if we need to convert this using DOS-style short mode. If the path
25093   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25094   # take no chances and rewrite it.
25095   # Note: m4 eats our [], so we need to use [ and ] instead.
25096   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25097   if test "x$has_forbidden_chars" != x; then
25098     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25099     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25100   fi
25101 
25102 
25103   windows_path="$new_path"
25104   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25105     unix_path=`$CYGPATH -u "$windows_path"`
25106     new_path="$unix_path"
25107   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25108     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25109     new_path="$unix_path"
25110   fi
25111 
25112   if test "x$path" != "x$new_path"; then
25113     BOOT_JDK="$new_path"
25114     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25115 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25116   fi
25117 
25118   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25119   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25120 
25121     else
25122       # We're on a unix platform. Hooray! :)
25123       path="$BOOT_JDK"
25124       has_space=`$ECHO "$path" | $GREP " "`
25125       if test "x$has_space" != x; then
25126         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25127 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25128         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25129       fi
25130 
25131       # Use eval to expand a potential ~
25132       eval path="$path"
25133       if test ! -f "$path" && test ! -d "$path"; then
25134         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25135       fi
25136 
25137       if test -d "$path"; then
25138         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25139       else
25140         dir="`$DIRNAME "$path"`"
25141         base="`$BASENAME "$path"`"
25142         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25143       fi
25144     fi
25145   fi
25146 
25147             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25148 $as_echo_n "checking for Boot JDK... " >&6; }
25149             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25150 $as_echo "$BOOT_JDK" >&6; }
25151             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25152 $as_echo_n "checking Boot JDK version... " >&6; }
25153             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25154             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25155 $as_echo "$BOOT_JDK_VERSION" >&6; }
25156           fi # end check jdk version
25157         fi # end check javac
25158       fi # end check java
25159     fi # end check boot jdk found
25160   fi
25161 
25162     # If that did not work out (e.g. too old), try explicit versions instead
25163 
25164   if test "x$BOOT_JDK_FOUND" = xno; then
25165     # Now execute the test
25166 
25167   if test -x /usr/libexec/java_home; then
25168     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25169     BOOT_JDK_FOUND=maybe
25170     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25171 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25172   fi
25173 
25174 
25175     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25176     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25177       # Do we have a bin/java?
25178       if test ! -x "$BOOT_JDK/bin/java"; then
25179         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25180 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25181         BOOT_JDK_FOUND=no
25182       else
25183         # Do we have a bin/javac?
25184         if test ! -x "$BOOT_JDK/bin/javac"; then
25185           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25186 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25187           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25188 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25189           BOOT_JDK_FOUND=no
25190         else
25191           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25192           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25193 
25194           # Extra M4 quote needed to protect [] in grep expression.
25195           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25196           if test "x$FOUND_CORRECT_VERSION" = x; then
25197             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25198 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25199             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25200 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25201             BOOT_JDK_FOUND=no
25202           else
25203             # We're done! :-)
25204             BOOT_JDK_FOUND=yes
25205 
25206   # Only process if variable expands to non-empty
25207 
25208   if test "x$BOOT_JDK" != x; then
25209     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25210 
25211   # Input might be given as Windows format, start by converting to
25212   # unix format.
25213   path="$BOOT_JDK"
25214   new_path=`$CYGPATH -u "$path"`
25215 
25216   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25217   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25218   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25219   # "foo.exe" is OK but "foo" is an error.
25220   #
25221   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25222   # It is also a way to make sure we got the proper file name for the real test later on.
25223   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25224   if test "x$test_shortpath" = x; then
25225     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25226 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25227     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25228   fi
25229 
25230   # Call helper function which possibly converts this using DOS-style short mode.
25231   # If so, the updated path is stored in $new_path.
25232 
25233   input_path="$new_path"
25234   # Check if we need to convert this using DOS-style short mode. If the path
25235   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25236   # take no chances and rewrite it.
25237   # Note: m4 eats our [], so we need to use [ and ] instead.
25238   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25239   if test "x$has_forbidden_chars" != x; then
25240     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25241     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25242     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25243     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25244       # Going to short mode and back again did indeed matter. Since short mode is
25245       # case insensitive, let's make it lowercase to improve readability.
25246       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25247       # Now convert it back to Unix-style (cygpath)
25248       input_path=`$CYGPATH -u "$shortmode_path"`
25249       new_path="$input_path"
25250     fi
25251   fi
25252 
25253   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25254   if test "x$test_cygdrive_prefix" = x; then
25255     # As a simple fix, exclude /usr/bin since it's not a real path.
25256     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25257       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25258       # a path prefixed by /cygdrive for fixpath to work.
25259       new_path="$CYGWIN_ROOT_PATH$input_path"
25260     fi
25261   fi
25262 
25263 
25264   if test "x$path" != "x$new_path"; then
25265     BOOT_JDK="$new_path"
25266     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25267 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25268   fi
25269 
25270     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25271 
25272   path="$BOOT_JDK"
25273   has_colon=`$ECHO $path | $GREP ^.:`
25274   new_path="$path"
25275   if test "x$has_colon" = x; then
25276     # Not in mixed or Windows style, start by that.
25277     new_path=`cmd //c echo $path`
25278   fi
25279 
25280 
25281   input_path="$new_path"
25282   # Check if we need to convert this using DOS-style short mode. If the path
25283   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25284   # take no chances and rewrite it.
25285   # Note: m4 eats our [], so we need to use [ and ] instead.
25286   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25287   if test "x$has_forbidden_chars" != x; then
25288     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25289     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25290   fi
25291 
25292 
25293   windows_path="$new_path"
25294   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25295     unix_path=`$CYGPATH -u "$windows_path"`
25296     new_path="$unix_path"
25297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25298     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25299     new_path="$unix_path"
25300   fi
25301 
25302   if test "x$path" != "x$new_path"; then
25303     BOOT_JDK="$new_path"
25304     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25305 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25306   fi
25307 
25308   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25309   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25310 
25311     else
25312       # We're on a unix platform. Hooray! :)
25313       path="$BOOT_JDK"
25314       has_space=`$ECHO "$path" | $GREP " "`
25315       if test "x$has_space" != x; then
25316         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25317 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25318         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25319       fi
25320 
25321       # Use eval to expand a potential ~
25322       eval path="$path"
25323       if test ! -f "$path" && test ! -d "$path"; then
25324         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25325       fi
25326 
25327       if test -d "$path"; then
25328         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25329       else
25330         dir="`$DIRNAME "$path"`"
25331         base="`$BASENAME "$path"`"
25332         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25333       fi
25334     fi
25335   fi
25336 
25337             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25338 $as_echo_n "checking for Boot JDK... " >&6; }
25339             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25340 $as_echo "$BOOT_JDK" >&6; }
25341             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25342 $as_echo_n "checking Boot JDK version... " >&6; }
25343             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25344             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25345 $as_echo "$BOOT_JDK_VERSION" >&6; }
25346           fi # end check jdk version
25347         fi # end check javac
25348       fi # end check java
25349     fi # end check boot jdk found
25350   fi
25351 
25352 
25353   if test "x$BOOT_JDK_FOUND" = xno; then
25354     # Now execute the test
25355 
25356   if test -x /usr/libexec/java_home; then
25357     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25358     BOOT_JDK_FOUND=maybe
25359     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25360 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25361   fi
25362 
25363 
25364     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25365     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25366       # Do we have a bin/java?
25367       if test ! -x "$BOOT_JDK/bin/java"; then
25368         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25369 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25370         BOOT_JDK_FOUND=no
25371       else
25372         # Do we have a bin/javac?
25373         if test ! -x "$BOOT_JDK/bin/javac"; then
25374           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25375 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25376           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25377 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25378           BOOT_JDK_FOUND=no
25379         else
25380           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25381           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25382 
25383           # Extra M4 quote needed to protect [] in grep expression.
25384           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25385           if test "x$FOUND_CORRECT_VERSION" = x; then
25386             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25387 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25388             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25389 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25390             BOOT_JDK_FOUND=no
25391           else
25392             # We're done! :-)
25393             BOOT_JDK_FOUND=yes
25394 
25395   # Only process if variable expands to non-empty
25396 
25397   if test "x$BOOT_JDK" != x; then
25398     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25399 
25400   # Input might be given as Windows format, start by converting to
25401   # unix format.
25402   path="$BOOT_JDK"
25403   new_path=`$CYGPATH -u "$path"`
25404 
25405   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25406   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25407   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25408   # "foo.exe" is OK but "foo" is an error.
25409   #
25410   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25411   # It is also a way to make sure we got the proper file name for the real test later on.
25412   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25413   if test "x$test_shortpath" = x; then
25414     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25415 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25416     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25417   fi
25418 
25419   # Call helper function which possibly converts this using DOS-style short mode.
25420   # If so, the updated path is stored in $new_path.
25421 
25422   input_path="$new_path"
25423   # Check if we need to convert this using DOS-style short mode. If the path
25424   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25425   # take no chances and rewrite it.
25426   # Note: m4 eats our [], so we need to use [ and ] instead.
25427   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25428   if test "x$has_forbidden_chars" != x; then
25429     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25430     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25431     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25432     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25433       # Going to short mode and back again did indeed matter. Since short mode is
25434       # case insensitive, let's make it lowercase to improve readability.
25435       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25436       # Now convert it back to Unix-style (cygpath)
25437       input_path=`$CYGPATH -u "$shortmode_path"`
25438       new_path="$input_path"
25439     fi
25440   fi
25441 
25442   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25443   if test "x$test_cygdrive_prefix" = x; then
25444     # As a simple fix, exclude /usr/bin since it's not a real path.
25445     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25446       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25447       # a path prefixed by /cygdrive for fixpath to work.
25448       new_path="$CYGWIN_ROOT_PATH$input_path"
25449     fi
25450   fi
25451 
25452 
25453   if test "x$path" != "x$new_path"; then
25454     BOOT_JDK="$new_path"
25455     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25456 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25457   fi
25458 
25459     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25460 
25461   path="$BOOT_JDK"
25462   has_colon=`$ECHO $path | $GREP ^.:`
25463   new_path="$path"
25464   if test "x$has_colon" = x; then
25465     # Not in mixed or Windows style, start by that.
25466     new_path=`cmd //c echo $path`
25467   fi
25468 
25469 
25470   input_path="$new_path"
25471   # Check if we need to convert this using DOS-style short mode. If the path
25472   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25473   # take no chances and rewrite it.
25474   # Note: m4 eats our [], so we need to use [ and ] instead.
25475   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25476   if test "x$has_forbidden_chars" != x; then
25477     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25478     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25479   fi
25480 
25481 
25482   windows_path="$new_path"
25483   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25484     unix_path=`$CYGPATH -u "$windows_path"`
25485     new_path="$unix_path"
25486   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25487     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25488     new_path="$unix_path"
25489   fi
25490 
25491   if test "x$path" != "x$new_path"; then
25492     BOOT_JDK="$new_path"
25493     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25494 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25495   fi
25496 
25497   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25498   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25499 
25500     else
25501       # We're on a unix platform. Hooray! :)
25502       path="$BOOT_JDK"
25503       has_space=`$ECHO "$path" | $GREP " "`
25504       if test "x$has_space" != x; then
25505         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25506 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25507         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25508       fi
25509 
25510       # Use eval to expand a potential ~
25511       eval path="$path"
25512       if test ! -f "$path" && test ! -d "$path"; then
25513         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25514       fi
25515 
25516       if test -d "$path"; then
25517         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25518       else
25519         dir="`$DIRNAME "$path"`"
25520         base="`$BASENAME "$path"`"
25521         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25522       fi
25523     fi
25524   fi
25525 
25526             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25527 $as_echo_n "checking for Boot JDK... " >&6; }
25528             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25529 $as_echo "$BOOT_JDK" >&6; }
25530             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25531 $as_echo_n "checking Boot JDK version... " >&6; }
25532             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25533             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25534 $as_echo "$BOOT_JDK_VERSION" >&6; }
25535           fi # end check jdk version
25536         fi # end check javac
25537       fi # end check java
25538     fi # end check boot jdk found
25539   fi
25540 
25541 
25542   if test "x$BOOT_JDK_FOUND" = xno; then
25543     # Now execute the test
25544 
25545   if test -x /usr/libexec/java_home; then
25546     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25547     BOOT_JDK_FOUND=maybe
25548     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25549 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25550   fi
25551 
25552 
25553     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25554     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25555       # Do we have a bin/java?
25556       if test ! -x "$BOOT_JDK/bin/java"; then
25557         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25558 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25559         BOOT_JDK_FOUND=no
25560       else
25561         # Do we have a bin/javac?
25562         if test ! -x "$BOOT_JDK/bin/javac"; then
25563           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25564 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25565           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25566 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25567           BOOT_JDK_FOUND=no
25568         else
25569           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25570           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25571 
25572           # Extra M4 quote needed to protect [] in grep expression.
25573           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25574           if test "x$FOUND_CORRECT_VERSION" = x; then
25575             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25576 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25577             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25578 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25579             BOOT_JDK_FOUND=no
25580           else
25581             # We're done! :-)
25582             BOOT_JDK_FOUND=yes
25583 
25584   # Only process if variable expands to non-empty
25585 
25586   if test "x$BOOT_JDK" != x; then
25587     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25588 
25589   # Input might be given as Windows format, start by converting to
25590   # unix format.
25591   path="$BOOT_JDK"
25592   new_path=`$CYGPATH -u "$path"`
25593 
25594   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25595   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25596   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25597   # "foo.exe" is OK but "foo" is an error.
25598   #
25599   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25600   # It is also a way to make sure we got the proper file name for the real test later on.
25601   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25602   if test "x$test_shortpath" = x; then
25603     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25604 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25605     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25606   fi
25607 
25608   # Call helper function which possibly converts this using DOS-style short mode.
25609   # If so, the updated path is stored in $new_path.
25610 
25611   input_path="$new_path"
25612   # Check if we need to convert this using DOS-style short mode. If the path
25613   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25614   # take no chances and rewrite it.
25615   # Note: m4 eats our [], so we need to use [ and ] instead.
25616   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25617   if test "x$has_forbidden_chars" != x; then
25618     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25619     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25620     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25621     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25622       # Going to short mode and back again did indeed matter. Since short mode is
25623       # case insensitive, let's make it lowercase to improve readability.
25624       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25625       # Now convert it back to Unix-style (cygpath)
25626       input_path=`$CYGPATH -u "$shortmode_path"`
25627       new_path="$input_path"
25628     fi
25629   fi
25630 
25631   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25632   if test "x$test_cygdrive_prefix" = x; then
25633     # As a simple fix, exclude /usr/bin since it's not a real path.
25634     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25635       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25636       # a path prefixed by /cygdrive for fixpath to work.
25637       new_path="$CYGWIN_ROOT_PATH$input_path"
25638     fi
25639   fi
25640 
25641 
25642   if test "x$path" != "x$new_path"; then
25643     BOOT_JDK="$new_path"
25644     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25645 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25646   fi
25647 
25648     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25649 
25650   path="$BOOT_JDK"
25651   has_colon=`$ECHO $path | $GREP ^.:`
25652   new_path="$path"
25653   if test "x$has_colon" = x; then
25654     # Not in mixed or Windows style, start by that.
25655     new_path=`cmd //c echo $path`
25656   fi
25657 
25658 
25659   input_path="$new_path"
25660   # Check if we need to convert this using DOS-style short mode. If the path
25661   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25662   # take no chances and rewrite it.
25663   # Note: m4 eats our [], so we need to use [ and ] instead.
25664   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25665   if test "x$has_forbidden_chars" != x; then
25666     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25667     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25668   fi
25669 
25670 
25671   windows_path="$new_path"
25672   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25673     unix_path=`$CYGPATH -u "$windows_path"`
25674     new_path="$unix_path"
25675   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25676     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25677     new_path="$unix_path"
25678   fi
25679 
25680   if test "x$path" != "x$new_path"; then
25681     BOOT_JDK="$new_path"
25682     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25683 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25684   fi
25685 
25686   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25687   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25688 
25689     else
25690       # We're on a unix platform. Hooray! :)
25691       path="$BOOT_JDK"
25692       has_space=`$ECHO "$path" | $GREP " "`
25693       if test "x$has_space" != x; then
25694         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25695 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25696         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25697       fi
25698 
25699       # Use eval to expand a potential ~
25700       eval path="$path"
25701       if test ! -f "$path" && test ! -d "$path"; then
25702         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25703       fi
25704 
25705       if test -d "$path"; then
25706         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25707       else
25708         dir="`$DIRNAME "$path"`"
25709         base="`$BASENAME "$path"`"
25710         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25711       fi
25712     fi
25713   fi
25714 
25715             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25716 $as_echo_n "checking for Boot JDK... " >&6; }
25717             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25718 $as_echo "$BOOT_JDK" >&6; }
25719             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25720 $as_echo_n "checking Boot JDK version... " >&6; }
25721             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25722             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25723 $as_echo "$BOOT_JDK_VERSION" >&6; }
25724           fi # end check jdk version
25725         fi # end check javac
25726       fi # end check java
25727     fi # end check boot jdk found
25728   fi
25729 
25730   fi
25731 
25732 
25733     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25734     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25735       # Do we have a bin/java?
25736       if test ! -x "$BOOT_JDK/bin/java"; then
25737         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25738 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25739         BOOT_JDK_FOUND=no
25740       else
25741         # Do we have a bin/javac?
25742         if test ! -x "$BOOT_JDK/bin/javac"; then
25743           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25744 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25745           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25746 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25747           BOOT_JDK_FOUND=no
25748         else
25749           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25750           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25751 
25752           # Extra M4 quote needed to protect [] in grep expression.
25753           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25754           if test "x$FOUND_CORRECT_VERSION" = x; then
25755             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25756 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25757             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25758 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25759             BOOT_JDK_FOUND=no
25760           else
25761             # We're done! :-)
25762             BOOT_JDK_FOUND=yes
25763 
25764   # Only process if variable expands to non-empty
25765 
25766   if test "x$BOOT_JDK" != x; then
25767     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25768 
25769   # Input might be given as Windows format, start by converting to
25770   # unix format.
25771   path="$BOOT_JDK"
25772   new_path=`$CYGPATH -u "$path"`
25773 
25774   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25775   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25776   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25777   # "foo.exe" is OK but "foo" is an error.
25778   #
25779   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25780   # It is also a way to make sure we got the proper file name for the real test later on.
25781   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25782   if test "x$test_shortpath" = x; then
25783     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25784 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25785     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25786   fi
25787 
25788   # Call helper function which possibly converts this using DOS-style short mode.
25789   # If so, the updated path is stored in $new_path.
25790 
25791   input_path="$new_path"
25792   # Check if we need to convert this using DOS-style short mode. If the path
25793   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25794   # take no chances and rewrite it.
25795   # Note: m4 eats our [], so we need to use [ and ] instead.
25796   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25797   if test "x$has_forbidden_chars" != x; then
25798     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25799     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25800     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25801     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25802       # Going to short mode and back again did indeed matter. Since short mode is
25803       # case insensitive, let's make it lowercase to improve readability.
25804       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25805       # Now convert it back to Unix-style (cygpath)
25806       input_path=`$CYGPATH -u "$shortmode_path"`
25807       new_path="$input_path"
25808     fi
25809   fi
25810 
25811   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25812   if test "x$test_cygdrive_prefix" = x; then
25813     # As a simple fix, exclude /usr/bin since it's not a real path.
25814     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25815       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25816       # a path prefixed by /cygdrive for fixpath to work.
25817       new_path="$CYGWIN_ROOT_PATH$input_path"
25818     fi
25819   fi
25820 
25821 
25822   if test "x$path" != "x$new_path"; then
25823     BOOT_JDK="$new_path"
25824     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25825 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25826   fi
25827 
25828     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25829 
25830   path="$BOOT_JDK"
25831   has_colon=`$ECHO $path | $GREP ^.:`
25832   new_path="$path"
25833   if test "x$has_colon" = x; then
25834     # Not in mixed or Windows style, start by that.
25835     new_path=`cmd //c echo $path`
25836   fi
25837 
25838 
25839   input_path="$new_path"
25840   # Check if we need to convert this using DOS-style short mode. If the path
25841   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25842   # take no chances and rewrite it.
25843   # Note: m4 eats our [], so we need to use [ and ] instead.
25844   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25845   if test "x$has_forbidden_chars" != x; then
25846     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25847     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25848   fi
25849 
25850 
25851   windows_path="$new_path"
25852   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25853     unix_path=`$CYGPATH -u "$windows_path"`
25854     new_path="$unix_path"
25855   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25856     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25857     new_path="$unix_path"
25858   fi
25859 
25860   if test "x$path" != "x$new_path"; then
25861     BOOT_JDK="$new_path"
25862     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25863 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25864   fi
25865 
25866   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25867   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25868 
25869     else
25870       # We're on a unix platform. Hooray! :)
25871       path="$BOOT_JDK"
25872       has_space=`$ECHO "$path" | $GREP " "`
25873       if test "x$has_space" != x; then
25874         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25875 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25876         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25877       fi
25878 
25879       # Use eval to expand a potential ~
25880       eval path="$path"
25881       if test ! -f "$path" && test ! -d "$path"; then
25882         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25883       fi
25884 
25885       if test -d "$path"; then
25886         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25887       else
25888         dir="`$DIRNAME "$path"`"
25889         base="`$BASENAME "$path"`"
25890         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25891       fi
25892     fi
25893   fi
25894 
25895             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25896 $as_echo_n "checking for Boot JDK... " >&6; }
25897             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25898 $as_echo "$BOOT_JDK" >&6; }
25899             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25900 $as_echo_n "checking Boot JDK version... " >&6; }
25901             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25902             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25903 $as_echo "$BOOT_JDK_VERSION" >&6; }
25904           fi # end check jdk version
25905         fi # end check javac
25906       fi # end check java
25907     fi # end check boot jdk found
25908   fi
25909 
25910 
25911   # Test: Is $JAVA_HOME set?
25912 
25913   if test "x$BOOT_JDK_FOUND" = xno; then
25914     # Now execute the test
25915 
25916   if test "x$JAVA_HOME" != x; then
25917     JAVA_HOME_PROCESSED="$JAVA_HOME"
25918 
25919   # Only process if variable expands to non-empty
25920 
25921   if test "x$JAVA_HOME_PROCESSED" != x; then
25922     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25923 
25924   # Input might be given as Windows format, start by converting to
25925   # unix format.
25926   path="$JAVA_HOME_PROCESSED"
25927   new_path=`$CYGPATH -u "$path"`
25928 
25929   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25930   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25931   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25932   # "foo.exe" is OK but "foo" is an error.
25933   #
25934   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25935   # It is also a way to make sure we got the proper file name for the real test later on.
25936   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25937   if test "x$test_shortpath" = x; then
25938     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25939 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25940     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25941   fi
25942 
25943   # Call helper function which possibly converts this using DOS-style short mode.
25944   # If so, the updated path is stored in $new_path.
25945 
25946   input_path="$new_path"
25947   # Check if we need to convert this using DOS-style short mode. If the path
25948   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25949   # take no chances and rewrite it.
25950   # Note: m4 eats our [], so we need to use [ and ] instead.
25951   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25952   if test "x$has_forbidden_chars" != x; then
25953     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25954     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25955     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25956     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25957       # Going to short mode and back again did indeed matter. Since short mode is
25958       # case insensitive, let's make it lowercase to improve readability.
25959       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25960       # Now convert it back to Unix-style (cygpath)
25961       input_path=`$CYGPATH -u "$shortmode_path"`
25962       new_path="$input_path"
25963     fi
25964   fi
25965 
25966   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25967   if test "x$test_cygdrive_prefix" = x; then
25968     # As a simple fix, exclude /usr/bin since it's not a real path.
25969     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25970       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25971       # a path prefixed by /cygdrive for fixpath to work.
25972       new_path="$CYGWIN_ROOT_PATH$input_path"
25973     fi
25974   fi
25975 
25976 
25977   if test "x$path" != "x$new_path"; then
25978     JAVA_HOME_PROCESSED="$new_path"
25979     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25980 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25981   fi
25982 
25983     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25984 
25985   path="$JAVA_HOME_PROCESSED"
25986   has_colon=`$ECHO $path | $GREP ^.:`
25987   new_path="$path"
25988   if test "x$has_colon" = x; then
25989     # Not in mixed or Windows style, start by that.
25990     new_path=`cmd //c echo $path`
25991   fi
25992 
25993 
25994   input_path="$new_path"
25995   # Check if we need to convert this using DOS-style short mode. If the path
25996   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25997   # take no chances and rewrite it.
25998   # Note: m4 eats our [], so we need to use [ and ] instead.
25999   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26000   if test "x$has_forbidden_chars" != x; then
26001     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26002     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26003   fi
26004 
26005 
26006   windows_path="$new_path"
26007   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26008     unix_path=`$CYGPATH -u "$windows_path"`
26009     new_path="$unix_path"
26010   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26011     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26012     new_path="$unix_path"
26013   fi
26014 
26015   if test "x$path" != "x$new_path"; then
26016     JAVA_HOME_PROCESSED="$new_path"
26017     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26018 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26019   fi
26020 
26021   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26022   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26023 
26024     else
26025       # We're on a unix platform. Hooray! :)
26026       path="$JAVA_HOME_PROCESSED"
26027       has_space=`$ECHO "$path" | $GREP " "`
26028       if test "x$has_space" != x; then
26029         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26030 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26031         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26032       fi
26033 
26034       # Use eval to expand a potential ~
26035       eval path="$path"
26036       if test ! -f "$path" && test ! -d "$path"; then
26037         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26038       fi
26039 
26040       if test -d "$path"; then
26041         JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26042       else
26043         dir="`$DIRNAME "$path"`"
26044         base="`$BASENAME "$path"`"
26045         JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26046       fi
26047     fi
26048   fi
26049 
26050     if test ! -d "$JAVA_HOME_PROCESSED"; then
26051       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26052 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26053     else
26054       # Aha, the user has set a JAVA_HOME
26055       # let us use that as the Boot JDK.
26056       BOOT_JDK="$JAVA_HOME_PROCESSED"
26057       BOOT_JDK_FOUND=maybe
26058       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26059 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26060     fi
26061   fi
26062 
26063 
26064     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26065     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26066       # Do we have a bin/java?
26067       if test ! -x "$BOOT_JDK/bin/java"; then
26068         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26069 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26070         BOOT_JDK_FOUND=no
26071       else
26072         # Do we have a bin/javac?
26073         if test ! -x "$BOOT_JDK/bin/javac"; then
26074           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26075 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26076           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26077 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26078           BOOT_JDK_FOUND=no
26079         else
26080           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26081           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26082 
26083           # Extra M4 quote needed to protect [] in grep expression.
26084           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26085           if test "x$FOUND_CORRECT_VERSION" = x; then
26086             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26087 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26088             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26089 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26090             BOOT_JDK_FOUND=no
26091           else
26092             # We're done! :-)
26093             BOOT_JDK_FOUND=yes
26094 
26095   # Only process if variable expands to non-empty
26096 
26097   if test "x$BOOT_JDK" != x; then
26098     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26099 
26100   # Input might be given as Windows format, start by converting to
26101   # unix format.
26102   path="$BOOT_JDK"
26103   new_path=`$CYGPATH -u "$path"`
26104 
26105   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26106   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26107   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26108   # "foo.exe" is OK but "foo" is an error.
26109   #
26110   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26111   # It is also a way to make sure we got the proper file name for the real test later on.
26112   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26113   if test "x$test_shortpath" = x; then
26114     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26115 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26116     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26117   fi
26118 
26119   # Call helper function which possibly converts this using DOS-style short mode.
26120   # If so, the updated path is stored in $new_path.
26121 
26122   input_path="$new_path"
26123   # Check if we need to convert this using DOS-style short mode. If the path
26124   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26125   # take no chances and rewrite it.
26126   # Note: m4 eats our [], so we need to use [ and ] instead.
26127   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26128   if test "x$has_forbidden_chars" != x; then
26129     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26130     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26131     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26132     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26133       # Going to short mode and back again did indeed matter. Since short mode is
26134       # case insensitive, let's make it lowercase to improve readability.
26135       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26136       # Now convert it back to Unix-style (cygpath)
26137       input_path=`$CYGPATH -u "$shortmode_path"`
26138       new_path="$input_path"
26139     fi
26140   fi
26141 
26142   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26143   if test "x$test_cygdrive_prefix" = x; then
26144     # As a simple fix, exclude /usr/bin since it's not a real path.
26145     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26146       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26147       # a path prefixed by /cygdrive for fixpath to work.
26148       new_path="$CYGWIN_ROOT_PATH$input_path"
26149     fi
26150   fi
26151 
26152 
26153   if test "x$path" != "x$new_path"; then
26154     BOOT_JDK="$new_path"
26155     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26156 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26157   fi
26158 
26159     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26160 
26161   path="$BOOT_JDK"
26162   has_colon=`$ECHO $path | $GREP ^.:`
26163   new_path="$path"
26164   if test "x$has_colon" = x; then
26165     # Not in mixed or Windows style, start by that.
26166     new_path=`cmd //c echo $path`
26167   fi
26168 
26169 
26170   input_path="$new_path"
26171   # Check if we need to convert this using DOS-style short mode. If the path
26172   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26173   # take no chances and rewrite it.
26174   # Note: m4 eats our [], so we need to use [ and ] instead.
26175   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26176   if test "x$has_forbidden_chars" != x; then
26177     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26178     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26179   fi
26180 
26181 
26182   windows_path="$new_path"
26183   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26184     unix_path=`$CYGPATH -u "$windows_path"`
26185     new_path="$unix_path"
26186   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26187     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26188     new_path="$unix_path"
26189   fi
26190 
26191   if test "x$path" != "x$new_path"; then
26192     BOOT_JDK="$new_path"
26193     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26194 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26195   fi
26196 
26197   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26198   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26199 
26200     else
26201       # We're on a unix platform. Hooray! :)
26202       path="$BOOT_JDK"
26203       has_space=`$ECHO "$path" | $GREP " "`
26204       if test "x$has_space" != x; then
26205         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26206 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26207         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26208       fi
26209 
26210       # Use eval to expand a potential ~
26211       eval path="$path"
26212       if test ! -f "$path" && test ! -d "$path"; then
26213         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26214       fi
26215 
26216       if test -d "$path"; then
26217         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26218       else
26219         dir="`$DIRNAME "$path"`"
26220         base="`$BASENAME "$path"`"
26221         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26222       fi
26223     fi
26224   fi
26225 
26226             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26227 $as_echo_n "checking for Boot JDK... " >&6; }
26228             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26229 $as_echo "$BOOT_JDK" >&6; }
26230             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26231 $as_echo_n "checking Boot JDK version... " >&6; }
26232             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26233             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26234 $as_echo "$BOOT_JDK_VERSION" >&6; }
26235           fi # end check jdk version
26236         fi # end check javac
26237       fi # end check java
26238     fi # end check boot jdk found
26239   fi
26240 
26241 
26242   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26243 
26244   if test "x$BOOT_JDK_FOUND" = xno; then
26245     # Now execute the test
26246 
26247   # Extract the first word of "javac", so it can be a program name with args.
26248 set dummy javac; ac_word=$2
26249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26250 $as_echo_n "checking for $ac_word... " >&6; }
26251 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26252   $as_echo_n "(cached) " >&6
26253 else
26254   case $JAVAC_CHECK in
26255   [\\/]* | ?:[\\/]*)
26256   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26257   ;;
26258   *)
26259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26260 for as_dir in $PATH
26261 do
26262   IFS=$as_save_IFS
26263   test -z "$as_dir" && as_dir=.
26264     for ac_exec_ext in '' $ac_executable_extensions; do
26265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26266     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26268     break 2
26269   fi
26270 done
26271   done
26272 IFS=$as_save_IFS
26273 
26274   ;;
26275 esac
26276 fi
26277 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26278 if test -n "$JAVAC_CHECK"; then
26279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26280 $as_echo "$JAVAC_CHECK" >&6; }
26281 else
26282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26283 $as_echo "no" >&6; }
26284 fi
26285 
26286 
26287   # Extract the first word of "java", so it can be a program name with args.
26288 set dummy java; ac_word=$2
26289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26290 $as_echo_n "checking for $ac_word... " >&6; }
26291 if ${ac_cv_path_JAVA_CHECK+:} false; then :
26292   $as_echo_n "(cached) " >&6
26293 else
26294   case $JAVA_CHECK in
26295   [\\/]* | ?:[\\/]*)
26296   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26297   ;;
26298   *)
26299   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26300 for as_dir in $PATH
26301 do
26302   IFS=$as_save_IFS
26303   test -z "$as_dir" && as_dir=.
26304     for ac_exec_ext in '' $ac_executable_extensions; do
26305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26306     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26308     break 2
26309   fi
26310 done
26311   done
26312 IFS=$as_save_IFS
26313 
26314   ;;
26315 esac
26316 fi
26317 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26318 if test -n "$JAVA_CHECK"; then
26319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26320 $as_echo "$JAVA_CHECK" >&6; }
26321 else
26322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26323 $as_echo "no" >&6; }
26324 fi
26325 
26326 
26327   BINARY="$JAVAC_CHECK"
26328   if test "x$JAVAC_CHECK" = x; then
26329     BINARY="$JAVA_CHECK"
26330   fi
26331   if test "x$BINARY" != x; then
26332     # So there is a java(c) binary, it might be part of a JDK.
26333     # Lets find the JDK/JRE directory by following symbolic links.
26334     # Linux/GNU systems often have links from /usr/bin/java to
26335     # /etc/alternatives/java to the real JDK binary.
26336 
26337   if test "x$OPENJDK_BUILD_OS" != xwindows; then
26338     # Follow a chain of symbolic links. Use readlink
26339     # where it exists, else fall back to horribly
26340     # complicated shell code.
26341     if test "x$READLINK_TESTED" != yes; then
26342       # On MacOSX there is a readlink tool with a different
26343       # purpose than the GNU readlink tool. Check the found readlink.
26344       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26345       if test "x$ISGNU" = x; then
26346         # A readlink that we do not know how to use.
26347         # Are there other non-GNU readlinks out there?
26348         READLINK_TESTED=yes
26349         READLINK=
26350       fi
26351     fi
26352 
26353     if test "x$READLINK" != x; then
26354       BINARY=`$READLINK -f $BINARY`
26355     else
26356       # Save the current directory for restoring afterwards
26357       STARTDIR=$PWD
26358       COUNTER=0
26359       sym_link_dir=`$DIRNAME $BINARY`
26360       sym_link_file=`$BASENAME $BINARY`
26361       cd $sym_link_dir
26362       # Use -P flag to resolve symlinks in directories.
26363       cd `$THEPWDCMD -P`
26364       sym_link_dir=`$THEPWDCMD -P`
26365       # Resolve file symlinks
26366       while test $COUNTER -lt 20; do
26367         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26368         if test "x$ISLINK" == x; then
26369           # This is not a symbolic link! We are done!
26370           break
26371         fi
26372         # Again resolve directory symlinks since the target of the just found
26373         # link could be in a different directory
26374         cd `$DIRNAME $ISLINK`
26375         sym_link_dir=`$THEPWDCMD -P`
26376         sym_link_file=`$BASENAME $ISLINK`
26377         let COUNTER=COUNTER+1
26378       done
26379       cd $STARTDIR
26380       BINARY=$sym_link_dir/$sym_link_file
26381     fi
26382   fi
26383 
26384     BOOT_JDK=`dirname "$BINARY"`
26385     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26386     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26387       # Looks like we found ourselves an JDK
26388       BOOT_JDK_FOUND=maybe
26389       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26390 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26391     fi
26392   fi
26393 
26394 
26395     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26396     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26397       # Do we have a bin/java?
26398       if test ! -x "$BOOT_JDK/bin/java"; then
26399         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26400 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26401         BOOT_JDK_FOUND=no
26402       else
26403         # Do we have a bin/javac?
26404         if test ! -x "$BOOT_JDK/bin/javac"; then
26405           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26406 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26407           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26408 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26409           BOOT_JDK_FOUND=no
26410         else
26411           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26412           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26413 
26414           # Extra M4 quote needed to protect [] in grep expression.
26415           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26416           if test "x$FOUND_CORRECT_VERSION" = x; then
26417             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26418 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26419             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26420 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26421             BOOT_JDK_FOUND=no
26422           else
26423             # We're done! :-)
26424             BOOT_JDK_FOUND=yes
26425 
26426   # Only process if variable expands to non-empty
26427 
26428   if test "x$BOOT_JDK" != x; then
26429     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26430 
26431   # Input might be given as Windows format, start by converting to
26432   # unix format.
26433   path="$BOOT_JDK"
26434   new_path=`$CYGPATH -u "$path"`
26435 
26436   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26437   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26438   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26439   # "foo.exe" is OK but "foo" is an error.
26440   #
26441   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26442   # It is also a way to make sure we got the proper file name for the real test later on.
26443   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26444   if test "x$test_shortpath" = x; then
26445     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26446 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26447     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26448   fi
26449 
26450   # Call helper function which possibly converts this using DOS-style short mode.
26451   # If so, the updated path is stored in $new_path.
26452 
26453   input_path="$new_path"
26454   # Check if we need to convert this using DOS-style short mode. If the path
26455   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26456   # take no chances and rewrite it.
26457   # Note: m4 eats our [], so we need to use [ and ] instead.
26458   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26459   if test "x$has_forbidden_chars" != x; then
26460     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26461     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26462     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26463     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26464       # Going to short mode and back again did indeed matter. Since short mode is
26465       # case insensitive, let's make it lowercase to improve readability.
26466       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26467       # Now convert it back to Unix-style (cygpath)
26468       input_path=`$CYGPATH -u "$shortmode_path"`
26469       new_path="$input_path"
26470     fi
26471   fi
26472 
26473   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26474   if test "x$test_cygdrive_prefix" = x; then
26475     # As a simple fix, exclude /usr/bin since it's not a real path.
26476     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26477       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26478       # a path prefixed by /cygdrive for fixpath to work.
26479       new_path="$CYGWIN_ROOT_PATH$input_path"
26480     fi
26481   fi
26482 
26483 
26484   if test "x$path" != "x$new_path"; then
26485     BOOT_JDK="$new_path"
26486     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26487 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26488   fi
26489 
26490     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26491 
26492   path="$BOOT_JDK"
26493   has_colon=`$ECHO $path | $GREP ^.:`
26494   new_path="$path"
26495   if test "x$has_colon" = x; then
26496     # Not in mixed or Windows style, start by that.
26497     new_path=`cmd //c echo $path`
26498   fi
26499 
26500 
26501   input_path="$new_path"
26502   # Check if we need to convert this using DOS-style short mode. If the path
26503   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26504   # take no chances and rewrite it.
26505   # Note: m4 eats our [], so we need to use [ and ] instead.
26506   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26507   if test "x$has_forbidden_chars" != x; then
26508     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26509     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26510   fi
26511 
26512 
26513   windows_path="$new_path"
26514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26515     unix_path=`$CYGPATH -u "$windows_path"`
26516     new_path="$unix_path"
26517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26518     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26519     new_path="$unix_path"
26520   fi
26521 
26522   if test "x$path" != "x$new_path"; then
26523     BOOT_JDK="$new_path"
26524     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26525 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26526   fi
26527 
26528   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26529   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26530 
26531     else
26532       # We're on a unix platform. Hooray! :)
26533       path="$BOOT_JDK"
26534       has_space=`$ECHO "$path" | $GREP " "`
26535       if test "x$has_space" != x; then
26536         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26537 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26538         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26539       fi
26540 
26541       # Use eval to expand a potential ~
26542       eval path="$path"
26543       if test ! -f "$path" && test ! -d "$path"; then
26544         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26545       fi
26546 
26547       if test -d "$path"; then
26548         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26549       else
26550         dir="`$DIRNAME "$path"`"
26551         base="`$BASENAME "$path"`"
26552         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26553       fi
26554     fi
26555   fi
26556 
26557             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26558 $as_echo_n "checking for Boot JDK... " >&6; }
26559             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26560 $as_echo "$BOOT_JDK" >&6; }
26561             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26562 $as_echo_n "checking Boot JDK version... " >&6; }
26563             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26564             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26565 $as_echo "$BOOT_JDK_VERSION" >&6; }
26566           fi # end check jdk version
26567         fi # end check javac
26568       fi # end check java
26569     fi # end check boot jdk found
26570   fi
26571 
26572 
26573   # Test: Is there a JDK installed in default, well-known locations?
26574 
26575   if test "x$BOOT_JDK_FOUND" = xno; then
26576     # Now execute the test
26577 
26578   if test "x$OPENJDK_TARGET_OS" = xwindows; then
26579 
26580   if test "x$BOOT_JDK_FOUND" = xno; then
26581     # Now execute the test
26582 
26583   if test "x$ProgramW6432" != x; then
26584     VIRTUAL_DIR="$ProgramW6432/Java"
26585 
26586   windows_path="$VIRTUAL_DIR"
26587   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26588     unix_path=`$CYGPATH -u "$windows_path"`
26589     VIRTUAL_DIR="$unix_path"
26590   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26591     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26592     VIRTUAL_DIR="$unix_path"
26593   fi
26594 
26595 
26596   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26597   BOOT_JDK_SUFFIX=""
26598   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26599   if test "x$ALL_JDKS_FOUND" != x; then
26600     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26601 
26602   if test "x$BOOT_JDK_FOUND" = xno; then
26603     # Now execute the test
26604 
26605         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26606         if test -d "$BOOT_JDK"; then
26607           BOOT_JDK_FOUND=maybe
26608           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26609 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26610         fi
26611 
26612 
26613     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26614     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26615       # Do we have a bin/java?
26616       if test ! -x "$BOOT_JDK/bin/java"; then
26617         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26618 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26619         BOOT_JDK_FOUND=no
26620       else
26621         # Do we have a bin/javac?
26622         if test ! -x "$BOOT_JDK/bin/javac"; then
26623           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26624 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26625           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26626 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26627           BOOT_JDK_FOUND=no
26628         else
26629           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26630           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26631 
26632           # Extra M4 quote needed to protect [] in grep expression.
26633           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26634           if test "x$FOUND_CORRECT_VERSION" = x; then
26635             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26636 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26637             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26638 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26639             BOOT_JDK_FOUND=no
26640           else
26641             # We're done! :-)
26642             BOOT_JDK_FOUND=yes
26643 
26644   # Only process if variable expands to non-empty
26645 
26646   if test "x$BOOT_JDK" != x; then
26647     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26648 
26649   # Input might be given as Windows format, start by converting to
26650   # unix format.
26651   path="$BOOT_JDK"
26652   new_path=`$CYGPATH -u "$path"`
26653 
26654   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26655   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26656   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26657   # "foo.exe" is OK but "foo" is an error.
26658   #
26659   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26660   # It is also a way to make sure we got the proper file name for the real test later on.
26661   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26662   if test "x$test_shortpath" = x; then
26663     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26664 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26665     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26666   fi
26667 
26668   # Call helper function which possibly converts this using DOS-style short mode.
26669   # If so, the updated path is stored in $new_path.
26670 
26671   input_path="$new_path"
26672   # Check if we need to convert this using DOS-style short mode. If the path
26673   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26674   # take no chances and rewrite it.
26675   # Note: m4 eats our [], so we need to use [ and ] instead.
26676   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26677   if test "x$has_forbidden_chars" != x; then
26678     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26679     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26680     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26681     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26682       # Going to short mode and back again did indeed matter. Since short mode is
26683       # case insensitive, let's make it lowercase to improve readability.
26684       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26685       # Now convert it back to Unix-style (cygpath)
26686       input_path=`$CYGPATH -u "$shortmode_path"`
26687       new_path="$input_path"
26688     fi
26689   fi
26690 
26691   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26692   if test "x$test_cygdrive_prefix" = x; then
26693     # As a simple fix, exclude /usr/bin since it's not a real path.
26694     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26695       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26696       # a path prefixed by /cygdrive for fixpath to work.
26697       new_path="$CYGWIN_ROOT_PATH$input_path"
26698     fi
26699   fi
26700 
26701 
26702   if test "x$path" != "x$new_path"; then
26703     BOOT_JDK="$new_path"
26704     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26705 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26706   fi
26707 
26708     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26709 
26710   path="$BOOT_JDK"
26711   has_colon=`$ECHO $path | $GREP ^.:`
26712   new_path="$path"
26713   if test "x$has_colon" = x; then
26714     # Not in mixed or Windows style, start by that.
26715     new_path=`cmd //c echo $path`
26716   fi
26717 
26718 
26719   input_path="$new_path"
26720   # Check if we need to convert this using DOS-style short mode. If the path
26721   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26722   # take no chances and rewrite it.
26723   # Note: m4 eats our [], so we need to use [ and ] instead.
26724   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26725   if test "x$has_forbidden_chars" != x; then
26726     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26727     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26728   fi
26729 
26730 
26731   windows_path="$new_path"
26732   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26733     unix_path=`$CYGPATH -u "$windows_path"`
26734     new_path="$unix_path"
26735   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26736     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26737     new_path="$unix_path"
26738   fi
26739 
26740   if test "x$path" != "x$new_path"; then
26741     BOOT_JDK="$new_path"
26742     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26743 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26744   fi
26745 
26746   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26747   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26748 
26749     else
26750       # We're on a unix platform. Hooray! :)
26751       path="$BOOT_JDK"
26752       has_space=`$ECHO "$path" | $GREP " "`
26753       if test "x$has_space" != x; then
26754         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26755 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26756         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26757       fi
26758 
26759       # Use eval to expand a potential ~
26760       eval path="$path"
26761       if test ! -f "$path" && test ! -d "$path"; then
26762         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26763       fi
26764 
26765       if test -d "$path"; then
26766         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26767       else
26768         dir="`$DIRNAME "$path"`"
26769         base="`$BASENAME "$path"`"
26770         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26771       fi
26772     fi
26773   fi
26774 
26775             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26776 $as_echo_n "checking for Boot JDK... " >&6; }
26777             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26778 $as_echo "$BOOT_JDK" >&6; }
26779             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26780 $as_echo_n "checking Boot JDK version... " >&6; }
26781             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26782             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26783 $as_echo "$BOOT_JDK_VERSION" >&6; }
26784           fi # end check jdk version
26785         fi # end check javac
26786       fi # end check java
26787     fi # end check boot jdk found
26788   fi
26789 
26790     done
26791   fi
26792 
26793   fi
26794 
26795 
26796     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26797     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26798       # Do we have a bin/java?
26799       if test ! -x "$BOOT_JDK/bin/java"; then
26800         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26801 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26802         BOOT_JDK_FOUND=no
26803       else
26804         # Do we have a bin/javac?
26805         if test ! -x "$BOOT_JDK/bin/javac"; then
26806           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26807 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26808           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26809 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26810           BOOT_JDK_FOUND=no
26811         else
26812           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26813           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26814 
26815           # Extra M4 quote needed to protect [] in grep expression.
26816           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26817           if test "x$FOUND_CORRECT_VERSION" = x; then
26818             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26819 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26820             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26821 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26822             BOOT_JDK_FOUND=no
26823           else
26824             # We're done! :-)
26825             BOOT_JDK_FOUND=yes
26826 
26827   # Only process if variable expands to non-empty
26828 
26829   if test "x$BOOT_JDK" != x; then
26830     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26831 
26832   # Input might be given as Windows format, start by converting to
26833   # unix format.
26834   path="$BOOT_JDK"
26835   new_path=`$CYGPATH -u "$path"`
26836 
26837   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26838   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26839   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26840   # "foo.exe" is OK but "foo" is an error.
26841   #
26842   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26843   # It is also a way to make sure we got the proper file name for the real test later on.
26844   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26845   if test "x$test_shortpath" = x; then
26846     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26847 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26848     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26849   fi
26850 
26851   # Call helper function which possibly converts this using DOS-style short mode.
26852   # If so, the updated path is stored in $new_path.
26853 
26854   input_path="$new_path"
26855   # Check if we need to convert this using DOS-style short mode. If the path
26856   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26857   # take no chances and rewrite it.
26858   # Note: m4 eats our [], so we need to use [ and ] instead.
26859   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26860   if test "x$has_forbidden_chars" != x; then
26861     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26862     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26863     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26864     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26865       # Going to short mode and back again did indeed matter. Since short mode is
26866       # case insensitive, let's make it lowercase to improve readability.
26867       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26868       # Now convert it back to Unix-style (cygpath)
26869       input_path=`$CYGPATH -u "$shortmode_path"`
26870       new_path="$input_path"
26871     fi
26872   fi
26873 
26874   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26875   if test "x$test_cygdrive_prefix" = x; then
26876     # As a simple fix, exclude /usr/bin since it's not a real path.
26877     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26878       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26879       # a path prefixed by /cygdrive for fixpath to work.
26880       new_path="$CYGWIN_ROOT_PATH$input_path"
26881     fi
26882   fi
26883 
26884 
26885   if test "x$path" != "x$new_path"; then
26886     BOOT_JDK="$new_path"
26887     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26888 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26889   fi
26890 
26891     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26892 
26893   path="$BOOT_JDK"
26894   has_colon=`$ECHO $path | $GREP ^.:`
26895   new_path="$path"
26896   if test "x$has_colon" = x; then
26897     # Not in mixed or Windows style, start by that.
26898     new_path=`cmd //c echo $path`
26899   fi
26900 
26901 
26902   input_path="$new_path"
26903   # Check if we need to convert this using DOS-style short mode. If the path
26904   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26905   # take no chances and rewrite it.
26906   # Note: m4 eats our [], so we need to use [ and ] instead.
26907   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26908   if test "x$has_forbidden_chars" != x; then
26909     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26910     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26911   fi
26912 
26913 
26914   windows_path="$new_path"
26915   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26916     unix_path=`$CYGPATH -u "$windows_path"`
26917     new_path="$unix_path"
26918   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26919     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26920     new_path="$unix_path"
26921   fi
26922 
26923   if test "x$path" != "x$new_path"; then
26924     BOOT_JDK="$new_path"
26925     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26926 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26927   fi
26928 
26929   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26930   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26931 
26932     else
26933       # We're on a unix platform. Hooray! :)
26934       path="$BOOT_JDK"
26935       has_space=`$ECHO "$path" | $GREP " "`
26936       if test "x$has_space" != x; then
26937         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26938 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26939         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26940       fi
26941 
26942       # Use eval to expand a potential ~
26943       eval path="$path"
26944       if test ! -f "$path" && test ! -d "$path"; then
26945         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26946       fi
26947 
26948       if test -d "$path"; then
26949         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26950       else
26951         dir="`$DIRNAME "$path"`"
26952         base="`$BASENAME "$path"`"
26953         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26954       fi
26955     fi
26956   fi
26957 
26958             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26959 $as_echo_n "checking for Boot JDK... " >&6; }
26960             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26961 $as_echo "$BOOT_JDK" >&6; }
26962             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26963 $as_echo_n "checking Boot JDK version... " >&6; }
26964             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26965             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26966 $as_echo "$BOOT_JDK_VERSION" >&6; }
26967           fi # end check jdk version
26968         fi # end check javac
26969       fi # end check java
26970     fi # end check boot jdk found
26971   fi
26972 
26973 
26974   if test "x$BOOT_JDK_FOUND" = xno; then
26975     # Now execute the test
26976 
26977   if test "x$PROGRAMW6432" != x; then
26978     VIRTUAL_DIR="$PROGRAMW6432/Java"
26979 
26980   windows_path="$VIRTUAL_DIR"
26981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26982     unix_path=`$CYGPATH -u "$windows_path"`
26983     VIRTUAL_DIR="$unix_path"
26984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26985     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26986     VIRTUAL_DIR="$unix_path"
26987   fi
26988 
26989 
26990   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26991   BOOT_JDK_SUFFIX=""
26992   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26993   if test "x$ALL_JDKS_FOUND" != x; then
26994     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26995 
26996   if test "x$BOOT_JDK_FOUND" = xno; then
26997     # Now execute the test
26998 
26999         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27000         if test -d "$BOOT_JDK"; then
27001           BOOT_JDK_FOUND=maybe
27002           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27003 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27004         fi
27005 
27006 
27007     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27008     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27009       # Do we have a bin/java?
27010       if test ! -x "$BOOT_JDK/bin/java"; then
27011         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27012 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27013         BOOT_JDK_FOUND=no
27014       else
27015         # Do we have a bin/javac?
27016         if test ! -x "$BOOT_JDK/bin/javac"; then
27017           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27018 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27019           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27020 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27021           BOOT_JDK_FOUND=no
27022         else
27023           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27024           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27025 
27026           # Extra M4 quote needed to protect [] in grep expression.
27027           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27028           if test "x$FOUND_CORRECT_VERSION" = x; then
27029             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27030 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27031             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27032 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27033             BOOT_JDK_FOUND=no
27034           else
27035             # We're done! :-)
27036             BOOT_JDK_FOUND=yes
27037 
27038   # Only process if variable expands to non-empty
27039 
27040   if test "x$BOOT_JDK" != x; then
27041     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27042 
27043   # Input might be given as Windows format, start by converting to
27044   # unix format.
27045   path="$BOOT_JDK"
27046   new_path=`$CYGPATH -u "$path"`
27047 
27048   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27049   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27050   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27051   # "foo.exe" is OK but "foo" is an error.
27052   #
27053   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27054   # It is also a way to make sure we got the proper file name for the real test later on.
27055   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27056   if test "x$test_shortpath" = x; then
27057     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27058 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27059     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27060   fi
27061 
27062   # Call helper function which possibly converts this using DOS-style short mode.
27063   # If so, the updated path is stored in $new_path.
27064 
27065   input_path="$new_path"
27066   # Check if we need to convert this using DOS-style short mode. If the path
27067   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27068   # take no chances and rewrite it.
27069   # Note: m4 eats our [], so we need to use [ and ] instead.
27070   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27071   if test "x$has_forbidden_chars" != x; then
27072     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27073     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27074     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27075     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27076       # Going to short mode and back again did indeed matter. Since short mode is
27077       # case insensitive, let's make it lowercase to improve readability.
27078       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27079       # Now convert it back to Unix-style (cygpath)
27080       input_path=`$CYGPATH -u "$shortmode_path"`
27081       new_path="$input_path"
27082     fi
27083   fi
27084 
27085   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27086   if test "x$test_cygdrive_prefix" = x; then
27087     # As a simple fix, exclude /usr/bin since it's not a real path.
27088     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27089       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27090       # a path prefixed by /cygdrive for fixpath to work.
27091       new_path="$CYGWIN_ROOT_PATH$input_path"
27092     fi
27093   fi
27094 
27095 
27096   if test "x$path" != "x$new_path"; then
27097     BOOT_JDK="$new_path"
27098     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27099 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27100   fi
27101 
27102     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27103 
27104   path="$BOOT_JDK"
27105   has_colon=`$ECHO $path | $GREP ^.:`
27106   new_path="$path"
27107   if test "x$has_colon" = x; then
27108     # Not in mixed or Windows style, start by that.
27109     new_path=`cmd //c echo $path`
27110   fi
27111 
27112 
27113   input_path="$new_path"
27114   # Check if we need to convert this using DOS-style short mode. If the path
27115   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27116   # take no chances and rewrite it.
27117   # Note: m4 eats our [], so we need to use [ and ] instead.
27118   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27119   if test "x$has_forbidden_chars" != x; then
27120     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27121     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27122   fi
27123 
27124 
27125   windows_path="$new_path"
27126   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27127     unix_path=`$CYGPATH -u "$windows_path"`
27128     new_path="$unix_path"
27129   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27130     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27131     new_path="$unix_path"
27132   fi
27133 
27134   if test "x$path" != "x$new_path"; then
27135     BOOT_JDK="$new_path"
27136     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27137 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27138   fi
27139 
27140   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27141   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27142 
27143     else
27144       # We're on a unix platform. Hooray! :)
27145       path="$BOOT_JDK"
27146       has_space=`$ECHO "$path" | $GREP " "`
27147       if test "x$has_space" != x; then
27148         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27149 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27150         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27151       fi
27152 
27153       # Use eval to expand a potential ~
27154       eval path="$path"
27155       if test ! -f "$path" && test ! -d "$path"; then
27156         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27157       fi
27158 
27159       if test -d "$path"; then
27160         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27161       else
27162         dir="`$DIRNAME "$path"`"
27163         base="`$BASENAME "$path"`"
27164         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27165       fi
27166     fi
27167   fi
27168 
27169             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27170 $as_echo_n "checking for Boot JDK... " >&6; }
27171             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27172 $as_echo "$BOOT_JDK" >&6; }
27173             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27174 $as_echo_n "checking Boot JDK version... " >&6; }
27175             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27176             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27177 $as_echo "$BOOT_JDK_VERSION" >&6; }
27178           fi # end check jdk version
27179         fi # end check javac
27180       fi # end check java
27181     fi # end check boot jdk found
27182   fi
27183 
27184     done
27185   fi
27186 
27187   fi
27188 
27189 
27190     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27191     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27192       # Do we have a bin/java?
27193       if test ! -x "$BOOT_JDK/bin/java"; then
27194         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27195 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27196         BOOT_JDK_FOUND=no
27197       else
27198         # Do we have a bin/javac?
27199         if test ! -x "$BOOT_JDK/bin/javac"; then
27200           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27201 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27202           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27203 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27204           BOOT_JDK_FOUND=no
27205         else
27206           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27207           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27208 
27209           # Extra M4 quote needed to protect [] in grep expression.
27210           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27211           if test "x$FOUND_CORRECT_VERSION" = x; then
27212             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27213 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27214             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27215 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27216             BOOT_JDK_FOUND=no
27217           else
27218             # We're done! :-)
27219             BOOT_JDK_FOUND=yes
27220 
27221   # Only process if variable expands to non-empty
27222 
27223   if test "x$BOOT_JDK" != x; then
27224     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27225 
27226   # Input might be given as Windows format, start by converting to
27227   # unix format.
27228   path="$BOOT_JDK"
27229   new_path=`$CYGPATH -u "$path"`
27230 
27231   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27232   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27233   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27234   # "foo.exe" is OK but "foo" is an error.
27235   #
27236   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27237   # It is also a way to make sure we got the proper file name for the real test later on.
27238   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27239   if test "x$test_shortpath" = x; then
27240     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27241 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27242     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27243   fi
27244 
27245   # Call helper function which possibly converts this using DOS-style short mode.
27246   # If so, the updated path is stored in $new_path.
27247 
27248   input_path="$new_path"
27249   # Check if we need to convert this using DOS-style short mode. If the path
27250   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27251   # take no chances and rewrite it.
27252   # Note: m4 eats our [], so we need to use [ and ] instead.
27253   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27254   if test "x$has_forbidden_chars" != x; then
27255     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27256     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27257     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27258     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27259       # Going to short mode and back again did indeed matter. Since short mode is
27260       # case insensitive, let's make it lowercase to improve readability.
27261       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27262       # Now convert it back to Unix-style (cygpath)
27263       input_path=`$CYGPATH -u "$shortmode_path"`
27264       new_path="$input_path"
27265     fi
27266   fi
27267 
27268   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27269   if test "x$test_cygdrive_prefix" = x; then
27270     # As a simple fix, exclude /usr/bin since it's not a real path.
27271     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27272       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27273       # a path prefixed by /cygdrive for fixpath to work.
27274       new_path="$CYGWIN_ROOT_PATH$input_path"
27275     fi
27276   fi
27277 
27278 
27279   if test "x$path" != "x$new_path"; then
27280     BOOT_JDK="$new_path"
27281     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27282 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27283   fi
27284 
27285     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27286 
27287   path="$BOOT_JDK"
27288   has_colon=`$ECHO $path | $GREP ^.:`
27289   new_path="$path"
27290   if test "x$has_colon" = x; then
27291     # Not in mixed or Windows style, start by that.
27292     new_path=`cmd //c echo $path`
27293   fi
27294 
27295 
27296   input_path="$new_path"
27297   # Check if we need to convert this using DOS-style short mode. If the path
27298   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27299   # take no chances and rewrite it.
27300   # Note: m4 eats our [], so we need to use [ and ] instead.
27301   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27302   if test "x$has_forbidden_chars" != x; then
27303     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27304     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27305   fi
27306 
27307 
27308   windows_path="$new_path"
27309   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27310     unix_path=`$CYGPATH -u "$windows_path"`
27311     new_path="$unix_path"
27312   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27313     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27314     new_path="$unix_path"
27315   fi
27316 
27317   if test "x$path" != "x$new_path"; then
27318     BOOT_JDK="$new_path"
27319     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27320 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27321   fi
27322 
27323   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27324   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27325 
27326     else
27327       # We're on a unix platform. Hooray! :)
27328       path="$BOOT_JDK"
27329       has_space=`$ECHO "$path" | $GREP " "`
27330       if test "x$has_space" != x; then
27331         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27332 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27333         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27334       fi
27335 
27336       # Use eval to expand a potential ~
27337       eval path="$path"
27338       if test ! -f "$path" && test ! -d "$path"; then
27339         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27340       fi
27341 
27342       if test -d "$path"; then
27343         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27344       else
27345         dir="`$DIRNAME "$path"`"
27346         base="`$BASENAME "$path"`"
27347         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27348       fi
27349     fi
27350   fi
27351 
27352             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27353 $as_echo_n "checking for Boot JDK... " >&6; }
27354             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27355 $as_echo "$BOOT_JDK" >&6; }
27356             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27357 $as_echo_n "checking Boot JDK version... " >&6; }
27358             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27359             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27360 $as_echo "$BOOT_JDK_VERSION" >&6; }
27361           fi # end check jdk version
27362         fi # end check javac
27363       fi # end check java
27364     fi # end check boot jdk found
27365   fi
27366 
27367 
27368   if test "x$BOOT_JDK_FOUND" = xno; then
27369     # Now execute the test
27370 
27371   if test "x$PROGRAMFILES" != x; then
27372     VIRTUAL_DIR="$PROGRAMFILES/Java"
27373 
27374   windows_path="$VIRTUAL_DIR"
27375   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27376     unix_path=`$CYGPATH -u "$windows_path"`
27377     VIRTUAL_DIR="$unix_path"
27378   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27379     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27380     VIRTUAL_DIR="$unix_path"
27381   fi
27382 
27383 
27384   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27385   BOOT_JDK_SUFFIX=""
27386   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27387   if test "x$ALL_JDKS_FOUND" != x; then
27388     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27389 
27390   if test "x$BOOT_JDK_FOUND" = xno; then
27391     # Now execute the test
27392 
27393         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27394         if test -d "$BOOT_JDK"; then
27395           BOOT_JDK_FOUND=maybe
27396           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27397 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27398         fi
27399 
27400 
27401     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27402     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27403       # Do we have a bin/java?
27404       if test ! -x "$BOOT_JDK/bin/java"; then
27405         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27406 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27407         BOOT_JDK_FOUND=no
27408       else
27409         # Do we have a bin/javac?
27410         if test ! -x "$BOOT_JDK/bin/javac"; then
27411           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27412 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27413           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27414 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27415           BOOT_JDK_FOUND=no
27416         else
27417           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27418           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27419 
27420           # Extra M4 quote needed to protect [] in grep expression.
27421           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27422           if test "x$FOUND_CORRECT_VERSION" = x; then
27423             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27424 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27425             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27426 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27427             BOOT_JDK_FOUND=no
27428           else
27429             # We're done! :-)
27430             BOOT_JDK_FOUND=yes
27431 
27432   # Only process if variable expands to non-empty
27433 
27434   if test "x$BOOT_JDK" != x; then
27435     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27436 
27437   # Input might be given as Windows format, start by converting to
27438   # unix format.
27439   path="$BOOT_JDK"
27440   new_path=`$CYGPATH -u "$path"`
27441 
27442   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27443   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27444   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27445   # "foo.exe" is OK but "foo" is an error.
27446   #
27447   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27448   # It is also a way to make sure we got the proper file name for the real test later on.
27449   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27450   if test "x$test_shortpath" = x; then
27451     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27452 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27453     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27454   fi
27455 
27456   # Call helper function which possibly converts this using DOS-style short mode.
27457   # If so, the updated path is stored in $new_path.
27458 
27459   input_path="$new_path"
27460   # Check if we need to convert this using DOS-style short mode. If the path
27461   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27462   # take no chances and rewrite it.
27463   # Note: m4 eats our [], so we need to use [ and ] instead.
27464   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27465   if test "x$has_forbidden_chars" != x; then
27466     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27467     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27468     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27469     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27470       # Going to short mode and back again did indeed matter. Since short mode is
27471       # case insensitive, let's make it lowercase to improve readability.
27472       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27473       # Now convert it back to Unix-style (cygpath)
27474       input_path=`$CYGPATH -u "$shortmode_path"`
27475       new_path="$input_path"
27476     fi
27477   fi
27478 
27479   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27480   if test "x$test_cygdrive_prefix" = x; then
27481     # As a simple fix, exclude /usr/bin since it's not a real path.
27482     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27483       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27484       # a path prefixed by /cygdrive for fixpath to work.
27485       new_path="$CYGWIN_ROOT_PATH$input_path"
27486     fi
27487   fi
27488 
27489 
27490   if test "x$path" != "x$new_path"; then
27491     BOOT_JDK="$new_path"
27492     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27493 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27494   fi
27495 
27496     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27497 
27498   path="$BOOT_JDK"
27499   has_colon=`$ECHO $path | $GREP ^.:`
27500   new_path="$path"
27501   if test "x$has_colon" = x; then
27502     # Not in mixed or Windows style, start by that.
27503     new_path=`cmd //c echo $path`
27504   fi
27505 
27506 
27507   input_path="$new_path"
27508   # Check if we need to convert this using DOS-style short mode. If the path
27509   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27510   # take no chances and rewrite it.
27511   # Note: m4 eats our [], so we need to use [ and ] instead.
27512   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27513   if test "x$has_forbidden_chars" != x; then
27514     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27515     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27516   fi
27517 
27518 
27519   windows_path="$new_path"
27520   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27521     unix_path=`$CYGPATH -u "$windows_path"`
27522     new_path="$unix_path"
27523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27524     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27525     new_path="$unix_path"
27526   fi
27527 
27528   if test "x$path" != "x$new_path"; then
27529     BOOT_JDK="$new_path"
27530     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27531 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27532   fi
27533 
27534   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27535   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27536 
27537     else
27538       # We're on a unix platform. Hooray! :)
27539       path="$BOOT_JDK"
27540       has_space=`$ECHO "$path" | $GREP " "`
27541       if test "x$has_space" != x; then
27542         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27543 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27544         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27545       fi
27546 
27547       # Use eval to expand a potential ~
27548       eval path="$path"
27549       if test ! -f "$path" && test ! -d "$path"; then
27550         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27551       fi
27552 
27553       if test -d "$path"; then
27554         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27555       else
27556         dir="`$DIRNAME "$path"`"
27557         base="`$BASENAME "$path"`"
27558         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27559       fi
27560     fi
27561   fi
27562 
27563             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27564 $as_echo_n "checking for Boot JDK... " >&6; }
27565             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27566 $as_echo "$BOOT_JDK" >&6; }
27567             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27568 $as_echo_n "checking Boot JDK version... " >&6; }
27569             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27570             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27571 $as_echo "$BOOT_JDK_VERSION" >&6; }
27572           fi # end check jdk version
27573         fi # end check javac
27574       fi # end check java
27575     fi # end check boot jdk found
27576   fi
27577 
27578     done
27579   fi
27580 
27581   fi
27582 
27583 
27584     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27585     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27586       # Do we have a bin/java?
27587       if test ! -x "$BOOT_JDK/bin/java"; then
27588         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27589 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27590         BOOT_JDK_FOUND=no
27591       else
27592         # Do we have a bin/javac?
27593         if test ! -x "$BOOT_JDK/bin/javac"; then
27594           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27595 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27596           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27597 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27598           BOOT_JDK_FOUND=no
27599         else
27600           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27601           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27602 
27603           # Extra M4 quote needed to protect [] in grep expression.
27604           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27605           if test "x$FOUND_CORRECT_VERSION" = x; then
27606             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27607 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27608             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27609 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27610             BOOT_JDK_FOUND=no
27611           else
27612             # We're done! :-)
27613             BOOT_JDK_FOUND=yes
27614 
27615   # Only process if variable expands to non-empty
27616 
27617   if test "x$BOOT_JDK" != x; then
27618     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27619 
27620   # Input might be given as Windows format, start by converting to
27621   # unix format.
27622   path="$BOOT_JDK"
27623   new_path=`$CYGPATH -u "$path"`
27624 
27625   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27626   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27627   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27628   # "foo.exe" is OK but "foo" is an error.
27629   #
27630   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27631   # It is also a way to make sure we got the proper file name for the real test later on.
27632   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27633   if test "x$test_shortpath" = x; then
27634     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27635 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27636     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27637   fi
27638 
27639   # Call helper function which possibly converts this using DOS-style short mode.
27640   # If so, the updated path is stored in $new_path.
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     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27651     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27652     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27653       # Going to short mode and back again did indeed matter. Since short mode is
27654       # case insensitive, let's make it lowercase to improve readability.
27655       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27656       # Now convert it back to Unix-style (cygpath)
27657       input_path=`$CYGPATH -u "$shortmode_path"`
27658       new_path="$input_path"
27659     fi
27660   fi
27661 
27662   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27663   if test "x$test_cygdrive_prefix" = x; then
27664     # As a simple fix, exclude /usr/bin since it's not a real path.
27665     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27666       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27667       # a path prefixed by /cygdrive for fixpath to work.
27668       new_path="$CYGWIN_ROOT_PATH$input_path"
27669     fi
27670   fi
27671 
27672 
27673   if test "x$path" != "x$new_path"; then
27674     BOOT_JDK="$new_path"
27675     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27676 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27677   fi
27678 
27679     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27680 
27681   path="$BOOT_JDK"
27682   has_colon=`$ECHO $path | $GREP ^.:`
27683   new_path="$path"
27684   if test "x$has_colon" = x; then
27685     # Not in mixed or Windows style, start by that.
27686     new_path=`cmd //c echo $path`
27687   fi
27688 
27689 
27690   input_path="$new_path"
27691   # Check if we need to convert this using DOS-style short mode. If the path
27692   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27693   # take no chances and rewrite it.
27694   # Note: m4 eats our [], so we need to use [ and ] instead.
27695   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27696   if test "x$has_forbidden_chars" != x; then
27697     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27698     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27699   fi
27700 
27701 
27702   windows_path="$new_path"
27703   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27704     unix_path=`$CYGPATH -u "$windows_path"`
27705     new_path="$unix_path"
27706   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27707     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27708     new_path="$unix_path"
27709   fi
27710 
27711   if test "x$path" != "x$new_path"; then
27712     BOOT_JDK="$new_path"
27713     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27714 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27715   fi
27716 
27717   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27718   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27719 
27720     else
27721       # We're on a unix platform. Hooray! :)
27722       path="$BOOT_JDK"
27723       has_space=`$ECHO "$path" | $GREP " "`
27724       if test "x$has_space" != x; then
27725         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27726 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27727         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27728       fi
27729 
27730       # Use eval to expand a potential ~
27731       eval path="$path"
27732       if test ! -f "$path" && test ! -d "$path"; then
27733         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27734       fi
27735 
27736       if test -d "$path"; then
27737         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27738       else
27739         dir="`$DIRNAME "$path"`"
27740         base="`$BASENAME "$path"`"
27741         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27742       fi
27743     fi
27744   fi
27745 
27746             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27747 $as_echo_n "checking for Boot JDK... " >&6; }
27748             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27749 $as_echo "$BOOT_JDK" >&6; }
27750             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27751 $as_echo_n "checking Boot JDK version... " >&6; }
27752             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27753             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27754 $as_echo "$BOOT_JDK_VERSION" >&6; }
27755           fi # end check jdk version
27756         fi # end check javac
27757       fi # end check java
27758     fi # end check boot jdk found
27759   fi
27760 
27761 
27762   if test "x$BOOT_JDK_FOUND" = xno; then
27763     # Now execute the test
27764 
27765   if test "x$ProgramFiles" != x; then
27766     VIRTUAL_DIR="$ProgramFiles/Java"
27767 
27768   windows_path="$VIRTUAL_DIR"
27769   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27770     unix_path=`$CYGPATH -u "$windows_path"`
27771     VIRTUAL_DIR="$unix_path"
27772   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27773     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27774     VIRTUAL_DIR="$unix_path"
27775   fi
27776 
27777 
27778   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27779   BOOT_JDK_SUFFIX=""
27780   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27781   if test "x$ALL_JDKS_FOUND" != x; then
27782     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27783 
27784   if test "x$BOOT_JDK_FOUND" = xno; then
27785     # Now execute the test
27786 
27787         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27788         if test -d "$BOOT_JDK"; then
27789           BOOT_JDK_FOUND=maybe
27790           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27791 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27792         fi
27793 
27794 
27795     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27796     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27797       # Do we have a bin/java?
27798       if test ! -x "$BOOT_JDK/bin/java"; then
27799         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27800 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27801         BOOT_JDK_FOUND=no
27802       else
27803         # Do we have a bin/javac?
27804         if test ! -x "$BOOT_JDK/bin/javac"; then
27805           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27806 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27807           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27808 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27809           BOOT_JDK_FOUND=no
27810         else
27811           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27812           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27813 
27814           # Extra M4 quote needed to protect [] in grep expression.
27815           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27816           if test "x$FOUND_CORRECT_VERSION" = x; then
27817             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27818 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27819             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27820 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27821             BOOT_JDK_FOUND=no
27822           else
27823             # We're done! :-)
27824             BOOT_JDK_FOUND=yes
27825 
27826   # Only process if variable expands to non-empty
27827 
27828   if test "x$BOOT_JDK" != x; then
27829     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27830 
27831   # Input might be given as Windows format, start by converting to
27832   # unix format.
27833   path="$BOOT_JDK"
27834   new_path=`$CYGPATH -u "$path"`
27835 
27836   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27837   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27838   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27839   # "foo.exe" is OK but "foo" is an error.
27840   #
27841   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27842   # It is also a way to make sure we got the proper file name for the real test later on.
27843   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27844   if test "x$test_shortpath" = x; then
27845     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27846 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27847     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27848   fi
27849 
27850   # Call helper function which possibly converts this using DOS-style short mode.
27851   # If so, the updated path is stored in $new_path.
27852 
27853   input_path="$new_path"
27854   # Check if we need to convert this using DOS-style short mode. If the path
27855   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27856   # take no chances and rewrite it.
27857   # Note: m4 eats our [], so we need to use [ and ] instead.
27858   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27859   if test "x$has_forbidden_chars" != x; then
27860     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27861     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27862     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27863     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27864       # Going to short mode and back again did indeed matter. Since short mode is
27865       # case insensitive, let's make it lowercase to improve readability.
27866       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27867       # Now convert it back to Unix-style (cygpath)
27868       input_path=`$CYGPATH -u "$shortmode_path"`
27869       new_path="$input_path"
27870     fi
27871   fi
27872 
27873   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27874   if test "x$test_cygdrive_prefix" = x; then
27875     # As a simple fix, exclude /usr/bin since it's not a real path.
27876     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27877       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27878       # a path prefixed by /cygdrive for fixpath to work.
27879       new_path="$CYGWIN_ROOT_PATH$input_path"
27880     fi
27881   fi
27882 
27883 
27884   if test "x$path" != "x$new_path"; then
27885     BOOT_JDK="$new_path"
27886     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27887 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27888   fi
27889 
27890     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27891 
27892   path="$BOOT_JDK"
27893   has_colon=`$ECHO $path | $GREP ^.:`
27894   new_path="$path"
27895   if test "x$has_colon" = x; then
27896     # Not in mixed or Windows style, start by that.
27897     new_path=`cmd //c echo $path`
27898   fi
27899 
27900 
27901   input_path="$new_path"
27902   # Check if we need to convert this using DOS-style short mode. If the path
27903   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27904   # take no chances and rewrite it.
27905   # Note: m4 eats our [], so we need to use [ and ] instead.
27906   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27907   if test "x$has_forbidden_chars" != x; then
27908     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27909     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27910   fi
27911 
27912 
27913   windows_path="$new_path"
27914   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27915     unix_path=`$CYGPATH -u "$windows_path"`
27916     new_path="$unix_path"
27917   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27918     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27919     new_path="$unix_path"
27920   fi
27921 
27922   if test "x$path" != "x$new_path"; then
27923     BOOT_JDK="$new_path"
27924     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27925 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27926   fi
27927 
27928   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27929   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27930 
27931     else
27932       # We're on a unix platform. Hooray! :)
27933       path="$BOOT_JDK"
27934       has_space=`$ECHO "$path" | $GREP " "`
27935       if test "x$has_space" != x; then
27936         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27937 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27938         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27939       fi
27940 
27941       # Use eval to expand a potential ~
27942       eval path="$path"
27943       if test ! -f "$path" && test ! -d "$path"; then
27944         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27945       fi
27946 
27947       if test -d "$path"; then
27948         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27949       else
27950         dir="`$DIRNAME "$path"`"
27951         base="`$BASENAME "$path"`"
27952         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27953       fi
27954     fi
27955   fi
27956 
27957             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27958 $as_echo_n "checking for Boot JDK... " >&6; }
27959             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27960 $as_echo "$BOOT_JDK" >&6; }
27961             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27962 $as_echo_n "checking Boot JDK version... " >&6; }
27963             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27964             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27965 $as_echo "$BOOT_JDK_VERSION" >&6; }
27966           fi # end check jdk version
27967         fi # end check javac
27968       fi # end check java
27969     fi # end check boot jdk found
27970   fi
27971 
27972     done
27973   fi
27974 
27975   fi
27976 
27977 
27978     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27979     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27980       # Do we have a bin/java?
27981       if test ! -x "$BOOT_JDK/bin/java"; then
27982         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27983 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27984         BOOT_JDK_FOUND=no
27985       else
27986         # Do we have a bin/javac?
27987         if test ! -x "$BOOT_JDK/bin/javac"; then
27988           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27989 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27990           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27991 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27992           BOOT_JDK_FOUND=no
27993         else
27994           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27995           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27996 
27997           # Extra M4 quote needed to protect [] in grep expression.
27998           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27999           if test "x$FOUND_CORRECT_VERSION" = x; then
28000             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28001 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28002             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28003 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28004             BOOT_JDK_FOUND=no
28005           else
28006             # We're done! :-)
28007             BOOT_JDK_FOUND=yes
28008 
28009   # Only process if variable expands to non-empty
28010 
28011   if test "x$BOOT_JDK" != x; then
28012     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28013 
28014   # Input might be given as Windows format, start by converting to
28015   # unix format.
28016   path="$BOOT_JDK"
28017   new_path=`$CYGPATH -u "$path"`
28018 
28019   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28020   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28021   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28022   # "foo.exe" is OK but "foo" is an error.
28023   #
28024   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28025   # It is also a way to make sure we got the proper file name for the real test later on.
28026   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28027   if test "x$test_shortpath" = x; then
28028     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28029 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28030     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28031   fi
28032 
28033   # Call helper function which possibly converts this using DOS-style short mode.
28034   # If so, the updated path is stored in $new_path.
28035 
28036   input_path="$new_path"
28037   # Check if we need to convert this using DOS-style short mode. If the path
28038   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28039   # take no chances and rewrite it.
28040   # Note: m4 eats our [], so we need to use [ and ] instead.
28041   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28042   if test "x$has_forbidden_chars" != x; then
28043     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28044     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28045     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28046     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28047       # Going to short mode and back again did indeed matter. Since short mode is
28048       # case insensitive, let's make it lowercase to improve readability.
28049       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28050       # Now convert it back to Unix-style (cygpath)
28051       input_path=`$CYGPATH -u "$shortmode_path"`
28052       new_path="$input_path"
28053     fi
28054   fi
28055 
28056   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28057   if test "x$test_cygdrive_prefix" = x; then
28058     # As a simple fix, exclude /usr/bin since it's not a real path.
28059     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28060       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28061       # a path prefixed by /cygdrive for fixpath to work.
28062       new_path="$CYGWIN_ROOT_PATH$input_path"
28063     fi
28064   fi
28065 
28066 
28067   if test "x$path" != "x$new_path"; then
28068     BOOT_JDK="$new_path"
28069     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28070 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28071   fi
28072 
28073     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28074 
28075   path="$BOOT_JDK"
28076   has_colon=`$ECHO $path | $GREP ^.:`
28077   new_path="$path"
28078   if test "x$has_colon" = x; then
28079     # Not in mixed or Windows style, start by that.
28080     new_path=`cmd //c echo $path`
28081   fi
28082 
28083 
28084   input_path="$new_path"
28085   # Check if we need to convert this using DOS-style short mode. If the path
28086   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28087   # take no chances and rewrite it.
28088   # Note: m4 eats our [], so we need to use [ and ] instead.
28089   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28090   if test "x$has_forbidden_chars" != x; then
28091     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28092     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28093   fi
28094 
28095 
28096   windows_path="$new_path"
28097   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28098     unix_path=`$CYGPATH -u "$windows_path"`
28099     new_path="$unix_path"
28100   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28101     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28102     new_path="$unix_path"
28103   fi
28104 
28105   if test "x$path" != "x$new_path"; then
28106     BOOT_JDK="$new_path"
28107     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28108 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28109   fi
28110 
28111   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28112   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28113 
28114     else
28115       # We're on a unix platform. Hooray! :)
28116       path="$BOOT_JDK"
28117       has_space=`$ECHO "$path" | $GREP " "`
28118       if test "x$has_space" != x; then
28119         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28120 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28121         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28122       fi
28123 
28124       # Use eval to expand a potential ~
28125       eval path="$path"
28126       if test ! -f "$path" && test ! -d "$path"; then
28127         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28128       fi
28129 
28130       if test -d "$path"; then
28131         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28132       else
28133         dir="`$DIRNAME "$path"`"
28134         base="`$BASENAME "$path"`"
28135         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28136       fi
28137     fi
28138   fi
28139 
28140             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28141 $as_echo_n "checking for Boot JDK... " >&6; }
28142             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28143 $as_echo "$BOOT_JDK" >&6; }
28144             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28145 $as_echo_n "checking Boot JDK version... " >&6; }
28146             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28147             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28148 $as_echo "$BOOT_JDK_VERSION" >&6; }
28149           fi # end check jdk version
28150         fi # end check javac
28151       fi # end check java
28152     fi # end check boot jdk found
28153   fi
28154 
28155 
28156   if test "x$BOOT_JDK_FOUND" = xno; then
28157     # Now execute the test
28158 
28159   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28160   BOOT_JDK_SUFFIX=""
28161   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28162   if test "x$ALL_JDKS_FOUND" != x; then
28163     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28164 
28165   if test "x$BOOT_JDK_FOUND" = xno; then
28166     # Now execute the test
28167 
28168         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28169         if test -d "$BOOT_JDK"; then
28170           BOOT_JDK_FOUND=maybe
28171           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28172 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28173         fi
28174 
28175 
28176     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28177     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28178       # Do we have a bin/java?
28179       if test ! -x "$BOOT_JDK/bin/java"; then
28180         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28181 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28182         BOOT_JDK_FOUND=no
28183       else
28184         # Do we have a bin/javac?
28185         if test ! -x "$BOOT_JDK/bin/javac"; then
28186           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28187 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28188           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28189 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28190           BOOT_JDK_FOUND=no
28191         else
28192           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28193           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28194 
28195           # Extra M4 quote needed to protect [] in grep expression.
28196           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28197           if test "x$FOUND_CORRECT_VERSION" = x; then
28198             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28199 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28200             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28201 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28202             BOOT_JDK_FOUND=no
28203           else
28204             # We're done! :-)
28205             BOOT_JDK_FOUND=yes
28206 
28207   # Only process if variable expands to non-empty
28208 
28209   if test "x$BOOT_JDK" != x; then
28210     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28211 
28212   # Input might be given as Windows format, start by converting to
28213   # unix format.
28214   path="$BOOT_JDK"
28215   new_path=`$CYGPATH -u "$path"`
28216 
28217   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28218   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28219   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28220   # "foo.exe" is OK but "foo" is an error.
28221   #
28222   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28223   # It is also a way to make sure we got the proper file name for the real test later on.
28224   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28225   if test "x$test_shortpath" = x; then
28226     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28227 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28228     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28229   fi
28230 
28231   # Call helper function which possibly converts this using DOS-style short mode.
28232   # If so, the updated path is stored in $new_path.
28233 
28234   input_path="$new_path"
28235   # Check if we need to convert this using DOS-style short mode. If the path
28236   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28237   # take no chances and rewrite it.
28238   # Note: m4 eats our [], so we need to use [ and ] instead.
28239   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28240   if test "x$has_forbidden_chars" != x; then
28241     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28242     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28243     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28244     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28245       # Going to short mode and back again did indeed matter. Since short mode is
28246       # case insensitive, let's make it lowercase to improve readability.
28247       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28248       # Now convert it back to Unix-style (cygpath)
28249       input_path=`$CYGPATH -u "$shortmode_path"`
28250       new_path="$input_path"
28251     fi
28252   fi
28253 
28254   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28255   if test "x$test_cygdrive_prefix" = x; then
28256     # As a simple fix, exclude /usr/bin since it's not a real path.
28257     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28258       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28259       # a path prefixed by /cygdrive for fixpath to work.
28260       new_path="$CYGWIN_ROOT_PATH$input_path"
28261     fi
28262   fi
28263 
28264 
28265   if test "x$path" != "x$new_path"; then
28266     BOOT_JDK="$new_path"
28267     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28268 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28269   fi
28270 
28271     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28272 
28273   path="$BOOT_JDK"
28274   has_colon=`$ECHO $path | $GREP ^.:`
28275   new_path="$path"
28276   if test "x$has_colon" = x; then
28277     # Not in mixed or Windows style, start by that.
28278     new_path=`cmd //c echo $path`
28279   fi
28280 
28281 
28282   input_path="$new_path"
28283   # Check if we need to convert this using DOS-style short mode. If the path
28284   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28285   # take no chances and rewrite it.
28286   # Note: m4 eats our [], so we need to use [ and ] instead.
28287   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28288   if test "x$has_forbidden_chars" != x; then
28289     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28290     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28291   fi
28292 
28293 
28294   windows_path="$new_path"
28295   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28296     unix_path=`$CYGPATH -u "$windows_path"`
28297     new_path="$unix_path"
28298   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28299     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28300     new_path="$unix_path"
28301   fi
28302 
28303   if test "x$path" != "x$new_path"; then
28304     BOOT_JDK="$new_path"
28305     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28306 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28307   fi
28308 
28309   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28310   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28311 
28312     else
28313       # We're on a unix platform. Hooray! :)
28314       path="$BOOT_JDK"
28315       has_space=`$ECHO "$path" | $GREP " "`
28316       if test "x$has_space" != x; then
28317         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28318 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28319         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28320       fi
28321 
28322       # Use eval to expand a potential ~
28323       eval path="$path"
28324       if test ! -f "$path" && test ! -d "$path"; then
28325         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28326       fi
28327 
28328       if test -d "$path"; then
28329         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28330       else
28331         dir="`$DIRNAME "$path"`"
28332         base="`$BASENAME "$path"`"
28333         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28334       fi
28335     fi
28336   fi
28337 
28338             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28339 $as_echo_n "checking for Boot JDK... " >&6; }
28340             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28341 $as_echo "$BOOT_JDK" >&6; }
28342             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28343 $as_echo_n "checking Boot JDK version... " >&6; }
28344             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28345             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28346 $as_echo "$BOOT_JDK_VERSION" >&6; }
28347           fi # end check jdk version
28348         fi # end check javac
28349       fi # end check java
28350     fi # end check boot jdk found
28351   fi
28352 
28353     done
28354   fi
28355 
28356 
28357     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28358     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28359       # Do we have a bin/java?
28360       if test ! -x "$BOOT_JDK/bin/java"; then
28361         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28362 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28363         BOOT_JDK_FOUND=no
28364       else
28365         # Do we have a bin/javac?
28366         if test ! -x "$BOOT_JDK/bin/javac"; then
28367           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28368 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28369           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28370 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28371           BOOT_JDK_FOUND=no
28372         else
28373           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28374           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28375 
28376           # Extra M4 quote needed to protect [] in grep expression.
28377           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28378           if test "x$FOUND_CORRECT_VERSION" = x; then
28379             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28380 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28381             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28382 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28383             BOOT_JDK_FOUND=no
28384           else
28385             # We're done! :-)
28386             BOOT_JDK_FOUND=yes
28387 
28388   # Only process if variable expands to non-empty
28389 
28390   if test "x$BOOT_JDK" != x; then
28391     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28392 
28393   # Input might be given as Windows format, start by converting to
28394   # unix format.
28395   path="$BOOT_JDK"
28396   new_path=`$CYGPATH -u "$path"`
28397 
28398   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28399   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28400   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28401   # "foo.exe" is OK but "foo" is an error.
28402   #
28403   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28404   # It is also a way to make sure we got the proper file name for the real test later on.
28405   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28406   if test "x$test_shortpath" = x; then
28407     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28408 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28409     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28410   fi
28411 
28412   # Call helper function which possibly converts this using DOS-style short mode.
28413   # If so, the updated path is stored in $new_path.
28414 
28415   input_path="$new_path"
28416   # Check if we need to convert this using DOS-style short mode. If the path
28417   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28418   # take no chances and rewrite it.
28419   # Note: m4 eats our [], so we need to use [ and ] instead.
28420   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28421   if test "x$has_forbidden_chars" != x; then
28422     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28423     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28424     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28425     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28426       # Going to short mode and back again did indeed matter. Since short mode is
28427       # case insensitive, let's make it lowercase to improve readability.
28428       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28429       # Now convert it back to Unix-style (cygpath)
28430       input_path=`$CYGPATH -u "$shortmode_path"`
28431       new_path="$input_path"
28432     fi
28433   fi
28434 
28435   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28436   if test "x$test_cygdrive_prefix" = x; then
28437     # As a simple fix, exclude /usr/bin since it's not a real path.
28438     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28439       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28440       # a path prefixed by /cygdrive for fixpath to work.
28441       new_path="$CYGWIN_ROOT_PATH$input_path"
28442     fi
28443   fi
28444 
28445 
28446   if test "x$path" != "x$new_path"; then
28447     BOOT_JDK="$new_path"
28448     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28449 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28450   fi
28451 
28452     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28453 
28454   path="$BOOT_JDK"
28455   has_colon=`$ECHO $path | $GREP ^.:`
28456   new_path="$path"
28457   if test "x$has_colon" = x; then
28458     # Not in mixed or Windows style, start by that.
28459     new_path=`cmd //c echo $path`
28460   fi
28461 
28462 
28463   input_path="$new_path"
28464   # Check if we need to convert this using DOS-style short mode. If the path
28465   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28466   # take no chances and rewrite it.
28467   # Note: m4 eats our [], so we need to use [ and ] instead.
28468   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28469   if test "x$has_forbidden_chars" != x; then
28470     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28471     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28472   fi
28473 
28474 
28475   windows_path="$new_path"
28476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28477     unix_path=`$CYGPATH -u "$windows_path"`
28478     new_path="$unix_path"
28479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28480     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28481     new_path="$unix_path"
28482   fi
28483 
28484   if test "x$path" != "x$new_path"; then
28485     BOOT_JDK="$new_path"
28486     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28487 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28488   fi
28489 
28490   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28491   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28492 
28493     else
28494       # We're on a unix platform. Hooray! :)
28495       path="$BOOT_JDK"
28496       has_space=`$ECHO "$path" | $GREP " "`
28497       if test "x$has_space" != x; then
28498         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28499 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28500         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28501       fi
28502 
28503       # Use eval to expand a potential ~
28504       eval path="$path"
28505       if test ! -f "$path" && test ! -d "$path"; then
28506         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28507       fi
28508 
28509       if test -d "$path"; then
28510         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28511       else
28512         dir="`$DIRNAME "$path"`"
28513         base="`$BASENAME "$path"`"
28514         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28515       fi
28516     fi
28517   fi
28518 
28519             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28520 $as_echo_n "checking for Boot JDK... " >&6; }
28521             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28522 $as_echo "$BOOT_JDK" >&6; }
28523             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28524 $as_echo_n "checking Boot JDK version... " >&6; }
28525             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28526             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28527 $as_echo "$BOOT_JDK_VERSION" >&6; }
28528           fi # end check jdk version
28529         fi # end check javac
28530       fi # end check java
28531     fi # end check boot jdk found
28532   fi
28533 
28534   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28535 
28536   if test "x$BOOT_JDK_FOUND" = xno; then
28537     # Now execute the test
28538 
28539   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28540   BOOT_JDK_SUFFIX="/Contents/Home"
28541   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28542   if test "x$ALL_JDKS_FOUND" != x; then
28543     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28544 
28545   if test "x$BOOT_JDK_FOUND" = xno; then
28546     # Now execute the test
28547 
28548         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28549         if test -d "$BOOT_JDK"; then
28550           BOOT_JDK_FOUND=maybe
28551           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28552 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28553         fi
28554 
28555 
28556     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28557     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28558       # Do we have a bin/java?
28559       if test ! -x "$BOOT_JDK/bin/java"; then
28560         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28561 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28562         BOOT_JDK_FOUND=no
28563       else
28564         # Do we have a bin/javac?
28565         if test ! -x "$BOOT_JDK/bin/javac"; then
28566           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28567 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28568           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28569 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28570           BOOT_JDK_FOUND=no
28571         else
28572           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28573           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28574 
28575           # Extra M4 quote needed to protect [] in grep expression.
28576           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28577           if test "x$FOUND_CORRECT_VERSION" = x; then
28578             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28579 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28580             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28581 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28582             BOOT_JDK_FOUND=no
28583           else
28584             # We're done! :-)
28585             BOOT_JDK_FOUND=yes
28586 
28587   # Only process if variable expands to non-empty
28588 
28589   if test "x$BOOT_JDK" != x; then
28590     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28591 
28592   # Input might be given as Windows format, start by converting to
28593   # unix format.
28594   path="$BOOT_JDK"
28595   new_path=`$CYGPATH -u "$path"`
28596 
28597   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28598   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28599   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28600   # "foo.exe" is OK but "foo" is an error.
28601   #
28602   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28603   # It is also a way to make sure we got the proper file name for the real test later on.
28604   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28605   if test "x$test_shortpath" = x; then
28606     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28607 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28608     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28609   fi
28610 
28611   # Call helper function which possibly converts this using DOS-style short mode.
28612   # If so, the updated path is stored in $new_path.
28613 
28614   input_path="$new_path"
28615   # Check if we need to convert this using DOS-style short mode. If the path
28616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28617   # take no chances and rewrite it.
28618   # Note: m4 eats our [], so we need to use [ and ] instead.
28619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28620   if test "x$has_forbidden_chars" != x; then
28621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28622     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28623     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28624     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28625       # Going to short mode and back again did indeed matter. Since short mode is
28626       # case insensitive, let's make it lowercase to improve readability.
28627       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28628       # Now convert it back to Unix-style (cygpath)
28629       input_path=`$CYGPATH -u "$shortmode_path"`
28630       new_path="$input_path"
28631     fi
28632   fi
28633 
28634   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28635   if test "x$test_cygdrive_prefix" = x; then
28636     # As a simple fix, exclude /usr/bin since it's not a real path.
28637     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28638       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28639       # a path prefixed by /cygdrive for fixpath to work.
28640       new_path="$CYGWIN_ROOT_PATH$input_path"
28641     fi
28642   fi
28643 
28644 
28645   if test "x$path" != "x$new_path"; then
28646     BOOT_JDK="$new_path"
28647     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28648 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28649   fi
28650 
28651     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28652 
28653   path="$BOOT_JDK"
28654   has_colon=`$ECHO $path | $GREP ^.:`
28655   new_path="$path"
28656   if test "x$has_colon" = x; then
28657     # Not in mixed or Windows style, start by that.
28658     new_path=`cmd //c echo $path`
28659   fi
28660 
28661 
28662   input_path="$new_path"
28663   # Check if we need to convert this using DOS-style short mode. If the path
28664   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28665   # take no chances and rewrite it.
28666   # Note: m4 eats our [], so we need to use [ and ] instead.
28667   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28668   if test "x$has_forbidden_chars" != x; then
28669     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28670     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28671   fi
28672 
28673 
28674   windows_path="$new_path"
28675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28676     unix_path=`$CYGPATH -u "$windows_path"`
28677     new_path="$unix_path"
28678   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28679     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28680     new_path="$unix_path"
28681   fi
28682 
28683   if test "x$path" != "x$new_path"; then
28684     BOOT_JDK="$new_path"
28685     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28686 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28687   fi
28688 
28689   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28690   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28691 
28692     else
28693       # We're on a unix platform. Hooray! :)
28694       path="$BOOT_JDK"
28695       has_space=`$ECHO "$path" | $GREP " "`
28696       if test "x$has_space" != x; then
28697         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28698 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28699         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28700       fi
28701 
28702       # Use eval to expand a potential ~
28703       eval path="$path"
28704       if test ! -f "$path" && test ! -d "$path"; then
28705         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28706       fi
28707 
28708       if test -d "$path"; then
28709         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28710       else
28711         dir="`$DIRNAME "$path"`"
28712         base="`$BASENAME "$path"`"
28713         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28714       fi
28715     fi
28716   fi
28717 
28718             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28719 $as_echo_n "checking for Boot JDK... " >&6; }
28720             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28721 $as_echo "$BOOT_JDK" >&6; }
28722             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28723 $as_echo_n "checking Boot JDK version... " >&6; }
28724             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28725             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28726 $as_echo "$BOOT_JDK_VERSION" >&6; }
28727           fi # end check jdk version
28728         fi # end check javac
28729       fi # end check java
28730     fi # end check boot jdk found
28731   fi
28732 
28733     done
28734   fi
28735 
28736 
28737     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28738     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28739       # Do we have a bin/java?
28740       if test ! -x "$BOOT_JDK/bin/java"; then
28741         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28742 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28743         BOOT_JDK_FOUND=no
28744       else
28745         # Do we have a bin/javac?
28746         if test ! -x "$BOOT_JDK/bin/javac"; then
28747           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28748 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28749           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28750 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28751           BOOT_JDK_FOUND=no
28752         else
28753           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28754           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28755 
28756           # Extra M4 quote needed to protect [] in grep expression.
28757           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28758           if test "x$FOUND_CORRECT_VERSION" = x; then
28759             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28760 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28761             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28762 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28763             BOOT_JDK_FOUND=no
28764           else
28765             # We're done! :-)
28766             BOOT_JDK_FOUND=yes
28767 
28768   # Only process if variable expands to non-empty
28769 
28770   if test "x$BOOT_JDK" != x; then
28771     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28772 
28773   # Input might be given as Windows format, start by converting to
28774   # unix format.
28775   path="$BOOT_JDK"
28776   new_path=`$CYGPATH -u "$path"`
28777 
28778   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28779   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28780   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28781   # "foo.exe" is OK but "foo" is an error.
28782   #
28783   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28784   # It is also a way to make sure we got the proper file name for the real test later on.
28785   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28786   if test "x$test_shortpath" = x; then
28787     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28788 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28789     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28790   fi
28791 
28792   # Call helper function which possibly converts this using DOS-style short mode.
28793   # If so, the updated path is stored in $new_path.
28794 
28795   input_path="$new_path"
28796   # Check if we need to convert this using DOS-style short mode. If the path
28797   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28798   # take no chances and rewrite it.
28799   # Note: m4 eats our [], so we need to use [ and ] instead.
28800   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28801   if test "x$has_forbidden_chars" != x; then
28802     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28803     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28804     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28805     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28806       # Going to short mode and back again did indeed matter. Since short mode is
28807       # case insensitive, let's make it lowercase to improve readability.
28808       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28809       # Now convert it back to Unix-style (cygpath)
28810       input_path=`$CYGPATH -u "$shortmode_path"`
28811       new_path="$input_path"
28812     fi
28813   fi
28814 
28815   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28816   if test "x$test_cygdrive_prefix" = x; then
28817     # As a simple fix, exclude /usr/bin since it's not a real path.
28818     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28819       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28820       # a path prefixed by /cygdrive for fixpath to work.
28821       new_path="$CYGWIN_ROOT_PATH$input_path"
28822     fi
28823   fi
28824 
28825 
28826   if test "x$path" != "x$new_path"; then
28827     BOOT_JDK="$new_path"
28828     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28829 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28830   fi
28831 
28832     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28833 
28834   path="$BOOT_JDK"
28835   has_colon=`$ECHO $path | $GREP ^.:`
28836   new_path="$path"
28837   if test "x$has_colon" = x; then
28838     # Not in mixed or Windows style, start by that.
28839     new_path=`cmd //c echo $path`
28840   fi
28841 
28842 
28843   input_path="$new_path"
28844   # Check if we need to convert this using DOS-style short mode. If the path
28845   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28846   # take no chances and rewrite it.
28847   # Note: m4 eats our [], so we need to use [ and ] instead.
28848   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28849   if test "x$has_forbidden_chars" != x; then
28850     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28851     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28852   fi
28853 
28854 
28855   windows_path="$new_path"
28856   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28857     unix_path=`$CYGPATH -u "$windows_path"`
28858     new_path="$unix_path"
28859   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28860     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28861     new_path="$unix_path"
28862   fi
28863 
28864   if test "x$path" != "x$new_path"; then
28865     BOOT_JDK="$new_path"
28866     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28867 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28868   fi
28869 
28870   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28871   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28872 
28873     else
28874       # We're on a unix platform. Hooray! :)
28875       path="$BOOT_JDK"
28876       has_space=`$ECHO "$path" | $GREP " "`
28877       if test "x$has_space" != x; then
28878         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28879 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28880         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28881       fi
28882 
28883       # Use eval to expand a potential ~
28884       eval path="$path"
28885       if test ! -f "$path" && test ! -d "$path"; then
28886         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28887       fi
28888 
28889       if test -d "$path"; then
28890         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28891       else
28892         dir="`$DIRNAME "$path"`"
28893         base="`$BASENAME "$path"`"
28894         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28895       fi
28896     fi
28897   fi
28898 
28899             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28900 $as_echo_n "checking for Boot JDK... " >&6; }
28901             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28902 $as_echo "$BOOT_JDK" >&6; }
28903             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28904 $as_echo_n "checking Boot JDK version... " >&6; }
28905             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28906             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28907 $as_echo "$BOOT_JDK_VERSION" >&6; }
28908           fi # end check jdk version
28909         fi # end check javac
28910       fi # end check java
28911     fi # end check boot jdk found
28912   fi
28913 
28914 
28915   if test "x$BOOT_JDK_FOUND" = xno; then
28916     # Now execute the test
28917 
28918   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28919   BOOT_JDK_SUFFIX="/Contents/Home"
28920   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28921   if test "x$ALL_JDKS_FOUND" != x; then
28922     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28923 
28924   if test "x$BOOT_JDK_FOUND" = xno; then
28925     # Now execute the test
28926 
28927         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28928         if test -d "$BOOT_JDK"; then
28929           BOOT_JDK_FOUND=maybe
28930           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28931 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28932         fi
28933 
28934 
28935     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28936     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28937       # Do we have a bin/java?
28938       if test ! -x "$BOOT_JDK/bin/java"; then
28939         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28940 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28941         BOOT_JDK_FOUND=no
28942       else
28943         # Do we have a bin/javac?
28944         if test ! -x "$BOOT_JDK/bin/javac"; then
28945           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28946 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28947           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28948 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28949           BOOT_JDK_FOUND=no
28950         else
28951           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28952           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28953 
28954           # Extra M4 quote needed to protect [] in grep expression.
28955           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28956           if test "x$FOUND_CORRECT_VERSION" = x; then
28957             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28958 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28959             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28960 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28961             BOOT_JDK_FOUND=no
28962           else
28963             # We're done! :-)
28964             BOOT_JDK_FOUND=yes
28965 
28966   # Only process if variable expands to non-empty
28967 
28968   if test "x$BOOT_JDK" != x; then
28969     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28970 
28971   # Input might be given as Windows format, start by converting to
28972   # unix format.
28973   path="$BOOT_JDK"
28974   new_path=`$CYGPATH -u "$path"`
28975 
28976   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28977   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28978   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28979   # "foo.exe" is OK but "foo" is an error.
28980   #
28981   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28982   # It is also a way to make sure we got the proper file name for the real test later on.
28983   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28984   if test "x$test_shortpath" = x; then
28985     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28986 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28987     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28988   fi
28989 
28990   # Call helper function which possibly converts this using DOS-style short mode.
28991   # If so, the updated path is stored in $new_path.
28992 
28993   input_path="$new_path"
28994   # Check if we need to convert this using DOS-style short mode. If the path
28995   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28996   # take no chances and rewrite it.
28997   # Note: m4 eats our [], so we need to use [ and ] instead.
28998   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28999   if test "x$has_forbidden_chars" != x; then
29000     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29001     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29002     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29003     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29004       # Going to short mode and back again did indeed matter. Since short mode is
29005       # case insensitive, let's make it lowercase to improve readability.
29006       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29007       # Now convert it back to Unix-style (cygpath)
29008       input_path=`$CYGPATH -u "$shortmode_path"`
29009       new_path="$input_path"
29010     fi
29011   fi
29012 
29013   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29014   if test "x$test_cygdrive_prefix" = x; then
29015     # As a simple fix, exclude /usr/bin since it's not a real path.
29016     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29017       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29018       # a path prefixed by /cygdrive for fixpath to work.
29019       new_path="$CYGWIN_ROOT_PATH$input_path"
29020     fi
29021   fi
29022 
29023 
29024   if test "x$path" != "x$new_path"; then
29025     BOOT_JDK="$new_path"
29026     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29027 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29028   fi
29029 
29030     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29031 
29032   path="$BOOT_JDK"
29033   has_colon=`$ECHO $path | $GREP ^.:`
29034   new_path="$path"
29035   if test "x$has_colon" = x; then
29036     # Not in mixed or Windows style, start by that.
29037     new_path=`cmd //c echo $path`
29038   fi
29039 
29040 
29041   input_path="$new_path"
29042   # Check if we need to convert this using DOS-style short mode. If the path
29043   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29044   # take no chances and rewrite it.
29045   # Note: m4 eats our [], so we need to use [ and ] instead.
29046   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29047   if test "x$has_forbidden_chars" != x; then
29048     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29049     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29050   fi
29051 
29052 
29053   windows_path="$new_path"
29054   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29055     unix_path=`$CYGPATH -u "$windows_path"`
29056     new_path="$unix_path"
29057   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29058     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29059     new_path="$unix_path"
29060   fi
29061 
29062   if test "x$path" != "x$new_path"; then
29063     BOOT_JDK="$new_path"
29064     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29065 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29066   fi
29067 
29068   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29069   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29070 
29071     else
29072       # We're on a unix platform. Hooray! :)
29073       path="$BOOT_JDK"
29074       has_space=`$ECHO "$path" | $GREP " "`
29075       if test "x$has_space" != x; then
29076         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29077 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29078         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29079       fi
29080 
29081       # Use eval to expand a potential ~
29082       eval path="$path"
29083       if test ! -f "$path" && test ! -d "$path"; then
29084         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29085       fi
29086 
29087       if test -d "$path"; then
29088         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29089       else
29090         dir="`$DIRNAME "$path"`"
29091         base="`$BASENAME "$path"`"
29092         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29093       fi
29094     fi
29095   fi
29096 
29097             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29098 $as_echo_n "checking for Boot JDK... " >&6; }
29099             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29100 $as_echo "$BOOT_JDK" >&6; }
29101             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29102 $as_echo_n "checking Boot JDK version... " >&6; }
29103             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29104             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29105 $as_echo "$BOOT_JDK_VERSION" >&6; }
29106           fi # end check jdk version
29107         fi # end check javac
29108       fi # end check java
29109     fi # end check boot jdk found
29110   fi
29111 
29112     done
29113   fi
29114 
29115 
29116     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29117     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29118       # Do we have a bin/java?
29119       if test ! -x "$BOOT_JDK/bin/java"; then
29120         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29121 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29122         BOOT_JDK_FOUND=no
29123       else
29124         # Do we have a bin/javac?
29125         if test ! -x "$BOOT_JDK/bin/javac"; then
29126           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29127 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29128           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29129 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29130           BOOT_JDK_FOUND=no
29131         else
29132           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29133           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29134 
29135           # Extra M4 quote needed to protect [] in grep expression.
29136           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29137           if test "x$FOUND_CORRECT_VERSION" = x; then
29138             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29139 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29140             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29141 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29142             BOOT_JDK_FOUND=no
29143           else
29144             # We're done! :-)
29145             BOOT_JDK_FOUND=yes
29146 
29147   # Only process if variable expands to non-empty
29148 
29149   if test "x$BOOT_JDK" != x; then
29150     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29151 
29152   # Input might be given as Windows format, start by converting to
29153   # unix format.
29154   path="$BOOT_JDK"
29155   new_path=`$CYGPATH -u "$path"`
29156 
29157   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29158   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29159   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29160   # "foo.exe" is OK but "foo" is an error.
29161   #
29162   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29163   # It is also a way to make sure we got the proper file name for the real test later on.
29164   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29165   if test "x$test_shortpath" = x; then
29166     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29167 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29168     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29169   fi
29170 
29171   # Call helper function which possibly converts this using DOS-style short mode.
29172   # If so, the updated path is stored in $new_path.
29173 
29174   input_path="$new_path"
29175   # Check if we need to convert this using DOS-style short mode. If the path
29176   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29177   # take no chances and rewrite it.
29178   # Note: m4 eats our [], so we need to use [ and ] instead.
29179   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29180   if test "x$has_forbidden_chars" != x; then
29181     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29182     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29183     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29184     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29185       # Going to short mode and back again did indeed matter. Since short mode is
29186       # case insensitive, let's make it lowercase to improve readability.
29187       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29188       # Now convert it back to Unix-style (cygpath)
29189       input_path=`$CYGPATH -u "$shortmode_path"`
29190       new_path="$input_path"
29191     fi
29192   fi
29193 
29194   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29195   if test "x$test_cygdrive_prefix" = x; then
29196     # As a simple fix, exclude /usr/bin since it's not a real path.
29197     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29198       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29199       # a path prefixed by /cygdrive for fixpath to work.
29200       new_path="$CYGWIN_ROOT_PATH$input_path"
29201     fi
29202   fi
29203 
29204 
29205   if test "x$path" != "x$new_path"; then
29206     BOOT_JDK="$new_path"
29207     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29208 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29209   fi
29210 
29211     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29212 
29213   path="$BOOT_JDK"
29214   has_colon=`$ECHO $path | $GREP ^.:`
29215   new_path="$path"
29216   if test "x$has_colon" = x; then
29217     # Not in mixed or Windows style, start by that.
29218     new_path=`cmd //c echo $path`
29219   fi
29220 
29221 
29222   input_path="$new_path"
29223   # Check if we need to convert this using DOS-style short mode. If the path
29224   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29225   # take no chances and rewrite it.
29226   # Note: m4 eats our [], so we need to use [ and ] instead.
29227   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29228   if test "x$has_forbidden_chars" != x; then
29229     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29230     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29231   fi
29232 
29233 
29234   windows_path="$new_path"
29235   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29236     unix_path=`$CYGPATH -u "$windows_path"`
29237     new_path="$unix_path"
29238   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29239     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29240     new_path="$unix_path"
29241   fi
29242 
29243   if test "x$path" != "x$new_path"; then
29244     BOOT_JDK="$new_path"
29245     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29246 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29247   fi
29248 
29249   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29250   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29251 
29252     else
29253       # We're on a unix platform. Hooray! :)
29254       path="$BOOT_JDK"
29255       has_space=`$ECHO "$path" | $GREP " "`
29256       if test "x$has_space" != x; then
29257         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29258 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29259         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29260       fi
29261 
29262       # Use eval to expand a potential ~
29263       eval path="$path"
29264       if test ! -f "$path" && test ! -d "$path"; then
29265         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29266       fi
29267 
29268       if test -d "$path"; then
29269         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29270       else
29271         dir="`$DIRNAME "$path"`"
29272         base="`$BASENAME "$path"`"
29273         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29274       fi
29275     fi
29276   fi
29277 
29278             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29279 $as_echo_n "checking for Boot JDK... " >&6; }
29280             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29281 $as_echo "$BOOT_JDK" >&6; }
29282             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29283 $as_echo_n "checking Boot JDK version... " >&6; }
29284             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29285             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29286 $as_echo "$BOOT_JDK_VERSION" >&6; }
29287           fi # end check jdk version
29288         fi # end check javac
29289       fi # end check java
29290     fi # end check boot jdk found
29291   fi
29292 
29293   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29294 
29295   if test "x$BOOT_JDK_FOUND" = xno; then
29296     # Now execute the test
29297 
29298   BOOT_JDK_PREFIX="/usr/lib/jvm"
29299   BOOT_JDK_SUFFIX=""
29300   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29301   if test "x$ALL_JDKS_FOUND" != x; then
29302     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29303 
29304   if test "x$BOOT_JDK_FOUND" = xno; then
29305     # Now execute the test
29306 
29307         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29308         if test -d "$BOOT_JDK"; then
29309           BOOT_JDK_FOUND=maybe
29310           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29311 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29312         fi
29313 
29314 
29315     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29316     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29317       # Do we have a bin/java?
29318       if test ! -x "$BOOT_JDK/bin/java"; then
29319         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29320 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29321         BOOT_JDK_FOUND=no
29322       else
29323         # Do we have a bin/javac?
29324         if test ! -x "$BOOT_JDK/bin/javac"; then
29325           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29326 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29327           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29328 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29329           BOOT_JDK_FOUND=no
29330         else
29331           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29332           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29333 
29334           # Extra M4 quote needed to protect [] in grep expression.
29335           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29336           if test "x$FOUND_CORRECT_VERSION" = x; then
29337             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29338 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29339             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29340 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29341             BOOT_JDK_FOUND=no
29342           else
29343             # We're done! :-)
29344             BOOT_JDK_FOUND=yes
29345 
29346   # Only process if variable expands to non-empty
29347 
29348   if test "x$BOOT_JDK" != x; then
29349     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29350 
29351   # Input might be given as Windows format, start by converting to
29352   # unix format.
29353   path="$BOOT_JDK"
29354   new_path=`$CYGPATH -u "$path"`
29355 
29356   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29357   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29358   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29359   # "foo.exe" is OK but "foo" is an error.
29360   #
29361   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29362   # It is also a way to make sure we got the proper file name for the real test later on.
29363   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29364   if test "x$test_shortpath" = x; then
29365     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29366 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29367     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29368   fi
29369 
29370   # Call helper function which possibly converts this using DOS-style short mode.
29371   # If so, the updated path is stored in $new_path.
29372 
29373   input_path="$new_path"
29374   # Check if we need to convert this using DOS-style short mode. If the path
29375   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29376   # take no chances and rewrite it.
29377   # Note: m4 eats our [], so we need to use [ and ] instead.
29378   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29379   if test "x$has_forbidden_chars" != x; then
29380     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29381     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29382     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29383     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29384       # Going to short mode and back again did indeed matter. Since short mode is
29385       # case insensitive, let's make it lowercase to improve readability.
29386       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29387       # Now convert it back to Unix-style (cygpath)
29388       input_path=`$CYGPATH -u "$shortmode_path"`
29389       new_path="$input_path"
29390     fi
29391   fi
29392 
29393   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29394   if test "x$test_cygdrive_prefix" = x; then
29395     # As a simple fix, exclude /usr/bin since it's not a real path.
29396     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29397       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29398       # a path prefixed by /cygdrive for fixpath to work.
29399       new_path="$CYGWIN_ROOT_PATH$input_path"
29400     fi
29401   fi
29402 
29403 
29404   if test "x$path" != "x$new_path"; then
29405     BOOT_JDK="$new_path"
29406     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29407 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29408   fi
29409 
29410     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29411 
29412   path="$BOOT_JDK"
29413   has_colon=`$ECHO $path | $GREP ^.:`
29414   new_path="$path"
29415   if test "x$has_colon" = x; then
29416     # Not in mixed or Windows style, start by that.
29417     new_path=`cmd //c echo $path`
29418   fi
29419 
29420 
29421   input_path="$new_path"
29422   # Check if we need to convert this using DOS-style short mode. If the path
29423   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29424   # take no chances and rewrite it.
29425   # Note: m4 eats our [], so we need to use [ and ] instead.
29426   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29427   if test "x$has_forbidden_chars" != x; then
29428     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29429     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29430   fi
29431 
29432 
29433   windows_path="$new_path"
29434   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29435     unix_path=`$CYGPATH -u "$windows_path"`
29436     new_path="$unix_path"
29437   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29438     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29439     new_path="$unix_path"
29440   fi
29441 
29442   if test "x$path" != "x$new_path"; then
29443     BOOT_JDK="$new_path"
29444     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29445 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29446   fi
29447 
29448   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29449   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29450 
29451     else
29452       # We're on a unix platform. Hooray! :)
29453       path="$BOOT_JDK"
29454       has_space=`$ECHO "$path" | $GREP " "`
29455       if test "x$has_space" != x; then
29456         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29457 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29458         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29459       fi
29460 
29461       # Use eval to expand a potential ~
29462       eval path="$path"
29463       if test ! -f "$path" && test ! -d "$path"; then
29464         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29465       fi
29466 
29467       if test -d "$path"; then
29468         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29469       else
29470         dir="`$DIRNAME "$path"`"
29471         base="`$BASENAME "$path"`"
29472         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29473       fi
29474     fi
29475   fi
29476 
29477             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29478 $as_echo_n "checking for Boot JDK... " >&6; }
29479             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29480 $as_echo "$BOOT_JDK" >&6; }
29481             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29482 $as_echo_n "checking Boot JDK version... " >&6; }
29483             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29484             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29485 $as_echo "$BOOT_JDK_VERSION" >&6; }
29486           fi # end check jdk version
29487         fi # end check javac
29488       fi # end check java
29489     fi # end check boot jdk found
29490   fi
29491 
29492     done
29493   fi
29494 
29495 
29496     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29497     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29498       # Do we have a bin/java?
29499       if test ! -x "$BOOT_JDK/bin/java"; then
29500         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29501 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29502         BOOT_JDK_FOUND=no
29503       else
29504         # Do we have a bin/javac?
29505         if test ! -x "$BOOT_JDK/bin/javac"; then
29506           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29507 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29508           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29509 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29510           BOOT_JDK_FOUND=no
29511         else
29512           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29513           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29514 
29515           # Extra M4 quote needed to protect [] in grep expression.
29516           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29517           if test "x$FOUND_CORRECT_VERSION" = x; then
29518             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29519 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29520             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29521 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29522             BOOT_JDK_FOUND=no
29523           else
29524             # We're done! :-)
29525             BOOT_JDK_FOUND=yes
29526 
29527   # Only process if variable expands to non-empty
29528 
29529   if test "x$BOOT_JDK" != x; then
29530     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29531 
29532   # Input might be given as Windows format, start by converting to
29533   # unix format.
29534   path="$BOOT_JDK"
29535   new_path=`$CYGPATH -u "$path"`
29536 
29537   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29538   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29539   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29540   # "foo.exe" is OK but "foo" is an error.
29541   #
29542   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29543   # It is also a way to make sure we got the proper file name for the real test later on.
29544   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29545   if test "x$test_shortpath" = x; then
29546     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29547 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29548     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29549   fi
29550 
29551   # Call helper function which possibly converts this using DOS-style short mode.
29552   # If so, the updated path is stored in $new_path.
29553 
29554   input_path="$new_path"
29555   # Check if we need to convert this using DOS-style short mode. If the path
29556   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29557   # take no chances and rewrite it.
29558   # Note: m4 eats our [], so we need to use [ and ] instead.
29559   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29560   if test "x$has_forbidden_chars" != x; then
29561     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29562     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29563     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29564     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29565       # Going to short mode and back again did indeed matter. Since short mode is
29566       # case insensitive, let's make it lowercase to improve readability.
29567       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29568       # Now convert it back to Unix-style (cygpath)
29569       input_path=`$CYGPATH -u "$shortmode_path"`
29570       new_path="$input_path"
29571     fi
29572   fi
29573 
29574   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29575   if test "x$test_cygdrive_prefix" = x; then
29576     # As a simple fix, exclude /usr/bin since it's not a real path.
29577     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29578       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29579       # a path prefixed by /cygdrive for fixpath to work.
29580       new_path="$CYGWIN_ROOT_PATH$input_path"
29581     fi
29582   fi
29583 
29584 
29585   if test "x$path" != "x$new_path"; then
29586     BOOT_JDK="$new_path"
29587     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29588 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29589   fi
29590 
29591     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29592 
29593   path="$BOOT_JDK"
29594   has_colon=`$ECHO $path | $GREP ^.:`
29595   new_path="$path"
29596   if test "x$has_colon" = x; then
29597     # Not in mixed or Windows style, start by that.
29598     new_path=`cmd //c echo $path`
29599   fi
29600 
29601 
29602   input_path="$new_path"
29603   # Check if we need to convert this using DOS-style short mode. If the path
29604   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29605   # take no chances and rewrite it.
29606   # Note: m4 eats our [], so we need to use [ and ] instead.
29607   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29608   if test "x$has_forbidden_chars" != x; then
29609     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29610     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29611   fi
29612 
29613 
29614   windows_path="$new_path"
29615   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29616     unix_path=`$CYGPATH -u "$windows_path"`
29617     new_path="$unix_path"
29618   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29619     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29620     new_path="$unix_path"
29621   fi
29622 
29623   if test "x$path" != "x$new_path"; then
29624     BOOT_JDK="$new_path"
29625     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29626 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29627   fi
29628 
29629   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29630   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29631 
29632     else
29633       # We're on a unix platform. Hooray! :)
29634       path="$BOOT_JDK"
29635       has_space=`$ECHO "$path" | $GREP " "`
29636       if test "x$has_space" != x; then
29637         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29638 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29639         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29640       fi
29641 
29642       # Use eval to expand a potential ~
29643       eval path="$path"
29644       if test ! -f "$path" && test ! -d "$path"; then
29645         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29646       fi
29647 
29648       if test -d "$path"; then
29649         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29650       else
29651         dir="`$DIRNAME "$path"`"
29652         base="`$BASENAME "$path"`"
29653         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29654       fi
29655     fi
29656   fi
29657 
29658             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29659 $as_echo_n "checking for Boot JDK... " >&6; }
29660             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29661 $as_echo "$BOOT_JDK" >&6; }
29662             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29663 $as_echo_n "checking Boot JDK version... " >&6; }
29664             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29665             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29666 $as_echo "$BOOT_JDK_VERSION" >&6; }
29667           fi # end check jdk version
29668         fi # end check javac
29669       fi # end check java
29670     fi # end check boot jdk found
29671   fi
29672 
29673   fi
29674 
29675 
29676     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29677     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29678       # Do we have a bin/java?
29679       if test ! -x "$BOOT_JDK/bin/java"; then
29680         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29681 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29682         BOOT_JDK_FOUND=no
29683       else
29684         # Do we have a bin/javac?
29685         if test ! -x "$BOOT_JDK/bin/javac"; then
29686           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29687 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29688           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29689 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29690           BOOT_JDK_FOUND=no
29691         else
29692           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29693           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29694 
29695           # Extra M4 quote needed to protect [] in grep expression.
29696           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29697           if test "x$FOUND_CORRECT_VERSION" = x; then
29698             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29699 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29700             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29701 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29702             BOOT_JDK_FOUND=no
29703           else
29704             # We're done! :-)
29705             BOOT_JDK_FOUND=yes
29706 
29707   # Only process if variable expands to non-empty
29708 
29709   if test "x$BOOT_JDK" != x; then
29710     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29711 
29712   # Input might be given as Windows format, start by converting to
29713   # unix format.
29714   path="$BOOT_JDK"
29715   new_path=`$CYGPATH -u "$path"`
29716 
29717   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29718   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29719   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29720   # "foo.exe" is OK but "foo" is an error.
29721   #
29722   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29723   # It is also a way to make sure we got the proper file name for the real test later on.
29724   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29725   if test "x$test_shortpath" = x; then
29726     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29727 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29728     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29729   fi
29730 
29731   # Call helper function which possibly converts this using DOS-style short mode.
29732   # If so, the updated path is stored in $new_path.
29733 
29734   input_path="$new_path"
29735   # Check if we need to convert this using DOS-style short mode. If the path
29736   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29737   # take no chances and rewrite it.
29738   # Note: m4 eats our [], so we need to use [ and ] instead.
29739   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29740   if test "x$has_forbidden_chars" != x; then
29741     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29742     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29743     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29744     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29745       # Going to short mode and back again did indeed matter. Since short mode is
29746       # case insensitive, let's make it lowercase to improve readability.
29747       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29748       # Now convert it back to Unix-style (cygpath)
29749       input_path=`$CYGPATH -u "$shortmode_path"`
29750       new_path="$input_path"
29751     fi
29752   fi
29753 
29754   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29755   if test "x$test_cygdrive_prefix" = x; then
29756     # As a simple fix, exclude /usr/bin since it's not a real path.
29757     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29758       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29759       # a path prefixed by /cygdrive for fixpath to work.
29760       new_path="$CYGWIN_ROOT_PATH$input_path"
29761     fi
29762   fi
29763 
29764 
29765   if test "x$path" != "x$new_path"; then
29766     BOOT_JDK="$new_path"
29767     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29768 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29769   fi
29770 
29771     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29772 
29773   path="$BOOT_JDK"
29774   has_colon=`$ECHO $path | $GREP ^.:`
29775   new_path="$path"
29776   if test "x$has_colon" = x; then
29777     # Not in mixed or Windows style, start by that.
29778     new_path=`cmd //c echo $path`
29779   fi
29780 
29781 
29782   input_path="$new_path"
29783   # Check if we need to convert this using DOS-style short mode. If the path
29784   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29785   # take no chances and rewrite it.
29786   # Note: m4 eats our [], so we need to use [ and ] instead.
29787   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29788   if test "x$has_forbidden_chars" != x; then
29789     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29790     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29791   fi
29792 
29793 
29794   windows_path="$new_path"
29795   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29796     unix_path=`$CYGPATH -u "$windows_path"`
29797     new_path="$unix_path"
29798   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29799     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29800     new_path="$unix_path"
29801   fi
29802 
29803   if test "x$path" != "x$new_path"; then
29804     BOOT_JDK="$new_path"
29805     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29806 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29807   fi
29808 
29809   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29810   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29811 
29812     else
29813       # We're on a unix platform. Hooray! :)
29814       path="$BOOT_JDK"
29815       has_space=`$ECHO "$path" | $GREP " "`
29816       if test "x$has_space" != x; then
29817         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29818 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29819         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29820       fi
29821 
29822       # Use eval to expand a potential ~
29823       eval path="$path"
29824       if test ! -f "$path" && test ! -d "$path"; then
29825         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29826       fi
29827 
29828       if test -d "$path"; then
29829         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29830       else
29831         dir="`$DIRNAME "$path"`"
29832         base="`$BASENAME "$path"`"
29833         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29834       fi
29835     fi
29836   fi
29837 
29838             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29839 $as_echo_n "checking for Boot JDK... " >&6; }
29840             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29841 $as_echo "$BOOT_JDK" >&6; }
29842             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29843 $as_echo_n "checking Boot JDK version... " >&6; }
29844             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29845             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29846 $as_echo "$BOOT_JDK_VERSION" >&6; }
29847           fi # end check jdk version
29848         fi # end check javac
29849       fi # end check java
29850     fi # end check boot jdk found
29851   fi
29852 
29853 
29854   # If we haven't found anything yet, we've truly lost. Give up.
29855   if test "x$BOOT_JDK_FOUND" = xno; then
29856 
29857   # Print a helpful message on how to acquire the necessary build dependency.
29858   # openjdk is the help tag: freetype, cups, alsa etc
29859   MISSING_DEPENDENCY=openjdk
29860 
29861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29862     cygwin_help $MISSING_DEPENDENCY
29863   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29864     msys_help $MISSING_DEPENDENCY
29865   else
29866     PKGHANDLER_COMMAND=
29867 
29868     case $PKGHANDLER in
29869       apt-get)
29870         apt_help     $MISSING_DEPENDENCY ;;
29871       yum)
29872         yum_help     $MISSING_DEPENDENCY ;;
29873       port)
29874         port_help    $MISSING_DEPENDENCY ;;
29875       pkgutil)
29876         pkgutil_help $MISSING_DEPENDENCY ;;
29877       pkgadd)
29878         pkgadd_help  $MISSING_DEPENDENCY ;;
29879     esac
29880 
29881     if test "x$PKGHANDLER_COMMAND" != x; then
29882       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29883     fi
29884   fi
29885 
29886     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29887 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29888     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29889 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29890     as_fn_error $? "Cannot continue" "$LINENO" 5
29891   fi
29892 
29893 
29894 
29895   # Setup tools from the Boot JDK.
29896 
29897   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29898 
29899   # Publish this variable in the help.
29900 
29901 
29902   if [ -z "${JAVA+x}" ]; then
29903     # The variable is not set by user, try to locate tool using the code snippet
29904 
29905       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29906 $as_echo_n "checking for java in Boot JDK... " >&6; }
29907       JAVA=$BOOT_JDK/bin/java
29908       if test ! -x $JAVA; then
29909         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29910 $as_echo "not found" >&6; }
29911         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29912 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29913         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29914       fi
29915       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29916 $as_echo "ok" >&6; }
29917 
29918 
29919   else
29920     # The variable is set, but is it from the command line or the environment?
29921 
29922     # Try to remove the string !JAVA! from our list.
29923     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29924     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29925       # If it failed, the variable was not from the command line. Ignore it,
29926       # but warn the user (except for BASH, which is always set by the calling BASH).
29927       if test "xJAVA" != xBASH; then
29928         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29929 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29930       fi
29931       # Try to locate tool using the code snippet
29932 
29933       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29934 $as_echo_n "checking for java in Boot JDK... " >&6; }
29935       JAVA=$BOOT_JDK/bin/java
29936       if test ! -x $JAVA; then
29937         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29938 $as_echo "not found" >&6; }
29939         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29940 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29941         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29942       fi
29943       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29944 $as_echo "ok" >&6; }
29945 
29946 
29947     else
29948       # If it succeeded, then it was overridden by the user. We will use it
29949       # for the tool.
29950 
29951       # First remove it from the list of overridden variables, so we can test
29952       # for unknown variables in the end.
29953       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29954 
29955       # Check if we try to supply an empty value
29956       if test "x$JAVA" = x; then
29957         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29958 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29959         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29960 $as_echo_n "checking for JAVA... " >&6; }
29961         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29962 $as_echo "disabled" >&6; }
29963       else
29964         # Check if the provided tool contains a complete path.
29965         tool_specified="$JAVA"
29966         tool_basename="${tool_specified##*/}"
29967         if test "x$tool_basename" = "x$tool_specified"; then
29968           # A command without a complete path is provided, search $PATH.
29969           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29970 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29971           # Extract the first word of "$tool_basename", so it can be a program name with args.
29972 set dummy $tool_basename; ac_word=$2
29973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29974 $as_echo_n "checking for $ac_word... " >&6; }
29975 if ${ac_cv_path_JAVA+:} false; then :
29976   $as_echo_n "(cached) " >&6
29977 else
29978   case $JAVA in
29979   [\\/]* | ?:[\\/]*)
29980   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29981   ;;
29982   *)
29983   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29984 for as_dir in $PATH
29985 do
29986   IFS=$as_save_IFS
29987   test -z "$as_dir" && as_dir=.
29988     for ac_exec_ext in '' $ac_executable_extensions; do
29989   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29990     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29991     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29992     break 2
29993   fi
29994 done
29995   done
29996 IFS=$as_save_IFS
29997 
29998   ;;
29999 esac
30000 fi
30001 JAVA=$ac_cv_path_JAVA
30002 if test -n "$JAVA"; then
30003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30004 $as_echo "$JAVA" >&6; }
30005 else
30006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30007 $as_echo "no" >&6; }
30008 fi
30009 
30010 
30011           if test "x$JAVA" = x; then
30012             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30013           fi
30014         else
30015           # Otherwise we believe it is a complete path. Use it as it is.
30016           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30017 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30018           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30019 $as_echo_n "checking for JAVA... " >&6; }
30020           if test ! -x "$tool_specified"; then
30021             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30022 $as_echo "not found" >&6; }
30023             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30024           fi
30025           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30026 $as_echo "$tool_specified" >&6; }
30027         fi
30028       fi
30029     fi
30030 
30031   fi
30032 
30033 
30034 
30035   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30036 
30037   # Publish this variable in the help.
30038 
30039 
30040   if [ -z "${JAVAC+x}" ]; then
30041     # The variable is not set by user, try to locate tool using the code snippet
30042 
30043       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30044 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30045       JAVAC=$BOOT_JDK/bin/javac
30046       if test ! -x $JAVAC; then
30047         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30048 $as_echo "not found" >&6; }
30049         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30050 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30051         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30052       fi
30053       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30054 $as_echo "ok" >&6; }
30055 
30056 
30057   else
30058     # The variable is set, but is it from the command line or the environment?
30059 
30060     # Try to remove the string !JAVAC! from our list.
30061     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30062     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30063       # If it failed, the variable was not from the command line. Ignore it,
30064       # but warn the user (except for BASH, which is always set by the calling BASH).
30065       if test "xJAVAC" != xBASH; then
30066         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30067 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30068       fi
30069       # Try to locate tool using the code snippet
30070 
30071       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30072 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30073       JAVAC=$BOOT_JDK/bin/javac
30074       if test ! -x $JAVAC; then
30075         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30076 $as_echo "not found" >&6; }
30077         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30078 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30079         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30080       fi
30081       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30082 $as_echo "ok" >&6; }
30083 
30084 
30085     else
30086       # If it succeeded, then it was overridden by the user. We will use it
30087       # for the tool.
30088 
30089       # First remove it from the list of overridden variables, so we can test
30090       # for unknown variables in the end.
30091       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30092 
30093       # Check if we try to supply an empty value
30094       if test "x$JAVAC" = x; then
30095         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30096 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30097         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30098 $as_echo_n "checking for JAVAC... " >&6; }
30099         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30100 $as_echo "disabled" >&6; }
30101       else
30102         # Check if the provided tool contains a complete path.
30103         tool_specified="$JAVAC"
30104         tool_basename="${tool_specified##*/}"
30105         if test "x$tool_basename" = "x$tool_specified"; then
30106           # A command without a complete path is provided, search $PATH.
30107           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30108 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30109           # Extract the first word of "$tool_basename", so it can be a program name with args.
30110 set dummy $tool_basename; ac_word=$2
30111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30112 $as_echo_n "checking for $ac_word... " >&6; }
30113 if ${ac_cv_path_JAVAC+:} false; then :
30114   $as_echo_n "(cached) " >&6
30115 else
30116   case $JAVAC in
30117   [\\/]* | ?:[\\/]*)
30118   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30119   ;;
30120   *)
30121   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30122 for as_dir in $PATH
30123 do
30124   IFS=$as_save_IFS
30125   test -z "$as_dir" && as_dir=.
30126     for ac_exec_ext in '' $ac_executable_extensions; do
30127   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30128     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30129     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30130     break 2
30131   fi
30132 done
30133   done
30134 IFS=$as_save_IFS
30135 
30136   ;;
30137 esac
30138 fi
30139 JAVAC=$ac_cv_path_JAVAC
30140 if test -n "$JAVAC"; then
30141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30142 $as_echo "$JAVAC" >&6; }
30143 else
30144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30145 $as_echo "no" >&6; }
30146 fi
30147 
30148 
30149           if test "x$JAVAC" = x; then
30150             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30151           fi
30152         else
30153           # Otherwise we believe it is a complete path. Use it as it is.
30154           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30155 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30156           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30157 $as_echo_n "checking for JAVAC... " >&6; }
30158           if test ! -x "$tool_specified"; then
30159             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30160 $as_echo "not found" >&6; }
30161             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30162           fi
30163           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30164 $as_echo "$tool_specified" >&6; }
30165         fi
30166       fi
30167     fi
30168 
30169   fi
30170 
30171 
30172 
30173   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30174 
30175   # Publish this variable in the help.
30176 
30177 
30178   if [ -z "${JAVAH+x}" ]; then
30179     # The variable is not set by user, try to locate tool using the code snippet
30180 
30181       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30182 $as_echo_n "checking for javah in Boot JDK... " >&6; }
30183       JAVAH=$BOOT_JDK/bin/javah
30184       if test ! -x $JAVAH; then
30185         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30186 $as_echo "not found" >&6; }
30187         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30188 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30189         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30190       fi
30191       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30192 $as_echo "ok" >&6; }
30193 
30194 
30195   else
30196     # The variable is set, but is it from the command line or the environment?
30197 
30198     # Try to remove the string !JAVAH! from our list.
30199     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30200     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30201       # If it failed, the variable was not from the command line. Ignore it,
30202       # but warn the user (except for BASH, which is always set by the calling BASH).
30203       if test "xJAVAH" != xBASH; then
30204         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30205 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30206       fi
30207       # Try to locate tool using the code snippet
30208 
30209       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30210 $as_echo_n "checking for javah in Boot JDK... " >&6; }
30211       JAVAH=$BOOT_JDK/bin/javah
30212       if test ! -x $JAVAH; then
30213         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30214 $as_echo "not found" >&6; }
30215         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30216 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30217         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30218       fi
30219       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30220 $as_echo "ok" >&6; }
30221 
30222 
30223     else
30224       # If it succeeded, then it was overridden by the user. We will use it
30225       # for the tool.
30226 
30227       # First remove it from the list of overridden variables, so we can test
30228       # for unknown variables in the end.
30229       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30230 
30231       # Check if we try to supply an empty value
30232       if test "x$JAVAH" = x; then
30233         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30234 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30235         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30236 $as_echo_n "checking for JAVAH... " >&6; }
30237         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30238 $as_echo "disabled" >&6; }
30239       else
30240         # Check if the provided tool contains a complete path.
30241         tool_specified="$JAVAH"
30242         tool_basename="${tool_specified##*/}"
30243         if test "x$tool_basename" = "x$tool_specified"; then
30244           # A command without a complete path is provided, search $PATH.
30245           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30246 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30247           # Extract the first word of "$tool_basename", so it can be a program name with args.
30248 set dummy $tool_basename; ac_word=$2
30249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30250 $as_echo_n "checking for $ac_word... " >&6; }
30251 if ${ac_cv_path_JAVAH+:} false; then :
30252   $as_echo_n "(cached) " >&6
30253 else
30254   case $JAVAH in
30255   [\\/]* | ?:[\\/]*)
30256   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30257   ;;
30258   *)
30259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30260 for as_dir in $PATH
30261 do
30262   IFS=$as_save_IFS
30263   test -z "$as_dir" && as_dir=.
30264     for ac_exec_ext in '' $ac_executable_extensions; do
30265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30266     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30268     break 2
30269   fi
30270 done
30271   done
30272 IFS=$as_save_IFS
30273 
30274   ;;
30275 esac
30276 fi
30277 JAVAH=$ac_cv_path_JAVAH
30278 if test -n "$JAVAH"; then
30279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30280 $as_echo "$JAVAH" >&6; }
30281 else
30282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30283 $as_echo "no" >&6; }
30284 fi
30285 
30286 
30287           if test "x$JAVAH" = x; then
30288             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30289           fi
30290         else
30291           # Otherwise we believe it is a complete path. Use it as it is.
30292           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30293 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30294           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30295 $as_echo_n "checking for JAVAH... " >&6; }
30296           if test ! -x "$tool_specified"; then
30297             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30298 $as_echo "not found" >&6; }
30299             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30300           fi
30301           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30302 $as_echo "$tool_specified" >&6; }
30303         fi
30304       fi
30305     fi
30306 
30307   fi
30308 
30309 
30310 
30311   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30312 
30313   # Publish this variable in the help.
30314 
30315 
30316   if [ -z "${JAR+x}" ]; then
30317     # The variable is not set by user, try to locate tool using the code snippet
30318 
30319       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30320 $as_echo_n "checking for jar in Boot JDK... " >&6; }
30321       JAR=$BOOT_JDK/bin/jar
30322       if test ! -x $JAR; then
30323         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30324 $as_echo "not found" >&6; }
30325         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30326 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30327         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30328       fi
30329       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30330 $as_echo "ok" >&6; }
30331 
30332 
30333   else
30334     # The variable is set, but is it from the command line or the environment?
30335 
30336     # Try to remove the string !JAR! from our list.
30337     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30338     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30339       # If it failed, the variable was not from the command line. Ignore it,
30340       # but warn the user (except for BASH, which is always set by the calling BASH).
30341       if test "xJAR" != xBASH; then
30342         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30343 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30344       fi
30345       # Try to locate tool using the code snippet
30346 
30347       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30348 $as_echo_n "checking for jar in Boot JDK... " >&6; }
30349       JAR=$BOOT_JDK/bin/jar
30350       if test ! -x $JAR; then
30351         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30352 $as_echo "not found" >&6; }
30353         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30354 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30355         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30356       fi
30357       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30358 $as_echo "ok" >&6; }
30359 
30360 
30361     else
30362       # If it succeeded, then it was overridden by the user. We will use it
30363       # for the tool.
30364 
30365       # First remove it from the list of overridden variables, so we can test
30366       # for unknown variables in the end.
30367       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30368 
30369       # Check if we try to supply an empty value
30370       if test "x$JAR" = x; then
30371         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30372 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30373         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30374 $as_echo_n "checking for JAR... " >&6; }
30375         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30376 $as_echo "disabled" >&6; }
30377       else
30378         # Check if the provided tool contains a complete path.
30379         tool_specified="$JAR"
30380         tool_basename="${tool_specified##*/}"
30381         if test "x$tool_basename" = "x$tool_specified"; then
30382           # A command without a complete path is provided, search $PATH.
30383           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30384 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30385           # Extract the first word of "$tool_basename", so it can be a program name with args.
30386 set dummy $tool_basename; ac_word=$2
30387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30388 $as_echo_n "checking for $ac_word... " >&6; }
30389 if ${ac_cv_path_JAR+:} false; then :
30390   $as_echo_n "(cached) " >&6
30391 else
30392   case $JAR in
30393   [\\/]* | ?:[\\/]*)
30394   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30395   ;;
30396   *)
30397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30398 for as_dir in $PATH
30399 do
30400   IFS=$as_save_IFS
30401   test -z "$as_dir" && as_dir=.
30402     for ac_exec_ext in '' $ac_executable_extensions; do
30403   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30404     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30405     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30406     break 2
30407   fi
30408 done
30409   done
30410 IFS=$as_save_IFS
30411 
30412   ;;
30413 esac
30414 fi
30415 JAR=$ac_cv_path_JAR
30416 if test -n "$JAR"; then
30417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30418 $as_echo "$JAR" >&6; }
30419 else
30420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30421 $as_echo "no" >&6; }
30422 fi
30423 
30424 
30425           if test "x$JAR" = x; then
30426             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30427           fi
30428         else
30429           # Otherwise we believe it is a complete path. Use it as it is.
30430           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30431 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30432           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30433 $as_echo_n "checking for JAR... " >&6; }
30434           if test ! -x "$tool_specified"; then
30435             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30436 $as_echo "not found" >&6; }
30437             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30438           fi
30439           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30440 $as_echo "$tool_specified" >&6; }
30441         fi
30442       fi
30443     fi
30444 
30445   fi
30446 
30447 
30448 
30449   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30450 
30451   # Publish this variable in the help.
30452 
30453 
30454   if [ -z "${JARSIGNER+x}" ]; then
30455     # The variable is not set by user, try to locate tool using the code snippet
30456 
30457       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30458 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30459       JARSIGNER=$BOOT_JDK/bin/jarsigner
30460       if test ! -x $JARSIGNER; then
30461         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30462 $as_echo "not found" >&6; }
30463         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30464 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30465         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30466       fi
30467       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30468 $as_echo "ok" >&6; }
30469 
30470 
30471   else
30472     # The variable is set, but is it from the command line or the environment?
30473 
30474     # Try to remove the string !JARSIGNER! from our list.
30475     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30476     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30477       # If it failed, the variable was not from the command line. Ignore it,
30478       # but warn the user (except for BASH, which is always set by the calling BASH).
30479       if test "xJARSIGNER" != xBASH; then
30480         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30481 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30482       fi
30483       # Try to locate tool using the code snippet
30484 
30485       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30486 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30487       JARSIGNER=$BOOT_JDK/bin/jarsigner
30488       if test ! -x $JARSIGNER; then
30489         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30490 $as_echo "not found" >&6; }
30491         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30492 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30493         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30494       fi
30495       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30496 $as_echo "ok" >&6; }
30497 
30498 
30499     else
30500       # If it succeeded, then it was overridden by the user. We will use it
30501       # for the tool.
30502 
30503       # First remove it from the list of overridden variables, so we can test
30504       # for unknown variables in the end.
30505       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30506 
30507       # Check if we try to supply an empty value
30508       if test "x$JARSIGNER" = x; then
30509         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30510 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30511         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30512 $as_echo_n "checking for JARSIGNER... " >&6; }
30513         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30514 $as_echo "disabled" >&6; }
30515       else
30516         # Check if the provided tool contains a complete path.
30517         tool_specified="$JARSIGNER"
30518         tool_basename="${tool_specified##*/}"
30519         if test "x$tool_basename" = "x$tool_specified"; then
30520           # A command without a complete path is provided, search $PATH.
30521           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30522 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30523           # Extract the first word of "$tool_basename", so it can be a program name with args.
30524 set dummy $tool_basename; ac_word=$2
30525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30526 $as_echo_n "checking for $ac_word... " >&6; }
30527 if ${ac_cv_path_JARSIGNER+:} false; then :
30528   $as_echo_n "(cached) " >&6
30529 else
30530   case $JARSIGNER in
30531   [\\/]* | ?:[\\/]*)
30532   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30533   ;;
30534   *)
30535   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30536 for as_dir in $PATH
30537 do
30538   IFS=$as_save_IFS
30539   test -z "$as_dir" && as_dir=.
30540     for ac_exec_ext in '' $ac_executable_extensions; do
30541   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30542     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30543     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30544     break 2
30545   fi
30546 done
30547   done
30548 IFS=$as_save_IFS
30549 
30550   ;;
30551 esac
30552 fi
30553 JARSIGNER=$ac_cv_path_JARSIGNER
30554 if test -n "$JARSIGNER"; then
30555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30556 $as_echo "$JARSIGNER" >&6; }
30557 else
30558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30559 $as_echo "no" >&6; }
30560 fi
30561 
30562 
30563           if test "x$JARSIGNER" = x; then
30564             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30565           fi
30566         else
30567           # Otherwise we believe it is a complete path. Use it as it is.
30568           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30569 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30570           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30571 $as_echo_n "checking for JARSIGNER... " >&6; }
30572           if test ! -x "$tool_specified"; then
30573             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30574 $as_echo "not found" >&6; }
30575             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30576           fi
30577           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30578 $as_echo "$tool_specified" >&6; }
30579         fi
30580       fi
30581     fi
30582 
30583   fi
30584 
30585 
30586 
30587   # Finally, set some other options...
30588 
30589   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30590   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30591 
30592 
30593 
30594   $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30595   $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30596   OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30597   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30598   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30599   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30600     dummy="$dummy --patch-module foo=bar"
30601     JVM_ARG_OK=true
30602   else
30603     $ECHO "Arg failed:" >&5
30604     $ECHO "$OUTPUT" >&5
30605     JVM_ARG_OK=false
30606   fi
30607 
30608   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30609 $as_echo_n "checking if Boot JDK supports modules... " >&6; }
30610   if test "x$JVM_ARG_OK" = "xtrue"; then
30611     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30612 $as_echo "yes" >&6; }
30613     BOOT_JDK_MODULAR="true"
30614   else
30615     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30616 $as_echo "no" >&6; }
30617     BOOT_JDK_MODULAR="false"
30618   fi
30619 
30620 
30621 
30622 
30623   # Check if the boot jdk is 32 or 64 bit
30624   if "$JAVA" -d64 -version > /dev/null 2>&1; then
30625     BOOT_JDK_BITS="64"
30626   else
30627     BOOT_JDK_BITS="32"
30628   fi
30629   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30630 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30632 $as_echo "$BOOT_JDK_BITS" >&6; }
30633 
30634 
30635 
30636 
30637 # Check whether --with-build-jdk was given.
30638 if test "${with_build_jdk+set}" = set; then :
30639   withval=$with_build_jdk;
30640 fi
30641 
30642 
30643   CREATE_BUILDJDK=false
30644   EXTERNAL_BUILDJDK=false
30645   BUILD_JDK_FOUND="no"
30646   if test "x$with_build_jdk" != "x"; then
30647 
30648   if test "x$BUILD_JDK_FOUND" = xno; then
30649     # Execute the test
30650 
30651        if test "x$with_build_jdk" != x; then
30652          BUILD_JDK=$with_build_jdk
30653          BUILD_JDK_FOUND=maybe
30654          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30655 $as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30656        fi
30657 
30658     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30659     if test "x$BUILD_JDK_FOUND" = xmaybe; then
30660       # Do we have a bin/java?
30661       if test ! -x "$BUILD_JDK/bin/java"; then
30662         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30663 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30664         BUILD_JDK_FOUND=no
30665       elif test ! -x "$BUILD_JDK/bin/jlink"; then
30666         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30667 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30668         BUILD_JDK_FOUND=no
30669       elif test ! -x "$BUILD_JDK/bin/jmod"; then
30670         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30671 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30672         BUILD_JDK_FOUND=no
30673       elif test ! -x "$BUILD_JDK/bin/javac"; then
30674         # Do we have a bin/javac?
30675         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30676 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30677         { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30678 $as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30679         BUILD_JDK_FOUND=no
30680       else
30681         # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30682         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30683 
30684         # Extra M4 quote needed to protect [] in grep expression.
30685         FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30686         if test "x$FOUND_CORRECT_VERSION" = x; then
30687           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30688 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30689           { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30690 $as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30691           BUILD_JDK_FOUND=no
30692         else
30693           # We're done!
30694           BUILD_JDK_FOUND=yes
30695 
30696   # Only process if variable expands to non-empty
30697 
30698   if test "x$BUILD_JDK" != x; then
30699     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30700 
30701   # Input might be given as Windows format, start by converting to
30702   # unix format.
30703   path="$BUILD_JDK"
30704   new_path=`$CYGPATH -u "$path"`
30705 
30706   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30707   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30708   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30709   # "foo.exe" is OK but "foo" is an error.
30710   #
30711   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30712   # It is also a way to make sure we got the proper file name for the real test later on.
30713   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30714   if test "x$test_shortpath" = x; then
30715     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30716 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30717     as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30718   fi
30719 
30720   # Call helper function which possibly converts this using DOS-style short mode.
30721   # If so, the updated path is stored in $new_path.
30722 
30723   input_path="$new_path"
30724   # Check if we need to convert this using DOS-style short mode. If the path
30725   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30726   # take no chances and rewrite it.
30727   # Note: m4 eats our [], so we need to use [ and ] instead.
30728   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30729   if test "x$has_forbidden_chars" != x; then
30730     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30731     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30732     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30733     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30734       # Going to short mode and back again did indeed matter. Since short mode is
30735       # case insensitive, let's make it lowercase to improve readability.
30736       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30737       # Now convert it back to Unix-style (cygpath)
30738       input_path=`$CYGPATH -u "$shortmode_path"`
30739       new_path="$input_path"
30740     fi
30741   fi
30742 
30743   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30744   if test "x$test_cygdrive_prefix" = x; then
30745     # As a simple fix, exclude /usr/bin since it's not a real path.
30746     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30747       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30748       # a path prefixed by /cygdrive for fixpath to work.
30749       new_path="$CYGWIN_ROOT_PATH$input_path"
30750     fi
30751   fi
30752 
30753 
30754   if test "x$path" != "x$new_path"; then
30755     BUILD_JDK="$new_path"
30756     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30757 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30758   fi
30759 
30760     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30761 
30762   path="$BUILD_JDK"
30763   has_colon=`$ECHO $path | $GREP ^.:`
30764   new_path="$path"
30765   if test "x$has_colon" = x; then
30766     # Not in mixed or Windows style, start by that.
30767     new_path=`cmd //c echo $path`
30768   fi
30769 
30770 
30771   input_path="$new_path"
30772   # Check if we need to convert this using DOS-style short mode. If the path
30773   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30774   # take no chances and rewrite it.
30775   # Note: m4 eats our [], so we need to use [ and ] instead.
30776   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30777   if test "x$has_forbidden_chars" != x; then
30778     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30779     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30780   fi
30781 
30782 
30783   windows_path="$new_path"
30784   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30785     unix_path=`$CYGPATH -u "$windows_path"`
30786     new_path="$unix_path"
30787   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30788     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30789     new_path="$unix_path"
30790   fi
30791 
30792   if test "x$path" != "x$new_path"; then
30793     BUILD_JDK="$new_path"
30794     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30795 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30796   fi
30797 
30798   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30799   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30800 
30801     else
30802       # We're on a unix platform. Hooray! :)
30803       path="$BUILD_JDK"
30804       has_space=`$ECHO "$path" | $GREP " "`
30805       if test "x$has_space" != x; then
30806         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30807 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30808         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30809       fi
30810 
30811       # Use eval to expand a potential ~
30812       eval path="$path"
30813       if test ! -f "$path" && test ! -d "$path"; then
30814         as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30815       fi
30816 
30817       if test -d "$path"; then
30818         BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30819       else
30820         dir="`$DIRNAME "$path"`"
30821         base="`$BASENAME "$path"`"
30822         BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30823       fi
30824     fi
30825   fi
30826 
30827           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30828 $as_echo_n "checking for Build JDK... " >&6; }
30829           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30830 $as_echo "$BUILD_JDK" >&6; }
30831           { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30832 $as_echo_n "checking Build JDK version... " >&6; }
30833           BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30834           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30835 $as_echo "$BUILD_JDK_VERSION" >&6; }
30836         fi # end check jdk version
30837       fi # end check java
30838     fi # end check build jdk found
30839   fi
30840 
30841     EXTERNAL_BUILDJDK=true
30842   else
30843     if test "x$COMPILE_TYPE" = "xcross"; then
30844       BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30845       BUILD_JDK_FOUND=yes
30846       CREATE_BUILDJDK=true
30847       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30848 $as_echo_n "checking for Build JDK... " >&6; }
30849       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30850 $as_echo "yes, will build it for the host platform" >&6; }
30851     else
30852       BUILD_JDK="\$(JDK_OUTPUTDIR)"
30853       BUILD_JDK_FOUND=yes
30854       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30855 $as_echo_n "checking for Build JDK... " >&6; }
30856       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30857 $as_echo "yes, will use output dir" >&6; }
30858     fi
30859   fi
30860 
30861   JMOD="$BUILD_JDK/bin/jmod"
30862   JLINK="$BUILD_JDK/bin/jlink"
30863 
30864 
30865 
30866   if test "x$BUILD_JDK_FOUND" != "xyes"; then
30867     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30868 $as_echo_n "checking for Build JDK... " >&6; }
30869     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30870 $as_echo "no" >&6; }
30871     as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30872   fi
30873 
30874 
30875 
30876 
30877 
30878 
30879 ###############################################################################
30880 #
30881 # Configure the sources to use. We can add or override individual directories.
30882 #
30883 ###############################################################################
30884 
30885 
30886   # Where are the sources.
30887   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30888   CORBA_TOPDIR="$SRC_ROOT/corba"
30889   JAXP_TOPDIR="$SRC_ROOT/jaxp"
30890   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30891   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30892   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30893   JDK_TOPDIR="$SRC_ROOT/jdk"
30894 
30895 
30896 
30897 
30898 
30899 
30900 
30901 
30902 
30903   # This feature is no longer supported.
30904 
30905 
30906 
30907 # Check whether --with-add-source-root was given.
30908 if test "${with_add_source_root+set}" = set; then :
30909   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
30910 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30911 fi
30912 
30913 
30914 
30915 
30916 # Check whether --with-override-source-root was given.
30917 if test "${with_override_source_root+set}" = set; then :
30918   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
30919 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30920 fi
30921 
30922 
30923 
30924 
30925 # Check whether --with-adds-and-overrides was given.
30926 if test "${with_adds_and_overrides+set}" = set; then :
30927   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
30928 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30929 fi
30930 
30931 
30932 
30933 
30934 # Check whether --with-override-langtools was given.
30935 if test "${with_override_langtools+set}" = set; then :
30936   withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30937 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30938 fi
30939 
30940 
30941 
30942 
30943 # Check whether --with-override-corba was given.
30944 if test "${with_override_corba+set}" = set; then :
30945   withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30946 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30947 fi
30948 
30949 
30950 
30951 
30952 # Check whether --with-override-jaxp was given.
30953 if test "${with_override_jaxp+set}" = set; then :
30954   withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30955 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30956 fi
30957 
30958 
30959 
30960 
30961 # Check whether --with-override-jaxws was given.
30962 if test "${with_override_jaxws+set}" = set; then :
30963   withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30964 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30965 fi
30966 
30967 
30968 
30969 
30970 # Check whether --with-override-hotspot was given.
30971 if test "${with_override_hotspot+set}" = set; then :
30972   withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30973 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30974 fi
30975 
30976 
30977 
30978 
30979 # Check whether --with-override-nashorn was given.
30980 if test "${with_override_nashorn+set}" = set; then :
30981   withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30982 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30983 fi
30984 
30985 
30986 
30987 
30988 # Check whether --with-override-jdk was given.
30989 if test "${with_override_jdk+set}" = set; then :
30990   withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30991 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30992 fi
30993 
30994 
30995 
30996 
30997   BUILD_OUTPUT="$OUTPUT_ROOT"
30998 
30999 
31000   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
31001   BUILD_HOTSPOT=true
31002 
31003 
31004 
31005 # Check whether --with-import-hotspot was given.
31006 if test "${with_import_hotspot+set}" = set; then :
31007   withval=$with_import_hotspot;
31008 fi
31009 
31010   if test "x$with_import_hotspot" != x; then
31011     CURDIR="$PWD"
31012     cd "$with_import_hotspot"
31013     HOTSPOT_DIST="`pwd`"
31014     cd "$CURDIR"
31015     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31016       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31017     fi
31018     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31019 $as_echo_n "checking if hotspot should be imported... " >&6; }
31020     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31021 $as_echo "yes from $HOTSPOT_DIST" >&6; }
31022     BUILD_HOTSPOT=false
31023   fi
31024 
31025   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31026 
31027 
31028 
31029 
31030 # Check whether --with-import-modules was given.
31031 if test "${with_import_modules+set}" = set; then :
31032   withval=$with_import_modules;
31033 fi
31034 
31035 
31036   if test "x$with_import_modules" != x \
31037       && test "x$with_import_modules" != "xno"; then
31038     if test -d "$with_import_modules"; then
31039       IMPORT_MODULES_TOPDIR="$with_import_modules"
31040 
31041   # Only process if variable expands to non-empty
31042 
31043   if test "x$IMPORT_MODULES_TOPDIR" != x; then
31044     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31045 
31046   # Input might be given as Windows format, start by converting to
31047   # unix format.
31048   path="$IMPORT_MODULES_TOPDIR"
31049   new_path=`$CYGPATH -u "$path"`
31050 
31051   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31052   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31053   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31054   # "foo.exe" is OK but "foo" is an error.
31055   #
31056   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31057   # It is also a way to make sure we got the proper file name for the real test later on.
31058   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31059   if test "x$test_shortpath" = x; then
31060     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31061 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31062     as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31063   fi
31064 
31065   # Call helper function which possibly converts this using DOS-style short mode.
31066   # If so, the updated path is stored in $new_path.
31067 
31068   input_path="$new_path"
31069   # Check if we need to convert this using DOS-style short mode. If the path
31070   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31071   # take no chances and rewrite it.
31072   # Note: m4 eats our [], so we need to use [ and ] instead.
31073   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31074   if test "x$has_forbidden_chars" != x; then
31075     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31076     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31077     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31078     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31079       # Going to short mode and back again did indeed matter. Since short mode is
31080       # case insensitive, let's make it lowercase to improve readability.
31081       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31082       # Now convert it back to Unix-style (cygpath)
31083       input_path=`$CYGPATH -u "$shortmode_path"`
31084       new_path="$input_path"
31085     fi
31086   fi
31087 
31088   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31089   if test "x$test_cygdrive_prefix" = x; then
31090     # As a simple fix, exclude /usr/bin since it's not a real path.
31091     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31092       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31093       # a path prefixed by /cygdrive for fixpath to work.
31094       new_path="$CYGWIN_ROOT_PATH$input_path"
31095     fi
31096   fi
31097 
31098 
31099   if test "x$path" != "x$new_path"; then
31100     IMPORT_MODULES_TOPDIR="$new_path"
31101     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31102 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31103   fi
31104 
31105     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31106 
31107   path="$IMPORT_MODULES_TOPDIR"
31108   has_colon=`$ECHO $path | $GREP ^.:`
31109   new_path="$path"
31110   if test "x$has_colon" = x; then
31111     # Not in mixed or Windows style, start by that.
31112     new_path=`cmd //c echo $path`
31113   fi
31114 
31115 
31116   input_path="$new_path"
31117   # Check if we need to convert this using DOS-style short mode. If the path
31118   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31119   # take no chances and rewrite it.
31120   # Note: m4 eats our [], so we need to use [ and ] instead.
31121   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31122   if test "x$has_forbidden_chars" != x; then
31123     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31124     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31125   fi
31126 
31127 
31128   windows_path="$new_path"
31129   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31130     unix_path=`$CYGPATH -u "$windows_path"`
31131     new_path="$unix_path"
31132   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31133     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31134     new_path="$unix_path"
31135   fi
31136 
31137   if test "x$path" != "x$new_path"; then
31138     IMPORT_MODULES_TOPDIR="$new_path"
31139     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31140 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31141   fi
31142 
31143   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31144   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31145 
31146     else
31147       # We're on a unix platform. Hooray! :)
31148       path="$IMPORT_MODULES_TOPDIR"
31149       has_space=`$ECHO "$path" | $GREP " "`
31150       if test "x$has_space" != x; then
31151         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31152 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31153         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31154       fi
31155 
31156       # Use eval to expand a potential ~
31157       eval path="$path"
31158       if test ! -f "$path" && test ! -d "$path"; then
31159         as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31160       fi
31161 
31162       if test -d "$path"; then
31163         IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31164       else
31165         dir="`$DIRNAME "$path"`"
31166         base="`$BASENAME "$path"`"
31167         IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31168       fi
31169     fi
31170   fi
31171 
31172     elif test -e "$with_import_modules"; then
31173       IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31174       $RM -rf "$IMPORT_MODULES_TOPDIR"
31175       $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31176       if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31177         as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31178       fi
31179     else
31180       as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31181     fi
31182   fi
31183 
31184   if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31185     IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31186   fi
31187   if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31188     IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31189   fi
31190   if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31191     IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31192   fi
31193   if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31194     IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31195   fi
31196   if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31197     IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31198   fi
31199   if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31200     IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31201   fi
31202 
31203 
31204 
31205 
31206 
31207 
31208 
31209 
31210 
31211 ###############################################################################
31212 #
31213 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
31214 # native code.
31215 #
31216 ###############################################################################
31217 
31218 # See if we are doing a complete static build or not
31219 
31220   # Check whether --enable-static-build was given.
31221 if test "${enable_static_build+set}" = set; then :
31222   enableval=$enable_static_build;
31223 fi
31224 
31225   STATIC_BUILD=false
31226   if test "x$enable_static_build" = "xyes"; then
31227     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31228 $as_echo_n "checking if static build is enabled... " >&6; }
31229     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31230 $as_echo "yes" >&6; }
31231     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31232       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31233     fi
31234     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31235     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31236     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31237     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31238     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31239     STATIC_BUILD=true
31240   elif test "x$enable_static_build" = "xno"; then
31241     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31242 $as_echo_n "checking if static build is enabled... " >&6; }
31243     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31244 $as_echo "no" >&6; }
31245   elif test "x$enable_static_build" != "x"; then
31246     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31247   fi
31248 
31249 
31250 
31251 
31252 # First determine the toolchain type (compiler family)
31253 
31254 
31255 # Check whether --with-toolchain-type was given.
31256 if test "${with_toolchain_type+set}" = set; then :
31257   withval=$with_toolchain_type;
31258 fi
31259 
31260 
31261   # Use indirect variable referencing
31262   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31263   VALID_TOOLCHAINS=${!toolchain_var_name}
31264 
31265   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31266     if test -n "$XCODEBUILD"; then
31267       # On Mac OS X, default toolchain to clang after Xcode 5
31268       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31269       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31270       if test $? -ne 0; then
31271         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31272       fi
31273       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31274           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31275           $CUT -f 1 -d .`
31276       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31277 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31278       if test $XCODE_MAJOR_VERSION -ge 5; then
31279           DEFAULT_TOOLCHAIN="clang"
31280       else
31281           DEFAULT_TOOLCHAIN="gcc"
31282       fi
31283     else
31284       # If Xcode is not installed, but the command line tools are
31285       # then we can't run xcodebuild. On these systems we should
31286       # default to clang
31287       DEFAULT_TOOLCHAIN="clang"
31288     fi
31289   else
31290     # First toolchain type in the list is the default
31291     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31292   fi
31293 
31294   if test "x$with_toolchain_type" = xlist; then
31295     # List all toolchains
31296     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31297 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31298     for toolchain in $VALID_TOOLCHAINS; do
31299       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31300       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31301       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31302     done
31303 
31304     exit 0
31305   elif test "x$with_toolchain_type" != x; then
31306     # User override; check that it is valid
31307     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31308       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31309 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31310       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31311 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31312       as_fn_error $? "Cannot continue." "$LINENO" 5
31313     fi
31314     TOOLCHAIN_TYPE=$with_toolchain_type
31315   else
31316     # No flag given, use default
31317     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31318   fi
31319 
31320 
31321   TOOLCHAIN_CC_BINARY_clang="clang"
31322   TOOLCHAIN_CC_BINARY_gcc="gcc"
31323   TOOLCHAIN_CC_BINARY_microsoft="cl"
31324   TOOLCHAIN_CC_BINARY_solstudio="cc"
31325   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31326 
31327   TOOLCHAIN_CXX_BINARY_clang="clang++"
31328   TOOLCHAIN_CXX_BINARY_gcc="g++"
31329   TOOLCHAIN_CXX_BINARY_microsoft="cl"
31330   TOOLCHAIN_CXX_BINARY_solstudio="CC"
31331   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31332 
31333   # Use indirect variable referencing
31334   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31335   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31336   toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31337   TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31338   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31339   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31340   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31341   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31342 
31343 
31344   # Define filename patterns
31345   if test "x$OPENJDK_TARGET_OS" = xwindows; then
31346     LIBRARY_PREFIX=
31347     SHARED_LIBRARY_SUFFIX='.dll'
31348     STATIC_LIBRARY_SUFFIX='.lib'
31349     SHARED_LIBRARY='$1.dll'
31350     STATIC_LIBRARY='$1.lib'
31351     OBJ_SUFFIX='.obj'
31352     EXE_SUFFIX='.exe'
31353   else
31354     LIBRARY_PREFIX=lib
31355     SHARED_LIBRARY_SUFFIX='.so'
31356     STATIC_LIBRARY_SUFFIX='.a'
31357     SHARED_LIBRARY='lib$1.so'
31358     STATIC_LIBRARY='lib$1.a'
31359     OBJ_SUFFIX='.o'
31360     EXE_SUFFIX=''
31361     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31362       # For full static builds, we're overloading the SHARED_LIBRARY
31363       # variables in order to limit the amount of changes required.
31364       # It would be better to remove SHARED and just use LIBRARY and
31365       # LIBRARY_SUFFIX for libraries that can be built either
31366       # shared or static and use STATIC_* for libraries that are
31367       # always built statically.
31368       if test "x$STATIC_BUILD" = xtrue; then
31369         SHARED_LIBRARY='lib$1.a'
31370         SHARED_LIBRARY_SUFFIX='.a'
31371       else
31372         SHARED_LIBRARY='lib$1.dylib'
31373         SHARED_LIBRARY_SUFFIX='.dylib'
31374       fi
31375     fi
31376   fi
31377 
31378 
31379 
31380 
31381 
31382 
31383 
31384 
31385 
31386 
31387   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31388     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31389 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31390   else
31391     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31392 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31393   fi
31394 
31395 
31396 # User supplied flags should be used when configure detects compilers
31397 
31398   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31399     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31400 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31401   fi
31402 
31403   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31404     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31405 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31406   fi
31407 
31408   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31409     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31410 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31411   fi
31412 
31413 
31414 # Check whether --with-extra-cflags was given.
31415 if test "${with_extra_cflags+set}" = set; then :
31416   withval=$with_extra_cflags;
31417 fi
31418 
31419 
31420 
31421 # Check whether --with-extra-cxxflags was given.
31422 if test "${with_extra_cxxflags+set}" = set; then :
31423   withval=$with_extra_cxxflags;
31424 fi
31425 
31426 
31427 
31428 # Check whether --with-extra-ldflags was given.
31429 if test "${with_extra_ldflags+set}" = set; then :
31430   withval=$with_extra_ldflags;
31431 fi
31432 
31433 
31434   EXTRA_CFLAGS="$with_extra_cflags"
31435   EXTRA_CXXFLAGS="$with_extra_cxxflags"
31436   EXTRA_LDFLAGS="$with_extra_ldflags"
31437 
31438   # Hotspot needs these set in their legacy form
31439   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31440   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31441   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31442 
31443 
31444 
31445 
31446 
31447 
31448 
31449 
31450 
31451   # The global CFLAGS and LDLAGS variables are used by configure tests and
31452   # should include the extra parameters
31453   CFLAGS="$EXTRA_CFLAGS"
31454   CXXFLAGS="$EXTRA_CXXFLAGS"
31455   LDFLAGS="$EXTRA_LDFLAGS"
31456   CPPFLAGS=""
31457 
31458 # The sysroot cflags are needed for configure to be able to run the compilers
31459 
31460   if test "x$SYSROOT" != "x"; then
31461     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31462       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31463         # Solaris Studio does not have a concept of sysroot. Instead we must
31464         # make sure the default include and lib dirs are appended to each
31465         # compile and link command line. Must also add -I-xbuiltin to enable
31466         # inlining of system functions and intrinsics.
31467         SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31468         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31469             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31470       fi
31471     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31472       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31473       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31474     elif test "x$TOOLCHAIN_TYPE" = xclang; then
31475       SYSROOT_CFLAGS="-isysroot $SYSROOT"
31476       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31477     fi
31478     # Propagate the sysroot args to hotspot
31479     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31480     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31481     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31482     # The global CFLAGS and LDFLAGS variables need these for configure to function
31483     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31484     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31485     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31486     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31487   fi
31488 
31489   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31490     # We also need -iframework<path>/System/Library/Frameworks
31491     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31492     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31493     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31494     # set this here so it doesn't have to be peppered throughout the forest
31495     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31496     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31497   fi
31498 
31499 
31500 
31501 
31502 
31503 # Then detect the actual binaries needed
31504 
31505   # FIXME: Is this needed?
31506   ac_ext=cpp
31507 ac_cpp='$CXXCPP $CPPFLAGS'
31508 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31509 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31510 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31511 
31512 
31513   # Store the CFLAGS etc passed to the configure script.
31514   ORG_CFLAGS="$CFLAGS"
31515   ORG_CXXFLAGS="$CXXFLAGS"
31516 
31517   # autoconf magic only relies on PATH, so update it if tools dir is specified
31518   OLD_PATH="$PATH"
31519 
31520   # On Windows, we need to detect the visual studio installation first.
31521   # This will change the PATH, but we need to keep that new PATH even
31522   # after toolchain detection is done, since the compiler (on x86) uses
31523   # it for DLL resolution in runtime.
31524   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31525       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31526 
31527   # Store path to cygwin link.exe to help excluding it when searching for
31528   # VS linker. This must be done before changing the PATH when looking for VS.
31529   # Extract the first word of "link", so it can be a program name with args.
31530 set dummy link; ac_word=$2
31531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31532 $as_echo_n "checking for $ac_word... " >&6; }
31533 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31534   $as_echo_n "(cached) " >&6
31535 else
31536   case $CYGWIN_LINK in
31537   [\\/]* | ?:[\\/]*)
31538   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31539   ;;
31540   *)
31541   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31542 for as_dir in $PATH
31543 do
31544   IFS=$as_save_IFS
31545   test -z "$as_dir" && as_dir=.
31546     for ac_exec_ext in '' $ac_executable_extensions; do
31547   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31548     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31549     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31550     break 2
31551   fi
31552 done
31553   done
31554 IFS=$as_save_IFS
31555 
31556   ;;
31557 esac
31558 fi
31559 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31560 if test -n "$CYGWIN_LINK"; then
31561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31562 $as_echo "$CYGWIN_LINK" >&6; }
31563 else
31564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31565 $as_echo "no" >&6; }
31566 fi
31567 
31568 
31569   if test "x$CYGWIN_LINK" != x; then
31570     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31571 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31572     "$CYGWIN_LINK" --version > /dev/null
31573     if test $? -eq 0 ; then
31574       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31575 $as_echo "yes" >&6; }
31576     else
31577       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31578 $as_echo "no" >&6; }
31579       # This might be the VS linker. Don't exclude it later on.
31580       CYGWIN_LINK=""
31581     fi
31582   fi
31583 
31584   # First-hand choice is to locate and run the vsvars bat file.
31585 
31586 
31587 # Check whether --with-toolchain-version was given.
31588 if test "${with_toolchain_version+set}" = set; then :
31589   withval=$with_toolchain_version;
31590 fi
31591 
31592 
31593   if test "x$with_toolchain_version" = xlist; then
31594     # List all toolchains
31595     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31596 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31597     for version in $VALID_VS_VERSIONS; do
31598       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31599       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31600     done
31601 
31602     exit 0
31603   elif test "x$DEVKIT_VS_VERSION" != x; then
31604     VS_VERSION=$DEVKIT_VS_VERSION
31605     TOOLCHAIN_VERSION=$VS_VERSION
31606     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31607     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31608     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31609     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31610     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31611     VS_PATH="$TOOLCHAIN_PATH:$PATH"
31612 
31613     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31614     # can still be exported as INCLUDE for compiler invocations without
31615     # SYSROOT_CFLAGS
31616     OLDIFS="$IFS"
31617     IFS=";"
31618     for i in $DEVKIT_VS_INCLUDE; do
31619       ipath=$i
31620 
31621   unix_path="$ipath"
31622   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31623     windows_path=`$CYGPATH -m "$unix_path"`
31624     ipath="$windows_path"
31625   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31626     windows_path=`cmd //c echo $unix_path`
31627     ipath="$windows_path"
31628   fi
31629 
31630       VS_INCLUDE="$VS_INCLUDE;$ipath"
31631     done
31632     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31633     # as LIB for compiler invocations without SYSROOT_LDFLAGS
31634     for i in $DEVKIT_VS_LIB; do
31635       libpath=$i
31636 
31637   unix_path="$libpath"
31638   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31639     windows_path=`$CYGPATH -m "$unix_path"`
31640     libpath="$windows_path"
31641   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31642     windows_path=`cmd //c echo $unix_path`
31643     libpath="$windows_path"
31644   fi
31645 
31646       VS_LIB="$VS_LIB;$libpath"
31647     done
31648     IFS="$OLDIFS"
31649 
31650     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31651 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31652 
31653   elif test "x$with_toolchain_version" != x; then
31654     # User override; check that it is valid
31655     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31656       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31657 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31658       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31659 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31660       as_fn_error $? "Cannot continue." "$LINENO" 5
31661     fi
31662     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31663   else
31664     # No flag given, use default
31665     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31666   fi
31667 
31668   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31669 
31670   VS_VERSION="$VS_VERSION"
31671   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31672   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31673   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31674   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31675 
31676   # When using --with-tools-dir, assume it points to the correct and default
31677   # version of Visual Studio or that --with-toolchain-version was also set.
31678   if test "x$with_tools_dir" != x; then
31679 
31680   if test "x$VS_ENV_CMD" = x; then
31681     VS_VERSION="${VS_VERSION}"
31682     VS_BASE="$with_tools_dir/../.."
31683     METHOD="--with-tools-dir"
31684 
31685     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31686       VCVARSFILE="vc/bin/vcvars32.bat"
31687     else
31688       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31689     fi
31690 
31691 
31692   windows_path="$VS_BASE"
31693   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31694     unix_path=`$CYGPATH -u "$windows_path"`
31695     VS_BASE="$unix_path"
31696   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31697     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31698     VS_BASE="$unix_path"
31699   fi
31700 
31701     if test -d "$VS_BASE"; then
31702       if test -f "$VS_BASE/$VCVARSFILE"; then
31703         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31704 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31705         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31706         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31707         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31708         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31709       else
31710         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31711 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31712         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31713 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31714       fi
31715     fi
31716   fi
31717 
31718 
31719   if test "x$VS_ENV_CMD" = x; then
31720     VS_VERSION="${VS_VERSION}"
31721     VS_BASE="$with_tools_dir/../../.."
31722     METHOD="--with-tools-dir"
31723 
31724     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31725       VCVARSFILE="vc/bin/vcvars32.bat"
31726     else
31727       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31728     fi
31729 
31730 
31731   windows_path="$VS_BASE"
31732   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31733     unix_path=`$CYGPATH -u "$windows_path"`
31734     VS_BASE="$unix_path"
31735   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31736     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31737     VS_BASE="$unix_path"
31738   fi
31739 
31740     if test -d "$VS_BASE"; then
31741       if test -f "$VS_BASE/$VCVARSFILE"; then
31742         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31743 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31744         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31745         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31746         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31747         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31748       else
31749         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31750 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31751         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31752 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31753       fi
31754     fi
31755   fi
31756 
31757     if test "x$VS_ENV_CMD" = x; then
31758       # Having specified an argument which is incorrect will produce an instant failure;
31759       # we should not go on looking
31760       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31761 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31762       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31763 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31764       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31765 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31766       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31767     fi
31768   fi
31769 
31770   VS_ENV_CMD=""
31771   VS_ENV_ARGS=""
31772 
31773   if test "x$VS_COMNTOOLS" != x; then
31774 
31775   if test "x$VS_ENV_CMD" = x; then
31776     VS_VERSION="${VS_VERSION}"
31777     VS_BASE="$VS_COMNTOOLS/../.."
31778     METHOD="$VS_COMNTOOLS_VAR variable"
31779 
31780     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31781       VCVARSFILE="vc/bin/vcvars32.bat"
31782     else
31783       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31784     fi
31785 
31786 
31787   windows_path="$VS_BASE"
31788   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31789     unix_path=`$CYGPATH -u "$windows_path"`
31790     VS_BASE="$unix_path"
31791   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31792     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31793     VS_BASE="$unix_path"
31794   fi
31795 
31796     if test -d "$VS_BASE"; then
31797       if test -f "$VS_BASE/$VCVARSFILE"; then
31798         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31799 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31800         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31801         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31802         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31803         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31804       else
31805         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31806 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31807         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31808 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31809       fi
31810     fi
31811   fi
31812 
31813   fi
31814   if test "x$PROGRAMFILES" != x; then
31815 
31816   if test "x$VS_ENV_CMD" = x; then
31817     VS_VERSION="${VS_VERSION}"
31818     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31819     METHOD="well-known name"
31820 
31821     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31822       VCVARSFILE="vc/bin/vcvars32.bat"
31823     else
31824       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31825     fi
31826 
31827 
31828   windows_path="$VS_BASE"
31829   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31830     unix_path=`$CYGPATH -u "$windows_path"`
31831     VS_BASE="$unix_path"
31832   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31833     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31834     VS_BASE="$unix_path"
31835   fi
31836 
31837     if test -d "$VS_BASE"; then
31838       if test -f "$VS_BASE/$VCVARSFILE"; then
31839         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31840 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31841         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31842         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31843         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31844         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31845       else
31846         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31847 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31848         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31849 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31850       fi
31851     fi
31852   fi
31853 
31854   fi
31855   # Work around the insanely named ProgramFiles(x86) env variable
31856   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31857   if test "x$PROGRAMFILES_X86" != x; then
31858 
31859   if test "x$VS_ENV_CMD" = x; then
31860     VS_VERSION="${VS_VERSION}"
31861     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31862     METHOD="well-known name"
31863 
31864     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31865       VCVARSFILE="vc/bin/vcvars32.bat"
31866     else
31867       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31868     fi
31869 
31870 
31871   windows_path="$VS_BASE"
31872   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31873     unix_path=`$CYGPATH -u "$windows_path"`
31874     VS_BASE="$unix_path"
31875   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31876     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31877     VS_BASE="$unix_path"
31878   fi
31879 
31880     if test -d "$VS_BASE"; then
31881       if test -f "$VS_BASE/$VCVARSFILE"; then
31882         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31883 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31884         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31885         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31886         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31887         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31888       else
31889         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31890 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31891         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31892 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31893       fi
31894     fi
31895   fi
31896 
31897   fi
31898 
31899   if test "x$VS_ENV_CMD" = x; then
31900     VS_VERSION="${VS_VERSION}"
31901     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31902     METHOD="well-known name"
31903 
31904     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31905       VCVARSFILE="vc/bin/vcvars32.bat"
31906     else
31907       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31908     fi
31909 
31910 
31911   windows_path="$VS_BASE"
31912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31913     unix_path=`$CYGPATH -u "$windows_path"`
31914     VS_BASE="$unix_path"
31915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31917     VS_BASE="$unix_path"
31918   fi
31919 
31920     if test -d "$VS_BASE"; then
31921       if test -f "$VS_BASE/$VCVARSFILE"; then
31922         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31923 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31924         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31925         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31926         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31927         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31928       else
31929         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31930 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31931         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31932 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31933       fi
31934     fi
31935   fi
31936 
31937 
31938   if test "x$VS_ENV_CMD" = x; then
31939     VS_VERSION="${VS_VERSION}"
31940     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31941     METHOD="well-known name"
31942 
31943     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31944       VCVARSFILE="vc/bin/vcvars32.bat"
31945     else
31946       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31947     fi
31948 
31949 
31950   windows_path="$VS_BASE"
31951   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31952     unix_path=`$CYGPATH -u "$windows_path"`
31953     VS_BASE="$unix_path"
31954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31955     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31956     VS_BASE="$unix_path"
31957   fi
31958 
31959     if test -d "$VS_BASE"; then
31960       if test -f "$VS_BASE/$VCVARSFILE"; then
31961         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31962 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31963         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31964         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31965         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31966         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31967       else
31968         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31969 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31970         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31971 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31972       fi
31973     fi
31974   fi
31975 
31976 
31977   if test "x$SDK_INSTALL_DIR" != x; then
31978     if test "x$ProgramW6432" != x; then
31979 
31980   if test "x$VS_ENV_CMD" = x; then
31981     VS_VERSION="${VS_VERSION}"
31982     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31983     METHOD="well-known name"
31984 
31985   windows_path="$WIN_SDK_BASE"
31986   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31987     unix_path=`$CYGPATH -u "$windows_path"`
31988     WIN_SDK_BASE="$unix_path"
31989   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31990     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31991     WIN_SDK_BASE="$unix_path"
31992   fi
31993 
31994     if test -d "$WIN_SDK_BASE"; then
31995       # There have been cases of partial or broken SDK installations. A missing
31996       # lib dir is not going to work.
31997       if test ! -d "$WIN_SDK_BASE/lib"; then
31998         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31999 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32000         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32001 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32002       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32003         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32004 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32005         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32006         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32007           VS_ENV_ARGS="/x86"
32008         else
32009           VS_ENV_ARGS="/x64"
32010         fi
32011         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32012         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32013         # TODO: improve detection for other versions of SDK
32014         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32015       else
32016         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32017 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32018         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32019 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32020       fi
32021     fi
32022   fi
32023 
32024     fi
32025     if test "x$PROGRAMW6432" != x; then
32026 
32027   if test "x$VS_ENV_CMD" = x; then
32028     VS_VERSION="${VS_VERSION}"
32029     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32030     METHOD="well-known name"
32031 
32032   windows_path="$WIN_SDK_BASE"
32033   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32034     unix_path=`$CYGPATH -u "$windows_path"`
32035     WIN_SDK_BASE="$unix_path"
32036   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32037     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32038     WIN_SDK_BASE="$unix_path"
32039   fi
32040 
32041     if test -d "$WIN_SDK_BASE"; then
32042       # There have been cases of partial or broken SDK installations. A missing
32043       # lib dir is not going to work.
32044       if test ! -d "$WIN_SDK_BASE/lib"; then
32045         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32046 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32047         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32048 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32049       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32050         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32051 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32052         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32053         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32054           VS_ENV_ARGS="/x86"
32055         else
32056           VS_ENV_ARGS="/x64"
32057         fi
32058         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32059         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32060         # TODO: improve detection for other versions of SDK
32061         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32062       else
32063         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32064 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32065         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32066 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32067       fi
32068     fi
32069   fi
32070 
32071     fi
32072     if test "x$PROGRAMFILES" != x; then
32073 
32074   if test "x$VS_ENV_CMD" = x; then
32075     VS_VERSION="${VS_VERSION}"
32076     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32077     METHOD="well-known name"
32078 
32079   windows_path="$WIN_SDK_BASE"
32080   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32081     unix_path=`$CYGPATH -u "$windows_path"`
32082     WIN_SDK_BASE="$unix_path"
32083   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32084     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32085     WIN_SDK_BASE="$unix_path"
32086   fi
32087 
32088     if test -d "$WIN_SDK_BASE"; then
32089       # There have been cases of partial or broken SDK installations. A missing
32090       # lib dir is not going to work.
32091       if test ! -d "$WIN_SDK_BASE/lib"; then
32092         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32093 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32094         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32095 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32096       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32097         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32098 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32099         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32100         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32101           VS_ENV_ARGS="/x86"
32102         else
32103           VS_ENV_ARGS="/x64"
32104         fi
32105         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32106         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32107         # TODO: improve detection for other versions of SDK
32108         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32109       else
32110         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32111 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32112         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32113 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32114       fi
32115     fi
32116   fi
32117 
32118     fi
32119 
32120   if test "x$VS_ENV_CMD" = x; then
32121     VS_VERSION="${VS_VERSION}"
32122     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32123     METHOD="well-known name"
32124 
32125   windows_path="$WIN_SDK_BASE"
32126   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32127     unix_path=`$CYGPATH -u "$windows_path"`
32128     WIN_SDK_BASE="$unix_path"
32129   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32130     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32131     WIN_SDK_BASE="$unix_path"
32132   fi
32133 
32134     if test -d "$WIN_SDK_BASE"; then
32135       # There have been cases of partial or broken SDK installations. A missing
32136       # lib dir is not going to work.
32137       if test ! -d "$WIN_SDK_BASE/lib"; then
32138         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32139 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32140         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32141 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32142       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32143         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32144 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32145         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32146         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32147           VS_ENV_ARGS="/x86"
32148         else
32149           VS_ENV_ARGS="/x64"
32150         fi
32151         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32152         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32153         # TODO: improve detection for other versions of SDK
32154         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32155       else
32156         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32157 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32158         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32159 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32160       fi
32161     fi
32162   fi
32163 
32164 
32165   if test "x$VS_ENV_CMD" = x; then
32166     VS_VERSION="${VS_VERSION}"
32167     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32168     METHOD="well-known name"
32169 
32170   windows_path="$WIN_SDK_BASE"
32171   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32172     unix_path=`$CYGPATH -u "$windows_path"`
32173     WIN_SDK_BASE="$unix_path"
32174   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32175     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32176     WIN_SDK_BASE="$unix_path"
32177   fi
32178 
32179     if test -d "$WIN_SDK_BASE"; then
32180       # There have been cases of partial or broken SDK installations. A missing
32181       # lib dir is not going to work.
32182       if test ! -d "$WIN_SDK_BASE/lib"; then
32183         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32184 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32185         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32186 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32187       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32188         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32189 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32190         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32191         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32192           VS_ENV_ARGS="/x86"
32193         else
32194           VS_ENV_ARGS="/x64"
32195         fi
32196         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32197         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32198         # TODO: improve detection for other versions of SDK
32199         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32200       else
32201         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32202 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32203         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32204 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32205       fi
32206     fi
32207   fi
32208 
32209   fi
32210 
32211     if test "x$VS_ENV_CMD" != x; then
32212       TOOLCHAIN_VERSION=$VS_VERSION
32213       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32214       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32215       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32216       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32217       # The rest of the variables are already evaled while probing
32218       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32219 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32220       break
32221     fi
32222   done
32223 
32224 
32225   # If we have a devkit, skip all of the below.
32226   if test "x$DEVKIT_VS_VERSION" = x; then
32227     if test "x$VS_ENV_CMD" != x; then
32228       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32229 
32230   # Only process if variable expands to non-empty
32231 
32232   if test "x$VS_ENV_CMD" != x; then
32233     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32234 
32235   # First separate the path from the arguments. This will split at the first
32236   # space.
32237   complete="$VS_ENV_CMD"
32238   path="${complete%% *}"
32239   tmp="$complete EOL"
32240   arguments="${tmp#* }"
32241 
32242   # Input might be given as Windows format, start by converting to
32243   # unix format.
32244   new_path=`$CYGPATH -u "$path"`
32245 
32246   # Now try to locate executable using which
32247   new_path=`$WHICH "$new_path" 2> /dev/null`
32248   # bat and cmd files are not always considered executable in cygwin causing which
32249   # to not find them
32250   if test "x$new_path" = x \
32251       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32252       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32253     new_path=`$CYGPATH -u "$path"`
32254   fi
32255   if test "x$new_path" = x; then
32256     # Oops. Which didn't find the executable.
32257     # The splitting of arguments from the executable at a space might have been incorrect,
32258     # since paths with space are more likely in Windows. Give it another try with the whole
32259     # argument.
32260     path="$complete"
32261     arguments="EOL"
32262     new_path=`$CYGPATH -u "$path"`
32263     new_path=`$WHICH "$new_path" 2> /dev/null`
32264     # bat and cmd files are not always considered executable in cygwin causing which
32265     # to not find them
32266     if test "x$new_path" = x \
32267         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32268         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32269       new_path=`$CYGPATH -u "$path"`
32270     fi
32271     if test "x$new_path" = x; then
32272       # It's still not found. Now this is an unrecoverable error.
32273       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32274 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32275       has_space=`$ECHO "$complete" | $GREP " "`
32276       if test "x$has_space" != x; then
32277         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32278 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32279       fi
32280       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32281     fi
32282   fi
32283 
32284   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32285   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32286   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32287   # "foo.exe" is OK but "foo" is an error.
32288   #
32289   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32290   # It is also a way to make sure we got the proper file name for the real test later on.
32291   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32292   if test "x$test_shortpath" = x; then
32293     # Short path failed, file does not exist as specified.
32294     # Try adding .exe or .cmd
32295     if test -f "${new_path}.exe"; then
32296       input_to_shortpath="${new_path}.exe"
32297     elif test -f "${new_path}.cmd"; then
32298       input_to_shortpath="${new_path}.cmd"
32299     else
32300       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32301 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32302       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32303 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32304       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32305     fi
32306   else
32307     input_to_shortpath="$new_path"
32308   fi
32309 
32310   # Call helper function which possibly converts this using DOS-style short mode.
32311   # If so, the updated path is stored in $new_path.
32312   new_path="$input_to_shortpath"
32313 
32314   input_path="$input_to_shortpath"
32315   # Check if we need to convert this using DOS-style short mode. If the path
32316   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32317   # take no chances and rewrite it.
32318   # Note: m4 eats our [], so we need to use [ and ] instead.
32319   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32320   if test "x$has_forbidden_chars" != x; then
32321     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32322     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32323     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32324     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32325       # Going to short mode and back again did indeed matter. Since short mode is
32326       # case insensitive, let's make it lowercase to improve readability.
32327       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32328       # Now convert it back to Unix-style (cygpath)
32329       input_path=`$CYGPATH -u "$shortmode_path"`
32330       new_path="$input_path"
32331     fi
32332   fi
32333 
32334   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32335   if test "x$test_cygdrive_prefix" = x; then
32336     # As a simple fix, exclude /usr/bin since it's not a real path.
32337     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32338       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32339       # a path prefixed by /cygdrive for fixpath to work.
32340       new_path="$CYGWIN_ROOT_PATH$input_path"
32341     fi
32342   fi
32343 
32344   # remove trailing .exe if any
32345   new_path="${new_path/%.exe/}"
32346 
32347     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32348 
32349   # First separate the path from the arguments. This will split at the first
32350   # space.
32351   complete="$VS_ENV_CMD"
32352   path="${complete%% *}"
32353   tmp="$complete EOL"
32354   arguments="${tmp#* }"
32355 
32356   # Input might be given as Windows format, start by converting to
32357   # unix format.
32358   new_path="$path"
32359 
32360   windows_path="$new_path"
32361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32362     unix_path=`$CYGPATH -u "$windows_path"`
32363     new_path="$unix_path"
32364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32365     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32366     new_path="$unix_path"
32367   fi
32368 
32369 
32370   # Now try to locate executable using which
32371   new_path=`$WHICH "$new_path" 2> /dev/null`
32372 
32373   if test "x$new_path" = x; then
32374     # Oops. Which didn't find the executable.
32375     # The splitting of arguments from the executable at a space might have been incorrect,
32376     # since paths with space are more likely in Windows. Give it another try with the whole
32377     # argument.
32378     path="$complete"
32379     arguments="EOL"
32380     new_path="$path"
32381 
32382   windows_path="$new_path"
32383   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32384     unix_path=`$CYGPATH -u "$windows_path"`
32385     new_path="$unix_path"
32386   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32387     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32388     new_path="$unix_path"
32389   fi
32390 
32391 
32392     new_path=`$WHICH "$new_path" 2> /dev/null`
32393     # bat and cmd files are not always considered executable in MSYS causing which
32394     # to not find them
32395     if test "x$new_path" = x \
32396         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32397         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32398       new_path="$path"
32399 
32400   windows_path="$new_path"
32401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32402     unix_path=`$CYGPATH -u "$windows_path"`
32403     new_path="$unix_path"
32404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32406     new_path="$unix_path"
32407   fi
32408 
32409     fi
32410 
32411     if test "x$new_path" = x; then
32412       # It's still not found. Now this is an unrecoverable error.
32413       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32414 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32415       has_space=`$ECHO "$complete" | $GREP " "`
32416       if test "x$has_space" != x; then
32417         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32418 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32419       fi
32420       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32421     fi
32422   fi
32423 
32424   # Now new_path has a complete unix path to the binary
32425   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32426     # Keep paths in /bin as-is, but remove trailing .exe if any
32427     new_path="${new_path/%.exe/}"
32428     # Do not save /bin paths to all_fixpath_prefixes!
32429   else
32430     # Not in mixed or Windows style, start by that.
32431     new_path=`cmd //c echo $new_path`
32432 
32433   input_path="$new_path"
32434   # Check if we need to convert this using DOS-style short mode. If the path
32435   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32436   # take no chances and rewrite it.
32437   # Note: m4 eats our [], so we need to use [ and ] instead.
32438   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32439   if test "x$has_forbidden_chars" != x; then
32440     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32441     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32442   fi
32443 
32444     # Output is in $new_path
32445 
32446   windows_path="$new_path"
32447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32448     unix_path=`$CYGPATH -u "$windows_path"`
32449     new_path="$unix_path"
32450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32451     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32452     new_path="$unix_path"
32453   fi
32454 
32455     # remove trailing .exe if any
32456     new_path="${new_path/%.exe/}"
32457 
32458     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32459     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32460   fi
32461 
32462     else
32463       # We're on a unix platform. Hooray! :)
32464       # First separate the path from the arguments. This will split at the first
32465       # space.
32466       complete="$VS_ENV_CMD"
32467       path="${complete%% *}"
32468       tmp="$complete EOL"
32469       arguments="${tmp#* }"
32470 
32471       # Cannot rely on the command "which" here since it doesn't always work.
32472       is_absolute_path=`$ECHO "$path" | $GREP ^/`
32473       if test -z "$is_absolute_path"; then
32474         # Path to executable is not absolute. Find it.
32475         IFS_save="$IFS"
32476         IFS=:
32477         for p in $PATH; do
32478           if test -f "$p/$path" && test -x "$p/$path"; then
32479             new_path="$p/$path"
32480             break
32481           fi
32482         done
32483         IFS="$IFS_save"
32484       else
32485         # This is an absolute path, we can use it without further modifications.
32486         new_path="$path"
32487       fi
32488 
32489       if test "x$new_path" = x; then
32490         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32491 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32492         has_space=`$ECHO "$complete" | $GREP " "`
32493         if test "x$has_space" != x; then
32494           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32495 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32496         fi
32497         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32498       fi
32499     fi
32500 
32501     # Now join together the path and the arguments once again
32502     if test "x$arguments" != xEOL; then
32503       new_complete="$new_path ${arguments% *}"
32504     else
32505       new_complete="$new_path"
32506     fi
32507 
32508     if test "x$complete" != "x$new_complete"; then
32509       VS_ENV_CMD="$new_complete"
32510       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32511 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32512     fi
32513   fi
32514 
32515 
32516       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32517       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32518 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32519 
32520       # We need to create a couple of temporary files.
32521       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32522       $MKDIR -p $VS_ENV_TMP_DIR
32523 
32524       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32525       # Instead create a shell script which will set the relevant variables when run.
32526       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32527 
32528   unix_path="$WINPATH_VS_ENV_CMD"
32529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32530     windows_path=`$CYGPATH -m "$unix_path"`
32531     WINPATH_VS_ENV_CMD="$windows_path"
32532   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32533     windows_path=`cmd //c echo $unix_path`
32534     WINPATH_VS_ENV_CMD="$windows_path"
32535   fi
32536 
32537       WINPATH_BASH="$BASH"
32538 
32539   unix_path="$WINPATH_BASH"
32540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32541     windows_path=`$CYGPATH -m "$unix_path"`
32542     WINPATH_BASH="$windows_path"
32543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32544     windows_path=`cmd //c echo $unix_path`
32545     WINPATH_BASH="$windows_path"
32546   fi
32547 
32548 
32549       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32550       # script (executable by bash) that will setup the important variables.
32551       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32552       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32553       # This will end up something like:
32554       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32555       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32556       # These will end up something like:
32557       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32558       # The trailing space for everyone except PATH is no typo, but is needed due
32559       # to trailing \ in the Windows paths. These will be stripped later.
32560       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32561           >> $EXTRACT_VC_ENV_BAT_FILE
32562       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32563           >> $EXTRACT_VC_ENV_BAT_FILE
32564       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32565           >> $EXTRACT_VC_ENV_BAT_FILE
32566       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32567           >> $EXTRACT_VC_ENV_BAT_FILE
32568       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32569           >> $EXTRACT_VC_ENV_BAT_FILE
32570       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32571           >> $EXTRACT_VC_ENV_BAT_FILE
32572 
32573       # Now execute the newly created bat file.
32574       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32575       # Change directory so we don't need to mess with Windows paths in redirects.
32576       cd $VS_ENV_TMP_DIR
32577       cmd /c extract-vs-env.bat | $CAT
32578       cd $CURDIR
32579 
32580       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32581         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32582 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32583         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32584 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32585         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32586 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32587         as_fn_error $? "Cannot continue" "$LINENO" 5
32588       fi
32589 
32590       # Now set all paths and other env variables. This will allow the rest of
32591       # the configure script to find and run the compiler in the proper way.
32592       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32593 $as_echo "$as_me: Setting extracted environment variables" >&6;}
32594       . $VS_ENV_TMP_DIR/set-vs-env.sh
32595       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32596       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32597     else
32598       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32599       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32600 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32601     fi
32602   fi
32603 
32604   # At this point, we should have correct variables in the environment, or we can't continue.
32605   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32606 $as_echo_n "checking for Visual Studio variables... " >&6; }
32607 
32608   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32609       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32610     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32611       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32612 $as_echo "present but broken" >&6; }
32613       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32614     else
32615       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32616 $as_echo "ok" >&6; }
32617       # Remove any trailing "\" ";" and " " from the variables.
32618       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32619       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32620       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32621       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32622       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32623       # Remove any paths containing # (typically F#) as that messes up make. This
32624       # is needed if visual studio was installed with F# support.
32625       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32626 
32627 
32628 
32629 
32630 
32631       # Convert VS_INCLUDE into SYSROOT_CFLAGS
32632       OLDIFS="$IFS"
32633       IFS=";"
32634       for i in $VS_INCLUDE; do
32635         ipath=$i
32636         # Only process non-empty elements
32637         if test "x$ipath" != x; then
32638           IFS="$OLDIFS"
32639           # Check that directory exists before calling fixup_path
32640           testpath=$ipath
32641 
32642   windows_path="$testpath"
32643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32644     unix_path=`$CYGPATH -u "$windows_path"`
32645     testpath="$unix_path"
32646   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32647     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32648     testpath="$unix_path"
32649   fi
32650 
32651           if test -d "$testpath"; then
32652 
32653   # Only process if variable expands to non-empty
32654 
32655   if test "x$ipath" != x; then
32656     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32657 
32658   # Input might be given as Windows format, start by converting to
32659   # unix format.
32660   path="$ipath"
32661   new_path=`$CYGPATH -u "$path"`
32662 
32663   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32664   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32665   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32666   # "foo.exe" is OK but "foo" is an error.
32667   #
32668   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32669   # It is also a way to make sure we got the proper file name for the real test later on.
32670   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32671   if test "x$test_shortpath" = x; then
32672     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32673 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32674     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32675   fi
32676 
32677   # Call helper function which possibly converts this using DOS-style short mode.
32678   # If so, the updated path is stored in $new_path.
32679 
32680   input_path="$new_path"
32681   # Check if we need to convert this using DOS-style short mode. If the path
32682   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32683   # take no chances and rewrite it.
32684   # Note: m4 eats our [], so we need to use [ and ] instead.
32685   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32686   if test "x$has_forbidden_chars" != x; then
32687     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32688     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32689     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32690     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32691       # Going to short mode and back again did indeed matter. Since short mode is
32692       # case insensitive, let's make it lowercase to improve readability.
32693       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32694       # Now convert it back to Unix-style (cygpath)
32695       input_path=`$CYGPATH -u "$shortmode_path"`
32696       new_path="$input_path"
32697     fi
32698   fi
32699 
32700   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32701   if test "x$test_cygdrive_prefix" = x; then
32702     # As a simple fix, exclude /usr/bin since it's not a real path.
32703     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32704       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32705       # a path prefixed by /cygdrive for fixpath to work.
32706       new_path="$CYGWIN_ROOT_PATH$input_path"
32707     fi
32708   fi
32709 
32710 
32711   if test "x$path" != "x$new_path"; then
32712     ipath="$new_path"
32713     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32714 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32715   fi
32716 
32717     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32718 
32719   path="$ipath"
32720   has_colon=`$ECHO $path | $GREP ^.:`
32721   new_path="$path"
32722   if test "x$has_colon" = x; then
32723     # Not in mixed or Windows style, start by that.
32724     new_path=`cmd //c echo $path`
32725   fi
32726 
32727 
32728   input_path="$new_path"
32729   # Check if we need to convert this using DOS-style short mode. If the path
32730   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32731   # take no chances and rewrite it.
32732   # Note: m4 eats our [], so we need to use [ and ] instead.
32733   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32734   if test "x$has_forbidden_chars" != x; then
32735     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32736     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32737   fi
32738 
32739 
32740   windows_path="$new_path"
32741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32742     unix_path=`$CYGPATH -u "$windows_path"`
32743     new_path="$unix_path"
32744   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32745     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32746     new_path="$unix_path"
32747   fi
32748 
32749   if test "x$path" != "x$new_path"; then
32750     ipath="$new_path"
32751     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32752 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32753   fi
32754 
32755   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32756   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32757 
32758     else
32759       # We're on a unix platform. Hooray! :)
32760       path="$ipath"
32761       has_space=`$ECHO "$path" | $GREP " "`
32762       if test "x$has_space" != x; then
32763         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32764 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32765         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32766       fi
32767 
32768       # Use eval to expand a potential ~
32769       eval path="$path"
32770       if test ! -f "$path" && test ! -d "$path"; then
32771         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32772       fi
32773 
32774       if test -d "$path"; then
32775         ipath="`cd "$path"; $THEPWDCMD -L`"
32776       else
32777         dir="`$DIRNAME "$path"`"
32778         base="`$BASENAME "$path"`"
32779         ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32780       fi
32781     fi
32782   fi
32783 
32784             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32785           fi
32786           IFS=";"
32787         fi
32788       done
32789       # Convert VS_LIB into SYSROOT_LDFLAGS
32790       for i in $VS_LIB; do
32791         libpath=$i
32792         # Only process non-empty elements
32793         if test "x$libpath" != x; then
32794           IFS="$OLDIFS"
32795           # Check that directory exists before calling fixup_path
32796           testpath=$libpath
32797 
32798   windows_path="$testpath"
32799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32800     unix_path=`$CYGPATH -u "$windows_path"`
32801     testpath="$unix_path"
32802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32803     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32804     testpath="$unix_path"
32805   fi
32806 
32807           if test -d "$testpath"; then
32808 
32809   # Only process if variable expands to non-empty
32810 
32811   if test "x$libpath" != x; then
32812     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32813 
32814   # Input might be given as Windows format, start by converting to
32815   # unix format.
32816   path="$libpath"
32817   new_path=`$CYGPATH -u "$path"`
32818 
32819   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32820   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32821   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32822   # "foo.exe" is OK but "foo" is an error.
32823   #
32824   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32825   # It is also a way to make sure we got the proper file name for the real test later on.
32826   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32827   if test "x$test_shortpath" = x; then
32828     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32829 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32830     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32831   fi
32832 
32833   # Call helper function which possibly converts this using DOS-style short mode.
32834   # If so, the updated path is stored in $new_path.
32835 
32836   input_path="$new_path"
32837   # Check if we need to convert this using DOS-style short mode. If the path
32838   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32839   # take no chances and rewrite it.
32840   # Note: m4 eats our [], so we need to use [ and ] instead.
32841   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32842   if test "x$has_forbidden_chars" != x; then
32843     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32844     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32845     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32846     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32847       # Going to short mode and back again did indeed matter. Since short mode is
32848       # case insensitive, let's make it lowercase to improve readability.
32849       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32850       # Now convert it back to Unix-style (cygpath)
32851       input_path=`$CYGPATH -u "$shortmode_path"`
32852       new_path="$input_path"
32853     fi
32854   fi
32855 
32856   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32857   if test "x$test_cygdrive_prefix" = x; then
32858     # As a simple fix, exclude /usr/bin since it's not a real path.
32859     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32860       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32861       # a path prefixed by /cygdrive for fixpath to work.
32862       new_path="$CYGWIN_ROOT_PATH$input_path"
32863     fi
32864   fi
32865 
32866 
32867   if test "x$path" != "x$new_path"; then
32868     libpath="$new_path"
32869     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32870 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32871   fi
32872 
32873     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32874 
32875   path="$libpath"
32876   has_colon=`$ECHO $path | $GREP ^.:`
32877   new_path="$path"
32878   if test "x$has_colon" = x; then
32879     # Not in mixed or Windows style, start by that.
32880     new_path=`cmd //c echo $path`
32881   fi
32882 
32883 
32884   input_path="$new_path"
32885   # Check if we need to convert this using DOS-style short mode. If the path
32886   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32887   # take no chances and rewrite it.
32888   # Note: m4 eats our [], so we need to use [ and ] instead.
32889   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32890   if test "x$has_forbidden_chars" != x; then
32891     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32892     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32893   fi
32894 
32895 
32896   windows_path="$new_path"
32897   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32898     unix_path=`$CYGPATH -u "$windows_path"`
32899     new_path="$unix_path"
32900   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32901     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32902     new_path="$unix_path"
32903   fi
32904 
32905   if test "x$path" != "x$new_path"; then
32906     libpath="$new_path"
32907     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32908 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32909   fi
32910 
32911   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32912   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32913 
32914     else
32915       # We're on a unix platform. Hooray! :)
32916       path="$libpath"
32917       has_space=`$ECHO "$path" | $GREP " "`
32918       if test "x$has_space" != x; then
32919         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32920 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32921         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32922       fi
32923 
32924       # Use eval to expand a potential ~
32925       eval path="$path"
32926       if test ! -f "$path" && test ! -d "$path"; then
32927         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32928       fi
32929 
32930       if test -d "$path"; then
32931         libpath="`cd "$path"; $THEPWDCMD -L`"
32932       else
32933         dir="`$DIRNAME "$path"`"
32934         base="`$BASENAME "$path"`"
32935         libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32936       fi
32937     fi
32938   fi
32939 
32940             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32941           fi
32942           IFS=";"
32943         fi
32944       done
32945       IFS="$OLDIFS"
32946     fi
32947   else
32948     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32949 $as_echo "not found" >&6; }
32950 
32951     if test "x$VS_ENV_CMD" = x; then
32952       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32953 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32954       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32955 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32956     else
32957       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32958 $as_echo "$as_me: Running the extraction script failed." >&6;}
32959     fi
32960     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32961 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32962     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32963 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32964     as_fn_error $? "Cannot continue" "$LINENO" 5
32965   fi
32966 
32967     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32968     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32969     PATH="$VS_PATH"
32970     # The microsoft toolchain also requires INCLUDE and LIB to be set.
32971     export INCLUDE="$VS_INCLUDE"
32972     export LIB="$VS_LIB"
32973   else
32974     if test "x$XCODE_VERSION_OUTPUT" != x; then
32975       # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32976       TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32977       TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32978     else
32979       # Currently we do not define this for other toolchains. This might change as the need arise.
32980       TOOLCHAIN_VERSION=
32981     fi
32982   fi
32983 
32984 
32985   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32986   # override all other locations.
32987   if test "x$TOOLCHAIN_PATH" != x; then
32988     PATH=$TOOLCHAIN_PATH:$PATH
32989   fi
32990 
32991 
32992   #
32993   # Setup the compilers (CC and CXX)
32994   #
32995 
32996   COMPILER_NAME=C
32997   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32998 
32999   if test "x$CC" != x; then
33000     # User has supplied compiler name already, always let that override.
33001     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33002 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33003     if test "x`basename $CC`" = "x$CC"; then
33004       # A command without a complete path is provided, search $PATH.
33005 
33006       for ac_prog in $CC
33007 do
33008   # Extract the first word of "$ac_prog", so it can be a program name with args.
33009 set dummy $ac_prog; ac_word=$2
33010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33011 $as_echo_n "checking for $ac_word... " >&6; }
33012 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33013   $as_echo_n "(cached) " >&6
33014 else
33015   case $POTENTIAL_CC in
33016   [\\/]* | ?:[\\/]*)
33017   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33018   ;;
33019   *)
33020   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33021 for as_dir in $PATH
33022 do
33023   IFS=$as_save_IFS
33024   test -z "$as_dir" && as_dir=.
33025     for ac_exec_ext in '' $ac_executable_extensions; do
33026   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33027     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33028     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33029     break 2
33030   fi
33031 done
33032   done
33033 IFS=$as_save_IFS
33034 
33035   ;;
33036 esac
33037 fi
33038 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33039 if test -n "$POTENTIAL_CC"; then
33040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33041 $as_echo "$POTENTIAL_CC" >&6; }
33042 else
33043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33044 $as_echo "no" >&6; }
33045 fi
33046 
33047 
33048   test -n "$POTENTIAL_CC" && break
33049 done
33050 
33051       if test "x$POTENTIAL_CC" != x; then
33052         CC=$POTENTIAL_CC
33053       else
33054         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33055       fi
33056     else
33057       # Otherwise it might already be a complete path
33058       if test ! -x "$CC"; then
33059         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33060       fi
33061     fi
33062   else
33063     # No user supplied value. Locate compiler ourselves.
33064 
33065     # If we are cross compiling, assume cross compilation tools follows the
33066     # cross compilation standard where they are prefixed with the autoconf
33067     # standard name for the target. For example the binary
33068     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33069     # If we are not cross compiling, then the default compiler name will be
33070     # used.
33071 
33072     CC=
33073     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33074     # before checking the rest of the PATH.
33075     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33076     # step, this should not be necessary.
33077     if test -n "$TOOLCHAIN_PATH"; then
33078       PATH_save="$PATH"
33079       PATH="$TOOLCHAIN_PATH"
33080       for ac_prog in $SEARCH_LIST
33081 do
33082   # Extract the first word of "$ac_prog", so it can be a program name with args.
33083 set dummy $ac_prog; ac_word=$2
33084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33085 $as_echo_n "checking for $ac_word... " >&6; }
33086 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33087   $as_echo_n "(cached) " >&6
33088 else
33089   case $TOOLCHAIN_PATH_CC in
33090   [\\/]* | ?:[\\/]*)
33091   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33092   ;;
33093   *)
33094   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33095 for as_dir in $PATH
33096 do
33097   IFS=$as_save_IFS
33098   test -z "$as_dir" && as_dir=.
33099     for ac_exec_ext in '' $ac_executable_extensions; do
33100   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33101     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33102     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33103     break 2
33104   fi
33105 done
33106   done
33107 IFS=$as_save_IFS
33108 
33109   ;;
33110 esac
33111 fi
33112 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33113 if test -n "$TOOLCHAIN_PATH_CC"; then
33114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33115 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33116 else
33117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33118 $as_echo "no" >&6; }
33119 fi
33120 
33121 
33122   test -n "$TOOLCHAIN_PATH_CC" && break
33123 done
33124 
33125       CC=$TOOLCHAIN_PATH_CC
33126       PATH="$PATH_save"
33127     fi
33128 
33129     # AC_PATH_PROGS can't be run multiple times with the same variable,
33130     # so create a new name for this run.
33131     if test "x$CC" = x; then
33132       for ac_prog in $SEARCH_LIST
33133 do
33134   # Extract the first word of "$ac_prog", so it can be a program name with args.
33135 set dummy $ac_prog; ac_word=$2
33136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33137 $as_echo_n "checking for $ac_word... " >&6; }
33138 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33139   $as_echo_n "(cached) " >&6
33140 else
33141   case $POTENTIAL_CC in
33142   [\\/]* | ?:[\\/]*)
33143   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33144   ;;
33145   *)
33146   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33147 for as_dir in $PATH
33148 do
33149   IFS=$as_save_IFS
33150   test -z "$as_dir" && as_dir=.
33151     for ac_exec_ext in '' $ac_executable_extensions; do
33152   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33153     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33154     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33155     break 2
33156   fi
33157 done
33158   done
33159 IFS=$as_save_IFS
33160 
33161   ;;
33162 esac
33163 fi
33164 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33165 if test -n "$POTENTIAL_CC"; then
33166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33167 $as_echo "$POTENTIAL_CC" >&6; }
33168 else
33169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33170 $as_echo "no" >&6; }
33171 fi
33172 
33173 
33174   test -n "$POTENTIAL_CC" && break
33175 done
33176 
33177       CC=$POTENTIAL_CC
33178     fi
33179 
33180     if test "x$CC" = x; then
33181 
33182   # Print a helpful message on how to acquire the necessary build dependency.
33183   # devkit is the help tag: freetype, cups, alsa etc
33184   MISSING_DEPENDENCY=devkit
33185 
33186   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33187     cygwin_help $MISSING_DEPENDENCY
33188   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33189     msys_help $MISSING_DEPENDENCY
33190   else
33191     PKGHANDLER_COMMAND=
33192 
33193     case $PKGHANDLER in
33194       apt-get)
33195         apt_help     $MISSING_DEPENDENCY ;;
33196       yum)
33197         yum_help     $MISSING_DEPENDENCY ;;
33198       port)
33199         port_help    $MISSING_DEPENDENCY ;;
33200       pkgutil)
33201         pkgutil_help $MISSING_DEPENDENCY ;;
33202       pkgadd)
33203         pkgadd_help  $MISSING_DEPENDENCY ;;
33204     esac
33205 
33206     if test "x$PKGHANDLER_COMMAND" != x; then
33207       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33208     fi
33209   fi
33210 
33211       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33212     fi
33213   fi
33214 
33215   # Now we have a compiler binary in CC. Make sure it's okay.
33216 
33217   # Only process if variable expands to non-empty
33218 
33219   if test "x$CC" != x; then
33220     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33221 
33222   # First separate the path from the arguments. This will split at the first
33223   # space.
33224   complete="$CC"
33225   path="${complete%% *}"
33226   tmp="$complete EOL"
33227   arguments="${tmp#* }"
33228 
33229   # Input might be given as Windows format, start by converting to
33230   # unix format.
33231   new_path=`$CYGPATH -u "$path"`
33232 
33233   # Now try to locate executable using which
33234   new_path=`$WHICH "$new_path" 2> /dev/null`
33235   # bat and cmd files are not always considered executable in cygwin causing which
33236   # to not find them
33237   if test "x$new_path" = x \
33238       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33239       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33240     new_path=`$CYGPATH -u "$path"`
33241   fi
33242   if test "x$new_path" = x; then
33243     # Oops. Which didn't find the executable.
33244     # The splitting of arguments from the executable at a space might have been incorrect,
33245     # since paths with space are more likely in Windows. Give it another try with the whole
33246     # argument.
33247     path="$complete"
33248     arguments="EOL"
33249     new_path=`$CYGPATH -u "$path"`
33250     new_path=`$WHICH "$new_path" 2> /dev/null`
33251     # bat and cmd files are not always considered executable in cygwin causing which
33252     # to not find them
33253     if test "x$new_path" = x \
33254         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33255         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33256       new_path=`$CYGPATH -u "$path"`
33257     fi
33258     if test "x$new_path" = x; then
33259       # It's still not found. Now this is an unrecoverable error.
33260       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33261 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33262       has_space=`$ECHO "$complete" | $GREP " "`
33263       if test "x$has_space" != x; then
33264         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33265 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33266       fi
33267       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33268     fi
33269   fi
33270 
33271   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33272   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33273   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33274   # "foo.exe" is OK but "foo" is an error.
33275   #
33276   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33277   # It is also a way to make sure we got the proper file name for the real test later on.
33278   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33279   if test "x$test_shortpath" = x; then
33280     # Short path failed, file does not exist as specified.
33281     # Try adding .exe or .cmd
33282     if test -f "${new_path}.exe"; then
33283       input_to_shortpath="${new_path}.exe"
33284     elif test -f "${new_path}.cmd"; then
33285       input_to_shortpath="${new_path}.cmd"
33286     else
33287       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33288 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33289       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33290 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33291       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33292     fi
33293   else
33294     input_to_shortpath="$new_path"
33295   fi
33296 
33297   # Call helper function which possibly converts this using DOS-style short mode.
33298   # If so, the updated path is stored in $new_path.
33299   new_path="$input_to_shortpath"
33300 
33301   input_path="$input_to_shortpath"
33302   # Check if we need to convert this using DOS-style short mode. If the path
33303   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33304   # take no chances and rewrite it.
33305   # Note: m4 eats our [], so we need to use [ and ] instead.
33306   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33307   if test "x$has_forbidden_chars" != x; then
33308     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33309     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33310     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33311     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33312       # Going to short mode and back again did indeed matter. Since short mode is
33313       # case insensitive, let's make it lowercase to improve readability.
33314       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33315       # Now convert it back to Unix-style (cygpath)
33316       input_path=`$CYGPATH -u "$shortmode_path"`
33317       new_path="$input_path"
33318     fi
33319   fi
33320 
33321   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33322   if test "x$test_cygdrive_prefix" = x; then
33323     # As a simple fix, exclude /usr/bin since it's not a real path.
33324     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33325       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33326       # a path prefixed by /cygdrive for fixpath to work.
33327       new_path="$CYGWIN_ROOT_PATH$input_path"
33328     fi
33329   fi
33330 
33331   # remove trailing .exe if any
33332   new_path="${new_path/%.exe/}"
33333 
33334     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33335 
33336   # First separate the path from the arguments. This will split at the first
33337   # space.
33338   complete="$CC"
33339   path="${complete%% *}"
33340   tmp="$complete EOL"
33341   arguments="${tmp#* }"
33342 
33343   # Input might be given as Windows format, start by converting to
33344   # unix format.
33345   new_path="$path"
33346 
33347   windows_path="$new_path"
33348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33349     unix_path=`$CYGPATH -u "$windows_path"`
33350     new_path="$unix_path"
33351   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33352     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33353     new_path="$unix_path"
33354   fi
33355 
33356 
33357   # Now try to locate executable using which
33358   new_path=`$WHICH "$new_path" 2> /dev/null`
33359 
33360   if test "x$new_path" = x; then
33361     # Oops. Which didn't find the executable.
33362     # The splitting of arguments from the executable at a space might have been incorrect,
33363     # since paths with space are more likely in Windows. Give it another try with the whole
33364     # argument.
33365     path="$complete"
33366     arguments="EOL"
33367     new_path="$path"
33368 
33369   windows_path="$new_path"
33370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33371     unix_path=`$CYGPATH -u "$windows_path"`
33372     new_path="$unix_path"
33373   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33374     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33375     new_path="$unix_path"
33376   fi
33377 
33378 
33379     new_path=`$WHICH "$new_path" 2> /dev/null`
33380     # bat and cmd files are not always considered executable in MSYS causing which
33381     # to not find them
33382     if test "x$new_path" = x \
33383         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33384         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33385       new_path="$path"
33386 
33387   windows_path="$new_path"
33388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33389     unix_path=`$CYGPATH -u "$windows_path"`
33390     new_path="$unix_path"
33391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33393     new_path="$unix_path"
33394   fi
33395 
33396     fi
33397 
33398     if test "x$new_path" = x; then
33399       # It's still not found. Now this is an unrecoverable error.
33400       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33401 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33402       has_space=`$ECHO "$complete" | $GREP " "`
33403       if test "x$has_space" != x; then
33404         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33405 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33406       fi
33407       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33408     fi
33409   fi
33410 
33411   # Now new_path has a complete unix path to the binary
33412   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33413     # Keep paths in /bin as-is, but remove trailing .exe if any
33414     new_path="${new_path/%.exe/}"
33415     # Do not save /bin paths to all_fixpath_prefixes!
33416   else
33417     # Not in mixed or Windows style, start by that.
33418     new_path=`cmd //c echo $new_path`
33419 
33420   input_path="$new_path"
33421   # Check if we need to convert this using DOS-style short mode. If the path
33422   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33423   # take no chances and rewrite it.
33424   # Note: m4 eats our [], so we need to use [ and ] instead.
33425   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33426   if test "x$has_forbidden_chars" != x; then
33427     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33428     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33429   fi
33430 
33431     # Output is in $new_path
33432 
33433   windows_path="$new_path"
33434   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33435     unix_path=`$CYGPATH -u "$windows_path"`
33436     new_path="$unix_path"
33437   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33438     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33439     new_path="$unix_path"
33440   fi
33441 
33442     # remove trailing .exe if any
33443     new_path="${new_path/%.exe/}"
33444 
33445     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33446     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33447   fi
33448 
33449     else
33450       # We're on a unix platform. Hooray! :)
33451       # First separate the path from the arguments. This will split at the first
33452       # space.
33453       complete="$CC"
33454       path="${complete%% *}"
33455       tmp="$complete EOL"
33456       arguments="${tmp#* }"
33457 
33458       # Cannot rely on the command "which" here since it doesn't always work.
33459       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33460       if test -z "$is_absolute_path"; then
33461         # Path to executable is not absolute. Find it.
33462         IFS_save="$IFS"
33463         IFS=:
33464         for p in $PATH; do
33465           if test -f "$p/$path" && test -x "$p/$path"; then
33466             new_path="$p/$path"
33467             break
33468           fi
33469         done
33470         IFS="$IFS_save"
33471       else
33472         # This is an absolute path, we can use it without further modifications.
33473         new_path="$path"
33474       fi
33475 
33476       if test "x$new_path" = x; then
33477         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33478 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33479         has_space=`$ECHO "$complete" | $GREP " "`
33480         if test "x$has_space" != x; then
33481           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33482 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33483         fi
33484         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33485       fi
33486     fi
33487 
33488     # Now join together the path and the arguments once again
33489     if test "x$arguments" != xEOL; then
33490       new_complete="$new_path ${arguments% *}"
33491     else
33492       new_complete="$new_path"
33493     fi
33494 
33495     if test "x$complete" != "x$new_complete"; then
33496       CC="$new_complete"
33497       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33498 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33499     fi
33500   fi
33501 
33502   TEST_COMPILER="$CC"
33503 
33504   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33505 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
33506   SYMLINK_ORIGINAL="$TEST_COMPILER"
33507 
33508   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33509     # Follow a chain of symbolic links. Use readlink
33510     # where it exists, else fall back to horribly
33511     # complicated shell code.
33512     if test "x$READLINK_TESTED" != yes; then
33513       # On MacOSX there is a readlink tool with a different
33514       # purpose than the GNU readlink tool. Check the found readlink.
33515       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33516       if test "x$ISGNU" = x; then
33517         # A readlink that we do not know how to use.
33518         # Are there other non-GNU readlinks out there?
33519         READLINK_TESTED=yes
33520         READLINK=
33521       fi
33522     fi
33523 
33524     if test "x$READLINK" != x; then
33525       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33526     else
33527       # Save the current directory for restoring afterwards
33528       STARTDIR=$PWD
33529       COUNTER=0
33530       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33531       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33532       cd $sym_link_dir
33533       # Use -P flag to resolve symlinks in directories.
33534       cd `$THEPWDCMD -P`
33535       sym_link_dir=`$THEPWDCMD -P`
33536       # Resolve file symlinks
33537       while test $COUNTER -lt 20; do
33538         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33539         if test "x$ISLINK" == x; then
33540           # This is not a symbolic link! We are done!
33541           break
33542         fi
33543         # Again resolve directory symlinks since the target of the just found
33544         # link could be in a different directory
33545         cd `$DIRNAME $ISLINK`
33546         sym_link_dir=`$THEPWDCMD -P`
33547         sym_link_file=`$BASENAME $ISLINK`
33548         let COUNTER=COUNTER+1
33549       done
33550       cd $STARTDIR
33551       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33552     fi
33553   fi
33554 
33555   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33556     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33557 $as_echo "no symlink" >&6; }
33558   else
33559     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33560 $as_echo "$SYMLINK_ORIGINAL" >&6; }
33561 
33562     # We can't handle ccache by gcc wrappers, since we need to know if we're
33563     # using ccache. Instead ccache usage must be controlled by a configure option.
33564     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33565     if test "x$COMPILER_BASENAME" = "xccache"; then
33566       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33567 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33568       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33569     fi
33570   fi
33571 
33572 
33573   COMPILER=$CC
33574   COMPILER_NAME=$COMPILER_NAME
33575 
33576   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33577     # cc -V output typically looks like
33578     #     cc: Sun C 5.12 Linux_i386 2011/11/16
33579     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33580     # Check that this is likely to be the Solaris Studio cc.
33581     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33582     if test $? -ne 0; then
33583       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33584       { $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
33585 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33586       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33587 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33588       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33589 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33590       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33591     fi
33592     # Remove usage instructions (if present), and
33593     # collapse compiler output into a single line
33594     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33595         $SED -e 's/ *[Uu]sage:.*//'`
33596     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33597         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33598   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33599     # xlc -qversion output typically looks like
33600     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33601     #     Version: 11.01.0000.0015
33602     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33603     # Check that this is likely to be the IBM XL C compiler.
33604     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33605     if test $? -ne 0; then
33606       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33607       { $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
33608 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33609       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33610 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33611       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33612 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33613       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33614     fi
33615     # Collapse compiler output into a single line
33616     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33617     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33618         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33619   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33620     # There is no specific version flag, but all output starts with a version string.
33621     # First line typically looks something like:
33622     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33623     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33624     # Check that this is likely to be Microsoft CL.EXE.
33625     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33626     if test $? -ne 0; then
33627       { $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
33628 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33629       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33630 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33631       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33632     fi
33633     # Collapse compiler output into a single line
33634     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33635     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33636         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33637   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33638     # gcc --version output typically looks like
33639     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33640     #     Copyright (C) 2013 Free Software Foundation, Inc.
33641     #     This is free software; see the source for copying conditions.  There is NO
33642     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33643     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33644     # Check that this is likely to be GCC.
33645     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33646     if test $? -ne 0; then
33647       { $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
33648 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33649       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33650 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33651       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33652     fi
33653     # Remove Copyright and legalese from version string, and
33654     # collapse into a single line
33655     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33656         $SED -e 's/ *Copyright .*//'`
33657     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33658         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33659   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33660     # clang --version output typically looks like
33661     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33662     #    clang version 3.3 (tags/RELEASE_33/final)
33663     # or
33664     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33665     #    Target: x86_64-pc-linux-gnu
33666     #    Thread model: posix
33667     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33668     # Check that this is likely to be clang
33669     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33670     if test $? -ne 0; then
33671       { $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
33672 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33673       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33674 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33675       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33676     fi
33677     # Collapse compiler output into a single line
33678     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33679     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33680         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33681   else
33682       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33683   fi
33684   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33685   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33686   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33687   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33688 
33689   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33690 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33691 
33692 
33693   # Now that we have resolved CC ourself, let autoconf have its go at it
33694   ac_ext=c
33695 ac_cpp='$CPP $CPPFLAGS'
33696 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33697 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33698 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33699 if test -n "$ac_tool_prefix"; then
33700   for ac_prog in $CC
33701   do
33702     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33703 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33705 $as_echo_n "checking for $ac_word... " >&6; }
33706 if ${ac_cv_prog_CC+:} false; then :
33707   $as_echo_n "(cached) " >&6
33708 else
33709   if test -n "$CC"; then
33710   ac_cv_prog_CC="$CC" # Let the user override the test.
33711 else
33712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33713 for as_dir in $PATH
33714 do
33715   IFS=$as_save_IFS
33716   test -z "$as_dir" && as_dir=.
33717     for ac_exec_ext in '' $ac_executable_extensions; do
33718   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33719     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33720     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33721     break 2
33722   fi
33723 done
33724   done
33725 IFS=$as_save_IFS
33726 
33727 fi
33728 fi
33729 CC=$ac_cv_prog_CC
33730 if test -n "$CC"; then
33731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33732 $as_echo "$CC" >&6; }
33733 else
33734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33735 $as_echo "no" >&6; }
33736 fi
33737 
33738 
33739     test -n "$CC" && break
33740   done
33741 fi
33742 if test -z "$CC"; then
33743   ac_ct_CC=$CC
33744   for ac_prog in $CC
33745 do
33746   # Extract the first word of "$ac_prog", so it can be a program name with args.
33747 set dummy $ac_prog; ac_word=$2
33748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33749 $as_echo_n "checking for $ac_word... " >&6; }
33750 if ${ac_cv_prog_ac_ct_CC+:} false; then :
33751   $as_echo_n "(cached) " >&6
33752 else
33753   if test -n "$ac_ct_CC"; then
33754   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33755 else
33756 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33757 for as_dir in $PATH
33758 do
33759   IFS=$as_save_IFS
33760   test -z "$as_dir" && as_dir=.
33761     for ac_exec_ext in '' $ac_executable_extensions; do
33762   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33763     ac_cv_prog_ac_ct_CC="$ac_prog"
33764     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33765     break 2
33766   fi
33767 done
33768   done
33769 IFS=$as_save_IFS
33770 
33771 fi
33772 fi
33773 ac_ct_CC=$ac_cv_prog_ac_ct_CC
33774 if test -n "$ac_ct_CC"; then
33775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33776 $as_echo "$ac_ct_CC" >&6; }
33777 else
33778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33779 $as_echo "no" >&6; }
33780 fi
33781 
33782 
33783   test -n "$ac_ct_CC" && break
33784 done
33785 
33786   if test "x$ac_ct_CC" = x; then
33787     CC=""
33788   else
33789     case $cross_compiling:$ac_tool_warned in
33790 yes:)
33791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33792 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33793 ac_tool_warned=yes ;;
33794 esac
33795     CC=$ac_ct_CC
33796   fi
33797 fi
33798 
33799 
33800 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33801 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33802 as_fn_error $? "no acceptable C compiler found in \$PATH
33803 See \`config.log' for more details" "$LINENO" 5; }
33804 
33805 # Provide some information about the compiler.
33806 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33807 set X $ac_compile
33808 ac_compiler=$2
33809 for ac_option in --version -v -V -qversion; do
33810   { { ac_try="$ac_compiler $ac_option >&5"
33811 case "(($ac_try" in
33812   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33813   *) ac_try_echo=$ac_try;;
33814 esac
33815 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33816 $as_echo "$ac_try_echo"; } >&5
33817   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33818   ac_status=$?
33819   if test -s conftest.err; then
33820     sed '10a\
33821 ... rest of stderr output deleted ...
33822          10q' conftest.err >conftest.er1
33823     cat conftest.er1 >&5
33824   fi
33825   rm -f conftest.er1 conftest.err
33826   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33827   test $ac_status = 0; }
33828 done
33829 
33830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33831 /* end confdefs.h.  */
33832 
33833 int
33834 main ()
33835 {
33836 
33837   ;
33838   return 0;
33839 }
33840 _ACEOF
33841 ac_clean_files_save=$ac_clean_files
33842 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33843 # Try to create an executable without -o first, disregard a.out.
33844 # It will help us diagnose broken compilers, and finding out an intuition
33845 # of exeext.
33846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33847 $as_echo_n "checking whether the C compiler works... " >&6; }
33848 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33849 
33850 # The possible output files:
33851 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33852 
33853 ac_rmfiles=
33854 for ac_file in $ac_files
33855 do
33856   case $ac_file in
33857     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33858     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33859   esac
33860 done
33861 rm -f $ac_rmfiles
33862 
33863 if { { ac_try="$ac_link_default"
33864 case "(($ac_try" in
33865   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33866   *) ac_try_echo=$ac_try;;
33867 esac
33868 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33869 $as_echo "$ac_try_echo"; } >&5
33870   (eval "$ac_link_default") 2>&5
33871   ac_status=$?
33872   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33873   test $ac_status = 0; }; then :
33874   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33875 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33876 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
33877 # so that the user can short-circuit this test for compilers unknown to
33878 # Autoconf.
33879 for ac_file in $ac_files ''
33880 do
33881   test -f "$ac_file" || continue
33882   case $ac_file in
33883     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33884         ;;
33885     [ab].out )
33886         # We found the default executable, but exeext='' is most
33887         # certainly right.
33888         break;;
33889     *.* )
33890         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33891         then :; else
33892            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33893         fi
33894         # We set ac_cv_exeext here because the later test for it is not
33895         # safe: cross compilers may not add the suffix if given an `-o'
33896         # argument, so we may need to know it at that point already.
33897         # Even if this section looks crufty: it has the advantage of
33898         # actually working.
33899         break;;
33900     * )
33901         break;;
33902   esac
33903 done
33904 test "$ac_cv_exeext" = no && ac_cv_exeext=
33905 
33906 else
33907   ac_file=''
33908 fi
33909 if test -z "$ac_file"; then :
33910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33911 $as_echo "no" >&6; }
33912 $as_echo "$as_me: failed program was:" >&5
33913 sed 's/^/| /' conftest.$ac_ext >&5
33914 
33915 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33916 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33917 as_fn_error 77 "C compiler cannot create executables
33918 See \`config.log' for more details" "$LINENO" 5; }
33919 else
33920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33921 $as_echo "yes" >&6; }
33922 fi
33923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33924 $as_echo_n "checking for C compiler default output file name... " >&6; }
33925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33926 $as_echo "$ac_file" >&6; }
33927 ac_exeext=$ac_cv_exeext
33928 
33929 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33930 ac_clean_files=$ac_clean_files_save
33931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33932 $as_echo_n "checking for suffix of executables... " >&6; }
33933 if { { ac_try="$ac_link"
33934 case "(($ac_try" in
33935   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33936   *) ac_try_echo=$ac_try;;
33937 esac
33938 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33939 $as_echo "$ac_try_echo"; } >&5
33940   (eval "$ac_link") 2>&5
33941   ac_status=$?
33942   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33943   test $ac_status = 0; }; then :
33944   # If both `conftest.exe' and `conftest' are `present' (well, observable)
33945 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33946 # work properly (i.e., refer to `conftest.exe'), while it won't with
33947 # `rm'.
33948 for ac_file in conftest.exe conftest conftest.*; do
33949   test -f "$ac_file" || continue
33950   case $ac_file in
33951     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33952     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33953           break;;
33954     * ) break;;
33955   esac
33956 done
33957 else
33958   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33959 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33960 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33961 See \`config.log' for more details" "$LINENO" 5; }
33962 fi
33963 rm -f conftest conftest$ac_cv_exeext
33964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33965 $as_echo "$ac_cv_exeext" >&6; }
33966 
33967 rm -f conftest.$ac_ext
33968 EXEEXT=$ac_cv_exeext
33969 ac_exeext=$EXEEXT
33970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33971 /* end confdefs.h.  */
33972 #include <stdio.h>
33973 int
33974 main ()
33975 {
33976 FILE *f = fopen ("conftest.out", "w");
33977  return ferror (f) || fclose (f) != 0;
33978 
33979   ;
33980   return 0;
33981 }
33982 _ACEOF
33983 ac_clean_files="$ac_clean_files conftest.out"
33984 # Check that the compiler produces executables we can run.  If not, either
33985 # the compiler is broken, or we cross compile.
33986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33987 $as_echo_n "checking whether we are cross compiling... " >&6; }
33988 if test "$cross_compiling" != yes; then
33989   { { ac_try="$ac_link"
33990 case "(($ac_try" in
33991   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33992   *) ac_try_echo=$ac_try;;
33993 esac
33994 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33995 $as_echo "$ac_try_echo"; } >&5
33996   (eval "$ac_link") 2>&5
33997   ac_status=$?
33998   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33999   test $ac_status = 0; }
34000   if { ac_try='./conftest$ac_cv_exeext'
34001   { { case "(($ac_try" in
34002   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34003   *) ac_try_echo=$ac_try;;
34004 esac
34005 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34006 $as_echo "$ac_try_echo"; } >&5
34007   (eval "$ac_try") 2>&5
34008   ac_status=$?
34009   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34010   test $ac_status = 0; }; }; then
34011     cross_compiling=no
34012   else
34013     if test "$cross_compiling" = maybe; then
34014         cross_compiling=yes
34015     else
34016         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34017 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34018 as_fn_error $? "cannot run C compiled programs.
34019 If you meant to cross compile, use \`--host'.
34020 See \`config.log' for more details" "$LINENO" 5; }
34021     fi
34022   fi
34023 fi
34024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34025 $as_echo "$cross_compiling" >&6; }
34026 
34027 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34028 ac_clean_files=$ac_clean_files_save
34029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34030 $as_echo_n "checking for suffix of object files... " >&6; }
34031 if ${ac_cv_objext+:} false; then :
34032   $as_echo_n "(cached) " >&6
34033 else
34034   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34035 /* end confdefs.h.  */
34036 
34037 int
34038 main ()
34039 {
34040 
34041   ;
34042   return 0;
34043 }
34044 _ACEOF
34045 rm -f conftest.o conftest.obj
34046 if { { ac_try="$ac_compile"
34047 case "(($ac_try" in
34048   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34049   *) ac_try_echo=$ac_try;;
34050 esac
34051 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34052 $as_echo "$ac_try_echo"; } >&5
34053   (eval "$ac_compile") 2>&5
34054   ac_status=$?
34055   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34056   test $ac_status = 0; }; then :
34057   for ac_file in conftest.o conftest.obj conftest.*; do
34058   test -f "$ac_file" || continue;
34059   case $ac_file in
34060     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34061     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34062        break;;
34063   esac
34064 done
34065 else
34066   $as_echo "$as_me: failed program was:" >&5
34067 sed 's/^/| /' conftest.$ac_ext >&5
34068 
34069 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34070 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34071 as_fn_error $? "cannot compute suffix of object files: cannot compile
34072 See \`config.log' for more details" "$LINENO" 5; }
34073 fi
34074 rm -f conftest.$ac_cv_objext conftest.$ac_ext
34075 fi
34076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34077 $as_echo "$ac_cv_objext" >&6; }
34078 OBJEXT=$ac_cv_objext
34079 ac_objext=$OBJEXT
34080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34081 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34082 if ${ac_cv_c_compiler_gnu+:} false; then :
34083   $as_echo_n "(cached) " >&6
34084 else
34085   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34086 /* end confdefs.h.  */
34087 
34088 int
34089 main ()
34090 {
34091 #ifndef __GNUC__
34092        choke me
34093 #endif
34094 
34095   ;
34096   return 0;
34097 }
34098 _ACEOF
34099 if ac_fn_c_try_compile "$LINENO"; then :
34100   ac_compiler_gnu=yes
34101 else
34102   ac_compiler_gnu=no
34103 fi
34104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34105 ac_cv_c_compiler_gnu=$ac_compiler_gnu
34106 
34107 fi
34108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34109 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
34110 if test $ac_compiler_gnu = yes; then
34111   GCC=yes
34112 else
34113   GCC=
34114 fi
34115 ac_test_CFLAGS=${CFLAGS+set}
34116 ac_save_CFLAGS=$CFLAGS
34117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34118 $as_echo_n "checking whether $CC accepts -g... " >&6; }
34119 if ${ac_cv_prog_cc_g+:} false; then :
34120   $as_echo_n "(cached) " >&6
34121 else
34122   ac_save_c_werror_flag=$ac_c_werror_flag
34123    ac_c_werror_flag=yes
34124    ac_cv_prog_cc_g=no
34125    CFLAGS="-g"
34126    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34127 /* end confdefs.h.  */
34128 
34129 int
34130 main ()
34131 {
34132 
34133   ;
34134   return 0;
34135 }
34136 _ACEOF
34137 if ac_fn_c_try_compile "$LINENO"; then :
34138   ac_cv_prog_cc_g=yes
34139 else
34140   CFLAGS=""
34141       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34142 /* end confdefs.h.  */
34143 
34144 int
34145 main ()
34146 {
34147 
34148   ;
34149   return 0;
34150 }
34151 _ACEOF
34152 if ac_fn_c_try_compile "$LINENO"; then :
34153 
34154 else
34155   ac_c_werror_flag=$ac_save_c_werror_flag
34156          CFLAGS="-g"
34157          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34158 /* end confdefs.h.  */
34159 
34160 int
34161 main ()
34162 {
34163 
34164   ;
34165   return 0;
34166 }
34167 _ACEOF
34168 if ac_fn_c_try_compile "$LINENO"; then :
34169   ac_cv_prog_cc_g=yes
34170 fi
34171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34172 fi
34173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34174 fi
34175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34176    ac_c_werror_flag=$ac_save_c_werror_flag
34177 fi
34178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34179 $as_echo "$ac_cv_prog_cc_g" >&6; }
34180 if test "$ac_test_CFLAGS" = set; then
34181   CFLAGS=$ac_save_CFLAGS
34182 elif test $ac_cv_prog_cc_g = yes; then
34183   if test "$GCC" = yes; then
34184     CFLAGS="-g -O2"
34185   else
34186     CFLAGS="-g"
34187   fi
34188 else
34189   if test "$GCC" = yes; then
34190     CFLAGS="-O2"
34191   else
34192     CFLAGS=
34193   fi
34194 fi
34195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34196 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34197 if ${ac_cv_prog_cc_c89+:} false; then :
34198   $as_echo_n "(cached) " >&6
34199 else
34200   ac_cv_prog_cc_c89=no
34201 ac_save_CC=$CC
34202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34203 /* end confdefs.h.  */
34204 #include <stdarg.h>
34205 #include <stdio.h>
34206 struct stat;
34207 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34208 struct buf { int x; };
34209 FILE * (*rcsopen) (struct buf *, struct stat *, int);
34210 static char *e (p, i)
34211      char **p;
34212      int i;
34213 {
34214   return p[i];
34215 }
34216 static char *f (char * (*g) (char **, int), char **p, ...)
34217 {
34218   char *s;
34219   va_list v;
34220   va_start (v,p);
34221   s = g (p, va_arg (v,int));
34222   va_end (v);
34223   return s;
34224 }
34225 
34226 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34227    function prototypes and stuff, but not '\xHH' hex character constants.
34228    These don't provoke an error unfortunately, instead are silently treated
34229    as 'x'.  The following induces an error, until -std is added to get
34230    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34231    array size at least.  It's necessary to write '\x00'==0 to get something
34232    that's true only with -std.  */
34233 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34234 
34235 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34236    inside strings and character constants.  */
34237 #define FOO(x) 'x'
34238 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34239 
34240 int test (int i, double x);
34241 struct s1 {int (*f) (int a);};
34242 struct s2 {int (*f) (double a);};
34243 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34244 int argc;
34245 char **argv;
34246 int
34247 main ()
34248 {
34249 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34250   ;
34251   return 0;
34252 }
34253 _ACEOF
34254 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34255         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34256 do
34257   CC="$ac_save_CC $ac_arg"
34258   if ac_fn_c_try_compile "$LINENO"; then :
34259   ac_cv_prog_cc_c89=$ac_arg
34260 fi
34261 rm -f core conftest.err conftest.$ac_objext
34262   test "x$ac_cv_prog_cc_c89" != "xno" && break
34263 done
34264 rm -f conftest.$ac_ext
34265 CC=$ac_save_CC
34266 
34267 fi
34268 # AC_CACHE_VAL
34269 case "x$ac_cv_prog_cc_c89" in
34270   x)
34271     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34272 $as_echo "none needed" >&6; } ;;
34273   xno)
34274     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34275 $as_echo "unsupported" >&6; } ;;
34276   *)
34277     CC="$CC $ac_cv_prog_cc_c89"
34278     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34279 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34280 esac
34281 if test "x$ac_cv_prog_cc_c89" != xno; then :
34282 
34283 fi
34284 
34285 ac_ext=cpp
34286 ac_cpp='$CXXCPP $CPPFLAGS'
34287 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34288 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34289 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34290 
34291 
34292 
34293   COMPILER_NAME=C++
34294   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34295 
34296   if test "x$CXX" != x; then
34297     # User has supplied compiler name already, always let that override.
34298     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34299 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34300     if test "x`basename $CXX`" = "x$CXX"; then
34301       # A command without a complete path is provided, search $PATH.
34302 
34303       for ac_prog in $CXX
34304 do
34305   # Extract the first word of "$ac_prog", so it can be a program name with args.
34306 set dummy $ac_prog; ac_word=$2
34307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34308 $as_echo_n "checking for $ac_word... " >&6; }
34309 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34310   $as_echo_n "(cached) " >&6
34311 else
34312   case $POTENTIAL_CXX in
34313   [\\/]* | ?:[\\/]*)
34314   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34315   ;;
34316   *)
34317   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34318 for as_dir in $PATH
34319 do
34320   IFS=$as_save_IFS
34321   test -z "$as_dir" && as_dir=.
34322     for ac_exec_ext in '' $ac_executable_extensions; do
34323   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34324     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34325     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34326     break 2
34327   fi
34328 done
34329   done
34330 IFS=$as_save_IFS
34331 
34332   ;;
34333 esac
34334 fi
34335 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34336 if test -n "$POTENTIAL_CXX"; then
34337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34338 $as_echo "$POTENTIAL_CXX" >&6; }
34339 else
34340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34341 $as_echo "no" >&6; }
34342 fi
34343 
34344 
34345   test -n "$POTENTIAL_CXX" && break
34346 done
34347 
34348       if test "x$POTENTIAL_CXX" != x; then
34349         CXX=$POTENTIAL_CXX
34350       else
34351         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34352       fi
34353     else
34354       # Otherwise it might already be a complete path
34355       if test ! -x "$CXX"; then
34356         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34357       fi
34358     fi
34359   else
34360     # No user supplied value. Locate compiler ourselves.
34361 
34362     # If we are cross compiling, assume cross compilation tools follows the
34363     # cross compilation standard where they are prefixed with the autoconf
34364     # standard name for the target. For example the binary
34365     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34366     # If we are not cross compiling, then the default compiler name will be
34367     # used.
34368 
34369     CXX=
34370     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34371     # before checking the rest of the PATH.
34372     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34373     # step, this should not be necessary.
34374     if test -n "$TOOLCHAIN_PATH"; then
34375       PATH_save="$PATH"
34376       PATH="$TOOLCHAIN_PATH"
34377       for ac_prog in $SEARCH_LIST
34378 do
34379   # Extract the first word of "$ac_prog", so it can be a program name with args.
34380 set dummy $ac_prog; ac_word=$2
34381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34382 $as_echo_n "checking for $ac_word... " >&6; }
34383 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34384   $as_echo_n "(cached) " >&6
34385 else
34386   case $TOOLCHAIN_PATH_CXX in
34387   [\\/]* | ?:[\\/]*)
34388   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34389   ;;
34390   *)
34391   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34392 for as_dir in $PATH
34393 do
34394   IFS=$as_save_IFS
34395   test -z "$as_dir" && as_dir=.
34396     for ac_exec_ext in '' $ac_executable_extensions; do
34397   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34398     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34399     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34400     break 2
34401   fi
34402 done
34403   done
34404 IFS=$as_save_IFS
34405 
34406   ;;
34407 esac
34408 fi
34409 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34410 if test -n "$TOOLCHAIN_PATH_CXX"; then
34411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34412 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34413 else
34414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34415 $as_echo "no" >&6; }
34416 fi
34417 
34418 
34419   test -n "$TOOLCHAIN_PATH_CXX" && break
34420 done
34421 
34422       CXX=$TOOLCHAIN_PATH_CXX
34423       PATH="$PATH_save"
34424     fi
34425 
34426     # AC_PATH_PROGS can't be run multiple times with the same variable,
34427     # so create a new name for this run.
34428     if test "x$CXX" = x; then
34429       for ac_prog in $SEARCH_LIST
34430 do
34431   # Extract the first word of "$ac_prog", so it can be a program name with args.
34432 set dummy $ac_prog; ac_word=$2
34433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34434 $as_echo_n "checking for $ac_word... " >&6; }
34435 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34436   $as_echo_n "(cached) " >&6
34437 else
34438   case $POTENTIAL_CXX in
34439   [\\/]* | ?:[\\/]*)
34440   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34441   ;;
34442   *)
34443   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34444 for as_dir in $PATH
34445 do
34446   IFS=$as_save_IFS
34447   test -z "$as_dir" && as_dir=.
34448     for ac_exec_ext in '' $ac_executable_extensions; do
34449   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34450     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34452     break 2
34453   fi
34454 done
34455   done
34456 IFS=$as_save_IFS
34457 
34458   ;;
34459 esac
34460 fi
34461 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34462 if test -n "$POTENTIAL_CXX"; then
34463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34464 $as_echo "$POTENTIAL_CXX" >&6; }
34465 else
34466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34467 $as_echo "no" >&6; }
34468 fi
34469 
34470 
34471   test -n "$POTENTIAL_CXX" && break
34472 done
34473 
34474       CXX=$POTENTIAL_CXX
34475     fi
34476 
34477     if test "x$CXX" = x; then
34478 
34479   # Print a helpful message on how to acquire the necessary build dependency.
34480   # devkit is the help tag: freetype, cups, alsa etc
34481   MISSING_DEPENDENCY=devkit
34482 
34483   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34484     cygwin_help $MISSING_DEPENDENCY
34485   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34486     msys_help $MISSING_DEPENDENCY
34487   else
34488     PKGHANDLER_COMMAND=
34489 
34490     case $PKGHANDLER in
34491       apt-get)
34492         apt_help     $MISSING_DEPENDENCY ;;
34493       yum)
34494         yum_help     $MISSING_DEPENDENCY ;;
34495       port)
34496         port_help    $MISSING_DEPENDENCY ;;
34497       pkgutil)
34498         pkgutil_help $MISSING_DEPENDENCY ;;
34499       pkgadd)
34500         pkgadd_help  $MISSING_DEPENDENCY ;;
34501     esac
34502 
34503     if test "x$PKGHANDLER_COMMAND" != x; then
34504       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34505     fi
34506   fi
34507 
34508       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34509     fi
34510   fi
34511 
34512   # Now we have a compiler binary in CXX. Make sure it's okay.
34513 
34514   # Only process if variable expands to non-empty
34515 
34516   if test "x$CXX" != x; then
34517     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34518 
34519   # First separate the path from the arguments. This will split at the first
34520   # space.
34521   complete="$CXX"
34522   path="${complete%% *}"
34523   tmp="$complete EOL"
34524   arguments="${tmp#* }"
34525 
34526   # Input might be given as Windows format, start by converting to
34527   # unix format.
34528   new_path=`$CYGPATH -u "$path"`
34529 
34530   # Now try to locate executable using which
34531   new_path=`$WHICH "$new_path" 2> /dev/null`
34532   # bat and cmd files are not always considered executable in cygwin causing which
34533   # to not find them
34534   if test "x$new_path" = x \
34535       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34536       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34537     new_path=`$CYGPATH -u "$path"`
34538   fi
34539   if test "x$new_path" = x; then
34540     # Oops. Which didn't find the executable.
34541     # The splitting of arguments from the executable at a space might have been incorrect,
34542     # since paths with space are more likely in Windows. Give it another try with the whole
34543     # argument.
34544     path="$complete"
34545     arguments="EOL"
34546     new_path=`$CYGPATH -u "$path"`
34547     new_path=`$WHICH "$new_path" 2> /dev/null`
34548     # bat and cmd files are not always considered executable in cygwin causing which
34549     # to not find them
34550     if test "x$new_path" = x \
34551         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34552         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34553       new_path=`$CYGPATH -u "$path"`
34554     fi
34555     if test "x$new_path" = x; then
34556       # It's still not found. Now this is an unrecoverable error.
34557       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34558 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34559       has_space=`$ECHO "$complete" | $GREP " "`
34560       if test "x$has_space" != x; then
34561         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34562 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34563       fi
34564       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34565     fi
34566   fi
34567 
34568   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34569   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34570   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34571   # "foo.exe" is OK but "foo" is an error.
34572   #
34573   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34574   # It is also a way to make sure we got the proper file name for the real test later on.
34575   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34576   if test "x$test_shortpath" = x; then
34577     # Short path failed, file does not exist as specified.
34578     # Try adding .exe or .cmd
34579     if test -f "${new_path}.exe"; then
34580       input_to_shortpath="${new_path}.exe"
34581     elif test -f "${new_path}.cmd"; then
34582       input_to_shortpath="${new_path}.cmd"
34583     else
34584       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34585 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34586       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34587 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34588       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34589     fi
34590   else
34591     input_to_shortpath="$new_path"
34592   fi
34593 
34594   # Call helper function which possibly converts this using DOS-style short mode.
34595   # If so, the updated path is stored in $new_path.
34596   new_path="$input_to_shortpath"
34597 
34598   input_path="$input_to_shortpath"
34599   # Check if we need to convert this using DOS-style short mode. If the path
34600   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34601   # take no chances and rewrite it.
34602   # Note: m4 eats our [], so we need to use [ and ] instead.
34603   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34604   if test "x$has_forbidden_chars" != x; then
34605     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34606     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34607     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34608     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34609       # Going to short mode and back again did indeed matter. Since short mode is
34610       # case insensitive, let's make it lowercase to improve readability.
34611       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34612       # Now convert it back to Unix-style (cygpath)
34613       input_path=`$CYGPATH -u "$shortmode_path"`
34614       new_path="$input_path"
34615     fi
34616   fi
34617 
34618   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34619   if test "x$test_cygdrive_prefix" = x; then
34620     # As a simple fix, exclude /usr/bin since it's not a real path.
34621     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34622       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34623       # a path prefixed by /cygdrive for fixpath to work.
34624       new_path="$CYGWIN_ROOT_PATH$input_path"
34625     fi
34626   fi
34627 
34628   # remove trailing .exe if any
34629   new_path="${new_path/%.exe/}"
34630 
34631     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34632 
34633   # First separate the path from the arguments. This will split at the first
34634   # space.
34635   complete="$CXX"
34636   path="${complete%% *}"
34637   tmp="$complete EOL"
34638   arguments="${tmp#* }"
34639 
34640   # Input might be given as Windows format, start by converting to
34641   # unix format.
34642   new_path="$path"
34643 
34644   windows_path="$new_path"
34645   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34646     unix_path=`$CYGPATH -u "$windows_path"`
34647     new_path="$unix_path"
34648   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34649     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34650     new_path="$unix_path"
34651   fi
34652 
34653 
34654   # Now try to locate executable using which
34655   new_path=`$WHICH "$new_path" 2> /dev/null`
34656 
34657   if test "x$new_path" = x; then
34658     # Oops. Which didn't find the executable.
34659     # The splitting of arguments from the executable at a space might have been incorrect,
34660     # since paths with space are more likely in Windows. Give it another try with the whole
34661     # argument.
34662     path="$complete"
34663     arguments="EOL"
34664     new_path="$path"
34665 
34666   windows_path="$new_path"
34667   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34668     unix_path=`$CYGPATH -u "$windows_path"`
34669     new_path="$unix_path"
34670   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34671     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34672     new_path="$unix_path"
34673   fi
34674 
34675 
34676     new_path=`$WHICH "$new_path" 2> /dev/null`
34677     # bat and cmd files are not always considered executable in MSYS causing which
34678     # to not find them
34679     if test "x$new_path" = x \
34680         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34681         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34682       new_path="$path"
34683 
34684   windows_path="$new_path"
34685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34686     unix_path=`$CYGPATH -u "$windows_path"`
34687     new_path="$unix_path"
34688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34689     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34690     new_path="$unix_path"
34691   fi
34692 
34693     fi
34694 
34695     if test "x$new_path" = x; then
34696       # It's still not found. Now this is an unrecoverable error.
34697       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34698 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34699       has_space=`$ECHO "$complete" | $GREP " "`
34700       if test "x$has_space" != x; then
34701         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34702 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34703       fi
34704       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34705     fi
34706   fi
34707 
34708   # Now new_path has a complete unix path to the binary
34709   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34710     # Keep paths in /bin as-is, but remove trailing .exe if any
34711     new_path="${new_path/%.exe/}"
34712     # Do not save /bin paths to all_fixpath_prefixes!
34713   else
34714     # Not in mixed or Windows style, start by that.
34715     new_path=`cmd //c echo $new_path`
34716 
34717   input_path="$new_path"
34718   # Check if we need to convert this using DOS-style short mode. If the path
34719   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34720   # take no chances and rewrite it.
34721   # Note: m4 eats our [], so we need to use [ and ] instead.
34722   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34723   if test "x$has_forbidden_chars" != x; then
34724     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34725     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34726   fi
34727 
34728     # Output is in $new_path
34729 
34730   windows_path="$new_path"
34731   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34732     unix_path=`$CYGPATH -u "$windows_path"`
34733     new_path="$unix_path"
34734   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34735     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34736     new_path="$unix_path"
34737   fi
34738 
34739     # remove trailing .exe if any
34740     new_path="${new_path/%.exe/}"
34741 
34742     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34743     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34744   fi
34745 
34746     else
34747       # We're on a unix platform. Hooray! :)
34748       # First separate the path from the arguments. This will split at the first
34749       # space.
34750       complete="$CXX"
34751       path="${complete%% *}"
34752       tmp="$complete EOL"
34753       arguments="${tmp#* }"
34754 
34755       # Cannot rely on the command "which" here since it doesn't always work.
34756       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34757       if test -z "$is_absolute_path"; then
34758         # Path to executable is not absolute. Find it.
34759         IFS_save="$IFS"
34760         IFS=:
34761         for p in $PATH; do
34762           if test -f "$p/$path" && test -x "$p/$path"; then
34763             new_path="$p/$path"
34764             break
34765           fi
34766         done
34767         IFS="$IFS_save"
34768       else
34769         # This is an absolute path, we can use it without further modifications.
34770         new_path="$path"
34771       fi
34772 
34773       if test "x$new_path" = x; then
34774         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34775 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34776         has_space=`$ECHO "$complete" | $GREP " "`
34777         if test "x$has_space" != x; then
34778           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34779 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34780         fi
34781         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34782       fi
34783     fi
34784 
34785     # Now join together the path and the arguments once again
34786     if test "x$arguments" != xEOL; then
34787       new_complete="$new_path ${arguments% *}"
34788     else
34789       new_complete="$new_path"
34790     fi
34791 
34792     if test "x$complete" != "x$new_complete"; then
34793       CXX="$new_complete"
34794       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34795 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34796     fi
34797   fi
34798 
34799   TEST_COMPILER="$CXX"
34800 
34801   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34802 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34803   SYMLINK_ORIGINAL="$TEST_COMPILER"
34804 
34805   if test "x$OPENJDK_BUILD_OS" != xwindows; then
34806     # Follow a chain of symbolic links. Use readlink
34807     # where it exists, else fall back to horribly
34808     # complicated shell code.
34809     if test "x$READLINK_TESTED" != yes; then
34810       # On MacOSX there is a readlink tool with a different
34811       # purpose than the GNU readlink tool. Check the found readlink.
34812       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34813       if test "x$ISGNU" = x; then
34814         # A readlink that we do not know how to use.
34815         # Are there other non-GNU readlinks out there?
34816         READLINK_TESTED=yes
34817         READLINK=
34818       fi
34819     fi
34820 
34821     if test "x$READLINK" != x; then
34822       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34823     else
34824       # Save the current directory for restoring afterwards
34825       STARTDIR=$PWD
34826       COUNTER=0
34827       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34828       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34829       cd $sym_link_dir
34830       # Use -P flag to resolve symlinks in directories.
34831       cd `$THEPWDCMD -P`
34832       sym_link_dir=`$THEPWDCMD -P`
34833       # Resolve file symlinks
34834       while test $COUNTER -lt 20; do
34835         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34836         if test "x$ISLINK" == x; then
34837           # This is not a symbolic link! We are done!
34838           break
34839         fi
34840         # Again resolve directory symlinks since the target of the just found
34841         # link could be in a different directory
34842         cd `$DIRNAME $ISLINK`
34843         sym_link_dir=`$THEPWDCMD -P`
34844         sym_link_file=`$BASENAME $ISLINK`
34845         let COUNTER=COUNTER+1
34846       done
34847       cd $STARTDIR
34848       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34849     fi
34850   fi
34851 
34852   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34853     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34854 $as_echo "no symlink" >&6; }
34855   else
34856     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34857 $as_echo "$SYMLINK_ORIGINAL" >&6; }
34858 
34859     # We can't handle ccache by gcc wrappers, since we need to know if we're
34860     # using ccache. Instead ccache usage must be controlled by a configure option.
34861     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34862     if test "x$COMPILER_BASENAME" = "xccache"; then
34863       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34864 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34865       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34866     fi
34867   fi
34868 
34869 
34870   COMPILER=$CXX
34871   COMPILER_NAME=$COMPILER_NAME
34872 
34873   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34874     # cc -V output typically looks like
34875     #     cc: Sun C 5.12 Linux_i386 2011/11/16
34876     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34877     # Check that this is likely to be the Solaris Studio cc.
34878     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34879     if test $? -ne 0; then
34880       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34881       { $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
34882 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34883       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34884 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34885       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34886 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34887       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34888     fi
34889     # Remove usage instructions (if present), and
34890     # collapse compiler output into a single line
34891     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34892         $SED -e 's/ *[Uu]sage:.*//'`
34893     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34894         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34895   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34896     # xlc -qversion output typically looks like
34897     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34898     #     Version: 11.01.0000.0015
34899     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34900     # Check that this is likely to be the IBM XL C compiler.
34901     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34902     if test $? -ne 0; then
34903       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34904       { $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
34905 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34906       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34907 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34908       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34909 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34910       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34911     fi
34912     # Collapse compiler output into a single line
34913     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34914     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34915         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34916   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34917     # There is no specific version flag, but all output starts with a version string.
34918     # First line typically looks something like:
34919     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34920     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34921     # Check that this is likely to be Microsoft CL.EXE.
34922     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34923     if test $? -ne 0; then
34924       { $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
34925 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34926       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34927 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34928       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34929     fi
34930     # Collapse compiler output into a single line
34931     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34932     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34933         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34934   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34935     # gcc --version output typically looks like
34936     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34937     #     Copyright (C) 2013 Free Software Foundation, Inc.
34938     #     This is free software; see the source for copying conditions.  There is NO
34939     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34940     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34941     # Check that this is likely to be GCC.
34942     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34943     if test $? -ne 0; then
34944       { $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
34945 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34946       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34947 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34948       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34949     fi
34950     # Remove Copyright and legalese from version string, and
34951     # collapse into a single line
34952     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34953         $SED -e 's/ *Copyright .*//'`
34954     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34955         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34956   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34957     # clang --version output typically looks like
34958     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34959     #    clang version 3.3 (tags/RELEASE_33/final)
34960     # or
34961     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34962     #    Target: x86_64-pc-linux-gnu
34963     #    Thread model: posix
34964     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34965     # Check that this is likely to be clang
34966     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34967     if test $? -ne 0; then
34968       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34969 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34970       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34971 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34972       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34973     fi
34974     # Collapse compiler output into a single line
34975     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34976     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34977         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34978   else
34979       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34980   fi
34981   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34982   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34983   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34984   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34985 
34986   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34987 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34988 
34989 
34990   # Now that we have resolved CXX ourself, let autoconf have its go at it
34991   ac_ext=cpp
34992 ac_cpp='$CXXCPP $CPPFLAGS'
34993 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34994 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34995 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34996 if test -z "$CXX"; then
34997   if test -n "$CCC"; then
34998     CXX=$CCC
34999   else
35000     if test -n "$ac_tool_prefix"; then
35001   for ac_prog in $CXX
35002   do
35003     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35004 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35006 $as_echo_n "checking for $ac_word... " >&6; }
35007 if ${ac_cv_prog_CXX+:} false; then :
35008   $as_echo_n "(cached) " >&6
35009 else
35010   if test -n "$CXX"; then
35011   ac_cv_prog_CXX="$CXX" # Let the user override the test.
35012 else
35013 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35014 for as_dir in $PATH
35015 do
35016   IFS=$as_save_IFS
35017   test -z "$as_dir" && as_dir=.
35018     for ac_exec_ext in '' $ac_executable_extensions; do
35019   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35020     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35021     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35022     break 2
35023   fi
35024 done
35025   done
35026 IFS=$as_save_IFS
35027 
35028 fi
35029 fi
35030 CXX=$ac_cv_prog_CXX
35031 if test -n "$CXX"; then
35032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35033 $as_echo "$CXX" >&6; }
35034 else
35035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35036 $as_echo "no" >&6; }
35037 fi
35038 
35039 
35040     test -n "$CXX" && break
35041   done
35042 fi
35043 if test -z "$CXX"; then
35044   ac_ct_CXX=$CXX
35045   for ac_prog in $CXX
35046 do
35047   # Extract the first word of "$ac_prog", so it can be a program name with args.
35048 set dummy $ac_prog; ac_word=$2
35049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35050 $as_echo_n "checking for $ac_word... " >&6; }
35051 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35052   $as_echo_n "(cached) " >&6
35053 else
35054   if test -n "$ac_ct_CXX"; then
35055   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35056 else
35057 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35058 for as_dir in $PATH
35059 do
35060   IFS=$as_save_IFS
35061   test -z "$as_dir" && as_dir=.
35062     for ac_exec_ext in '' $ac_executable_extensions; do
35063   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35064     ac_cv_prog_ac_ct_CXX="$ac_prog"
35065     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35066     break 2
35067   fi
35068 done
35069   done
35070 IFS=$as_save_IFS
35071 
35072 fi
35073 fi
35074 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35075 if test -n "$ac_ct_CXX"; then
35076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35077 $as_echo "$ac_ct_CXX" >&6; }
35078 else
35079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35080 $as_echo "no" >&6; }
35081 fi
35082 
35083 
35084   test -n "$ac_ct_CXX" && break
35085 done
35086 
35087   if test "x$ac_ct_CXX" = x; then
35088     CXX="g++"
35089   else
35090     case $cross_compiling:$ac_tool_warned in
35091 yes:)
35092 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35093 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35094 ac_tool_warned=yes ;;
35095 esac
35096     CXX=$ac_ct_CXX
35097   fi
35098 fi
35099 
35100   fi
35101 fi
35102 # Provide some information about the compiler.
35103 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35104 set X $ac_compile
35105 ac_compiler=$2
35106 for ac_option in --version -v -V -qversion; do
35107   { { ac_try="$ac_compiler $ac_option >&5"
35108 case "(($ac_try" in
35109   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35110   *) ac_try_echo=$ac_try;;
35111 esac
35112 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35113 $as_echo "$ac_try_echo"; } >&5
35114   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35115   ac_status=$?
35116   if test -s conftest.err; then
35117     sed '10a\
35118 ... rest of stderr output deleted ...
35119          10q' conftest.err >conftest.er1
35120     cat conftest.er1 >&5
35121   fi
35122   rm -f conftest.er1 conftest.err
35123   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35124   test $ac_status = 0; }
35125 done
35126 
35127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35128 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35129 if ${ac_cv_cxx_compiler_gnu+:} false; then :
35130   $as_echo_n "(cached) " >&6
35131 else
35132   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35133 /* end confdefs.h.  */
35134 
35135 int
35136 main ()
35137 {
35138 #ifndef __GNUC__
35139        choke me
35140 #endif
35141 
35142   ;
35143   return 0;
35144 }
35145 _ACEOF
35146 if ac_fn_cxx_try_compile "$LINENO"; then :
35147   ac_compiler_gnu=yes
35148 else
35149   ac_compiler_gnu=no
35150 fi
35151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35152 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35153 
35154 fi
35155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35156 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35157 if test $ac_compiler_gnu = yes; then
35158   GXX=yes
35159 else
35160   GXX=
35161 fi
35162 ac_test_CXXFLAGS=${CXXFLAGS+set}
35163 ac_save_CXXFLAGS=$CXXFLAGS
35164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35165 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
35166 if ${ac_cv_prog_cxx_g+:} false; then :
35167   $as_echo_n "(cached) " >&6
35168 else
35169   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35170    ac_cxx_werror_flag=yes
35171    ac_cv_prog_cxx_g=no
35172    CXXFLAGS="-g"
35173    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35174 /* end confdefs.h.  */
35175 
35176 int
35177 main ()
35178 {
35179 
35180   ;
35181   return 0;
35182 }
35183 _ACEOF
35184 if ac_fn_cxx_try_compile "$LINENO"; then :
35185   ac_cv_prog_cxx_g=yes
35186 else
35187   CXXFLAGS=""
35188       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35189 /* end confdefs.h.  */
35190 
35191 int
35192 main ()
35193 {
35194 
35195   ;
35196   return 0;
35197 }
35198 _ACEOF
35199 if ac_fn_cxx_try_compile "$LINENO"; then :
35200 
35201 else
35202   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35203          CXXFLAGS="-g"
35204          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35205 /* end confdefs.h.  */
35206 
35207 int
35208 main ()
35209 {
35210 
35211   ;
35212   return 0;
35213 }
35214 _ACEOF
35215 if ac_fn_cxx_try_compile "$LINENO"; then :
35216   ac_cv_prog_cxx_g=yes
35217 fi
35218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35219 fi
35220 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35221 fi
35222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35223    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35224 fi
35225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35226 $as_echo "$ac_cv_prog_cxx_g" >&6; }
35227 if test "$ac_test_CXXFLAGS" = set; then
35228   CXXFLAGS=$ac_save_CXXFLAGS
35229 elif test $ac_cv_prog_cxx_g = yes; then
35230   if test "$GXX" = yes; then
35231     CXXFLAGS="-g -O2"
35232   else
35233     CXXFLAGS="-g"
35234   fi
35235 else
35236   if test "$GXX" = yes; then
35237     CXXFLAGS="-O2"
35238   else
35239     CXXFLAGS=
35240   fi
35241 fi
35242 ac_ext=cpp
35243 ac_cpp='$CXXCPP $CPPFLAGS'
35244 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35245 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35246 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35247 
35248 
35249   # This is the compiler version number on the form X.Y[.Z]
35250 
35251 
35252 
35253 
35254   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35255     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35256 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35257     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35258 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35259   fi
35260 
35261   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35262   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35263     { $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
35264 $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;}
35265   fi
35266 
35267   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35268     { $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
35269 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35270   fi
35271 
35272   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35273 
35274 
35275   if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35276 
35277 
35278 
35279 
35280 
35281 
35282 
35283 
35284 
35285 
35286 
35287 
35288 
35289 
35290 
35291 
35292 
35293 
35294 
35295 
35296 
35297 
35298 
35299 
35300 
35301 
35302 
35303 
35304 
35305 
35306 
35307 
35308 
35309 
35310 
35311 
35312 
35313 
35314 
35315 
35316 
35317 
35318 
35319 
35320 
35321 
35322 
35323 
35324 
35325     # Execute function body
35326 
35327   # Need to assign to a variable since m4 is blocked from modifying parts in [].
35328   REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35329 
35330   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35331     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35332   fi
35333 
35334   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35335     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35336   fi
35337 
35338   # Version comparison method inspired by http://stackoverflow.com/a/24067243
35339   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35340 
35341   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35342     :
35343 
35344   else
35345     :
35346 
35347           { $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
35348 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35349 
35350 
35351   fi
35352 
35353 
35354 
35355 
35356 
35357 
35358 
35359 
35360 
35361 
35362 
35363 
35364 
35365 
35366   fi
35367 
35368   #
35369   # Setup the preprocessor (CPP and CXXCPP)
35370   #
35371   ac_ext=c
35372 ac_cpp='$CPP $CPPFLAGS'
35373 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35374 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35375 ac_compiler_gnu=$ac_cv_c_compiler_gnu
35376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35377 $as_echo_n "checking how to run the C preprocessor... " >&6; }
35378 # On Suns, sometimes $CPP names a directory.
35379 if test -n "$CPP" && test -d "$CPP"; then
35380   CPP=
35381 fi
35382 if test -z "$CPP"; then
35383   if ${ac_cv_prog_CPP+:} false; then :
35384   $as_echo_n "(cached) " >&6
35385 else
35386       # Double quotes because CPP needs to be expanded
35387     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35388     do
35389       ac_preproc_ok=false
35390 for ac_c_preproc_warn_flag in '' yes
35391 do
35392   # Use a header file that comes with gcc, so configuring glibc
35393   # with a fresh cross-compiler works.
35394   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35395   # <limits.h> exists even on freestanding compilers.
35396   # On the NeXT, cc -E runs the code through the compiler's parser,
35397   # not just through cpp. "Syntax error" is here to catch this case.
35398   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35399 /* end confdefs.h.  */
35400 #ifdef __STDC__
35401 # include <limits.h>
35402 #else
35403 # include <assert.h>
35404 #endif
35405                      Syntax error
35406 _ACEOF
35407 if ac_fn_c_try_cpp "$LINENO"; then :
35408 
35409 else
35410   # Broken: fails on valid input.
35411 continue
35412 fi
35413 rm -f conftest.err conftest.i conftest.$ac_ext
35414 
35415   # OK, works on sane cases.  Now check whether nonexistent headers
35416   # can be detected and how.
35417   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35418 /* end confdefs.h.  */
35419 #include <ac_nonexistent.h>
35420 _ACEOF
35421 if ac_fn_c_try_cpp "$LINENO"; then :
35422   # Broken: success on invalid input.
35423 continue
35424 else
35425   # Passes both tests.
35426 ac_preproc_ok=:
35427 break
35428 fi
35429 rm -f conftest.err conftest.i conftest.$ac_ext
35430 
35431 done
35432 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35433 rm -f conftest.i conftest.err conftest.$ac_ext
35434 if $ac_preproc_ok; then :
35435   break
35436 fi
35437 
35438     done
35439     ac_cv_prog_CPP=$CPP
35440 
35441 fi
35442   CPP=$ac_cv_prog_CPP
35443 else
35444   ac_cv_prog_CPP=$CPP
35445 fi
35446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35447 $as_echo "$CPP" >&6; }
35448 ac_preproc_ok=false
35449 for ac_c_preproc_warn_flag in '' yes
35450 do
35451   # Use a header file that comes with gcc, so configuring glibc
35452   # with a fresh cross-compiler works.
35453   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35454   # <limits.h> exists even on freestanding compilers.
35455   # On the NeXT, cc -E runs the code through the compiler's parser,
35456   # not just through cpp. "Syntax error" is here to catch this case.
35457   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35458 /* end confdefs.h.  */
35459 #ifdef __STDC__
35460 # include <limits.h>
35461 #else
35462 # include <assert.h>
35463 #endif
35464                      Syntax error
35465 _ACEOF
35466 if ac_fn_c_try_cpp "$LINENO"; then :
35467 
35468 else
35469   # Broken: fails on valid input.
35470 continue
35471 fi
35472 rm -f conftest.err conftest.i conftest.$ac_ext
35473 
35474   # OK, works on sane cases.  Now check whether nonexistent headers
35475   # can be detected and how.
35476   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35477 /* end confdefs.h.  */
35478 #include <ac_nonexistent.h>
35479 _ACEOF
35480 if ac_fn_c_try_cpp "$LINENO"; then :
35481   # Broken: success on invalid input.
35482 continue
35483 else
35484   # Passes both tests.
35485 ac_preproc_ok=:
35486 break
35487 fi
35488 rm -f conftest.err conftest.i conftest.$ac_ext
35489 
35490 done
35491 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35492 rm -f conftest.i conftest.err conftest.$ac_ext
35493 if $ac_preproc_ok; then :
35494 
35495 else
35496   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35497 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35498 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35499 See \`config.log' for more details" "$LINENO" 5; }
35500 fi
35501 
35502 ac_ext=cpp
35503 ac_cpp='$CXXCPP $CPPFLAGS'
35504 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35505 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35506 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35507 
35508 
35509   # Only process if variable expands to non-empty
35510 
35511   if test "x$CPP" != x; then
35512     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35513 
35514   # First separate the path from the arguments. This will split at the first
35515   # space.
35516   complete="$CPP"
35517   path="${complete%% *}"
35518   tmp="$complete EOL"
35519   arguments="${tmp#* }"
35520 
35521   # Input might be given as Windows format, start by converting to
35522   # unix format.
35523   new_path=`$CYGPATH -u "$path"`
35524 
35525   # Now try to locate executable using which
35526   new_path=`$WHICH "$new_path" 2> /dev/null`
35527   # bat and cmd files are not always considered executable in cygwin causing which
35528   # to not find them
35529   if test "x$new_path" = x \
35530       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35531       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35532     new_path=`$CYGPATH -u "$path"`
35533   fi
35534   if test "x$new_path" = x; then
35535     # Oops. Which didn't find the executable.
35536     # The splitting of arguments from the executable at a space might have been incorrect,
35537     # since paths with space are more likely in Windows. Give it another try with the whole
35538     # argument.
35539     path="$complete"
35540     arguments="EOL"
35541     new_path=`$CYGPATH -u "$path"`
35542     new_path=`$WHICH "$new_path" 2> /dev/null`
35543     # bat and cmd files are not always considered executable in cygwin causing which
35544     # to not find them
35545     if test "x$new_path" = x \
35546         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35547         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35548       new_path=`$CYGPATH -u "$path"`
35549     fi
35550     if test "x$new_path" = x; then
35551       # It's still not found. Now this is an unrecoverable error.
35552       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35553 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35554       has_space=`$ECHO "$complete" | $GREP " "`
35555       if test "x$has_space" != x; then
35556         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35557 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35558       fi
35559       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35560     fi
35561   fi
35562 
35563   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35564   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35565   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35566   # "foo.exe" is OK but "foo" is an error.
35567   #
35568   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35569   # It is also a way to make sure we got the proper file name for the real test later on.
35570   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35571   if test "x$test_shortpath" = x; then
35572     # Short path failed, file does not exist as specified.
35573     # Try adding .exe or .cmd
35574     if test -f "${new_path}.exe"; then
35575       input_to_shortpath="${new_path}.exe"
35576     elif test -f "${new_path}.cmd"; then
35577       input_to_shortpath="${new_path}.cmd"
35578     else
35579       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35580 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35581       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35582 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35583       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35584     fi
35585   else
35586     input_to_shortpath="$new_path"
35587   fi
35588 
35589   # Call helper function which possibly converts this using DOS-style short mode.
35590   # If so, the updated path is stored in $new_path.
35591   new_path="$input_to_shortpath"
35592 
35593   input_path="$input_to_shortpath"
35594   # Check if we need to convert this using DOS-style short mode. If the path
35595   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35596   # take no chances and rewrite it.
35597   # Note: m4 eats our [], so we need to use [ and ] instead.
35598   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35599   if test "x$has_forbidden_chars" != x; then
35600     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35601     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35602     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35603     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35604       # Going to short mode and back again did indeed matter. Since short mode is
35605       # case insensitive, let's make it lowercase to improve readability.
35606       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35607       # Now convert it back to Unix-style (cygpath)
35608       input_path=`$CYGPATH -u "$shortmode_path"`
35609       new_path="$input_path"
35610     fi
35611   fi
35612 
35613   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35614   if test "x$test_cygdrive_prefix" = x; then
35615     # As a simple fix, exclude /usr/bin since it's not a real path.
35616     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35617       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35618       # a path prefixed by /cygdrive for fixpath to work.
35619       new_path="$CYGWIN_ROOT_PATH$input_path"
35620     fi
35621   fi
35622 
35623   # remove trailing .exe if any
35624   new_path="${new_path/%.exe/}"
35625 
35626     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35627 
35628   # First separate the path from the arguments. This will split at the first
35629   # space.
35630   complete="$CPP"
35631   path="${complete%% *}"
35632   tmp="$complete EOL"
35633   arguments="${tmp#* }"
35634 
35635   # Input might be given as Windows format, start by converting to
35636   # unix format.
35637   new_path="$path"
35638 
35639   windows_path="$new_path"
35640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35641     unix_path=`$CYGPATH -u "$windows_path"`
35642     new_path="$unix_path"
35643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35644     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35645     new_path="$unix_path"
35646   fi
35647 
35648 
35649   # Now try to locate executable using which
35650   new_path=`$WHICH "$new_path" 2> /dev/null`
35651 
35652   if test "x$new_path" = x; then
35653     # Oops. Which didn't find the executable.
35654     # The splitting of arguments from the executable at a space might have been incorrect,
35655     # since paths with space are more likely in Windows. Give it another try with the whole
35656     # argument.
35657     path="$complete"
35658     arguments="EOL"
35659     new_path="$path"
35660 
35661   windows_path="$new_path"
35662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35663     unix_path=`$CYGPATH -u "$windows_path"`
35664     new_path="$unix_path"
35665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35666     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35667     new_path="$unix_path"
35668   fi
35669 
35670 
35671     new_path=`$WHICH "$new_path" 2> /dev/null`
35672     # bat and cmd files are not always considered executable in MSYS causing which
35673     # to not find them
35674     if test "x$new_path" = x \
35675         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35676         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35677       new_path="$path"
35678 
35679   windows_path="$new_path"
35680   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35681     unix_path=`$CYGPATH -u "$windows_path"`
35682     new_path="$unix_path"
35683   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35684     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35685     new_path="$unix_path"
35686   fi
35687 
35688     fi
35689 
35690     if test "x$new_path" = x; then
35691       # It's still not found. Now this is an unrecoverable error.
35692       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35693 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35694       has_space=`$ECHO "$complete" | $GREP " "`
35695       if test "x$has_space" != x; then
35696         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35697 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35698       fi
35699       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35700     fi
35701   fi
35702 
35703   # Now new_path has a complete unix path to the binary
35704   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35705     # Keep paths in /bin as-is, but remove trailing .exe if any
35706     new_path="${new_path/%.exe/}"
35707     # Do not save /bin paths to all_fixpath_prefixes!
35708   else
35709     # Not in mixed or Windows style, start by that.
35710     new_path=`cmd //c echo $new_path`
35711 
35712   input_path="$new_path"
35713   # Check if we need to convert this using DOS-style short mode. If the path
35714   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35715   # take no chances and rewrite it.
35716   # Note: m4 eats our [], so we need to use [ and ] instead.
35717   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35718   if test "x$has_forbidden_chars" != x; then
35719     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35720     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35721   fi
35722 
35723     # Output is in $new_path
35724 
35725   windows_path="$new_path"
35726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35727     unix_path=`$CYGPATH -u "$windows_path"`
35728     new_path="$unix_path"
35729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35731     new_path="$unix_path"
35732   fi
35733 
35734     # remove trailing .exe if any
35735     new_path="${new_path/%.exe/}"
35736 
35737     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35738     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35739   fi
35740 
35741     else
35742       # We're on a unix platform. Hooray! :)
35743       # First separate the path from the arguments. This will split at the first
35744       # space.
35745       complete="$CPP"
35746       path="${complete%% *}"
35747       tmp="$complete EOL"
35748       arguments="${tmp#* }"
35749 
35750       # Cannot rely on the command "which" here since it doesn't always work.
35751       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35752       if test -z "$is_absolute_path"; then
35753         # Path to executable is not absolute. Find it.
35754         IFS_save="$IFS"
35755         IFS=:
35756         for p in $PATH; do
35757           if test -f "$p/$path" && test -x "$p/$path"; then
35758             new_path="$p/$path"
35759             break
35760           fi
35761         done
35762         IFS="$IFS_save"
35763       else
35764         # This is an absolute path, we can use it without further modifications.
35765         new_path="$path"
35766       fi
35767 
35768       if test "x$new_path" = x; then
35769         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35770 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35771         has_space=`$ECHO "$complete" | $GREP " "`
35772         if test "x$has_space" != x; then
35773           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35774 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35775         fi
35776         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35777       fi
35778     fi
35779 
35780     # Now join together the path and the arguments once again
35781     if test "x$arguments" != xEOL; then
35782       new_complete="$new_path ${arguments% *}"
35783     else
35784       new_complete="$new_path"
35785     fi
35786 
35787     if test "x$complete" != "x$new_complete"; then
35788       CPP="$new_complete"
35789       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35790 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35791     fi
35792   fi
35793 
35794   ac_ext=cpp
35795 ac_cpp='$CXXCPP $CPPFLAGS'
35796 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35797 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35798 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35800 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35801 if test -z "$CXXCPP"; then
35802   if ${ac_cv_prog_CXXCPP+:} false; then :
35803   $as_echo_n "(cached) " >&6
35804 else
35805       # Double quotes because CXXCPP needs to be expanded
35806     for CXXCPP in "$CXX -E" "/lib/cpp"
35807     do
35808       ac_preproc_ok=false
35809 for ac_cxx_preproc_warn_flag in '' yes
35810 do
35811   # Use a header file that comes with gcc, so configuring glibc
35812   # with a fresh cross-compiler works.
35813   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35814   # <limits.h> exists even on freestanding compilers.
35815   # On the NeXT, cc -E runs the code through the compiler's parser,
35816   # not just through cpp. "Syntax error" is here to catch this case.
35817   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35818 /* end confdefs.h.  */
35819 #ifdef __STDC__
35820 # include <limits.h>
35821 #else
35822 # include <assert.h>
35823 #endif
35824                      Syntax error
35825 _ACEOF
35826 if ac_fn_cxx_try_cpp "$LINENO"; then :
35827 
35828 else
35829   # Broken: fails on valid input.
35830 continue
35831 fi
35832 rm -f conftest.err conftest.i conftest.$ac_ext
35833 
35834   # OK, works on sane cases.  Now check whether nonexistent headers
35835   # can be detected and how.
35836   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35837 /* end confdefs.h.  */
35838 #include <ac_nonexistent.h>
35839 _ACEOF
35840 if ac_fn_cxx_try_cpp "$LINENO"; then :
35841   # Broken: success on invalid input.
35842 continue
35843 else
35844   # Passes both tests.
35845 ac_preproc_ok=:
35846 break
35847 fi
35848 rm -f conftest.err conftest.i conftest.$ac_ext
35849 
35850 done
35851 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35852 rm -f conftest.i conftest.err conftest.$ac_ext
35853 if $ac_preproc_ok; then :
35854   break
35855 fi
35856 
35857     done
35858     ac_cv_prog_CXXCPP=$CXXCPP
35859 
35860 fi
35861   CXXCPP=$ac_cv_prog_CXXCPP
35862 else
35863   ac_cv_prog_CXXCPP=$CXXCPP
35864 fi
35865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35866 $as_echo "$CXXCPP" >&6; }
35867 ac_preproc_ok=false
35868 for ac_cxx_preproc_warn_flag in '' yes
35869 do
35870   # Use a header file that comes with gcc, so configuring glibc
35871   # with a fresh cross-compiler works.
35872   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35873   # <limits.h> exists even on freestanding compilers.
35874   # On the NeXT, cc -E runs the code through the compiler's parser,
35875   # not just through cpp. "Syntax error" is here to catch this case.
35876   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35877 /* end confdefs.h.  */
35878 #ifdef __STDC__
35879 # include <limits.h>
35880 #else
35881 # include <assert.h>
35882 #endif
35883                      Syntax error
35884 _ACEOF
35885 if ac_fn_cxx_try_cpp "$LINENO"; then :
35886 
35887 else
35888   # Broken: fails on valid input.
35889 continue
35890 fi
35891 rm -f conftest.err conftest.i conftest.$ac_ext
35892 
35893   # OK, works on sane cases.  Now check whether nonexistent headers
35894   # can be detected and how.
35895   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35896 /* end confdefs.h.  */
35897 #include <ac_nonexistent.h>
35898 _ACEOF
35899 if ac_fn_cxx_try_cpp "$LINENO"; then :
35900   # Broken: success on invalid input.
35901 continue
35902 else
35903   # Passes both tests.
35904 ac_preproc_ok=:
35905 break
35906 fi
35907 rm -f conftest.err conftest.i conftest.$ac_ext
35908 
35909 done
35910 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35911 rm -f conftest.i conftest.err conftest.$ac_ext
35912 if $ac_preproc_ok; then :
35913 
35914 else
35915   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35916 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35917 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35918 See \`config.log' for more details" "$LINENO" 5; }
35919 fi
35920 
35921 ac_ext=cpp
35922 ac_cpp='$CXXCPP $CPPFLAGS'
35923 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35924 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35925 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35926 
35927 
35928   # Only process if variable expands to non-empty
35929 
35930   if test "x$CXXCPP" != x; then
35931     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35932 
35933   # First separate the path from the arguments. This will split at the first
35934   # space.
35935   complete="$CXXCPP"
35936   path="${complete%% *}"
35937   tmp="$complete EOL"
35938   arguments="${tmp#* }"
35939 
35940   # Input might be given as Windows format, start by converting to
35941   # unix format.
35942   new_path=`$CYGPATH -u "$path"`
35943 
35944   # Now try to locate executable using which
35945   new_path=`$WHICH "$new_path" 2> /dev/null`
35946   # bat and cmd files are not always considered executable in cygwin causing which
35947   # to not find them
35948   if test "x$new_path" = x \
35949       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35950       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35951     new_path=`$CYGPATH -u "$path"`
35952   fi
35953   if test "x$new_path" = x; then
35954     # Oops. Which didn't find the executable.
35955     # The splitting of arguments from the executable at a space might have been incorrect,
35956     # since paths with space are more likely in Windows. Give it another try with the whole
35957     # argument.
35958     path="$complete"
35959     arguments="EOL"
35960     new_path=`$CYGPATH -u "$path"`
35961     new_path=`$WHICH "$new_path" 2> /dev/null`
35962     # bat and cmd files are not always considered executable in cygwin causing which
35963     # to not find them
35964     if test "x$new_path" = x \
35965         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35966         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35967       new_path=`$CYGPATH -u "$path"`
35968     fi
35969     if test "x$new_path" = x; then
35970       # It's still not found. Now this is an unrecoverable error.
35971       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35972 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35973       has_space=`$ECHO "$complete" | $GREP " "`
35974       if test "x$has_space" != x; then
35975         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35976 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35977       fi
35978       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35979     fi
35980   fi
35981 
35982   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35983   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35984   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35985   # "foo.exe" is OK but "foo" is an error.
35986   #
35987   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35988   # It is also a way to make sure we got the proper file name for the real test later on.
35989   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35990   if test "x$test_shortpath" = x; then
35991     # Short path failed, file does not exist as specified.
35992     # Try adding .exe or .cmd
35993     if test -f "${new_path}.exe"; then
35994       input_to_shortpath="${new_path}.exe"
35995     elif test -f "${new_path}.cmd"; then
35996       input_to_shortpath="${new_path}.cmd"
35997     else
35998       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35999 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36000       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36001 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36002       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36003     fi
36004   else
36005     input_to_shortpath="$new_path"
36006   fi
36007 
36008   # Call helper function which possibly converts this using DOS-style short mode.
36009   # If so, the updated path is stored in $new_path.
36010   new_path="$input_to_shortpath"
36011 
36012   input_path="$input_to_shortpath"
36013   # Check if we need to convert this using DOS-style short mode. If the path
36014   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36015   # take no chances and rewrite it.
36016   # Note: m4 eats our [], so we need to use [ and ] instead.
36017   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36018   if test "x$has_forbidden_chars" != x; then
36019     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36020     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36021     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36022     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36023       # Going to short mode and back again did indeed matter. Since short mode is
36024       # case insensitive, let's make it lowercase to improve readability.
36025       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36026       # Now convert it back to Unix-style (cygpath)
36027       input_path=`$CYGPATH -u "$shortmode_path"`
36028       new_path="$input_path"
36029     fi
36030   fi
36031 
36032   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36033   if test "x$test_cygdrive_prefix" = x; then
36034     # As a simple fix, exclude /usr/bin since it's not a real path.
36035     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36036       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36037       # a path prefixed by /cygdrive for fixpath to work.
36038       new_path="$CYGWIN_ROOT_PATH$input_path"
36039     fi
36040   fi
36041 
36042   # remove trailing .exe if any
36043   new_path="${new_path/%.exe/}"
36044 
36045     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36046 
36047   # First separate the path from the arguments. This will split at the first
36048   # space.
36049   complete="$CXXCPP"
36050   path="${complete%% *}"
36051   tmp="$complete EOL"
36052   arguments="${tmp#* }"
36053 
36054   # Input might be given as Windows format, start by converting to
36055   # unix format.
36056   new_path="$path"
36057 
36058   windows_path="$new_path"
36059   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36060     unix_path=`$CYGPATH -u "$windows_path"`
36061     new_path="$unix_path"
36062   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36063     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36064     new_path="$unix_path"
36065   fi
36066 
36067 
36068   # Now try to locate executable using which
36069   new_path=`$WHICH "$new_path" 2> /dev/null`
36070 
36071   if test "x$new_path" = x; then
36072     # Oops. Which didn't find the executable.
36073     # The splitting of arguments from the executable at a space might have been incorrect,
36074     # since paths with space are more likely in Windows. Give it another try with the whole
36075     # argument.
36076     path="$complete"
36077     arguments="EOL"
36078     new_path="$path"
36079 
36080   windows_path="$new_path"
36081   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36082     unix_path=`$CYGPATH -u "$windows_path"`
36083     new_path="$unix_path"
36084   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36085     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36086     new_path="$unix_path"
36087   fi
36088 
36089 
36090     new_path=`$WHICH "$new_path" 2> /dev/null`
36091     # bat and cmd files are not always considered executable in MSYS causing which
36092     # to not find them
36093     if test "x$new_path" = x \
36094         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36095         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36096       new_path="$path"
36097 
36098   windows_path="$new_path"
36099   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36100     unix_path=`$CYGPATH -u "$windows_path"`
36101     new_path="$unix_path"
36102   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36103     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36104     new_path="$unix_path"
36105   fi
36106 
36107     fi
36108 
36109     if test "x$new_path" = x; then
36110       # It's still not found. Now this is an unrecoverable error.
36111       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36112 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36113       has_space=`$ECHO "$complete" | $GREP " "`
36114       if test "x$has_space" != x; then
36115         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36116 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36117       fi
36118       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36119     fi
36120   fi
36121 
36122   # Now new_path has a complete unix path to the binary
36123   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36124     # Keep paths in /bin as-is, but remove trailing .exe if any
36125     new_path="${new_path/%.exe/}"
36126     # Do not save /bin paths to all_fixpath_prefixes!
36127   else
36128     # Not in mixed or Windows style, start by that.
36129     new_path=`cmd //c echo $new_path`
36130 
36131   input_path="$new_path"
36132   # Check if we need to convert this using DOS-style short mode. If the path
36133   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36134   # take no chances and rewrite it.
36135   # Note: m4 eats our [], so we need to use [ and ] instead.
36136   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36137   if test "x$has_forbidden_chars" != x; then
36138     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36139     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36140   fi
36141 
36142     # Output is in $new_path
36143 
36144   windows_path="$new_path"
36145   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36146     unix_path=`$CYGPATH -u "$windows_path"`
36147     new_path="$unix_path"
36148   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36149     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36150     new_path="$unix_path"
36151   fi
36152 
36153     # remove trailing .exe if any
36154     new_path="${new_path/%.exe/}"
36155 
36156     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36157     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36158   fi
36159 
36160     else
36161       # We're on a unix platform. Hooray! :)
36162       # First separate the path from the arguments. This will split at the first
36163       # space.
36164       complete="$CXXCPP"
36165       path="${complete%% *}"
36166       tmp="$complete EOL"
36167       arguments="${tmp#* }"
36168 
36169       # Cannot rely on the command "which" here since it doesn't always work.
36170       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36171       if test -z "$is_absolute_path"; then
36172         # Path to executable is not absolute. Find it.
36173         IFS_save="$IFS"
36174         IFS=:
36175         for p in $PATH; do
36176           if test -f "$p/$path" && test -x "$p/$path"; then
36177             new_path="$p/$path"
36178             break
36179           fi
36180         done
36181         IFS="$IFS_save"
36182       else
36183         # This is an absolute path, we can use it without further modifications.
36184         new_path="$path"
36185       fi
36186 
36187       if test "x$new_path" = x; then
36188         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36189 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36190         has_space=`$ECHO "$complete" | $GREP " "`
36191         if test "x$has_space" != x; then
36192           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36193 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36194         fi
36195         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36196       fi
36197     fi
36198 
36199     # Now join together the path and the arguments once again
36200     if test "x$arguments" != xEOL; then
36201       new_complete="$new_path ${arguments% *}"
36202     else
36203       new_complete="$new_path"
36204     fi
36205 
36206     if test "x$complete" != "x$new_complete"; then
36207       CXXCPP="$new_complete"
36208       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36209 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36210     fi
36211   fi
36212 
36213 
36214   #
36215   # Setup the linker (LD)
36216   #
36217   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36218     # In the Microsoft toolchain we have a separate LD command "link".
36219     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36220     # a cygwin program for something completely different.
36221     # Extract the first word of "link", so it can be a program name with args.
36222 set dummy link; ac_word=$2
36223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36224 $as_echo_n "checking for $ac_word... " >&6; }
36225 if ${ac_cv_prog_LD+:} false; then :
36226   $as_echo_n "(cached) " >&6
36227 else
36228   if test -n "$LD"; then
36229   ac_cv_prog_LD="$LD" # Let the user override the test.
36230 else
36231   ac_prog_rejected=no
36232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36233 for as_dir in $PATH
36234 do
36235   IFS=$as_save_IFS
36236   test -z "$as_dir" && as_dir=.
36237     for ac_exec_ext in '' $ac_executable_extensions; do
36238   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36239     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36240        ac_prog_rejected=yes
36241        continue
36242      fi
36243     ac_cv_prog_LD="link"
36244     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36245     break 2
36246   fi
36247 done
36248   done
36249 IFS=$as_save_IFS
36250 
36251 if test $ac_prog_rejected = yes; then
36252   # We found a bogon in the path, so make sure we never use it.
36253   set dummy $ac_cv_prog_LD
36254   shift
36255   if test $# != 0; then
36256     # We chose a different compiler from the bogus one.
36257     # However, it has the same basename, so the bogon will be chosen
36258     # first if we set LD to just the basename; use the full file name.
36259     shift
36260     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36261   fi
36262 fi
36263 fi
36264 fi
36265 LD=$ac_cv_prog_LD
36266 if test -n "$LD"; then
36267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36268 $as_echo "$LD" >&6; }
36269 else
36270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36271 $as_echo "no" >&6; }
36272 fi
36273 
36274 
36275 
36276   # Only process if variable expands to non-empty
36277 
36278   if test "x$LD" != x; then
36279     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36280 
36281   # First separate the path from the arguments. This will split at the first
36282   # space.
36283   complete="$LD"
36284   path="${complete%% *}"
36285   tmp="$complete EOL"
36286   arguments="${tmp#* }"
36287 
36288   # Input might be given as Windows format, start by converting to
36289   # unix format.
36290   new_path=`$CYGPATH -u "$path"`
36291 
36292   # Now try to locate executable using which
36293   new_path=`$WHICH "$new_path" 2> /dev/null`
36294   # bat and cmd files are not always considered executable in cygwin causing which
36295   # to not find them
36296   if test "x$new_path" = x \
36297       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36298       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36299     new_path=`$CYGPATH -u "$path"`
36300   fi
36301   if test "x$new_path" = x; then
36302     # Oops. Which didn't find the executable.
36303     # The splitting of arguments from the executable at a space might have been incorrect,
36304     # since paths with space are more likely in Windows. Give it another try with the whole
36305     # argument.
36306     path="$complete"
36307     arguments="EOL"
36308     new_path=`$CYGPATH -u "$path"`
36309     new_path=`$WHICH "$new_path" 2> /dev/null`
36310     # bat and cmd files are not always considered executable in cygwin causing which
36311     # to not find them
36312     if test "x$new_path" = x \
36313         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36314         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36315       new_path=`$CYGPATH -u "$path"`
36316     fi
36317     if test "x$new_path" = x; then
36318       # It's still not found. Now this is an unrecoverable error.
36319       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36320 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36321       has_space=`$ECHO "$complete" | $GREP " "`
36322       if test "x$has_space" != x; then
36323         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36324 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36325       fi
36326       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36327     fi
36328   fi
36329 
36330   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36331   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36332   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36333   # "foo.exe" is OK but "foo" is an error.
36334   #
36335   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36336   # It is also a way to make sure we got the proper file name for the real test later on.
36337   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36338   if test "x$test_shortpath" = x; then
36339     # Short path failed, file does not exist as specified.
36340     # Try adding .exe or .cmd
36341     if test -f "${new_path}.exe"; then
36342       input_to_shortpath="${new_path}.exe"
36343     elif test -f "${new_path}.cmd"; then
36344       input_to_shortpath="${new_path}.cmd"
36345     else
36346       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36347 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36348       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36349 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36350       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36351     fi
36352   else
36353     input_to_shortpath="$new_path"
36354   fi
36355 
36356   # Call helper function which possibly converts this using DOS-style short mode.
36357   # If so, the updated path is stored in $new_path.
36358   new_path="$input_to_shortpath"
36359 
36360   input_path="$input_to_shortpath"
36361   # Check if we need to convert this using DOS-style short mode. If the path
36362   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36363   # take no chances and rewrite it.
36364   # Note: m4 eats our [], so we need to use [ and ] instead.
36365   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36366   if test "x$has_forbidden_chars" != x; then
36367     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36368     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36369     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36370     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36371       # Going to short mode and back again did indeed matter. Since short mode is
36372       # case insensitive, let's make it lowercase to improve readability.
36373       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36374       # Now convert it back to Unix-style (cygpath)
36375       input_path=`$CYGPATH -u "$shortmode_path"`
36376       new_path="$input_path"
36377     fi
36378   fi
36379 
36380   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36381   if test "x$test_cygdrive_prefix" = x; then
36382     # As a simple fix, exclude /usr/bin since it's not a real path.
36383     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36384       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36385       # a path prefixed by /cygdrive for fixpath to work.
36386       new_path="$CYGWIN_ROOT_PATH$input_path"
36387     fi
36388   fi
36389 
36390   # remove trailing .exe if any
36391   new_path="${new_path/%.exe/}"
36392 
36393     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36394 
36395   # First separate the path from the arguments. This will split at the first
36396   # space.
36397   complete="$LD"
36398   path="${complete%% *}"
36399   tmp="$complete EOL"
36400   arguments="${tmp#* }"
36401 
36402   # Input might be given as Windows format, start by converting to
36403   # unix format.
36404   new_path="$path"
36405 
36406   windows_path="$new_path"
36407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36408     unix_path=`$CYGPATH -u "$windows_path"`
36409     new_path="$unix_path"
36410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36411     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36412     new_path="$unix_path"
36413   fi
36414 
36415 
36416   # Now try to locate executable using which
36417   new_path=`$WHICH "$new_path" 2> /dev/null`
36418 
36419   if test "x$new_path" = x; then
36420     # Oops. Which didn't find the executable.
36421     # The splitting of arguments from the executable at a space might have been incorrect,
36422     # since paths with space are more likely in Windows. Give it another try with the whole
36423     # argument.
36424     path="$complete"
36425     arguments="EOL"
36426     new_path="$path"
36427 
36428   windows_path="$new_path"
36429   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36430     unix_path=`$CYGPATH -u "$windows_path"`
36431     new_path="$unix_path"
36432   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36433     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36434     new_path="$unix_path"
36435   fi
36436 
36437 
36438     new_path=`$WHICH "$new_path" 2> /dev/null`
36439     # bat and cmd files are not always considered executable in MSYS causing which
36440     # to not find them
36441     if test "x$new_path" = x \
36442         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36443         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36444       new_path="$path"
36445 
36446   windows_path="$new_path"
36447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36448     unix_path=`$CYGPATH -u "$windows_path"`
36449     new_path="$unix_path"
36450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36451     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36452     new_path="$unix_path"
36453   fi
36454 
36455     fi
36456 
36457     if test "x$new_path" = x; then
36458       # It's still not found. Now this is an unrecoverable error.
36459       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36460 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36461       has_space=`$ECHO "$complete" | $GREP " "`
36462       if test "x$has_space" != x; then
36463         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36464 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36465       fi
36466       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36467     fi
36468   fi
36469 
36470   # Now new_path has a complete unix path to the binary
36471   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36472     # Keep paths in /bin as-is, but remove trailing .exe if any
36473     new_path="${new_path/%.exe/}"
36474     # Do not save /bin paths to all_fixpath_prefixes!
36475   else
36476     # Not in mixed or Windows style, start by that.
36477     new_path=`cmd //c echo $new_path`
36478 
36479   input_path="$new_path"
36480   # Check if we need to convert this using DOS-style short mode. If the path
36481   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36482   # take no chances and rewrite it.
36483   # Note: m4 eats our [], so we need to use [ and ] instead.
36484   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36485   if test "x$has_forbidden_chars" != x; then
36486     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36487     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36488   fi
36489 
36490     # Output is in $new_path
36491 
36492   windows_path="$new_path"
36493   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36494     unix_path=`$CYGPATH -u "$windows_path"`
36495     new_path="$unix_path"
36496   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36497     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36498     new_path="$unix_path"
36499   fi
36500 
36501     # remove trailing .exe if any
36502     new_path="${new_path/%.exe/}"
36503 
36504     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36505     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36506   fi
36507 
36508     else
36509       # We're on a unix platform. Hooray! :)
36510       # First separate the path from the arguments. This will split at the first
36511       # space.
36512       complete="$LD"
36513       path="${complete%% *}"
36514       tmp="$complete EOL"
36515       arguments="${tmp#* }"
36516 
36517       # Cannot rely on the command "which" here since it doesn't always work.
36518       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36519       if test -z "$is_absolute_path"; then
36520         # Path to executable is not absolute. Find it.
36521         IFS_save="$IFS"
36522         IFS=:
36523         for p in $PATH; do
36524           if test -f "$p/$path" && test -x "$p/$path"; then
36525             new_path="$p/$path"
36526             break
36527           fi
36528         done
36529         IFS="$IFS_save"
36530       else
36531         # This is an absolute path, we can use it without further modifications.
36532         new_path="$path"
36533       fi
36534 
36535       if test "x$new_path" = x; then
36536         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36537 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36538         has_space=`$ECHO "$complete" | $GREP " "`
36539         if test "x$has_space" != x; then
36540           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36541 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36542         fi
36543         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36544       fi
36545     fi
36546 
36547     # Now join together the path and the arguments once again
36548     if test "x$arguments" != xEOL; then
36549       new_complete="$new_path ${arguments% *}"
36550     else
36551       new_complete="$new_path"
36552     fi
36553 
36554     if test "x$complete" != "x$new_complete"; then
36555       LD="$new_complete"
36556       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36557 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36558     fi
36559   fi
36560 
36561     # Verify that we indeed succeeded with this trick.
36562     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36563 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36564     "$LD" --version > /dev/null
36565     if test $? -eq 0 ; then
36566       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36567 $as_echo "no" >&6; }
36568       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36569     else
36570       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36571 $as_echo "yes" >&6; }
36572     fi
36573     LDCXX="$LD"
36574   else
36575     # All other toolchains use the compiler to link.
36576     LD="$CC"
36577     LDCXX="$CXX"
36578   fi
36579 
36580   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36581 
36582 
36583   #
36584   # Setup the assembler (AS)
36585   #
36586   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36587 
36588 
36589   # Publish this variable in the help.
36590 
36591 
36592   if [ -z "${AS+x}" ]; then
36593     # The variable is not set by user, try to locate tool using the code snippet
36594     for ac_prog in as
36595 do
36596   # Extract the first word of "$ac_prog", so it can be a program name with args.
36597 set dummy $ac_prog; ac_word=$2
36598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36599 $as_echo_n "checking for $ac_word... " >&6; }
36600 if ${ac_cv_path_AS+:} false; then :
36601   $as_echo_n "(cached) " >&6
36602 else
36603   case $AS in
36604   [\\/]* | ?:[\\/]*)
36605   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36606   ;;
36607   *)
36608   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36609 for as_dir in $PATH
36610 do
36611   IFS=$as_save_IFS
36612   test -z "$as_dir" && as_dir=.
36613     for ac_exec_ext in '' $ac_executable_extensions; do
36614   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36615     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36616     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36617     break 2
36618   fi
36619 done
36620   done
36621 IFS=$as_save_IFS
36622 
36623   ;;
36624 esac
36625 fi
36626 AS=$ac_cv_path_AS
36627 if test -n "$AS"; then
36628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36629 $as_echo "$AS" >&6; }
36630 else
36631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36632 $as_echo "no" >&6; }
36633 fi
36634 
36635 
36636   test -n "$AS" && break
36637 done
36638 
36639   else
36640     # The variable is set, but is it from the command line or the environment?
36641 
36642     # Try to remove the string !AS! from our list.
36643     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36644     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36645       # If it failed, the variable was not from the command line. Ignore it,
36646       # but warn the user (except for BASH, which is always set by the calling BASH).
36647       if test "xAS" != xBASH; then
36648         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36649 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36650       fi
36651       # Try to locate tool using the code snippet
36652       for ac_prog in as
36653 do
36654   # Extract the first word of "$ac_prog", so it can be a program name with args.
36655 set dummy $ac_prog; ac_word=$2
36656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36657 $as_echo_n "checking for $ac_word... " >&6; }
36658 if ${ac_cv_path_AS+:} false; then :
36659   $as_echo_n "(cached) " >&6
36660 else
36661   case $AS in
36662   [\\/]* | ?:[\\/]*)
36663   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36664   ;;
36665   *)
36666   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36667 for as_dir in $PATH
36668 do
36669   IFS=$as_save_IFS
36670   test -z "$as_dir" && as_dir=.
36671     for ac_exec_ext in '' $ac_executable_extensions; do
36672   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36673     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36674     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36675     break 2
36676   fi
36677 done
36678   done
36679 IFS=$as_save_IFS
36680 
36681   ;;
36682 esac
36683 fi
36684 AS=$ac_cv_path_AS
36685 if test -n "$AS"; then
36686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36687 $as_echo "$AS" >&6; }
36688 else
36689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36690 $as_echo "no" >&6; }
36691 fi
36692 
36693 
36694   test -n "$AS" && break
36695 done
36696 
36697     else
36698       # If it succeeded, then it was overridden by the user. We will use it
36699       # for the tool.
36700 
36701       # First remove it from the list of overridden variables, so we can test
36702       # for unknown variables in the end.
36703       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36704 
36705       # Check if we try to supply an empty value
36706       if test "x$AS" = x; then
36707         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36708 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36709         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36710 $as_echo_n "checking for AS... " >&6; }
36711         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36712 $as_echo "disabled" >&6; }
36713       else
36714         # Check if the provided tool contains a complete path.
36715         tool_specified="$AS"
36716         tool_basename="${tool_specified##*/}"
36717         if test "x$tool_basename" = "x$tool_specified"; then
36718           # A command without a complete path is provided, search $PATH.
36719           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36720 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36721           # Extract the first word of "$tool_basename", so it can be a program name with args.
36722 set dummy $tool_basename; ac_word=$2
36723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36724 $as_echo_n "checking for $ac_word... " >&6; }
36725 if ${ac_cv_path_AS+:} false; then :
36726   $as_echo_n "(cached) " >&6
36727 else
36728   case $AS in
36729   [\\/]* | ?:[\\/]*)
36730   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36731   ;;
36732   *)
36733   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36734 for as_dir in $PATH
36735 do
36736   IFS=$as_save_IFS
36737   test -z "$as_dir" && as_dir=.
36738     for ac_exec_ext in '' $ac_executable_extensions; do
36739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36740     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36742     break 2
36743   fi
36744 done
36745   done
36746 IFS=$as_save_IFS
36747 
36748   ;;
36749 esac
36750 fi
36751 AS=$ac_cv_path_AS
36752 if test -n "$AS"; then
36753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36754 $as_echo "$AS" >&6; }
36755 else
36756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36757 $as_echo "no" >&6; }
36758 fi
36759 
36760 
36761           if test "x$AS" = x; then
36762             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36763           fi
36764         else
36765           # Otherwise we believe it is a complete path. Use it as it is.
36766           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36767 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36768           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36769 $as_echo_n "checking for AS... " >&6; }
36770           if test ! -x "$tool_specified"; then
36771             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36772 $as_echo "not found" >&6; }
36773             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36774           fi
36775           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36776 $as_echo "$tool_specified" >&6; }
36777         fi
36778       fi
36779     fi
36780 
36781   fi
36782 
36783 
36784 
36785   # Only process if variable expands to non-empty
36786 
36787   if test "x$AS" != x; then
36788     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36789 
36790   # First separate the path from the arguments. This will split at the first
36791   # space.
36792   complete="$AS"
36793   path="${complete%% *}"
36794   tmp="$complete EOL"
36795   arguments="${tmp#* }"
36796 
36797   # Input might be given as Windows format, start by converting to
36798   # unix format.
36799   new_path=`$CYGPATH -u "$path"`
36800 
36801   # Now try to locate executable using which
36802   new_path=`$WHICH "$new_path" 2> /dev/null`
36803   # bat and cmd files are not always considered executable in cygwin causing which
36804   # to not find them
36805   if test "x$new_path" = x \
36806       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36807       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36808     new_path=`$CYGPATH -u "$path"`
36809   fi
36810   if test "x$new_path" = x; then
36811     # Oops. Which didn't find the executable.
36812     # The splitting of arguments from the executable at a space might have been incorrect,
36813     # since paths with space are more likely in Windows. Give it another try with the whole
36814     # argument.
36815     path="$complete"
36816     arguments="EOL"
36817     new_path=`$CYGPATH -u "$path"`
36818     new_path=`$WHICH "$new_path" 2> /dev/null`
36819     # bat and cmd files are not always considered executable in cygwin causing which
36820     # to not find them
36821     if test "x$new_path" = x \
36822         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36823         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36824       new_path=`$CYGPATH -u "$path"`
36825     fi
36826     if test "x$new_path" = x; then
36827       # It's still not found. Now this is an unrecoverable error.
36828       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36829 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36830       has_space=`$ECHO "$complete" | $GREP " "`
36831       if test "x$has_space" != x; then
36832         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36833 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36834       fi
36835       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36836     fi
36837   fi
36838 
36839   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36840   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36841   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36842   # "foo.exe" is OK but "foo" is an error.
36843   #
36844   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36845   # It is also a way to make sure we got the proper file name for the real test later on.
36846   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36847   if test "x$test_shortpath" = x; then
36848     # Short path failed, file does not exist as specified.
36849     # Try adding .exe or .cmd
36850     if test -f "${new_path}.exe"; then
36851       input_to_shortpath="${new_path}.exe"
36852     elif test -f "${new_path}.cmd"; then
36853       input_to_shortpath="${new_path}.cmd"
36854     else
36855       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36856 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36857       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36858 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36859       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36860     fi
36861   else
36862     input_to_shortpath="$new_path"
36863   fi
36864 
36865   # Call helper function which possibly converts this using DOS-style short mode.
36866   # If so, the updated path is stored in $new_path.
36867   new_path="$input_to_shortpath"
36868 
36869   input_path="$input_to_shortpath"
36870   # Check if we need to convert this using DOS-style short mode. If the path
36871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36872   # take no chances and rewrite it.
36873   # Note: m4 eats our [], so we need to use [ and ] instead.
36874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36875   if test "x$has_forbidden_chars" != x; then
36876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36877     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36878     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36879     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36880       # Going to short mode and back again did indeed matter. Since short mode is
36881       # case insensitive, let's make it lowercase to improve readability.
36882       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36883       # Now convert it back to Unix-style (cygpath)
36884       input_path=`$CYGPATH -u "$shortmode_path"`
36885       new_path="$input_path"
36886     fi
36887   fi
36888 
36889   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36890   if test "x$test_cygdrive_prefix" = x; then
36891     # As a simple fix, exclude /usr/bin since it's not a real path.
36892     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36893       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36894       # a path prefixed by /cygdrive for fixpath to work.
36895       new_path="$CYGWIN_ROOT_PATH$input_path"
36896     fi
36897   fi
36898 
36899   # remove trailing .exe if any
36900   new_path="${new_path/%.exe/}"
36901 
36902     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36903 
36904   # First separate the path from the arguments. This will split at the first
36905   # space.
36906   complete="$AS"
36907   path="${complete%% *}"
36908   tmp="$complete EOL"
36909   arguments="${tmp#* }"
36910 
36911   # Input might be given as Windows format, start by converting to
36912   # unix format.
36913   new_path="$path"
36914 
36915   windows_path="$new_path"
36916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36917     unix_path=`$CYGPATH -u "$windows_path"`
36918     new_path="$unix_path"
36919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36920     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36921     new_path="$unix_path"
36922   fi
36923 
36924 
36925   # Now try to locate executable using which
36926   new_path=`$WHICH "$new_path" 2> /dev/null`
36927 
36928   if test "x$new_path" = x; then
36929     # Oops. Which didn't find the executable.
36930     # The splitting of arguments from the executable at a space might have been incorrect,
36931     # since paths with space are more likely in Windows. Give it another try with the whole
36932     # argument.
36933     path="$complete"
36934     arguments="EOL"
36935     new_path="$path"
36936 
36937   windows_path="$new_path"
36938   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36939     unix_path=`$CYGPATH -u "$windows_path"`
36940     new_path="$unix_path"
36941   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36942     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36943     new_path="$unix_path"
36944   fi
36945 
36946 
36947     new_path=`$WHICH "$new_path" 2> /dev/null`
36948     # bat and cmd files are not always considered executable in MSYS causing which
36949     # to not find them
36950     if test "x$new_path" = x \
36951         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36952         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36953       new_path="$path"
36954 
36955   windows_path="$new_path"
36956   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36957     unix_path=`$CYGPATH -u "$windows_path"`
36958     new_path="$unix_path"
36959   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36960     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36961     new_path="$unix_path"
36962   fi
36963 
36964     fi
36965 
36966     if test "x$new_path" = x; then
36967       # It's still not found. Now this is an unrecoverable error.
36968       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36969 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36970       has_space=`$ECHO "$complete" | $GREP " "`
36971       if test "x$has_space" != x; then
36972         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36973 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36974       fi
36975       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36976     fi
36977   fi
36978 
36979   # Now new_path has a complete unix path to the binary
36980   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36981     # Keep paths in /bin as-is, but remove trailing .exe if any
36982     new_path="${new_path/%.exe/}"
36983     # Do not save /bin paths to all_fixpath_prefixes!
36984   else
36985     # Not in mixed or Windows style, start by that.
36986     new_path=`cmd //c echo $new_path`
36987 
36988   input_path="$new_path"
36989   # Check if we need to convert this using DOS-style short mode. If the path
36990   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36991   # take no chances and rewrite it.
36992   # Note: m4 eats our [], so we need to use [ and ] instead.
36993   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36994   if test "x$has_forbidden_chars" != x; then
36995     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36996     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36997   fi
36998 
36999     # Output is in $new_path
37000 
37001   windows_path="$new_path"
37002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37003     unix_path=`$CYGPATH -u "$windows_path"`
37004     new_path="$unix_path"
37005   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37006     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37007     new_path="$unix_path"
37008   fi
37009 
37010     # remove trailing .exe if any
37011     new_path="${new_path/%.exe/}"
37012 
37013     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37014     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37015   fi
37016 
37017     else
37018       # We're on a unix platform. Hooray! :)
37019       # First separate the path from the arguments. This will split at the first
37020       # space.
37021       complete="$AS"
37022       path="${complete%% *}"
37023       tmp="$complete EOL"
37024       arguments="${tmp#* }"
37025 
37026       # Cannot rely on the command "which" here since it doesn't always work.
37027       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37028       if test -z "$is_absolute_path"; then
37029         # Path to executable is not absolute. Find it.
37030         IFS_save="$IFS"
37031         IFS=:
37032         for p in $PATH; do
37033           if test -f "$p/$path" && test -x "$p/$path"; then
37034             new_path="$p/$path"
37035             break
37036           fi
37037         done
37038         IFS="$IFS_save"
37039       else
37040         # This is an absolute path, we can use it without further modifications.
37041         new_path="$path"
37042       fi
37043 
37044       if test "x$new_path" = x; then
37045         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37046 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37047         has_space=`$ECHO "$complete" | $GREP " "`
37048         if test "x$has_space" != x; then
37049           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37050 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37051         fi
37052         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37053       fi
37054     fi
37055 
37056     # Now join together the path and the arguments once again
37057     if test "x$arguments" != xEOL; then
37058       new_complete="$new_path ${arguments% *}"
37059     else
37060       new_complete="$new_path"
37061     fi
37062 
37063     if test "x$complete" != "x$new_complete"; then
37064       AS="$new_complete"
37065       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37066 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37067     fi
37068   fi
37069 
37070     if test "x$AS" = x; then
37071       as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37072     fi
37073   else
37074     # FIXME: is this correct for microsoft?
37075     AS="$CC -c"
37076   fi
37077 
37078 
37079   #
37080   # Setup the archiver (AR)
37081   #
37082   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37083     # The corresponding ar tool is lib.exe (used to create static libraries)
37084     # Extract the first word of "lib", so it can be a program name with args.
37085 set dummy lib; ac_word=$2
37086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37087 $as_echo_n "checking for $ac_word... " >&6; }
37088 if ${ac_cv_prog_AR+:} false; then :
37089   $as_echo_n "(cached) " >&6
37090 else
37091   if test -n "$AR"; then
37092   ac_cv_prog_AR="$AR" # Let the user override the test.
37093 else
37094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37095 for as_dir in $PATH
37096 do
37097   IFS=$as_save_IFS
37098   test -z "$as_dir" && as_dir=.
37099     for ac_exec_ext in '' $ac_executable_extensions; do
37100   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37101     ac_cv_prog_AR="lib"
37102     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37103     break 2
37104   fi
37105 done
37106   done
37107 IFS=$as_save_IFS
37108 
37109 fi
37110 fi
37111 AR=$ac_cv_prog_AR
37112 if test -n "$AR"; then
37113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37114 $as_echo "$AR" >&6; }
37115 else
37116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37117 $as_echo "no" >&6; }
37118 fi
37119 
37120 
37121   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37122 
37123 
37124   # Publish this variable in the help.
37125 
37126 
37127   if [ -z "${AR+x}" ]; then
37128     # The variable is not set by user, try to locate tool using the code snippet
37129     if test -n "$ac_tool_prefix"; then
37130   for ac_prog in ar gcc-ar
37131   do
37132     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37133 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37135 $as_echo_n "checking for $ac_word... " >&6; }
37136 if ${ac_cv_prog_AR+:} false; then :
37137   $as_echo_n "(cached) " >&6
37138 else
37139   if test -n "$AR"; then
37140   ac_cv_prog_AR="$AR" # Let the user override the test.
37141 else
37142 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37143 for as_dir in $PATH
37144 do
37145   IFS=$as_save_IFS
37146   test -z "$as_dir" && as_dir=.
37147     for ac_exec_ext in '' $ac_executable_extensions; do
37148   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37149     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37150     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37151     break 2
37152   fi
37153 done
37154   done
37155 IFS=$as_save_IFS
37156 
37157 fi
37158 fi
37159 AR=$ac_cv_prog_AR
37160 if test -n "$AR"; then
37161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37162 $as_echo "$AR" >&6; }
37163 else
37164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37165 $as_echo "no" >&6; }
37166 fi
37167 
37168 
37169     test -n "$AR" && break
37170   done
37171 fi
37172 if test -z "$AR"; then
37173   ac_ct_AR=$AR
37174   for ac_prog in ar gcc-ar
37175 do
37176   # Extract the first word of "$ac_prog", so it can be a program name with args.
37177 set dummy $ac_prog; ac_word=$2
37178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37179 $as_echo_n "checking for $ac_word... " >&6; }
37180 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37181   $as_echo_n "(cached) " >&6
37182 else
37183   if test -n "$ac_ct_AR"; then
37184   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37185 else
37186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37187 for as_dir in $PATH
37188 do
37189   IFS=$as_save_IFS
37190   test -z "$as_dir" && as_dir=.
37191     for ac_exec_ext in '' $ac_executable_extensions; do
37192   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37193     ac_cv_prog_ac_ct_AR="$ac_prog"
37194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37195     break 2
37196   fi
37197 done
37198   done
37199 IFS=$as_save_IFS
37200 
37201 fi
37202 fi
37203 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37204 if test -n "$ac_ct_AR"; then
37205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37206 $as_echo "$ac_ct_AR" >&6; }
37207 else
37208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37209 $as_echo "no" >&6; }
37210 fi
37211 
37212 
37213   test -n "$ac_ct_AR" && break
37214 done
37215 
37216   if test "x$ac_ct_AR" = x; then
37217     AR=""
37218   else
37219     case $cross_compiling:$ac_tool_warned in
37220 yes:)
37221 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37222 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37223 ac_tool_warned=yes ;;
37224 esac
37225     AR=$ac_ct_AR
37226   fi
37227 fi
37228 
37229   else
37230     # The variable is set, but is it from the command line or the environment?
37231 
37232     # Try to remove the string !AR! from our list.
37233     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37234     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37235       # If it failed, the variable was not from the command line. Ignore it,
37236       # but warn the user (except for BASH, which is always set by the calling BASH).
37237       if test "xAR" != xBASH; then
37238         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37239 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37240       fi
37241       # Try to locate tool using the code snippet
37242       if test -n "$ac_tool_prefix"; then
37243   for ac_prog in ar gcc-ar
37244   do
37245     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37246 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37248 $as_echo_n "checking for $ac_word... " >&6; }
37249 if ${ac_cv_prog_AR+:} false; then :
37250   $as_echo_n "(cached) " >&6
37251 else
37252   if test -n "$AR"; then
37253   ac_cv_prog_AR="$AR" # Let the user override the test.
37254 else
37255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37256 for as_dir in $PATH
37257 do
37258   IFS=$as_save_IFS
37259   test -z "$as_dir" && as_dir=.
37260     for ac_exec_ext in '' $ac_executable_extensions; do
37261   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37262     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37263     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37264     break 2
37265   fi
37266 done
37267   done
37268 IFS=$as_save_IFS
37269 
37270 fi
37271 fi
37272 AR=$ac_cv_prog_AR
37273 if test -n "$AR"; then
37274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37275 $as_echo "$AR" >&6; }
37276 else
37277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37278 $as_echo "no" >&6; }
37279 fi
37280 
37281 
37282     test -n "$AR" && break
37283   done
37284 fi
37285 if test -z "$AR"; then
37286   ac_ct_AR=$AR
37287   for ac_prog in ar gcc-ar
37288 do
37289   # Extract the first word of "$ac_prog", so it can be a program name with args.
37290 set dummy $ac_prog; ac_word=$2
37291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37292 $as_echo_n "checking for $ac_word... " >&6; }
37293 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37294   $as_echo_n "(cached) " >&6
37295 else
37296   if test -n "$ac_ct_AR"; then
37297   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37298 else
37299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37300 for as_dir in $PATH
37301 do
37302   IFS=$as_save_IFS
37303   test -z "$as_dir" && as_dir=.
37304     for ac_exec_ext in '' $ac_executable_extensions; do
37305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37306     ac_cv_prog_ac_ct_AR="$ac_prog"
37307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37308     break 2
37309   fi
37310 done
37311   done
37312 IFS=$as_save_IFS
37313 
37314 fi
37315 fi
37316 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37317 if test -n "$ac_ct_AR"; then
37318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37319 $as_echo "$ac_ct_AR" >&6; }
37320 else
37321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37322 $as_echo "no" >&6; }
37323 fi
37324 
37325 
37326   test -n "$ac_ct_AR" && break
37327 done
37328 
37329   if test "x$ac_ct_AR" = x; then
37330     AR=""
37331   else
37332     case $cross_compiling:$ac_tool_warned in
37333 yes:)
37334 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37335 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37336 ac_tool_warned=yes ;;
37337 esac
37338     AR=$ac_ct_AR
37339   fi
37340 fi
37341 
37342     else
37343       # If it succeeded, then it was overridden by the user. We will use it
37344       # for the tool.
37345 
37346       # First remove it from the list of overridden variables, so we can test
37347       # for unknown variables in the end.
37348       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37349 
37350       # Check if we try to supply an empty value
37351       if test "x$AR" = x; then
37352         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37353 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37354         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37355 $as_echo_n "checking for AR... " >&6; }
37356         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37357 $as_echo "disabled" >&6; }
37358       else
37359         # Check if the provided tool contains a complete path.
37360         tool_specified="$AR"
37361         tool_basename="${tool_specified##*/}"
37362         if test "x$tool_basename" = "x$tool_specified"; then
37363           # A command without a complete path is provided, search $PATH.
37364           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37365 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37366           # Extract the first word of "$tool_basename", so it can be a program name with args.
37367 set dummy $tool_basename; ac_word=$2
37368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37369 $as_echo_n "checking for $ac_word... " >&6; }
37370 if ${ac_cv_path_AR+:} false; then :
37371   $as_echo_n "(cached) " >&6
37372 else
37373   case $AR in
37374   [\\/]* | ?:[\\/]*)
37375   ac_cv_path_AR="$AR" # Let the user override the test with a path.
37376   ;;
37377   *)
37378   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37379 for as_dir in $PATH
37380 do
37381   IFS=$as_save_IFS
37382   test -z "$as_dir" && as_dir=.
37383     for ac_exec_ext in '' $ac_executable_extensions; do
37384   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37385     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37386     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37387     break 2
37388   fi
37389 done
37390   done
37391 IFS=$as_save_IFS
37392 
37393   ;;
37394 esac
37395 fi
37396 AR=$ac_cv_path_AR
37397 if test -n "$AR"; then
37398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37399 $as_echo "$AR" >&6; }
37400 else
37401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37402 $as_echo "no" >&6; }
37403 fi
37404 
37405 
37406           if test "x$AR" = x; then
37407             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37408           fi
37409         else
37410           # Otherwise we believe it is a complete path. Use it as it is.
37411           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37412 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37413           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37414 $as_echo_n "checking for AR... " >&6; }
37415           if test ! -x "$tool_specified"; then
37416             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37417 $as_echo "not found" >&6; }
37418             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37419           fi
37420           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37421 $as_echo "$tool_specified" >&6; }
37422         fi
37423       fi
37424     fi
37425 
37426   fi
37427 
37428 
37429   else
37430 
37431 
37432   # Publish this variable in the help.
37433 
37434 
37435   if [ -z "${AR+x}" ]; then
37436     # The variable is not set by user, try to locate tool using the code snippet
37437     if test -n "$ac_tool_prefix"; then
37438   for ac_prog in ar
37439   do
37440     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37441 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37443 $as_echo_n "checking for $ac_word... " >&6; }
37444 if ${ac_cv_prog_AR+:} false; then :
37445   $as_echo_n "(cached) " >&6
37446 else
37447   if test -n "$AR"; then
37448   ac_cv_prog_AR="$AR" # Let the user override the test.
37449 else
37450 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37451 for as_dir in $PATH
37452 do
37453   IFS=$as_save_IFS
37454   test -z "$as_dir" && as_dir=.
37455     for ac_exec_ext in '' $ac_executable_extensions; do
37456   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37457     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37458     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37459     break 2
37460   fi
37461 done
37462   done
37463 IFS=$as_save_IFS
37464 
37465 fi
37466 fi
37467 AR=$ac_cv_prog_AR
37468 if test -n "$AR"; then
37469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37470 $as_echo "$AR" >&6; }
37471 else
37472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37473 $as_echo "no" >&6; }
37474 fi
37475 
37476 
37477     test -n "$AR" && break
37478   done
37479 fi
37480 if test -z "$AR"; then
37481   ac_ct_AR=$AR
37482   for ac_prog in ar
37483 do
37484   # Extract the first word of "$ac_prog", so it can be a program name with args.
37485 set dummy $ac_prog; ac_word=$2
37486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37487 $as_echo_n "checking for $ac_word... " >&6; }
37488 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37489   $as_echo_n "(cached) " >&6
37490 else
37491   if test -n "$ac_ct_AR"; then
37492   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37493 else
37494 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37495 for as_dir in $PATH
37496 do
37497   IFS=$as_save_IFS
37498   test -z "$as_dir" && as_dir=.
37499     for ac_exec_ext in '' $ac_executable_extensions; do
37500   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37501     ac_cv_prog_ac_ct_AR="$ac_prog"
37502     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37503     break 2
37504   fi
37505 done
37506   done
37507 IFS=$as_save_IFS
37508 
37509 fi
37510 fi
37511 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37512 if test -n "$ac_ct_AR"; then
37513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37514 $as_echo "$ac_ct_AR" >&6; }
37515 else
37516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37517 $as_echo "no" >&6; }
37518 fi
37519 
37520 
37521   test -n "$ac_ct_AR" && break
37522 done
37523 
37524   if test "x$ac_ct_AR" = x; then
37525     AR=""
37526   else
37527     case $cross_compiling:$ac_tool_warned in
37528 yes:)
37529 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37530 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37531 ac_tool_warned=yes ;;
37532 esac
37533     AR=$ac_ct_AR
37534   fi
37535 fi
37536 
37537   else
37538     # The variable is set, but is it from the command line or the environment?
37539 
37540     # Try to remove the string !AR! from our list.
37541     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37542     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37543       # If it failed, the variable was not from the command line. Ignore it,
37544       # but warn the user (except for BASH, which is always set by the calling BASH).
37545       if test "xAR" != xBASH; then
37546         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37547 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37548       fi
37549       # Try to locate tool using the code snippet
37550       if test -n "$ac_tool_prefix"; then
37551   for ac_prog in ar
37552   do
37553     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37554 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37556 $as_echo_n "checking for $ac_word... " >&6; }
37557 if ${ac_cv_prog_AR+:} false; then :
37558   $as_echo_n "(cached) " >&6
37559 else
37560   if test -n "$AR"; then
37561   ac_cv_prog_AR="$AR" # Let the user override the test.
37562 else
37563 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37564 for as_dir in $PATH
37565 do
37566   IFS=$as_save_IFS
37567   test -z "$as_dir" && as_dir=.
37568     for ac_exec_ext in '' $ac_executable_extensions; do
37569   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37570     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37571     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37572     break 2
37573   fi
37574 done
37575   done
37576 IFS=$as_save_IFS
37577 
37578 fi
37579 fi
37580 AR=$ac_cv_prog_AR
37581 if test -n "$AR"; then
37582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37583 $as_echo "$AR" >&6; }
37584 else
37585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37586 $as_echo "no" >&6; }
37587 fi
37588 
37589 
37590     test -n "$AR" && break
37591   done
37592 fi
37593 if test -z "$AR"; then
37594   ac_ct_AR=$AR
37595   for ac_prog in ar
37596 do
37597   # Extract the first word of "$ac_prog", so it can be a program name with args.
37598 set dummy $ac_prog; ac_word=$2
37599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37600 $as_echo_n "checking for $ac_word... " >&6; }
37601 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37602   $as_echo_n "(cached) " >&6
37603 else
37604   if test -n "$ac_ct_AR"; then
37605   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37606 else
37607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37608 for as_dir in $PATH
37609 do
37610   IFS=$as_save_IFS
37611   test -z "$as_dir" && as_dir=.
37612     for ac_exec_ext in '' $ac_executable_extensions; do
37613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37614     ac_cv_prog_ac_ct_AR="$ac_prog"
37615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37616     break 2
37617   fi
37618 done
37619   done
37620 IFS=$as_save_IFS
37621 
37622 fi
37623 fi
37624 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37625 if test -n "$ac_ct_AR"; then
37626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37627 $as_echo "$ac_ct_AR" >&6; }
37628 else
37629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37630 $as_echo "no" >&6; }
37631 fi
37632 
37633 
37634   test -n "$ac_ct_AR" && break
37635 done
37636 
37637   if test "x$ac_ct_AR" = x; then
37638     AR=""
37639   else
37640     case $cross_compiling:$ac_tool_warned in
37641 yes:)
37642 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37643 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37644 ac_tool_warned=yes ;;
37645 esac
37646     AR=$ac_ct_AR
37647   fi
37648 fi
37649 
37650     else
37651       # If it succeeded, then it was overridden by the user. We will use it
37652       # for the tool.
37653 
37654       # First remove it from the list of overridden variables, so we can test
37655       # for unknown variables in the end.
37656       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37657 
37658       # Check if we try to supply an empty value
37659       if test "x$AR" = x; then
37660         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37661 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37662         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37663 $as_echo_n "checking for AR... " >&6; }
37664         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37665 $as_echo "disabled" >&6; }
37666       else
37667         # Check if the provided tool contains a complete path.
37668         tool_specified="$AR"
37669         tool_basename="${tool_specified##*/}"
37670         if test "x$tool_basename" = "x$tool_specified"; then
37671           # A command without a complete path is provided, search $PATH.
37672           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37673 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37674           # Extract the first word of "$tool_basename", so it can be a program name with args.
37675 set dummy $tool_basename; 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_path_AR+:} false; then :
37679   $as_echo_n "(cached) " >&6
37680 else
37681   case $AR in
37682   [\\/]* | ?:[\\/]*)
37683   ac_cv_path_AR="$AR" # Let the user override the test with a path.
37684   ;;
37685   *)
37686   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37687 for as_dir in $PATH
37688 do
37689   IFS=$as_save_IFS
37690   test -z "$as_dir" && as_dir=.
37691     for ac_exec_ext in '' $ac_executable_extensions; do
37692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37693     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37695     break 2
37696   fi
37697 done
37698   done
37699 IFS=$as_save_IFS
37700 
37701   ;;
37702 esac
37703 fi
37704 AR=$ac_cv_path_AR
37705 if test -n "$AR"; then
37706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37707 $as_echo "$AR" >&6; }
37708 else
37709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37710 $as_echo "no" >&6; }
37711 fi
37712 
37713 
37714           if test "x$AR" = x; then
37715             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37716           fi
37717         else
37718           # Otherwise we believe it is a complete path. Use it as it is.
37719           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37720 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37721           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37722 $as_echo_n "checking for AR... " >&6; }
37723           if test ! -x "$tool_specified"; then
37724             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37725 $as_echo "not found" >&6; }
37726             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37727           fi
37728           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37729 $as_echo "$tool_specified" >&6; }
37730         fi
37731       fi
37732     fi
37733 
37734   fi
37735 
37736 
37737   fi
37738 
37739   # Only process if variable expands to non-empty
37740 
37741   if test "x$AR" != x; then
37742     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37743 
37744   # First separate the path from the arguments. This will split at the first
37745   # space.
37746   complete="$AR"
37747   path="${complete%% *}"
37748   tmp="$complete EOL"
37749   arguments="${tmp#* }"
37750 
37751   # Input might be given as Windows format, start by converting to
37752   # unix format.
37753   new_path=`$CYGPATH -u "$path"`
37754 
37755   # Now try to locate executable using which
37756   new_path=`$WHICH "$new_path" 2> /dev/null`
37757   # bat and cmd files are not always considered executable in cygwin causing which
37758   # to not find them
37759   if test "x$new_path" = x \
37760       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37761       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37762     new_path=`$CYGPATH -u "$path"`
37763   fi
37764   if test "x$new_path" = x; then
37765     # Oops. Which didn't find the executable.
37766     # The splitting of arguments from the executable at a space might have been incorrect,
37767     # since paths with space are more likely in Windows. Give it another try with the whole
37768     # argument.
37769     path="$complete"
37770     arguments="EOL"
37771     new_path=`$CYGPATH -u "$path"`
37772     new_path=`$WHICH "$new_path" 2> /dev/null`
37773     # bat and cmd files are not always considered executable in cygwin causing which
37774     # to not find them
37775     if test "x$new_path" = x \
37776         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37777         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37778       new_path=`$CYGPATH -u "$path"`
37779     fi
37780     if test "x$new_path" = x; then
37781       # It's still not found. Now this is an unrecoverable error.
37782       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37783 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37784       has_space=`$ECHO "$complete" | $GREP " "`
37785       if test "x$has_space" != x; then
37786         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37787 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37788       fi
37789       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37790     fi
37791   fi
37792 
37793   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37794   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37795   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37796   # "foo.exe" is OK but "foo" is an error.
37797   #
37798   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37799   # It is also a way to make sure we got the proper file name for the real test later on.
37800   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37801   if test "x$test_shortpath" = x; then
37802     # Short path failed, file does not exist as specified.
37803     # Try adding .exe or .cmd
37804     if test -f "${new_path}.exe"; then
37805       input_to_shortpath="${new_path}.exe"
37806     elif test -f "${new_path}.cmd"; then
37807       input_to_shortpath="${new_path}.cmd"
37808     else
37809       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37810 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37811       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37812 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37813       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37814     fi
37815   else
37816     input_to_shortpath="$new_path"
37817   fi
37818 
37819   # Call helper function which possibly converts this using DOS-style short mode.
37820   # If so, the updated path is stored in $new_path.
37821   new_path="$input_to_shortpath"
37822 
37823   input_path="$input_to_shortpath"
37824   # Check if we need to convert this using DOS-style short mode. If the path
37825   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37826   # take no chances and rewrite it.
37827   # Note: m4 eats our [], so we need to use [ and ] instead.
37828   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37829   if test "x$has_forbidden_chars" != x; then
37830     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37831     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37832     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37833     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37834       # Going to short mode and back again did indeed matter. Since short mode is
37835       # case insensitive, let's make it lowercase to improve readability.
37836       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37837       # Now convert it back to Unix-style (cygpath)
37838       input_path=`$CYGPATH -u "$shortmode_path"`
37839       new_path="$input_path"
37840     fi
37841   fi
37842 
37843   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37844   if test "x$test_cygdrive_prefix" = x; then
37845     # As a simple fix, exclude /usr/bin since it's not a real path.
37846     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37847       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37848       # a path prefixed by /cygdrive for fixpath to work.
37849       new_path="$CYGWIN_ROOT_PATH$input_path"
37850     fi
37851   fi
37852 
37853   # remove trailing .exe if any
37854   new_path="${new_path/%.exe/}"
37855 
37856     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37857 
37858   # First separate the path from the arguments. This will split at the first
37859   # space.
37860   complete="$AR"
37861   path="${complete%% *}"
37862   tmp="$complete EOL"
37863   arguments="${tmp#* }"
37864 
37865   # Input might be given as Windows format, start by converting to
37866   # unix format.
37867   new_path="$path"
37868 
37869   windows_path="$new_path"
37870   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37871     unix_path=`$CYGPATH -u "$windows_path"`
37872     new_path="$unix_path"
37873   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37874     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37875     new_path="$unix_path"
37876   fi
37877 
37878 
37879   # Now try to locate executable using which
37880   new_path=`$WHICH "$new_path" 2> /dev/null`
37881 
37882   if test "x$new_path" = x; then
37883     # Oops. Which didn't find the executable.
37884     # The splitting of arguments from the executable at a space might have been incorrect,
37885     # since paths with space are more likely in Windows. Give it another try with the whole
37886     # argument.
37887     path="$complete"
37888     arguments="EOL"
37889     new_path="$path"
37890 
37891   windows_path="$new_path"
37892   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37893     unix_path=`$CYGPATH -u "$windows_path"`
37894     new_path="$unix_path"
37895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37896     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37897     new_path="$unix_path"
37898   fi
37899 
37900 
37901     new_path=`$WHICH "$new_path" 2> /dev/null`
37902     # bat and cmd files are not always considered executable in MSYS causing which
37903     # to not find them
37904     if test "x$new_path" = x \
37905         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37906         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37907       new_path="$path"
37908 
37909   windows_path="$new_path"
37910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37911     unix_path=`$CYGPATH -u "$windows_path"`
37912     new_path="$unix_path"
37913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37915     new_path="$unix_path"
37916   fi
37917 
37918     fi
37919 
37920     if test "x$new_path" = x; then
37921       # It's still not found. Now this is an unrecoverable error.
37922       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37923 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37924       has_space=`$ECHO "$complete" | $GREP " "`
37925       if test "x$has_space" != x; then
37926         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37927 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37928       fi
37929       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37930     fi
37931   fi
37932 
37933   # Now new_path has a complete unix path to the binary
37934   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37935     # Keep paths in /bin as-is, but remove trailing .exe if any
37936     new_path="${new_path/%.exe/}"
37937     # Do not save /bin paths to all_fixpath_prefixes!
37938   else
37939     # Not in mixed or Windows style, start by that.
37940     new_path=`cmd //c echo $new_path`
37941 
37942   input_path="$new_path"
37943   # Check if we need to convert this using DOS-style short mode. If the path
37944   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37945   # take no chances and rewrite it.
37946   # Note: m4 eats our [], so we need to use [ and ] instead.
37947   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37948   if test "x$has_forbidden_chars" != x; then
37949     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37950     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37951   fi
37952 
37953     # Output is in $new_path
37954 
37955   windows_path="$new_path"
37956   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37957     unix_path=`$CYGPATH -u "$windows_path"`
37958     new_path="$unix_path"
37959   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37960     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37961     new_path="$unix_path"
37962   fi
37963 
37964     # remove trailing .exe if any
37965     new_path="${new_path/%.exe/}"
37966 
37967     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37968     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37969   fi
37970 
37971     else
37972       # We're on a unix platform. Hooray! :)
37973       # First separate the path from the arguments. This will split at the first
37974       # space.
37975       complete="$AR"
37976       path="${complete%% *}"
37977       tmp="$complete EOL"
37978       arguments="${tmp#* }"
37979 
37980       # Cannot rely on the command "which" here since it doesn't always work.
37981       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37982       if test -z "$is_absolute_path"; then
37983         # Path to executable is not absolute. Find it.
37984         IFS_save="$IFS"
37985         IFS=:
37986         for p in $PATH; do
37987           if test -f "$p/$path" && test -x "$p/$path"; then
37988             new_path="$p/$path"
37989             break
37990           fi
37991         done
37992         IFS="$IFS_save"
37993       else
37994         # This is an absolute path, we can use it without further modifications.
37995         new_path="$path"
37996       fi
37997 
37998       if test "x$new_path" = x; then
37999         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38000 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38001         has_space=`$ECHO "$complete" | $GREP " "`
38002         if test "x$has_space" != x; then
38003           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38004 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38005         fi
38006         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38007       fi
38008     fi
38009 
38010     # Now join together the path and the arguments once again
38011     if test "x$arguments" != xEOL; then
38012       new_complete="$new_path ${arguments% *}"
38013     else
38014       new_complete="$new_path"
38015     fi
38016 
38017     if test "x$complete" != "x$new_complete"; then
38018       AR="$new_complete"
38019       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38020 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38021     fi
38022   fi
38023 
38024 
38025 
38026   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38027 
38028 
38029   # Publish this variable in the help.
38030 
38031 
38032   if [ -z "${LIPO+x}" ]; then
38033     # The variable is not set by user, try to locate tool using the code snippet
38034     for ac_prog in lipo
38035 do
38036   # Extract the first word of "$ac_prog", so it can be a program name with args.
38037 set dummy $ac_prog; ac_word=$2
38038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38039 $as_echo_n "checking for $ac_word... " >&6; }
38040 if ${ac_cv_path_LIPO+:} false; then :
38041   $as_echo_n "(cached) " >&6
38042 else
38043   case $LIPO in
38044   [\\/]* | ?:[\\/]*)
38045   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38046   ;;
38047   *)
38048   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38049 for as_dir in $PATH
38050 do
38051   IFS=$as_save_IFS
38052   test -z "$as_dir" && as_dir=.
38053     for ac_exec_ext in '' $ac_executable_extensions; do
38054   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38055     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38056     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38057     break 2
38058   fi
38059 done
38060   done
38061 IFS=$as_save_IFS
38062 
38063   ;;
38064 esac
38065 fi
38066 LIPO=$ac_cv_path_LIPO
38067 if test -n "$LIPO"; then
38068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38069 $as_echo "$LIPO" >&6; }
38070 else
38071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38072 $as_echo "no" >&6; }
38073 fi
38074 
38075 
38076   test -n "$LIPO" && break
38077 done
38078 
38079   else
38080     # The variable is set, but is it from the command line or the environment?
38081 
38082     # Try to remove the string !LIPO! from our list.
38083     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38084     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38085       # If it failed, the variable was not from the command line. Ignore it,
38086       # but warn the user (except for BASH, which is always set by the calling BASH).
38087       if test "xLIPO" != xBASH; then
38088         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38089 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38090       fi
38091       # Try to locate tool using the code snippet
38092       for ac_prog in lipo
38093 do
38094   # Extract the first word of "$ac_prog", so it can be a program name with args.
38095 set dummy $ac_prog; ac_word=$2
38096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38097 $as_echo_n "checking for $ac_word... " >&6; }
38098 if ${ac_cv_path_LIPO+:} false; then :
38099   $as_echo_n "(cached) " >&6
38100 else
38101   case $LIPO in
38102   [\\/]* | ?:[\\/]*)
38103   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38104   ;;
38105   *)
38106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38107 for as_dir in $PATH
38108 do
38109   IFS=$as_save_IFS
38110   test -z "$as_dir" && as_dir=.
38111     for ac_exec_ext in '' $ac_executable_extensions; do
38112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38113     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38115     break 2
38116   fi
38117 done
38118   done
38119 IFS=$as_save_IFS
38120 
38121   ;;
38122 esac
38123 fi
38124 LIPO=$ac_cv_path_LIPO
38125 if test -n "$LIPO"; then
38126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38127 $as_echo "$LIPO" >&6; }
38128 else
38129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38130 $as_echo "no" >&6; }
38131 fi
38132 
38133 
38134   test -n "$LIPO" && break
38135 done
38136 
38137     else
38138       # If it succeeded, then it was overridden by the user. We will use it
38139       # for the tool.
38140 
38141       # First remove it from the list of overridden variables, so we can test
38142       # for unknown variables in the end.
38143       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38144 
38145       # Check if we try to supply an empty value
38146       if test "x$LIPO" = x; then
38147         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38148 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38149         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38150 $as_echo_n "checking for LIPO... " >&6; }
38151         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38152 $as_echo "disabled" >&6; }
38153       else
38154         # Check if the provided tool contains a complete path.
38155         tool_specified="$LIPO"
38156         tool_basename="${tool_specified##*/}"
38157         if test "x$tool_basename" = "x$tool_specified"; then
38158           # A command without a complete path is provided, search $PATH.
38159           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38160 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38161           # Extract the first word of "$tool_basename", so it can be a program name with args.
38162 set dummy $tool_basename; ac_word=$2
38163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38164 $as_echo_n "checking for $ac_word... " >&6; }
38165 if ${ac_cv_path_LIPO+:} false; then :
38166   $as_echo_n "(cached) " >&6
38167 else
38168   case $LIPO in
38169   [\\/]* | ?:[\\/]*)
38170   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38171   ;;
38172   *)
38173   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38174 for as_dir in $PATH
38175 do
38176   IFS=$as_save_IFS
38177   test -z "$as_dir" && as_dir=.
38178     for ac_exec_ext in '' $ac_executable_extensions; do
38179   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38180     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38181     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38182     break 2
38183   fi
38184 done
38185   done
38186 IFS=$as_save_IFS
38187 
38188   ;;
38189 esac
38190 fi
38191 LIPO=$ac_cv_path_LIPO
38192 if test -n "$LIPO"; then
38193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38194 $as_echo "$LIPO" >&6; }
38195 else
38196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38197 $as_echo "no" >&6; }
38198 fi
38199 
38200 
38201           if test "x$LIPO" = x; then
38202             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38203           fi
38204         else
38205           # Otherwise we believe it is a complete path. Use it as it is.
38206           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38207 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38208           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38209 $as_echo_n "checking for LIPO... " >&6; }
38210           if test ! -x "$tool_specified"; then
38211             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38212 $as_echo "not found" >&6; }
38213             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38214           fi
38215           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38216 $as_echo "$tool_specified" >&6; }
38217         fi
38218       fi
38219     fi
38220 
38221   fi
38222 
38223 
38224 
38225   # Only process if variable expands to non-empty
38226 
38227   if test "x$LIPO" != x; then
38228     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38229 
38230   # First separate the path from the arguments. This will split at the first
38231   # space.
38232   complete="$LIPO"
38233   path="${complete%% *}"
38234   tmp="$complete EOL"
38235   arguments="${tmp#* }"
38236 
38237   # Input might be given as Windows format, start by converting to
38238   # unix format.
38239   new_path=`$CYGPATH -u "$path"`
38240 
38241   # Now try to locate executable using which
38242   new_path=`$WHICH "$new_path" 2> /dev/null`
38243   # bat and cmd files are not always considered executable in cygwin causing which
38244   # to not find them
38245   if test "x$new_path" = x \
38246       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38247       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38248     new_path=`$CYGPATH -u "$path"`
38249   fi
38250   if test "x$new_path" = x; then
38251     # Oops. Which didn't find the executable.
38252     # The splitting of arguments from the executable at a space might have been incorrect,
38253     # since paths with space are more likely in Windows. Give it another try with the whole
38254     # argument.
38255     path="$complete"
38256     arguments="EOL"
38257     new_path=`$CYGPATH -u "$path"`
38258     new_path=`$WHICH "$new_path" 2> /dev/null`
38259     # bat and cmd files are not always considered executable in cygwin causing which
38260     # to not find them
38261     if test "x$new_path" = x \
38262         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38263         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38264       new_path=`$CYGPATH -u "$path"`
38265     fi
38266     if test "x$new_path" = x; then
38267       # It's still not found. Now this is an unrecoverable error.
38268       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38269 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38270       has_space=`$ECHO "$complete" | $GREP " "`
38271       if test "x$has_space" != x; then
38272         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38273 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38274       fi
38275       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38276     fi
38277   fi
38278 
38279   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38280   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38281   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38282   # "foo.exe" is OK but "foo" is an error.
38283   #
38284   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38285   # It is also a way to make sure we got the proper file name for the real test later on.
38286   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38287   if test "x$test_shortpath" = x; then
38288     # Short path failed, file does not exist as specified.
38289     # Try adding .exe or .cmd
38290     if test -f "${new_path}.exe"; then
38291       input_to_shortpath="${new_path}.exe"
38292     elif test -f "${new_path}.cmd"; then
38293       input_to_shortpath="${new_path}.cmd"
38294     else
38295       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38296 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38297       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38298 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38299       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38300     fi
38301   else
38302     input_to_shortpath="$new_path"
38303   fi
38304 
38305   # Call helper function which possibly converts this using DOS-style short mode.
38306   # If so, the updated path is stored in $new_path.
38307   new_path="$input_to_shortpath"
38308 
38309   input_path="$input_to_shortpath"
38310   # Check if we need to convert this using DOS-style short mode. If the path
38311   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38312   # take no chances and rewrite it.
38313   # Note: m4 eats our [], so we need to use [ and ] instead.
38314   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38315   if test "x$has_forbidden_chars" != x; then
38316     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38317     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38318     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38319     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38320       # Going to short mode and back again did indeed matter. Since short mode is
38321       # case insensitive, let's make it lowercase to improve readability.
38322       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38323       # Now convert it back to Unix-style (cygpath)
38324       input_path=`$CYGPATH -u "$shortmode_path"`
38325       new_path="$input_path"
38326     fi
38327   fi
38328 
38329   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38330   if test "x$test_cygdrive_prefix" = x; then
38331     # As a simple fix, exclude /usr/bin since it's not a real path.
38332     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38333       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38334       # a path prefixed by /cygdrive for fixpath to work.
38335       new_path="$CYGWIN_ROOT_PATH$input_path"
38336     fi
38337   fi
38338 
38339   # remove trailing .exe if any
38340   new_path="${new_path/%.exe/}"
38341 
38342     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38343 
38344   # First separate the path from the arguments. This will split at the first
38345   # space.
38346   complete="$LIPO"
38347   path="${complete%% *}"
38348   tmp="$complete EOL"
38349   arguments="${tmp#* }"
38350 
38351   # Input might be given as Windows format, start by converting to
38352   # unix format.
38353   new_path="$path"
38354 
38355   windows_path="$new_path"
38356   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38357     unix_path=`$CYGPATH -u "$windows_path"`
38358     new_path="$unix_path"
38359   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38360     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38361     new_path="$unix_path"
38362   fi
38363 
38364 
38365   # Now try to locate executable using which
38366   new_path=`$WHICH "$new_path" 2> /dev/null`
38367 
38368   if test "x$new_path" = x; then
38369     # Oops. Which didn't find the executable.
38370     # The splitting of arguments from the executable at a space might have been incorrect,
38371     # since paths with space are more likely in Windows. Give it another try with the whole
38372     # argument.
38373     path="$complete"
38374     arguments="EOL"
38375     new_path="$path"
38376 
38377   windows_path="$new_path"
38378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38379     unix_path=`$CYGPATH -u "$windows_path"`
38380     new_path="$unix_path"
38381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38382     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38383     new_path="$unix_path"
38384   fi
38385 
38386 
38387     new_path=`$WHICH "$new_path" 2> /dev/null`
38388     # bat and cmd files are not always considered executable in MSYS causing which
38389     # to not find them
38390     if test "x$new_path" = x \
38391         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38392         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38393       new_path="$path"
38394 
38395   windows_path="$new_path"
38396   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38397     unix_path=`$CYGPATH -u "$windows_path"`
38398     new_path="$unix_path"
38399   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38400     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38401     new_path="$unix_path"
38402   fi
38403 
38404     fi
38405 
38406     if test "x$new_path" = x; then
38407       # It's still not found. Now this is an unrecoverable error.
38408       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38409 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38410       has_space=`$ECHO "$complete" | $GREP " "`
38411       if test "x$has_space" != x; then
38412         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38413 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38414       fi
38415       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38416     fi
38417   fi
38418 
38419   # Now new_path has a complete unix path to the binary
38420   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38421     # Keep paths in /bin as-is, but remove trailing .exe if any
38422     new_path="${new_path/%.exe/}"
38423     # Do not save /bin paths to all_fixpath_prefixes!
38424   else
38425     # Not in mixed or Windows style, start by that.
38426     new_path=`cmd //c echo $new_path`
38427 
38428   input_path="$new_path"
38429   # Check if we need to convert this using DOS-style short mode. If the path
38430   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38431   # take no chances and rewrite it.
38432   # Note: m4 eats our [], so we need to use [ and ] instead.
38433   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38434   if test "x$has_forbidden_chars" != x; then
38435     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38436     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38437   fi
38438 
38439     # Output is in $new_path
38440 
38441   windows_path="$new_path"
38442   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38443     unix_path=`$CYGPATH -u "$windows_path"`
38444     new_path="$unix_path"
38445   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38446     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38447     new_path="$unix_path"
38448   fi
38449 
38450     # remove trailing .exe if any
38451     new_path="${new_path/%.exe/}"
38452 
38453     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38454     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38455   fi
38456 
38457     else
38458       # We're on a unix platform. Hooray! :)
38459       # First separate the path from the arguments. This will split at the first
38460       # space.
38461       complete="$LIPO"
38462       path="${complete%% *}"
38463       tmp="$complete EOL"
38464       arguments="${tmp#* }"
38465 
38466       # Cannot rely on the command "which" here since it doesn't always work.
38467       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38468       if test -z "$is_absolute_path"; then
38469         # Path to executable is not absolute. Find it.
38470         IFS_save="$IFS"
38471         IFS=:
38472         for p in $PATH; do
38473           if test -f "$p/$path" && test -x "$p/$path"; then
38474             new_path="$p/$path"
38475             break
38476           fi
38477         done
38478         IFS="$IFS_save"
38479       else
38480         # This is an absolute path, we can use it without further modifications.
38481         new_path="$path"
38482       fi
38483 
38484       if test "x$new_path" = x; then
38485         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38486 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38487         has_space=`$ECHO "$complete" | $GREP " "`
38488         if test "x$has_space" != x; then
38489           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38490 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38491         fi
38492         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38493       fi
38494     fi
38495 
38496     # Now join together the path and the arguments once again
38497     if test "x$arguments" != xEOL; then
38498       new_complete="$new_path ${arguments% *}"
38499     else
38500       new_complete="$new_path"
38501     fi
38502 
38503     if test "x$complete" != "x$new_complete"; then
38504       LIPO="$new_complete"
38505       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38506 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38507     fi
38508   fi
38509 
38510   fi
38511 
38512   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38513     # Extract the first word of "mt", so it can be a program name with args.
38514 set dummy mt; ac_word=$2
38515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38516 $as_echo_n "checking for $ac_word... " >&6; }
38517 if ${ac_cv_prog_MT+:} false; then :
38518   $as_echo_n "(cached) " >&6
38519 else
38520   if test -n "$MT"; then
38521   ac_cv_prog_MT="$MT" # Let the user override the test.
38522 else
38523   ac_prog_rejected=no
38524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38525 for as_dir in $PATH
38526 do
38527   IFS=$as_save_IFS
38528   test -z "$as_dir" && as_dir=.
38529     for ac_exec_ext in '' $ac_executable_extensions; do
38530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38531     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38532        ac_prog_rejected=yes
38533        continue
38534      fi
38535     ac_cv_prog_MT="mt"
38536     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38537     break 2
38538   fi
38539 done
38540   done
38541 IFS=$as_save_IFS
38542 
38543 if test $ac_prog_rejected = yes; then
38544   # We found a bogon in the path, so make sure we never use it.
38545   set dummy $ac_cv_prog_MT
38546   shift
38547   if test $# != 0; then
38548     # We chose a different compiler from the bogus one.
38549     # However, it has the same basename, so the bogon will be chosen
38550     # first if we set MT to just the basename; use the full file name.
38551     shift
38552     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38553   fi
38554 fi
38555 fi
38556 fi
38557 MT=$ac_cv_prog_MT
38558 if test -n "$MT"; then
38559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38560 $as_echo "$MT" >&6; }
38561 else
38562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38563 $as_echo "no" >&6; }
38564 fi
38565 
38566 
38567 
38568   # Only process if variable expands to non-empty
38569 
38570   if test "x$MT" != x; then
38571     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38572 
38573   # First separate the path from the arguments. This will split at the first
38574   # space.
38575   complete="$MT"
38576   path="${complete%% *}"
38577   tmp="$complete EOL"
38578   arguments="${tmp#* }"
38579 
38580   # Input might be given as Windows format, start by converting to
38581   # unix format.
38582   new_path=`$CYGPATH -u "$path"`
38583 
38584   # Now try to locate executable using which
38585   new_path=`$WHICH "$new_path" 2> /dev/null`
38586   # bat and cmd files are not always considered executable in cygwin causing which
38587   # to not find them
38588   if test "x$new_path" = x \
38589       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38590       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38591     new_path=`$CYGPATH -u "$path"`
38592   fi
38593   if test "x$new_path" = x; then
38594     # Oops. Which didn't find the executable.
38595     # The splitting of arguments from the executable at a space might have been incorrect,
38596     # since paths with space are more likely in Windows. Give it another try with the whole
38597     # argument.
38598     path="$complete"
38599     arguments="EOL"
38600     new_path=`$CYGPATH -u "$path"`
38601     new_path=`$WHICH "$new_path" 2> /dev/null`
38602     # bat and cmd files are not always considered executable in cygwin causing which
38603     # to not find them
38604     if test "x$new_path" = x \
38605         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38606         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38607       new_path=`$CYGPATH -u "$path"`
38608     fi
38609     if test "x$new_path" = x; then
38610       # It's still not found. Now this is an unrecoverable error.
38611       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38612 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38613       has_space=`$ECHO "$complete" | $GREP " "`
38614       if test "x$has_space" != x; then
38615         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38616 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38617       fi
38618       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38619     fi
38620   fi
38621 
38622   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38623   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38624   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38625   # "foo.exe" is OK but "foo" is an error.
38626   #
38627   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38628   # It is also a way to make sure we got the proper file name for the real test later on.
38629   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38630   if test "x$test_shortpath" = x; then
38631     # Short path failed, file does not exist as specified.
38632     # Try adding .exe or .cmd
38633     if test -f "${new_path}.exe"; then
38634       input_to_shortpath="${new_path}.exe"
38635     elif test -f "${new_path}.cmd"; then
38636       input_to_shortpath="${new_path}.cmd"
38637     else
38638       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38639 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38640       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38641 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38642       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38643     fi
38644   else
38645     input_to_shortpath="$new_path"
38646   fi
38647 
38648   # Call helper function which possibly converts this using DOS-style short mode.
38649   # If so, the updated path is stored in $new_path.
38650   new_path="$input_to_shortpath"
38651 
38652   input_path="$input_to_shortpath"
38653   # Check if we need to convert this using DOS-style short mode. If the path
38654   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38655   # take no chances and rewrite it.
38656   # Note: m4 eats our [], so we need to use [ and ] instead.
38657   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38658   if test "x$has_forbidden_chars" != x; then
38659     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38660     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38661     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38662     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38663       # Going to short mode and back again did indeed matter. Since short mode is
38664       # case insensitive, let's make it lowercase to improve readability.
38665       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38666       # Now convert it back to Unix-style (cygpath)
38667       input_path=`$CYGPATH -u "$shortmode_path"`
38668       new_path="$input_path"
38669     fi
38670   fi
38671 
38672   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38673   if test "x$test_cygdrive_prefix" = x; then
38674     # As a simple fix, exclude /usr/bin since it's not a real path.
38675     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38676       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38677       # a path prefixed by /cygdrive for fixpath to work.
38678       new_path="$CYGWIN_ROOT_PATH$input_path"
38679     fi
38680   fi
38681 
38682   # remove trailing .exe if any
38683   new_path="${new_path/%.exe/}"
38684 
38685     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38686 
38687   # First separate the path from the arguments. This will split at the first
38688   # space.
38689   complete="$MT"
38690   path="${complete%% *}"
38691   tmp="$complete EOL"
38692   arguments="${tmp#* }"
38693 
38694   # Input might be given as Windows format, start by converting to
38695   # unix format.
38696   new_path="$path"
38697 
38698   windows_path="$new_path"
38699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38700     unix_path=`$CYGPATH -u "$windows_path"`
38701     new_path="$unix_path"
38702   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38703     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38704     new_path="$unix_path"
38705   fi
38706 
38707 
38708   # Now try to locate executable using which
38709   new_path=`$WHICH "$new_path" 2> /dev/null`
38710 
38711   if test "x$new_path" = x; then
38712     # Oops. Which didn't find the executable.
38713     # The splitting of arguments from the executable at a space might have been incorrect,
38714     # since paths with space are more likely in Windows. Give it another try with the whole
38715     # argument.
38716     path="$complete"
38717     arguments="EOL"
38718     new_path="$path"
38719 
38720   windows_path="$new_path"
38721   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38722     unix_path=`$CYGPATH -u "$windows_path"`
38723     new_path="$unix_path"
38724   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38725     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38726     new_path="$unix_path"
38727   fi
38728 
38729 
38730     new_path=`$WHICH "$new_path" 2> /dev/null`
38731     # bat and cmd files are not always considered executable in MSYS causing which
38732     # to not find them
38733     if test "x$new_path" = x \
38734         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38735         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38736       new_path="$path"
38737 
38738   windows_path="$new_path"
38739   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38740     unix_path=`$CYGPATH -u "$windows_path"`
38741     new_path="$unix_path"
38742   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38743     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38744     new_path="$unix_path"
38745   fi
38746 
38747     fi
38748 
38749     if test "x$new_path" = x; then
38750       # It's still not found. Now this is an unrecoverable error.
38751       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38752 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38753       has_space=`$ECHO "$complete" | $GREP " "`
38754       if test "x$has_space" != x; then
38755         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38756 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38757       fi
38758       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38759     fi
38760   fi
38761 
38762   # Now new_path has a complete unix path to the binary
38763   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38764     # Keep paths in /bin as-is, but remove trailing .exe if any
38765     new_path="${new_path/%.exe/}"
38766     # Do not save /bin paths to all_fixpath_prefixes!
38767   else
38768     # Not in mixed or Windows style, start by that.
38769     new_path=`cmd //c echo $new_path`
38770 
38771   input_path="$new_path"
38772   # Check if we need to convert this using DOS-style short mode. If the path
38773   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38774   # take no chances and rewrite it.
38775   # Note: m4 eats our [], so we need to use [ and ] instead.
38776   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38777   if test "x$has_forbidden_chars" != x; then
38778     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38779     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38780   fi
38781 
38782     # Output is in $new_path
38783 
38784   windows_path="$new_path"
38785   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38786     unix_path=`$CYGPATH -u "$windows_path"`
38787     new_path="$unix_path"
38788   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38789     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38790     new_path="$unix_path"
38791   fi
38792 
38793     # remove trailing .exe if any
38794     new_path="${new_path/%.exe/}"
38795 
38796     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38797     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38798   fi
38799 
38800     else
38801       # We're on a unix platform. Hooray! :)
38802       # First separate the path from the arguments. This will split at the first
38803       # space.
38804       complete="$MT"
38805       path="${complete%% *}"
38806       tmp="$complete EOL"
38807       arguments="${tmp#* }"
38808 
38809       # Cannot rely on the command "which" here since it doesn't always work.
38810       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38811       if test -z "$is_absolute_path"; then
38812         # Path to executable is not absolute. Find it.
38813         IFS_save="$IFS"
38814         IFS=:
38815         for p in $PATH; do
38816           if test -f "$p/$path" && test -x "$p/$path"; then
38817             new_path="$p/$path"
38818             break
38819           fi
38820         done
38821         IFS="$IFS_save"
38822       else
38823         # This is an absolute path, we can use it without further modifications.
38824         new_path="$path"
38825       fi
38826 
38827       if test "x$new_path" = x; then
38828         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38829 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38830         has_space=`$ECHO "$complete" | $GREP " "`
38831         if test "x$has_space" != x; then
38832           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38833 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38834         fi
38835         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38836       fi
38837     fi
38838 
38839     # Now join together the path and the arguments once again
38840     if test "x$arguments" != xEOL; then
38841       new_complete="$new_path ${arguments% *}"
38842     else
38843       new_complete="$new_path"
38844     fi
38845 
38846     if test "x$complete" != "x$new_complete"; then
38847       MT="$new_complete"
38848       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38849 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38850     fi
38851   fi
38852 
38853     # Setup the resource compiler (RC)
38854     # Extract the first word of "rc", so it can be a program name with args.
38855 set dummy rc; ac_word=$2
38856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38857 $as_echo_n "checking for $ac_word... " >&6; }
38858 if ${ac_cv_prog_RC+:} false; then :
38859   $as_echo_n "(cached) " >&6
38860 else
38861   if test -n "$RC"; then
38862   ac_cv_prog_RC="$RC" # Let the user override the test.
38863 else
38864   ac_prog_rejected=no
38865 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38866 for as_dir in $PATH
38867 do
38868   IFS=$as_save_IFS
38869   test -z "$as_dir" && as_dir=.
38870     for ac_exec_ext in '' $ac_executable_extensions; do
38871   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38872     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38873        ac_prog_rejected=yes
38874        continue
38875      fi
38876     ac_cv_prog_RC="rc"
38877     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38878     break 2
38879   fi
38880 done
38881   done
38882 IFS=$as_save_IFS
38883 
38884 if test $ac_prog_rejected = yes; then
38885   # We found a bogon in the path, so make sure we never use it.
38886   set dummy $ac_cv_prog_RC
38887   shift
38888   if test $# != 0; then
38889     # We chose a different compiler from the bogus one.
38890     # However, it has the same basename, so the bogon will be chosen
38891     # first if we set RC to just the basename; use the full file name.
38892     shift
38893     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38894   fi
38895 fi
38896 fi
38897 fi
38898 RC=$ac_cv_prog_RC
38899 if test -n "$RC"; then
38900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38901 $as_echo "$RC" >&6; }
38902 else
38903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38904 $as_echo "no" >&6; }
38905 fi
38906 
38907 
38908 
38909   # Only process if variable expands to non-empty
38910 
38911   if test "x$RC" != x; then
38912     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38913 
38914   # First separate the path from the arguments. This will split at the first
38915   # space.
38916   complete="$RC"
38917   path="${complete%% *}"
38918   tmp="$complete EOL"
38919   arguments="${tmp#* }"
38920 
38921   # Input might be given as Windows format, start by converting to
38922   # unix format.
38923   new_path=`$CYGPATH -u "$path"`
38924 
38925   # Now try to locate executable using which
38926   new_path=`$WHICH "$new_path" 2> /dev/null`
38927   # bat and cmd files are not always considered executable in cygwin causing which
38928   # to not find them
38929   if test "x$new_path" = x \
38930       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38931       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38932     new_path=`$CYGPATH -u "$path"`
38933   fi
38934   if test "x$new_path" = x; then
38935     # Oops. Which didn't find the executable.
38936     # The splitting of arguments from the executable at a space might have been incorrect,
38937     # since paths with space are more likely in Windows. Give it another try with the whole
38938     # argument.
38939     path="$complete"
38940     arguments="EOL"
38941     new_path=`$CYGPATH -u "$path"`
38942     new_path=`$WHICH "$new_path" 2> /dev/null`
38943     # bat and cmd files are not always considered executable in cygwin causing which
38944     # to not find them
38945     if test "x$new_path" = x \
38946         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38947         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38948       new_path=`$CYGPATH -u "$path"`
38949     fi
38950     if test "x$new_path" = x; then
38951       # It's still not found. Now this is an unrecoverable error.
38952       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38953 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38954       has_space=`$ECHO "$complete" | $GREP " "`
38955       if test "x$has_space" != x; then
38956         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38957 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38958       fi
38959       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38960     fi
38961   fi
38962 
38963   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38964   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38965   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38966   # "foo.exe" is OK but "foo" is an error.
38967   #
38968   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38969   # It is also a way to make sure we got the proper file name for the real test later on.
38970   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38971   if test "x$test_shortpath" = x; then
38972     # Short path failed, file does not exist as specified.
38973     # Try adding .exe or .cmd
38974     if test -f "${new_path}.exe"; then
38975       input_to_shortpath="${new_path}.exe"
38976     elif test -f "${new_path}.cmd"; then
38977       input_to_shortpath="${new_path}.cmd"
38978     else
38979       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38980 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38981       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38982 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38983       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38984     fi
38985   else
38986     input_to_shortpath="$new_path"
38987   fi
38988 
38989   # Call helper function which possibly converts this using DOS-style short mode.
38990   # If so, the updated path is stored in $new_path.
38991   new_path="$input_to_shortpath"
38992 
38993   input_path="$input_to_shortpath"
38994   # Check if we need to convert this using DOS-style short mode. If the path
38995   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38996   # take no chances and rewrite it.
38997   # Note: m4 eats our [], so we need to use [ and ] instead.
38998   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38999   if test "x$has_forbidden_chars" != x; then
39000     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39001     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39002     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39003     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39004       # Going to short mode and back again did indeed matter. Since short mode is
39005       # case insensitive, let's make it lowercase to improve readability.
39006       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39007       # Now convert it back to Unix-style (cygpath)
39008       input_path=`$CYGPATH -u "$shortmode_path"`
39009       new_path="$input_path"
39010     fi
39011   fi
39012 
39013   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39014   if test "x$test_cygdrive_prefix" = x; then
39015     # As a simple fix, exclude /usr/bin since it's not a real path.
39016     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39017       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39018       # a path prefixed by /cygdrive for fixpath to work.
39019       new_path="$CYGWIN_ROOT_PATH$input_path"
39020     fi
39021   fi
39022 
39023   # remove trailing .exe if any
39024   new_path="${new_path/%.exe/}"
39025 
39026     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39027 
39028   # First separate the path from the arguments. This will split at the first
39029   # space.
39030   complete="$RC"
39031   path="${complete%% *}"
39032   tmp="$complete EOL"
39033   arguments="${tmp#* }"
39034 
39035   # Input might be given as Windows format, start by converting to
39036   # unix format.
39037   new_path="$path"
39038 
39039   windows_path="$new_path"
39040   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39041     unix_path=`$CYGPATH -u "$windows_path"`
39042     new_path="$unix_path"
39043   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39044     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39045     new_path="$unix_path"
39046   fi
39047 
39048 
39049   # Now try to locate executable using which
39050   new_path=`$WHICH "$new_path" 2> /dev/null`
39051 
39052   if test "x$new_path" = x; then
39053     # Oops. Which didn't find the executable.
39054     # The splitting of arguments from the executable at a space might have been incorrect,
39055     # since paths with space are more likely in Windows. Give it another try with the whole
39056     # argument.
39057     path="$complete"
39058     arguments="EOL"
39059     new_path="$path"
39060 
39061   windows_path="$new_path"
39062   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39063     unix_path=`$CYGPATH -u "$windows_path"`
39064     new_path="$unix_path"
39065   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39066     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39067     new_path="$unix_path"
39068   fi
39069 
39070 
39071     new_path=`$WHICH "$new_path" 2> /dev/null`
39072     # bat and cmd files are not always considered executable in MSYS causing which
39073     # to not find them
39074     if test "x$new_path" = x \
39075         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39076         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39077       new_path="$path"
39078 
39079   windows_path="$new_path"
39080   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39081     unix_path=`$CYGPATH -u "$windows_path"`
39082     new_path="$unix_path"
39083   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39084     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39085     new_path="$unix_path"
39086   fi
39087 
39088     fi
39089 
39090     if test "x$new_path" = x; then
39091       # It's still not found. Now this is an unrecoverable error.
39092       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39093 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39094       has_space=`$ECHO "$complete" | $GREP " "`
39095       if test "x$has_space" != x; then
39096         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39097 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39098       fi
39099       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39100     fi
39101   fi
39102 
39103   # Now new_path has a complete unix path to the binary
39104   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39105     # Keep paths in /bin as-is, but remove trailing .exe if any
39106     new_path="${new_path/%.exe/}"
39107     # Do not save /bin paths to all_fixpath_prefixes!
39108   else
39109     # Not in mixed or Windows style, start by that.
39110     new_path=`cmd //c echo $new_path`
39111 
39112   input_path="$new_path"
39113   # Check if we need to convert this using DOS-style short mode. If the path
39114   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39115   # take no chances and rewrite it.
39116   # Note: m4 eats our [], so we need to use [ and ] instead.
39117   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39118   if test "x$has_forbidden_chars" != x; then
39119     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39120     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39121   fi
39122 
39123     # Output is in $new_path
39124 
39125   windows_path="$new_path"
39126   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39127     unix_path=`$CYGPATH -u "$windows_path"`
39128     new_path="$unix_path"
39129   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39130     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39131     new_path="$unix_path"
39132   fi
39133 
39134     # remove trailing .exe if any
39135     new_path="${new_path/%.exe/}"
39136 
39137     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39138     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39139   fi
39140 
39141     else
39142       # We're on a unix platform. Hooray! :)
39143       # First separate the path from the arguments. This will split at the first
39144       # space.
39145       complete="$RC"
39146       path="${complete%% *}"
39147       tmp="$complete EOL"
39148       arguments="${tmp#* }"
39149 
39150       # Cannot rely on the command "which" here since it doesn't always work.
39151       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39152       if test -z "$is_absolute_path"; then
39153         # Path to executable is not absolute. Find it.
39154         IFS_save="$IFS"
39155         IFS=:
39156         for p in $PATH; do
39157           if test -f "$p/$path" && test -x "$p/$path"; then
39158             new_path="$p/$path"
39159             break
39160           fi
39161         done
39162         IFS="$IFS_save"
39163       else
39164         # This is an absolute path, we can use it without further modifications.
39165         new_path="$path"
39166       fi
39167 
39168       if test "x$new_path" = x; then
39169         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39170 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39171         has_space=`$ECHO "$complete" | $GREP " "`
39172         if test "x$has_space" != x; then
39173           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39174 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39175         fi
39176         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39177       fi
39178     fi
39179 
39180     # Now join together the path and the arguments once again
39181     if test "x$arguments" != xEOL; then
39182       new_complete="$new_path ${arguments% *}"
39183     else
39184       new_complete="$new_path"
39185     fi
39186 
39187     if test "x$complete" != "x$new_complete"; then
39188       RC="$new_complete"
39189       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39190 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39191     fi
39192   fi
39193 
39194     # Extract the first word of "dumpbin", so it can be a program name with args.
39195 set dummy dumpbin; ac_word=$2
39196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39197 $as_echo_n "checking for $ac_word... " >&6; }
39198 if ${ac_cv_prog_DUMPBIN+:} false; then :
39199   $as_echo_n "(cached) " >&6
39200 else
39201   if test -n "$DUMPBIN"; then
39202   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39203 else
39204 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39205 for as_dir in $PATH
39206 do
39207   IFS=$as_save_IFS
39208   test -z "$as_dir" && as_dir=.
39209     for ac_exec_ext in '' $ac_executable_extensions; do
39210   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39211     ac_cv_prog_DUMPBIN="dumpbin"
39212     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39213     break 2
39214   fi
39215 done
39216   done
39217 IFS=$as_save_IFS
39218 
39219 fi
39220 fi
39221 DUMPBIN=$ac_cv_prog_DUMPBIN
39222 if test -n "$DUMPBIN"; then
39223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39224 $as_echo "$DUMPBIN" >&6; }
39225 else
39226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39227 $as_echo "no" >&6; }
39228 fi
39229 
39230 
39231 
39232   # Only process if variable expands to non-empty
39233 
39234   if test "x$DUMPBIN" != x; then
39235     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39236 
39237   # First separate the path from the arguments. This will split at the first
39238   # space.
39239   complete="$DUMPBIN"
39240   path="${complete%% *}"
39241   tmp="$complete EOL"
39242   arguments="${tmp#* }"
39243 
39244   # Input might be given as Windows format, start by converting to
39245   # unix format.
39246   new_path=`$CYGPATH -u "$path"`
39247 
39248   # Now try to locate executable using which
39249   new_path=`$WHICH "$new_path" 2> /dev/null`
39250   # bat and cmd files are not always considered executable in cygwin causing which
39251   # to not find them
39252   if test "x$new_path" = x \
39253       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39254       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39255     new_path=`$CYGPATH -u "$path"`
39256   fi
39257   if test "x$new_path" = x; then
39258     # Oops. Which didn't find the executable.
39259     # The splitting of arguments from the executable at a space might have been incorrect,
39260     # since paths with space are more likely in Windows. Give it another try with the whole
39261     # argument.
39262     path="$complete"
39263     arguments="EOL"
39264     new_path=`$CYGPATH -u "$path"`
39265     new_path=`$WHICH "$new_path" 2> /dev/null`
39266     # bat and cmd files are not always considered executable in cygwin causing which
39267     # to not find them
39268     if test "x$new_path" = x \
39269         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39270         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39271       new_path=`$CYGPATH -u "$path"`
39272     fi
39273     if test "x$new_path" = x; then
39274       # It's still not found. Now this is an unrecoverable error.
39275       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39276 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39277       has_space=`$ECHO "$complete" | $GREP " "`
39278       if test "x$has_space" != x; then
39279         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39280 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39281       fi
39282       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39283     fi
39284   fi
39285 
39286   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39287   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39288   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39289   # "foo.exe" is OK but "foo" is an error.
39290   #
39291   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39292   # It is also a way to make sure we got the proper file name for the real test later on.
39293   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39294   if test "x$test_shortpath" = x; then
39295     # Short path failed, file does not exist as specified.
39296     # Try adding .exe or .cmd
39297     if test -f "${new_path}.exe"; then
39298       input_to_shortpath="${new_path}.exe"
39299     elif test -f "${new_path}.cmd"; then
39300       input_to_shortpath="${new_path}.cmd"
39301     else
39302       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39303 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39304       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39305 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39306       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39307     fi
39308   else
39309     input_to_shortpath="$new_path"
39310   fi
39311 
39312   # Call helper function which possibly converts this using DOS-style short mode.
39313   # If so, the updated path is stored in $new_path.
39314   new_path="$input_to_shortpath"
39315 
39316   input_path="$input_to_shortpath"
39317   # Check if we need to convert this using DOS-style short mode. If the path
39318   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39319   # take no chances and rewrite it.
39320   # Note: m4 eats our [], so we need to use [ and ] instead.
39321   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39322   if test "x$has_forbidden_chars" != x; then
39323     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39324     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39325     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39326     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39327       # Going to short mode and back again did indeed matter. Since short mode is
39328       # case insensitive, let's make it lowercase to improve readability.
39329       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39330       # Now convert it back to Unix-style (cygpath)
39331       input_path=`$CYGPATH -u "$shortmode_path"`
39332       new_path="$input_path"
39333     fi
39334   fi
39335 
39336   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39337   if test "x$test_cygdrive_prefix" = x; then
39338     # As a simple fix, exclude /usr/bin since it's not a real path.
39339     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39340       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39341       # a path prefixed by /cygdrive for fixpath to work.
39342       new_path="$CYGWIN_ROOT_PATH$input_path"
39343     fi
39344   fi
39345 
39346   # remove trailing .exe if any
39347   new_path="${new_path/%.exe/}"
39348 
39349     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39350 
39351   # First separate the path from the arguments. This will split at the first
39352   # space.
39353   complete="$DUMPBIN"
39354   path="${complete%% *}"
39355   tmp="$complete EOL"
39356   arguments="${tmp#* }"
39357 
39358   # Input might be given as Windows format, start by converting to
39359   # unix format.
39360   new_path="$path"
39361 
39362   windows_path="$new_path"
39363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39364     unix_path=`$CYGPATH -u "$windows_path"`
39365     new_path="$unix_path"
39366   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39367     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39368     new_path="$unix_path"
39369   fi
39370 
39371 
39372   # Now try to locate executable using which
39373   new_path=`$WHICH "$new_path" 2> /dev/null`
39374 
39375   if test "x$new_path" = x; then
39376     # Oops. Which didn't find the executable.
39377     # The splitting of arguments from the executable at a space might have been incorrect,
39378     # since paths with space are more likely in Windows. Give it another try with the whole
39379     # argument.
39380     path="$complete"
39381     arguments="EOL"
39382     new_path="$path"
39383 
39384   windows_path="$new_path"
39385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39386     unix_path=`$CYGPATH -u "$windows_path"`
39387     new_path="$unix_path"
39388   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39389     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39390     new_path="$unix_path"
39391   fi
39392 
39393 
39394     new_path=`$WHICH "$new_path" 2> /dev/null`
39395     # bat and cmd files are not always considered executable in MSYS causing which
39396     # to not find them
39397     if test "x$new_path" = x \
39398         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39399         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39400       new_path="$path"
39401 
39402   windows_path="$new_path"
39403   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39404     unix_path=`$CYGPATH -u "$windows_path"`
39405     new_path="$unix_path"
39406   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39407     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39408     new_path="$unix_path"
39409   fi
39410 
39411     fi
39412 
39413     if test "x$new_path" = x; then
39414       # It's still not found. Now this is an unrecoverable error.
39415       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39416 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39417       has_space=`$ECHO "$complete" | $GREP " "`
39418       if test "x$has_space" != x; then
39419         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39420 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39421       fi
39422       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39423     fi
39424   fi
39425 
39426   # Now new_path has a complete unix path to the binary
39427   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39428     # Keep paths in /bin as-is, but remove trailing .exe if any
39429     new_path="${new_path/%.exe/}"
39430     # Do not save /bin paths to all_fixpath_prefixes!
39431   else
39432     # Not in mixed or Windows style, start by that.
39433     new_path=`cmd //c echo $new_path`
39434 
39435   input_path="$new_path"
39436   # Check if we need to convert this using DOS-style short mode. If the path
39437   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39438   # take no chances and rewrite it.
39439   # Note: m4 eats our [], so we need to use [ and ] instead.
39440   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39441   if test "x$has_forbidden_chars" != x; then
39442     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39443     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39444   fi
39445 
39446     # Output is in $new_path
39447 
39448   windows_path="$new_path"
39449   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39450     unix_path=`$CYGPATH -u "$windows_path"`
39451     new_path="$unix_path"
39452   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39453     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39454     new_path="$unix_path"
39455   fi
39456 
39457     # remove trailing .exe if any
39458     new_path="${new_path/%.exe/}"
39459 
39460     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39461     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39462   fi
39463 
39464     else
39465       # We're on a unix platform. Hooray! :)
39466       # First separate the path from the arguments. This will split at the first
39467       # space.
39468       complete="$DUMPBIN"
39469       path="${complete%% *}"
39470       tmp="$complete EOL"
39471       arguments="${tmp#* }"
39472 
39473       # Cannot rely on the command "which" here since it doesn't always work.
39474       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39475       if test -z "$is_absolute_path"; then
39476         # Path to executable is not absolute. Find it.
39477         IFS_save="$IFS"
39478         IFS=:
39479         for p in $PATH; do
39480           if test -f "$p/$path" && test -x "$p/$path"; then
39481             new_path="$p/$path"
39482             break
39483           fi
39484         done
39485         IFS="$IFS_save"
39486       else
39487         # This is an absolute path, we can use it without further modifications.
39488         new_path="$path"
39489       fi
39490 
39491       if test "x$new_path" = x; then
39492         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39493 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39494         has_space=`$ECHO "$complete" | $GREP " "`
39495         if test "x$has_space" != x; then
39496           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39497 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39498         fi
39499         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39500       fi
39501     fi
39502 
39503     # Now join together the path and the arguments once again
39504     if test "x$arguments" != xEOL; then
39505       new_complete="$new_path ${arguments% *}"
39506     else
39507       new_complete="$new_path"
39508     fi
39509 
39510     if test "x$complete" != "x$new_complete"; then
39511       DUMPBIN="$new_complete"
39512       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39513 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39514     fi
39515   fi
39516 
39517     # We need to check for 'msbuild.exe' because at the place where we expect to
39518     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39519     # won't find the 'msbuild.exe' executable in that case (and the
39520     # 'ac_executable_extensions' is unusable due to performance reasons).
39521     # Notice that we intentionally don't fix up the path to MSBUILD because we
39522     # will call it in a DOS shell during freetype detection on Windows (see
39523     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39524     # Extract the first word of "msbuild.exe", so it can be a program name with args.
39525 set dummy msbuild.exe; ac_word=$2
39526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39527 $as_echo_n "checking for $ac_word... " >&6; }
39528 if ${ac_cv_prog_MSBUILD+:} false; then :
39529   $as_echo_n "(cached) " >&6
39530 else
39531   if test -n "$MSBUILD"; then
39532   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39533 else
39534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39535 for as_dir in $PATH
39536 do
39537   IFS=$as_save_IFS
39538   test -z "$as_dir" && as_dir=.
39539     for ac_exec_ext in '' $ac_executable_extensions; do
39540   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39541     ac_cv_prog_MSBUILD="msbuild.exe"
39542     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39543     break 2
39544   fi
39545 done
39546   done
39547 IFS=$as_save_IFS
39548 
39549 fi
39550 fi
39551 MSBUILD=$ac_cv_prog_MSBUILD
39552 if test -n "$MSBUILD"; then
39553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39554 $as_echo "$MSBUILD" >&6; }
39555 else
39556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39557 $as_echo "no" >&6; }
39558 fi
39559 
39560 
39561   fi
39562 
39563   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39564 
39565 
39566   # Publish this variable in the help.
39567 
39568 
39569   if [ -z "${STRIP+x}" ]; then
39570     # The variable is not set by user, try to locate tool using the code snippet
39571     for ac_prog in strip
39572 do
39573   # Extract the first word of "$ac_prog", so it can be a program name with args.
39574 set dummy $ac_prog; ac_word=$2
39575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39576 $as_echo_n "checking for $ac_word... " >&6; }
39577 if ${ac_cv_path_STRIP+:} false; then :
39578   $as_echo_n "(cached) " >&6
39579 else
39580   case $STRIP in
39581   [\\/]* | ?:[\\/]*)
39582   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39583   ;;
39584   *)
39585   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39586 for as_dir in $PATH
39587 do
39588   IFS=$as_save_IFS
39589   test -z "$as_dir" && as_dir=.
39590     for ac_exec_ext in '' $ac_executable_extensions; do
39591   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39592     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39593     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39594     break 2
39595   fi
39596 done
39597   done
39598 IFS=$as_save_IFS
39599 
39600   ;;
39601 esac
39602 fi
39603 STRIP=$ac_cv_path_STRIP
39604 if test -n "$STRIP"; then
39605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39606 $as_echo "$STRIP" >&6; }
39607 else
39608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39609 $as_echo "no" >&6; }
39610 fi
39611 
39612 
39613   test -n "$STRIP" && break
39614 done
39615 
39616   else
39617     # The variable is set, but is it from the command line or the environment?
39618 
39619     # Try to remove the string !STRIP! from our list.
39620     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39621     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39622       # If it failed, the variable was not from the command line. Ignore it,
39623       # but warn the user (except for BASH, which is always set by the calling BASH).
39624       if test "xSTRIP" != xBASH; then
39625         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39626 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39627       fi
39628       # Try to locate tool using the code snippet
39629       for ac_prog in strip
39630 do
39631   # Extract the first word of "$ac_prog", so it can be a program name with args.
39632 set dummy $ac_prog; ac_word=$2
39633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39634 $as_echo_n "checking for $ac_word... " >&6; }
39635 if ${ac_cv_path_STRIP+:} false; then :
39636   $as_echo_n "(cached) " >&6
39637 else
39638   case $STRIP in
39639   [\\/]* | ?:[\\/]*)
39640   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39641   ;;
39642   *)
39643   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39644 for as_dir in $PATH
39645 do
39646   IFS=$as_save_IFS
39647   test -z "$as_dir" && as_dir=.
39648     for ac_exec_ext in '' $ac_executable_extensions; do
39649   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39650     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39651     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39652     break 2
39653   fi
39654 done
39655   done
39656 IFS=$as_save_IFS
39657 
39658   ;;
39659 esac
39660 fi
39661 STRIP=$ac_cv_path_STRIP
39662 if test -n "$STRIP"; then
39663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39664 $as_echo "$STRIP" >&6; }
39665 else
39666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39667 $as_echo "no" >&6; }
39668 fi
39669 
39670 
39671   test -n "$STRIP" && break
39672 done
39673 
39674     else
39675       # If it succeeded, then it was overridden by the user. We will use it
39676       # for the tool.
39677 
39678       # First remove it from the list of overridden variables, so we can test
39679       # for unknown variables in the end.
39680       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39681 
39682       # Check if we try to supply an empty value
39683       if test "x$STRIP" = x; then
39684         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39685 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39686         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39687 $as_echo_n "checking for STRIP... " >&6; }
39688         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39689 $as_echo "disabled" >&6; }
39690       else
39691         # Check if the provided tool contains a complete path.
39692         tool_specified="$STRIP"
39693         tool_basename="${tool_specified##*/}"
39694         if test "x$tool_basename" = "x$tool_specified"; then
39695           # A command without a complete path is provided, search $PATH.
39696           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39697 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39698           # Extract the first word of "$tool_basename", so it can be a program name with args.
39699 set dummy $tool_basename; ac_word=$2
39700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39701 $as_echo_n "checking for $ac_word... " >&6; }
39702 if ${ac_cv_path_STRIP+:} false; then :
39703   $as_echo_n "(cached) " >&6
39704 else
39705   case $STRIP in
39706   [\\/]* | ?:[\\/]*)
39707   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39708   ;;
39709   *)
39710   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39711 for as_dir in $PATH
39712 do
39713   IFS=$as_save_IFS
39714   test -z "$as_dir" && as_dir=.
39715     for ac_exec_ext in '' $ac_executable_extensions; do
39716   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39717     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39718     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39719     break 2
39720   fi
39721 done
39722   done
39723 IFS=$as_save_IFS
39724 
39725   ;;
39726 esac
39727 fi
39728 STRIP=$ac_cv_path_STRIP
39729 if test -n "$STRIP"; then
39730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39731 $as_echo "$STRIP" >&6; }
39732 else
39733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39734 $as_echo "no" >&6; }
39735 fi
39736 
39737 
39738           if test "x$STRIP" = x; then
39739             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39740           fi
39741         else
39742           # Otherwise we believe it is a complete path. Use it as it is.
39743           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39744 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39745           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39746 $as_echo_n "checking for STRIP... " >&6; }
39747           if test ! -x "$tool_specified"; then
39748             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39749 $as_echo "not found" >&6; }
39750             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39751           fi
39752           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39753 $as_echo "$tool_specified" >&6; }
39754         fi
39755       fi
39756     fi
39757 
39758   fi
39759 
39760 
39761 
39762   # Only process if variable expands to non-empty
39763 
39764   if test "x$STRIP" != x; then
39765     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39766 
39767   # First separate the path from the arguments. This will split at the first
39768   # space.
39769   complete="$STRIP"
39770   path="${complete%% *}"
39771   tmp="$complete EOL"
39772   arguments="${tmp#* }"
39773 
39774   # Input might be given as Windows format, start by converting to
39775   # unix format.
39776   new_path=`$CYGPATH -u "$path"`
39777 
39778   # Now try to locate executable using which
39779   new_path=`$WHICH "$new_path" 2> /dev/null`
39780   # bat and cmd files are not always considered executable in cygwin causing which
39781   # to not find them
39782   if test "x$new_path" = x \
39783       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39784       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39785     new_path=`$CYGPATH -u "$path"`
39786   fi
39787   if test "x$new_path" = x; then
39788     # Oops. Which didn't find the executable.
39789     # The splitting of arguments from the executable at a space might have been incorrect,
39790     # since paths with space are more likely in Windows. Give it another try with the whole
39791     # argument.
39792     path="$complete"
39793     arguments="EOL"
39794     new_path=`$CYGPATH -u "$path"`
39795     new_path=`$WHICH "$new_path" 2> /dev/null`
39796     # bat and cmd files are not always considered executable in cygwin causing which
39797     # to not find them
39798     if test "x$new_path" = x \
39799         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39800         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39801       new_path=`$CYGPATH -u "$path"`
39802     fi
39803     if test "x$new_path" = x; then
39804       # It's still not found. Now this is an unrecoverable error.
39805       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39806 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39807       has_space=`$ECHO "$complete" | $GREP " "`
39808       if test "x$has_space" != x; then
39809         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39810 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39811       fi
39812       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39813     fi
39814   fi
39815 
39816   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39817   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39818   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39819   # "foo.exe" is OK but "foo" is an error.
39820   #
39821   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39822   # It is also a way to make sure we got the proper file name for the real test later on.
39823   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39824   if test "x$test_shortpath" = x; then
39825     # Short path failed, file does not exist as specified.
39826     # Try adding .exe or .cmd
39827     if test -f "${new_path}.exe"; then
39828       input_to_shortpath="${new_path}.exe"
39829     elif test -f "${new_path}.cmd"; then
39830       input_to_shortpath="${new_path}.cmd"
39831     else
39832       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39833 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39834       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39835 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39836       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39837     fi
39838   else
39839     input_to_shortpath="$new_path"
39840   fi
39841 
39842   # Call helper function which possibly converts this using DOS-style short mode.
39843   # If so, the updated path is stored in $new_path.
39844   new_path="$input_to_shortpath"
39845 
39846   input_path="$input_to_shortpath"
39847   # Check if we need to convert this using DOS-style short mode. If the path
39848   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39849   # take no chances and rewrite it.
39850   # Note: m4 eats our [], so we need to use [ and ] instead.
39851   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39852   if test "x$has_forbidden_chars" != x; then
39853     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39854     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39855     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39856     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39857       # Going to short mode and back again did indeed matter. Since short mode is
39858       # case insensitive, let's make it lowercase to improve readability.
39859       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39860       # Now convert it back to Unix-style (cygpath)
39861       input_path=`$CYGPATH -u "$shortmode_path"`
39862       new_path="$input_path"
39863     fi
39864   fi
39865 
39866   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39867   if test "x$test_cygdrive_prefix" = x; then
39868     # As a simple fix, exclude /usr/bin since it's not a real path.
39869     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39870       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39871       # a path prefixed by /cygdrive for fixpath to work.
39872       new_path="$CYGWIN_ROOT_PATH$input_path"
39873     fi
39874   fi
39875 
39876   # remove trailing .exe if any
39877   new_path="${new_path/%.exe/}"
39878 
39879     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39880 
39881   # First separate the path from the arguments. This will split at the first
39882   # space.
39883   complete="$STRIP"
39884   path="${complete%% *}"
39885   tmp="$complete EOL"
39886   arguments="${tmp#* }"
39887 
39888   # Input might be given as Windows format, start by converting to
39889   # unix format.
39890   new_path="$path"
39891 
39892   windows_path="$new_path"
39893   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39894     unix_path=`$CYGPATH -u "$windows_path"`
39895     new_path="$unix_path"
39896   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39897     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39898     new_path="$unix_path"
39899   fi
39900 
39901 
39902   # Now try to locate executable using which
39903   new_path=`$WHICH "$new_path" 2> /dev/null`
39904 
39905   if test "x$new_path" = x; then
39906     # Oops. Which didn't find the executable.
39907     # The splitting of arguments from the executable at a space might have been incorrect,
39908     # since paths with space are more likely in Windows. Give it another try with the whole
39909     # argument.
39910     path="$complete"
39911     arguments="EOL"
39912     new_path="$path"
39913 
39914   windows_path="$new_path"
39915   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39916     unix_path=`$CYGPATH -u "$windows_path"`
39917     new_path="$unix_path"
39918   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39919     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39920     new_path="$unix_path"
39921   fi
39922 
39923 
39924     new_path=`$WHICH "$new_path" 2> /dev/null`
39925     # bat and cmd files are not always considered executable in MSYS causing which
39926     # to not find them
39927     if test "x$new_path" = x \
39928         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39929         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39930       new_path="$path"
39931 
39932   windows_path="$new_path"
39933   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39934     unix_path=`$CYGPATH -u "$windows_path"`
39935     new_path="$unix_path"
39936   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39937     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39938     new_path="$unix_path"
39939   fi
39940 
39941     fi
39942 
39943     if test "x$new_path" = x; then
39944       # It's still not found. Now this is an unrecoverable error.
39945       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39946 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39947       has_space=`$ECHO "$complete" | $GREP " "`
39948       if test "x$has_space" != x; then
39949         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39950 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39951       fi
39952       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39953     fi
39954   fi
39955 
39956   # Now new_path has a complete unix path to the binary
39957   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39958     # Keep paths in /bin as-is, but remove trailing .exe if any
39959     new_path="${new_path/%.exe/}"
39960     # Do not save /bin paths to all_fixpath_prefixes!
39961   else
39962     # Not in mixed or Windows style, start by that.
39963     new_path=`cmd //c echo $new_path`
39964 
39965   input_path="$new_path"
39966   # Check if we need to convert this using DOS-style short mode. If the path
39967   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39968   # take no chances and rewrite it.
39969   # Note: m4 eats our [], so we need to use [ and ] instead.
39970   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39971   if test "x$has_forbidden_chars" != x; then
39972     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39973     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39974   fi
39975 
39976     # Output is in $new_path
39977 
39978   windows_path="$new_path"
39979   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39980     unix_path=`$CYGPATH -u "$windows_path"`
39981     new_path="$unix_path"
39982   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39983     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39984     new_path="$unix_path"
39985   fi
39986 
39987     # remove trailing .exe if any
39988     new_path="${new_path/%.exe/}"
39989 
39990     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39991     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39992   fi
39993 
39994     else
39995       # We're on a unix platform. Hooray! :)
39996       # First separate the path from the arguments. This will split at the first
39997       # space.
39998       complete="$STRIP"
39999       path="${complete%% *}"
40000       tmp="$complete EOL"
40001       arguments="${tmp#* }"
40002 
40003       # Cannot rely on the command "which" here since it doesn't always work.
40004       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40005       if test -z "$is_absolute_path"; then
40006         # Path to executable is not absolute. Find it.
40007         IFS_save="$IFS"
40008         IFS=:
40009         for p in $PATH; do
40010           if test -f "$p/$path" && test -x "$p/$path"; then
40011             new_path="$p/$path"
40012             break
40013           fi
40014         done
40015         IFS="$IFS_save"
40016       else
40017         # This is an absolute path, we can use it without further modifications.
40018         new_path="$path"
40019       fi
40020 
40021       if test "x$new_path" = x; then
40022         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40023 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40024         has_space=`$ECHO "$complete" | $GREP " "`
40025         if test "x$has_space" != x; then
40026           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40027 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40028         fi
40029         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40030       fi
40031     fi
40032 
40033     # Now join together the path and the arguments once again
40034     if test "x$arguments" != xEOL; then
40035       new_complete="$new_path ${arguments% *}"
40036     else
40037       new_complete="$new_path"
40038     fi
40039 
40040     if test "x$complete" != "x$new_complete"; then
40041       STRIP="$new_complete"
40042       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40043 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40044     fi
40045   fi
40046 
40047 
40048 
40049   # Publish this variable in the help.
40050 
40051 
40052   if [ -z "${NM+x}" ]; then
40053     # The variable is not set by user, try to locate tool using the code snippet
40054     for ac_prog in nm
40055 do
40056   # Extract the first word of "$ac_prog", so it can be a program name with args.
40057 set dummy $ac_prog; ac_word=$2
40058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40059 $as_echo_n "checking for $ac_word... " >&6; }
40060 if ${ac_cv_path_NM+:} false; then :
40061   $as_echo_n "(cached) " >&6
40062 else
40063   case $NM in
40064   [\\/]* | ?:[\\/]*)
40065   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40066   ;;
40067   *)
40068   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40069 for as_dir in $PATH
40070 do
40071   IFS=$as_save_IFS
40072   test -z "$as_dir" && as_dir=.
40073     for ac_exec_ext in '' $ac_executable_extensions; do
40074   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40075     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40076     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40077     break 2
40078   fi
40079 done
40080   done
40081 IFS=$as_save_IFS
40082 
40083   ;;
40084 esac
40085 fi
40086 NM=$ac_cv_path_NM
40087 if test -n "$NM"; then
40088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40089 $as_echo "$NM" >&6; }
40090 else
40091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40092 $as_echo "no" >&6; }
40093 fi
40094 
40095 
40096   test -n "$NM" && break
40097 done
40098 
40099   else
40100     # The variable is set, but is it from the command line or the environment?
40101 
40102     # Try to remove the string !NM! from our list.
40103     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40104     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40105       # If it failed, the variable was not from the command line. Ignore it,
40106       # but warn the user (except for BASH, which is always set by the calling BASH).
40107       if test "xNM" != xBASH; then
40108         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40109 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40110       fi
40111       # Try to locate tool using the code snippet
40112       for ac_prog in nm
40113 do
40114   # Extract the first word of "$ac_prog", so it can be a program name with args.
40115 set dummy $ac_prog; ac_word=$2
40116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40117 $as_echo_n "checking for $ac_word... " >&6; }
40118 if ${ac_cv_path_NM+:} false; then :
40119   $as_echo_n "(cached) " >&6
40120 else
40121   case $NM in
40122   [\\/]* | ?:[\\/]*)
40123   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40124   ;;
40125   *)
40126   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40127 for as_dir in $PATH
40128 do
40129   IFS=$as_save_IFS
40130   test -z "$as_dir" && as_dir=.
40131     for ac_exec_ext in '' $ac_executable_extensions; do
40132   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40133     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40134     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40135     break 2
40136   fi
40137 done
40138   done
40139 IFS=$as_save_IFS
40140 
40141   ;;
40142 esac
40143 fi
40144 NM=$ac_cv_path_NM
40145 if test -n "$NM"; then
40146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40147 $as_echo "$NM" >&6; }
40148 else
40149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40150 $as_echo "no" >&6; }
40151 fi
40152 
40153 
40154   test -n "$NM" && break
40155 done
40156 
40157     else
40158       # If it succeeded, then it was overridden by the user. We will use it
40159       # for the tool.
40160 
40161       # First remove it from the list of overridden variables, so we can test
40162       # for unknown variables in the end.
40163       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40164 
40165       # Check if we try to supply an empty value
40166       if test "x$NM" = x; then
40167         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40168 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40169         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40170 $as_echo_n "checking for NM... " >&6; }
40171         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40172 $as_echo "disabled" >&6; }
40173       else
40174         # Check if the provided tool contains a complete path.
40175         tool_specified="$NM"
40176         tool_basename="${tool_specified##*/}"
40177         if test "x$tool_basename" = "x$tool_specified"; then
40178           # A command without a complete path is provided, search $PATH.
40179           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40180 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40181           # Extract the first word of "$tool_basename", so it can be a program name with args.
40182 set dummy $tool_basename; ac_word=$2
40183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40184 $as_echo_n "checking for $ac_word... " >&6; }
40185 if ${ac_cv_path_NM+:} false; then :
40186   $as_echo_n "(cached) " >&6
40187 else
40188   case $NM in
40189   [\\/]* | ?:[\\/]*)
40190   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40191   ;;
40192   *)
40193   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40194 for as_dir in $PATH
40195 do
40196   IFS=$as_save_IFS
40197   test -z "$as_dir" && as_dir=.
40198     for ac_exec_ext in '' $ac_executable_extensions; do
40199   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40200     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40201     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40202     break 2
40203   fi
40204 done
40205   done
40206 IFS=$as_save_IFS
40207 
40208   ;;
40209 esac
40210 fi
40211 NM=$ac_cv_path_NM
40212 if test -n "$NM"; then
40213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40214 $as_echo "$NM" >&6; }
40215 else
40216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40217 $as_echo "no" >&6; }
40218 fi
40219 
40220 
40221           if test "x$NM" = x; then
40222             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40223           fi
40224         else
40225           # Otherwise we believe it is a complete path. Use it as it is.
40226           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40227 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40228           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40229 $as_echo_n "checking for NM... " >&6; }
40230           if test ! -x "$tool_specified"; then
40231             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40232 $as_echo "not found" >&6; }
40233             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40234           fi
40235           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40236 $as_echo "$tool_specified" >&6; }
40237         fi
40238       fi
40239     fi
40240 
40241   fi
40242 
40243 
40244 
40245   # Only process if variable expands to non-empty
40246 
40247   if test "x$NM" != x; then
40248     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40249 
40250   # First separate the path from the arguments. This will split at the first
40251   # space.
40252   complete="$NM"
40253   path="${complete%% *}"
40254   tmp="$complete EOL"
40255   arguments="${tmp#* }"
40256 
40257   # Input might be given as Windows format, start by converting to
40258   # unix format.
40259   new_path=`$CYGPATH -u "$path"`
40260 
40261   # Now try to locate executable using which
40262   new_path=`$WHICH "$new_path" 2> /dev/null`
40263   # bat and cmd files are not always considered executable in cygwin causing which
40264   # to not find them
40265   if test "x$new_path" = x \
40266       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40267       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40268     new_path=`$CYGPATH -u "$path"`
40269   fi
40270   if test "x$new_path" = x; then
40271     # Oops. Which didn't find the executable.
40272     # The splitting of arguments from the executable at a space might have been incorrect,
40273     # since paths with space are more likely in Windows. Give it another try with the whole
40274     # argument.
40275     path="$complete"
40276     arguments="EOL"
40277     new_path=`$CYGPATH -u "$path"`
40278     new_path=`$WHICH "$new_path" 2> /dev/null`
40279     # bat and cmd files are not always considered executable in cygwin causing which
40280     # to not find them
40281     if test "x$new_path" = x \
40282         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40283         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40284       new_path=`$CYGPATH -u "$path"`
40285     fi
40286     if test "x$new_path" = x; then
40287       # It's still not found. Now this is an unrecoverable error.
40288       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40289 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40290       has_space=`$ECHO "$complete" | $GREP " "`
40291       if test "x$has_space" != x; then
40292         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40293 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40294       fi
40295       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40296     fi
40297   fi
40298 
40299   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40300   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40301   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40302   # "foo.exe" is OK but "foo" is an error.
40303   #
40304   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40305   # It is also a way to make sure we got the proper file name for the real test later on.
40306   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40307   if test "x$test_shortpath" = x; then
40308     # Short path failed, file does not exist as specified.
40309     # Try adding .exe or .cmd
40310     if test -f "${new_path}.exe"; then
40311       input_to_shortpath="${new_path}.exe"
40312     elif test -f "${new_path}.cmd"; then
40313       input_to_shortpath="${new_path}.cmd"
40314     else
40315       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40316 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40317       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40318 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40319       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40320     fi
40321   else
40322     input_to_shortpath="$new_path"
40323   fi
40324 
40325   # Call helper function which possibly converts this using DOS-style short mode.
40326   # If so, the updated path is stored in $new_path.
40327   new_path="$input_to_shortpath"
40328 
40329   input_path="$input_to_shortpath"
40330   # Check if we need to convert this using DOS-style short mode. If the path
40331   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40332   # take no chances and rewrite it.
40333   # Note: m4 eats our [], so we need to use [ and ] instead.
40334   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40335   if test "x$has_forbidden_chars" != x; then
40336     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40337     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40338     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40339     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40340       # Going to short mode and back again did indeed matter. Since short mode is
40341       # case insensitive, let's make it lowercase to improve readability.
40342       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40343       # Now convert it back to Unix-style (cygpath)
40344       input_path=`$CYGPATH -u "$shortmode_path"`
40345       new_path="$input_path"
40346     fi
40347   fi
40348 
40349   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40350   if test "x$test_cygdrive_prefix" = x; then
40351     # As a simple fix, exclude /usr/bin since it's not a real path.
40352     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40353       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40354       # a path prefixed by /cygdrive for fixpath to work.
40355       new_path="$CYGWIN_ROOT_PATH$input_path"
40356     fi
40357   fi
40358 
40359   # remove trailing .exe if any
40360   new_path="${new_path/%.exe/}"
40361 
40362     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40363 
40364   # First separate the path from the arguments. This will split at the first
40365   # space.
40366   complete="$NM"
40367   path="${complete%% *}"
40368   tmp="$complete EOL"
40369   arguments="${tmp#* }"
40370 
40371   # Input might be given as Windows format, start by converting to
40372   # unix format.
40373   new_path="$path"
40374 
40375   windows_path="$new_path"
40376   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40377     unix_path=`$CYGPATH -u "$windows_path"`
40378     new_path="$unix_path"
40379   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40380     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40381     new_path="$unix_path"
40382   fi
40383 
40384 
40385   # Now try to locate executable using which
40386   new_path=`$WHICH "$new_path" 2> /dev/null`
40387 
40388   if test "x$new_path" = x; then
40389     # Oops. Which didn't find the executable.
40390     # The splitting of arguments from the executable at a space might have been incorrect,
40391     # since paths with space are more likely in Windows. Give it another try with the whole
40392     # argument.
40393     path="$complete"
40394     arguments="EOL"
40395     new_path="$path"
40396 
40397   windows_path="$new_path"
40398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40399     unix_path=`$CYGPATH -u "$windows_path"`
40400     new_path="$unix_path"
40401   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40402     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40403     new_path="$unix_path"
40404   fi
40405 
40406 
40407     new_path=`$WHICH "$new_path" 2> /dev/null`
40408     # bat and cmd files are not always considered executable in MSYS causing which
40409     # to not find them
40410     if test "x$new_path" = x \
40411         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40412         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40413       new_path="$path"
40414 
40415   windows_path="$new_path"
40416   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40417     unix_path=`$CYGPATH -u "$windows_path"`
40418     new_path="$unix_path"
40419   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40420     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40421     new_path="$unix_path"
40422   fi
40423 
40424     fi
40425 
40426     if test "x$new_path" = x; then
40427       # It's still not found. Now this is an unrecoverable error.
40428       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40429 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40430       has_space=`$ECHO "$complete" | $GREP " "`
40431       if test "x$has_space" != x; then
40432         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40433 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40434       fi
40435       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40436     fi
40437   fi
40438 
40439   # Now new_path has a complete unix path to the binary
40440   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40441     # Keep paths in /bin as-is, but remove trailing .exe if any
40442     new_path="${new_path/%.exe/}"
40443     # Do not save /bin paths to all_fixpath_prefixes!
40444   else
40445     # Not in mixed or Windows style, start by that.
40446     new_path=`cmd //c echo $new_path`
40447 
40448   input_path="$new_path"
40449   # Check if we need to convert this using DOS-style short mode. If the path
40450   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40451   # take no chances and rewrite it.
40452   # Note: m4 eats our [], so we need to use [ and ] instead.
40453   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40454   if test "x$has_forbidden_chars" != x; then
40455     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40456     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40457   fi
40458 
40459     # Output is in $new_path
40460 
40461   windows_path="$new_path"
40462   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40463     unix_path=`$CYGPATH -u "$windows_path"`
40464     new_path="$unix_path"
40465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40466     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40467     new_path="$unix_path"
40468   fi
40469 
40470     # remove trailing .exe if any
40471     new_path="${new_path/%.exe/}"
40472 
40473     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40474     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40475   fi
40476 
40477     else
40478       # We're on a unix platform. Hooray! :)
40479       # First separate the path from the arguments. This will split at the first
40480       # space.
40481       complete="$NM"
40482       path="${complete%% *}"
40483       tmp="$complete EOL"
40484       arguments="${tmp#* }"
40485 
40486       # Cannot rely on the command "which" here since it doesn't always work.
40487       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40488       if test -z "$is_absolute_path"; then
40489         # Path to executable is not absolute. Find it.
40490         IFS_save="$IFS"
40491         IFS=:
40492         for p in $PATH; do
40493           if test -f "$p/$path" && test -x "$p/$path"; then
40494             new_path="$p/$path"
40495             break
40496           fi
40497         done
40498         IFS="$IFS_save"
40499       else
40500         # This is an absolute path, we can use it without further modifications.
40501         new_path="$path"
40502       fi
40503 
40504       if test "x$new_path" = x; then
40505         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40506 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40507         has_space=`$ECHO "$complete" | $GREP " "`
40508         if test "x$has_space" != x; then
40509           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40510 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40511         fi
40512         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40513       fi
40514     fi
40515 
40516     # Now join together the path and the arguments once again
40517     if test "x$arguments" != xEOL; then
40518       new_complete="$new_path ${arguments% *}"
40519     else
40520       new_complete="$new_path"
40521     fi
40522 
40523     if test "x$complete" != "x$new_complete"; then
40524       NM="$new_complete"
40525       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40526 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40527     fi
40528   fi
40529 
40530 
40531 
40532   # Publish this variable in the help.
40533 
40534 
40535   if [ -z "${GNM+x}" ]; then
40536     # The variable is not set by user, try to locate tool using the code snippet
40537     for ac_prog in gnm
40538 do
40539   # Extract the first word of "$ac_prog", so it can be a program name with args.
40540 set dummy $ac_prog; ac_word=$2
40541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40542 $as_echo_n "checking for $ac_word... " >&6; }
40543 if ${ac_cv_path_GNM+:} false; then :
40544   $as_echo_n "(cached) " >&6
40545 else
40546   case $GNM in
40547   [\\/]* | ?:[\\/]*)
40548   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40549   ;;
40550   *)
40551   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40552 for as_dir in $PATH
40553 do
40554   IFS=$as_save_IFS
40555   test -z "$as_dir" && as_dir=.
40556     for ac_exec_ext in '' $ac_executable_extensions; do
40557   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40558     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40559     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40560     break 2
40561   fi
40562 done
40563   done
40564 IFS=$as_save_IFS
40565 
40566   ;;
40567 esac
40568 fi
40569 GNM=$ac_cv_path_GNM
40570 if test -n "$GNM"; then
40571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40572 $as_echo "$GNM" >&6; }
40573 else
40574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40575 $as_echo "no" >&6; }
40576 fi
40577 
40578 
40579   test -n "$GNM" && break
40580 done
40581 
40582   else
40583     # The variable is set, but is it from the command line or the environment?
40584 
40585     # Try to remove the string !GNM! from our list.
40586     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40587     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40588       # If it failed, the variable was not from the command line. Ignore it,
40589       # but warn the user (except for BASH, which is always set by the calling BASH).
40590       if test "xGNM" != xBASH; then
40591         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40592 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40593       fi
40594       # Try to locate tool using the code snippet
40595       for ac_prog in gnm
40596 do
40597   # Extract the first word of "$ac_prog", so it can be a program name with args.
40598 set dummy $ac_prog; ac_word=$2
40599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40600 $as_echo_n "checking for $ac_word... " >&6; }
40601 if ${ac_cv_path_GNM+:} false; then :
40602   $as_echo_n "(cached) " >&6
40603 else
40604   case $GNM in
40605   [\\/]* | ?:[\\/]*)
40606   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40607   ;;
40608   *)
40609   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40610 for as_dir in $PATH
40611 do
40612   IFS=$as_save_IFS
40613   test -z "$as_dir" && as_dir=.
40614     for ac_exec_ext in '' $ac_executable_extensions; do
40615   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40616     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40618     break 2
40619   fi
40620 done
40621   done
40622 IFS=$as_save_IFS
40623 
40624   ;;
40625 esac
40626 fi
40627 GNM=$ac_cv_path_GNM
40628 if test -n "$GNM"; then
40629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40630 $as_echo "$GNM" >&6; }
40631 else
40632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40633 $as_echo "no" >&6; }
40634 fi
40635 
40636 
40637   test -n "$GNM" && break
40638 done
40639 
40640     else
40641       # If it succeeded, then it was overridden by the user. We will use it
40642       # for the tool.
40643 
40644       # First remove it from the list of overridden variables, so we can test
40645       # for unknown variables in the end.
40646       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40647 
40648       # Check if we try to supply an empty value
40649       if test "x$GNM" = x; then
40650         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40651 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40652         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40653 $as_echo_n "checking for GNM... " >&6; }
40654         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40655 $as_echo "disabled" >&6; }
40656       else
40657         # Check if the provided tool contains a complete path.
40658         tool_specified="$GNM"
40659         tool_basename="${tool_specified##*/}"
40660         if test "x$tool_basename" = "x$tool_specified"; then
40661           # A command without a complete path is provided, search $PATH.
40662           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40663 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40664           # Extract the first word of "$tool_basename", so it can be a program name with args.
40665 set dummy $tool_basename; ac_word=$2
40666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40667 $as_echo_n "checking for $ac_word... " >&6; }
40668 if ${ac_cv_path_GNM+:} false; then :
40669   $as_echo_n "(cached) " >&6
40670 else
40671   case $GNM in
40672   [\\/]* | ?:[\\/]*)
40673   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40674   ;;
40675   *)
40676   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40677 for as_dir in $PATH
40678 do
40679   IFS=$as_save_IFS
40680   test -z "$as_dir" && as_dir=.
40681     for ac_exec_ext in '' $ac_executable_extensions; do
40682   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40683     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40684     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40685     break 2
40686   fi
40687 done
40688   done
40689 IFS=$as_save_IFS
40690 
40691   ;;
40692 esac
40693 fi
40694 GNM=$ac_cv_path_GNM
40695 if test -n "$GNM"; then
40696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40697 $as_echo "$GNM" >&6; }
40698 else
40699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40700 $as_echo "no" >&6; }
40701 fi
40702 
40703 
40704           if test "x$GNM" = x; then
40705             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40706           fi
40707         else
40708           # Otherwise we believe it is a complete path. Use it as it is.
40709           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40710 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40711           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40712 $as_echo_n "checking for GNM... " >&6; }
40713           if test ! -x "$tool_specified"; then
40714             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40715 $as_echo "not found" >&6; }
40716             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40717           fi
40718           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40719 $as_echo "$tool_specified" >&6; }
40720         fi
40721       fi
40722     fi
40723 
40724   fi
40725 
40726 
40727 
40728   # Only process if variable expands to non-empty
40729 
40730   if test "x$GNM" != x; then
40731     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40732 
40733   # First separate the path from the arguments. This will split at the first
40734   # space.
40735   complete="$GNM"
40736   path="${complete%% *}"
40737   tmp="$complete EOL"
40738   arguments="${tmp#* }"
40739 
40740   # Input might be given as Windows format, start by converting to
40741   # unix format.
40742   new_path=`$CYGPATH -u "$path"`
40743 
40744   # Now try to locate executable using which
40745   new_path=`$WHICH "$new_path" 2> /dev/null`
40746   # bat and cmd files are not always considered executable in cygwin causing which
40747   # to not find them
40748   if test "x$new_path" = x \
40749       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40750       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40751     new_path=`$CYGPATH -u "$path"`
40752   fi
40753   if test "x$new_path" = x; then
40754     # Oops. Which didn't find the executable.
40755     # The splitting of arguments from the executable at a space might have been incorrect,
40756     # since paths with space are more likely in Windows. Give it another try with the whole
40757     # argument.
40758     path="$complete"
40759     arguments="EOL"
40760     new_path=`$CYGPATH -u "$path"`
40761     new_path=`$WHICH "$new_path" 2> /dev/null`
40762     # bat and cmd files are not always considered executable in cygwin causing which
40763     # to not find them
40764     if test "x$new_path" = x \
40765         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40766         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40767       new_path=`$CYGPATH -u "$path"`
40768     fi
40769     if test "x$new_path" = x; then
40770       # It's still not found. Now this is an unrecoverable error.
40771       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40772 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40773       has_space=`$ECHO "$complete" | $GREP " "`
40774       if test "x$has_space" != x; then
40775         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40776 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40777       fi
40778       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40779     fi
40780   fi
40781 
40782   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40783   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40784   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40785   # "foo.exe" is OK but "foo" is an error.
40786   #
40787   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40788   # It is also a way to make sure we got the proper file name for the real test later on.
40789   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40790   if test "x$test_shortpath" = x; then
40791     # Short path failed, file does not exist as specified.
40792     # Try adding .exe or .cmd
40793     if test -f "${new_path}.exe"; then
40794       input_to_shortpath="${new_path}.exe"
40795     elif test -f "${new_path}.cmd"; then
40796       input_to_shortpath="${new_path}.cmd"
40797     else
40798       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40799 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40800       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40801 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40802       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40803     fi
40804   else
40805     input_to_shortpath="$new_path"
40806   fi
40807 
40808   # Call helper function which possibly converts this using DOS-style short mode.
40809   # If so, the updated path is stored in $new_path.
40810   new_path="$input_to_shortpath"
40811 
40812   input_path="$input_to_shortpath"
40813   # Check if we need to convert this using DOS-style short mode. If the path
40814   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40815   # take no chances and rewrite it.
40816   # Note: m4 eats our [], so we need to use [ and ] instead.
40817   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40818   if test "x$has_forbidden_chars" != x; then
40819     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40820     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40821     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40822     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40823       # Going to short mode and back again did indeed matter. Since short mode is
40824       # case insensitive, let's make it lowercase to improve readability.
40825       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40826       # Now convert it back to Unix-style (cygpath)
40827       input_path=`$CYGPATH -u "$shortmode_path"`
40828       new_path="$input_path"
40829     fi
40830   fi
40831 
40832   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40833   if test "x$test_cygdrive_prefix" = x; then
40834     # As a simple fix, exclude /usr/bin since it's not a real path.
40835     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40836       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40837       # a path prefixed by /cygdrive for fixpath to work.
40838       new_path="$CYGWIN_ROOT_PATH$input_path"
40839     fi
40840   fi
40841 
40842   # remove trailing .exe if any
40843   new_path="${new_path/%.exe/}"
40844 
40845     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40846 
40847   # First separate the path from the arguments. This will split at the first
40848   # space.
40849   complete="$GNM"
40850   path="${complete%% *}"
40851   tmp="$complete EOL"
40852   arguments="${tmp#* }"
40853 
40854   # Input might be given as Windows format, start by converting to
40855   # unix format.
40856   new_path="$path"
40857 
40858   windows_path="$new_path"
40859   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40860     unix_path=`$CYGPATH -u "$windows_path"`
40861     new_path="$unix_path"
40862   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40863     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40864     new_path="$unix_path"
40865   fi
40866 
40867 
40868   # Now try to locate executable using which
40869   new_path=`$WHICH "$new_path" 2> /dev/null`
40870 
40871   if test "x$new_path" = x; then
40872     # Oops. Which didn't find the executable.
40873     # The splitting of arguments from the executable at a space might have been incorrect,
40874     # since paths with space are more likely in Windows. Give it another try with the whole
40875     # argument.
40876     path="$complete"
40877     arguments="EOL"
40878     new_path="$path"
40879 
40880   windows_path="$new_path"
40881   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40882     unix_path=`$CYGPATH -u "$windows_path"`
40883     new_path="$unix_path"
40884   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40885     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40886     new_path="$unix_path"
40887   fi
40888 
40889 
40890     new_path=`$WHICH "$new_path" 2> /dev/null`
40891     # bat and cmd files are not always considered executable in MSYS causing which
40892     # to not find them
40893     if test "x$new_path" = x \
40894         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40895         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40896       new_path="$path"
40897 
40898   windows_path="$new_path"
40899   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40900     unix_path=`$CYGPATH -u "$windows_path"`
40901     new_path="$unix_path"
40902   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40903     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40904     new_path="$unix_path"
40905   fi
40906 
40907     fi
40908 
40909     if test "x$new_path" = x; then
40910       # It's still not found. Now this is an unrecoverable error.
40911       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40912 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40913       has_space=`$ECHO "$complete" | $GREP " "`
40914       if test "x$has_space" != x; then
40915         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40916 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40917       fi
40918       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40919     fi
40920   fi
40921 
40922   # Now new_path has a complete unix path to the binary
40923   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40924     # Keep paths in /bin as-is, but remove trailing .exe if any
40925     new_path="${new_path/%.exe/}"
40926     # Do not save /bin paths to all_fixpath_prefixes!
40927   else
40928     # Not in mixed or Windows style, start by that.
40929     new_path=`cmd //c echo $new_path`
40930 
40931   input_path="$new_path"
40932   # Check if we need to convert this using DOS-style short mode. If the path
40933   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40934   # take no chances and rewrite it.
40935   # Note: m4 eats our [], so we need to use [ and ] instead.
40936   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40937   if test "x$has_forbidden_chars" != x; then
40938     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40939     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40940   fi
40941 
40942     # Output is in $new_path
40943 
40944   windows_path="$new_path"
40945   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40946     unix_path=`$CYGPATH -u "$windows_path"`
40947     new_path="$unix_path"
40948   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40949     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40950     new_path="$unix_path"
40951   fi
40952 
40953     # remove trailing .exe if any
40954     new_path="${new_path/%.exe/}"
40955 
40956     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40957     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40958   fi
40959 
40960     else
40961       # We're on a unix platform. Hooray! :)
40962       # First separate the path from the arguments. This will split at the first
40963       # space.
40964       complete="$GNM"
40965       path="${complete%% *}"
40966       tmp="$complete EOL"
40967       arguments="${tmp#* }"
40968 
40969       # Cannot rely on the command "which" here since it doesn't always work.
40970       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40971       if test -z "$is_absolute_path"; then
40972         # Path to executable is not absolute. Find it.
40973         IFS_save="$IFS"
40974         IFS=:
40975         for p in $PATH; do
40976           if test -f "$p/$path" && test -x "$p/$path"; then
40977             new_path="$p/$path"
40978             break
40979           fi
40980         done
40981         IFS="$IFS_save"
40982       else
40983         # This is an absolute path, we can use it without further modifications.
40984         new_path="$path"
40985       fi
40986 
40987       if test "x$new_path" = x; then
40988         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40989 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40990         has_space=`$ECHO "$complete" | $GREP " "`
40991         if test "x$has_space" != x; then
40992           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40993 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40994         fi
40995         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40996       fi
40997     fi
40998 
40999     # Now join together the path and the arguments once again
41000     if test "x$arguments" != xEOL; then
41001       new_complete="$new_path ${arguments% *}"
41002     else
41003       new_complete="$new_path"
41004     fi
41005 
41006     if test "x$complete" != "x$new_complete"; then
41007       GNM="$new_complete"
41008       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41009 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41010     fi
41011   fi
41012 
41013   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41014     # FIXME: we should unify this with the solaris case above.
41015 
41016 
41017   # Publish this variable in the help.
41018 
41019 
41020   if [ -z "${STRIP+x}" ]; then
41021     # The variable is not set by user, try to locate tool using the code snippet
41022     if test -n "$ac_tool_prefix"; then
41023   for ac_prog in strip
41024   do
41025     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41026 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41028 $as_echo_n "checking for $ac_word... " >&6; }
41029 if ${ac_cv_prog_STRIP+:} false; then :
41030   $as_echo_n "(cached) " >&6
41031 else
41032   if test -n "$STRIP"; then
41033   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41034 else
41035 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41036 for as_dir in $PATH
41037 do
41038   IFS=$as_save_IFS
41039   test -z "$as_dir" && as_dir=.
41040     for ac_exec_ext in '' $ac_executable_extensions; do
41041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41042     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41044     break 2
41045   fi
41046 done
41047   done
41048 IFS=$as_save_IFS
41049 
41050 fi
41051 fi
41052 STRIP=$ac_cv_prog_STRIP
41053 if test -n "$STRIP"; then
41054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41055 $as_echo "$STRIP" >&6; }
41056 else
41057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41058 $as_echo "no" >&6; }
41059 fi
41060 
41061 
41062     test -n "$STRIP" && break
41063   done
41064 fi
41065 if test -z "$STRIP"; then
41066   ac_ct_STRIP=$STRIP
41067   for ac_prog in strip
41068 do
41069   # Extract the first word of "$ac_prog", so it can be a program name with args.
41070 set dummy $ac_prog; ac_word=$2
41071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41072 $as_echo_n "checking for $ac_word... " >&6; }
41073 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41074   $as_echo_n "(cached) " >&6
41075 else
41076   if test -n "$ac_ct_STRIP"; then
41077   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41078 else
41079 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41080 for as_dir in $PATH
41081 do
41082   IFS=$as_save_IFS
41083   test -z "$as_dir" && as_dir=.
41084     for ac_exec_ext in '' $ac_executable_extensions; do
41085   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41086     ac_cv_prog_ac_ct_STRIP="$ac_prog"
41087     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41088     break 2
41089   fi
41090 done
41091   done
41092 IFS=$as_save_IFS
41093 
41094 fi
41095 fi
41096 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41097 if test -n "$ac_ct_STRIP"; then
41098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41099 $as_echo "$ac_ct_STRIP" >&6; }
41100 else
41101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41102 $as_echo "no" >&6; }
41103 fi
41104 
41105 
41106   test -n "$ac_ct_STRIP" && break
41107 done
41108 
41109   if test "x$ac_ct_STRIP" = x; then
41110     STRIP=""
41111   else
41112     case $cross_compiling:$ac_tool_warned in
41113 yes:)
41114 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41115 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41116 ac_tool_warned=yes ;;
41117 esac
41118     STRIP=$ac_ct_STRIP
41119   fi
41120 fi
41121 
41122   else
41123     # The variable is set, but is it from the command line or the environment?
41124 
41125     # Try to remove the string !STRIP! from our list.
41126     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41127     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41128       # If it failed, the variable was not from the command line. Ignore it,
41129       # but warn the user (except for BASH, which is always set by the calling BASH).
41130       if test "xSTRIP" != xBASH; then
41131         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41132 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41133       fi
41134       # Try to locate tool using the code snippet
41135       if test -n "$ac_tool_prefix"; then
41136   for ac_prog in strip
41137   do
41138     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41139 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41141 $as_echo_n "checking for $ac_word... " >&6; }
41142 if ${ac_cv_prog_STRIP+:} false; then :
41143   $as_echo_n "(cached) " >&6
41144 else
41145   if test -n "$STRIP"; then
41146   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41147 else
41148 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41149 for as_dir in $PATH
41150 do
41151   IFS=$as_save_IFS
41152   test -z "$as_dir" && as_dir=.
41153     for ac_exec_ext in '' $ac_executable_extensions; do
41154   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41155     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41156     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41157     break 2
41158   fi
41159 done
41160   done
41161 IFS=$as_save_IFS
41162 
41163 fi
41164 fi
41165 STRIP=$ac_cv_prog_STRIP
41166 if test -n "$STRIP"; then
41167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41168 $as_echo "$STRIP" >&6; }
41169 else
41170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41171 $as_echo "no" >&6; }
41172 fi
41173 
41174 
41175     test -n "$STRIP" && break
41176   done
41177 fi
41178 if test -z "$STRIP"; then
41179   ac_ct_STRIP=$STRIP
41180   for ac_prog in strip
41181 do
41182   # Extract the first word of "$ac_prog", so it can be a program name with args.
41183 set dummy $ac_prog; ac_word=$2
41184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41185 $as_echo_n "checking for $ac_word... " >&6; }
41186 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41187   $as_echo_n "(cached) " >&6
41188 else
41189   if test -n "$ac_ct_STRIP"; then
41190   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41191 else
41192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41193 for as_dir in $PATH
41194 do
41195   IFS=$as_save_IFS
41196   test -z "$as_dir" && as_dir=.
41197     for ac_exec_ext in '' $ac_executable_extensions; do
41198   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41199     ac_cv_prog_ac_ct_STRIP="$ac_prog"
41200     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41201     break 2
41202   fi
41203 done
41204   done
41205 IFS=$as_save_IFS
41206 
41207 fi
41208 fi
41209 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41210 if test -n "$ac_ct_STRIP"; then
41211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41212 $as_echo "$ac_ct_STRIP" >&6; }
41213 else
41214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41215 $as_echo "no" >&6; }
41216 fi
41217 
41218 
41219   test -n "$ac_ct_STRIP" && break
41220 done
41221 
41222   if test "x$ac_ct_STRIP" = x; then
41223     STRIP=""
41224   else
41225     case $cross_compiling:$ac_tool_warned in
41226 yes:)
41227 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41228 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41229 ac_tool_warned=yes ;;
41230 esac
41231     STRIP=$ac_ct_STRIP
41232   fi
41233 fi
41234 
41235     else
41236       # If it succeeded, then it was overridden by the user. We will use it
41237       # for the tool.
41238 
41239       # First remove it from the list of overridden variables, so we can test
41240       # for unknown variables in the end.
41241       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41242 
41243       # Check if we try to supply an empty value
41244       if test "x$STRIP" = x; then
41245         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41246 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41247         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41248 $as_echo_n "checking for STRIP... " >&6; }
41249         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41250 $as_echo "disabled" >&6; }
41251       else
41252         # Check if the provided tool contains a complete path.
41253         tool_specified="$STRIP"
41254         tool_basename="${tool_specified##*/}"
41255         if test "x$tool_basename" = "x$tool_specified"; then
41256           # A command without a complete path is provided, search $PATH.
41257           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41258 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41259           # Extract the first word of "$tool_basename", so it can be a program name with args.
41260 set dummy $tool_basename; ac_word=$2
41261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41262 $as_echo_n "checking for $ac_word... " >&6; }
41263 if ${ac_cv_path_STRIP+:} false; then :
41264   $as_echo_n "(cached) " >&6
41265 else
41266   case $STRIP in
41267   [\\/]* | ?:[\\/]*)
41268   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41269   ;;
41270   *)
41271   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41272 for as_dir in $PATH
41273 do
41274   IFS=$as_save_IFS
41275   test -z "$as_dir" && as_dir=.
41276     for ac_exec_ext in '' $ac_executable_extensions; do
41277   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41278     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41279     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41280     break 2
41281   fi
41282 done
41283   done
41284 IFS=$as_save_IFS
41285 
41286   ;;
41287 esac
41288 fi
41289 STRIP=$ac_cv_path_STRIP
41290 if test -n "$STRIP"; then
41291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41292 $as_echo "$STRIP" >&6; }
41293 else
41294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41295 $as_echo "no" >&6; }
41296 fi
41297 
41298 
41299           if test "x$STRIP" = x; then
41300             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41301           fi
41302         else
41303           # Otherwise we believe it is a complete path. Use it as it is.
41304           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41305 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41306           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41307 $as_echo_n "checking for STRIP... " >&6; }
41308           if test ! -x "$tool_specified"; then
41309             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41310 $as_echo "not found" >&6; }
41311             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41312           fi
41313           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41314 $as_echo "$tool_specified" >&6; }
41315         fi
41316       fi
41317     fi
41318 
41319   fi
41320 
41321 
41322 
41323   # Only process if variable expands to non-empty
41324 
41325   if test "x$STRIP" != x; then
41326     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41327 
41328   # First separate the path from the arguments. This will split at the first
41329   # space.
41330   complete="$STRIP"
41331   path="${complete%% *}"
41332   tmp="$complete EOL"
41333   arguments="${tmp#* }"
41334 
41335   # Input might be given as Windows format, start by converting to
41336   # unix format.
41337   new_path=`$CYGPATH -u "$path"`
41338 
41339   # Now try to locate executable using which
41340   new_path=`$WHICH "$new_path" 2> /dev/null`
41341   # bat and cmd files are not always considered executable in cygwin causing which
41342   # to not find them
41343   if test "x$new_path" = x \
41344       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41345       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41346     new_path=`$CYGPATH -u "$path"`
41347   fi
41348   if test "x$new_path" = x; then
41349     # Oops. Which didn't find the executable.
41350     # The splitting of arguments from the executable at a space might have been incorrect,
41351     # since paths with space are more likely in Windows. Give it another try with the whole
41352     # argument.
41353     path="$complete"
41354     arguments="EOL"
41355     new_path=`$CYGPATH -u "$path"`
41356     new_path=`$WHICH "$new_path" 2> /dev/null`
41357     # bat and cmd files are not always considered executable in cygwin causing which
41358     # to not find them
41359     if test "x$new_path" = x \
41360         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41361         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41362       new_path=`$CYGPATH -u "$path"`
41363     fi
41364     if test "x$new_path" = x; then
41365       # It's still not found. Now this is an unrecoverable error.
41366       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41367 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41368       has_space=`$ECHO "$complete" | $GREP " "`
41369       if test "x$has_space" != x; then
41370         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41371 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41372       fi
41373       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41374     fi
41375   fi
41376 
41377   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41378   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41379   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41380   # "foo.exe" is OK but "foo" is an error.
41381   #
41382   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41383   # It is also a way to make sure we got the proper file name for the real test later on.
41384   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41385   if test "x$test_shortpath" = x; then
41386     # Short path failed, file does not exist as specified.
41387     # Try adding .exe or .cmd
41388     if test -f "${new_path}.exe"; then
41389       input_to_shortpath="${new_path}.exe"
41390     elif test -f "${new_path}.cmd"; then
41391       input_to_shortpath="${new_path}.cmd"
41392     else
41393       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41394 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41395       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41396 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41397       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41398     fi
41399   else
41400     input_to_shortpath="$new_path"
41401   fi
41402 
41403   # Call helper function which possibly converts this using DOS-style short mode.
41404   # If so, the updated path is stored in $new_path.
41405   new_path="$input_to_shortpath"
41406 
41407   input_path="$input_to_shortpath"
41408   # Check if we need to convert this using DOS-style short mode. If the path
41409   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41410   # take no chances and rewrite it.
41411   # Note: m4 eats our [], so we need to use [ and ] instead.
41412   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41413   if test "x$has_forbidden_chars" != x; then
41414     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41415     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41416     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41417     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41418       # Going to short mode and back again did indeed matter. Since short mode is
41419       # case insensitive, let's make it lowercase to improve readability.
41420       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41421       # Now convert it back to Unix-style (cygpath)
41422       input_path=`$CYGPATH -u "$shortmode_path"`
41423       new_path="$input_path"
41424     fi
41425   fi
41426 
41427   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41428   if test "x$test_cygdrive_prefix" = x; then
41429     # As a simple fix, exclude /usr/bin since it's not a real path.
41430     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41431       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41432       # a path prefixed by /cygdrive for fixpath to work.
41433       new_path="$CYGWIN_ROOT_PATH$input_path"
41434     fi
41435   fi
41436 
41437   # remove trailing .exe if any
41438   new_path="${new_path/%.exe/}"
41439 
41440     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41441 
41442   # First separate the path from the arguments. This will split at the first
41443   # space.
41444   complete="$STRIP"
41445   path="${complete%% *}"
41446   tmp="$complete EOL"
41447   arguments="${tmp#* }"
41448 
41449   # Input might be given as Windows format, start by converting to
41450   # unix format.
41451   new_path="$path"
41452 
41453   windows_path="$new_path"
41454   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41455     unix_path=`$CYGPATH -u "$windows_path"`
41456     new_path="$unix_path"
41457   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41458     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41459     new_path="$unix_path"
41460   fi
41461 
41462 
41463   # Now try to locate executable using which
41464   new_path=`$WHICH "$new_path" 2> /dev/null`
41465 
41466   if test "x$new_path" = x; then
41467     # Oops. Which didn't find the executable.
41468     # The splitting of arguments from the executable at a space might have been incorrect,
41469     # since paths with space are more likely in Windows. Give it another try with the whole
41470     # argument.
41471     path="$complete"
41472     arguments="EOL"
41473     new_path="$path"
41474 
41475   windows_path="$new_path"
41476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41477     unix_path=`$CYGPATH -u "$windows_path"`
41478     new_path="$unix_path"
41479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41480     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41481     new_path="$unix_path"
41482   fi
41483 
41484 
41485     new_path=`$WHICH "$new_path" 2> /dev/null`
41486     # bat and cmd files are not always considered executable in MSYS causing which
41487     # to not find them
41488     if test "x$new_path" = x \
41489         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41490         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41491       new_path="$path"
41492 
41493   windows_path="$new_path"
41494   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41495     unix_path=`$CYGPATH -u "$windows_path"`
41496     new_path="$unix_path"
41497   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41498     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41499     new_path="$unix_path"
41500   fi
41501 
41502     fi
41503 
41504     if test "x$new_path" = x; then
41505       # It's still not found. Now this is an unrecoverable error.
41506       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41507 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41508       has_space=`$ECHO "$complete" | $GREP " "`
41509       if test "x$has_space" != x; then
41510         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41511 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41512       fi
41513       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41514     fi
41515   fi
41516 
41517   # Now new_path has a complete unix path to the binary
41518   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41519     # Keep paths in /bin as-is, but remove trailing .exe if any
41520     new_path="${new_path/%.exe/}"
41521     # Do not save /bin paths to all_fixpath_prefixes!
41522   else
41523     # Not in mixed or Windows style, start by that.
41524     new_path=`cmd //c echo $new_path`
41525 
41526   input_path="$new_path"
41527   # Check if we need to convert this using DOS-style short mode. If the path
41528   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41529   # take no chances and rewrite it.
41530   # Note: m4 eats our [], so we need to use [ and ] instead.
41531   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41532   if test "x$has_forbidden_chars" != x; then
41533     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41534     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41535   fi
41536 
41537     # Output is in $new_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     # remove trailing .exe if any
41549     new_path="${new_path/%.exe/}"
41550 
41551     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41552     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41553   fi
41554 
41555     else
41556       # We're on a unix platform. Hooray! :)
41557       # First separate the path from the arguments. This will split at the first
41558       # space.
41559       complete="$STRIP"
41560       path="${complete%% *}"
41561       tmp="$complete EOL"
41562       arguments="${tmp#* }"
41563 
41564       # Cannot rely on the command "which" here since it doesn't always work.
41565       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41566       if test -z "$is_absolute_path"; then
41567         # Path to executable is not absolute. Find it.
41568         IFS_save="$IFS"
41569         IFS=:
41570         for p in $PATH; do
41571           if test -f "$p/$path" && test -x "$p/$path"; then
41572             new_path="$p/$path"
41573             break
41574           fi
41575         done
41576         IFS="$IFS_save"
41577       else
41578         # This is an absolute path, we can use it without further modifications.
41579         new_path="$path"
41580       fi
41581 
41582       if test "x$new_path" = x; then
41583         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41584 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41585         has_space=`$ECHO "$complete" | $GREP " "`
41586         if test "x$has_space" != x; then
41587           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41588 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41589         fi
41590         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41591       fi
41592     fi
41593 
41594     # Now join together the path and the arguments once again
41595     if test "x$arguments" != xEOL; then
41596       new_complete="$new_path ${arguments% *}"
41597     else
41598       new_complete="$new_path"
41599     fi
41600 
41601     if test "x$complete" != "x$new_complete"; then
41602       STRIP="$new_complete"
41603       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41604 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41605     fi
41606   fi
41607 
41608     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41609 
41610 
41611   # Publish this variable in the help.
41612 
41613 
41614   if [ -z "${NM+x}" ]; then
41615     # The variable is not set by user, try to locate tool using the code snippet
41616     if test -n "$ac_tool_prefix"; then
41617   for ac_prog in nm gcc-nm
41618   do
41619     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41620 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41622 $as_echo_n "checking for $ac_word... " >&6; }
41623 if ${ac_cv_prog_NM+:} false; then :
41624   $as_echo_n "(cached) " >&6
41625 else
41626   if test -n "$NM"; then
41627   ac_cv_prog_NM="$NM" # Let the user override the test.
41628 else
41629 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41630 for as_dir in $PATH
41631 do
41632   IFS=$as_save_IFS
41633   test -z "$as_dir" && as_dir=.
41634     for ac_exec_ext in '' $ac_executable_extensions; do
41635   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41636     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41638     break 2
41639   fi
41640 done
41641   done
41642 IFS=$as_save_IFS
41643 
41644 fi
41645 fi
41646 NM=$ac_cv_prog_NM
41647 if test -n "$NM"; then
41648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41649 $as_echo "$NM" >&6; }
41650 else
41651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41652 $as_echo "no" >&6; }
41653 fi
41654 
41655 
41656     test -n "$NM" && break
41657   done
41658 fi
41659 if test -z "$NM"; then
41660   ac_ct_NM=$NM
41661   for ac_prog in nm gcc-nm
41662 do
41663   # Extract the first word of "$ac_prog", so it can be a program name with args.
41664 set dummy $ac_prog; ac_word=$2
41665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41666 $as_echo_n "checking for $ac_word... " >&6; }
41667 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41668   $as_echo_n "(cached) " >&6
41669 else
41670   if test -n "$ac_ct_NM"; then
41671   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41672 else
41673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41674 for as_dir in $PATH
41675 do
41676   IFS=$as_save_IFS
41677   test -z "$as_dir" && as_dir=.
41678     for ac_exec_ext in '' $ac_executable_extensions; do
41679   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41680     ac_cv_prog_ac_ct_NM="$ac_prog"
41681     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41682     break 2
41683   fi
41684 done
41685   done
41686 IFS=$as_save_IFS
41687 
41688 fi
41689 fi
41690 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41691 if test -n "$ac_ct_NM"; then
41692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41693 $as_echo "$ac_ct_NM" >&6; }
41694 else
41695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41696 $as_echo "no" >&6; }
41697 fi
41698 
41699 
41700   test -n "$ac_ct_NM" && break
41701 done
41702 
41703   if test "x$ac_ct_NM" = x; then
41704     NM=""
41705   else
41706     case $cross_compiling:$ac_tool_warned in
41707 yes:)
41708 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41709 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41710 ac_tool_warned=yes ;;
41711 esac
41712     NM=$ac_ct_NM
41713   fi
41714 fi
41715 
41716   else
41717     # The variable is set, but is it from the command line or the environment?
41718 
41719     # Try to remove the string !NM! from our list.
41720     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41721     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41722       # If it failed, the variable was not from the command line. Ignore it,
41723       # but warn the user (except for BASH, which is always set by the calling BASH).
41724       if test "xNM" != xBASH; then
41725         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41726 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41727       fi
41728       # Try to locate tool using the code snippet
41729       if test -n "$ac_tool_prefix"; then
41730   for ac_prog in nm gcc-nm
41731   do
41732     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41733 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41735 $as_echo_n "checking for $ac_word... " >&6; }
41736 if ${ac_cv_prog_NM+:} false; then :
41737   $as_echo_n "(cached) " >&6
41738 else
41739   if test -n "$NM"; then
41740   ac_cv_prog_NM="$NM" # Let the user override the test.
41741 else
41742 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41743 for as_dir in $PATH
41744 do
41745   IFS=$as_save_IFS
41746   test -z "$as_dir" && as_dir=.
41747     for ac_exec_ext in '' $ac_executable_extensions; do
41748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41749     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41750     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41751     break 2
41752   fi
41753 done
41754   done
41755 IFS=$as_save_IFS
41756 
41757 fi
41758 fi
41759 NM=$ac_cv_prog_NM
41760 if test -n "$NM"; then
41761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41762 $as_echo "$NM" >&6; }
41763 else
41764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41765 $as_echo "no" >&6; }
41766 fi
41767 
41768 
41769     test -n "$NM" && break
41770   done
41771 fi
41772 if test -z "$NM"; then
41773   ac_ct_NM=$NM
41774   for ac_prog in nm gcc-nm
41775 do
41776   # Extract the first word of "$ac_prog", so it can be a program name with args.
41777 set dummy $ac_prog; ac_word=$2
41778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41779 $as_echo_n "checking for $ac_word... " >&6; }
41780 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41781   $as_echo_n "(cached) " >&6
41782 else
41783   if test -n "$ac_ct_NM"; then
41784   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41785 else
41786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41787 for as_dir in $PATH
41788 do
41789   IFS=$as_save_IFS
41790   test -z "$as_dir" && as_dir=.
41791     for ac_exec_ext in '' $ac_executable_extensions; do
41792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41793     ac_cv_prog_ac_ct_NM="$ac_prog"
41794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41795     break 2
41796   fi
41797 done
41798   done
41799 IFS=$as_save_IFS
41800 
41801 fi
41802 fi
41803 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41804 if test -n "$ac_ct_NM"; then
41805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41806 $as_echo "$ac_ct_NM" >&6; }
41807 else
41808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41809 $as_echo "no" >&6; }
41810 fi
41811 
41812 
41813   test -n "$ac_ct_NM" && break
41814 done
41815 
41816   if test "x$ac_ct_NM" = x; then
41817     NM=""
41818   else
41819     case $cross_compiling:$ac_tool_warned in
41820 yes:)
41821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41822 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41823 ac_tool_warned=yes ;;
41824 esac
41825     NM=$ac_ct_NM
41826   fi
41827 fi
41828 
41829     else
41830       # If it succeeded, then it was overridden by the user. We will use it
41831       # for the tool.
41832 
41833       # First remove it from the list of overridden variables, so we can test
41834       # for unknown variables in the end.
41835       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41836 
41837       # Check if we try to supply an empty value
41838       if test "x$NM" = x; then
41839         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41840 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41841         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41842 $as_echo_n "checking for NM... " >&6; }
41843         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41844 $as_echo "disabled" >&6; }
41845       else
41846         # Check if the provided tool contains a complete path.
41847         tool_specified="$NM"
41848         tool_basename="${tool_specified##*/}"
41849         if test "x$tool_basename" = "x$tool_specified"; then
41850           # A command without a complete path is provided, search $PATH.
41851           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41852 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41853           # Extract the first word of "$tool_basename", so it can be a program name with args.
41854 set dummy $tool_basename; ac_word=$2
41855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41856 $as_echo_n "checking for $ac_word... " >&6; }
41857 if ${ac_cv_path_NM+:} false; then :
41858   $as_echo_n "(cached) " >&6
41859 else
41860   case $NM in
41861   [\\/]* | ?:[\\/]*)
41862   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41863   ;;
41864   *)
41865   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41866 for as_dir in $PATH
41867 do
41868   IFS=$as_save_IFS
41869   test -z "$as_dir" && as_dir=.
41870     for ac_exec_ext in '' $ac_executable_extensions; do
41871   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41872     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41873     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41874     break 2
41875   fi
41876 done
41877   done
41878 IFS=$as_save_IFS
41879 
41880   ;;
41881 esac
41882 fi
41883 NM=$ac_cv_path_NM
41884 if test -n "$NM"; then
41885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41886 $as_echo "$NM" >&6; }
41887 else
41888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41889 $as_echo "no" >&6; }
41890 fi
41891 
41892 
41893           if test "x$NM" = x; then
41894             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41895           fi
41896         else
41897           # Otherwise we believe it is a complete path. Use it as it is.
41898           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41899 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41900           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41901 $as_echo_n "checking for NM... " >&6; }
41902           if test ! -x "$tool_specified"; then
41903             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41904 $as_echo "not found" >&6; }
41905             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41906           fi
41907           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41908 $as_echo "$tool_specified" >&6; }
41909         fi
41910       fi
41911     fi
41912 
41913   fi
41914 
41915 
41916     else
41917 
41918 
41919   # Publish this variable in the help.
41920 
41921 
41922   if [ -z "${NM+x}" ]; then
41923     # The variable is not set by user, try to locate tool using the code snippet
41924     if test -n "$ac_tool_prefix"; then
41925   for ac_prog in nm
41926   do
41927     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41928 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41930 $as_echo_n "checking for $ac_word... " >&6; }
41931 if ${ac_cv_prog_NM+:} false; then :
41932   $as_echo_n "(cached) " >&6
41933 else
41934   if test -n "$NM"; then
41935   ac_cv_prog_NM="$NM" # Let the user override the test.
41936 else
41937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41938 for as_dir in $PATH
41939 do
41940   IFS=$as_save_IFS
41941   test -z "$as_dir" && as_dir=.
41942     for ac_exec_ext in '' $ac_executable_extensions; do
41943   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41944     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41945     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41946     break 2
41947   fi
41948 done
41949   done
41950 IFS=$as_save_IFS
41951 
41952 fi
41953 fi
41954 NM=$ac_cv_prog_NM
41955 if test -n "$NM"; then
41956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41957 $as_echo "$NM" >&6; }
41958 else
41959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41960 $as_echo "no" >&6; }
41961 fi
41962 
41963 
41964     test -n "$NM" && break
41965   done
41966 fi
41967 if test -z "$NM"; then
41968   ac_ct_NM=$NM
41969   for ac_prog in nm
41970 do
41971   # Extract the first word of "$ac_prog", so it can be a program name with args.
41972 set dummy $ac_prog; ac_word=$2
41973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41974 $as_echo_n "checking for $ac_word... " >&6; }
41975 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41976   $as_echo_n "(cached) " >&6
41977 else
41978   if test -n "$ac_ct_NM"; then
41979   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41980 else
41981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41982 for as_dir in $PATH
41983 do
41984   IFS=$as_save_IFS
41985   test -z "$as_dir" && as_dir=.
41986     for ac_exec_ext in '' $ac_executable_extensions; do
41987   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41988     ac_cv_prog_ac_ct_NM="$ac_prog"
41989     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41990     break 2
41991   fi
41992 done
41993   done
41994 IFS=$as_save_IFS
41995 
41996 fi
41997 fi
41998 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41999 if test -n "$ac_ct_NM"; then
42000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42001 $as_echo "$ac_ct_NM" >&6; }
42002 else
42003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42004 $as_echo "no" >&6; }
42005 fi
42006 
42007 
42008   test -n "$ac_ct_NM" && break
42009 done
42010 
42011   if test "x$ac_ct_NM" = x; then
42012     NM=""
42013   else
42014     case $cross_compiling:$ac_tool_warned in
42015 yes:)
42016 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42017 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42018 ac_tool_warned=yes ;;
42019 esac
42020     NM=$ac_ct_NM
42021   fi
42022 fi
42023 
42024   else
42025     # The variable is set, but is it from the command line or the environment?
42026 
42027     # Try to remove the string !NM! from our list.
42028     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42029     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42030       # If it failed, the variable was not from the command line. Ignore it,
42031       # but warn the user (except for BASH, which is always set by the calling BASH).
42032       if test "xNM" != xBASH; then
42033         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42034 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42035       fi
42036       # Try to locate tool using the code snippet
42037       if test -n "$ac_tool_prefix"; then
42038   for ac_prog in nm
42039   do
42040     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42041 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42043 $as_echo_n "checking for $ac_word... " >&6; }
42044 if ${ac_cv_prog_NM+:} false; then :
42045   $as_echo_n "(cached) " >&6
42046 else
42047   if test -n "$NM"; then
42048   ac_cv_prog_NM="$NM" # Let the user override the test.
42049 else
42050 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42051 for as_dir in $PATH
42052 do
42053   IFS=$as_save_IFS
42054   test -z "$as_dir" && as_dir=.
42055     for ac_exec_ext in '' $ac_executable_extensions; do
42056   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42057     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42059     break 2
42060   fi
42061 done
42062   done
42063 IFS=$as_save_IFS
42064 
42065 fi
42066 fi
42067 NM=$ac_cv_prog_NM
42068 if test -n "$NM"; then
42069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42070 $as_echo "$NM" >&6; }
42071 else
42072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42073 $as_echo "no" >&6; }
42074 fi
42075 
42076 
42077     test -n "$NM" && break
42078   done
42079 fi
42080 if test -z "$NM"; then
42081   ac_ct_NM=$NM
42082   for ac_prog in nm
42083 do
42084   # Extract the first word of "$ac_prog", so it can be a program name with args.
42085 set dummy $ac_prog; ac_word=$2
42086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42087 $as_echo_n "checking for $ac_word... " >&6; }
42088 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42089   $as_echo_n "(cached) " >&6
42090 else
42091   if test -n "$ac_ct_NM"; then
42092   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42093 else
42094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42095 for as_dir in $PATH
42096 do
42097   IFS=$as_save_IFS
42098   test -z "$as_dir" && as_dir=.
42099     for ac_exec_ext in '' $ac_executable_extensions; do
42100   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42101     ac_cv_prog_ac_ct_NM="$ac_prog"
42102     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42103     break 2
42104   fi
42105 done
42106   done
42107 IFS=$as_save_IFS
42108 
42109 fi
42110 fi
42111 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42112 if test -n "$ac_ct_NM"; then
42113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42114 $as_echo "$ac_ct_NM" >&6; }
42115 else
42116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42117 $as_echo "no" >&6; }
42118 fi
42119 
42120 
42121   test -n "$ac_ct_NM" && break
42122 done
42123 
42124   if test "x$ac_ct_NM" = x; then
42125     NM=""
42126   else
42127     case $cross_compiling:$ac_tool_warned in
42128 yes:)
42129 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42130 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42131 ac_tool_warned=yes ;;
42132 esac
42133     NM=$ac_ct_NM
42134   fi
42135 fi
42136 
42137     else
42138       # If it succeeded, then it was overridden by the user. We will use it
42139       # for the tool.
42140 
42141       # First remove it from the list of overridden variables, so we can test
42142       # for unknown variables in the end.
42143       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42144 
42145       # Check if we try to supply an empty value
42146       if test "x$NM" = x; then
42147         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42148 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42149         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42150 $as_echo_n "checking for NM... " >&6; }
42151         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42152 $as_echo "disabled" >&6; }
42153       else
42154         # Check if the provided tool contains a complete path.
42155         tool_specified="$NM"
42156         tool_basename="${tool_specified##*/}"
42157         if test "x$tool_basename" = "x$tool_specified"; then
42158           # A command without a complete path is provided, search $PATH.
42159           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42160 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42161           # Extract the first word of "$tool_basename", so it can be a program name with args.
42162 set dummy $tool_basename; ac_word=$2
42163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42164 $as_echo_n "checking for $ac_word... " >&6; }
42165 if ${ac_cv_path_NM+:} false; then :
42166   $as_echo_n "(cached) " >&6
42167 else
42168   case $NM in
42169   [\\/]* | ?:[\\/]*)
42170   ac_cv_path_NM="$NM" # Let the user override the test with a path.
42171   ;;
42172   *)
42173   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42174 for as_dir in $PATH
42175 do
42176   IFS=$as_save_IFS
42177   test -z "$as_dir" && as_dir=.
42178     for ac_exec_ext in '' $ac_executable_extensions; do
42179   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42180     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42181     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42182     break 2
42183   fi
42184 done
42185   done
42186 IFS=$as_save_IFS
42187 
42188   ;;
42189 esac
42190 fi
42191 NM=$ac_cv_path_NM
42192 if test -n "$NM"; then
42193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42194 $as_echo "$NM" >&6; }
42195 else
42196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42197 $as_echo "no" >&6; }
42198 fi
42199 
42200 
42201           if test "x$NM" = x; then
42202             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42203           fi
42204         else
42205           # Otherwise we believe it is a complete path. Use it as it is.
42206           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42207 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42208           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42209 $as_echo_n "checking for NM... " >&6; }
42210           if test ! -x "$tool_specified"; then
42211             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42212 $as_echo "not found" >&6; }
42213             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42214           fi
42215           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42216 $as_echo "$tool_specified" >&6; }
42217         fi
42218       fi
42219     fi
42220 
42221   fi
42222 
42223 
42224     fi
42225 
42226   # Only process if variable expands to non-empty
42227 
42228   if test "x$NM" != x; then
42229     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42230 
42231   # First separate the path from the arguments. This will split at the first
42232   # space.
42233   complete="$NM"
42234   path="${complete%% *}"
42235   tmp="$complete EOL"
42236   arguments="${tmp#* }"
42237 
42238   # Input might be given as Windows format, start by converting to
42239   # unix format.
42240   new_path=`$CYGPATH -u "$path"`
42241 
42242   # Now try to locate executable using which
42243   new_path=`$WHICH "$new_path" 2> /dev/null`
42244   # bat and cmd files are not always considered executable in cygwin causing which
42245   # to not find them
42246   if test "x$new_path" = x \
42247       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42248       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42249     new_path=`$CYGPATH -u "$path"`
42250   fi
42251   if test "x$new_path" = x; then
42252     # Oops. Which didn't find the executable.
42253     # The splitting of arguments from the executable at a space might have been incorrect,
42254     # since paths with space are more likely in Windows. Give it another try with the whole
42255     # argument.
42256     path="$complete"
42257     arguments="EOL"
42258     new_path=`$CYGPATH -u "$path"`
42259     new_path=`$WHICH "$new_path" 2> /dev/null`
42260     # bat and cmd files are not always considered executable in cygwin causing which
42261     # to not find them
42262     if test "x$new_path" = x \
42263         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42264         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42265       new_path=`$CYGPATH -u "$path"`
42266     fi
42267     if test "x$new_path" = x; then
42268       # It's still not found. Now this is an unrecoverable error.
42269       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42270 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42271       has_space=`$ECHO "$complete" | $GREP " "`
42272       if test "x$has_space" != x; then
42273         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42274 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42275       fi
42276       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42277     fi
42278   fi
42279 
42280   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42281   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42282   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42283   # "foo.exe" is OK but "foo" is an error.
42284   #
42285   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42286   # It is also a way to make sure we got the proper file name for the real test later on.
42287   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42288   if test "x$test_shortpath" = x; then
42289     # Short path failed, file does not exist as specified.
42290     # Try adding .exe or .cmd
42291     if test -f "${new_path}.exe"; then
42292       input_to_shortpath="${new_path}.exe"
42293     elif test -f "${new_path}.cmd"; then
42294       input_to_shortpath="${new_path}.cmd"
42295     else
42296       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42297 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42298       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42299 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42300       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42301     fi
42302   else
42303     input_to_shortpath="$new_path"
42304   fi
42305 
42306   # Call helper function which possibly converts this using DOS-style short mode.
42307   # If so, the updated path is stored in $new_path.
42308   new_path="$input_to_shortpath"
42309 
42310   input_path="$input_to_shortpath"
42311   # Check if we need to convert this using DOS-style short mode. If the path
42312   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42313   # take no chances and rewrite it.
42314   # Note: m4 eats our [], so we need to use [ and ] instead.
42315   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42316   if test "x$has_forbidden_chars" != x; then
42317     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42318     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42319     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42320     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42321       # Going to short mode and back again did indeed matter. Since short mode is
42322       # case insensitive, let's make it lowercase to improve readability.
42323       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42324       # Now convert it back to Unix-style (cygpath)
42325       input_path=`$CYGPATH -u "$shortmode_path"`
42326       new_path="$input_path"
42327     fi
42328   fi
42329 
42330   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42331   if test "x$test_cygdrive_prefix" = x; then
42332     # As a simple fix, exclude /usr/bin since it's not a real path.
42333     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42334       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42335       # a path prefixed by /cygdrive for fixpath to work.
42336       new_path="$CYGWIN_ROOT_PATH$input_path"
42337     fi
42338   fi
42339 
42340   # remove trailing .exe if any
42341   new_path="${new_path/%.exe/}"
42342 
42343     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42344 
42345   # First separate the path from the arguments. This will split at the first
42346   # space.
42347   complete="$NM"
42348   path="${complete%% *}"
42349   tmp="$complete EOL"
42350   arguments="${tmp#* }"
42351 
42352   # Input might be given as Windows format, start by converting to
42353   # unix format.
42354   new_path="$path"
42355 
42356   windows_path="$new_path"
42357   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42358     unix_path=`$CYGPATH -u "$windows_path"`
42359     new_path="$unix_path"
42360   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42361     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42362     new_path="$unix_path"
42363   fi
42364 
42365 
42366   # Now try to locate executable using which
42367   new_path=`$WHICH "$new_path" 2> /dev/null`
42368 
42369   if test "x$new_path" = x; then
42370     # Oops. Which didn't find the executable.
42371     # The splitting of arguments from the executable at a space might have been incorrect,
42372     # since paths with space are more likely in Windows. Give it another try with the whole
42373     # argument.
42374     path="$complete"
42375     arguments="EOL"
42376     new_path="$path"
42377 
42378   windows_path="$new_path"
42379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42380     unix_path=`$CYGPATH -u "$windows_path"`
42381     new_path="$unix_path"
42382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42383     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42384     new_path="$unix_path"
42385   fi
42386 
42387 
42388     new_path=`$WHICH "$new_path" 2> /dev/null`
42389     # bat and cmd files are not always considered executable in MSYS causing which
42390     # to not find them
42391     if test "x$new_path" = x \
42392         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42393         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42394       new_path="$path"
42395 
42396   windows_path="$new_path"
42397   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42398     unix_path=`$CYGPATH -u "$windows_path"`
42399     new_path="$unix_path"
42400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42401     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42402     new_path="$unix_path"
42403   fi
42404 
42405     fi
42406 
42407     if test "x$new_path" = x; then
42408       # It's still not found. Now this is an unrecoverable error.
42409       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42410 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42411       has_space=`$ECHO "$complete" | $GREP " "`
42412       if test "x$has_space" != x; then
42413         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42414 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42415       fi
42416       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42417     fi
42418   fi
42419 
42420   # Now new_path has a complete unix path to the binary
42421   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42422     # Keep paths in /bin as-is, but remove trailing .exe if any
42423     new_path="${new_path/%.exe/}"
42424     # Do not save /bin paths to all_fixpath_prefixes!
42425   else
42426     # Not in mixed or Windows style, start by that.
42427     new_path=`cmd //c echo $new_path`
42428 
42429   input_path="$new_path"
42430   # Check if we need to convert this using DOS-style short mode. If the path
42431   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42432   # take no chances and rewrite it.
42433   # Note: m4 eats our [], so we need to use [ and ] instead.
42434   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42435   if test "x$has_forbidden_chars" != x; then
42436     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42437     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42438   fi
42439 
42440     # Output is in $new_path
42441 
42442   windows_path="$new_path"
42443   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42444     unix_path=`$CYGPATH -u "$windows_path"`
42445     new_path="$unix_path"
42446   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42447     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42448     new_path="$unix_path"
42449   fi
42450 
42451     # remove trailing .exe if any
42452     new_path="${new_path/%.exe/}"
42453 
42454     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42455     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42456   fi
42457 
42458     else
42459       # We're on a unix platform. Hooray! :)
42460       # First separate the path from the arguments. This will split at the first
42461       # space.
42462       complete="$NM"
42463       path="${complete%% *}"
42464       tmp="$complete EOL"
42465       arguments="${tmp#* }"
42466 
42467       # Cannot rely on the command "which" here since it doesn't always work.
42468       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42469       if test -z "$is_absolute_path"; then
42470         # Path to executable is not absolute. Find it.
42471         IFS_save="$IFS"
42472         IFS=:
42473         for p in $PATH; do
42474           if test -f "$p/$path" && test -x "$p/$path"; then
42475             new_path="$p/$path"
42476             break
42477           fi
42478         done
42479         IFS="$IFS_save"
42480       else
42481         # This is an absolute path, we can use it without further modifications.
42482         new_path="$path"
42483       fi
42484 
42485       if test "x$new_path" = x; then
42486         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42487 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42488         has_space=`$ECHO "$complete" | $GREP " "`
42489         if test "x$has_space" != x; then
42490           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42491 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42492         fi
42493         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42494       fi
42495     fi
42496 
42497     # Now join together the path and the arguments once again
42498     if test "x$arguments" != xEOL; then
42499       new_complete="$new_path ${arguments% *}"
42500     else
42501       new_complete="$new_path"
42502     fi
42503 
42504     if test "x$complete" != "x$new_complete"; then
42505       NM="$new_complete"
42506       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42507 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42508     fi
42509   fi
42510 
42511     GNM="$NM"
42512 
42513   fi
42514 
42515   # objcopy is used for moving debug symbols to separate files when
42516   # full debug symbols are enabled.
42517   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42518 
42519 
42520   # Publish this variable in the help.
42521 
42522 
42523   if [ -z "${OBJCOPY+x}" ]; then
42524     # The variable is not set by user, try to locate tool using the code snippet
42525     if test -n "$ac_tool_prefix"; then
42526   for ac_prog in gobjcopy objcopy
42527   do
42528     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42529 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42531 $as_echo_n "checking for $ac_word... " >&6; }
42532 if ${ac_cv_prog_OBJCOPY+:} false; then :
42533   $as_echo_n "(cached) " >&6
42534 else
42535   if test -n "$OBJCOPY"; then
42536   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42537 else
42538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42539 for as_dir in $PATH
42540 do
42541   IFS=$as_save_IFS
42542   test -z "$as_dir" && as_dir=.
42543     for ac_exec_ext in '' $ac_executable_extensions; do
42544   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42545     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42546     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42547     break 2
42548   fi
42549 done
42550   done
42551 IFS=$as_save_IFS
42552 
42553 fi
42554 fi
42555 OBJCOPY=$ac_cv_prog_OBJCOPY
42556 if test -n "$OBJCOPY"; then
42557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42558 $as_echo "$OBJCOPY" >&6; }
42559 else
42560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42561 $as_echo "no" >&6; }
42562 fi
42563 
42564 
42565     test -n "$OBJCOPY" && break
42566   done
42567 fi
42568 if test -z "$OBJCOPY"; then
42569   ac_ct_OBJCOPY=$OBJCOPY
42570   for ac_prog in gobjcopy objcopy
42571 do
42572   # Extract the first word of "$ac_prog", so it can be a program name with args.
42573 set dummy $ac_prog; ac_word=$2
42574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42575 $as_echo_n "checking for $ac_word... " >&6; }
42576 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42577   $as_echo_n "(cached) " >&6
42578 else
42579   if test -n "$ac_ct_OBJCOPY"; then
42580   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42581 else
42582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42583 for as_dir in $PATH
42584 do
42585   IFS=$as_save_IFS
42586   test -z "$as_dir" && as_dir=.
42587     for ac_exec_ext in '' $ac_executable_extensions; do
42588   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42589     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42591     break 2
42592   fi
42593 done
42594   done
42595 IFS=$as_save_IFS
42596 
42597 fi
42598 fi
42599 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42600 if test -n "$ac_ct_OBJCOPY"; then
42601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42602 $as_echo "$ac_ct_OBJCOPY" >&6; }
42603 else
42604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42605 $as_echo "no" >&6; }
42606 fi
42607 
42608 
42609   test -n "$ac_ct_OBJCOPY" && break
42610 done
42611 
42612   if test "x$ac_ct_OBJCOPY" = x; then
42613     OBJCOPY=""
42614   else
42615     case $cross_compiling:$ac_tool_warned in
42616 yes:)
42617 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42618 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42619 ac_tool_warned=yes ;;
42620 esac
42621     OBJCOPY=$ac_ct_OBJCOPY
42622   fi
42623 fi
42624 
42625   else
42626     # The variable is set, but is it from the command line or the environment?
42627 
42628     # Try to remove the string !OBJCOPY! from our list.
42629     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42630     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42631       # If it failed, the variable was not from the command line. Ignore it,
42632       # but warn the user (except for BASH, which is always set by the calling BASH).
42633       if test "xOBJCOPY" != xBASH; then
42634         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42635 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42636       fi
42637       # Try to locate tool using the code snippet
42638       if test -n "$ac_tool_prefix"; then
42639   for ac_prog in gobjcopy objcopy
42640   do
42641     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42642 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42644 $as_echo_n "checking for $ac_word... " >&6; }
42645 if ${ac_cv_prog_OBJCOPY+:} false; then :
42646   $as_echo_n "(cached) " >&6
42647 else
42648   if test -n "$OBJCOPY"; then
42649   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42650 else
42651 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42652 for as_dir in $PATH
42653 do
42654   IFS=$as_save_IFS
42655   test -z "$as_dir" && as_dir=.
42656     for ac_exec_ext in '' $ac_executable_extensions; do
42657   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42658     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42659     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42660     break 2
42661   fi
42662 done
42663   done
42664 IFS=$as_save_IFS
42665 
42666 fi
42667 fi
42668 OBJCOPY=$ac_cv_prog_OBJCOPY
42669 if test -n "$OBJCOPY"; then
42670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42671 $as_echo "$OBJCOPY" >&6; }
42672 else
42673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42674 $as_echo "no" >&6; }
42675 fi
42676 
42677 
42678     test -n "$OBJCOPY" && break
42679   done
42680 fi
42681 if test -z "$OBJCOPY"; then
42682   ac_ct_OBJCOPY=$OBJCOPY
42683   for ac_prog in gobjcopy objcopy
42684 do
42685   # Extract the first word of "$ac_prog", so it can be a program name with args.
42686 set dummy $ac_prog; ac_word=$2
42687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42688 $as_echo_n "checking for $ac_word... " >&6; }
42689 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42690   $as_echo_n "(cached) " >&6
42691 else
42692   if test -n "$ac_ct_OBJCOPY"; then
42693   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42694 else
42695 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42696 for as_dir in $PATH
42697 do
42698   IFS=$as_save_IFS
42699   test -z "$as_dir" && as_dir=.
42700     for ac_exec_ext in '' $ac_executable_extensions; do
42701   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42702     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42703     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42704     break 2
42705   fi
42706 done
42707   done
42708 IFS=$as_save_IFS
42709 
42710 fi
42711 fi
42712 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42713 if test -n "$ac_ct_OBJCOPY"; then
42714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42715 $as_echo "$ac_ct_OBJCOPY" >&6; }
42716 else
42717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42718 $as_echo "no" >&6; }
42719 fi
42720 
42721 
42722   test -n "$ac_ct_OBJCOPY" && break
42723 done
42724 
42725   if test "x$ac_ct_OBJCOPY" = x; then
42726     OBJCOPY=""
42727   else
42728     case $cross_compiling:$ac_tool_warned in
42729 yes:)
42730 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42731 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42732 ac_tool_warned=yes ;;
42733 esac
42734     OBJCOPY=$ac_ct_OBJCOPY
42735   fi
42736 fi
42737 
42738     else
42739       # If it succeeded, then it was overridden by the user. We will use it
42740       # for the tool.
42741 
42742       # First remove it from the list of overridden variables, so we can test
42743       # for unknown variables in the end.
42744       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42745 
42746       # Check if we try to supply an empty value
42747       if test "x$OBJCOPY" = x; then
42748         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42749 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42750         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42751 $as_echo_n "checking for OBJCOPY... " >&6; }
42752         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42753 $as_echo "disabled" >&6; }
42754       else
42755         # Check if the provided tool contains a complete path.
42756         tool_specified="$OBJCOPY"
42757         tool_basename="${tool_specified##*/}"
42758         if test "x$tool_basename" = "x$tool_specified"; then
42759           # A command without a complete path is provided, search $PATH.
42760           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42761 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42762           # Extract the first word of "$tool_basename", so it can be a program name with args.
42763 set dummy $tool_basename; ac_word=$2
42764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42765 $as_echo_n "checking for $ac_word... " >&6; }
42766 if ${ac_cv_path_OBJCOPY+:} false; then :
42767   $as_echo_n "(cached) " >&6
42768 else
42769   case $OBJCOPY in
42770   [\\/]* | ?:[\\/]*)
42771   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42772   ;;
42773   *)
42774   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42775 for as_dir in $PATH
42776 do
42777   IFS=$as_save_IFS
42778   test -z "$as_dir" && as_dir=.
42779     for ac_exec_ext in '' $ac_executable_extensions; do
42780   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42781     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42782     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42783     break 2
42784   fi
42785 done
42786   done
42787 IFS=$as_save_IFS
42788 
42789   ;;
42790 esac
42791 fi
42792 OBJCOPY=$ac_cv_path_OBJCOPY
42793 if test -n "$OBJCOPY"; then
42794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42795 $as_echo "$OBJCOPY" >&6; }
42796 else
42797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42798 $as_echo "no" >&6; }
42799 fi
42800 
42801 
42802           if test "x$OBJCOPY" = x; then
42803             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42804           fi
42805         else
42806           # Otherwise we believe it is a complete path. Use it as it is.
42807           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42808 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42809           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42810 $as_echo_n "checking for OBJCOPY... " >&6; }
42811           if test ! -x "$tool_specified"; then
42812             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42813 $as_echo "not found" >&6; }
42814             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42815           fi
42816           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42817 $as_echo "$tool_specified" >&6; }
42818         fi
42819       fi
42820     fi
42821 
42822   fi
42823 
42824 
42825     # Only call fixup if objcopy was found.
42826     if test -n "$OBJCOPY"; then
42827 
42828   # Only process if variable expands to non-empty
42829 
42830   if test "x$OBJCOPY" != x; then
42831     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42832 
42833   # First separate the path from the arguments. This will split at the first
42834   # space.
42835   complete="$OBJCOPY"
42836   path="${complete%% *}"
42837   tmp="$complete EOL"
42838   arguments="${tmp#* }"
42839 
42840   # Input might be given as Windows format, start by converting to
42841   # unix format.
42842   new_path=`$CYGPATH -u "$path"`
42843 
42844   # Now try to locate executable using which
42845   new_path=`$WHICH "$new_path" 2> /dev/null`
42846   # bat and cmd files are not always considered executable in cygwin causing which
42847   # to not find them
42848   if test "x$new_path" = x \
42849       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42850       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42851     new_path=`$CYGPATH -u "$path"`
42852   fi
42853   if test "x$new_path" = x; then
42854     # Oops. Which didn't find the executable.
42855     # The splitting of arguments from the executable at a space might have been incorrect,
42856     # since paths with space are more likely in Windows. Give it another try with the whole
42857     # argument.
42858     path="$complete"
42859     arguments="EOL"
42860     new_path=`$CYGPATH -u "$path"`
42861     new_path=`$WHICH "$new_path" 2> /dev/null`
42862     # bat and cmd files are not always considered executable in cygwin causing which
42863     # to not find them
42864     if test "x$new_path" = x \
42865         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42866         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42867       new_path=`$CYGPATH -u "$path"`
42868     fi
42869     if test "x$new_path" = x; then
42870       # It's still not found. Now this is an unrecoverable error.
42871       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42872 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42873       has_space=`$ECHO "$complete" | $GREP " "`
42874       if test "x$has_space" != x; then
42875         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42876 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42877       fi
42878       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42879     fi
42880   fi
42881 
42882   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42883   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42884   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42885   # "foo.exe" is OK but "foo" is an error.
42886   #
42887   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42888   # It is also a way to make sure we got the proper file name for the real test later on.
42889   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42890   if test "x$test_shortpath" = x; then
42891     # Short path failed, file does not exist as specified.
42892     # Try adding .exe or .cmd
42893     if test -f "${new_path}.exe"; then
42894       input_to_shortpath="${new_path}.exe"
42895     elif test -f "${new_path}.cmd"; then
42896       input_to_shortpath="${new_path}.cmd"
42897     else
42898       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42899 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42900       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42901 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42902       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42903     fi
42904   else
42905     input_to_shortpath="$new_path"
42906   fi
42907 
42908   # Call helper function which possibly converts this using DOS-style short mode.
42909   # If so, the updated path is stored in $new_path.
42910   new_path="$input_to_shortpath"
42911 
42912   input_path="$input_to_shortpath"
42913   # Check if we need to convert this using DOS-style short mode. If the path
42914   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42915   # take no chances and rewrite it.
42916   # Note: m4 eats our [], so we need to use [ and ] instead.
42917   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42918   if test "x$has_forbidden_chars" != x; then
42919     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42920     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42921     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42922     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42923       # Going to short mode and back again did indeed matter. Since short mode is
42924       # case insensitive, let's make it lowercase to improve readability.
42925       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42926       # Now convert it back to Unix-style (cygpath)
42927       input_path=`$CYGPATH -u "$shortmode_path"`
42928       new_path="$input_path"
42929     fi
42930   fi
42931 
42932   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42933   if test "x$test_cygdrive_prefix" = x; then
42934     # As a simple fix, exclude /usr/bin since it's not a real path.
42935     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42936       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42937       # a path prefixed by /cygdrive for fixpath to work.
42938       new_path="$CYGWIN_ROOT_PATH$input_path"
42939     fi
42940   fi
42941 
42942   # remove trailing .exe if any
42943   new_path="${new_path/%.exe/}"
42944 
42945     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42946 
42947   # First separate the path from the arguments. This will split at the first
42948   # space.
42949   complete="$OBJCOPY"
42950   path="${complete%% *}"
42951   tmp="$complete EOL"
42952   arguments="${tmp#* }"
42953 
42954   # Input might be given as Windows format, start by converting to
42955   # unix format.
42956   new_path="$path"
42957 
42958   windows_path="$new_path"
42959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42960     unix_path=`$CYGPATH -u "$windows_path"`
42961     new_path="$unix_path"
42962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42963     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42964     new_path="$unix_path"
42965   fi
42966 
42967 
42968   # Now try to locate executable using which
42969   new_path=`$WHICH "$new_path" 2> /dev/null`
42970 
42971   if test "x$new_path" = x; then
42972     # Oops. Which didn't find the executable.
42973     # The splitting of arguments from the executable at a space might have been incorrect,
42974     # since paths with space are more likely in Windows. Give it another try with the whole
42975     # argument.
42976     path="$complete"
42977     arguments="EOL"
42978     new_path="$path"
42979 
42980   windows_path="$new_path"
42981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42982     unix_path=`$CYGPATH -u "$windows_path"`
42983     new_path="$unix_path"
42984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42985     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42986     new_path="$unix_path"
42987   fi
42988 
42989 
42990     new_path=`$WHICH "$new_path" 2> /dev/null`
42991     # bat and cmd files are not always considered executable in MSYS causing which
42992     # to not find them
42993     if test "x$new_path" = x \
42994         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42995         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42996       new_path="$path"
42997 
42998   windows_path="$new_path"
42999   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43000     unix_path=`$CYGPATH -u "$windows_path"`
43001     new_path="$unix_path"
43002   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43003     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43004     new_path="$unix_path"
43005   fi
43006 
43007     fi
43008 
43009     if test "x$new_path" = x; then
43010       # It's still not found. Now this is an unrecoverable error.
43011       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43012 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43013       has_space=`$ECHO "$complete" | $GREP " "`
43014       if test "x$has_space" != x; then
43015         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43016 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43017       fi
43018       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43019     fi
43020   fi
43021 
43022   # Now new_path has a complete unix path to the binary
43023   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43024     # Keep paths in /bin as-is, but remove trailing .exe if any
43025     new_path="${new_path/%.exe/}"
43026     # Do not save /bin paths to all_fixpath_prefixes!
43027   else
43028     # Not in mixed or Windows style, start by that.
43029     new_path=`cmd //c echo $new_path`
43030 
43031   input_path="$new_path"
43032   # Check if we need to convert this using DOS-style short mode. If the path
43033   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43034   # take no chances and rewrite it.
43035   # Note: m4 eats our [], so we need to use [ and ] instead.
43036   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43037   if test "x$has_forbidden_chars" != x; then
43038     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43039     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43040   fi
43041 
43042     # Output is in $new_path
43043 
43044   windows_path="$new_path"
43045   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43046     unix_path=`$CYGPATH -u "$windows_path"`
43047     new_path="$unix_path"
43048   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43049     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43050     new_path="$unix_path"
43051   fi
43052 
43053     # remove trailing .exe if any
43054     new_path="${new_path/%.exe/}"
43055 
43056     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43057     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43058   fi
43059 
43060     else
43061       # We're on a unix platform. Hooray! :)
43062       # First separate the path from the arguments. This will split at the first
43063       # space.
43064       complete="$OBJCOPY"
43065       path="${complete%% *}"
43066       tmp="$complete EOL"
43067       arguments="${tmp#* }"
43068 
43069       # Cannot rely on the command "which" here since it doesn't always work.
43070       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43071       if test -z "$is_absolute_path"; then
43072         # Path to executable is not absolute. Find it.
43073         IFS_save="$IFS"
43074         IFS=:
43075         for p in $PATH; do
43076           if test -f "$p/$path" && test -x "$p/$path"; then
43077             new_path="$p/$path"
43078             break
43079           fi
43080         done
43081         IFS="$IFS_save"
43082       else
43083         # This is an absolute path, we can use it without further modifications.
43084         new_path="$path"
43085       fi
43086 
43087       if test "x$new_path" = x; then
43088         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43089 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43090         has_space=`$ECHO "$complete" | $GREP " "`
43091         if test "x$has_space" != x; then
43092           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43093 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43094         fi
43095         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43096       fi
43097     fi
43098 
43099     # Now join together the path and the arguments once again
43100     if test "x$arguments" != xEOL; then
43101       new_complete="$new_path ${arguments% *}"
43102     else
43103       new_complete="$new_path"
43104     fi
43105 
43106     if test "x$complete" != "x$new_complete"; then
43107       OBJCOPY="$new_complete"
43108       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43109 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43110     fi
43111   fi
43112 
43113       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43114         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43115         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43116         # - version number is last blank separate word on first line
43117         # - version number formats that have been seen:
43118         #   - <major>.<minor>
43119         #   - <major>.<minor>.<micro>
43120         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43121         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43122          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43123               -e 's/.* //' \
43124               -e '/^[01]\./b bad' \
43125               -e '/^2\./{' \
43126               -e '  s/^2\.//' \
43127               -e '  /^[0-9]$/b bad' \
43128               -e '  /^[0-9]\./b bad' \
43129               -e '  /^1[0-9]$/b bad' \
43130               -e '  /^1[0-9]\./b bad' \
43131               -e '  /^20\./b bad' \
43132               -e '  /^21\.0$/b bad' \
43133               -e '  /^21\.0\./b bad' \
43134               -e '}' \
43135               -e ':good' \
43136               -e 's/.*/VALID_VERSION/p' \
43137               -e 'q' \
43138               -e ':bad' \
43139               -e 's/.*/BAD_VERSION/p' \
43140               -e 'q'`
43141         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43142           OBJCOPY=
43143           { $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
43144 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43145           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43146 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43147           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43148 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43149           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43150 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43151           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43152 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43153         fi
43154       fi
43155     fi
43156   fi
43157 
43158 
43159 
43160   # Publish this variable in the help.
43161 
43162 
43163   if [ -z "${OBJDUMP+x}" ]; then
43164     # The variable is not set by user, try to locate tool using the code snippet
43165     if test -n "$ac_tool_prefix"; then
43166   for ac_prog in gobjdump objdump
43167   do
43168     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43169 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43171 $as_echo_n "checking for $ac_word... " >&6; }
43172 if ${ac_cv_prog_OBJDUMP+:} false; then :
43173   $as_echo_n "(cached) " >&6
43174 else
43175   if test -n "$OBJDUMP"; then
43176   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43177 else
43178 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43179 for as_dir in $PATH
43180 do
43181   IFS=$as_save_IFS
43182   test -z "$as_dir" && as_dir=.
43183     for ac_exec_ext in '' $ac_executable_extensions; do
43184   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43185     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43186     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43187     break 2
43188   fi
43189 done
43190   done
43191 IFS=$as_save_IFS
43192 
43193 fi
43194 fi
43195 OBJDUMP=$ac_cv_prog_OBJDUMP
43196 if test -n "$OBJDUMP"; then
43197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43198 $as_echo "$OBJDUMP" >&6; }
43199 else
43200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43201 $as_echo "no" >&6; }
43202 fi
43203 
43204 
43205     test -n "$OBJDUMP" && break
43206   done
43207 fi
43208 if test -z "$OBJDUMP"; then
43209   ac_ct_OBJDUMP=$OBJDUMP
43210   for ac_prog in gobjdump objdump
43211 do
43212   # Extract the first word of "$ac_prog", so it can be a program name with args.
43213 set dummy $ac_prog; ac_word=$2
43214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43215 $as_echo_n "checking for $ac_word... " >&6; }
43216 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43217   $as_echo_n "(cached) " >&6
43218 else
43219   if test -n "$ac_ct_OBJDUMP"; then
43220   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43221 else
43222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43223 for as_dir in $PATH
43224 do
43225   IFS=$as_save_IFS
43226   test -z "$as_dir" && as_dir=.
43227     for ac_exec_ext in '' $ac_executable_extensions; do
43228   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43229     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43231     break 2
43232   fi
43233 done
43234   done
43235 IFS=$as_save_IFS
43236 
43237 fi
43238 fi
43239 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43240 if test -n "$ac_ct_OBJDUMP"; then
43241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43242 $as_echo "$ac_ct_OBJDUMP" >&6; }
43243 else
43244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43245 $as_echo "no" >&6; }
43246 fi
43247 
43248 
43249   test -n "$ac_ct_OBJDUMP" && break
43250 done
43251 
43252   if test "x$ac_ct_OBJDUMP" = x; then
43253     OBJDUMP=""
43254   else
43255     case $cross_compiling:$ac_tool_warned in
43256 yes:)
43257 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43258 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43259 ac_tool_warned=yes ;;
43260 esac
43261     OBJDUMP=$ac_ct_OBJDUMP
43262   fi
43263 fi
43264 
43265   else
43266     # The variable is set, but is it from the command line or the environment?
43267 
43268     # Try to remove the string !OBJDUMP! from our list.
43269     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43270     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43271       # If it failed, the variable was not from the command line. Ignore it,
43272       # but warn the user (except for BASH, which is always set by the calling BASH).
43273       if test "xOBJDUMP" != xBASH; then
43274         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43275 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43276       fi
43277       # Try to locate tool using the code snippet
43278       if test -n "$ac_tool_prefix"; then
43279   for ac_prog in gobjdump objdump
43280   do
43281     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43282 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43284 $as_echo_n "checking for $ac_word... " >&6; }
43285 if ${ac_cv_prog_OBJDUMP+:} false; then :
43286   $as_echo_n "(cached) " >&6
43287 else
43288   if test -n "$OBJDUMP"; then
43289   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43290 else
43291 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43292 for as_dir in $PATH
43293 do
43294   IFS=$as_save_IFS
43295   test -z "$as_dir" && as_dir=.
43296     for ac_exec_ext in '' $ac_executable_extensions; do
43297   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43298     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43299     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43300     break 2
43301   fi
43302 done
43303   done
43304 IFS=$as_save_IFS
43305 
43306 fi
43307 fi
43308 OBJDUMP=$ac_cv_prog_OBJDUMP
43309 if test -n "$OBJDUMP"; then
43310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43311 $as_echo "$OBJDUMP" >&6; }
43312 else
43313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43314 $as_echo "no" >&6; }
43315 fi
43316 
43317 
43318     test -n "$OBJDUMP" && break
43319   done
43320 fi
43321 if test -z "$OBJDUMP"; then
43322   ac_ct_OBJDUMP=$OBJDUMP
43323   for ac_prog in gobjdump objdump
43324 do
43325   # Extract the first word of "$ac_prog", so it can be a program name with args.
43326 set dummy $ac_prog; ac_word=$2
43327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43328 $as_echo_n "checking for $ac_word... " >&6; }
43329 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43330   $as_echo_n "(cached) " >&6
43331 else
43332   if test -n "$ac_ct_OBJDUMP"; then
43333   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43334 else
43335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43336 for as_dir in $PATH
43337 do
43338   IFS=$as_save_IFS
43339   test -z "$as_dir" && as_dir=.
43340     for ac_exec_ext in '' $ac_executable_extensions; do
43341   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43342     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43343     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43344     break 2
43345   fi
43346 done
43347   done
43348 IFS=$as_save_IFS
43349 
43350 fi
43351 fi
43352 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43353 if test -n "$ac_ct_OBJDUMP"; then
43354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43355 $as_echo "$ac_ct_OBJDUMP" >&6; }
43356 else
43357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43358 $as_echo "no" >&6; }
43359 fi
43360 
43361 
43362   test -n "$ac_ct_OBJDUMP" && break
43363 done
43364 
43365   if test "x$ac_ct_OBJDUMP" = x; then
43366     OBJDUMP=""
43367   else
43368     case $cross_compiling:$ac_tool_warned in
43369 yes:)
43370 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43371 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43372 ac_tool_warned=yes ;;
43373 esac
43374     OBJDUMP=$ac_ct_OBJDUMP
43375   fi
43376 fi
43377 
43378     else
43379       # If it succeeded, then it was overridden by the user. We will use it
43380       # for the tool.
43381 
43382       # First remove it from the list of overridden variables, so we can test
43383       # for unknown variables in the end.
43384       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43385 
43386       # Check if we try to supply an empty value
43387       if test "x$OBJDUMP" = x; then
43388         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43389 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43390         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43391 $as_echo_n "checking for OBJDUMP... " >&6; }
43392         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43393 $as_echo "disabled" >&6; }
43394       else
43395         # Check if the provided tool contains a complete path.
43396         tool_specified="$OBJDUMP"
43397         tool_basename="${tool_specified##*/}"
43398         if test "x$tool_basename" = "x$tool_specified"; then
43399           # A command without a complete path is provided, search $PATH.
43400           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43401 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43402           # Extract the first word of "$tool_basename", so it can be a program name with args.
43403 set dummy $tool_basename; ac_word=$2
43404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43405 $as_echo_n "checking for $ac_word... " >&6; }
43406 if ${ac_cv_path_OBJDUMP+:} false; then :
43407   $as_echo_n "(cached) " >&6
43408 else
43409   case $OBJDUMP in
43410   [\\/]* | ?:[\\/]*)
43411   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43412   ;;
43413   *)
43414   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43415 for as_dir in $PATH
43416 do
43417   IFS=$as_save_IFS
43418   test -z "$as_dir" && as_dir=.
43419     for ac_exec_ext in '' $ac_executable_extensions; do
43420   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43421     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43422     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43423     break 2
43424   fi
43425 done
43426   done
43427 IFS=$as_save_IFS
43428 
43429   ;;
43430 esac
43431 fi
43432 OBJDUMP=$ac_cv_path_OBJDUMP
43433 if test -n "$OBJDUMP"; then
43434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43435 $as_echo "$OBJDUMP" >&6; }
43436 else
43437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43438 $as_echo "no" >&6; }
43439 fi
43440 
43441 
43442           if test "x$OBJDUMP" = x; then
43443             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43444           fi
43445         else
43446           # Otherwise we believe it is a complete path. Use it as it is.
43447           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43448 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43449           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43450 $as_echo_n "checking for OBJDUMP... " >&6; }
43451           if test ! -x "$tool_specified"; then
43452             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43453 $as_echo "not found" >&6; }
43454             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43455           fi
43456           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43457 $as_echo "$tool_specified" >&6; }
43458         fi
43459       fi
43460     fi
43461 
43462   fi
43463 
43464 
43465   if test "x$OBJDUMP" != x; then
43466     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43467     # bails if argument is missing.
43468 
43469   # Only process if variable expands to non-empty
43470 
43471   if test "x$OBJDUMP" != x; then
43472     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43473 
43474   # First separate the path from the arguments. This will split at the first
43475   # space.
43476   complete="$OBJDUMP"
43477   path="${complete%% *}"
43478   tmp="$complete EOL"
43479   arguments="${tmp#* }"
43480 
43481   # Input might be given as Windows format, start by converting to
43482   # unix format.
43483   new_path=`$CYGPATH -u "$path"`
43484 
43485   # Now try to locate executable using which
43486   new_path=`$WHICH "$new_path" 2> /dev/null`
43487   # bat and cmd files are not always considered executable in cygwin causing which
43488   # to not find them
43489   if test "x$new_path" = x \
43490       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43491       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43492     new_path=`$CYGPATH -u "$path"`
43493   fi
43494   if test "x$new_path" = x; then
43495     # Oops. Which didn't find the executable.
43496     # The splitting of arguments from the executable at a space might have been incorrect,
43497     # since paths with space are more likely in Windows. Give it another try with the whole
43498     # argument.
43499     path="$complete"
43500     arguments="EOL"
43501     new_path=`$CYGPATH -u "$path"`
43502     new_path=`$WHICH "$new_path" 2> /dev/null`
43503     # bat and cmd files are not always considered executable in cygwin causing which
43504     # to not find them
43505     if test "x$new_path" = x \
43506         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43507         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43508       new_path=`$CYGPATH -u "$path"`
43509     fi
43510     if test "x$new_path" = x; then
43511       # It's still not found. Now this is an unrecoverable error.
43512       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43513 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43514       has_space=`$ECHO "$complete" | $GREP " "`
43515       if test "x$has_space" != x; then
43516         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43517 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43518       fi
43519       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43520     fi
43521   fi
43522 
43523   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43524   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43525   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43526   # "foo.exe" is OK but "foo" is an error.
43527   #
43528   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43529   # It is also a way to make sure we got the proper file name for the real test later on.
43530   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43531   if test "x$test_shortpath" = x; then
43532     # Short path failed, file does not exist as specified.
43533     # Try adding .exe or .cmd
43534     if test -f "${new_path}.exe"; then
43535       input_to_shortpath="${new_path}.exe"
43536     elif test -f "${new_path}.cmd"; then
43537       input_to_shortpath="${new_path}.cmd"
43538     else
43539       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43540 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43541       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43542 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43543       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43544     fi
43545   else
43546     input_to_shortpath="$new_path"
43547   fi
43548 
43549   # Call helper function which possibly converts this using DOS-style short mode.
43550   # If so, the updated path is stored in $new_path.
43551   new_path="$input_to_shortpath"
43552 
43553   input_path="$input_to_shortpath"
43554   # Check if we need to convert this using DOS-style short mode. If the path
43555   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43556   # take no chances and rewrite it.
43557   # Note: m4 eats our [], so we need to use [ and ] instead.
43558   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43559   if test "x$has_forbidden_chars" != x; then
43560     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43561     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43562     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43563     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43564       # Going to short mode and back again did indeed matter. Since short mode is
43565       # case insensitive, let's make it lowercase to improve readability.
43566       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43567       # Now convert it back to Unix-style (cygpath)
43568       input_path=`$CYGPATH -u "$shortmode_path"`
43569       new_path="$input_path"
43570     fi
43571   fi
43572 
43573   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43574   if test "x$test_cygdrive_prefix" = x; then
43575     # As a simple fix, exclude /usr/bin since it's not a real path.
43576     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43577       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43578       # a path prefixed by /cygdrive for fixpath to work.
43579       new_path="$CYGWIN_ROOT_PATH$input_path"
43580     fi
43581   fi
43582 
43583   # remove trailing .exe if any
43584   new_path="${new_path/%.exe/}"
43585 
43586     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43587 
43588   # First separate the path from the arguments. This will split at the first
43589   # space.
43590   complete="$OBJDUMP"
43591   path="${complete%% *}"
43592   tmp="$complete EOL"
43593   arguments="${tmp#* }"
43594 
43595   # Input might be given as Windows format, start by converting to
43596   # unix format.
43597   new_path="$path"
43598 
43599   windows_path="$new_path"
43600   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43601     unix_path=`$CYGPATH -u "$windows_path"`
43602     new_path="$unix_path"
43603   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43604     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43605     new_path="$unix_path"
43606   fi
43607 
43608 
43609   # Now try to locate executable using which
43610   new_path=`$WHICH "$new_path" 2> /dev/null`
43611 
43612   if test "x$new_path" = x; then
43613     # Oops. Which didn't find the executable.
43614     # The splitting of arguments from the executable at a space might have been incorrect,
43615     # since paths with space are more likely in Windows. Give it another try with the whole
43616     # argument.
43617     path="$complete"
43618     arguments="EOL"
43619     new_path="$path"
43620 
43621   windows_path="$new_path"
43622   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43623     unix_path=`$CYGPATH -u "$windows_path"`
43624     new_path="$unix_path"
43625   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43626     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43627     new_path="$unix_path"
43628   fi
43629 
43630 
43631     new_path=`$WHICH "$new_path" 2> /dev/null`
43632     # bat and cmd files are not always considered executable in MSYS causing which
43633     # to not find them
43634     if test "x$new_path" = x \
43635         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43636         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43637       new_path="$path"
43638 
43639   windows_path="$new_path"
43640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43641     unix_path=`$CYGPATH -u "$windows_path"`
43642     new_path="$unix_path"
43643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43644     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43645     new_path="$unix_path"
43646   fi
43647 
43648     fi
43649 
43650     if test "x$new_path" = x; then
43651       # It's still not found. Now this is an unrecoverable error.
43652       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43653 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43654       has_space=`$ECHO "$complete" | $GREP " "`
43655       if test "x$has_space" != x; then
43656         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43657 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43658       fi
43659       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43660     fi
43661   fi
43662 
43663   # Now new_path has a complete unix path to the binary
43664   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43665     # Keep paths in /bin as-is, but remove trailing .exe if any
43666     new_path="${new_path/%.exe/}"
43667     # Do not save /bin paths to all_fixpath_prefixes!
43668   else
43669     # Not in mixed or Windows style, start by that.
43670     new_path=`cmd //c echo $new_path`
43671 
43672   input_path="$new_path"
43673   # Check if we need to convert this using DOS-style short mode. If the path
43674   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43675   # take no chances and rewrite it.
43676   # Note: m4 eats our [], so we need to use [ and ] instead.
43677   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43678   if test "x$has_forbidden_chars" != x; then
43679     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43680     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43681   fi
43682 
43683     # Output is in $new_path
43684 
43685   windows_path="$new_path"
43686   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43687     unix_path=`$CYGPATH -u "$windows_path"`
43688     new_path="$unix_path"
43689   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43690     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43691     new_path="$unix_path"
43692   fi
43693 
43694     # remove trailing .exe if any
43695     new_path="${new_path/%.exe/}"
43696 
43697     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43698     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43699   fi
43700 
43701     else
43702       # We're on a unix platform. Hooray! :)
43703       # First separate the path from the arguments. This will split at the first
43704       # space.
43705       complete="$OBJDUMP"
43706       path="${complete%% *}"
43707       tmp="$complete EOL"
43708       arguments="${tmp#* }"
43709 
43710       # Cannot rely on the command "which" here since it doesn't always work.
43711       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43712       if test -z "$is_absolute_path"; then
43713         # Path to executable is not absolute. Find it.
43714         IFS_save="$IFS"
43715         IFS=:
43716         for p in $PATH; do
43717           if test -f "$p/$path" && test -x "$p/$path"; then
43718             new_path="$p/$path"
43719             break
43720           fi
43721         done
43722         IFS="$IFS_save"
43723       else
43724         # This is an absolute path, we can use it without further modifications.
43725         new_path="$path"
43726       fi
43727 
43728       if test "x$new_path" = x; then
43729         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43730 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43731         has_space=`$ECHO "$complete" | $GREP " "`
43732         if test "x$has_space" != x; then
43733           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43734 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43735         fi
43736         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43737       fi
43738     fi
43739 
43740     # Now join together the path and the arguments once again
43741     if test "x$arguments" != xEOL; then
43742       new_complete="$new_path ${arguments% *}"
43743     else
43744       new_complete="$new_path"
43745     fi
43746 
43747     if test "x$complete" != "x$new_complete"; then
43748       OBJDUMP="$new_complete"
43749       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43750 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43751     fi
43752   fi
43753 
43754   fi
43755 
43756 
43757   # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43758   # to remain in place. Otherwise the compiler will not work in some siutations
43759   # in later configure checks.
43760   if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43761     PATH="$OLD_PATH"
43762   fi
43763 
43764   # Restore the flags to the user specified values.
43765   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43766   CFLAGS="$ORG_CFLAGS"
43767   CXXFLAGS="$ORG_CXXFLAGS"
43768 
43769 
43770 # Finally do some processing after the detection phase
43771 
43772   if test "x$COMPILE_TYPE" = "xcross"; then
43773     # Now we need to find a C/C++ compiler that can build executables for the
43774     # build platform. We can't use the AC_PROG_CC macro, since it can only be
43775     # used once. Also, we need to do this without adding a tools dir to the
43776     # path, otherwise we might pick up cross-compilers which don't use standard
43777     # naming.
43778 
43779     OLDPATH="$PATH"
43780 
43781 
43782 # Check whether --with-build-devkit was given.
43783 if test "${with_build_devkit+set}" = set; then :
43784   withval=$with_build_devkit;
43785 fi
43786 
43787     if test "x$with_build_devkit" = "xyes"; then
43788       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43789     elif test -n "$with_build_devkit"; then
43790       if test ! -d "$with_build_devkit"; then
43791         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43792       else
43793 
43794   # Only process if variable expands to non-empty
43795 
43796   if test "x$with_build_devkit" != x; then
43797     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43798 
43799   # Input might be given as Windows format, start by converting to
43800   # unix format.
43801   path="$with_build_devkit"
43802   new_path=`$CYGPATH -u "$path"`
43803 
43804   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43805   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43806   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43807   # "foo.exe" is OK but "foo" is an error.
43808   #
43809   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43810   # It is also a way to make sure we got the proper file name for the real test later on.
43811   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43812   if test "x$test_shortpath" = x; then
43813     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43814 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43815     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43816   fi
43817 
43818   # Call helper function which possibly converts this using DOS-style short mode.
43819   # If so, the updated path is stored in $new_path.
43820 
43821   input_path="$new_path"
43822   # Check if we need to convert this using DOS-style short mode. If the path
43823   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43824   # take no chances and rewrite it.
43825   # Note: m4 eats our [], so we need to use [ and ] instead.
43826   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43827   if test "x$has_forbidden_chars" != x; then
43828     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43829     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43830     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43831     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43832       # Going to short mode and back again did indeed matter. Since short mode is
43833       # case insensitive, let's make it lowercase to improve readability.
43834       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43835       # Now convert it back to Unix-style (cygpath)
43836       input_path=`$CYGPATH -u "$shortmode_path"`
43837       new_path="$input_path"
43838     fi
43839   fi
43840 
43841   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43842   if test "x$test_cygdrive_prefix" = x; then
43843     # As a simple fix, exclude /usr/bin since it's not a real path.
43844     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43845       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43846       # a path prefixed by /cygdrive for fixpath to work.
43847       new_path="$CYGWIN_ROOT_PATH$input_path"
43848     fi
43849   fi
43850 
43851 
43852   if test "x$path" != "x$new_path"; then
43853     with_build_devkit="$new_path"
43854     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43855 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43856   fi
43857 
43858     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43859 
43860   path="$with_build_devkit"
43861   has_colon=`$ECHO $path | $GREP ^.:`
43862   new_path="$path"
43863   if test "x$has_colon" = x; then
43864     # Not in mixed or Windows style, start by that.
43865     new_path=`cmd //c echo $path`
43866   fi
43867 
43868 
43869   input_path="$new_path"
43870   # Check if we need to convert this using DOS-style short mode. If the path
43871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43872   # take no chances and rewrite it.
43873   # Note: m4 eats our [], so we need to use [ and ] instead.
43874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43875   if test "x$has_forbidden_chars" != x; then
43876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43877     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43878   fi
43879 
43880 
43881   windows_path="$new_path"
43882   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43883     unix_path=`$CYGPATH -u "$windows_path"`
43884     new_path="$unix_path"
43885   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43886     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43887     new_path="$unix_path"
43888   fi
43889 
43890   if test "x$path" != "x$new_path"; then
43891     with_build_devkit="$new_path"
43892     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43893 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43894   fi
43895 
43896   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43897   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43898 
43899     else
43900       # We're on a unix platform. Hooray! :)
43901       path="$with_build_devkit"
43902       has_space=`$ECHO "$path" | $GREP " "`
43903       if test "x$has_space" != x; then
43904         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43905 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43906         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43907       fi
43908 
43909       # Use eval to expand a potential ~
43910       eval path="$path"
43911       if test ! -f "$path" && test ! -d "$path"; then
43912         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43913       fi
43914 
43915       if test -d "$path"; then
43916         with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43917       else
43918         dir="`$DIRNAME "$path"`"
43919         base="`$BASENAME "$path"`"
43920         with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43921       fi
43922     fi
43923   fi
43924 
43925         BUILD_DEVKIT_ROOT="$with_build_devkit"
43926         # Check for a meta data info file in the root of the devkit
43927         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43928           # Process devkit.info so that existing devkit variables are not
43929           # modified by this
43930           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43931               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43932               -e "s/\$host/\$build/g" \
43933               $BUILD_DEVKIT_ROOT/devkit.info \
43934               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43935           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43936           # This potentially sets the following:
43937           # A descriptive name of the devkit
43938 
43939   if test "x$BUILD_DEVKIT_NAME" = x; then
43940     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43941   fi
43942 
43943           # Corresponds to --with-extra-path
43944 
43945   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43946     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43947   fi
43948 
43949           # Corresponds to --with-toolchain-path
43950 
43951   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43952     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43953   fi
43954 
43955           # Corresponds to --with-sysroot
43956 
43957   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43958     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43959   fi
43960 
43961           # Skip the Window specific parts
43962         fi
43963 
43964         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43965 $as_echo_n "checking for build platform devkit... " >&6; }
43966         if test "x$BUILD_DEVKIT_NAME" != x; then
43967           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43968 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43969         else
43970           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43971 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43972         fi
43973 
43974         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43975 
43976   if test "x$BUILD_SYSROOT" != "x"; then
43977     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43978       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43979         # Solaris Studio does not have a concept of sysroot. Instead we must
43980         # make sure the default include and lib dirs are appended to each
43981         # compile and link command line. Must also add -I-xbuiltin to enable
43982         # inlining of system functions and intrinsics.
43983         BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43984         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43985             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
43986       fi
43987     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43988       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43989       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43990     elif test "x$TOOLCHAIN_TYPE" = xclang; then
43991       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43992       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43993     fi
43994     # Propagate the sysroot args to hotspot
43995     BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43996     BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43997     BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43998     # The global CFLAGS and LDFLAGS variables need these for configure to function
43999     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44000     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44001     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44002     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44003   fi
44004 
44005   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44006     # We also need -iframework<path>/System/Library/Frameworks
44007     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44008     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44009     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44010     # set this here so it doesn't have to be peppered throughout the forest
44011     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44012     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44013   fi
44014 
44015 
44016 
44017 
44018 
44019          # Fallback default of just /bin if DEVKIT_PATH is not defined
44020         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44021           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44022         fi
44023         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44024       fi
44025     fi
44026 
44027     # FIXME: we should list the discovered compilers as an exclude pattern!
44028     # If we do that, we can do this detection before POST_DETECTION, and still
44029     # find the build compilers in the tools dir, if needed.
44030 
44031 
44032 
44033   # Publish this variable in the help.
44034 
44035 
44036   if [ -z "${BUILD_CC+x}" ]; then
44037     # The variable is not set by user, try to locate tool using the code snippet
44038     for ac_prog in cl cc gcc
44039 do
44040   # Extract the first word of "$ac_prog", so it can be a program name with args.
44041 set dummy $ac_prog; ac_word=$2
44042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44043 $as_echo_n "checking for $ac_word... " >&6; }
44044 if ${ac_cv_path_BUILD_CC+:} false; then :
44045   $as_echo_n "(cached) " >&6
44046 else
44047   case $BUILD_CC in
44048   [\\/]* | ?:[\\/]*)
44049   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44050   ;;
44051   *)
44052   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44053 for as_dir in $PATH
44054 do
44055   IFS=$as_save_IFS
44056   test -z "$as_dir" && as_dir=.
44057     for ac_exec_ext in '' $ac_executable_extensions; do
44058   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44059     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44060     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44061     break 2
44062   fi
44063 done
44064   done
44065 IFS=$as_save_IFS
44066 
44067   ;;
44068 esac
44069 fi
44070 BUILD_CC=$ac_cv_path_BUILD_CC
44071 if test -n "$BUILD_CC"; then
44072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44073 $as_echo "$BUILD_CC" >&6; }
44074 else
44075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44076 $as_echo "no" >&6; }
44077 fi
44078 
44079 
44080   test -n "$BUILD_CC" && break
44081 done
44082 
44083   else
44084     # The variable is set, but is it from the command line or the environment?
44085 
44086     # Try to remove the string !BUILD_CC! from our list.
44087     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44088     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44089       # If it failed, the variable was not from the command line. Ignore it,
44090       # but warn the user (except for BASH, which is always set by the calling BASH).
44091       if test "xBUILD_CC" != xBASH; then
44092         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44093 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44094       fi
44095       # Try to locate tool using the code snippet
44096       for ac_prog in cl cc gcc
44097 do
44098   # Extract the first word of "$ac_prog", so it can be a program name with args.
44099 set dummy $ac_prog; ac_word=$2
44100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44101 $as_echo_n "checking for $ac_word... " >&6; }
44102 if ${ac_cv_path_BUILD_CC+:} false; then :
44103   $as_echo_n "(cached) " >&6
44104 else
44105   case $BUILD_CC in
44106   [\\/]* | ?:[\\/]*)
44107   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44108   ;;
44109   *)
44110   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44111 for as_dir in $PATH
44112 do
44113   IFS=$as_save_IFS
44114   test -z "$as_dir" && as_dir=.
44115     for ac_exec_ext in '' $ac_executable_extensions; do
44116   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44117     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44118     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44119     break 2
44120   fi
44121 done
44122   done
44123 IFS=$as_save_IFS
44124 
44125   ;;
44126 esac
44127 fi
44128 BUILD_CC=$ac_cv_path_BUILD_CC
44129 if test -n "$BUILD_CC"; then
44130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44131 $as_echo "$BUILD_CC" >&6; }
44132 else
44133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44134 $as_echo "no" >&6; }
44135 fi
44136 
44137 
44138   test -n "$BUILD_CC" && break
44139 done
44140 
44141     else
44142       # If it succeeded, then it was overridden by the user. We will use it
44143       # for the tool.
44144 
44145       # First remove it from the list of overridden variables, so we can test
44146       # for unknown variables in the end.
44147       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44148 
44149       # Check if we try to supply an empty value
44150       if test "x$BUILD_CC" = x; then
44151         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44152 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44153         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44154 $as_echo_n "checking for BUILD_CC... " >&6; }
44155         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44156 $as_echo "disabled" >&6; }
44157       else
44158         # Check if the provided tool contains a complete path.
44159         tool_specified="$BUILD_CC"
44160         tool_basename="${tool_specified##*/}"
44161         if test "x$tool_basename" = "x$tool_specified"; then
44162           # A command without a complete path is provided, search $PATH.
44163           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44164 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44165           # Extract the first word of "$tool_basename", so it can be a program name with args.
44166 set dummy $tool_basename; ac_word=$2
44167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44168 $as_echo_n "checking for $ac_word... " >&6; }
44169 if ${ac_cv_path_BUILD_CC+:} false; then :
44170   $as_echo_n "(cached) " >&6
44171 else
44172   case $BUILD_CC in
44173   [\\/]* | ?:[\\/]*)
44174   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44175   ;;
44176   *)
44177   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44178 for as_dir in $PATH
44179 do
44180   IFS=$as_save_IFS
44181   test -z "$as_dir" && as_dir=.
44182     for ac_exec_ext in '' $ac_executable_extensions; do
44183   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44184     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44186     break 2
44187   fi
44188 done
44189   done
44190 IFS=$as_save_IFS
44191 
44192   ;;
44193 esac
44194 fi
44195 BUILD_CC=$ac_cv_path_BUILD_CC
44196 if test -n "$BUILD_CC"; then
44197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44198 $as_echo "$BUILD_CC" >&6; }
44199 else
44200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44201 $as_echo "no" >&6; }
44202 fi
44203 
44204 
44205           if test "x$BUILD_CC" = x; then
44206             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44207           fi
44208         else
44209           # Otherwise we believe it is a complete path. Use it as it is.
44210           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44211 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44212           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44213 $as_echo_n "checking for BUILD_CC... " >&6; }
44214           if test ! -x "$tool_specified"; then
44215             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44216 $as_echo "not found" >&6; }
44217             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44218           fi
44219           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44220 $as_echo "$tool_specified" >&6; }
44221         fi
44222       fi
44223     fi
44224 
44225   fi
44226 
44227 
44228 
44229   if test "x$BUILD_CC" = x; then
44230     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44231   fi
44232 
44233 
44234 
44235   # Only process if variable expands to non-empty
44236 
44237   if test "x$BUILD_CC" != x; then
44238     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44239 
44240   # First separate the path from the arguments. This will split at the first
44241   # space.
44242   complete="$BUILD_CC"
44243   path="${complete%% *}"
44244   tmp="$complete EOL"
44245   arguments="${tmp#* }"
44246 
44247   # Input might be given as Windows format, start by converting to
44248   # unix format.
44249   new_path=`$CYGPATH -u "$path"`
44250 
44251   # Now try to locate executable using which
44252   new_path=`$WHICH "$new_path" 2> /dev/null`
44253   # bat and cmd files are not always considered executable in cygwin causing which
44254   # to not find them
44255   if test "x$new_path" = x \
44256       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44257       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44258     new_path=`$CYGPATH -u "$path"`
44259   fi
44260   if test "x$new_path" = x; then
44261     # Oops. Which didn't find the executable.
44262     # The splitting of arguments from the executable at a space might have been incorrect,
44263     # since paths with space are more likely in Windows. Give it another try with the whole
44264     # argument.
44265     path="$complete"
44266     arguments="EOL"
44267     new_path=`$CYGPATH -u "$path"`
44268     new_path=`$WHICH "$new_path" 2> /dev/null`
44269     # bat and cmd files are not always considered executable in cygwin causing which
44270     # to not find them
44271     if test "x$new_path" = x \
44272         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44273         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44274       new_path=`$CYGPATH -u "$path"`
44275     fi
44276     if test "x$new_path" = x; then
44277       # It's still not found. Now this is an unrecoverable error.
44278       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44279 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44280       has_space=`$ECHO "$complete" | $GREP " "`
44281       if test "x$has_space" != x; then
44282         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44283 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44284       fi
44285       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44286     fi
44287   fi
44288 
44289   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44290   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44291   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44292   # "foo.exe" is OK but "foo" is an error.
44293   #
44294   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44295   # It is also a way to make sure we got the proper file name for the real test later on.
44296   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44297   if test "x$test_shortpath" = x; then
44298     # Short path failed, file does not exist as specified.
44299     # Try adding .exe or .cmd
44300     if test -f "${new_path}.exe"; then
44301       input_to_shortpath="${new_path}.exe"
44302     elif test -f "${new_path}.cmd"; then
44303       input_to_shortpath="${new_path}.cmd"
44304     else
44305       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44306 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44307       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44308 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44309       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44310     fi
44311   else
44312     input_to_shortpath="$new_path"
44313   fi
44314 
44315   # Call helper function which possibly converts this using DOS-style short mode.
44316   # If so, the updated path is stored in $new_path.
44317   new_path="$input_to_shortpath"
44318 
44319   input_path="$input_to_shortpath"
44320   # Check if we need to convert this using DOS-style short mode. If the path
44321   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44322   # take no chances and rewrite it.
44323   # Note: m4 eats our [], so we need to use [ and ] instead.
44324   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44325   if test "x$has_forbidden_chars" != x; then
44326     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44327     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44328     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44329     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44330       # Going to short mode and back again did indeed matter. Since short mode is
44331       # case insensitive, let's make it lowercase to improve readability.
44332       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44333       # Now convert it back to Unix-style (cygpath)
44334       input_path=`$CYGPATH -u "$shortmode_path"`
44335       new_path="$input_path"
44336     fi
44337   fi
44338 
44339   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44340   if test "x$test_cygdrive_prefix" = x; then
44341     # As a simple fix, exclude /usr/bin since it's not a real path.
44342     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44343       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44344       # a path prefixed by /cygdrive for fixpath to work.
44345       new_path="$CYGWIN_ROOT_PATH$input_path"
44346     fi
44347   fi
44348 
44349   # remove trailing .exe if any
44350   new_path="${new_path/%.exe/}"
44351 
44352     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44353 
44354   # First separate the path from the arguments. This will split at the first
44355   # space.
44356   complete="$BUILD_CC"
44357   path="${complete%% *}"
44358   tmp="$complete EOL"
44359   arguments="${tmp#* }"
44360 
44361   # Input might be given as Windows format, start by converting to
44362   # unix format.
44363   new_path="$path"
44364 
44365   windows_path="$new_path"
44366   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44367     unix_path=`$CYGPATH -u "$windows_path"`
44368     new_path="$unix_path"
44369   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44370     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44371     new_path="$unix_path"
44372   fi
44373 
44374 
44375   # Now try to locate executable using which
44376   new_path=`$WHICH "$new_path" 2> /dev/null`
44377 
44378   if test "x$new_path" = x; then
44379     # Oops. Which didn't find the executable.
44380     # The splitting of arguments from the executable at a space might have been incorrect,
44381     # since paths with space are more likely in Windows. Give it another try with the whole
44382     # argument.
44383     path="$complete"
44384     arguments="EOL"
44385     new_path="$path"
44386 
44387   windows_path="$new_path"
44388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44389     unix_path=`$CYGPATH -u "$windows_path"`
44390     new_path="$unix_path"
44391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44393     new_path="$unix_path"
44394   fi
44395 
44396 
44397     new_path=`$WHICH "$new_path" 2> /dev/null`
44398     # bat and cmd files are not always considered executable in MSYS causing which
44399     # to not find them
44400     if test "x$new_path" = x \
44401         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44402         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44403       new_path="$path"
44404 
44405   windows_path="$new_path"
44406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44407     unix_path=`$CYGPATH -u "$windows_path"`
44408     new_path="$unix_path"
44409   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44410     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44411     new_path="$unix_path"
44412   fi
44413 
44414     fi
44415 
44416     if test "x$new_path" = x; then
44417       # It's still not found. Now this is an unrecoverable error.
44418       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44419 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44420       has_space=`$ECHO "$complete" | $GREP " "`
44421       if test "x$has_space" != x; then
44422         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44423 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44424       fi
44425       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44426     fi
44427   fi
44428 
44429   # Now new_path has a complete unix path to the binary
44430   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44431     # Keep paths in /bin as-is, but remove trailing .exe if any
44432     new_path="${new_path/%.exe/}"
44433     # Do not save /bin paths to all_fixpath_prefixes!
44434   else
44435     # Not in mixed or Windows style, start by that.
44436     new_path=`cmd //c echo $new_path`
44437 
44438   input_path="$new_path"
44439   # Check if we need to convert this using DOS-style short mode. If the path
44440   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44441   # take no chances and rewrite it.
44442   # Note: m4 eats our [], so we need to use [ and ] instead.
44443   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44444   if test "x$has_forbidden_chars" != x; then
44445     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44446     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44447   fi
44448 
44449     # Output is in $new_path
44450 
44451   windows_path="$new_path"
44452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44453     unix_path=`$CYGPATH -u "$windows_path"`
44454     new_path="$unix_path"
44455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44456     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44457     new_path="$unix_path"
44458   fi
44459 
44460     # remove trailing .exe if any
44461     new_path="${new_path/%.exe/}"
44462 
44463     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44464     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44465   fi
44466 
44467     else
44468       # We're on a unix platform. Hooray! :)
44469       # First separate the path from the arguments. This will split at the first
44470       # space.
44471       complete="$BUILD_CC"
44472       path="${complete%% *}"
44473       tmp="$complete EOL"
44474       arguments="${tmp#* }"
44475 
44476       # Cannot rely on the command "which" here since it doesn't always work.
44477       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44478       if test -z "$is_absolute_path"; then
44479         # Path to executable is not absolute. Find it.
44480         IFS_save="$IFS"
44481         IFS=:
44482         for p in $PATH; do
44483           if test -f "$p/$path" && test -x "$p/$path"; then
44484             new_path="$p/$path"
44485             break
44486           fi
44487         done
44488         IFS="$IFS_save"
44489       else
44490         # This is an absolute path, we can use it without further modifications.
44491         new_path="$path"
44492       fi
44493 
44494       if test "x$new_path" = x; then
44495         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44496 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44497         has_space=`$ECHO "$complete" | $GREP " "`
44498         if test "x$has_space" != x; then
44499           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44500 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44501         fi
44502         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44503       fi
44504     fi
44505 
44506     # Now join together the path and the arguments once again
44507     if test "x$arguments" != xEOL; then
44508       new_complete="$new_path ${arguments% *}"
44509     else
44510       new_complete="$new_path"
44511     fi
44512 
44513     if test "x$complete" != "x$new_complete"; then
44514       BUILD_CC="$new_complete"
44515       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44516 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44517     fi
44518   fi
44519 
44520 
44521 
44522 
44523   # Publish this variable in the help.
44524 
44525 
44526   if [ -z "${BUILD_CXX+x}" ]; then
44527     # The variable is not set by user, try to locate tool using the code snippet
44528     for ac_prog in cl CC g++
44529 do
44530   # Extract the first word of "$ac_prog", so it can be a program name with args.
44531 set dummy $ac_prog; ac_word=$2
44532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44533 $as_echo_n "checking for $ac_word... " >&6; }
44534 if ${ac_cv_path_BUILD_CXX+:} false; then :
44535   $as_echo_n "(cached) " >&6
44536 else
44537   case $BUILD_CXX in
44538   [\\/]* | ?:[\\/]*)
44539   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44540   ;;
44541   *)
44542   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44543 for as_dir in $PATH
44544 do
44545   IFS=$as_save_IFS
44546   test -z "$as_dir" && as_dir=.
44547     for ac_exec_ext in '' $ac_executable_extensions; do
44548   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44549     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44550     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44551     break 2
44552   fi
44553 done
44554   done
44555 IFS=$as_save_IFS
44556 
44557   ;;
44558 esac
44559 fi
44560 BUILD_CXX=$ac_cv_path_BUILD_CXX
44561 if test -n "$BUILD_CXX"; then
44562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44563 $as_echo "$BUILD_CXX" >&6; }
44564 else
44565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44566 $as_echo "no" >&6; }
44567 fi
44568 
44569 
44570   test -n "$BUILD_CXX" && break
44571 done
44572 
44573   else
44574     # The variable is set, but is it from the command line or the environment?
44575 
44576     # Try to remove the string !BUILD_CXX! from our list.
44577     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44578     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44579       # If it failed, the variable was not from the command line. Ignore it,
44580       # but warn the user (except for BASH, which is always set by the calling BASH).
44581       if test "xBUILD_CXX" != xBASH; then
44582         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44583 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44584       fi
44585       # Try to locate tool using the code snippet
44586       for ac_prog in cl CC g++
44587 do
44588   # Extract the first word of "$ac_prog", so it can be a program name with args.
44589 set dummy $ac_prog; ac_word=$2
44590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44591 $as_echo_n "checking for $ac_word... " >&6; }
44592 if ${ac_cv_path_BUILD_CXX+:} false; then :
44593   $as_echo_n "(cached) " >&6
44594 else
44595   case $BUILD_CXX in
44596   [\\/]* | ?:[\\/]*)
44597   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44598   ;;
44599   *)
44600   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44601 for as_dir in $PATH
44602 do
44603   IFS=$as_save_IFS
44604   test -z "$as_dir" && as_dir=.
44605     for ac_exec_ext in '' $ac_executable_extensions; do
44606   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44607     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44608     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44609     break 2
44610   fi
44611 done
44612   done
44613 IFS=$as_save_IFS
44614 
44615   ;;
44616 esac
44617 fi
44618 BUILD_CXX=$ac_cv_path_BUILD_CXX
44619 if test -n "$BUILD_CXX"; then
44620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44621 $as_echo "$BUILD_CXX" >&6; }
44622 else
44623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44624 $as_echo "no" >&6; }
44625 fi
44626 
44627 
44628   test -n "$BUILD_CXX" && break
44629 done
44630 
44631     else
44632       # If it succeeded, then it was overridden by the user. We will use it
44633       # for the tool.
44634 
44635       # First remove it from the list of overridden variables, so we can test
44636       # for unknown variables in the end.
44637       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44638 
44639       # Check if we try to supply an empty value
44640       if test "x$BUILD_CXX" = x; then
44641         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44642 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44643         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44644 $as_echo_n "checking for BUILD_CXX... " >&6; }
44645         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44646 $as_echo "disabled" >&6; }
44647       else
44648         # Check if the provided tool contains a complete path.
44649         tool_specified="$BUILD_CXX"
44650         tool_basename="${tool_specified##*/}"
44651         if test "x$tool_basename" = "x$tool_specified"; then
44652           # A command without a complete path is provided, search $PATH.
44653           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44654 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44655           # Extract the first word of "$tool_basename", so it can be a program name with args.
44656 set dummy $tool_basename; ac_word=$2
44657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44658 $as_echo_n "checking for $ac_word... " >&6; }
44659 if ${ac_cv_path_BUILD_CXX+:} false; then :
44660   $as_echo_n "(cached) " >&6
44661 else
44662   case $BUILD_CXX in
44663   [\\/]* | ?:[\\/]*)
44664   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44665   ;;
44666   *)
44667   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44668 for as_dir in $PATH
44669 do
44670   IFS=$as_save_IFS
44671   test -z "$as_dir" && as_dir=.
44672     for ac_exec_ext in '' $ac_executable_extensions; do
44673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44674     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44676     break 2
44677   fi
44678 done
44679   done
44680 IFS=$as_save_IFS
44681 
44682   ;;
44683 esac
44684 fi
44685 BUILD_CXX=$ac_cv_path_BUILD_CXX
44686 if test -n "$BUILD_CXX"; then
44687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44688 $as_echo "$BUILD_CXX" >&6; }
44689 else
44690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44691 $as_echo "no" >&6; }
44692 fi
44693 
44694 
44695           if test "x$BUILD_CXX" = x; then
44696             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44697           fi
44698         else
44699           # Otherwise we believe it is a complete path. Use it as it is.
44700           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44701 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44702           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44703 $as_echo_n "checking for BUILD_CXX... " >&6; }
44704           if test ! -x "$tool_specified"; then
44705             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44706 $as_echo "not found" >&6; }
44707             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44708           fi
44709           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44710 $as_echo "$tool_specified" >&6; }
44711         fi
44712       fi
44713     fi
44714 
44715   fi
44716 
44717 
44718 
44719   if test "x$BUILD_CXX" = x; then
44720     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44721   fi
44722 
44723 
44724 
44725   # Only process if variable expands to non-empty
44726 
44727   if test "x$BUILD_CXX" != x; then
44728     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44729 
44730   # First separate the path from the arguments. This will split at the first
44731   # space.
44732   complete="$BUILD_CXX"
44733   path="${complete%% *}"
44734   tmp="$complete EOL"
44735   arguments="${tmp#* }"
44736 
44737   # Input might be given as Windows format, start by converting to
44738   # unix format.
44739   new_path=`$CYGPATH -u "$path"`
44740 
44741   # Now try to locate executable using which
44742   new_path=`$WHICH "$new_path" 2> /dev/null`
44743   # bat and cmd files are not always considered executable in cygwin causing which
44744   # to not find them
44745   if test "x$new_path" = x \
44746       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44747       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44748     new_path=`$CYGPATH -u "$path"`
44749   fi
44750   if test "x$new_path" = x; then
44751     # Oops. Which didn't find the executable.
44752     # The splitting of arguments from the executable at a space might have been incorrect,
44753     # since paths with space are more likely in Windows. Give it another try with the whole
44754     # argument.
44755     path="$complete"
44756     arguments="EOL"
44757     new_path=`$CYGPATH -u "$path"`
44758     new_path=`$WHICH "$new_path" 2> /dev/null`
44759     # bat and cmd files are not always considered executable in cygwin causing which
44760     # to not find them
44761     if test "x$new_path" = x \
44762         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44763         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44764       new_path=`$CYGPATH -u "$path"`
44765     fi
44766     if test "x$new_path" = x; then
44767       # It's still not found. Now this is an unrecoverable error.
44768       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44769 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44770       has_space=`$ECHO "$complete" | $GREP " "`
44771       if test "x$has_space" != x; then
44772         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44773 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44774       fi
44775       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44776     fi
44777   fi
44778 
44779   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44780   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44781   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44782   # "foo.exe" is OK but "foo" is an error.
44783   #
44784   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44785   # It is also a way to make sure we got the proper file name for the real test later on.
44786   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44787   if test "x$test_shortpath" = x; then
44788     # Short path failed, file does not exist as specified.
44789     # Try adding .exe or .cmd
44790     if test -f "${new_path}.exe"; then
44791       input_to_shortpath="${new_path}.exe"
44792     elif test -f "${new_path}.cmd"; then
44793       input_to_shortpath="${new_path}.cmd"
44794     else
44795       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44796 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44797       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44798 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44799       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44800     fi
44801   else
44802     input_to_shortpath="$new_path"
44803   fi
44804 
44805   # Call helper function which possibly converts this using DOS-style short mode.
44806   # If so, the updated path is stored in $new_path.
44807   new_path="$input_to_shortpath"
44808 
44809   input_path="$input_to_shortpath"
44810   # Check if we need to convert this using DOS-style short mode. If the path
44811   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44812   # take no chances and rewrite it.
44813   # Note: m4 eats our [], so we need to use [ and ] instead.
44814   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44815   if test "x$has_forbidden_chars" != x; then
44816     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44817     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44818     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44819     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44820       # Going to short mode and back again did indeed matter. Since short mode is
44821       # case insensitive, let's make it lowercase to improve readability.
44822       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44823       # Now convert it back to Unix-style (cygpath)
44824       input_path=`$CYGPATH -u "$shortmode_path"`
44825       new_path="$input_path"
44826     fi
44827   fi
44828 
44829   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44830   if test "x$test_cygdrive_prefix" = x; then
44831     # As a simple fix, exclude /usr/bin since it's not a real path.
44832     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44833       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44834       # a path prefixed by /cygdrive for fixpath to work.
44835       new_path="$CYGWIN_ROOT_PATH$input_path"
44836     fi
44837   fi
44838 
44839   # remove trailing .exe if any
44840   new_path="${new_path/%.exe/}"
44841 
44842     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44843 
44844   # First separate the path from the arguments. This will split at the first
44845   # space.
44846   complete="$BUILD_CXX"
44847   path="${complete%% *}"
44848   tmp="$complete EOL"
44849   arguments="${tmp#* }"
44850 
44851   # Input might be given as Windows format, start by converting to
44852   # unix format.
44853   new_path="$path"
44854 
44855   windows_path="$new_path"
44856   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44857     unix_path=`$CYGPATH -u "$windows_path"`
44858     new_path="$unix_path"
44859   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44860     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44861     new_path="$unix_path"
44862   fi
44863 
44864 
44865   # Now try to locate executable using which
44866   new_path=`$WHICH "$new_path" 2> /dev/null`
44867 
44868   if test "x$new_path" = x; then
44869     # Oops. Which didn't find the executable.
44870     # The splitting of arguments from the executable at a space might have been incorrect,
44871     # since paths with space are more likely in Windows. Give it another try with the whole
44872     # argument.
44873     path="$complete"
44874     arguments="EOL"
44875     new_path="$path"
44876 
44877   windows_path="$new_path"
44878   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44879     unix_path=`$CYGPATH -u "$windows_path"`
44880     new_path="$unix_path"
44881   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44882     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44883     new_path="$unix_path"
44884   fi
44885 
44886 
44887     new_path=`$WHICH "$new_path" 2> /dev/null`
44888     # bat and cmd files are not always considered executable in MSYS causing which
44889     # to not find them
44890     if test "x$new_path" = x \
44891         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44892         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44893       new_path="$path"
44894 
44895   windows_path="$new_path"
44896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44897     unix_path=`$CYGPATH -u "$windows_path"`
44898     new_path="$unix_path"
44899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44900     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44901     new_path="$unix_path"
44902   fi
44903 
44904     fi
44905 
44906     if test "x$new_path" = x; then
44907       # It's still not found. Now this is an unrecoverable error.
44908       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44909 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44910       has_space=`$ECHO "$complete" | $GREP " "`
44911       if test "x$has_space" != x; then
44912         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44913 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44914       fi
44915       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44916     fi
44917   fi
44918 
44919   # Now new_path has a complete unix path to the binary
44920   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44921     # Keep paths in /bin as-is, but remove trailing .exe if any
44922     new_path="${new_path/%.exe/}"
44923     # Do not save /bin paths to all_fixpath_prefixes!
44924   else
44925     # Not in mixed or Windows style, start by that.
44926     new_path=`cmd //c echo $new_path`
44927 
44928   input_path="$new_path"
44929   # Check if we need to convert this using DOS-style short mode. If the path
44930   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44931   # take no chances and rewrite it.
44932   # Note: m4 eats our [], so we need to use [ and ] instead.
44933   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44934   if test "x$has_forbidden_chars" != x; then
44935     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44936     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44937   fi
44938 
44939     # Output is in $new_path
44940 
44941   windows_path="$new_path"
44942   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44943     unix_path=`$CYGPATH -u "$windows_path"`
44944     new_path="$unix_path"
44945   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44946     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44947     new_path="$unix_path"
44948   fi
44949 
44950     # remove trailing .exe if any
44951     new_path="${new_path/%.exe/}"
44952 
44953     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44954     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44955   fi
44956 
44957     else
44958       # We're on a unix platform. Hooray! :)
44959       # First separate the path from the arguments. This will split at the first
44960       # space.
44961       complete="$BUILD_CXX"
44962       path="${complete%% *}"
44963       tmp="$complete EOL"
44964       arguments="${tmp#* }"
44965 
44966       # Cannot rely on the command "which" here since it doesn't always work.
44967       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44968       if test -z "$is_absolute_path"; then
44969         # Path to executable is not absolute. Find it.
44970         IFS_save="$IFS"
44971         IFS=:
44972         for p in $PATH; do
44973           if test -f "$p/$path" && test -x "$p/$path"; then
44974             new_path="$p/$path"
44975             break
44976           fi
44977         done
44978         IFS="$IFS_save"
44979       else
44980         # This is an absolute path, we can use it without further modifications.
44981         new_path="$path"
44982       fi
44983 
44984       if test "x$new_path" = x; then
44985         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44986 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44987         has_space=`$ECHO "$complete" | $GREP " "`
44988         if test "x$has_space" != x; then
44989           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44990 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44991         fi
44992         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44993       fi
44994     fi
44995 
44996     # Now join together the path and the arguments once again
44997     if test "x$arguments" != xEOL; then
44998       new_complete="$new_path ${arguments% *}"
44999     else
45000       new_complete="$new_path"
45001     fi
45002 
45003     if test "x$complete" != "x$new_complete"; then
45004       BUILD_CXX="$new_complete"
45005       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45006 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45007     fi
45008   fi
45009 
45010 
45011 
45012   # Publish this variable in the help.
45013 
45014 
45015   if [ -z "${BUILD_NM+x}" ]; then
45016     # The variable is not set by user, try to locate tool using the code snippet
45017     for ac_prog in nm gcc-nm
45018 do
45019   # Extract the first word of "$ac_prog", so it can be a program name with args.
45020 set dummy $ac_prog; ac_word=$2
45021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45022 $as_echo_n "checking for $ac_word... " >&6; }
45023 if ${ac_cv_path_BUILD_NM+:} false; then :
45024   $as_echo_n "(cached) " >&6
45025 else
45026   case $BUILD_NM in
45027   [\\/]* | ?:[\\/]*)
45028   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45029   ;;
45030   *)
45031   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45032 for as_dir in $PATH
45033 do
45034   IFS=$as_save_IFS
45035   test -z "$as_dir" && as_dir=.
45036     for ac_exec_ext in '' $ac_executable_extensions; do
45037   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45038     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45039     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45040     break 2
45041   fi
45042 done
45043   done
45044 IFS=$as_save_IFS
45045 
45046   ;;
45047 esac
45048 fi
45049 BUILD_NM=$ac_cv_path_BUILD_NM
45050 if test -n "$BUILD_NM"; then
45051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45052 $as_echo "$BUILD_NM" >&6; }
45053 else
45054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45055 $as_echo "no" >&6; }
45056 fi
45057 
45058 
45059   test -n "$BUILD_NM" && break
45060 done
45061 
45062   else
45063     # The variable is set, but is it from the command line or the environment?
45064 
45065     # Try to remove the string !BUILD_NM! from our list.
45066     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45067     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45068       # If it failed, the variable was not from the command line. Ignore it,
45069       # but warn the user (except for BASH, which is always set by the calling BASH).
45070       if test "xBUILD_NM" != xBASH; then
45071         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45072 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45073       fi
45074       # Try to locate tool using the code snippet
45075       for ac_prog in nm gcc-nm
45076 do
45077   # Extract the first word of "$ac_prog", so it can be a program name with args.
45078 set dummy $ac_prog; ac_word=$2
45079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45080 $as_echo_n "checking for $ac_word... " >&6; }
45081 if ${ac_cv_path_BUILD_NM+:} false; then :
45082   $as_echo_n "(cached) " >&6
45083 else
45084   case $BUILD_NM in
45085   [\\/]* | ?:[\\/]*)
45086   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45087   ;;
45088   *)
45089   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45090 for as_dir in $PATH
45091 do
45092   IFS=$as_save_IFS
45093   test -z "$as_dir" && as_dir=.
45094     for ac_exec_ext in '' $ac_executable_extensions; do
45095   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45096     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45097     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45098     break 2
45099   fi
45100 done
45101   done
45102 IFS=$as_save_IFS
45103 
45104   ;;
45105 esac
45106 fi
45107 BUILD_NM=$ac_cv_path_BUILD_NM
45108 if test -n "$BUILD_NM"; then
45109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45110 $as_echo "$BUILD_NM" >&6; }
45111 else
45112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45113 $as_echo "no" >&6; }
45114 fi
45115 
45116 
45117   test -n "$BUILD_NM" && break
45118 done
45119 
45120     else
45121       # If it succeeded, then it was overridden by the user. We will use it
45122       # for the tool.
45123 
45124       # First remove it from the list of overridden variables, so we can test
45125       # for unknown variables in the end.
45126       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45127 
45128       # Check if we try to supply an empty value
45129       if test "x$BUILD_NM" = x; then
45130         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45131 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45132         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45133 $as_echo_n "checking for BUILD_NM... " >&6; }
45134         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45135 $as_echo "disabled" >&6; }
45136       else
45137         # Check if the provided tool contains a complete path.
45138         tool_specified="$BUILD_NM"
45139         tool_basename="${tool_specified##*/}"
45140         if test "x$tool_basename" = "x$tool_specified"; then
45141           # A command without a complete path is provided, search $PATH.
45142           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45143 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45144           # Extract the first word of "$tool_basename", so it can be a program name with args.
45145 set dummy $tool_basename; ac_word=$2
45146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45147 $as_echo_n "checking for $ac_word... " >&6; }
45148 if ${ac_cv_path_BUILD_NM+:} false; then :
45149   $as_echo_n "(cached) " >&6
45150 else
45151   case $BUILD_NM in
45152   [\\/]* | ?:[\\/]*)
45153   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45154   ;;
45155   *)
45156   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45157 for as_dir in $PATH
45158 do
45159   IFS=$as_save_IFS
45160   test -z "$as_dir" && as_dir=.
45161     for ac_exec_ext in '' $ac_executable_extensions; do
45162   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45163     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45164     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45165     break 2
45166   fi
45167 done
45168   done
45169 IFS=$as_save_IFS
45170 
45171   ;;
45172 esac
45173 fi
45174 BUILD_NM=$ac_cv_path_BUILD_NM
45175 if test -n "$BUILD_NM"; then
45176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45177 $as_echo "$BUILD_NM" >&6; }
45178 else
45179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45180 $as_echo "no" >&6; }
45181 fi
45182 
45183 
45184           if test "x$BUILD_NM" = x; then
45185             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45186           fi
45187         else
45188           # Otherwise we believe it is a complete path. Use it as it is.
45189           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45190 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45191           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45192 $as_echo_n "checking for BUILD_NM... " >&6; }
45193           if test ! -x "$tool_specified"; then
45194             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45195 $as_echo "not found" >&6; }
45196             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45197           fi
45198           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45199 $as_echo "$tool_specified" >&6; }
45200         fi
45201       fi
45202     fi
45203 
45204   fi
45205 
45206 
45207 
45208   # Only process if variable expands to non-empty
45209 
45210   if test "x$BUILD_NM" != x; then
45211     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45212 
45213   # First separate the path from the arguments. This will split at the first
45214   # space.
45215   complete="$BUILD_NM"
45216   path="${complete%% *}"
45217   tmp="$complete EOL"
45218   arguments="${tmp#* }"
45219 
45220   # Input might be given as Windows format, start by converting to
45221   # unix format.
45222   new_path=`$CYGPATH -u "$path"`
45223 
45224   # Now try to locate executable using which
45225   new_path=`$WHICH "$new_path" 2> /dev/null`
45226   # bat and cmd files are not always considered executable in cygwin causing which
45227   # to not find them
45228   if test "x$new_path" = x \
45229       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45230       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45231     new_path=`$CYGPATH -u "$path"`
45232   fi
45233   if test "x$new_path" = x; then
45234     # Oops. Which didn't find the executable.
45235     # The splitting of arguments from the executable at a space might have been incorrect,
45236     # since paths with space are more likely in Windows. Give it another try with the whole
45237     # argument.
45238     path="$complete"
45239     arguments="EOL"
45240     new_path=`$CYGPATH -u "$path"`
45241     new_path=`$WHICH "$new_path" 2> /dev/null`
45242     # bat and cmd files are not always considered executable in cygwin causing which
45243     # to not find them
45244     if test "x$new_path" = x \
45245         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45246         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45247       new_path=`$CYGPATH -u "$path"`
45248     fi
45249     if test "x$new_path" = x; then
45250       # It's still not found. Now this is an unrecoverable error.
45251       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45252 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45253       has_space=`$ECHO "$complete" | $GREP " "`
45254       if test "x$has_space" != x; then
45255         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45256 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45257       fi
45258       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45259     fi
45260   fi
45261 
45262   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45263   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45264   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45265   # "foo.exe" is OK but "foo" is an error.
45266   #
45267   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45268   # It is also a way to make sure we got the proper file name for the real test later on.
45269   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45270   if test "x$test_shortpath" = x; then
45271     # Short path failed, file does not exist as specified.
45272     # Try adding .exe or .cmd
45273     if test -f "${new_path}.exe"; then
45274       input_to_shortpath="${new_path}.exe"
45275     elif test -f "${new_path}.cmd"; then
45276       input_to_shortpath="${new_path}.cmd"
45277     else
45278       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45279 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45280       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45281 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45282       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45283     fi
45284   else
45285     input_to_shortpath="$new_path"
45286   fi
45287 
45288   # Call helper function which possibly converts this using DOS-style short mode.
45289   # If so, the updated path is stored in $new_path.
45290   new_path="$input_to_shortpath"
45291 
45292   input_path="$input_to_shortpath"
45293   # Check if we need to convert this using DOS-style short mode. If the path
45294   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45295   # take no chances and rewrite it.
45296   # Note: m4 eats our [], so we need to use [ and ] instead.
45297   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45298   if test "x$has_forbidden_chars" != x; then
45299     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45300     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45301     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45302     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45303       # Going to short mode and back again did indeed matter. Since short mode is
45304       # case insensitive, let's make it lowercase to improve readability.
45305       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45306       # Now convert it back to Unix-style (cygpath)
45307       input_path=`$CYGPATH -u "$shortmode_path"`
45308       new_path="$input_path"
45309     fi
45310   fi
45311 
45312   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45313   if test "x$test_cygdrive_prefix" = x; then
45314     # As a simple fix, exclude /usr/bin since it's not a real path.
45315     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45316       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45317       # a path prefixed by /cygdrive for fixpath to work.
45318       new_path="$CYGWIN_ROOT_PATH$input_path"
45319     fi
45320   fi
45321 
45322   # remove trailing .exe if any
45323   new_path="${new_path/%.exe/}"
45324 
45325     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45326 
45327   # First separate the path from the arguments. This will split at the first
45328   # space.
45329   complete="$BUILD_NM"
45330   path="${complete%% *}"
45331   tmp="$complete EOL"
45332   arguments="${tmp#* }"
45333 
45334   # Input might be given as Windows format, start by converting to
45335   # unix format.
45336   new_path="$path"
45337 
45338   windows_path="$new_path"
45339   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45340     unix_path=`$CYGPATH -u "$windows_path"`
45341     new_path="$unix_path"
45342   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45343     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45344     new_path="$unix_path"
45345   fi
45346 
45347 
45348   # Now try to locate executable using which
45349   new_path=`$WHICH "$new_path" 2> /dev/null`
45350 
45351   if test "x$new_path" = x; then
45352     # Oops. Which didn't find the executable.
45353     # The splitting of arguments from the executable at a space might have been incorrect,
45354     # since paths with space are more likely in Windows. Give it another try with the whole
45355     # argument.
45356     path="$complete"
45357     arguments="EOL"
45358     new_path="$path"
45359 
45360   windows_path="$new_path"
45361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45362     unix_path=`$CYGPATH -u "$windows_path"`
45363     new_path="$unix_path"
45364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45365     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45366     new_path="$unix_path"
45367   fi
45368 
45369 
45370     new_path=`$WHICH "$new_path" 2> /dev/null`
45371     # bat and cmd files are not always considered executable in MSYS causing which
45372     # to not find them
45373     if test "x$new_path" = x \
45374         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45375         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45376       new_path="$path"
45377 
45378   windows_path="$new_path"
45379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45380     unix_path=`$CYGPATH -u "$windows_path"`
45381     new_path="$unix_path"
45382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45383     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45384     new_path="$unix_path"
45385   fi
45386 
45387     fi
45388 
45389     if test "x$new_path" = x; then
45390       # It's still not found. Now this is an unrecoverable error.
45391       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45392 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45393       has_space=`$ECHO "$complete" | $GREP " "`
45394       if test "x$has_space" != x; then
45395         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45396 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45397       fi
45398       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45399     fi
45400   fi
45401 
45402   # Now new_path has a complete unix path to the binary
45403   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45404     # Keep paths in /bin as-is, but remove trailing .exe if any
45405     new_path="${new_path/%.exe/}"
45406     # Do not save /bin paths to all_fixpath_prefixes!
45407   else
45408     # Not in mixed or Windows style, start by that.
45409     new_path=`cmd //c echo $new_path`
45410 
45411   input_path="$new_path"
45412   # Check if we need to convert this using DOS-style short mode. If the path
45413   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45414   # take no chances and rewrite it.
45415   # Note: m4 eats our [], so we need to use [ and ] instead.
45416   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45417   if test "x$has_forbidden_chars" != x; then
45418     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45419     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45420   fi
45421 
45422     # Output is in $new_path
45423 
45424   windows_path="$new_path"
45425   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45426     unix_path=`$CYGPATH -u "$windows_path"`
45427     new_path="$unix_path"
45428   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45429     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45430     new_path="$unix_path"
45431   fi
45432 
45433     # remove trailing .exe if any
45434     new_path="${new_path/%.exe/}"
45435 
45436     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45437     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45438   fi
45439 
45440     else
45441       # We're on a unix platform. Hooray! :)
45442       # First separate the path from the arguments. This will split at the first
45443       # space.
45444       complete="$BUILD_NM"
45445       path="${complete%% *}"
45446       tmp="$complete EOL"
45447       arguments="${tmp#* }"
45448 
45449       # Cannot rely on the command "which" here since it doesn't always work.
45450       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45451       if test -z "$is_absolute_path"; then
45452         # Path to executable is not absolute. Find it.
45453         IFS_save="$IFS"
45454         IFS=:
45455         for p in $PATH; do
45456           if test -f "$p/$path" && test -x "$p/$path"; then
45457             new_path="$p/$path"
45458             break
45459           fi
45460         done
45461         IFS="$IFS_save"
45462       else
45463         # This is an absolute path, we can use it without further modifications.
45464         new_path="$path"
45465       fi
45466 
45467       if test "x$new_path" = x; then
45468         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45469 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45470         has_space=`$ECHO "$complete" | $GREP " "`
45471         if test "x$has_space" != x; then
45472           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45473 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45474         fi
45475         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45476       fi
45477     fi
45478 
45479     # Now join together the path and the arguments once again
45480     if test "x$arguments" != xEOL; then
45481       new_complete="$new_path ${arguments% *}"
45482     else
45483       new_complete="$new_path"
45484     fi
45485 
45486     if test "x$complete" != "x$new_complete"; then
45487       BUILD_NM="$new_complete"
45488       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45489 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45490     fi
45491   fi
45492 
45493 
45494 
45495   # Publish this variable in the help.
45496 
45497 
45498   if [ -z "${BUILD_AR+x}" ]; then
45499     # The variable is not set by user, try to locate tool using the code snippet
45500     for ac_prog in ar gcc-ar
45501 do
45502   # Extract the first word of "$ac_prog", so it can be a program name with args.
45503 set dummy $ac_prog; ac_word=$2
45504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45505 $as_echo_n "checking for $ac_word... " >&6; }
45506 if ${ac_cv_path_BUILD_AR+:} false; then :
45507   $as_echo_n "(cached) " >&6
45508 else
45509   case $BUILD_AR in
45510   [\\/]* | ?:[\\/]*)
45511   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45512   ;;
45513   *)
45514   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45515 for as_dir in $PATH
45516 do
45517   IFS=$as_save_IFS
45518   test -z "$as_dir" && as_dir=.
45519     for ac_exec_ext in '' $ac_executable_extensions; do
45520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45521     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45523     break 2
45524   fi
45525 done
45526   done
45527 IFS=$as_save_IFS
45528 
45529   ;;
45530 esac
45531 fi
45532 BUILD_AR=$ac_cv_path_BUILD_AR
45533 if test -n "$BUILD_AR"; then
45534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45535 $as_echo "$BUILD_AR" >&6; }
45536 else
45537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45538 $as_echo "no" >&6; }
45539 fi
45540 
45541 
45542   test -n "$BUILD_AR" && break
45543 done
45544 
45545   else
45546     # The variable is set, but is it from the command line or the environment?
45547 
45548     # Try to remove the string !BUILD_AR! from our list.
45549     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45550     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45551       # If it failed, the variable was not from the command line. Ignore it,
45552       # but warn the user (except for BASH, which is always set by the calling BASH).
45553       if test "xBUILD_AR" != xBASH; then
45554         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45555 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45556       fi
45557       # Try to locate tool using the code snippet
45558       for ac_prog in ar gcc-ar
45559 do
45560   # Extract the first word of "$ac_prog", so it can be a program name with args.
45561 set dummy $ac_prog; ac_word=$2
45562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45563 $as_echo_n "checking for $ac_word... " >&6; }
45564 if ${ac_cv_path_BUILD_AR+:} false; then :
45565   $as_echo_n "(cached) " >&6
45566 else
45567   case $BUILD_AR in
45568   [\\/]* | ?:[\\/]*)
45569   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45570   ;;
45571   *)
45572   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45573 for as_dir in $PATH
45574 do
45575   IFS=$as_save_IFS
45576   test -z "$as_dir" && as_dir=.
45577     for ac_exec_ext in '' $ac_executable_extensions; do
45578   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45579     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45580     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45581     break 2
45582   fi
45583 done
45584   done
45585 IFS=$as_save_IFS
45586 
45587   ;;
45588 esac
45589 fi
45590 BUILD_AR=$ac_cv_path_BUILD_AR
45591 if test -n "$BUILD_AR"; then
45592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45593 $as_echo "$BUILD_AR" >&6; }
45594 else
45595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45596 $as_echo "no" >&6; }
45597 fi
45598 
45599 
45600   test -n "$BUILD_AR" && break
45601 done
45602 
45603     else
45604       # If it succeeded, then it was overridden by the user. We will use it
45605       # for the tool.
45606 
45607       # First remove it from the list of overridden variables, so we can test
45608       # for unknown variables in the end.
45609       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45610 
45611       # Check if we try to supply an empty value
45612       if test "x$BUILD_AR" = x; then
45613         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45614 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45615         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45616 $as_echo_n "checking for BUILD_AR... " >&6; }
45617         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45618 $as_echo "disabled" >&6; }
45619       else
45620         # Check if the provided tool contains a complete path.
45621         tool_specified="$BUILD_AR"
45622         tool_basename="${tool_specified##*/}"
45623         if test "x$tool_basename" = "x$tool_specified"; then
45624           # A command without a complete path is provided, search $PATH.
45625           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45626 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45627           # Extract the first word of "$tool_basename", so it can be a program name with args.
45628 set dummy $tool_basename; ac_word=$2
45629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45630 $as_echo_n "checking for $ac_word... " >&6; }
45631 if ${ac_cv_path_BUILD_AR+:} false; then :
45632   $as_echo_n "(cached) " >&6
45633 else
45634   case $BUILD_AR in
45635   [\\/]* | ?:[\\/]*)
45636   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45637   ;;
45638   *)
45639   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45640 for as_dir in $PATH
45641 do
45642   IFS=$as_save_IFS
45643   test -z "$as_dir" && as_dir=.
45644     for ac_exec_ext in '' $ac_executable_extensions; do
45645   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45646     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45647     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45648     break 2
45649   fi
45650 done
45651   done
45652 IFS=$as_save_IFS
45653 
45654   ;;
45655 esac
45656 fi
45657 BUILD_AR=$ac_cv_path_BUILD_AR
45658 if test -n "$BUILD_AR"; then
45659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45660 $as_echo "$BUILD_AR" >&6; }
45661 else
45662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45663 $as_echo "no" >&6; }
45664 fi
45665 
45666 
45667           if test "x$BUILD_AR" = x; then
45668             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45669           fi
45670         else
45671           # Otherwise we believe it is a complete path. Use it as it is.
45672           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45673 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45674           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45675 $as_echo_n "checking for BUILD_AR... " >&6; }
45676           if test ! -x "$tool_specified"; then
45677             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45678 $as_echo "not found" >&6; }
45679             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45680           fi
45681           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45682 $as_echo "$tool_specified" >&6; }
45683         fi
45684       fi
45685     fi
45686 
45687   fi
45688 
45689 
45690 
45691   # Only process if variable expands to non-empty
45692 
45693   if test "x$BUILD_AR" != x; then
45694     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45695 
45696   # First separate the path from the arguments. This will split at the first
45697   # space.
45698   complete="$BUILD_AR"
45699   path="${complete%% *}"
45700   tmp="$complete EOL"
45701   arguments="${tmp#* }"
45702 
45703   # Input might be given as Windows format, start by converting to
45704   # unix format.
45705   new_path=`$CYGPATH -u "$path"`
45706 
45707   # Now try to locate executable using which
45708   new_path=`$WHICH "$new_path" 2> /dev/null`
45709   # bat and cmd files are not always considered executable in cygwin causing which
45710   # to not find them
45711   if test "x$new_path" = x \
45712       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45713       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45714     new_path=`$CYGPATH -u "$path"`
45715   fi
45716   if test "x$new_path" = x; then
45717     # Oops. Which didn't find the executable.
45718     # The splitting of arguments from the executable at a space might have been incorrect,
45719     # since paths with space are more likely in Windows. Give it another try with the whole
45720     # argument.
45721     path="$complete"
45722     arguments="EOL"
45723     new_path=`$CYGPATH -u "$path"`
45724     new_path=`$WHICH "$new_path" 2> /dev/null`
45725     # bat and cmd files are not always considered executable in cygwin causing which
45726     # to not find them
45727     if test "x$new_path" = x \
45728         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45729         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45730       new_path=`$CYGPATH -u "$path"`
45731     fi
45732     if test "x$new_path" = x; then
45733       # It's still not found. Now this is an unrecoverable error.
45734       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45735 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45736       has_space=`$ECHO "$complete" | $GREP " "`
45737       if test "x$has_space" != x; then
45738         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45739 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45740       fi
45741       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45742     fi
45743   fi
45744 
45745   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45746   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45747   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45748   # "foo.exe" is OK but "foo" is an error.
45749   #
45750   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45751   # It is also a way to make sure we got the proper file name for the real test later on.
45752   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45753   if test "x$test_shortpath" = x; then
45754     # Short path failed, file does not exist as specified.
45755     # Try adding .exe or .cmd
45756     if test -f "${new_path}.exe"; then
45757       input_to_shortpath="${new_path}.exe"
45758     elif test -f "${new_path}.cmd"; then
45759       input_to_shortpath="${new_path}.cmd"
45760     else
45761       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45762 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45763       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45764 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45765       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45766     fi
45767   else
45768     input_to_shortpath="$new_path"
45769   fi
45770 
45771   # Call helper function which possibly converts this using DOS-style short mode.
45772   # If so, the updated path is stored in $new_path.
45773   new_path="$input_to_shortpath"
45774 
45775   input_path="$input_to_shortpath"
45776   # Check if we need to convert this using DOS-style short mode. If the path
45777   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45778   # take no chances and rewrite it.
45779   # Note: m4 eats our [], so we need to use [ and ] instead.
45780   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45781   if test "x$has_forbidden_chars" != x; then
45782     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45783     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45784     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45785     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45786       # Going to short mode and back again did indeed matter. Since short mode is
45787       # case insensitive, let's make it lowercase to improve readability.
45788       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45789       # Now convert it back to Unix-style (cygpath)
45790       input_path=`$CYGPATH -u "$shortmode_path"`
45791       new_path="$input_path"
45792     fi
45793   fi
45794 
45795   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45796   if test "x$test_cygdrive_prefix" = x; then
45797     # As a simple fix, exclude /usr/bin since it's not a real path.
45798     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45799       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45800       # a path prefixed by /cygdrive for fixpath to work.
45801       new_path="$CYGWIN_ROOT_PATH$input_path"
45802     fi
45803   fi
45804 
45805   # remove trailing .exe if any
45806   new_path="${new_path/%.exe/}"
45807 
45808     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45809 
45810   # First separate the path from the arguments. This will split at the first
45811   # space.
45812   complete="$BUILD_AR"
45813   path="${complete%% *}"
45814   tmp="$complete EOL"
45815   arguments="${tmp#* }"
45816 
45817   # Input might be given as Windows format, start by converting to
45818   # unix format.
45819   new_path="$path"
45820 
45821   windows_path="$new_path"
45822   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45823     unix_path=`$CYGPATH -u "$windows_path"`
45824     new_path="$unix_path"
45825   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45826     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45827     new_path="$unix_path"
45828   fi
45829 
45830 
45831   # Now try to locate executable using which
45832   new_path=`$WHICH "$new_path" 2> /dev/null`
45833 
45834   if test "x$new_path" = x; then
45835     # Oops. Which didn't find the executable.
45836     # The splitting of arguments from the executable at a space might have been incorrect,
45837     # since paths with space are more likely in Windows. Give it another try with the whole
45838     # argument.
45839     path="$complete"
45840     arguments="EOL"
45841     new_path="$path"
45842 
45843   windows_path="$new_path"
45844   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45845     unix_path=`$CYGPATH -u "$windows_path"`
45846     new_path="$unix_path"
45847   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45848     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45849     new_path="$unix_path"
45850   fi
45851 
45852 
45853     new_path=`$WHICH "$new_path" 2> /dev/null`
45854     # bat and cmd files are not always considered executable in MSYS causing which
45855     # to not find them
45856     if test "x$new_path" = x \
45857         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45858         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45859       new_path="$path"
45860 
45861   windows_path="$new_path"
45862   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45863     unix_path=`$CYGPATH -u "$windows_path"`
45864     new_path="$unix_path"
45865   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45866     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45867     new_path="$unix_path"
45868   fi
45869 
45870     fi
45871 
45872     if test "x$new_path" = x; then
45873       # It's still not found. Now this is an unrecoverable error.
45874       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45875 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45876       has_space=`$ECHO "$complete" | $GREP " "`
45877       if test "x$has_space" != x; then
45878         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45879 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45880       fi
45881       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45882     fi
45883   fi
45884 
45885   # Now new_path has a complete unix path to the binary
45886   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45887     # Keep paths in /bin as-is, but remove trailing .exe if any
45888     new_path="${new_path/%.exe/}"
45889     # Do not save /bin paths to all_fixpath_prefixes!
45890   else
45891     # Not in mixed or Windows style, start by that.
45892     new_path=`cmd //c echo $new_path`
45893 
45894   input_path="$new_path"
45895   # Check if we need to convert this using DOS-style short mode. If the path
45896   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45897   # take no chances and rewrite it.
45898   # Note: m4 eats our [], so we need to use [ and ] instead.
45899   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45900   if test "x$has_forbidden_chars" != x; then
45901     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45902     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45903   fi
45904 
45905     # Output is in $new_path
45906 
45907   windows_path="$new_path"
45908   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45909     unix_path=`$CYGPATH -u "$windows_path"`
45910     new_path="$unix_path"
45911   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45912     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45913     new_path="$unix_path"
45914   fi
45915 
45916     # remove trailing .exe if any
45917     new_path="${new_path/%.exe/}"
45918 
45919     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45920     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45921   fi
45922 
45923     else
45924       # We're on a unix platform. Hooray! :)
45925       # First separate the path from the arguments. This will split at the first
45926       # space.
45927       complete="$BUILD_AR"
45928       path="${complete%% *}"
45929       tmp="$complete EOL"
45930       arguments="${tmp#* }"
45931 
45932       # Cannot rely on the command "which" here since it doesn't always work.
45933       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45934       if test -z "$is_absolute_path"; then
45935         # Path to executable is not absolute. Find it.
45936         IFS_save="$IFS"
45937         IFS=:
45938         for p in $PATH; do
45939           if test -f "$p/$path" && test -x "$p/$path"; then
45940             new_path="$p/$path"
45941             break
45942           fi
45943         done
45944         IFS="$IFS_save"
45945       else
45946         # This is an absolute path, we can use it without further modifications.
45947         new_path="$path"
45948       fi
45949 
45950       if test "x$new_path" = x; then
45951         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45952 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45953         has_space=`$ECHO "$complete" | $GREP " "`
45954         if test "x$has_space" != x; then
45955           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45956 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45957         fi
45958         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45959       fi
45960     fi
45961 
45962     # Now join together the path and the arguments once again
45963     if test "x$arguments" != xEOL; then
45964       new_complete="$new_path ${arguments% *}"
45965     else
45966       new_complete="$new_path"
45967     fi
45968 
45969     if test "x$complete" != "x$new_complete"; then
45970       BUILD_AR="$new_complete"
45971       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45972 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45973     fi
45974   fi
45975 
45976 
45977 
45978   # Publish this variable in the help.
45979 
45980 
45981   if [ -z "${BUILD_OBJCOPY+x}" ]; then
45982     # The variable is not set by user, try to locate tool using the code snippet
45983     for ac_prog in objcopy
45984 do
45985   # Extract the first word of "$ac_prog", so it can be a program name with args.
45986 set dummy $ac_prog; ac_word=$2
45987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45988 $as_echo_n "checking for $ac_word... " >&6; }
45989 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45990   $as_echo_n "(cached) " >&6
45991 else
45992   case $BUILD_OBJCOPY in
45993   [\\/]* | ?:[\\/]*)
45994   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45995   ;;
45996   *)
45997   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45998 for as_dir in $PATH
45999 do
46000   IFS=$as_save_IFS
46001   test -z "$as_dir" && as_dir=.
46002     for ac_exec_ext in '' $ac_executable_extensions; do
46003   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46004     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46006     break 2
46007   fi
46008 done
46009   done
46010 IFS=$as_save_IFS
46011 
46012   ;;
46013 esac
46014 fi
46015 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46016 if test -n "$BUILD_OBJCOPY"; then
46017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46018 $as_echo "$BUILD_OBJCOPY" >&6; }
46019 else
46020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46021 $as_echo "no" >&6; }
46022 fi
46023 
46024 
46025   test -n "$BUILD_OBJCOPY" && break
46026 done
46027 
46028   else
46029     # The variable is set, but is it from the command line or the environment?
46030 
46031     # Try to remove the string !BUILD_OBJCOPY! from our list.
46032     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46033     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46034       # If it failed, the variable was not from the command line. Ignore it,
46035       # but warn the user (except for BASH, which is always set by the calling BASH).
46036       if test "xBUILD_OBJCOPY" != xBASH; then
46037         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46038 $as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46039       fi
46040       # Try to locate tool using the code snippet
46041       for ac_prog in objcopy
46042 do
46043   # Extract the first word of "$ac_prog", so it can be a program name with args.
46044 set dummy $ac_prog; ac_word=$2
46045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46046 $as_echo_n "checking for $ac_word... " >&6; }
46047 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46048   $as_echo_n "(cached) " >&6
46049 else
46050   case $BUILD_OBJCOPY in
46051   [\\/]* | ?:[\\/]*)
46052   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46053   ;;
46054   *)
46055   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46056 for as_dir in $PATH
46057 do
46058   IFS=$as_save_IFS
46059   test -z "$as_dir" && as_dir=.
46060     for ac_exec_ext in '' $ac_executable_extensions; do
46061   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46062     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46063     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46064     break 2
46065   fi
46066 done
46067   done
46068 IFS=$as_save_IFS
46069 
46070   ;;
46071 esac
46072 fi
46073 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46074 if test -n "$BUILD_OBJCOPY"; then
46075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46076 $as_echo "$BUILD_OBJCOPY" >&6; }
46077 else
46078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46079 $as_echo "no" >&6; }
46080 fi
46081 
46082 
46083   test -n "$BUILD_OBJCOPY" && break
46084 done
46085 
46086     else
46087       # If it succeeded, then it was overridden by the user. We will use it
46088       # for the tool.
46089 
46090       # First remove it from the list of overridden variables, so we can test
46091       # for unknown variables in the end.
46092       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46093 
46094       # Check if we try to supply an empty value
46095       if test "x$BUILD_OBJCOPY" = x; then
46096         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46097 $as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46098         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46099 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46100         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46101 $as_echo "disabled" >&6; }
46102       else
46103         # Check if the provided tool contains a complete path.
46104         tool_specified="$BUILD_OBJCOPY"
46105         tool_basename="${tool_specified##*/}"
46106         if test "x$tool_basename" = "x$tool_specified"; then
46107           # A command without a complete path is provided, search $PATH.
46108           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46109 $as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46110           # Extract the first word of "$tool_basename", so it can be a program name with args.
46111 set dummy $tool_basename; ac_word=$2
46112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46113 $as_echo_n "checking for $ac_word... " >&6; }
46114 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46115   $as_echo_n "(cached) " >&6
46116 else
46117   case $BUILD_OBJCOPY in
46118   [\\/]* | ?:[\\/]*)
46119   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46120   ;;
46121   *)
46122   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46123 for as_dir in $PATH
46124 do
46125   IFS=$as_save_IFS
46126   test -z "$as_dir" && as_dir=.
46127     for ac_exec_ext in '' $ac_executable_extensions; do
46128   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46129     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46130     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46131     break 2
46132   fi
46133 done
46134   done
46135 IFS=$as_save_IFS
46136 
46137   ;;
46138 esac
46139 fi
46140 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46141 if test -n "$BUILD_OBJCOPY"; then
46142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46143 $as_echo "$BUILD_OBJCOPY" >&6; }
46144 else
46145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46146 $as_echo "no" >&6; }
46147 fi
46148 
46149 
46150           if test "x$BUILD_OBJCOPY" = x; then
46151             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46152           fi
46153         else
46154           # Otherwise we believe it is a complete path. Use it as it is.
46155           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46156 $as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46157           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46158 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46159           if test ! -x "$tool_specified"; then
46160             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46161 $as_echo "not found" >&6; }
46162             as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46163           fi
46164           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46165 $as_echo "$tool_specified" >&6; }
46166         fi
46167       fi
46168     fi
46169 
46170   fi
46171 
46172 
46173 
46174   # Only process if variable expands to non-empty
46175 
46176   if test "x$BUILD_OBJCOPY" != x; then
46177     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46178 
46179   # First separate the path from the arguments. This will split at the first
46180   # space.
46181   complete="$BUILD_OBJCOPY"
46182   path="${complete%% *}"
46183   tmp="$complete EOL"
46184   arguments="${tmp#* }"
46185 
46186   # Input might be given as Windows format, start by converting to
46187   # unix format.
46188   new_path=`$CYGPATH -u "$path"`
46189 
46190   # Now try to locate executable using which
46191   new_path=`$WHICH "$new_path" 2> /dev/null`
46192   # bat and cmd files are not always considered executable in cygwin causing which
46193   # to not find them
46194   if test "x$new_path" = x \
46195       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46196       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46197     new_path=`$CYGPATH -u "$path"`
46198   fi
46199   if test "x$new_path" = x; then
46200     # Oops. Which didn't find the executable.
46201     # The splitting of arguments from the executable at a space might have been incorrect,
46202     # since paths with space are more likely in Windows. Give it another try with the whole
46203     # argument.
46204     path="$complete"
46205     arguments="EOL"
46206     new_path=`$CYGPATH -u "$path"`
46207     new_path=`$WHICH "$new_path" 2> /dev/null`
46208     # bat and cmd files are not always considered executable in cygwin causing which
46209     # to not find them
46210     if test "x$new_path" = x \
46211         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46212         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46213       new_path=`$CYGPATH -u "$path"`
46214     fi
46215     if test "x$new_path" = x; then
46216       # It's still not found. Now this is an unrecoverable error.
46217       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46218 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46219       has_space=`$ECHO "$complete" | $GREP " "`
46220       if test "x$has_space" != x; then
46221         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46222 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46223       fi
46224       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46225     fi
46226   fi
46227 
46228   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46229   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46230   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46231   # "foo.exe" is OK but "foo" is an error.
46232   #
46233   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46234   # It is also a way to make sure we got the proper file name for the real test later on.
46235   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46236   if test "x$test_shortpath" = x; then
46237     # Short path failed, file does not exist as specified.
46238     # Try adding .exe or .cmd
46239     if test -f "${new_path}.exe"; then
46240       input_to_shortpath="${new_path}.exe"
46241     elif test -f "${new_path}.cmd"; then
46242       input_to_shortpath="${new_path}.cmd"
46243     else
46244       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46245 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46246       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46247 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46248       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46249     fi
46250   else
46251     input_to_shortpath="$new_path"
46252   fi
46253 
46254   # Call helper function which possibly converts this using DOS-style short mode.
46255   # If so, the updated path is stored in $new_path.
46256   new_path="$input_to_shortpath"
46257 
46258   input_path="$input_to_shortpath"
46259   # Check if we need to convert this using DOS-style short mode. If the path
46260   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46261   # take no chances and rewrite it.
46262   # Note: m4 eats our [], so we need to use [ and ] instead.
46263   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46264   if test "x$has_forbidden_chars" != x; then
46265     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46266     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46267     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46268     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46269       # Going to short mode and back again did indeed matter. Since short mode is
46270       # case insensitive, let's make it lowercase to improve readability.
46271       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46272       # Now convert it back to Unix-style (cygpath)
46273       input_path=`$CYGPATH -u "$shortmode_path"`
46274       new_path="$input_path"
46275     fi
46276   fi
46277 
46278   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46279   if test "x$test_cygdrive_prefix" = x; then
46280     # As a simple fix, exclude /usr/bin since it's not a real path.
46281     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46282       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46283       # a path prefixed by /cygdrive for fixpath to work.
46284       new_path="$CYGWIN_ROOT_PATH$input_path"
46285     fi
46286   fi
46287 
46288   # remove trailing .exe if any
46289   new_path="${new_path/%.exe/}"
46290 
46291     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46292 
46293   # First separate the path from the arguments. This will split at the first
46294   # space.
46295   complete="$BUILD_OBJCOPY"
46296   path="${complete%% *}"
46297   tmp="$complete EOL"
46298   arguments="${tmp#* }"
46299 
46300   # Input might be given as Windows format, start by converting to
46301   # unix format.
46302   new_path="$path"
46303 
46304   windows_path="$new_path"
46305   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46306     unix_path=`$CYGPATH -u "$windows_path"`
46307     new_path="$unix_path"
46308   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46309     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46310     new_path="$unix_path"
46311   fi
46312 
46313 
46314   # Now try to locate executable using which
46315   new_path=`$WHICH "$new_path" 2> /dev/null`
46316 
46317   if test "x$new_path" = x; then
46318     # Oops. Which didn't find the executable.
46319     # The splitting of arguments from the executable at a space might have been incorrect,
46320     # since paths with space are more likely in Windows. Give it another try with the whole
46321     # argument.
46322     path="$complete"
46323     arguments="EOL"
46324     new_path="$path"
46325 
46326   windows_path="$new_path"
46327   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46328     unix_path=`$CYGPATH -u "$windows_path"`
46329     new_path="$unix_path"
46330   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46331     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46332     new_path="$unix_path"
46333   fi
46334 
46335 
46336     new_path=`$WHICH "$new_path" 2> /dev/null`
46337     # bat and cmd files are not always considered executable in MSYS causing which
46338     # to not find them
46339     if test "x$new_path" = x \
46340         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46341         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46342       new_path="$path"
46343 
46344   windows_path="$new_path"
46345   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46346     unix_path=`$CYGPATH -u "$windows_path"`
46347     new_path="$unix_path"
46348   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46349     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46350     new_path="$unix_path"
46351   fi
46352 
46353     fi
46354 
46355     if test "x$new_path" = x; then
46356       # It's still not found. Now this is an unrecoverable error.
46357       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46358 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46359       has_space=`$ECHO "$complete" | $GREP " "`
46360       if test "x$has_space" != x; then
46361         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46362 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46363       fi
46364       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46365     fi
46366   fi
46367 
46368   # Now new_path has a complete unix path to the binary
46369   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46370     # Keep paths in /bin as-is, but remove trailing .exe if any
46371     new_path="${new_path/%.exe/}"
46372     # Do not save /bin paths to all_fixpath_prefixes!
46373   else
46374     # Not in mixed or Windows style, start by that.
46375     new_path=`cmd //c echo $new_path`
46376 
46377   input_path="$new_path"
46378   # Check if we need to convert this using DOS-style short mode. If the path
46379   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46380   # take no chances and rewrite it.
46381   # Note: m4 eats our [], so we need to use [ and ] instead.
46382   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46383   if test "x$has_forbidden_chars" != x; then
46384     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46385     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46386   fi
46387 
46388     # Output is in $new_path
46389 
46390   windows_path="$new_path"
46391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46392     unix_path=`$CYGPATH -u "$windows_path"`
46393     new_path="$unix_path"
46394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46395     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46396     new_path="$unix_path"
46397   fi
46398 
46399     # remove trailing .exe if any
46400     new_path="${new_path/%.exe/}"
46401 
46402     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46403     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46404   fi
46405 
46406     else
46407       # We're on a unix platform. Hooray! :)
46408       # First separate the path from the arguments. This will split at the first
46409       # space.
46410       complete="$BUILD_OBJCOPY"
46411       path="${complete%% *}"
46412       tmp="$complete EOL"
46413       arguments="${tmp#* }"
46414 
46415       # Cannot rely on the command "which" here since it doesn't always work.
46416       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46417       if test -z "$is_absolute_path"; then
46418         # Path to executable is not absolute. Find it.
46419         IFS_save="$IFS"
46420         IFS=:
46421         for p in $PATH; do
46422           if test -f "$p/$path" && test -x "$p/$path"; then
46423             new_path="$p/$path"
46424             break
46425           fi
46426         done
46427         IFS="$IFS_save"
46428       else
46429         # This is an absolute path, we can use it without further modifications.
46430         new_path="$path"
46431       fi
46432 
46433       if test "x$new_path" = x; then
46434         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46435 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46436         has_space=`$ECHO "$complete" | $GREP " "`
46437         if test "x$has_space" != x; then
46438           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46439 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46440         fi
46441         as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46442       fi
46443     fi
46444 
46445     # Now join together the path and the arguments once again
46446     if test "x$arguments" != xEOL; then
46447       new_complete="$new_path ${arguments% *}"
46448     else
46449       new_complete="$new_path"
46450     fi
46451 
46452     if test "x$complete" != "x$new_complete"; then
46453       BUILD_OBJCOPY="$new_complete"
46454       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46455 $as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46456     fi
46457   fi
46458 
46459 
46460 
46461   # Publish this variable in the help.
46462 
46463 
46464   if [ -z "${BUILD_STRIP+x}" ]; then
46465     # The variable is not set by user, try to locate tool using the code snippet
46466     for ac_prog in strip
46467 do
46468   # Extract the first word of "$ac_prog", so it can be a program name with args.
46469 set dummy $ac_prog; ac_word=$2
46470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46471 $as_echo_n "checking for $ac_word... " >&6; }
46472 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46473   $as_echo_n "(cached) " >&6
46474 else
46475   case $BUILD_STRIP in
46476   [\\/]* | ?:[\\/]*)
46477   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46478   ;;
46479   *)
46480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46481 for as_dir in $PATH
46482 do
46483   IFS=$as_save_IFS
46484   test -z "$as_dir" && as_dir=.
46485     for ac_exec_ext in '' $ac_executable_extensions; do
46486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46487     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46489     break 2
46490   fi
46491 done
46492   done
46493 IFS=$as_save_IFS
46494 
46495   ;;
46496 esac
46497 fi
46498 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46499 if test -n "$BUILD_STRIP"; then
46500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46501 $as_echo "$BUILD_STRIP" >&6; }
46502 else
46503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46504 $as_echo "no" >&6; }
46505 fi
46506 
46507 
46508   test -n "$BUILD_STRIP" && break
46509 done
46510 
46511   else
46512     # The variable is set, but is it from the command line or the environment?
46513 
46514     # Try to remove the string !BUILD_STRIP! from our list.
46515     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46516     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46517       # If it failed, the variable was not from the command line. Ignore it,
46518       # but warn the user (except for BASH, which is always set by the calling BASH).
46519       if test "xBUILD_STRIP" != xBASH; then
46520         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46521 $as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46522       fi
46523       # Try to locate tool using the code snippet
46524       for ac_prog in strip
46525 do
46526   # Extract the first word of "$ac_prog", so it can be a program name with args.
46527 set dummy $ac_prog; ac_word=$2
46528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46529 $as_echo_n "checking for $ac_word... " >&6; }
46530 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46531   $as_echo_n "(cached) " >&6
46532 else
46533   case $BUILD_STRIP in
46534   [\\/]* | ?:[\\/]*)
46535   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46536   ;;
46537   *)
46538   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46539 for as_dir in $PATH
46540 do
46541   IFS=$as_save_IFS
46542   test -z "$as_dir" && as_dir=.
46543     for ac_exec_ext in '' $ac_executable_extensions; do
46544   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46545     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46546     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46547     break 2
46548   fi
46549 done
46550   done
46551 IFS=$as_save_IFS
46552 
46553   ;;
46554 esac
46555 fi
46556 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46557 if test -n "$BUILD_STRIP"; then
46558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46559 $as_echo "$BUILD_STRIP" >&6; }
46560 else
46561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46562 $as_echo "no" >&6; }
46563 fi
46564 
46565 
46566   test -n "$BUILD_STRIP" && break
46567 done
46568 
46569     else
46570       # If it succeeded, then it was overridden by the user. We will use it
46571       # for the tool.
46572 
46573       # First remove it from the list of overridden variables, so we can test
46574       # for unknown variables in the end.
46575       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46576 
46577       # Check if we try to supply an empty value
46578       if test "x$BUILD_STRIP" = x; then
46579         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46580 $as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46581         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46582 $as_echo_n "checking for BUILD_STRIP... " >&6; }
46583         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46584 $as_echo "disabled" >&6; }
46585       else
46586         # Check if the provided tool contains a complete path.
46587         tool_specified="$BUILD_STRIP"
46588         tool_basename="${tool_specified##*/}"
46589         if test "x$tool_basename" = "x$tool_specified"; then
46590           # A command without a complete path is provided, search $PATH.
46591           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46592 $as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46593           # Extract the first word of "$tool_basename", so it can be a program name with args.
46594 set dummy $tool_basename; ac_word=$2
46595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46596 $as_echo_n "checking for $ac_word... " >&6; }
46597 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46598   $as_echo_n "(cached) " >&6
46599 else
46600   case $BUILD_STRIP in
46601   [\\/]* | ?:[\\/]*)
46602   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46603   ;;
46604   *)
46605   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46606 for as_dir in $PATH
46607 do
46608   IFS=$as_save_IFS
46609   test -z "$as_dir" && as_dir=.
46610     for ac_exec_ext in '' $ac_executable_extensions; do
46611   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46612     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46613     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46614     break 2
46615   fi
46616 done
46617   done
46618 IFS=$as_save_IFS
46619 
46620   ;;
46621 esac
46622 fi
46623 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46624 if test -n "$BUILD_STRIP"; then
46625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46626 $as_echo "$BUILD_STRIP" >&6; }
46627 else
46628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46629 $as_echo "no" >&6; }
46630 fi
46631 
46632 
46633           if test "x$BUILD_STRIP" = x; then
46634             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46635           fi
46636         else
46637           # Otherwise we believe it is a complete path. Use it as it is.
46638           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46639 $as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46640           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46641 $as_echo_n "checking for BUILD_STRIP... " >&6; }
46642           if test ! -x "$tool_specified"; then
46643             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46644 $as_echo "not found" >&6; }
46645             as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46646           fi
46647           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46648 $as_echo "$tool_specified" >&6; }
46649         fi
46650       fi
46651     fi
46652 
46653   fi
46654 
46655 
46656 
46657   # Only process if variable expands to non-empty
46658 
46659   if test "x$BUILD_STRIP" != x; then
46660     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46661 
46662   # First separate the path from the arguments. This will split at the first
46663   # space.
46664   complete="$BUILD_STRIP"
46665   path="${complete%% *}"
46666   tmp="$complete EOL"
46667   arguments="${tmp#* }"
46668 
46669   # Input might be given as Windows format, start by converting to
46670   # unix format.
46671   new_path=`$CYGPATH -u "$path"`
46672 
46673   # Now try to locate executable using which
46674   new_path=`$WHICH "$new_path" 2> /dev/null`
46675   # bat and cmd files are not always considered executable in cygwin causing which
46676   # to not find them
46677   if test "x$new_path" = x \
46678       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46679       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46680     new_path=`$CYGPATH -u "$path"`
46681   fi
46682   if test "x$new_path" = x; then
46683     # Oops. Which didn't find the executable.
46684     # The splitting of arguments from the executable at a space might have been incorrect,
46685     # since paths with space are more likely in Windows. Give it another try with the whole
46686     # argument.
46687     path="$complete"
46688     arguments="EOL"
46689     new_path=`$CYGPATH -u "$path"`
46690     new_path=`$WHICH "$new_path" 2> /dev/null`
46691     # bat and cmd files are not always considered executable in cygwin causing which
46692     # to not find them
46693     if test "x$new_path" = x \
46694         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46695         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46696       new_path=`$CYGPATH -u "$path"`
46697     fi
46698     if test "x$new_path" = x; then
46699       # It's still not found. Now this is an unrecoverable error.
46700       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46701 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46702       has_space=`$ECHO "$complete" | $GREP " "`
46703       if test "x$has_space" != x; then
46704         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46705 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46706       fi
46707       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46708     fi
46709   fi
46710 
46711   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46712   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46713   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46714   # "foo.exe" is OK but "foo" is an error.
46715   #
46716   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46717   # It is also a way to make sure we got the proper file name for the real test later on.
46718   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46719   if test "x$test_shortpath" = x; then
46720     # Short path failed, file does not exist as specified.
46721     # Try adding .exe or .cmd
46722     if test -f "${new_path}.exe"; then
46723       input_to_shortpath="${new_path}.exe"
46724     elif test -f "${new_path}.cmd"; then
46725       input_to_shortpath="${new_path}.cmd"
46726     else
46727       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46728 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46729       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46730 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46731       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46732     fi
46733   else
46734     input_to_shortpath="$new_path"
46735   fi
46736 
46737   # Call helper function which possibly converts this using DOS-style short mode.
46738   # If so, the updated path is stored in $new_path.
46739   new_path="$input_to_shortpath"
46740 
46741   input_path="$input_to_shortpath"
46742   # Check if we need to convert this using DOS-style short mode. If the path
46743   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46744   # take no chances and rewrite it.
46745   # Note: m4 eats our [], so we need to use [ and ] instead.
46746   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46747   if test "x$has_forbidden_chars" != x; then
46748     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46749     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46750     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46751     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46752       # Going to short mode and back again did indeed matter. Since short mode is
46753       # case insensitive, let's make it lowercase to improve readability.
46754       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46755       # Now convert it back to Unix-style (cygpath)
46756       input_path=`$CYGPATH -u "$shortmode_path"`
46757       new_path="$input_path"
46758     fi
46759   fi
46760 
46761   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46762   if test "x$test_cygdrive_prefix" = x; then
46763     # As a simple fix, exclude /usr/bin since it's not a real path.
46764     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46765       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46766       # a path prefixed by /cygdrive for fixpath to work.
46767       new_path="$CYGWIN_ROOT_PATH$input_path"
46768     fi
46769   fi
46770 
46771   # remove trailing .exe if any
46772   new_path="${new_path/%.exe/}"
46773 
46774     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46775 
46776   # First separate the path from the arguments. This will split at the first
46777   # space.
46778   complete="$BUILD_STRIP"
46779   path="${complete%% *}"
46780   tmp="$complete EOL"
46781   arguments="${tmp#* }"
46782 
46783   # Input might be given as Windows format, start by converting to
46784   # unix format.
46785   new_path="$path"
46786 
46787   windows_path="$new_path"
46788   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46789     unix_path=`$CYGPATH -u "$windows_path"`
46790     new_path="$unix_path"
46791   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46792     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46793     new_path="$unix_path"
46794   fi
46795 
46796 
46797   # Now try to locate executable using which
46798   new_path=`$WHICH "$new_path" 2> /dev/null`
46799 
46800   if test "x$new_path" = x; then
46801     # Oops. Which didn't find the executable.
46802     # The splitting of arguments from the executable at a space might have been incorrect,
46803     # since paths with space are more likely in Windows. Give it another try with the whole
46804     # argument.
46805     path="$complete"
46806     arguments="EOL"
46807     new_path="$path"
46808 
46809   windows_path="$new_path"
46810   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46811     unix_path=`$CYGPATH -u "$windows_path"`
46812     new_path="$unix_path"
46813   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46814     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46815     new_path="$unix_path"
46816   fi
46817 
46818 
46819     new_path=`$WHICH "$new_path" 2> /dev/null`
46820     # bat and cmd files are not always considered executable in MSYS causing which
46821     # to not find them
46822     if test "x$new_path" = x \
46823         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46824         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46825       new_path="$path"
46826 
46827   windows_path="$new_path"
46828   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46829     unix_path=`$CYGPATH -u "$windows_path"`
46830     new_path="$unix_path"
46831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46832     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46833     new_path="$unix_path"
46834   fi
46835 
46836     fi
46837 
46838     if test "x$new_path" = x; then
46839       # It's still not found. Now this is an unrecoverable error.
46840       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46841 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46842       has_space=`$ECHO "$complete" | $GREP " "`
46843       if test "x$has_space" != x; then
46844         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46845 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46846       fi
46847       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46848     fi
46849   fi
46850 
46851   # Now new_path has a complete unix path to the binary
46852   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46853     # Keep paths in /bin as-is, but remove trailing .exe if any
46854     new_path="${new_path/%.exe/}"
46855     # Do not save /bin paths to all_fixpath_prefixes!
46856   else
46857     # Not in mixed or Windows style, start by that.
46858     new_path=`cmd //c echo $new_path`
46859 
46860   input_path="$new_path"
46861   # Check if we need to convert this using DOS-style short mode. If the path
46862   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46863   # take no chances and rewrite it.
46864   # Note: m4 eats our [], so we need to use [ and ] instead.
46865   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46866   if test "x$has_forbidden_chars" != x; then
46867     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46868     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46869   fi
46870 
46871     # Output is in $new_path
46872 
46873   windows_path="$new_path"
46874   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46875     unix_path=`$CYGPATH -u "$windows_path"`
46876     new_path="$unix_path"
46877   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46878     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46879     new_path="$unix_path"
46880   fi
46881 
46882     # remove trailing .exe if any
46883     new_path="${new_path/%.exe/}"
46884 
46885     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46886     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46887   fi
46888 
46889     else
46890       # We're on a unix platform. Hooray! :)
46891       # First separate the path from the arguments. This will split at the first
46892       # space.
46893       complete="$BUILD_STRIP"
46894       path="${complete%% *}"
46895       tmp="$complete EOL"
46896       arguments="${tmp#* }"
46897 
46898       # Cannot rely on the command "which" here since it doesn't always work.
46899       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46900       if test -z "$is_absolute_path"; then
46901         # Path to executable is not absolute. Find it.
46902         IFS_save="$IFS"
46903         IFS=:
46904         for p in $PATH; do
46905           if test -f "$p/$path" && test -x "$p/$path"; then
46906             new_path="$p/$path"
46907             break
46908           fi
46909         done
46910         IFS="$IFS_save"
46911       else
46912         # This is an absolute path, we can use it without further modifications.
46913         new_path="$path"
46914       fi
46915 
46916       if test "x$new_path" = x; then
46917         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46918 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46919         has_space=`$ECHO "$complete" | $GREP " "`
46920         if test "x$has_space" != x; then
46921           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46922 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46923         fi
46924         as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46925       fi
46926     fi
46927 
46928     # Now join together the path and the arguments once again
46929     if test "x$arguments" != xEOL; then
46930       new_complete="$new_path ${arguments% *}"
46931     else
46932       new_complete="$new_path"
46933     fi
46934 
46935     if test "x$complete" != "x$new_complete"; then
46936       BUILD_STRIP="$new_complete"
46937       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46938 $as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46939     fi
46940   fi
46941 
46942     # Assume the C compiler is the assembler
46943     BUILD_AS="$BUILD_CC -c"
46944     # Just like for the target compiler, use the compiler as linker
46945     BUILD_LD="$BUILD_CC"
46946     BUILD_LDCXX="$BUILD_CXX"
46947 
46948     PATH="$OLDPATH"
46949 
46950 
46951   COMPILER=$BUILD_CC
46952   COMPILER_NAME=BuildC
46953 
46954   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46955     # cc -V output typically looks like
46956     #     cc: Sun C 5.12 Linux_i386 2011/11/16
46957     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46958     # Check that this is likely to be the Solaris Studio cc.
46959     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46960     if test $? -ne 0; then
46961       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46962       { $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
46963 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46964       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46965 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46966       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46967 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46968       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46969     fi
46970     # Remove usage instructions (if present), and
46971     # collapse compiler output into a single line
46972     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46973         $SED -e 's/ *[Uu]sage:.*//'`
46974     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46975         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46976   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46977     # xlc -qversion output typically looks like
46978     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46979     #     Version: 11.01.0000.0015
46980     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46981     # Check that this is likely to be the IBM XL C compiler.
46982     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46983     if test $? -ne 0; then
46984       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46985       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
46986 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46987       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46988 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46989       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46990 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46991       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46992     fi
46993     # Collapse compiler output into a single line
46994     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46995     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46996         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
46997   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46998     # There is no specific version flag, but all output starts with a version string.
46999     # First line typically looks something like:
47000     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47001     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47002     # Check that this is likely to be Microsoft CL.EXE.
47003     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47004     if test $? -ne 0; then
47005       { $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
47006 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47007       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47008 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47009       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47010     fi
47011     # Collapse compiler output into a single line
47012     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47013     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47014         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47015   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47016     # gcc --version output typically looks like
47017     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47018     #     Copyright (C) 2013 Free Software Foundation, Inc.
47019     #     This is free software; see the source for copying conditions.  There is NO
47020     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47021     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47022     # Check that this is likely to be GCC.
47023     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47024     if test $? -ne 0; then
47025       { $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
47026 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47027       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47028 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47029       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47030     fi
47031     # Remove Copyright and legalese from version string, and
47032     # collapse into a single line
47033     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47034         $SED -e 's/ *Copyright .*//'`
47035     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47036         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47037   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47038     # clang --version output typically looks like
47039     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47040     #    clang version 3.3 (tags/RELEASE_33/final)
47041     # or
47042     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47043     #    Target: x86_64-pc-linux-gnu
47044     #    Thread model: posix
47045     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47046     # Check that this is likely to be clang
47047     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47048     if test $? -ne 0; then
47049       { $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
47050 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47051       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47052 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47053       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47054     fi
47055     # Collapse compiler output into a single line
47056     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47057     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47058         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47059   else
47060       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47061   fi
47062   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47063   BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47064   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47065   BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47066 
47067   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47068 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47069 
47070 
47071   COMPILER=$BUILD_CXX
47072   COMPILER_NAME=BuildC++
47073 
47074   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47075     # cc -V output typically looks like
47076     #     cc: Sun C 5.12 Linux_i386 2011/11/16
47077     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47078     # Check that this is likely to be the Solaris Studio cc.
47079     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47080     if test $? -ne 0; then
47081       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47082       { $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
47083 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47084       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47085 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47086       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47087 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47088       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47089     fi
47090     # Remove usage instructions (if present), and
47091     # collapse compiler output into a single line
47092     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47093         $SED -e 's/ *[Uu]sage:.*//'`
47094     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47095         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47096   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47097     # xlc -qversion output typically looks like
47098     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47099     #     Version: 11.01.0000.0015
47100     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47101     # Check that this is likely to be the IBM XL C compiler.
47102     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47103     if test $? -ne 0; then
47104       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47105       { $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
47106 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47107       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47108 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47109       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47110 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47111       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47112     fi
47113     # Collapse compiler output into a single line
47114     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47115     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47116         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47117   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47118     # There is no specific version flag, but all output starts with a version string.
47119     # First line typically looks something like:
47120     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47121     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47122     # Check that this is likely to be Microsoft CL.EXE.
47123     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47124     if test $? -ne 0; then
47125       { $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
47126 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47127       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47128 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47129       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47130     fi
47131     # Collapse compiler output into a single line
47132     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47133     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47134         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47135   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47136     # gcc --version output typically looks like
47137     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47138     #     Copyright (C) 2013 Free Software Foundation, Inc.
47139     #     This is free software; see the source for copying conditions.  There is NO
47140     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47141     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47142     # Check that this is likely to be GCC.
47143     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47144     if test $? -ne 0; then
47145       { $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
47146 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47147       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47148 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47149       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47150     fi
47151     # Remove Copyright and legalese from version string, and
47152     # collapse into a single line
47153     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47154         $SED -e 's/ *Copyright .*//'`
47155     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47156         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47157   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47158     # clang --version output typically looks like
47159     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47160     #    clang version 3.3 (tags/RELEASE_33/final)
47161     # or
47162     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47163     #    Target: x86_64-pc-linux-gnu
47164     #    Thread model: posix
47165     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47166     # Check that this is likely to be clang
47167     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47168     if test $? -ne 0; then
47169       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
47170 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47171       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47172 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47173       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47174     fi
47175     # Collapse compiler output into a single line
47176     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47177     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47178         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47179   else
47180       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47181   fi
47182   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47183   BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47184   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47185   BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47186 
47187   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47188 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47189 
47190 
47191   if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47192     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&5
47193 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47194     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47195 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47196   fi
47197 
47198   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47199   if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47200     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47201 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47202   fi
47203 
47204   if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47205     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47206 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47207   fi
47208 
47209   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47210 
47211   else
47212     # If we are not cross compiling, use the normal target compilers for
47213     # building the build platform executables.
47214     BUILD_CC="$CC"
47215     BUILD_CXX="$CXX"
47216     BUILD_LD="$LD"
47217     BUILD_LDCXX="$LDCXX"
47218     BUILD_NM="$NM"
47219     BUILD_AS="$AS"
47220     BUILD_OBJCOPY="$OBJCOPY"
47221     BUILD_STRIP="$STRIP"
47222     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47223     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47224     BUILD_AR="$AR"
47225 
47226 
47227   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47228     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47229 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47230     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47231 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47232   fi
47233 
47234   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47235   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47236     { $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
47237 $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;}
47238   fi
47239 
47240   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47241     { $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
47242 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47243   fi
47244 
47245   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
47246 
47247   fi
47248 
47249 
47250 
47251 
47252 
47253 
47254 
47255 
47256 
47257 
47258 
47259 
47260   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47261     # For hotspot, we need these in Windows mixed path,
47262     # so rewrite them all. Need added .exe suffix.
47263     HOTSPOT_CXX="$CXX.exe"
47264     HOTSPOT_LD="$LD.exe"
47265     HOTSPOT_MT="$MT.exe"
47266     HOTSPOT_RC="$RC.exe"
47267 
47268   unix_path="$HOTSPOT_CXX"
47269   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47270     windows_path=`$CYGPATH -m "$unix_path"`
47271     HOTSPOT_CXX="$windows_path"
47272   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47273     windows_path=`cmd //c echo $unix_path`
47274     HOTSPOT_CXX="$windows_path"
47275   fi
47276 
47277 
47278   unix_path="$HOTSPOT_LD"
47279   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47280     windows_path=`$CYGPATH -m "$unix_path"`
47281     HOTSPOT_LD="$windows_path"
47282   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47283     windows_path=`cmd //c echo $unix_path`
47284     HOTSPOT_LD="$windows_path"
47285   fi
47286 
47287 
47288   unix_path="$HOTSPOT_MT"
47289   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47290     windows_path=`$CYGPATH -m "$unix_path"`
47291     HOTSPOT_MT="$windows_path"
47292   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47293     windows_path=`cmd //c echo $unix_path`
47294     HOTSPOT_MT="$windows_path"
47295   fi
47296 
47297 
47298   unix_path="$HOTSPOT_RC"
47299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47300     windows_path=`$CYGPATH -m "$unix_path"`
47301     HOTSPOT_RC="$windows_path"
47302   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47303     windows_path=`cmd //c echo $unix_path`
47304     HOTSPOT_RC="$windows_path"
47305   fi
47306 
47307 
47308 
47309   else
47310     HOTSPOT_CXX="$CXX"
47311     HOTSPOT_LD="$LD"
47312   fi
47313 
47314 
47315 
47316   if test  "x$TOOLCHAIN_TYPE" = xclang; then
47317     USE_CLANG=true
47318   fi
47319 
47320 
47321 
47322 
47323 
47324   # The package path is used only on macosx?
47325   # FIXME: clean this up, and/or move it elsewhere.
47326   PACKAGE_PATH=/opt/local
47327 
47328 
47329   # Check for extra potential brokenness.
47330   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47331     # On Windows, double-check that we got the right compiler.
47332     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47333     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47334     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47335       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47336         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
47337       fi
47338     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47339       if test "x$COMPILER_CPU_TEST" != "xx64"; then
47340         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47341       fi
47342     fi
47343   fi
47344 
47345   if test "x$TOOLCHAIN_TYPE" = xgcc; then
47346     # If this is a --hash-style=gnu system, use --hash-style=both, why?
47347     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47348     # This is later checked when setting flags.
47349 
47350     # "-Og" suppported for GCC 4.8 and later
47351     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47352 
47353 
47354 
47355 
47356 
47357 
47358 
47359 
47360 
47361 
47362 
47363 
47364 
47365 
47366 
47367 
47368 
47369 
47370 
47371 
47372 
47373 
47374 
47375 
47376 
47377 
47378 
47379 
47380 
47381 
47382 
47383 
47384 
47385 
47386 
47387 
47388 
47389 
47390 
47391 
47392 
47393 
47394 
47395 
47396 
47397 
47398 
47399     # Execute function body
47400 
47401 
47402 
47403 
47404 
47405 
47406 
47407 
47408 
47409 
47410 
47411 
47412 
47413 
47414 
47415 
47416 
47417 
47418 
47419 
47420 
47421 
47422 
47423 
47424 
47425 
47426 
47427 
47428 
47429 
47430 
47431 
47432 
47433 
47434 
47435 
47436 
47437 
47438 
47439 
47440 
47441 
47442 
47443 
47444 
47445 
47446 
47447 
47448     # Execute function body
47449 
47450   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47451 $as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47452   supports=yes
47453 
47454   saved_cflags="$CFLAGS"
47455   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47456   ac_ext=c
47457 ac_cpp='$CPP $CPPFLAGS'
47458 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47459 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47460 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47461 
47462   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47463 /* end confdefs.h.  */
47464 int i;
47465 _ACEOF
47466 if ac_fn_c_try_compile "$LINENO"; then :
47467 
47468 else
47469   supports=no
47470 fi
47471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47472   ac_ext=cpp
47473 ac_cpp='$CXXCPP $CPPFLAGS'
47474 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47475 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47476 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47477 
47478   CFLAGS="$saved_cflags"
47479 
47480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47481 $as_echo "$supports" >&6; }
47482   if test "x$supports" = "xyes" ; then
47483     :
47484     C_COMP_SUPPORTS="yes"
47485   else
47486     :
47487     C_COMP_SUPPORTS="no"
47488   fi
47489 
47490 
47491 
47492 
47493 
47494 
47495 
47496 
47497 
47498 
47499 
47500 
47501 
47502 
47503 
47504 
47505 
47506 
47507 
47508 
47509 
47510 
47511 
47512 
47513 
47514 
47515 
47516 
47517 
47518 
47519 
47520 
47521 
47522 
47523 
47524 
47525 
47526 
47527 
47528 
47529 
47530 
47531 
47532 
47533 
47534 
47535 
47536 
47537 
47538 
47539 
47540 
47541 
47542 
47543 
47544 
47545 
47546 
47547 
47548     # Execute function body
47549 
47550   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47551 $as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47552   supports=yes
47553 
47554   saved_cxxflags="$CXXFLAGS"
47555   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47556   ac_ext=cpp
47557 ac_cpp='$CXXCPP $CPPFLAGS'
47558 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47559 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47560 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47561 
47562   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47563 /* end confdefs.h.  */
47564 int i;
47565 _ACEOF
47566 if ac_fn_cxx_try_compile "$LINENO"; then :
47567 
47568 else
47569   supports=no
47570 fi
47571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47572   ac_ext=cpp
47573 ac_cpp='$CXXCPP $CPPFLAGS'
47574 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47575 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47576 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47577 
47578   CXXFLAGS="$saved_cxxflags"
47579 
47580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47581 $as_echo "$supports" >&6; }
47582   if test "x$supports" = "xyes" ; then
47583     :
47584     CXX_COMP_SUPPORTS="yes"
47585   else
47586     :
47587     CXX_COMP_SUPPORTS="no"
47588   fi
47589 
47590 
47591 
47592 
47593 
47594 
47595 
47596 
47597 
47598 
47599 
47600 
47601 
47602   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47603 $as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47604   supports=no
47605   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47606 
47607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47608 $as_echo "$supports" >&6; }
47609   if test "x$supports" = "xyes" ; then
47610     :
47611     HAS_CFLAG_OPTIMIZE_DEBUG=true
47612   else
47613     :
47614     HAS_CFLAG_OPTIMIZE_DEBUG=false
47615   fi
47616 
47617 
47618 
47619 
47620 
47621 
47622 
47623     # "-z relro" supported in GNU binutils 2.17 and later
47624     LINKER_RELRO_FLAG="-Wl,-z,relro"
47625 
47626 
47627 
47628 
47629 
47630 
47631 
47632 
47633 
47634 
47635 
47636 
47637 
47638 
47639 
47640 
47641 
47642 
47643 
47644 
47645 
47646 
47647 
47648 
47649 
47650 
47651 
47652 
47653 
47654 
47655 
47656 
47657 
47658 
47659 
47660 
47661 
47662 
47663 
47664 
47665 
47666 
47667 
47668 
47669 
47670 
47671 
47672     # Execute function body
47673 
47674   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47675 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47676   supports=yes
47677 
47678   saved_ldflags="$LDFLAGS"
47679   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47680   ac_ext=c
47681 ac_cpp='$CPP $CPPFLAGS'
47682 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47683 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47684 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47685 
47686   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47687 /* end confdefs.h.  */
47688 
47689 int
47690 main ()
47691 {
47692 
47693   ;
47694   return 0;
47695 }
47696 _ACEOF
47697 if ac_fn_c_try_link "$LINENO"; then :
47698 
47699 else
47700   supports=no
47701 fi
47702 rm -f core conftest.err conftest.$ac_objext \
47703     conftest$ac_exeext conftest.$ac_ext
47704   ac_ext=cpp
47705 ac_cpp='$CXXCPP $CPPFLAGS'
47706 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47707 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47708 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47709 
47710   LDFLAGS="$saved_ldflags"
47711 
47712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47713 $as_echo "$supports" >&6; }
47714   if test "x$supports" = "xyes" ; then
47715     :
47716     HAS_LINKER_RELRO=true
47717   else
47718     :
47719     HAS_LINKER_RELRO=false
47720   fi
47721 
47722 
47723 
47724 
47725 
47726 
47727 
47728 
47729 
47730 
47731 
47732 
47733 
47734     # "-z now" supported in GNU binutils 2.11 and later
47735     LINKER_NOW_FLAG="-Wl,-z,now"
47736 
47737 
47738 
47739 
47740 
47741 
47742 
47743 
47744 
47745 
47746 
47747 
47748 
47749 
47750 
47751 
47752 
47753 
47754 
47755 
47756 
47757 
47758 
47759 
47760 
47761 
47762 
47763 
47764 
47765 
47766 
47767 
47768 
47769 
47770 
47771 
47772 
47773 
47774 
47775 
47776 
47777 
47778 
47779 
47780 
47781 
47782 
47783     # Execute function body
47784 
47785   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47786 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47787   supports=yes
47788 
47789   saved_ldflags="$LDFLAGS"
47790   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47791   ac_ext=c
47792 ac_cpp='$CPP $CPPFLAGS'
47793 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47794 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47795 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47796 
47797   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47798 /* end confdefs.h.  */
47799 
47800 int
47801 main ()
47802 {
47803 
47804   ;
47805   return 0;
47806 }
47807 _ACEOF
47808 if ac_fn_c_try_link "$LINENO"; then :
47809 
47810 else
47811   supports=no
47812 fi
47813 rm -f core conftest.err conftest.$ac_objext \
47814     conftest$ac_exeext conftest.$ac_ext
47815   ac_ext=cpp
47816 ac_cpp='$CXXCPP $CPPFLAGS'
47817 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47818 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47819 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47820 
47821   LDFLAGS="$saved_ldflags"
47822 
47823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47824 $as_echo "$supports" >&6; }
47825   if test "x$supports" = "xyes" ; then
47826     :
47827     HAS_LINKER_NOW=true
47828   else
47829     :
47830     HAS_LINKER_NOW=false
47831   fi
47832 
47833 
47834 
47835 
47836 
47837 
47838 
47839 
47840 
47841 
47842 
47843 
47844   fi
47845 
47846   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47847   # in executable.'
47848   USING_BROKEN_SUSE_LD=no
47849   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47850     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47851 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47852     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47853     $ECHO "int main() { }" > main.c
47854     if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47855       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47856 $as_echo "no" >&6; }
47857       USING_BROKEN_SUSE_LD=no
47858     else
47859       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47860 $as_echo "yes" >&6; }
47861       USING_BROKEN_SUSE_LD=yes
47862     fi
47863     $RM version-script.map main.c a.out
47864   fi
47865 
47866 
47867   # Setup hotspot lecagy names for toolchains
47868   HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47869   if test "x$TOOLCHAIN_TYPE" = xclang; then
47870     HOTSPOT_TOOLCHAIN_TYPE=gcc
47871   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47872     HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47873   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47874     HOTSPOT_TOOLCHAIN_TYPE=visCPP
47875   fi
47876 
47877 
47878 
47879 # Setup the JTReg Regression Test Harness.
47880 
47881 
47882 # Check whether --with-jtreg was given.
47883 if test "${with_jtreg+set}" = set; then :
47884   withval=$with_jtreg;
47885 else
47886   with_jtreg=no
47887 fi
47888 
47889 
47890   if test "x$with_jtreg" = xno; then
47891     # jtreg disabled
47892     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47893 $as_echo_n "checking for jtreg... " >&6; }
47894     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47895 $as_echo "no" >&6; }
47896   else
47897     if test "x$with_jtreg" != xyes; then
47898       # with path specified.
47899       JT_HOME="$with_jtreg"
47900     fi
47901 
47902     if test "x$JT_HOME" != x; then
47903       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47904 $as_echo_n "checking for jtreg... " >&6; }
47905 
47906       # use JT_HOME enviroment var.
47907 
47908   # Only process if variable expands to non-empty
47909 
47910   if test "x$JT_HOME" != x; then
47911     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47912 
47913   # Input might be given as Windows format, start by converting to
47914   # unix format.
47915   path="$JT_HOME"
47916   new_path=`$CYGPATH -u "$path"`
47917 
47918   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47919   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47920   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47921   # "foo.exe" is OK but "foo" is an error.
47922   #
47923   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47924   # It is also a way to make sure we got the proper file name for the real test later on.
47925   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47926   if test "x$test_shortpath" = x; then
47927     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47928 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47929     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47930   fi
47931 
47932   # Call helper function which possibly converts this using DOS-style short mode.
47933   # If so, the updated path is stored in $new_path.
47934 
47935   input_path="$new_path"
47936   # Check if we need to convert this using DOS-style short mode. If the path
47937   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47938   # take no chances and rewrite it.
47939   # Note: m4 eats our [], so we need to use [ and ] instead.
47940   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47941   if test "x$has_forbidden_chars" != x; then
47942     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47943     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47944     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47945     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47946       # Going to short mode and back again did indeed matter. Since short mode is
47947       # case insensitive, let's make it lowercase to improve readability.
47948       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47949       # Now convert it back to Unix-style (cygpath)
47950       input_path=`$CYGPATH -u "$shortmode_path"`
47951       new_path="$input_path"
47952     fi
47953   fi
47954 
47955   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47956   if test "x$test_cygdrive_prefix" = x; then
47957     # As a simple fix, exclude /usr/bin since it's not a real path.
47958     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47959       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47960       # a path prefixed by /cygdrive for fixpath to work.
47961       new_path="$CYGWIN_ROOT_PATH$input_path"
47962     fi
47963   fi
47964 
47965 
47966   if test "x$path" != "x$new_path"; then
47967     JT_HOME="$new_path"
47968     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47969 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47970   fi
47971 
47972     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47973 
47974   path="$JT_HOME"
47975   has_colon=`$ECHO $path | $GREP ^.:`
47976   new_path="$path"
47977   if test "x$has_colon" = x; then
47978     # Not in mixed or Windows style, start by that.
47979     new_path=`cmd //c echo $path`
47980   fi
47981 
47982 
47983   input_path="$new_path"
47984   # Check if we need to convert this using DOS-style short mode. If the path
47985   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47986   # take no chances and rewrite it.
47987   # Note: m4 eats our [], so we need to use [ and ] instead.
47988   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47989   if test "x$has_forbidden_chars" != x; then
47990     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47991     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47992   fi
47993 
47994 
47995   windows_path="$new_path"
47996   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47997     unix_path=`$CYGPATH -u "$windows_path"`
47998     new_path="$unix_path"
47999   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48000     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48001     new_path="$unix_path"
48002   fi
48003 
48004   if test "x$path" != "x$new_path"; then
48005     JT_HOME="$new_path"
48006     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48007 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48008   fi
48009 
48010   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48011   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48012 
48013     else
48014       # We're on a unix platform. Hooray! :)
48015       path="$JT_HOME"
48016       has_space=`$ECHO "$path" | $GREP " "`
48017       if test "x$has_space" != x; then
48018         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48019 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48020         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48021       fi
48022 
48023       # Use eval to expand a potential ~
48024       eval path="$path"
48025       if test ! -f "$path" && test ! -d "$path"; then
48026         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48027       fi
48028 
48029       if test -d "$path"; then
48030         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48031       else
48032         dir="`$DIRNAME "$path"`"
48033         base="`$BASENAME "$path"`"
48034         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48035       fi
48036     fi
48037   fi
48038 
48039 
48040       # jtreg win32 script works for everybody
48041       JTREGEXE="$JT_HOME/bin/jtreg"
48042 
48043       if test ! -f "$JTREGEXE"; then
48044         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48045       fi
48046 
48047       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48048 $as_echo "$JTREGEXE" >&6; }
48049     else
48050       # try to find jtreg on path
48051 
48052 
48053 
48054   # Publish this variable in the help.
48055 
48056 
48057   if [ -z "${JTREGEXE+x}" ]; then
48058     # The variable is not set by user, try to locate tool using the code snippet
48059     for ac_prog in jtreg
48060 do
48061   # Extract the first word of "$ac_prog", so it can be a program name with args.
48062 set dummy $ac_prog; ac_word=$2
48063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48064 $as_echo_n "checking for $ac_word... " >&6; }
48065 if ${ac_cv_path_JTREGEXE+:} false; then :
48066   $as_echo_n "(cached) " >&6
48067 else
48068   case $JTREGEXE in
48069   [\\/]* | ?:[\\/]*)
48070   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48071   ;;
48072   *)
48073   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48074 for as_dir in $PATH
48075 do
48076   IFS=$as_save_IFS
48077   test -z "$as_dir" && as_dir=.
48078     for ac_exec_ext in '' $ac_executable_extensions; do
48079   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48080     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48082     break 2
48083   fi
48084 done
48085   done
48086 IFS=$as_save_IFS
48087 
48088   ;;
48089 esac
48090 fi
48091 JTREGEXE=$ac_cv_path_JTREGEXE
48092 if test -n "$JTREGEXE"; then
48093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48094 $as_echo "$JTREGEXE" >&6; }
48095 else
48096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48097 $as_echo "no" >&6; }
48098 fi
48099 
48100 
48101   test -n "$JTREGEXE" && break
48102 done
48103 
48104   else
48105     # The variable is set, but is it from the command line or the environment?
48106 
48107     # Try to remove the string !JTREGEXE! from our list.
48108     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48109     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48110       # If it failed, the variable was not from the command line. Ignore it,
48111       # but warn the user (except for BASH, which is always set by the calling BASH).
48112       if test "xJTREGEXE" != xBASH; then
48113         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48114 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48115       fi
48116       # Try to locate tool using the code snippet
48117       for ac_prog in jtreg
48118 do
48119   # Extract the first word of "$ac_prog", so it can be a program name with args.
48120 set dummy $ac_prog; ac_word=$2
48121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48122 $as_echo_n "checking for $ac_word... " >&6; }
48123 if ${ac_cv_path_JTREGEXE+:} false; then :
48124   $as_echo_n "(cached) " >&6
48125 else
48126   case $JTREGEXE in
48127   [\\/]* | ?:[\\/]*)
48128   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48129   ;;
48130   *)
48131   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48132 for as_dir in $PATH
48133 do
48134   IFS=$as_save_IFS
48135   test -z "$as_dir" && as_dir=.
48136     for ac_exec_ext in '' $ac_executable_extensions; do
48137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48138     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48140     break 2
48141   fi
48142 done
48143   done
48144 IFS=$as_save_IFS
48145 
48146   ;;
48147 esac
48148 fi
48149 JTREGEXE=$ac_cv_path_JTREGEXE
48150 if test -n "$JTREGEXE"; then
48151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48152 $as_echo "$JTREGEXE" >&6; }
48153 else
48154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48155 $as_echo "no" >&6; }
48156 fi
48157 
48158 
48159   test -n "$JTREGEXE" && break
48160 done
48161 
48162     else
48163       # If it succeeded, then it was overridden by the user. We will use it
48164       # for the tool.
48165 
48166       # First remove it from the list of overridden variables, so we can test
48167       # for unknown variables in the end.
48168       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48169 
48170       # Check if we try to supply an empty value
48171       if test "x$JTREGEXE" = x; then
48172         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48173 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48174         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48175 $as_echo_n "checking for JTREGEXE... " >&6; }
48176         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48177 $as_echo "disabled" >&6; }
48178       else
48179         # Check if the provided tool contains a complete path.
48180         tool_specified="$JTREGEXE"
48181         tool_basename="${tool_specified##*/}"
48182         if test "x$tool_basename" = "x$tool_specified"; then
48183           # A command without a complete path is provided, search $PATH.
48184           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48185 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48186           # Extract the first word of "$tool_basename", so it can be a program name with args.
48187 set dummy $tool_basename; ac_word=$2
48188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48189 $as_echo_n "checking for $ac_word... " >&6; }
48190 if ${ac_cv_path_JTREGEXE+:} false; then :
48191   $as_echo_n "(cached) " >&6
48192 else
48193   case $JTREGEXE in
48194   [\\/]* | ?:[\\/]*)
48195   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48196   ;;
48197   *)
48198   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48199 for as_dir in $PATH
48200 do
48201   IFS=$as_save_IFS
48202   test -z "$as_dir" && as_dir=.
48203     for ac_exec_ext in '' $ac_executable_extensions; do
48204   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48205     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48206     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48207     break 2
48208   fi
48209 done
48210   done
48211 IFS=$as_save_IFS
48212 
48213   ;;
48214 esac
48215 fi
48216 JTREGEXE=$ac_cv_path_JTREGEXE
48217 if test -n "$JTREGEXE"; then
48218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48219 $as_echo "$JTREGEXE" >&6; }
48220 else
48221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48222 $as_echo "no" >&6; }
48223 fi
48224 
48225 
48226           if test "x$JTREGEXE" = x; then
48227             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48228           fi
48229         else
48230           # Otherwise we believe it is a complete path. Use it as it is.
48231           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48232 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48233           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48234 $as_echo_n "checking for JTREGEXE... " >&6; }
48235           if test ! -x "$tool_specified"; then
48236             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48237 $as_echo "not found" >&6; }
48238             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48239           fi
48240           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48241 $as_echo "$tool_specified" >&6; }
48242         fi
48243       fi
48244     fi
48245 
48246   fi
48247 
48248 
48249 
48250   if test "x$JTREGEXE" = x; then
48251     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48252   fi
48253 
48254 
48255       JT_HOME="`$DIRNAME $JTREGEXE`"
48256     fi
48257   fi
48258 
48259 
48260 
48261 
48262 
48263 
48264   # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48265   # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48266   # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48267   #                              commands produced by the link step (currently AIX only)
48268   if test "x$TOOLCHAIN_TYPE" = xxlc; then
48269     COMPILER_TARGET_BITS_FLAG="-q"
48270     COMPILER_COMMAND_FILE_FLAG="-f"
48271     COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48272   else
48273     COMPILER_TARGET_BITS_FLAG="-m"
48274     COMPILER_COMMAND_FILE_FLAG="@"
48275     COMPILER_BINDCMD_FILE_FLAG=""
48276 
48277     # The solstudio linker does not support @-files.
48278     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48279       COMPILER_COMMAND_FILE_FLAG=
48280     fi
48281 
48282     # Check if @file is supported by gcc
48283     if test "x$TOOLCHAIN_TYPE" = xgcc; then
48284       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48285 $as_echo_n "checking if @file is supported by gcc... " >&6; }
48286       # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48287       $ECHO "" "--version" > command.file
48288       if $CXX @command.file 2>&5 >&5; then
48289         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48290 $as_echo "yes" >&6; }
48291         COMPILER_COMMAND_FILE_FLAG="@"
48292       else
48293         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48294 $as_echo "no" >&6; }
48295         COMPILER_COMMAND_FILE_FLAG=
48296       fi
48297       $RM command.file
48298     fi
48299   fi
48300 
48301 
48302 
48303 
48304   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48305   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48306     ARFLAGS="-r"
48307   elif test "x$OPENJDK_TARGET_OS" = xaix; then
48308     ARFLAGS="-X64"
48309   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48310     # lib.exe is used as AR to create static libraries.
48311     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48312   else
48313     ARFLAGS=""
48314   fi
48315 
48316 
48317   ## Setup strip.
48318   # FIXME: should this really be per platform, or should it be per toolchain type?
48319   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48320   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48321   if test "x$OPENJDK_TARGET_OS" = xlinux; then
48322     STRIPFLAGS="-g"
48323   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48324     STRIPFLAGS="-x"
48325   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48326     STRIPFLAGS="-S"
48327   elif test "x$OPENJDK_TARGET_OS" = xaix; then
48328     STRIPFLAGS="-X32_64"
48329   fi
48330 
48331 
48332 
48333   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48334     CC_OUT_OPTION=-Fo
48335     EXE_OUT_OPTION=-out:
48336     LD_OUT_OPTION=-out:
48337     AR_OUT_OPTION=-out:
48338   else
48339     # The option used to specify the target .o,.a or .so file.
48340     # When compiling, how to specify the to be created object file.
48341     CC_OUT_OPTION='-o$(SPACE)'
48342     # When linking, how to specify the to be created executable.
48343     EXE_OUT_OPTION='-o$(SPACE)'
48344     # When linking, how to specify the to be created dynamically linkable library.
48345     LD_OUT_OPTION='-o$(SPACE)'
48346     # When archiving, how to specify the to be create static archive for object files.
48347     AR_OUT_OPTION='rcs$(SPACE)'
48348   fi
48349 
48350 
48351 
48352 
48353 
48354   # On Windows, we need to set RC flags.
48355   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48356     RC_FLAGS="-nologo -l0x409"
48357     JVM_RCFLAGS="-nologo"
48358     if test "x$DEBUG_LEVEL" = xrelease; then
48359       RC_FLAGS="$RC_FLAGS -DNDEBUG"
48360       JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48361     fi
48362 
48363     # The version variables used to create RC_FLAGS may be overridden
48364     # in a custom configure script, or possibly the command line.
48365     # Let those variables be expanded at make time in spec.gmk.
48366     # The \$ are escaped to the shell, and the $(...) variables
48367     # are evaluated by make.
48368     RC_FLAGS="$RC_FLAGS \
48369         -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48370         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48371         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48372         -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48373         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48374         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48375         -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48376 
48377     JVM_RCFLAGS="$JVM_RCFLAGS \
48378         -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48379         -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48380         -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48381         -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48382         -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48383         -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48384         -D\"HS_FNAME=jvm.dll\" \
48385         -D\"HS_INTERNAL_NAME=jvm\""
48386   fi
48387 
48388 
48389 
48390   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48391     # silence copyright notice and other headers.
48392     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48393   fi
48394 
48395 
48396 # Now we can test some aspects on the target using configure macros.
48397 
48398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48399 $as_echo_n "checking for ANSI C header files... " >&6; }
48400 if ${ac_cv_header_stdc+:} false; then :
48401   $as_echo_n "(cached) " >&6
48402 else
48403   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48404 /* end confdefs.h.  */
48405 #include <stdlib.h>
48406 #include <stdarg.h>
48407 #include <string.h>
48408 #include <float.h>
48409 
48410 int
48411 main ()
48412 {
48413 
48414   ;
48415   return 0;
48416 }
48417 _ACEOF
48418 if ac_fn_cxx_try_compile "$LINENO"; then :
48419   ac_cv_header_stdc=yes
48420 else
48421   ac_cv_header_stdc=no
48422 fi
48423 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48424 
48425 if test $ac_cv_header_stdc = yes; then
48426   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48427   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48428 /* end confdefs.h.  */
48429 #include <string.h>
48430 
48431 _ACEOF
48432 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48433   $EGREP "memchr" >/dev/null 2>&1; then :
48434 
48435 else
48436   ac_cv_header_stdc=no
48437 fi
48438 rm -f conftest*
48439 
48440 fi
48441 
48442 if test $ac_cv_header_stdc = yes; then
48443   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48444   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48445 /* end confdefs.h.  */
48446 #include <stdlib.h>
48447 
48448 _ACEOF
48449 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48450   $EGREP "free" >/dev/null 2>&1; then :
48451 
48452 else
48453   ac_cv_header_stdc=no
48454 fi
48455 rm -f conftest*
48456 
48457 fi
48458 
48459 if test $ac_cv_header_stdc = yes; then
48460   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48461   if test "$cross_compiling" = yes; then :
48462   :
48463 else
48464   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48465 /* end confdefs.h.  */
48466 #include <ctype.h>
48467 #include <stdlib.h>
48468 #if ((' ' & 0x0FF) == 0x020)
48469 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48470 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48471 #else
48472 # define ISLOWER(c) \
48473                    (('a' <= (c) && (c) <= 'i') \
48474                      || ('j' <= (c) && (c) <= 'r') \
48475                      || ('s' <= (c) && (c) <= 'z'))
48476 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48477 #endif
48478 
48479 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48480 int
48481 main ()
48482 {
48483   int i;
48484   for (i = 0; i < 256; i++)
48485     if (XOR (islower (i), ISLOWER (i))
48486         || toupper (i) != TOUPPER (i))
48487       return 2;
48488   return 0;
48489 }
48490 _ACEOF
48491 if ac_fn_cxx_try_run "$LINENO"; then :
48492 
48493 else
48494   ac_cv_header_stdc=no
48495 fi
48496 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48497   conftest.$ac_objext conftest.beam conftest.$ac_ext
48498 fi
48499 
48500 fi
48501 fi
48502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48503 $as_echo "$ac_cv_header_stdc" >&6; }
48504 if test $ac_cv_header_stdc = yes; then
48505 
48506 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
48507 
48508 fi
48509 
48510 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
48511 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48512                   inttypes.h stdint.h unistd.h
48513 do :
48514   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48515 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48516 "
48517 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48518   cat >>confdefs.h <<_ACEOF
48519 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48520 _ACEOF
48521 
48522 fi
48523 
48524 done
48525 
48526 
48527 
48528   ###############################################################################
48529   #
48530   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48531   # (The JVM can use 32 or 64 bit Java pointers but that decision
48532   # is made at runtime.)
48533   #
48534 
48535   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48536     # Always specify -m flag on Solaris
48537     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48538 
48539   # When we add flags to the "official" CFLAGS etc, we need to
48540   # keep track of these additions in ADDED_CFLAGS etc. These
48541   # will later be checked to make sure only controlled additions
48542   # have been made to CFLAGS etc.
48543   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48544   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48545   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48546 
48547   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48548   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48549   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48550 
48551   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48552   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48553   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48554 
48555   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48556   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48557   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48558 
48559   elif test "x$COMPILE_TYPE" = xreduced; then
48560     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48561       # Specify -m if running reduced on unix platforms
48562 
48563   # When we add flags to the "official" CFLAGS etc, we need to
48564   # keep track of these additions in ADDED_CFLAGS etc. These
48565   # will later be checked to make sure only controlled additions
48566   # have been made to CFLAGS etc.
48567   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48568   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48569   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48570 
48571   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48572   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48573   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48574 
48575   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48576   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48577   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48578 
48579   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48580   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48581   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48582 
48583     fi
48584   fi
48585   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48586     JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48587     JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48588     JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48589   fi
48590 
48591   # Make compilation sanity check
48592   for ac_header in stdio.h
48593 do :
48594   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48595 if test "x$ac_cv_header_stdio_h" = xyes; then :
48596   cat >>confdefs.h <<_ACEOF
48597 #define HAVE_STDIO_H 1
48598 _ACEOF
48599 
48600 else
48601 
48602     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48603 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48604     if test "x$COMPILE_TYPE" = xreduced; then
48605 
48606   # Print a helpful message on how to acquire the necessary build dependency.
48607   # reduced is the help tag: freetype, cups, alsa etc
48608   MISSING_DEPENDENCY=reduced
48609 
48610   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48611     cygwin_help $MISSING_DEPENDENCY
48612   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48613     msys_help $MISSING_DEPENDENCY
48614   else
48615     PKGHANDLER_COMMAND=
48616 
48617     case $PKGHANDLER in
48618       apt-get)
48619         apt_help     $MISSING_DEPENDENCY ;;
48620       yum)
48621         yum_help     $MISSING_DEPENDENCY ;;
48622       port)
48623         port_help    $MISSING_DEPENDENCY ;;
48624       pkgutil)
48625         pkgutil_help $MISSING_DEPENDENCY ;;
48626       pkgadd)
48627         pkgadd_help  $MISSING_DEPENDENCY ;;
48628     esac
48629 
48630     if test "x$PKGHANDLER_COMMAND" != x; then
48631       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48632     fi
48633   fi
48634 
48635       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48636 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48637     elif test "x$COMPILE_TYPE" = xcross; then
48638       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48639 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48640     fi
48641     as_fn_error $? "Cannot continue." "$LINENO" 5
48642 
48643 fi
48644 
48645 done
48646 
48647 
48648   # The cast to long int works around a bug in the HP C Compiler
48649 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48650 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48651 # This bug is HP SR number 8606223364.
48652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48653 $as_echo_n "checking size of int *... " >&6; }
48654 if ${ac_cv_sizeof_int_p+:} false; then :
48655   $as_echo_n "(cached) " >&6
48656 else
48657   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48658 
48659 else
48660   if test "$ac_cv_type_int_p" = yes; then
48661      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48662 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48663 as_fn_error 77 "cannot compute sizeof (int *)
48664 See \`config.log' for more details" "$LINENO" 5; }
48665    else
48666      ac_cv_sizeof_int_p=0
48667    fi
48668 fi
48669 
48670 fi
48671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48672 $as_echo "$ac_cv_sizeof_int_p" >&6; }
48673 
48674 
48675 
48676 cat >>confdefs.h <<_ACEOF
48677 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
48678 _ACEOF
48679 
48680 
48681 
48682   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48683   if test "x$ac_cv_sizeof_int_p" = x; then
48684     # The test failed, lets stick to the assumed value.
48685     { $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
48686 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48687   else
48688     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48689 
48690     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48691       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48692       # Let's try to implicitely set the compilers target architecture and retry the test
48693       { $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
48694 $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;}
48695       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48696 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48697 
48698   # When we add flags to the "official" CFLAGS etc, we need to
48699   # keep track of these additions in ADDED_CFLAGS etc. These
48700   # will later be checked to make sure only controlled additions
48701   # have been made to CFLAGS etc.
48702   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48703   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48704   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48705 
48706   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48707   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48708   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48709 
48710   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48711   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48712   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48713 
48714   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48715   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48716   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48717 
48718 
48719       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48720       unset ac_cv_sizeof_int_p
48721       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48722       cat >>confdefs.h <<_ACEOF
48723 #undef SIZEOF_INT_P
48724 _ACEOF
48725 
48726       # The cast to long int works around a bug in the HP C Compiler
48727 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48728 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48729 # This bug is HP SR number 8606223364.
48730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48731 $as_echo_n "checking size of int *... " >&6; }
48732 if ${ac_cv_sizeof_int_p+:} false; then :
48733   $as_echo_n "(cached) " >&6
48734 else
48735   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48736 
48737 else
48738   if test "$ac_cv_type_int_p" = yes; then
48739      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48740 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48741 as_fn_error 77 "cannot compute sizeof (int *)
48742 See \`config.log' for more details" "$LINENO" 5; }
48743    else
48744      ac_cv_sizeof_int_p=0
48745    fi
48746 fi
48747 
48748 fi
48749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48750 $as_echo "$ac_cv_sizeof_int_p" >&6; }
48751 
48752 
48753 
48754 cat >>confdefs.h <<_ACEOF
48755 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
48756 _ACEOF
48757 
48758 
48759 
48760       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48761 
48762       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48763         { $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
48764 $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;}
48765         if test "x$COMPILE_TYPE" = xreduced; then
48766 
48767   # Print a helpful message on how to acquire the necessary build dependency.
48768   # reduced is the help tag: freetype, cups, alsa etc
48769   MISSING_DEPENDENCY=reduced
48770 
48771   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48772     cygwin_help $MISSING_DEPENDENCY
48773   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48774     msys_help $MISSING_DEPENDENCY
48775   else
48776     PKGHANDLER_COMMAND=
48777 
48778     case $PKGHANDLER in
48779       apt-get)
48780         apt_help     $MISSING_DEPENDENCY ;;
48781       yum)
48782         yum_help     $MISSING_DEPENDENCY ;;
48783       port)
48784         port_help    $MISSING_DEPENDENCY ;;
48785       pkgutil)
48786         pkgutil_help $MISSING_DEPENDENCY ;;
48787       pkgadd)
48788         pkgadd_help  $MISSING_DEPENDENCY ;;
48789     esac
48790 
48791     if test "x$PKGHANDLER_COMMAND" != x; then
48792       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48793     fi
48794   fi
48795 
48796           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48797 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48798         elif test "x$COMPILE_TYPE" = xcross; then
48799           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48800 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48801         fi
48802         as_fn_error $? "Cannot continue." "$LINENO" 5
48803       fi
48804     fi
48805   fi
48806 
48807   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48808 $as_echo_n "checking for target address size... " >&6; }
48809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48810 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48811 
48812 
48813   ###############################################################################
48814   #
48815   # Is the target little of big endian?
48816   #
48817    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48818 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48819 if ${ac_cv_c_bigendian+:} false; then :
48820   $as_echo_n "(cached) " >&6
48821 else
48822   ac_cv_c_bigendian=unknown
48823     # See if we're dealing with a universal compiler.
48824     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48825 /* end confdefs.h.  */
48826 #ifndef __APPLE_CC__
48827                not a universal capable compiler
48828              #endif
48829              typedef int dummy;
48830 
48831 _ACEOF
48832 if ac_fn_cxx_try_compile "$LINENO"; then :
48833 
48834         # Check for potential -arch flags.  It is not universal unless
48835         # there are at least two -arch flags with different values.
48836         ac_arch=
48837         ac_prev=
48838         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48839          if test -n "$ac_prev"; then
48840            case $ac_word in
48841              i?86 | x86_64 | ppc | ppc64)
48842                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48843                  ac_arch=$ac_word
48844                else
48845                  ac_cv_c_bigendian=universal
48846                  break
48847                fi
48848                ;;
48849            esac
48850            ac_prev=
48851          elif test "x$ac_word" = "x-arch"; then
48852            ac_prev=arch
48853          fi
48854        done
48855 fi
48856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48857     if test $ac_cv_c_bigendian = unknown; then
48858       # See if sys/param.h defines the BYTE_ORDER macro.
48859       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48860 /* end confdefs.h.  */
48861 #include <sys/types.h>
48862              #include <sys/param.h>
48863 
48864 int
48865 main ()
48866 {
48867 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48868                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48869                      && LITTLE_ENDIAN)
48870               bogus endian macros
48871              #endif
48872 
48873   ;
48874   return 0;
48875 }
48876 _ACEOF
48877 if ac_fn_cxx_try_compile "$LINENO"; then :
48878   # It does; now see whether it defined to BIG_ENDIAN or not.
48879          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48880 /* end confdefs.h.  */
48881 #include <sys/types.h>
48882                 #include <sys/param.h>
48883 
48884 int
48885 main ()
48886 {
48887 #if BYTE_ORDER != BIG_ENDIAN
48888                  not big endian
48889                 #endif
48890 
48891   ;
48892   return 0;
48893 }
48894 _ACEOF
48895 if ac_fn_cxx_try_compile "$LINENO"; then :
48896   ac_cv_c_bigendian=yes
48897 else
48898   ac_cv_c_bigendian=no
48899 fi
48900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48901 fi
48902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48903     fi
48904     if test $ac_cv_c_bigendian = unknown; then
48905       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48906       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48907 /* end confdefs.h.  */
48908 #include <limits.h>
48909 
48910 int
48911 main ()
48912 {
48913 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48914               bogus endian macros
48915              #endif
48916 
48917   ;
48918   return 0;
48919 }
48920 _ACEOF
48921 if ac_fn_cxx_try_compile "$LINENO"; then :
48922   # It does; now see whether it defined to _BIG_ENDIAN or not.
48923          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48924 /* end confdefs.h.  */
48925 #include <limits.h>
48926 
48927 int
48928 main ()
48929 {
48930 #ifndef _BIG_ENDIAN
48931                  not big endian
48932                 #endif
48933 
48934   ;
48935   return 0;
48936 }
48937 _ACEOF
48938 if ac_fn_cxx_try_compile "$LINENO"; then :
48939   ac_cv_c_bigendian=yes
48940 else
48941   ac_cv_c_bigendian=no
48942 fi
48943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48944 fi
48945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48946     fi
48947     if test $ac_cv_c_bigendian = unknown; then
48948       # Compile a test program.
48949       if test "$cross_compiling" = yes; then :
48950   # Try to guess by grepping values from an object file.
48951          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48952 /* end confdefs.h.  */
48953 short int ascii_mm[] =
48954                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48955                 short int ascii_ii[] =
48956                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48957                 int use_ascii (int i) {
48958                   return ascii_mm[i] + ascii_ii[i];
48959                 }
48960                 short int ebcdic_ii[] =
48961                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48962                 short int ebcdic_mm[] =
48963                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48964                 int use_ebcdic (int i) {
48965                   return ebcdic_mm[i] + ebcdic_ii[i];
48966                 }
48967                 extern int foo;
48968 
48969 int
48970 main ()
48971 {
48972 return use_ascii (foo) == use_ebcdic (foo);
48973   ;
48974   return 0;
48975 }
48976 _ACEOF
48977 if ac_fn_cxx_try_compile "$LINENO"; then :
48978   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48979               ac_cv_c_bigendian=yes
48980             fi
48981             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48982               if test "$ac_cv_c_bigendian" = unknown; then
48983                 ac_cv_c_bigendian=no
48984               else
48985                 # finding both strings is unlikely to happen, but who knows?
48986                 ac_cv_c_bigendian=unknown
48987               fi
48988             fi
48989 fi
48990 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48991 else
48992   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48993 /* end confdefs.h.  */
48994 $ac_includes_default
48995 int
48996 main ()
48997 {
48998 
48999              /* Are we little or big endian?  From Harbison&Steele.  */
49000              union
49001              {
49002                long int l;
49003                char c[sizeof (long int)];
49004              } u;
49005              u.l = 1;
49006              return u.c[sizeof (long int) - 1] == 1;
49007 
49008   ;
49009   return 0;
49010 }
49011 _ACEOF
49012 if ac_fn_cxx_try_run "$LINENO"; then :
49013   ac_cv_c_bigendian=no
49014 else
49015   ac_cv_c_bigendian=yes
49016 fi
49017 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49018   conftest.$ac_objext conftest.beam conftest.$ac_ext
49019 fi
49020 
49021     fi
49022 fi
49023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49024 $as_echo "$ac_cv_c_bigendian" >&6; }
49025  case $ac_cv_c_bigendian in #(
49026    yes)
49027      ENDIAN="big";; #(
49028    no)
49029      ENDIAN="little" ;; #(
49030    universal)
49031      ENDIAN="universal_endianness"
49032      ;; #(
49033    *)
49034      ENDIAN="unknown" ;;
49035  esac
49036 
49037 
49038   if test "x$ENDIAN" = xuniversal_endianness; then
49039     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49040   fi
49041   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49042     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
49043   fi
49044 
49045 
49046 # Configure flags for the tools
49047 
49048   ###############################################################################
49049   #
49050   # How to compile shared libraries.
49051   #
49052 
49053   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49054     PICFLAG="-fPIC"
49055     C_FLAG_REORDER=''
49056     CXX_FLAG_REORDER=''
49057 
49058     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49059       # Linking is different on MacOSX
49060       if test "x$STATIC_BUILD" = xtrue; then
49061         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49062       else
49063         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49064         JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49065       fi
49066       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49067       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49068       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49069       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49070     else
49071       # Default works for linux, might work on other platforms as well.
49072       SHARED_LIBRARY_FLAGS='-shared'
49073       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49074       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49075       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49076       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49077     fi
49078   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49079     C_FLAG_REORDER=''
49080     CXX_FLAG_REORDER=''
49081 
49082     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49083       # Linking is different on MacOSX
49084       PICFLAG=''
49085       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49086       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49087       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49088       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49089       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49090 
49091       if test "x$STATIC_BUILD" = xfalse; then
49092         JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49093       fi
49094     else
49095       # Default works for linux, might work on other platforms as well.
49096       PICFLAG='-fPIC'
49097       SHARED_LIBRARY_FLAGS='-shared'
49098       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49099       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49100       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49101       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49102     fi
49103   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49104     PICFLAG="-KPIC"
49105     C_FLAG_REORDER='-xF'
49106     CXX_FLAG_REORDER='-xF'
49107     SHARED_LIBRARY_FLAGS="-G"
49108     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
49109     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49110     SET_SHARED_LIBRARY_NAME='-h $1'
49111     SET_SHARED_LIBRARY_MAPFILE='-M$1'
49112   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49113     # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49114     # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49115     # will have to patch this single instruction with a call to some out-of-order code which
49116     # does the load from the TOC. This is of course slow. But in that case we also would have
49117     # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49118     # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49119     # can be patched directly by the linker and does not require a jump to out-of-order code.
49120     # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49121     # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49122     # loads for accessing a global variable). But there are rumors that this may be seen as a
49123     # 'performance feature' because of improved code locality of the symbols used in a
49124     # compilation unit.
49125     PICFLAG="-qpic"
49126     JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49127     C_FLAG_REORDER=''
49128     CXX_FLAG_REORDER=''
49129     SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49130     SET_EXECUTABLE_ORIGIN=""
49131     SET_SHARED_LIBRARY_ORIGIN=''
49132     SET_SHARED_LIBRARY_NAME=''
49133     SET_SHARED_LIBRARY_MAPFILE=''
49134   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49135     PICFLAG=""
49136     C_FLAG_REORDER=''
49137     CXX_FLAG_REORDER=''
49138     SHARED_LIBRARY_FLAGS="-dll"
49139     SET_EXECUTABLE_ORIGIN=''
49140     SET_SHARED_LIBRARY_ORIGIN=''
49141     SET_SHARED_LIBRARY_NAME=''
49142     SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49143   fi
49144 
49145 
49146 
49147 
49148 
49149 
49150 
49151 
49152 
49153   # The (cross) compiler is now configured, we can now test capabilities
49154   # of the target platform.
49155 
49156 
49157 
49158   ###############################################################################
49159   #
49160   # Setup the opt flags for different compilers
49161   # and different operating systems.
49162   #
49163 
49164   # FIXME: this was indirectly the old default, but just inherited.
49165   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49166   #   C_FLAG_DEPS="-MMD -MF"
49167   # fi
49168 
49169   # Generate make dependency files
49170   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49171     C_FLAG_DEPS="-MMD -MF"
49172   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49173     C_FLAG_DEPS="-MMD -MF"
49174   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49175     C_FLAG_DEPS="-xMMD -xMF"
49176   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49177     C_FLAG_DEPS="-qmakedep=gcc -MF"
49178   fi
49179   CXX_FLAG_DEPS="$C_FLAG_DEPS"
49180 
49181 
49182 
49183   # Debug symbols
49184   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49185     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49186       # reduce from default "-g2" option to save space
49187       CFLAGS_DEBUG_SYMBOLS="-g1"
49188       CXXFLAGS_DEBUG_SYMBOLS="-g1"
49189     else
49190       CFLAGS_DEBUG_SYMBOLS="-g"
49191       CXXFLAGS_DEBUG_SYMBOLS="-g"
49192     fi
49193   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49194     CFLAGS_DEBUG_SYMBOLS="-g"
49195     CXXFLAGS_DEBUG_SYMBOLS="-g"
49196   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49197     CFLAGS_DEBUG_SYMBOLS="-g -xs"
49198     # -g0 enables debug symbols without disabling inlining.
49199     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49200   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49201     CFLAGS_DEBUG_SYMBOLS="-g"
49202     CXXFLAGS_DEBUG_SYMBOLS="-g"
49203   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49204     CFLAGS_DEBUG_SYMBOLS="-Zi"
49205     CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49206   fi
49207 
49208 
49209 
49210   # Debug symbols for JVM_CFLAGS
49211   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49212     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49213     if test "x$DEBUG_LEVEL" = xslowdebug; then
49214       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49215     else
49216       # -g0 does not disable inlining, which -g does.
49217       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49218     fi
49219   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49220     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49221   else
49222     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49223   fi
49224 
49225 
49226   # bounds, memory and behavior checking options
49227   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49228     case $DEBUG_LEVEL in
49229     release )
49230       # no adjustment
49231       ;;
49232     fastdebug )
49233       # no adjustment
49234       ;;
49235     slowdebug )
49236       # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49237       # get's added conditionally on whether we produce debug symbols or not.
49238       # This is most likely not really correct.
49239 
49240       # Add runtime stack smashing and undefined behavior checks.
49241       # Not all versions of gcc support -fstack-protector
49242       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49243 
49244 
49245 
49246 
49247 
49248 
49249 
49250 
49251 
49252 
49253 
49254 
49255 
49256 
49257 
49258 
49259 
49260 
49261 
49262 
49263 
49264 
49265 
49266 
49267 
49268 
49269 
49270 
49271 
49272 
49273 
49274 
49275 
49276 
49277 
49278 
49279 
49280 
49281 
49282 
49283 
49284 
49285     # Execute function body
49286 
49287 
49288 
49289 
49290 
49291 
49292 
49293 
49294 
49295 
49296 
49297 
49298 
49299 
49300 
49301 
49302 
49303 
49304 
49305 
49306 
49307 
49308 
49309 
49310 
49311 
49312 
49313 
49314 
49315 
49316 
49317 
49318 
49319 
49320 
49321 
49322 
49323 
49324 
49325 
49326 
49327 
49328 
49329 
49330 
49331 
49332 
49333 
49334     # Execute function body
49335 
49336   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49337 $as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49338   supports=yes
49339 
49340   saved_cflags="$CFLAGS"
49341   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49342   ac_ext=c
49343 ac_cpp='$CPP $CPPFLAGS'
49344 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49345 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49346 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49347 
49348   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49349 /* end confdefs.h.  */
49350 int i;
49351 _ACEOF
49352 if ac_fn_c_try_compile "$LINENO"; then :
49353 
49354 else
49355   supports=no
49356 fi
49357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49358   ac_ext=cpp
49359 ac_cpp='$CXXCPP $CPPFLAGS'
49360 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49361 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49362 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49363 
49364   CFLAGS="$saved_cflags"
49365 
49366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49367 $as_echo "$supports" >&6; }
49368   if test "x$supports" = "xyes" ; then
49369     :
49370     C_COMP_SUPPORTS="yes"
49371   else
49372     :
49373     C_COMP_SUPPORTS="no"
49374   fi
49375 
49376 
49377 
49378 
49379 
49380 
49381 
49382 
49383 
49384 
49385 
49386 
49387 
49388 
49389 
49390 
49391 
49392 
49393 
49394 
49395 
49396 
49397 
49398 
49399 
49400 
49401 
49402 
49403 
49404 
49405 
49406 
49407 
49408 
49409 
49410 
49411 
49412 
49413 
49414 
49415 
49416 
49417 
49418 
49419 
49420 
49421 
49422 
49423 
49424 
49425 
49426 
49427 
49428 
49429 
49430 
49431 
49432 
49433 
49434     # Execute function body
49435 
49436   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49437 $as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49438   supports=yes
49439 
49440   saved_cxxflags="$CXXFLAGS"
49441   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49442   ac_ext=cpp
49443 ac_cpp='$CXXCPP $CPPFLAGS'
49444 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49445 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49446 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49447 
49448   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49449 /* end confdefs.h.  */
49450 int i;
49451 _ACEOF
49452 if ac_fn_cxx_try_compile "$LINENO"; then :
49453 
49454 else
49455   supports=no
49456 fi
49457 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49458   ac_ext=cpp
49459 ac_cpp='$CXXCPP $CPPFLAGS'
49460 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49461 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49462 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49463 
49464   CXXFLAGS="$saved_cxxflags"
49465 
49466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49467 $as_echo "$supports" >&6; }
49468   if test "x$supports" = "xyes" ; then
49469     :
49470     CXX_COMP_SUPPORTS="yes"
49471   else
49472     :
49473     CXX_COMP_SUPPORTS="no"
49474   fi
49475 
49476 
49477 
49478 
49479 
49480 
49481 
49482 
49483 
49484 
49485 
49486 
49487 
49488   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49489 $as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49490   supports=no
49491   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49492 
49493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49494 $as_echo "$supports" >&6; }
49495   if test "x$supports" = "xyes" ; then
49496     :
49497 
49498   else
49499     :
49500     STACK_PROTECTOR_CFLAG=""
49501   fi
49502 
49503 
49504 
49505 
49506 
49507 
49508 
49509       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49510       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49511       if test "x$STACK_PROTECTOR_CFLAG" != x; then
49512         JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49513       fi
49514       ;;
49515     esac
49516   fi
49517 
49518   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49519     if test "x$DEBUG_LEVEL" != xrelease; then
49520       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49521         JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49522       fi
49523     fi
49524   fi
49525 
49526   # Optimization levels
49527   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49528     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49529 
49530     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49531       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49532       C_O_FLAG_HIGHEST_JVM="-xO4"
49533       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49534       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49535       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49536       C_O_FLAG_DEBUG="-xregs=no%frameptr"
49537       C_O_FLAG_DEBUG_JVM=""
49538       C_O_FLAG_NONE="-xregs=no%frameptr"
49539       CXX_O_FLAG_HIGHEST_JVM="-xO4"
49540       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49541       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49542       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49543       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49544       CXX_O_FLAG_DEBUG_JVM=""
49545       CXX_O_FLAG_NONE="-xregs=no%frameptr"
49546       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49547         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49548         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49549       fi
49550     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49551       C_O_FLAG_HIGHEST_JVM="-xO4"
49552       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49553       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49554       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49555       C_O_FLAG_DEBUG=""
49556       C_O_FLAG_DEBUG_JVM=""
49557       C_O_FLAG_NONE=""
49558       CXX_O_FLAG_HIGHEST_JVM="-xO4"
49559       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49560       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49561       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49562       CXX_O_FLAG_DEBUG=""
49563       CXX_O_FLAG_DEBUG_JVM=""
49564       CXX_O_FLAG_NONE=""
49565     fi
49566   else
49567     # The remaining toolchains share opt flags between CC and CXX;
49568     # setup for C and duplicate afterwards.
49569     if test "x$TOOLCHAIN_TYPE" = xgcc; then
49570       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49571         # On MacOSX we optimize for size, something
49572         # we should do for all platforms?
49573         C_O_FLAG_HIGHEST_JVM="-Os"
49574         C_O_FLAG_HIGHEST="-Os"
49575         C_O_FLAG_HI="-Os"
49576         C_O_FLAG_NORM="-Os"
49577         C_O_FLAG_SIZE="-Os"
49578       else
49579         C_O_FLAG_HIGHEST_JVM="-O3"
49580         C_O_FLAG_HIGHEST="-O3"
49581         C_O_FLAG_HI="-O3"
49582         C_O_FLAG_NORM="-O2"
49583         C_O_FLAG_SIZE="-Os"
49584       fi
49585       C_O_FLAG_DEBUG="-O0"
49586       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49587         C_O_FLAG_DEBUG_JVM=""
49588       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49589         C_O_FLAG_DEBUG_JVM="-O0"
49590       fi
49591       C_O_FLAG_NONE="-O0"
49592     elif test "x$TOOLCHAIN_TYPE" = xclang; then
49593       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49594         # On MacOSX we optimize for size, something
49595         # we should do for all platforms?
49596         C_O_FLAG_HIGHEST_JVM="-Os"
49597         C_O_FLAG_HIGHEST="-Os"
49598         C_O_FLAG_HI="-Os"
49599         C_O_FLAG_NORM="-Os"
49600         C_O_FLAG_SIZE="-Os"
49601       else
49602         C_O_FLAG_HIGHEST_JVM="-O3"
49603         C_O_FLAG_HIGHEST="-O3"
49604         C_O_FLAG_HI="-O3"
49605         C_O_FLAG_NORM="-O2"
49606         C_O_FLAG_SIZE="-Os"
49607       fi
49608       C_O_FLAG_DEBUG="-O0"
49609       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49610         C_O_FLAG_DEBUG_JVM=""
49611       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49612         C_O_FLAG_DEBUG_JVM="-O0"
49613       fi
49614       C_O_FLAG_NONE="-O0"
49615     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49616       C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49617       C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49618       C_O_FLAG_HI="-O3 -qinline -qinlglue"
49619       C_O_FLAG_NORM="-O2"
49620       C_O_FLAG_DEBUG="-qnoopt"
49621       # FIXME: Value below not verified.
49622       C_O_FLAG_DEBUG_JVM=""
49623       C_O_FLAG_NONE="-qnoopt"
49624     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49625       C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49626       C_O_FLAG_HIGHEST="-O2"
49627       C_O_FLAG_HI="-O1"
49628       C_O_FLAG_NORM="-O1"
49629       C_O_FLAG_DEBUG="-Od"
49630       C_O_FLAG_DEBUG_JVM=""
49631       C_O_FLAG_NONE="-Od"
49632       C_O_FLAG_SIZE="-Os"
49633     fi
49634     CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49635     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49636     CXX_O_FLAG_HI="$C_O_FLAG_HI"
49637     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49638     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49639     CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49640     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49641     CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49642   fi
49643 
49644   # Adjust optimization flags according to debug level.
49645   case $DEBUG_LEVEL in
49646     release )
49647       # no adjustment
49648       ;;
49649     fastdebug )
49650       # Not quite so much optimization
49651       C_O_FLAG_HI="$C_O_FLAG_NORM"
49652       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49653       ;;
49654     slowdebug )
49655       # Disable optimization
49656       C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49657       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49658       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49659       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49660       C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49661       CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49662       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49663       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49664       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49665       CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49666       ;;
49667   esac
49668 
49669 
49670 
49671 
49672 
49673 
49674 
49675 
49676 
49677 
49678 
49679 
49680 
49681 
49682 
49683 
49684 
49685 
49686 
49687   # Special extras...
49688   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49689     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49690       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49691       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49692     fi
49693     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49694     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49695   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49696     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49697     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49698   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49699     CXXSTD_CXXFLAG="-std=gnu++98"
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 
49739 
49740 
49741 
49742     # Execute function body
49743 
49744   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49745 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49746   supports=yes
49747 
49748   saved_cxxflags="$CXXFLAGS"
49749   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49750   ac_ext=cpp
49751 ac_cpp='$CXXCPP $CPPFLAGS'
49752 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49753 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49754 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49755 
49756   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49757 /* end confdefs.h.  */
49758 int i;
49759 _ACEOF
49760 if ac_fn_cxx_try_compile "$LINENO"; then :
49761 
49762 else
49763   supports=no
49764 fi
49765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49766   ac_ext=cpp
49767 ac_cpp='$CXXCPP $CPPFLAGS'
49768 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49769 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49770 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49771 
49772   CXXFLAGS="$saved_cxxflags"
49773 
49774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49775 $as_echo "$supports" >&6; }
49776   if test "x$supports" = "xyes" ; then
49777     :
49778 
49779   else
49780     :
49781     CXXSTD_CXXFLAG=""
49782   fi
49783 
49784 
49785 
49786 
49787 
49788 
49789 
49790 
49791 
49792 
49793 
49794 
49795     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49796     JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49797 
49798   fi
49799   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49800     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49801     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49802   fi
49803 
49804   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49805     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49806     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49807   fi
49808 
49809   CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49810   CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49811   LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49812 
49813   ###############################################################################
49814   #
49815   # Now setup the CFLAGS and LDFLAGS for the JDK build.
49816   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49817   #
49818 
49819   # Setup compiler/platform specific flags into
49820   #    CFLAGS_JDK    - C Compiler flags
49821   #    CXXFLAGS_JDK  - C++ Compiler flags
49822   #    COMMON_CCXXFLAGS_JDK - common to C and C++
49823   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49824     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49825     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49826     JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49827     if test "x$OPENJDK_TARGET_CPU" = xx86; then
49828       # Force compatibility with i586 on 32 bit intel platforms.
49829       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49830       JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49831     fi
49832     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49833         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49834     case $OPENJDK_TARGET_CPU_ARCH in
49835       arm )
49836         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49837         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49838         ;;
49839       ppc )
49840         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49841         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49842         ;;
49843       s390 )
49844         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49845         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49846         ;;
49847       * )
49848         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49849         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49850         ;;
49851     esac
49852 
49853 
49854 
49855 
49856 
49857 
49858 
49859 
49860 
49861 
49862 
49863 
49864 
49865 
49866 
49867 
49868 
49869 
49870 
49871 
49872 
49873 
49874 
49875 
49876 
49877 
49878 
49879 
49880 
49881 
49882 
49883 
49884 
49885 
49886 
49887 
49888 
49889 
49890 
49891 
49892 
49893 
49894 
49895 
49896 
49897 
49898 
49899 
49900 
49901 
49902 
49903 
49904 
49905 
49906     # Execute function body
49907 
49908   # Need to assign to a variable since m4 is blocked from modifying parts in [].
49909   REFERENCE_VERSION=6
49910 
49911   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49912     as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49913   fi
49914 
49915   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49916     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49917   fi
49918 
49919   # Version comparison method inspired by http://stackoverflow.com/a/24067243
49920   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49921 
49922   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49923     :
49924 
49925   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49926   # runs afoul of the more aggressive versions of these optimisations.
49927   # Notably, value range propagation now assumes that the this pointer of C++
49928   # member functions is non-null.
49929   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49930         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49931         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49932 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49933   CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49934   JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49935 
49936   else
49937     :
49938 
49939   fi
49940 
49941 
49942 
49943 
49944 
49945 
49946 
49947 
49948 
49949 
49950 
49951 
49952 
49953 
49954   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49955     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49956 
49957     # Restrict the debug information created by Clang to avoid
49958     # too big object files and speed the build up a little bit
49959     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49960     JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49961     if test "x$OPENJDK_TARGET_OS" = xlinux; then
49962       if test "x$OPENJDK_TARGET_CPU" = xx86; then
49963         # Force compatibility with i586 on 32 bit intel platforms.
49964         COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49965         JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49966       fi
49967       JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49968       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49969           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49970       case $OPENJDK_TARGET_CPU_ARCH in
49971         ppc )
49972           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49973           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49974           ;;
49975         * )
49976           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49977           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49978           ;;
49979       esac
49980     fi
49981   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49982     JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49983     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49984     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49985       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49986     fi
49987 
49988     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49989     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49990   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49991     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49992     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49993     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49994   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49995     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49996         -MD -Zc:wchar_t- -W3 -wd4800 \
49997         -DWIN32_LEAN_AND_MEAN \
49998         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49999         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50000         -DWIN32 -DIAL"
50001     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50002       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50003     else
50004       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50005     fi
50006     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50007     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50008     # studio.
50009     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50010       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50011       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50012       JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50013     fi
50014   fi
50015 
50016   ###############################################################################
50017 
50018   # Adjust flags according to debug level.
50019   case $DEBUG_LEVEL in
50020     fastdebug | slowdebug )
50021       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50022       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50023       JAVAC_FLAGS="$JAVAC_FLAGS -g"
50024       ;;
50025     release )
50026       ;;
50027     * )
50028       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50029       ;;
50030   esac
50031 
50032   # Set some common defines. These works for all compilers, but assume
50033   # -D is universally accepted.
50034 
50035   # Setup endianness
50036   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50037     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50038     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50039     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50040     #   Note: -Dmacro         is the same as    #define macro 1
50041     #         -Dmacro=        is the same as    #define macro
50042     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50043       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50044     else
50045       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50046     fi
50047   else
50048     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50049     # are defined in the system?
50050     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50051       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50052     else
50053       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50054     fi
50055   fi
50056 
50057   # Setup target OS define. Use OS target name but in upper case.
50058   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50059   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50060 
50061   # Setup target CPU
50062   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50063       $OPENJDK_TARGET_ADD_LP64 \
50064       -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50065 
50066   # Setup debug/release defines
50067   if test "x$DEBUG_LEVEL" = xrelease; then
50068     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50069     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50070       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50071     fi
50072   else
50073     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50074   fi
50075 
50076   # Set some additional per-OS defines.
50077   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50078     JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50079     JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50080         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50081   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50082     JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50083     JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50084         -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50085   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50086     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50087     JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50088     JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50089     JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50090         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50091         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50092         -fno-omit-frame-pointer"
50093   elif test "x$OPENJDK_TARGET_OS" = xaix; then
50094     JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50095     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50096     JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50097         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50098         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50099   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50100     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50101   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50102     JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50103     JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50104   fi
50105 
50106   # Set some additional per-CPU defines.
50107   if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50108     JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50109   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50110     JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50111   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50112     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50113       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50114       # fixes `relocation truncated to fit' error for gcc 4.1.
50115       JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50116       # Use ppc64 instructions, but schedule for power5
50117       JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50118     elif test "x$OPENJDK_TARGET_OS" = xaix; then
50119       JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50120     fi
50121   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50122     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50123       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50124       # Little endian machine uses ELFv2 ABI.
50125       JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50126       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50127       JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50128     fi
50129   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50130     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50131       JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50132     fi
50133   fi
50134 
50135   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50136     JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50137   fi
50138 
50139   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50140     if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50141       # Solaris does not have _LP64=1 in the old build.
50142       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50143       JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50144     fi
50145   fi
50146 
50147   # Set JVM_CFLAGS warning handling
50148   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50149     JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50150         -Wunused-value -Woverloaded-virtual"
50151 
50152     if test "x$TOOLCHAIN_TYPE" = xgcc; then
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 
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     # Execute function body
50208 
50209   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50210   REFERENCE_VERSION=4.8
50211 
50212   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50213     as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50214   fi
50215 
50216   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50217     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50218   fi
50219 
50220   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50221   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50222 
50223   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50224     :
50225 
50226             # These flags either do not work or give spurious warnings prior to gcc 4.8.
50227             JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50228 
50229 
50230   else
50231     :
50232 
50233   fi
50234 
50235 
50236 
50237 
50238 
50239 
50240 
50241 
50242 
50243 
50244 
50245 
50246 
50247 
50248     fi
50249     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50250       # Non-zero builds have stricter warnings
50251       JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50252     else
50253       if test "x$TOOLCHAIN_TYPE" = xclang; then
50254         # Some versions of llvm do not like -Wundef
50255         JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50256       fi
50257     fi
50258   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50259     JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50260         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50261   fi
50262 
50263   # Additional macosx handling
50264   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50265     # Setting these parameters makes it an error to link to macosx APIs that are
50266     # newer than the given OS version and makes the linked binaries compatible
50267     # even if built on a newer version of the OS.
50268     # The expected format is X.Y.Z
50269     MACOSX_VERSION_MIN=10.7.0
50270 
50271 
50272     # The macro takes the version with no dots, ex: 1070
50273     # Let the flags variables get resolved in make for easier override on make
50274     # command line.
50275     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50276     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50277   fi
50278 
50279   # Setup some hard coded includes
50280   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50281       -I${JDK_TOPDIR}/src/java.base/share/native/include \
50282       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50283       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50284       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50285       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50286 
50287   # The shared libraries are compiled using the picflag.
50288   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50289       $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50290   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50291       $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50292 
50293   # Executable flags
50294   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50295   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50296 
50297 
50298 
50299 
50300 
50301 
50302   # Setup LDFLAGS et al.
50303   #
50304 
50305   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50306     LDFLAGS_MICROSOFT="-nologo -opt:ref"
50307     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50308     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50309     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50310       LDFLAGS_SAFESH="-safeseh"
50311       LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50312       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50313       # NOTE: Old build added -machine. Probably not needed.
50314       JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50315     else
50316       JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50317     fi
50318   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50319       JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50320       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50321         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50322         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50323     fi
50324   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50325     # If this is a --hash-style=gnu system, use --hash-style=both, why?
50326     # We have previously set HAS_GNU_HASH if this is the case
50327     if test -n "$HAS_GNU_HASH"; then
50328       LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50329       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50330       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50331     fi
50332       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50333         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50334     fi
50335     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50336       # And since we now know that the linker is gnu, then add -z defs, to forbid
50337       # undefined symbols in object files.
50338       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50339       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50340       JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50341       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50342       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50343       if test "x$OPENJDK_TARGET_CPU" = xx86; then
50344         JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50345       fi
50346       case $DEBUG_LEVEL in
50347         release )
50348           # tell linker to optimize libraries.
50349           # Should this be supplied to the OSS linker as well?
50350           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50351           LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50352           JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50353           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50354             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50355           fi
50356           ;;
50357         slowdebug )
50358           # Hotspot always let the linker optimize
50359           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50360           if test "x$HAS_LINKER_NOW" = "xtrue"; then
50361             # do relocations at load
50362             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50363             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50364             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50365           fi
50366           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50367             # mark relocations read only
50368             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50369             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50370             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50371           fi
50372           ;;
50373         fastdebug )
50374           # Hotspot always let the linker optimize
50375           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50376           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50377             # mark relocations read only
50378             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50379             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50380             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50381           fi
50382           ;;
50383         * )
50384           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50385           ;;
50386         esac
50387     fi
50388   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50389     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50390     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50391     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50392     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50393     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50394     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50395       JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50396     fi
50397   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50398     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50399     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50400     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50401   fi
50402 
50403   # Customize LDFLAGS for executables
50404 
50405   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50406 
50407   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50408     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50409       LDFLAGS_STACK_SIZE=1048576
50410     else
50411       LDFLAGS_STACK_SIZE=327680
50412     fi
50413     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50414   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50415     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50416   fi
50417 
50418   LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50419 
50420   # Customize LDFLAGS for libs
50421   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50422 
50423   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50424   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50425     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50426         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50427     JDKLIB_LIBS=""
50428   else
50429     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50430         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50431 
50432     if test "xTARGET" = "xTARGET"; then
50433     # On some platforms (mac) the linker warns about non existing -L dirs.
50434     # Add server first if available. Linking aginst client does not always produce the same results.
50435       # Only add client/minimal dir if client/minimal is being built.
50436     # Default to server for other variants.
50437       if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50438         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50439       elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50440         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50441       elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50442         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50443     else
50444         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50445     fi
50446     elif test "xTARGET" = "xBUILD"; then
50447       # When building a buildjdk, it's always only the server variant
50448       JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50449           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50450     fi
50451 
50452     JDKLIB_LIBS="-ljava -ljvm"
50453     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50454       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50455     fi
50456 
50457   fi
50458 
50459 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50460 
50461   # Set JVM_LIBS (per os)
50462   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50463     JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50464   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50465     # FIXME: This hard-coded path is not really proper.
50466     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50467       SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50468     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50469       SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50470     fi
50471     JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50472         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50473   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50474     JVM_LIBS="$JVM_LIBS -lm"
50475   elif test "x$OPENJDK_TARGET_OS" = xaix; then
50476     JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50477   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50478     JVM_LIBS="$JVM_LIBS -lm"
50479   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50480     JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50481         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50482         wsock32.lib winmm.lib version.lib psapi.lib"
50483     fi
50484 
50485   # Set JVM_ASFLAGS
50486   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50487     if test "x$OPENJDK_TARGET_CPU" = xx86; then
50488       JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50489     fi
50490   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50491     JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50492   fi
50493 
50494   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50495 
50496 
50497 
50498 
50499 
50500 
50501 
50502 
50503 
50504 
50505 
50506 
50507 
50508 
50509 
50510   # Special extras...
50511   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50512     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50513       OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50514       OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50515     fi
50516     OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50517     OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50518   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50519     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50520     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50521   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50522     OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50523 
50524 
50525 
50526 
50527 
50528 
50529 
50530 
50531 
50532 
50533 
50534 
50535 
50536 
50537 
50538 
50539 
50540 
50541 
50542 
50543 
50544 
50545 
50546 
50547 
50548 
50549 
50550 
50551 
50552 
50553 
50554 
50555 
50556 
50557 
50558 
50559 
50560 
50561 
50562 
50563 
50564 
50565     # Execute function body
50566 
50567   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50568 $as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50569   supports=yes
50570 
50571   saved_cxxflags="$CXXFLAGS"
50572   CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50573   ac_ext=cpp
50574 ac_cpp='$CXXCPP $CPPFLAGS'
50575 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50576 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50577 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50578 
50579   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50580 /* end confdefs.h.  */
50581 int i;
50582 _ACEOF
50583 if ac_fn_cxx_try_compile "$LINENO"; then :
50584 
50585 else
50586   supports=no
50587 fi
50588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50589   ac_ext=cpp
50590 ac_cpp='$CXXCPP $CPPFLAGS'
50591 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50592 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50593 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50594 
50595   CXXFLAGS="$saved_cxxflags"
50596 
50597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50598 $as_echo "$supports" >&6; }
50599   if test "x$supports" = "xyes" ; then
50600     :
50601 
50602   else
50603     :
50604     OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50605   fi
50606 
50607 
50608 
50609 
50610 
50611 
50612 
50613 
50614 
50615 
50616 
50617 
50618     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50619     OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50620 
50621   fi
50622   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50623     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50624     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50625   fi
50626 
50627   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50628     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50629     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50630   fi
50631 
50632   OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50633   OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50634   OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50635 
50636   ###############################################################################
50637   #
50638   # Now setup the CFLAGS and LDFLAGS for the JDK build.
50639   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50640   #
50641 
50642   # Setup compiler/platform specific flags into
50643   #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50644   #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50645   #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50646   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50647     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50648     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50649     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50650     if test "x$OPENJDK_BUILD_CPU" = xx86; then
50651       # Force compatibility with i586 on 32 bit intel platforms.
50652       OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50653       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50654     fi
50655     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50656         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50657     case $OPENJDK_BUILD_CPU_ARCH in
50658       arm )
50659         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50660         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50661         ;;
50662       ppc )
50663         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50664         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50665         ;;
50666       s390 )
50667         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50668         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50669         ;;
50670       * )
50671         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50672         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50673         ;;
50674     esac
50675 
50676 
50677 
50678 
50679 
50680 
50681 
50682 
50683 
50684 
50685 
50686 
50687 
50688 
50689 
50690 
50691 
50692 
50693 
50694 
50695 
50696 
50697 
50698 
50699 
50700 
50701 
50702 
50703 
50704 
50705 
50706 
50707 
50708 
50709 
50710 
50711 
50712 
50713 
50714 
50715 
50716 
50717 
50718 
50719 
50720 
50721 
50722 
50723 
50724 
50725 
50726 
50727 
50728 
50729     # Execute function body
50730 
50731   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50732   REFERENCE_VERSION=6
50733 
50734   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50735     as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50736   fi
50737 
50738   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50739     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50740   fi
50741 
50742   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50743   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50744 
50745   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50746     :
50747 
50748   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50749   # runs afoul of the more aggressive versions of these optimisations.
50750   # Notably, value range propagation now assumes that the this pointer of C++
50751   # member functions is non-null.
50752   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50753         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50754         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50755 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50756   OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50757   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50758 
50759   else
50760     :
50761 
50762   fi
50763 
50764 
50765 
50766 
50767 
50768 
50769 
50770 
50771 
50772 
50773 
50774 
50775 
50776 
50777   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50778     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50779 
50780     # Restrict the debug information created by Clang to avoid
50781     # too big object files and speed the build up a little bit
50782     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50783     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50784     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50785       if test "x$OPENJDK_BUILD_CPU" = xx86; then
50786         # Force compatibility with i586 on 32 bit intel platforms.
50787         OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50788         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50789       fi
50790       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50791       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50792           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50793       case $OPENJDK_BUILD_CPU_ARCH in
50794         ppc )
50795           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50796           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50797           ;;
50798         * )
50799           OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50800           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50801           ;;
50802       esac
50803     fi
50804   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50805     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50806     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50807     if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50808       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50809     fi
50810 
50811     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50812     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50813   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50814     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50815     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50816     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50817   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50818     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50819         -MD -Zc:wchar_t- -W3 -wd4800 \
50820         -DWIN32_LEAN_AND_MEAN \
50821         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50822         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50823         -DWIN32 -DIAL"
50824     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50825       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50826     else
50827       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50828     fi
50829     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50830     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50831     # studio.
50832     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50833       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50834       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50835       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50836     fi
50837   fi
50838 
50839   ###############################################################################
50840 
50841   # Adjust flags according to debug level.
50842   case $DEBUG_LEVEL in
50843     fastdebug | slowdebug )
50844       OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50845       OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50846       JAVAC_FLAGS="$JAVAC_FLAGS -g"
50847       ;;
50848     release )
50849       ;;
50850     * )
50851       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50852       ;;
50853   esac
50854 
50855   # Set some common defines. These works for all compilers, but assume
50856   # -D is universally accepted.
50857 
50858   # Setup endianness
50859   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50860     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50861     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50862     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50863     #   Note: -Dmacro         is the same as    #define macro 1
50864     #         -Dmacro=        is the same as    #define macro
50865     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50866       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50867     else
50868       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50869     fi
50870   else
50871     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50872     # are defined in the system?
50873     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50874       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50875     else
50876       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50877     fi
50878   fi
50879 
50880   # Setup target OS define. Use OS target name but in upper case.
50881   OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50882   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50883 
50884   # Setup target CPU
50885   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50886       $OPENJDK_BUILD_ADD_LP64 \
50887       -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50888 
50889   # Setup debug/release defines
50890   if test "x$DEBUG_LEVEL" = xrelease; then
50891     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50892     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50893       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50894     fi
50895   else
50896     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50897   fi
50898 
50899   # Set some additional per-OS defines.
50900   if test "x$OPENJDK_BUILD_OS" = xlinux; then
50901     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50902     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50903         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50904   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50905     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50906     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50907         -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50908   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50909     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50910     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50911     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50912     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50913         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50914         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50915         -fno-omit-frame-pointer"
50916   elif test "x$OPENJDK_BUILD_OS" = xaix; then
50917     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50918     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50919     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50920         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50921         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50922   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50923     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50924   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50925     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50926     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50927   fi
50928 
50929   # Set some additional per-CPU defines.
50930   if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50931     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50932   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50933     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50934   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50935     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50936       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50937       # fixes `relocation truncated to fit' error for gcc 4.1.
50938       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50939       # Use ppc64 instructions, but schedule for power5
50940       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50941     elif test "x$OPENJDK_BUILD_OS" = xaix; then
50942       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50943     fi
50944   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50945     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50946       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50947       # Little endian machine uses ELFv2 ABI.
50948       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50949       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50950       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50951     fi
50952   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
50953     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50954       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
50955     fi
50956   fi
50957 
50958   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50959     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50960   fi
50961 
50962   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50963     if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50964       # Solaris does not have _LP64=1 in the old build.
50965       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50966       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50967     fi
50968   fi
50969 
50970   # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50971   if test "x$OPENJDK_BUILD_OS" = xlinux; then
50972     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50973         -Wunused-value -Woverloaded-virtual"
50974 
50975     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50976 
50977 
50978 
50979 
50980 
50981 
50982 
50983 
50984 
50985 
50986 
50987 
50988 
50989 
50990 
50991 
50992 
50993 
50994 
50995 
50996 
50997 
50998 
50999 
51000 
51001 
51002 
51003 
51004 
51005 
51006 
51007 
51008 
51009 
51010 
51011 
51012 
51013 
51014 
51015 
51016 
51017 
51018 
51019 
51020 
51021 
51022 
51023 
51024 
51025 
51026 
51027 
51028 
51029 
51030     # Execute function body
51031 
51032   # Need to assign to a variable since m4 is blocked from modifying parts in [].
51033   REFERENCE_VERSION=4.8
51034 
51035   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51036     as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51037   fi
51038 
51039   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51040     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51041   fi
51042 
51043   # Version comparison method inspired by http://stackoverflow.com/a/24067243
51044   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51045 
51046   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51047     :
51048 
51049             # These flags either do not work or give spurious warnings prior to gcc 4.8.
51050             OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51051 
51052 
51053   else
51054     :
51055 
51056   fi
51057 
51058 
51059 
51060 
51061 
51062 
51063 
51064 
51065 
51066 
51067 
51068 
51069 
51070 
51071     fi
51072     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51073       # Non-zero builds have stricter warnings
51074       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51075     else
51076       if test "x$TOOLCHAIN_TYPE" = xclang; then
51077         # Some versions of llvm do not like -Wundef
51078         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51079       fi
51080     fi
51081   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51082     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51083         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51084   fi
51085 
51086   # Additional macosx handling
51087   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51088     # Setting these parameters makes it an error to link to macosx APIs that are
51089     # newer than the given OS version and makes the linked binaries compatible
51090     # even if built on a newer version of the OS.
51091     # The expected format is X.Y.Z
51092     MACOSX_VERSION_MIN=10.7.0
51093 
51094 
51095     # The macro takes the version with no dots, ex: 1070
51096     # Let the flags variables get resolved in make for easier override on make
51097     # command line.
51098     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51099     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51100   fi
51101 
51102   # Setup some hard coded includes
51103   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51104       -I${JDK_TOPDIR}/src/java.base/share/native/include \
51105       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51106       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51107       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51108       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51109 
51110   # The shared libraries are compiled using the picflag.
51111   OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51112       $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51113   OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51114       $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51115 
51116   # Executable flags
51117   OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51118   OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51119 
51120 
51121 
51122 
51123 
51124 
51125   # Setup LDFLAGS et al.
51126   #
51127 
51128   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51129     LDFLAGS_MICROSOFT="-nologo -opt:ref"
51130     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51131     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51132     if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51133       LDFLAGS_SAFESH="-safeseh"
51134       OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51135       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51136       # NOTE: Old build added -machine. Probably not needed.
51137       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51138     else
51139       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51140     fi
51141   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51142       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51143       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51144         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51145         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51146     fi
51147   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51148     # If this is a --hash-style=gnu system, use --hash-style=both, why?
51149     # We have previously set HAS_GNU_HASH if this is the case
51150     if test -n "$HAS_GNU_HASH"; then
51151       OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51152       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51153       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51154     fi
51155       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51156         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51157     fi
51158     if test "x$OPENJDK_BUILD_OS" = xlinux; then
51159       # And since we now know that the linker is gnu, then add -z defs, to forbid
51160       # undefined symbols in object files.
51161       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51162       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51163       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51164       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51165       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51166       if test "x$OPENJDK_BUILD_CPU" = xx86; then
51167         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51168       fi
51169       case $DEBUG_LEVEL in
51170         release )
51171           # tell linker to optimize libraries.
51172           # Should this be supplied to the OSS linker as well?
51173           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51174           OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51175           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51176           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51177             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51178           fi
51179           ;;
51180         slowdebug )
51181           # Hotspot always let the linker optimize
51182           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51183           if test "x$HAS_LINKER_NOW" = "xtrue"; then
51184             # do relocations at load
51185             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51186             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51187             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51188           fi
51189           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51190             # mark relocations read only
51191             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51192             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51193             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51194           fi
51195           ;;
51196         fastdebug )
51197           # Hotspot always let the linker optimize
51198           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51199           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51200             # mark relocations read only
51201             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51202             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51203             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51204           fi
51205           ;;
51206         * )
51207           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51208           ;;
51209         esac
51210     fi
51211   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51212     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51213     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51214     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51215     OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51216     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51217     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51218       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51219     fi
51220   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51221     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51222     OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51223     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51224   fi
51225 
51226   # Customize LDFLAGS for executables
51227 
51228   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51229 
51230   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51231     if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51232       LDFLAGS_STACK_SIZE=1048576
51233     else
51234       LDFLAGS_STACK_SIZE=327680
51235     fi
51236     OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51237   elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51238     OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51239   fi
51240 
51241   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51242 
51243   # Customize LDFLAGS for libs
51244   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51245 
51246   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51247   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51248     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51249         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51250     OPENJDK_BUILD_JDKLIB_LIBS=""
51251   else
51252     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51253         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51254 
51255     if test "xBUILD" = "xTARGET"; then
51256     # On some platforms (mac) the linker warns about non existing -L dirs.
51257     # Add server first if available. Linking aginst client does not always produce the same results.
51258       # Only add client/minimal dir if client/minimal is being built.
51259     # Default to server for other variants.
51260       if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51261         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51262       elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51263         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51264       elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51265         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51266     else
51267         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51268     fi
51269     elif test "xBUILD" = "xBUILD"; then
51270       # When building a buildjdk, it's always only the server variant
51271       OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51272           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51273     fi
51274 
51275     OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51276     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51277       OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51278     fi
51279 
51280   fi
51281 
51282 OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51283 
51284   # Set OPENJDK_BUILD_JVM_LIBS (per os)
51285   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51286     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51287   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51288     # FIXME: This hard-coded path is not really proper.
51289     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51290       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51291     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51292       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51293     fi
51294     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51295         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51296   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51297     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51298   elif test "x$OPENJDK_BUILD_OS" = xaix; then
51299     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51300   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51301     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51302   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51303     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51304         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51305         wsock32.lib winmm.lib version.lib psapi.lib"
51306     fi
51307 
51308   # Set OPENJDK_BUILD_JVM_ASFLAGS
51309   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51310     if test "x$OPENJDK_BUILD_CPU" = xx86; then
51311       OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51312     fi
51313   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51314     OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51315   fi
51316 
51317   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51318 
51319 
51320 
51321 
51322 
51323 
51324 
51325 
51326 
51327 
51328 
51329 
51330 
51331 
51332 
51333   # Tests are only ever compiled for TARGET
51334   # Flags for compiling test libraries
51335   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51336   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51337 
51338   # Flags for compiling test executables
51339   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51340   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51341 
51342 
51343 
51344 
51345 
51346 
51347   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51348   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51349 
51350 
51351 
51352 
51353 
51354 
51355   # Some Zero and Shark settings.
51356   # ZERO_ARCHFLAG tells the compiler which mode to build for
51357   case "${OPENJDK_TARGET_CPU}" in
51358     s390)
51359       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51360       ;;
51361     *)
51362       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51363   esac
51364 
51365 
51366 
51367 
51368 
51369 
51370 
51371 
51372 
51373 
51374 
51375 
51376 
51377 
51378 
51379 
51380 
51381 
51382 
51383 
51384 
51385 
51386 
51387 
51388 
51389 
51390 
51391 
51392 
51393 
51394 
51395 
51396 
51397 
51398 
51399 
51400 
51401 
51402 
51403 
51404 
51405 
51406     # Execute function body
51407 
51408 
51409 
51410 
51411 
51412 
51413 
51414 
51415 
51416 
51417 
51418 
51419 
51420 
51421 
51422 
51423 
51424 
51425 
51426 
51427 
51428 
51429 
51430 
51431 
51432 
51433 
51434 
51435 
51436 
51437 
51438 
51439 
51440 
51441 
51442 
51443 
51444 
51445 
51446 
51447 
51448 
51449 
51450 
51451 
51452 
51453 
51454 
51455     # Execute function body
51456 
51457   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51458 $as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51459   supports=yes
51460 
51461   saved_cflags="$CFLAGS"
51462   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51463   ac_ext=c
51464 ac_cpp='$CPP $CPPFLAGS'
51465 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51466 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51467 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51468 
51469   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51470 /* end confdefs.h.  */
51471 int i;
51472 _ACEOF
51473 if ac_fn_c_try_compile "$LINENO"; then :
51474 
51475 else
51476   supports=no
51477 fi
51478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51479   ac_ext=cpp
51480 ac_cpp='$CXXCPP $CPPFLAGS'
51481 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51482 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51483 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51484 
51485   CFLAGS="$saved_cflags"
51486 
51487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51488 $as_echo "$supports" >&6; }
51489   if test "x$supports" = "xyes" ; then
51490     :
51491     C_COMP_SUPPORTS="yes"
51492   else
51493     :
51494     C_COMP_SUPPORTS="no"
51495   fi
51496 
51497 
51498 
51499 
51500 
51501 
51502 
51503 
51504 
51505 
51506 
51507 
51508 
51509 
51510 
51511 
51512 
51513 
51514 
51515 
51516 
51517 
51518 
51519 
51520 
51521 
51522 
51523 
51524 
51525 
51526 
51527 
51528 
51529 
51530 
51531 
51532 
51533 
51534 
51535 
51536 
51537 
51538 
51539 
51540 
51541 
51542 
51543 
51544 
51545 
51546 
51547 
51548 
51549 
51550 
51551 
51552 
51553 
51554 
51555     # Execute function body
51556 
51557   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51558 $as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51559   supports=yes
51560 
51561   saved_cxxflags="$CXXFLAGS"
51562   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51563   ac_ext=cpp
51564 ac_cpp='$CXXCPP $CPPFLAGS'
51565 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51566 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51567 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51568 
51569   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51570 /* end confdefs.h.  */
51571 int i;
51572 _ACEOF
51573 if ac_fn_cxx_try_compile "$LINENO"; then :
51574 
51575 else
51576   supports=no
51577 fi
51578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51579   ac_ext=cpp
51580 ac_cpp='$CXXCPP $CPPFLAGS'
51581 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51582 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51583 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51584 
51585   CXXFLAGS="$saved_cxxflags"
51586 
51587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51588 $as_echo "$supports" >&6; }
51589   if test "x$supports" = "xyes" ; then
51590     :
51591     CXX_COMP_SUPPORTS="yes"
51592   else
51593     :
51594     CXX_COMP_SUPPORTS="no"
51595   fi
51596 
51597 
51598 
51599 
51600 
51601 
51602 
51603 
51604 
51605 
51606 
51607 
51608 
51609   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51610 $as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51611   supports=no
51612   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51613 
51614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51615 $as_echo "$supports" >&6; }
51616   if test "x$supports" = "xyes" ; then
51617     :
51618 
51619   else
51620     :
51621     ZERO_ARCHFLAG=""
51622   fi
51623 
51624 
51625 
51626 
51627 
51628 
51629 
51630 
51631   # Check that the compiler supports -mX (or -qX on AIX) flags
51632   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51633 
51634 
51635 
51636 
51637 
51638 
51639 
51640 
51641 
51642 
51643 
51644 
51645 
51646 
51647 
51648 
51649 
51650 
51651 
51652 
51653 
51654 
51655 
51656 
51657 
51658 
51659 
51660 
51661 
51662 
51663 
51664 
51665 
51666 
51667 
51668 
51669 
51670 
51671 
51672 
51673 
51674 
51675 
51676 
51677 
51678 
51679 
51680     # Execute function body
51681 
51682 
51683 
51684 
51685 
51686 
51687 
51688 
51689 
51690 
51691 
51692 
51693 
51694 
51695 
51696 
51697 
51698 
51699 
51700 
51701 
51702 
51703 
51704 
51705 
51706 
51707 
51708 
51709 
51710 
51711 
51712 
51713 
51714 
51715 
51716 
51717 
51718 
51719 
51720 
51721 
51722 
51723 
51724 
51725 
51726 
51727 
51728 
51729     # Execute function body
51730 
51731   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51732 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51733   supports=yes
51734 
51735   saved_cflags="$CFLAGS"
51736   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51737   ac_ext=c
51738 ac_cpp='$CPP $CPPFLAGS'
51739 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51740 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51741 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51742 
51743   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51744 /* end confdefs.h.  */
51745 int i;
51746 _ACEOF
51747 if ac_fn_c_try_compile "$LINENO"; then :
51748 
51749 else
51750   supports=no
51751 fi
51752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51753   ac_ext=cpp
51754 ac_cpp='$CXXCPP $CPPFLAGS'
51755 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51756 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51757 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51758 
51759   CFLAGS="$saved_cflags"
51760 
51761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51762 $as_echo "$supports" >&6; }
51763   if test "x$supports" = "xyes" ; then
51764     :
51765     C_COMP_SUPPORTS="yes"
51766   else
51767     :
51768     C_COMP_SUPPORTS="no"
51769   fi
51770 
51771 
51772 
51773 
51774 
51775 
51776 
51777 
51778 
51779 
51780 
51781 
51782 
51783 
51784 
51785 
51786 
51787 
51788 
51789 
51790 
51791 
51792 
51793 
51794 
51795 
51796 
51797 
51798 
51799 
51800 
51801 
51802 
51803 
51804 
51805 
51806 
51807 
51808 
51809 
51810 
51811 
51812 
51813 
51814 
51815 
51816 
51817 
51818 
51819 
51820 
51821 
51822 
51823 
51824 
51825 
51826 
51827 
51828 
51829     # Execute function body
51830 
51831   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51832 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51833   supports=yes
51834 
51835   saved_cxxflags="$CXXFLAGS"
51836   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51837   ac_ext=cpp
51838 ac_cpp='$CXXCPP $CPPFLAGS'
51839 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51840 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51841 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51842 
51843   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51844 /* end confdefs.h.  */
51845 int i;
51846 _ACEOF
51847 if ac_fn_cxx_try_compile "$LINENO"; then :
51848 
51849 else
51850   supports=no
51851 fi
51852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51853   ac_ext=cpp
51854 ac_cpp='$CXXCPP $CPPFLAGS'
51855 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51856 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51857 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51858 
51859   CXXFLAGS="$saved_cxxflags"
51860 
51861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51862 $as_echo "$supports" >&6; }
51863   if test "x$supports" = "xyes" ; then
51864     :
51865     CXX_COMP_SUPPORTS="yes"
51866   else
51867     :
51868     CXX_COMP_SUPPORTS="no"
51869   fi
51870 
51871 
51872 
51873 
51874 
51875 
51876 
51877 
51878 
51879 
51880 
51881 
51882 
51883   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51884 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51885   supports=no
51886   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51887 
51888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51889 $as_echo "$supports" >&6; }
51890   if test "x$supports" = "xyes" ; then
51891     :
51892     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51893   else
51894     :
51895     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51896   fi
51897 
51898 
51899 
51900 
51901 
51902 
51903 
51904 
51905   # Check whether --enable-warnings-as-errors was given.
51906 if test "${enable_warnings_as_errors+set}" = set; then :
51907   enableval=$enable_warnings_as_errors;
51908 fi
51909 
51910 
51911   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51912 $as_echo_n "checking if native warnings are errors... " >&6; }
51913   if test "x$enable_warnings_as_errors" = "xyes"; then
51914     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51915 $as_echo "yes (explicitely set)" >&6; }
51916     WARNINGS_AS_ERRORS=true
51917   elif test "x$enable_warnings_as_errors" = "xno"; then
51918     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51919 $as_echo "no" >&6; }
51920     WARNINGS_AS_ERRORS=false
51921   elif test "x$enable_warnings_as_errors" = "x"; then
51922     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51923 $as_echo "yes (default)" >&6; }
51924     WARNINGS_AS_ERRORS=true
51925   else
51926     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51927   fi
51928 
51929   if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51930     # Set legacy hotspot variable
51931     HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51932   else
51933     HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51934   fi
51935 
51936 
51937 
51938 
51939   case "${TOOLCHAIN_TYPE}" in
51940     microsoft)
51941       DISABLE_WARNING_PREFIX="-wd"
51942       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51943       ;;
51944     solstudio)
51945       DISABLE_WARNING_PREFIX="-erroff="
51946       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51947       ;;
51948     gcc)
51949       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51950 
51951 
51952 
51953 
51954 
51955 
51956 
51957 
51958 
51959 
51960 
51961 
51962 
51963 
51964 
51965 
51966 
51967 
51968 
51969 
51970 
51971 
51972 
51973 
51974 
51975 
51976 
51977 
51978 
51979 
51980 
51981 
51982 
51983 
51984 
51985 
51986 
51987 
51988 
51989 
51990 
51991 
51992 
51993 
51994 
51995 
51996 
51997     # Execute function body
51998 
51999 
52000 
52001 
52002 
52003 
52004 
52005 
52006 
52007 
52008 
52009 
52010 
52011 
52012 
52013 
52014 
52015 
52016 
52017 
52018 
52019 
52020 
52021 
52022 
52023 
52024 
52025 
52026 
52027 
52028 
52029 
52030 
52031 
52032 
52033 
52034 
52035 
52036 
52037 
52038 
52039 
52040 
52041 
52042 
52043 
52044 
52045 
52046     # Execute function body
52047 
52048   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52049 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52050   supports=yes
52051 
52052   saved_cflags="$CFLAGS"
52053   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52054   ac_ext=c
52055 ac_cpp='$CPP $CPPFLAGS'
52056 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52057 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52058 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52059 
52060   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52061 /* end confdefs.h.  */
52062 int i;
52063 _ACEOF
52064 if ac_fn_c_try_compile "$LINENO"; then :
52065 
52066 else
52067   supports=no
52068 fi
52069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52070   ac_ext=cpp
52071 ac_cpp='$CXXCPP $CPPFLAGS'
52072 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52073 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52074 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52075 
52076   CFLAGS="$saved_cflags"
52077 
52078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52079 $as_echo "$supports" >&6; }
52080   if test "x$supports" = "xyes" ; then
52081     :
52082     C_COMP_SUPPORTS="yes"
52083   else
52084     :
52085     C_COMP_SUPPORTS="no"
52086   fi
52087 
52088 
52089 
52090 
52091 
52092 
52093 
52094 
52095 
52096 
52097 
52098 
52099 
52100 
52101 
52102 
52103 
52104 
52105 
52106 
52107 
52108 
52109 
52110 
52111 
52112 
52113 
52114 
52115 
52116 
52117 
52118 
52119 
52120 
52121 
52122 
52123 
52124 
52125 
52126 
52127 
52128 
52129 
52130 
52131 
52132 
52133 
52134 
52135 
52136 
52137 
52138 
52139 
52140 
52141 
52142 
52143 
52144 
52145 
52146     # Execute function body
52147 
52148   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52149 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52150   supports=yes
52151 
52152   saved_cxxflags="$CXXFLAGS"
52153   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52154   ac_ext=cpp
52155 ac_cpp='$CXXCPP $CPPFLAGS'
52156 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52157 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52158 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52159 
52160   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52161 /* end confdefs.h.  */
52162 int i;
52163 _ACEOF
52164 if ac_fn_cxx_try_compile "$LINENO"; then :
52165 
52166 else
52167   supports=no
52168 fi
52169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52170   ac_ext=cpp
52171 ac_cpp='$CXXCPP $CPPFLAGS'
52172 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52173 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52174 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52175 
52176   CXXFLAGS="$saved_cxxflags"
52177 
52178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52179 $as_echo "$supports" >&6; }
52180   if test "x$supports" = "xyes" ; then
52181     :
52182     CXX_COMP_SUPPORTS="yes"
52183   else
52184     :
52185     CXX_COMP_SUPPORTS="no"
52186   fi
52187 
52188 
52189 
52190 
52191 
52192 
52193 
52194 
52195 
52196 
52197 
52198 
52199 
52200   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52201 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52202   supports=no
52203   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52204 
52205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52206 $as_echo "$supports" >&6; }
52207   if test "x$supports" = "xyes" ; then
52208     :
52209     GCC_CAN_DISABLE_WARNINGS=true
52210   else
52211     :
52212     GCC_CAN_DISABLE_WARNINGS=false
52213 
52214   fi
52215 
52216 
52217 
52218 
52219 
52220 
52221       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52222         DISABLE_WARNING_PREFIX="-Wno-"
52223       else
52224         DISABLE_WARNING_PREFIX=
52225       fi
52226       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52227       # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52228       # CFLAGS since any target specific flags will likely not work with the
52229       # build compiler
52230       CC_OLD="$CC"
52231       CXX_OLD="$CXX"
52232       CC="$BUILD_CC"
52233       CXX="$BUILD_CXX"
52234       CFLAGS_OLD="$CFLAGS"
52235       CFLAGS=""
52236 
52237 
52238 
52239 
52240 
52241 
52242 
52243 
52244 
52245 
52246 
52247 
52248 
52249 
52250 
52251 
52252 
52253 
52254 
52255 
52256 
52257 
52258 
52259 
52260 
52261 
52262 
52263 
52264 
52265 
52266 
52267 
52268 
52269 
52270 
52271 
52272 
52273 
52274 
52275 
52276 
52277 
52278 
52279 
52280 
52281 
52282 
52283     # Execute function body
52284 
52285 
52286 
52287 
52288 
52289 
52290 
52291 
52292 
52293 
52294 
52295 
52296 
52297 
52298 
52299 
52300 
52301 
52302 
52303 
52304 
52305 
52306 
52307 
52308 
52309 
52310 
52311 
52312 
52313 
52314 
52315 
52316 
52317 
52318 
52319 
52320 
52321 
52322 
52323 
52324 
52325 
52326 
52327 
52328 
52329 
52330 
52331 
52332     # Execute function body
52333 
52334   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52335 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52336   supports=yes
52337 
52338   saved_cflags="$CFLAGS"
52339   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52340   ac_ext=c
52341 ac_cpp='$CPP $CPPFLAGS'
52342 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52343 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52344 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52345 
52346   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52347 /* end confdefs.h.  */
52348 int i;
52349 _ACEOF
52350 if ac_fn_c_try_compile "$LINENO"; then :
52351 
52352 else
52353   supports=no
52354 fi
52355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52356   ac_ext=cpp
52357 ac_cpp='$CXXCPP $CPPFLAGS'
52358 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52359 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52360 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52361 
52362   CFLAGS="$saved_cflags"
52363 
52364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52365 $as_echo "$supports" >&6; }
52366   if test "x$supports" = "xyes" ; then
52367     :
52368     C_COMP_SUPPORTS="yes"
52369   else
52370     :
52371     C_COMP_SUPPORTS="no"
52372   fi
52373 
52374 
52375 
52376 
52377 
52378 
52379 
52380 
52381 
52382 
52383 
52384 
52385 
52386 
52387 
52388 
52389 
52390 
52391 
52392 
52393 
52394 
52395 
52396 
52397 
52398 
52399 
52400 
52401 
52402 
52403 
52404 
52405 
52406 
52407 
52408 
52409 
52410 
52411 
52412 
52413 
52414 
52415 
52416 
52417 
52418 
52419 
52420 
52421 
52422 
52423 
52424 
52425 
52426 
52427 
52428 
52429 
52430 
52431 
52432     # Execute function body
52433 
52434   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52435 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52436   supports=yes
52437 
52438   saved_cxxflags="$CXXFLAGS"
52439   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52440   ac_ext=cpp
52441 ac_cpp='$CXXCPP $CPPFLAGS'
52442 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52443 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52444 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52445 
52446   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52447 /* end confdefs.h.  */
52448 int i;
52449 _ACEOF
52450 if ac_fn_cxx_try_compile "$LINENO"; then :
52451 
52452 else
52453   supports=no
52454 fi
52455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52456   ac_ext=cpp
52457 ac_cpp='$CXXCPP $CPPFLAGS'
52458 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52459 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52460 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52461 
52462   CXXFLAGS="$saved_cxxflags"
52463 
52464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52465 $as_echo "$supports" >&6; }
52466   if test "x$supports" = "xyes" ; then
52467     :
52468     CXX_COMP_SUPPORTS="yes"
52469   else
52470     :
52471     CXX_COMP_SUPPORTS="no"
52472   fi
52473 
52474 
52475 
52476 
52477 
52478 
52479 
52480 
52481 
52482 
52483 
52484 
52485 
52486   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52487 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52488   supports=no
52489   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52490 
52491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52492 $as_echo "$supports" >&6; }
52493   if test "x$supports" = "xyes" ; then
52494     :
52495     BUILD_CC_CAN_DISABLE_WARNINGS=true
52496   else
52497     :
52498     BUILD_CC_CAN_DISABLE_WARNINGS=false
52499 
52500   fi
52501 
52502 
52503 
52504 
52505 
52506 
52507       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52508         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52509       else
52510         BUILD_CC_DISABLE_WARNING_PREFIX=
52511       fi
52512       CC="$CC_OLD"
52513       CXX="$CXX_OLD"
52514       CFLAGS="$CFLAGS_OLD"
52515       ;;
52516     clang)
52517       DISABLE_WARNING_PREFIX="-Wno-"
52518       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52519       ;;
52520     xlc)
52521       DISABLE_WARNING_PREFIX="-qsuppress="
52522       CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52523       ;;
52524   esac
52525 
52526 
52527 
52528 
52529 
52530 # Setup debug symbols (need objcopy from the toolchain for that)
52531 
52532   #
52533   # NATIVE_DEBUG_SYMBOLS
52534   # This must be done after the toolchain is setup, since we're looking at objcopy.
52535   #
52536   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52537 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
52538 
52539 # Check whether --with-native-debug-symbols was given.
52540 if test "${with_native_debug_symbols+set}" = set; then :
52541   withval=$with_native_debug_symbols;
52542         if test "x$OPENJDK_TARGET_OS" = xaix; then
52543           if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52544             as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52545           fi
52546         fi
52547 
52548 else
52549 
52550         if test "x$OPENJDK_TARGET_OS" = xaix; then
52551           # AIX doesn't support 'zipped' so use 'internal' as default
52552           with_native_debug_symbols="internal"
52553         else
52554           if test "x$STATIC_BUILD" = xtrue; then
52555             with_native_debug_symbols="none"
52556           else
52557             with_native_debug_symbols="zipped"
52558           fi
52559         fi
52560 
52561 fi
52562 
52563   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52565 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52566 
52567   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52568 
52569     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52570       if test "x$OBJCOPY" = x; then
52571         # enabling of enable-debug-symbols and can't find objcopy
52572         # this is an error
52573         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52574       fi
52575     fi
52576 
52577     COMPILE_WITH_DEBUG_SYMBOLS=true
52578     COPY_DEBUG_SYMBOLS=true
52579     ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52580 
52581     # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52582     DEBUG_BINARIES=false
52583     STRIP_POLICY=min_strip
52584 
52585   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52586     COMPILE_WITH_DEBUG_SYMBOLS=false
52587     COPY_DEBUG_SYMBOLS=false
52588     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52589 
52590     DEBUG_BINARIES=false
52591     STRIP_POLICY=no_strip
52592   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52593     COMPILE_WITH_DEBUG_SYMBOLS=true
52594     COPY_DEBUG_SYMBOLS=false
52595     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52596 
52597     # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52598     DEBUG_BINARIES=true
52599     STRIP_POLICY=no_strip
52600     STRIP=""
52601 
52602   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52603 
52604     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52605       if test "x$OBJCOPY" = x; then
52606         # enabling of enable-debug-symbols and can't find objcopy
52607         # this is an error
52608         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52609       fi
52610     fi
52611 
52612     COMPILE_WITH_DEBUG_SYMBOLS=true
52613     COPY_DEBUG_SYMBOLS=true
52614     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52615 
52616     # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52617     DEBUG_BINARIES=false
52618     STRIP_POLICY=min_strip
52619   else
52620     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52621   fi
52622 
52623   # --enable-debug-symbols is deprecated.
52624   # Please use --with-native-debug-symbols=[internal,external,zipped] .
52625 
52626   # Check whether --enable-debug-symbols was given.
52627 if test "${enable_debug_symbols+set}" = set; then :
52628   enableval=$enable_debug_symbols;
52629 fi
52630 
52631   if test "x$enable_debug_symbols" != x; then
52632     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52633 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52634 
52635     if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52636       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52637 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52638     fi
52639 
52640   fi
52641 
52642 
52643   # --enable-zip-debug-info is deprecated.
52644   # Please use --with-native-debug-symbols=zipped .
52645 
52646   # Check whether --enable-zip-debug-info was given.
52647 if test "${enable_zip_debug_info+set}" = set; then :
52648   enableval=$enable_zip_debug_info;
52649 fi
52650 
52651   if test "x$enable_zip_debug_info" != x; then
52652     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52653 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52654 
52655     if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52656       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52657 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52658     fi
52659 
52660   fi
52661 
52662 
52663 
52664 
52665 
52666 
52667   # Legacy values
52668 
52669 
52670 
52671 
52672   # Check whether --enable-native-coverage was given.
52673 if test "${enable_native_coverage+set}" = set; then :
52674   enableval=$enable_native_coverage;
52675 fi
52676 
52677   GCOV_ENABLED="false"
52678   if test "x$enable_native_coverage" = "xyes"; then
52679     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52680       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52681 $as_echo_n "checking if native coverage is enabled... " >&6; }
52682       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52683 $as_echo "yes" >&6; }
52684       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52685       GCOV_LDFLAGS="-fprofile-arcs"
52686       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52687       LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52688       LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52689       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52690       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52691       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52692       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52693       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52694       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52695       GCOV_ENABLED="true"
52696     else
52697       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52698     fi
52699   elif test "x$enable_native_coverage" = "xno"; then
52700     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52701 $as_echo_n "checking if native coverage is enabled... " >&6; }
52702     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52703 $as_echo "no" >&6; }
52704   elif test "x$enable_native_coverage" != "x"; then
52705     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52706   fi
52707 
52708 
52709 
52710 
52711 # Need toolchain to setup dtrace
52712 
52713   # Test for dtrace dependencies
52714   # Check whether --enable-dtrace was given.
52715 if test "${enable_dtrace+set}" = set; then :
52716   enableval=$enable_dtrace;
52717 fi
52718 
52719 
52720   DTRACE_DEP_MISSING=false
52721 
52722   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52723 $as_echo_n "checking for dtrace tool... " >&6; }
52724   if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52725     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52726 $as_echo "$DTRACE" >&6; }
52727   else
52728     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52729 $as_echo "not found, cannot build dtrace" >&6; }
52730     DTRACE_DEP_MISSING=true
52731   fi
52732 
52733   for ac_header in sys/sdt.h
52734 do :
52735   ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52736 if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52737   cat >>confdefs.h <<_ACEOF
52738 #define HAVE_SYS_SDT_H 1
52739 _ACEOF
52740  DTRACE_HEADERS_OK=yes
52741 else
52742   DTRACE_HEADERS_OK=no
52743 fi
52744 
52745 done
52746 
52747   if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52748     DTRACE_DEP_MISSING=true
52749   fi
52750 
52751   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52752 $as_echo_n "checking if dtrace should be built... " >&6; }
52753   if test "x$enable_dtrace" = "xyes"; then
52754     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52755       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52756 $as_echo "no, missing dependencies" >&6; }
52757 
52758   # Print a helpful message on how to acquire the necessary build dependency.
52759   # dtrace is the help tag: freetype, cups, alsa etc
52760   MISSING_DEPENDENCY=dtrace
52761 
52762   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52763     cygwin_help $MISSING_DEPENDENCY
52764   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52765     msys_help $MISSING_DEPENDENCY
52766   else
52767     PKGHANDLER_COMMAND=
52768 
52769     case $PKGHANDLER in
52770       apt-get)
52771         apt_help     $MISSING_DEPENDENCY ;;
52772       yum)
52773         yum_help     $MISSING_DEPENDENCY ;;
52774       port)
52775         port_help    $MISSING_DEPENDENCY ;;
52776       pkgutil)
52777         pkgutil_help $MISSING_DEPENDENCY ;;
52778       pkgadd)
52779         pkgadd_help  $MISSING_DEPENDENCY ;;
52780     esac
52781 
52782     if test "x$PKGHANDLER_COMMAND" != x; then
52783       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52784     fi
52785   fi
52786 
52787       as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52788     else
52789       INCLUDE_DTRACE=true
52790       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52791 $as_echo "yes, forced" >&6; }
52792     fi
52793   elif test "x$enable_dtrace" = "xno"; then
52794     INCLUDE_DTRACE=false
52795     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52796 $as_echo "no, forced" >&6; }
52797   elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52798     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52799       INCLUDE_DTRACE=false
52800       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52801 $as_echo "no, missing dependencies" >&6; }
52802     else
52803       INCLUDE_DTRACE=true
52804       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52805 $as_echo "yes, dependencies present" >&6; }
52806     fi
52807   else
52808     as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52809   fi
52810 
52811 
52812 
52813   # The user can in some cases supply additional jvm features. For the custom
52814   # variant, this defines the entire variant.
52815 
52816 # Check whether --with-jvm-features was given.
52817 if test "${with_jvm_features+set}" = set; then :
52818   withval=$with_jvm_features;
52819 fi
52820 
52821   if test "x$with_jvm_features" != x; then
52822     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52823 $as_echo_n "checking additional JVM features... " >&6; }
52824     JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52825     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52826 $as_echo "$JVM_FEATURES" >&6; }
52827   fi
52828 
52829   # Verify that dependencies are met for explicitly set features.
52830   if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52831     as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52832   fi
52833 
52834   if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52835     as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52836   fi
52837 
52838   if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52839     as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52840   fi
52841 
52842   if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52843     as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52844   fi
52845 
52846   if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52847     as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52848   fi
52849 
52850   # Turn on additional features based on other parts of configure
52851   if test "x$INCLUDE_DTRACE" = "xtrue"; then
52852     JVM_FEATURES="$JVM_FEATURES dtrace"
52853   else
52854     if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52855       as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52856     fi
52857   fi
52858 
52859   if test "x$STATIC_BUILD" = "xtrue"; then
52860     JVM_FEATURES="$JVM_FEATURES static-build"
52861   else
52862     if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52863       as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52864     fi
52865   fi
52866 
52867   if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52868     if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52869       as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52870     fi
52871   fi
52872 
52873   if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52874     if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52875       as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52876     fi
52877   fi
52878 
52879   # Only enable jvmci on x86_64, sparcv9 and aarch64.
52880   if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52881       test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52882       test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52883     JVM_FEATURES_jvmci="jvmci"
52884   else
52885     JVM_FEATURES_jvmci=""
52886   fi
52887 
52888   # All variants but minimal (and custom) get these features
52889   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52890 
52891   # Enable features depending on variant.
52892   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52893   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52894   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52895   JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52896   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52897   JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52898   JVM_FEATURES_custom="$JVM_FEATURES"
52899 
52900 
52901 
52902 
52903 
52904 
52905 
52906 
52907 
52908   # Used for verification of Makefiles by check-jvm-feature
52909 
52910 
52911   # We don't support --with-jvm-interpreter anymore, use zero instead.
52912 
52913 
52914 # Check whether --with-jvm-interpreter was given.
52915 if test "${with_jvm_interpreter+set}" = set; then :
52916   withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52917 $as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52918 fi
52919 
52920 
52921 
52922 
52923   # Check whether --enable-hotspot-gtest was given.
52924 if test "${enable_hotspot_gtest+set}" = set; then :
52925   enableval=$enable_hotspot_gtest;
52926 fi
52927 
52928 
52929   if test -e "$HOTSPOT_TOPDIR/test/native"; then
52930     GTEST_DIR_EXISTS="true"
52931   else
52932     GTEST_DIR_EXISTS="false"
52933   fi
52934 
52935   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52936 $as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52937   if test "x$enable_hotspot_gtest" = "xyes"; then
52938     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52939       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52940 $as_echo "yes, forced" >&6; }
52941       BUILD_GTEST="true"
52942     else
52943       as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52944     fi
52945   elif test "x$enable_hotspot_gtest" = "xno"; then
52946     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52947 $as_echo "no, forced" >&6; }
52948     BUILD_GTEST="false"
52949   elif test "x$enable_hotspot_gtest" = "x"; then
52950     if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52951       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52952 $as_echo "yes" >&6; }
52953       BUILD_GTEST="true"
52954     else
52955       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52956 $as_echo "no" >&6; }
52957       BUILD_GTEST="false"
52958     fi
52959   else
52960     as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52961   fi
52962 
52963 
52964 
52965 
52966 ###############################################################################
52967 #
52968 # Check dependencies for external and internal libraries.
52969 #
52970 ###############################################################################
52971 
52972 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52973 
52974   # When using cygwin or msys, we need a wrapper binary that renames
52975   # /cygdrive/c/ arguments into c:/ arguments and peeks into
52976   # @files and rewrites these too! This wrapper binary is
52977   # called fixpath.
52978   FIXPATH=
52979   if test "x$OPENJDK_BUILD_OS" = xwindows; then
52980     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52981 $as_echo_n "checking if fixpath can be created... " >&6; }
52982     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52983     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52984     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52985     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52986       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52987       FIXPATH="$FIXPATH_BIN -c"
52988     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52989       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52990       # @ was chosen as separator to minimize risk of other tools messing around with it
52991       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52992           | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52993       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52994       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52995     fi
52996     FIXPATH_SRC_W="$FIXPATH_SRC"
52997     FIXPATH_BIN_W="$FIXPATH_BIN"
52998 
52999   unix_path="$FIXPATH_SRC_W"
53000   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53001     windows_path=`$CYGPATH -m "$unix_path"`
53002     FIXPATH_SRC_W="$windows_path"
53003   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53004     windows_path=`cmd //c echo $unix_path`
53005     FIXPATH_SRC_W="$windows_path"
53006   fi
53007 
53008 
53009   unix_path="$FIXPATH_BIN_W"
53010   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53011     windows_path=`$CYGPATH -m "$unix_path"`
53012     FIXPATH_BIN_W="$windows_path"
53013   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53014     windows_path=`cmd //c echo $unix_path`
53015     FIXPATH_BIN_W="$windows_path"
53016   fi
53017 
53018     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53019     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53020     cd $FIXPATH_DIR
53021     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53022     cd $CURDIR
53023 
53024     if test ! -x $FIXPATH_BIN; then
53025       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53026 $as_echo "no" >&6; }
53027       cat $FIXPATH_DIR/fixpath1.log
53028       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53029     fi
53030     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53031 $as_echo "yes" >&6; }
53032     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53033 $as_echo_n "checking if fixpath.exe works... " >&6; }
53034     cd $FIXPATH_DIR
53035     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53036         > $FIXPATH_DIR/fixpath2.log 2>&1
53037     cd $CURDIR
53038     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53039       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53040 $as_echo "no" >&6; }
53041       cat $FIXPATH_DIR/fixpath2.log
53042       as_fn_error $? "fixpath did not work!" "$LINENO" 5
53043     fi
53044     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53045 $as_echo "yes" >&6; }
53046 
53047     FIXPATH_DETACH_FLAG="--detach"
53048   fi
53049 
53050 
53051 
53052 
53053 
53054 
53055   # Check if X11 is needed
53056   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53057     # No X11 support on windows or macosx
53058     NEEDS_LIB_X11=false
53059   else
53060     # All other instances need X11, even if building headless only, libawt still
53061     # needs X11 headers.
53062     NEEDS_LIB_X11=true
53063   fi
53064 
53065   # Check if cups is needed
53066   if test "x$OPENJDK_TARGET_OS" = xwindows; then
53067     # Windows have a separate print system
53068     NEEDS_LIB_CUPS=false
53069   else
53070     NEEDS_LIB_CUPS=true
53071   fi
53072 
53073   # A custom hook may have set this already
53074   if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53075     NEEDS_LIB_FREETYPE=true
53076   fi
53077 
53078   # Check if alsa is needed
53079   if test "x$OPENJDK_TARGET_OS" = xlinux; then
53080     NEEDS_LIB_ALSA=true
53081   else
53082     NEEDS_LIB_ALSA=false
53083   fi
53084 
53085   # Check if ffi is needed
53086   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53087     NEEDS_LIB_FFI=true
53088   else
53089     NEEDS_LIB_FFI=false
53090   fi
53091 
53092 
53093   # statically link libstdc++ before C++ ABI is stablized on Linux unless
53094   # dynamic build is configured on command line.
53095 
53096 # Check whether --with-stdc++lib was given.
53097 if test "${with_stdc__lib+set}" = set; then :
53098   withval=$with_stdc__lib;
53099         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53100                 && test "x$with_stdc__lib" != xdefault; then
53101           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53102         fi
53103 
53104 else
53105   with_stdc__lib=default
53106 
53107 fi
53108 
53109 
53110   if test "x$OPENJDK_TARGET_OS" = xlinux; then
53111     # Test if stdc++ can be linked statically.
53112     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53113 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53114     STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53115     ac_ext=cpp
53116 ac_cpp='$CXXCPP $CPPFLAGS'
53117 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53118 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53119 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53120 
53121     OLD_LIBS="$LIBS"
53122     LIBS="$STATIC_STDCXX_FLAGS"
53123     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53124 /* end confdefs.h.  */
53125 
53126 int
53127 main ()
53128 {
53129 return 0;
53130   ;
53131   return 0;
53132 }
53133 _ACEOF
53134 if ac_fn_cxx_try_link "$LINENO"; then :
53135   has_static_libstdcxx=yes
53136 else
53137   has_static_libstdcxx=no
53138 fi
53139 rm -f core conftest.err conftest.$ac_objext \
53140     conftest$ac_exeext conftest.$ac_ext
53141     LIBS="$OLD_LIBS"
53142     ac_ext=cpp
53143 ac_cpp='$CXXCPP $CPPFLAGS'
53144 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53145 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53146 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53147 
53148     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53149 $as_echo "$has_static_libstdcxx" >&6; }
53150 
53151     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53152       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53153     fi
53154 
53155     # If dynamic was requested, it's available since it would fail above otherwise.
53156     # If dynamic wasn't requested, go with static unless it isn't available.
53157     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53158 $as_echo_n "checking how to link with libstdc++... " >&6; }
53159     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53160         ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53161       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53162 $as_echo "dynamic" >&6; }
53163     else
53164       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53165       JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53166       # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53167       # just use the same setting as for the TARGET toolchain.
53168       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53169       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53170 $as_echo "static" >&6; }
53171     fi
53172   fi
53173 
53174   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53175   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53176     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53177   fi
53178 
53179 
53180 
53181   # Setup Windows runtime dlls
53182   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53183 
53184 
53185 # Check whether --with-msvcr-dll was given.
53186 if test "${with_msvcr_dll+set}" = set; then :
53187   withval=$with_msvcr_dll;
53188 fi
53189 
53190 
53191   if test "x$with_msvcr_dll" != x; then
53192     # If given explicitely by user, do not probe. If not present, fail directly.
53193 
53194   DLL_NAME="$MSVCR_NAME"
53195   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53196   METHOD="--with-msvcr-dll"
53197   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53198     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53199 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53200 
53201     # Need to check if the found msvcr is correct architecture
53202     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53203 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53204     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53205     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53206       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53207       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53208       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53209         CORRECT_MSVCR_ARCH="PE32 executable"
53210       else
53211         CORRECT_MSVCR_ARCH="PE32+ executable"
53212       fi
53213     else
53214       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53215         CORRECT_MSVCR_ARCH=386
53216       else
53217         CORRECT_MSVCR_ARCH=x86-64
53218       fi
53219     fi
53220     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53221       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53222 $as_echo "ok" >&6; }
53223       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53224 
53225   # Only process if variable expands to non-empty
53226 
53227   if test "x$MSVC_DLL" != x; then
53228     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53229 
53230   # Input might be given as Windows format, start by converting to
53231   # unix format.
53232   path="$MSVC_DLL"
53233   new_path=`$CYGPATH -u "$path"`
53234 
53235   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53236   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53237   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53238   # "foo.exe" is OK but "foo" is an error.
53239   #
53240   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53241   # It is also a way to make sure we got the proper file name for the real test later on.
53242   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53243   if test "x$test_shortpath" = x; then
53244     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53245 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53246     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53247   fi
53248 
53249   # Call helper function which possibly converts this using DOS-style short mode.
53250   # If so, the updated path is stored in $new_path.
53251 
53252   input_path="$new_path"
53253   # Check if we need to convert this using DOS-style short mode. If the path
53254   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53255   # take no chances and rewrite it.
53256   # Note: m4 eats our [], so we need to use [ and ] instead.
53257   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53258   if test "x$has_forbidden_chars" != x; then
53259     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53260     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53261     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53262     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53263       # Going to short mode and back again did indeed matter. Since short mode is
53264       # case insensitive, let's make it lowercase to improve readability.
53265       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53266       # Now convert it back to Unix-style (cygpath)
53267       input_path=`$CYGPATH -u "$shortmode_path"`
53268       new_path="$input_path"
53269     fi
53270   fi
53271 
53272   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53273   if test "x$test_cygdrive_prefix" = x; then
53274     # As a simple fix, exclude /usr/bin since it's not a real path.
53275     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53276       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53277       # a path prefixed by /cygdrive for fixpath to work.
53278       new_path="$CYGWIN_ROOT_PATH$input_path"
53279     fi
53280   fi
53281 
53282 
53283   if test "x$path" != "x$new_path"; then
53284     MSVC_DLL="$new_path"
53285     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53286 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53287   fi
53288 
53289     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53290 
53291   path="$MSVC_DLL"
53292   has_colon=`$ECHO $path | $GREP ^.:`
53293   new_path="$path"
53294   if test "x$has_colon" = x; then
53295     # Not in mixed or Windows style, start by that.
53296     new_path=`cmd //c echo $path`
53297   fi
53298 
53299 
53300   input_path="$new_path"
53301   # Check if we need to convert this using DOS-style short mode. If the path
53302   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53303   # take no chances and rewrite it.
53304   # Note: m4 eats our [], so we need to use [ and ] instead.
53305   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53306   if test "x$has_forbidden_chars" != x; then
53307     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53308     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53309   fi
53310 
53311 
53312   windows_path="$new_path"
53313   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53314     unix_path=`$CYGPATH -u "$windows_path"`
53315     new_path="$unix_path"
53316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53317     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53318     new_path="$unix_path"
53319   fi
53320 
53321   if test "x$path" != "x$new_path"; then
53322     MSVC_DLL="$new_path"
53323     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53324 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53325   fi
53326 
53327   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53328   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53329 
53330     else
53331       # We're on a unix platform. Hooray! :)
53332       path="$MSVC_DLL"
53333       has_space=`$ECHO "$path" | $GREP " "`
53334       if test "x$has_space" != x; then
53335         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53336 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53337         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53338       fi
53339 
53340       # Use eval to expand a potential ~
53341       eval path="$path"
53342       if test ! -f "$path" && test ! -d "$path"; then
53343         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53344       fi
53345 
53346       if test -d "$path"; then
53347         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53348       else
53349         dir="`$DIRNAME "$path"`"
53350         base="`$BASENAME "$path"`"
53351         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53352       fi
53353     fi
53354   fi
53355 
53356       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53357 $as_echo_n "checking for $DLL_NAME... " >&6; }
53358       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53359 $as_echo "$MSVC_DLL" >&6; }
53360     else
53361       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53362 $as_echo "incorrect, ignoring" >&6; }
53363       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53364 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53365     fi
53366   fi
53367 
53368     if test "x$MSVC_DLL" = x; then
53369       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53370     fi
53371     MSVCR_DLL="$MSVC_DLL"
53372   elif test "x$DEVKIT_MSVCR_DLL" != x; then
53373 
53374   DLL_NAME="$MSVCR_NAME"
53375   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53376   METHOD="devkit"
53377   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53378     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53379 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53380 
53381     # Need to check if the found msvcr is correct architecture
53382     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53383 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53384     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53385     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53386       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53387       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53388       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53389         CORRECT_MSVCR_ARCH="PE32 executable"
53390       else
53391         CORRECT_MSVCR_ARCH="PE32+ executable"
53392       fi
53393     else
53394       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53395         CORRECT_MSVCR_ARCH=386
53396       else
53397         CORRECT_MSVCR_ARCH=x86-64
53398       fi
53399     fi
53400     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53401       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53402 $as_echo "ok" >&6; }
53403       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53404 
53405   # Only process if variable expands to non-empty
53406 
53407   if test "x$MSVC_DLL" != x; then
53408     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53409 
53410   # Input might be given as Windows format, start by converting to
53411   # unix format.
53412   path="$MSVC_DLL"
53413   new_path=`$CYGPATH -u "$path"`
53414 
53415   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53416   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53417   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53418   # "foo.exe" is OK but "foo" is an error.
53419   #
53420   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53421   # It is also a way to make sure we got the proper file name for the real test later on.
53422   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53423   if test "x$test_shortpath" = x; then
53424     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53425 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53426     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53427   fi
53428 
53429   # Call helper function which possibly converts this using DOS-style short mode.
53430   # If so, the updated path is stored in $new_path.
53431 
53432   input_path="$new_path"
53433   # Check if we need to convert this using DOS-style short mode. If the path
53434   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53435   # take no chances and rewrite it.
53436   # Note: m4 eats our [], so we need to use [ and ] instead.
53437   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53438   if test "x$has_forbidden_chars" != x; then
53439     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53440     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53441     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53442     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53443       # Going to short mode and back again did indeed matter. Since short mode is
53444       # case insensitive, let's make it lowercase to improve readability.
53445       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53446       # Now convert it back to Unix-style (cygpath)
53447       input_path=`$CYGPATH -u "$shortmode_path"`
53448       new_path="$input_path"
53449     fi
53450   fi
53451 
53452   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53453   if test "x$test_cygdrive_prefix" = x; then
53454     # As a simple fix, exclude /usr/bin since it's not a real path.
53455     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53456       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53457       # a path prefixed by /cygdrive for fixpath to work.
53458       new_path="$CYGWIN_ROOT_PATH$input_path"
53459     fi
53460   fi
53461 
53462 
53463   if test "x$path" != "x$new_path"; then
53464     MSVC_DLL="$new_path"
53465     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53466 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53467   fi
53468 
53469     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53470 
53471   path="$MSVC_DLL"
53472   has_colon=`$ECHO $path | $GREP ^.:`
53473   new_path="$path"
53474   if test "x$has_colon" = x; then
53475     # Not in mixed or Windows style, start by that.
53476     new_path=`cmd //c echo $path`
53477   fi
53478 
53479 
53480   input_path="$new_path"
53481   # Check if we need to convert this using DOS-style short mode. If the path
53482   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53483   # take no chances and rewrite it.
53484   # Note: m4 eats our [], so we need to use [ and ] instead.
53485   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53486   if test "x$has_forbidden_chars" != x; then
53487     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53488     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53489   fi
53490 
53491 
53492   windows_path="$new_path"
53493   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53494     unix_path=`$CYGPATH -u "$windows_path"`
53495     new_path="$unix_path"
53496   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53497     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53498     new_path="$unix_path"
53499   fi
53500 
53501   if test "x$path" != "x$new_path"; then
53502     MSVC_DLL="$new_path"
53503     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53504 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53505   fi
53506 
53507   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53508   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53509 
53510     else
53511       # We're on a unix platform. Hooray! :)
53512       path="$MSVC_DLL"
53513       has_space=`$ECHO "$path" | $GREP " "`
53514       if test "x$has_space" != x; then
53515         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53516 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53517         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53518       fi
53519 
53520       # Use eval to expand a potential ~
53521       eval path="$path"
53522       if test ! -f "$path" && test ! -d "$path"; then
53523         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53524       fi
53525 
53526       if test -d "$path"; then
53527         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53528       else
53529         dir="`$DIRNAME "$path"`"
53530         base="`$BASENAME "$path"`"
53531         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53532       fi
53533     fi
53534   fi
53535 
53536       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53537 $as_echo_n "checking for $DLL_NAME... " >&6; }
53538       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53539 $as_echo "$MSVC_DLL" >&6; }
53540     else
53541       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53542 $as_echo "incorrect, ignoring" >&6; }
53543       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53544 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53545     fi
53546   fi
53547 
53548     if test "x$MSVC_DLL" = x; then
53549       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53550     fi
53551     MSVCR_DLL="$MSVC_DLL"
53552   else
53553 
53554   DLL_NAME="${MSVCR_NAME}"
53555   MSVC_DLL=
53556 
53557   if test "x$MSVC_DLL" = x; then
53558     # Probe: Using well-known location from Visual Studio 10.0
53559     if test "x$VCINSTALLDIR" != x; then
53560       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53561 
53562   windows_path="$CYGWIN_VC_INSTALL_DIR"
53563   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53564     unix_path=`$CYGPATH -u "$windows_path"`
53565     CYGWIN_VC_INSTALL_DIR="$unix_path"
53566   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53567     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53568     CYGWIN_VC_INSTALL_DIR="$unix_path"
53569   fi
53570 
53571       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53572         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53573       else
53574         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53575       fi
53576       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53577 
53578   DLL_NAME="$DLL_NAME"
53579   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53580   METHOD="well-known location in VCINSTALLDIR"
53581   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53582     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53583 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53584 
53585     # Need to check if the found msvcr is correct architecture
53586     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53587 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53588     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53589     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53590       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53591       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53592       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53593         CORRECT_MSVCR_ARCH="PE32 executable"
53594       else
53595         CORRECT_MSVCR_ARCH="PE32+ executable"
53596       fi
53597     else
53598       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53599         CORRECT_MSVCR_ARCH=386
53600       else
53601         CORRECT_MSVCR_ARCH=x86-64
53602       fi
53603     fi
53604     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53605       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53606 $as_echo "ok" >&6; }
53607       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53608 
53609   # Only process if variable expands to non-empty
53610 
53611   if test "x$MSVC_DLL" != x; then
53612     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53613 
53614   # Input might be given as Windows format, start by converting to
53615   # unix format.
53616   path="$MSVC_DLL"
53617   new_path=`$CYGPATH -u "$path"`
53618 
53619   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53620   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53621   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53622   # "foo.exe" is OK but "foo" is an error.
53623   #
53624   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53625   # It is also a way to make sure we got the proper file name for the real test later on.
53626   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53627   if test "x$test_shortpath" = x; then
53628     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53629 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53630     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53631   fi
53632 
53633   # Call helper function which possibly converts this using DOS-style short mode.
53634   # If so, the updated path is stored in $new_path.
53635 
53636   input_path="$new_path"
53637   # Check if we need to convert this using DOS-style short mode. If the path
53638   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53639   # take no chances and rewrite it.
53640   # Note: m4 eats our [], so we need to use [ and ] instead.
53641   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53642   if test "x$has_forbidden_chars" != x; then
53643     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53644     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53645     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53646     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53647       # Going to short mode and back again did indeed matter. Since short mode is
53648       # case insensitive, let's make it lowercase to improve readability.
53649       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53650       # Now convert it back to Unix-style (cygpath)
53651       input_path=`$CYGPATH -u "$shortmode_path"`
53652       new_path="$input_path"
53653     fi
53654   fi
53655 
53656   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53657   if test "x$test_cygdrive_prefix" = x; then
53658     # As a simple fix, exclude /usr/bin since it's not a real path.
53659     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53660       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53661       # a path prefixed by /cygdrive for fixpath to work.
53662       new_path="$CYGWIN_ROOT_PATH$input_path"
53663     fi
53664   fi
53665 
53666 
53667   if test "x$path" != "x$new_path"; then
53668     MSVC_DLL="$new_path"
53669     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53670 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53671   fi
53672 
53673     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53674 
53675   path="$MSVC_DLL"
53676   has_colon=`$ECHO $path | $GREP ^.:`
53677   new_path="$path"
53678   if test "x$has_colon" = x; then
53679     # Not in mixed or Windows style, start by that.
53680     new_path=`cmd //c echo $path`
53681   fi
53682 
53683 
53684   input_path="$new_path"
53685   # Check if we need to convert this using DOS-style short mode. If the path
53686   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53687   # take no chances and rewrite it.
53688   # Note: m4 eats our [], so we need to use [ and ] instead.
53689   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53690   if test "x$has_forbidden_chars" != x; then
53691     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53692     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53693   fi
53694 
53695 
53696   windows_path="$new_path"
53697   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53698     unix_path=`$CYGPATH -u "$windows_path"`
53699     new_path="$unix_path"
53700   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53701     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53702     new_path="$unix_path"
53703   fi
53704 
53705   if test "x$path" != "x$new_path"; then
53706     MSVC_DLL="$new_path"
53707     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53708 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53709   fi
53710 
53711   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53712   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53713 
53714     else
53715       # We're on a unix platform. Hooray! :)
53716       path="$MSVC_DLL"
53717       has_space=`$ECHO "$path" | $GREP " "`
53718       if test "x$has_space" != x; then
53719         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53720 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53721         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53722       fi
53723 
53724       # Use eval to expand a potential ~
53725       eval path="$path"
53726       if test ! -f "$path" && test ! -d "$path"; then
53727         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53728       fi
53729 
53730       if test -d "$path"; then
53731         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53732       else
53733         dir="`$DIRNAME "$path"`"
53734         base="`$BASENAME "$path"`"
53735         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53736       fi
53737     fi
53738   fi
53739 
53740       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53741 $as_echo_n "checking for $DLL_NAME... " >&6; }
53742       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53743 $as_echo "$MSVC_DLL" >&6; }
53744     else
53745       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53746 $as_echo "incorrect, ignoring" >&6; }
53747       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53748 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53749     fi
53750   fi
53751 
53752     fi
53753   fi
53754 
53755   if test "x$MSVC_DLL" = x; then
53756     # Probe: Check in the Boot JDK directory.
53757     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53758 
53759   DLL_NAME="$DLL_NAME"
53760   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53761   METHOD="well-known location in Boot JDK"
53762   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53763     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53764 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53765 
53766     # Need to check if the found msvcr is correct architecture
53767     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53768 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53769     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53770     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53771       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53772       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53773       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53774         CORRECT_MSVCR_ARCH="PE32 executable"
53775       else
53776         CORRECT_MSVCR_ARCH="PE32+ executable"
53777       fi
53778     else
53779       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53780         CORRECT_MSVCR_ARCH=386
53781       else
53782         CORRECT_MSVCR_ARCH=x86-64
53783       fi
53784     fi
53785     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53786       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53787 $as_echo "ok" >&6; }
53788       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53789 
53790   # Only process if variable expands to non-empty
53791 
53792   if test "x$MSVC_DLL" != x; then
53793     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53794 
53795   # Input might be given as Windows format, start by converting to
53796   # unix format.
53797   path="$MSVC_DLL"
53798   new_path=`$CYGPATH -u "$path"`
53799 
53800   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53801   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53802   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53803   # "foo.exe" is OK but "foo" is an error.
53804   #
53805   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53806   # It is also a way to make sure we got the proper file name for the real test later on.
53807   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53808   if test "x$test_shortpath" = x; then
53809     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53810 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53811     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53812   fi
53813 
53814   # Call helper function which possibly converts this using DOS-style short mode.
53815   # If so, the updated path is stored in $new_path.
53816 
53817   input_path="$new_path"
53818   # Check if we need to convert this using DOS-style short mode. If the path
53819   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53820   # take no chances and rewrite it.
53821   # Note: m4 eats our [], so we need to use [ and ] instead.
53822   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53823   if test "x$has_forbidden_chars" != x; then
53824     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53825     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53826     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53827     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53828       # Going to short mode and back again did indeed matter. Since short mode is
53829       # case insensitive, let's make it lowercase to improve readability.
53830       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53831       # Now convert it back to Unix-style (cygpath)
53832       input_path=`$CYGPATH -u "$shortmode_path"`
53833       new_path="$input_path"
53834     fi
53835   fi
53836 
53837   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53838   if test "x$test_cygdrive_prefix" = x; then
53839     # As a simple fix, exclude /usr/bin since it's not a real path.
53840     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53841       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53842       # a path prefixed by /cygdrive for fixpath to work.
53843       new_path="$CYGWIN_ROOT_PATH$input_path"
53844     fi
53845   fi
53846 
53847 
53848   if test "x$path" != "x$new_path"; then
53849     MSVC_DLL="$new_path"
53850     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53851 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53852   fi
53853 
53854     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53855 
53856   path="$MSVC_DLL"
53857   has_colon=`$ECHO $path | $GREP ^.:`
53858   new_path="$path"
53859   if test "x$has_colon" = x; then
53860     # Not in mixed or Windows style, start by that.
53861     new_path=`cmd //c echo $path`
53862   fi
53863 
53864 
53865   input_path="$new_path"
53866   # Check if we need to convert this using DOS-style short mode. If the path
53867   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53868   # take no chances and rewrite it.
53869   # Note: m4 eats our [], so we need to use [ and ] instead.
53870   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53871   if test "x$has_forbidden_chars" != x; then
53872     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53873     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53874   fi
53875 
53876 
53877   windows_path="$new_path"
53878   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53879     unix_path=`$CYGPATH -u "$windows_path"`
53880     new_path="$unix_path"
53881   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53882     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53883     new_path="$unix_path"
53884   fi
53885 
53886   if test "x$path" != "x$new_path"; then
53887     MSVC_DLL="$new_path"
53888     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53889 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53890   fi
53891 
53892   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53893   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53894 
53895     else
53896       # We're on a unix platform. Hooray! :)
53897       path="$MSVC_DLL"
53898       has_space=`$ECHO "$path" | $GREP " "`
53899       if test "x$has_space" != x; then
53900         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53901 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53902         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53903       fi
53904 
53905       # Use eval to expand a potential ~
53906       eval path="$path"
53907       if test ! -f "$path" && test ! -d "$path"; then
53908         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53909       fi
53910 
53911       if test -d "$path"; then
53912         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53913       else
53914         dir="`$DIRNAME "$path"`"
53915         base="`$BASENAME "$path"`"
53916         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53917       fi
53918     fi
53919   fi
53920 
53921       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53922 $as_echo_n "checking for $DLL_NAME... " >&6; }
53923       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53924 $as_echo "$MSVC_DLL" >&6; }
53925     else
53926       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53927 $as_echo "incorrect, ignoring" >&6; }
53928       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53929 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53930     fi
53931   fi
53932 
53933   fi
53934 
53935   if test "x$MSVC_DLL" = x; then
53936     # Probe: Look in the Windows system32 directory
53937     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53938 
53939   windows_path="$CYGWIN_SYSTEMROOT"
53940   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53941     unix_path=`$CYGPATH -u "$windows_path"`
53942     CYGWIN_SYSTEMROOT="$unix_path"
53943   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53944     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53945     CYGWIN_SYSTEMROOT="$unix_path"
53946   fi
53947 
53948     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53949 
53950   DLL_NAME="$DLL_NAME"
53951   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53952   METHOD="well-known location in SYSTEMROOT"
53953   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53954     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53955 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53956 
53957     # Need to check if the found msvcr is correct architecture
53958     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53959 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53960     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53961     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53962       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53963       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53964       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53965         CORRECT_MSVCR_ARCH="PE32 executable"
53966       else
53967         CORRECT_MSVCR_ARCH="PE32+ executable"
53968       fi
53969     else
53970       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53971         CORRECT_MSVCR_ARCH=386
53972       else
53973         CORRECT_MSVCR_ARCH=x86-64
53974       fi
53975     fi
53976     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53977       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53978 $as_echo "ok" >&6; }
53979       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53980 
53981   # Only process if variable expands to non-empty
53982 
53983   if test "x$MSVC_DLL" != x; then
53984     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53985 
53986   # Input might be given as Windows format, start by converting to
53987   # unix format.
53988   path="$MSVC_DLL"
53989   new_path=`$CYGPATH -u "$path"`
53990 
53991   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53992   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53993   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53994   # "foo.exe" is OK but "foo" is an error.
53995   #
53996   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53997   # It is also a way to make sure we got the proper file name for the real test later on.
53998   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53999   if test "x$test_shortpath" = x; then
54000     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54001 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54002     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54003   fi
54004 
54005   # Call helper function which possibly converts this using DOS-style short mode.
54006   # If so, the updated path is stored in $new_path.
54007 
54008   input_path="$new_path"
54009   # Check if we need to convert this using DOS-style short mode. If the path
54010   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54011   # take no chances and rewrite it.
54012   # Note: m4 eats our [], so we need to use [ and ] instead.
54013   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54014   if test "x$has_forbidden_chars" != x; then
54015     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54016     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54017     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54018     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54019       # Going to short mode and back again did indeed matter. Since short mode is
54020       # case insensitive, let's make it lowercase to improve readability.
54021       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54022       # Now convert it back to Unix-style (cygpath)
54023       input_path=`$CYGPATH -u "$shortmode_path"`
54024       new_path="$input_path"
54025     fi
54026   fi
54027 
54028   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54029   if test "x$test_cygdrive_prefix" = x; then
54030     # As a simple fix, exclude /usr/bin since it's not a real path.
54031     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54032       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54033       # a path prefixed by /cygdrive for fixpath to work.
54034       new_path="$CYGWIN_ROOT_PATH$input_path"
54035     fi
54036   fi
54037 
54038 
54039   if test "x$path" != "x$new_path"; then
54040     MSVC_DLL="$new_path"
54041     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54042 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54043   fi
54044 
54045     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54046 
54047   path="$MSVC_DLL"
54048   has_colon=`$ECHO $path | $GREP ^.:`
54049   new_path="$path"
54050   if test "x$has_colon" = x; then
54051     # Not in mixed or Windows style, start by that.
54052     new_path=`cmd //c echo $path`
54053   fi
54054 
54055 
54056   input_path="$new_path"
54057   # Check if we need to convert this using DOS-style short mode. If the path
54058   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54059   # take no chances and rewrite it.
54060   # Note: m4 eats our [], so we need to use [ and ] instead.
54061   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54062   if test "x$has_forbidden_chars" != x; then
54063     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54064     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54065   fi
54066 
54067 
54068   windows_path="$new_path"
54069   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54070     unix_path=`$CYGPATH -u "$windows_path"`
54071     new_path="$unix_path"
54072   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54073     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54074     new_path="$unix_path"
54075   fi
54076 
54077   if test "x$path" != "x$new_path"; then
54078     MSVC_DLL="$new_path"
54079     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54080 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54081   fi
54082 
54083   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54084   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54085 
54086     else
54087       # We're on a unix platform. Hooray! :)
54088       path="$MSVC_DLL"
54089       has_space=`$ECHO "$path" | $GREP " "`
54090       if test "x$has_space" != x; then
54091         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54092 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54093         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54094       fi
54095 
54096       # Use eval to expand a potential ~
54097       eval path="$path"
54098       if test ! -f "$path" && test ! -d "$path"; then
54099         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54100       fi
54101 
54102       if test -d "$path"; then
54103         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54104       else
54105         dir="`$DIRNAME "$path"`"
54106         base="`$BASENAME "$path"`"
54107         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54108       fi
54109     fi
54110   fi
54111 
54112       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54113 $as_echo_n "checking for $DLL_NAME... " >&6; }
54114       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54115 $as_echo "$MSVC_DLL" >&6; }
54116     else
54117       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54118 $as_echo "incorrect, ignoring" >&6; }
54119       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54120 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54121     fi
54122   fi
54123 
54124   fi
54125 
54126   if test "x$MSVC_DLL" = x; then
54127     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54128     if test "x$VS100COMNTOOLS" != x; then
54129       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54130 
54131   windows_path="$CYGWIN_VS_TOOLS_DIR"
54132   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54133     unix_path=`$CYGPATH -u "$windows_path"`
54134     CYGWIN_VS_TOOLS_DIR="$unix_path"
54135   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54136     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54137     CYGWIN_VS_TOOLS_DIR="$unix_path"
54138   fi
54139 
54140       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54141         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54142             | $GREP -i /x64/ | $HEAD --lines 1`
54143       else
54144         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54145             | $GREP -i /x86/ | $HEAD --lines 1`
54146       fi
54147 
54148   DLL_NAME="$DLL_NAME"
54149   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54150   METHOD="search of VS100COMNTOOLS"
54151   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54152     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54153 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54154 
54155     # Need to check if the found msvcr is correct architecture
54156     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54157 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54158     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54159     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54160       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54161       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54162       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54163         CORRECT_MSVCR_ARCH="PE32 executable"
54164       else
54165         CORRECT_MSVCR_ARCH="PE32+ executable"
54166       fi
54167     else
54168       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54169         CORRECT_MSVCR_ARCH=386
54170       else
54171         CORRECT_MSVCR_ARCH=x86-64
54172       fi
54173     fi
54174     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54175       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54176 $as_echo "ok" >&6; }
54177       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54178 
54179   # Only process if variable expands to non-empty
54180 
54181   if test "x$MSVC_DLL" != x; then
54182     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54183 
54184   # Input might be given as Windows format, start by converting to
54185   # unix format.
54186   path="$MSVC_DLL"
54187   new_path=`$CYGPATH -u "$path"`
54188 
54189   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54190   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54191   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54192   # "foo.exe" is OK but "foo" is an error.
54193   #
54194   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54195   # It is also a way to make sure we got the proper file name for the real test later on.
54196   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54197   if test "x$test_shortpath" = x; then
54198     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54199 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54200     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54201   fi
54202 
54203   # Call helper function which possibly converts this using DOS-style short mode.
54204   # If so, the updated path is stored in $new_path.
54205 
54206   input_path="$new_path"
54207   # Check if we need to convert this using DOS-style short mode. If the path
54208   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54209   # take no chances and rewrite it.
54210   # Note: m4 eats our [], so we need to use [ and ] instead.
54211   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54212   if test "x$has_forbidden_chars" != x; then
54213     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54214     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54215     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54216     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54217       # Going to short mode and back again did indeed matter. Since short mode is
54218       # case insensitive, let's make it lowercase to improve readability.
54219       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54220       # Now convert it back to Unix-style (cygpath)
54221       input_path=`$CYGPATH -u "$shortmode_path"`
54222       new_path="$input_path"
54223     fi
54224   fi
54225 
54226   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54227   if test "x$test_cygdrive_prefix" = x; then
54228     # As a simple fix, exclude /usr/bin since it's not a real path.
54229     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54230       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54231       # a path prefixed by /cygdrive for fixpath to work.
54232       new_path="$CYGWIN_ROOT_PATH$input_path"
54233     fi
54234   fi
54235 
54236 
54237   if test "x$path" != "x$new_path"; then
54238     MSVC_DLL="$new_path"
54239     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54240 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54241   fi
54242 
54243     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54244 
54245   path="$MSVC_DLL"
54246   has_colon=`$ECHO $path | $GREP ^.:`
54247   new_path="$path"
54248   if test "x$has_colon" = x; then
54249     # Not in mixed or Windows style, start by that.
54250     new_path=`cmd //c echo $path`
54251   fi
54252 
54253 
54254   input_path="$new_path"
54255   # Check if we need to convert this using DOS-style short mode. If the path
54256   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54257   # take no chances and rewrite it.
54258   # Note: m4 eats our [], so we need to use [ and ] instead.
54259   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54260   if test "x$has_forbidden_chars" != x; then
54261     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54262     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54263   fi
54264 
54265 
54266   windows_path="$new_path"
54267   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54268     unix_path=`$CYGPATH -u "$windows_path"`
54269     new_path="$unix_path"
54270   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54271     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54272     new_path="$unix_path"
54273   fi
54274 
54275   if test "x$path" != "x$new_path"; then
54276     MSVC_DLL="$new_path"
54277     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54278 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54279   fi
54280 
54281   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54282   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54283 
54284     else
54285       # We're on a unix platform. Hooray! :)
54286       path="$MSVC_DLL"
54287       has_space=`$ECHO "$path" | $GREP " "`
54288       if test "x$has_space" != x; then
54289         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54290 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54291         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54292       fi
54293 
54294       # Use eval to expand a potential ~
54295       eval path="$path"
54296       if test ! -f "$path" && test ! -d "$path"; then
54297         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54298       fi
54299 
54300       if test -d "$path"; then
54301         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54302       else
54303         dir="`$DIRNAME "$path"`"
54304         base="`$BASENAME "$path"`"
54305         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54306       fi
54307     fi
54308   fi
54309 
54310       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54311 $as_echo_n "checking for $DLL_NAME... " >&6; }
54312       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54313 $as_echo "$MSVC_DLL" >&6; }
54314     else
54315       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54316 $as_echo "incorrect, ignoring" >&6; }
54317       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54318 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54319     fi
54320   fi
54321 
54322     fi
54323   fi
54324 
54325   if test "x$MSVC_DLL" = x; then
54326     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54327     # (This was the original behaviour; kept since it might turn something up)
54328     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54329       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54330         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54331             | $GREP x64 | $HEAD --lines 1`
54332       else
54333         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54334             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54335         if test "x$POSSIBLE_MSVC_DLL" = x; then
54336           # We're grasping at straws now...
54337           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54338               | $HEAD --lines 1`
54339         fi
54340       fi
54341 
54342 
54343   DLL_NAME="$DLL_NAME"
54344   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54345   METHOD="search of VCINSTALLDIR"
54346   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54347     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54348 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54349 
54350     # Need to check if the found msvcr is correct architecture
54351     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54352 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54353     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54354     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54355       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54356       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54357       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54358         CORRECT_MSVCR_ARCH="PE32 executable"
54359       else
54360         CORRECT_MSVCR_ARCH="PE32+ executable"
54361       fi
54362     else
54363       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54364         CORRECT_MSVCR_ARCH=386
54365       else
54366         CORRECT_MSVCR_ARCH=x86-64
54367       fi
54368     fi
54369     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54370       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54371 $as_echo "ok" >&6; }
54372       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54373 
54374   # Only process if variable expands to non-empty
54375 
54376   if test "x$MSVC_DLL" != x; then
54377     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54378 
54379   # Input might be given as Windows format, start by converting to
54380   # unix format.
54381   path="$MSVC_DLL"
54382   new_path=`$CYGPATH -u "$path"`
54383 
54384   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54385   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54386   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54387   # "foo.exe" is OK but "foo" is an error.
54388   #
54389   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54390   # It is also a way to make sure we got the proper file name for the real test later on.
54391   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54392   if test "x$test_shortpath" = x; then
54393     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54394 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54395     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54396   fi
54397 
54398   # Call helper function which possibly converts this using DOS-style short mode.
54399   # If so, the updated path is stored in $new_path.
54400 
54401   input_path="$new_path"
54402   # Check if we need to convert this using DOS-style short mode. If the path
54403   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54404   # take no chances and rewrite it.
54405   # Note: m4 eats our [], so we need to use [ and ] instead.
54406   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54407   if test "x$has_forbidden_chars" != x; then
54408     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54409     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54410     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54411     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54412       # Going to short mode and back again did indeed matter. Since short mode is
54413       # case insensitive, let's make it lowercase to improve readability.
54414       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54415       # Now convert it back to Unix-style (cygpath)
54416       input_path=`$CYGPATH -u "$shortmode_path"`
54417       new_path="$input_path"
54418     fi
54419   fi
54420 
54421   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54422   if test "x$test_cygdrive_prefix" = x; then
54423     # As a simple fix, exclude /usr/bin since it's not a real path.
54424     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54425       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54426       # a path prefixed by /cygdrive for fixpath to work.
54427       new_path="$CYGWIN_ROOT_PATH$input_path"
54428     fi
54429   fi
54430 
54431 
54432   if test "x$path" != "x$new_path"; then
54433     MSVC_DLL="$new_path"
54434     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54435 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54436   fi
54437 
54438     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54439 
54440   path="$MSVC_DLL"
54441   has_colon=`$ECHO $path | $GREP ^.:`
54442   new_path="$path"
54443   if test "x$has_colon" = x; then
54444     # Not in mixed or Windows style, start by that.
54445     new_path=`cmd //c echo $path`
54446   fi
54447 
54448 
54449   input_path="$new_path"
54450   # Check if we need to convert this using DOS-style short mode. If the path
54451   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54452   # take no chances and rewrite it.
54453   # Note: m4 eats our [], so we need to use [ and ] instead.
54454   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54455   if test "x$has_forbidden_chars" != x; then
54456     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54457     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54458   fi
54459 
54460 
54461   windows_path="$new_path"
54462   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54463     unix_path=`$CYGPATH -u "$windows_path"`
54464     new_path="$unix_path"
54465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54466     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54467     new_path="$unix_path"
54468   fi
54469 
54470   if test "x$path" != "x$new_path"; then
54471     MSVC_DLL="$new_path"
54472     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54473 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54474   fi
54475 
54476   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54477   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54478 
54479     else
54480       # We're on a unix platform. Hooray! :)
54481       path="$MSVC_DLL"
54482       has_space=`$ECHO "$path" | $GREP " "`
54483       if test "x$has_space" != x; then
54484         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54485 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54486         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54487       fi
54488 
54489       # Use eval to expand a potential ~
54490       eval path="$path"
54491       if test ! -f "$path" && test ! -d "$path"; then
54492         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54493       fi
54494 
54495       if test -d "$path"; then
54496         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54497       else
54498         dir="`$DIRNAME "$path"`"
54499         base="`$BASENAME "$path"`"
54500         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54501       fi
54502     fi
54503   fi
54504 
54505       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54506 $as_echo_n "checking for $DLL_NAME... " >&6; }
54507       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54508 $as_echo "$MSVC_DLL" >&6; }
54509     else
54510       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54511 $as_echo "incorrect, ignoring" >&6; }
54512       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54513 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54514     fi
54515   fi
54516 
54517     fi
54518   fi
54519 
54520   if test "x$MSVC_DLL" = x; then
54521     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54522 $as_echo_n "checking for $DLL_NAME... " >&6; }
54523     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54524 $as_echo "no" >&6; }
54525     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54526   fi
54527 
54528     MSVCR_DLL="$MSVC_DLL"
54529   fi
54530 
54531 
54532 
54533 # Check whether --with-msvcp-dll was given.
54534 if test "${with_msvcp_dll+set}" = set; then :
54535   withval=$with_msvcp_dll;
54536 fi
54537 
54538 
54539   if test "x$MSVCP_NAME" != "x"; then
54540     if test "x$with_msvcp_dll" != x; then
54541       # If given explicitely by user, do not probe. If not present, fail directly.
54542 
54543   DLL_NAME="$MSVCP_NAME"
54544   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54545   METHOD="--with-msvcp-dll"
54546   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54547     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54548 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54549 
54550     # Need to check if the found msvcr is correct architecture
54551     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54552 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54553     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54554     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54555       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54556       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54557       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54558         CORRECT_MSVCR_ARCH="PE32 executable"
54559       else
54560         CORRECT_MSVCR_ARCH="PE32+ executable"
54561       fi
54562     else
54563       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54564         CORRECT_MSVCR_ARCH=386
54565       else
54566         CORRECT_MSVCR_ARCH=x86-64
54567       fi
54568     fi
54569     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54570       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54571 $as_echo "ok" >&6; }
54572       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54573 
54574   # Only process if variable expands to non-empty
54575 
54576   if test "x$MSVC_DLL" != x; then
54577     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54578 
54579   # Input might be given as Windows format, start by converting to
54580   # unix format.
54581   path="$MSVC_DLL"
54582   new_path=`$CYGPATH -u "$path"`
54583 
54584   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54585   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54586   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54587   # "foo.exe" is OK but "foo" is an error.
54588   #
54589   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54590   # It is also a way to make sure we got the proper file name for the real test later on.
54591   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54592   if test "x$test_shortpath" = x; then
54593     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54594 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54595     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54596   fi
54597 
54598   # Call helper function which possibly converts this using DOS-style short mode.
54599   # If so, the updated path is stored in $new_path.
54600 
54601   input_path="$new_path"
54602   # Check if we need to convert this using DOS-style short mode. If the path
54603   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54604   # take no chances and rewrite it.
54605   # Note: m4 eats our [], so we need to use [ and ] instead.
54606   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54607   if test "x$has_forbidden_chars" != x; then
54608     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54609     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54610     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54611     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54612       # Going to short mode and back again did indeed matter. Since short mode is
54613       # case insensitive, let's make it lowercase to improve readability.
54614       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54615       # Now convert it back to Unix-style (cygpath)
54616       input_path=`$CYGPATH -u "$shortmode_path"`
54617       new_path="$input_path"
54618     fi
54619   fi
54620 
54621   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54622   if test "x$test_cygdrive_prefix" = x; then
54623     # As a simple fix, exclude /usr/bin since it's not a real path.
54624     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54625       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54626       # a path prefixed by /cygdrive for fixpath to work.
54627       new_path="$CYGWIN_ROOT_PATH$input_path"
54628     fi
54629   fi
54630 
54631 
54632   if test "x$path" != "x$new_path"; then
54633     MSVC_DLL="$new_path"
54634     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54635 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54636   fi
54637 
54638     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54639 
54640   path="$MSVC_DLL"
54641   has_colon=`$ECHO $path | $GREP ^.:`
54642   new_path="$path"
54643   if test "x$has_colon" = x; then
54644     # Not in mixed or Windows style, start by that.
54645     new_path=`cmd //c echo $path`
54646   fi
54647 
54648 
54649   input_path="$new_path"
54650   # Check if we need to convert this using DOS-style short mode. If the path
54651   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54652   # take no chances and rewrite it.
54653   # Note: m4 eats our [], so we need to use [ and ] instead.
54654   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54655   if test "x$has_forbidden_chars" != x; then
54656     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54657     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54658   fi
54659 
54660 
54661   windows_path="$new_path"
54662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54663     unix_path=`$CYGPATH -u "$windows_path"`
54664     new_path="$unix_path"
54665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54666     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54667     new_path="$unix_path"
54668   fi
54669 
54670   if test "x$path" != "x$new_path"; then
54671     MSVC_DLL="$new_path"
54672     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54673 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54674   fi
54675 
54676   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54677   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54678 
54679     else
54680       # We're on a unix platform. Hooray! :)
54681       path="$MSVC_DLL"
54682       has_space=`$ECHO "$path" | $GREP " "`
54683       if test "x$has_space" != x; then
54684         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54685 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54686         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54687       fi
54688 
54689       # Use eval to expand a potential ~
54690       eval path="$path"
54691       if test ! -f "$path" && test ! -d "$path"; then
54692         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54693       fi
54694 
54695       if test -d "$path"; then
54696         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54697       else
54698         dir="`$DIRNAME "$path"`"
54699         base="`$BASENAME "$path"`"
54700         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54701       fi
54702     fi
54703   fi
54704 
54705       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54706 $as_echo_n "checking for $DLL_NAME... " >&6; }
54707       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54708 $as_echo "$MSVC_DLL" >&6; }
54709     else
54710       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54711 $as_echo "incorrect, ignoring" >&6; }
54712       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54713 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54714     fi
54715   fi
54716 
54717       if test "x$MSVC_DLL" = x; then
54718         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54719       fi
54720       MSVCP_DLL="$MSVC_DLL"
54721     elif test "x$DEVKIT_MSVCP_DLL" != x; then
54722 
54723   DLL_NAME="$MSVCP_NAME"
54724   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54725   METHOD="devkit"
54726   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54727     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54728 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54729 
54730     # Need to check if the found msvcr is correct architecture
54731     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54732 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54733     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54734     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54735       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54736       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54737       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54738         CORRECT_MSVCR_ARCH="PE32 executable"
54739       else
54740         CORRECT_MSVCR_ARCH="PE32+ executable"
54741       fi
54742     else
54743       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54744         CORRECT_MSVCR_ARCH=386
54745       else
54746         CORRECT_MSVCR_ARCH=x86-64
54747       fi
54748     fi
54749     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54750       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54751 $as_echo "ok" >&6; }
54752       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54753 
54754   # Only process if variable expands to non-empty
54755 
54756   if test "x$MSVC_DLL" != x; then
54757     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54758 
54759   # Input might be given as Windows format, start by converting to
54760   # unix format.
54761   path="$MSVC_DLL"
54762   new_path=`$CYGPATH -u "$path"`
54763 
54764   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54765   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54766   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54767   # "foo.exe" is OK but "foo" is an error.
54768   #
54769   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54770   # It is also a way to make sure we got the proper file name for the real test later on.
54771   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54772   if test "x$test_shortpath" = x; then
54773     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54774 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54775     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54776   fi
54777 
54778   # Call helper function which possibly converts this using DOS-style short mode.
54779   # If so, the updated path is stored in $new_path.
54780 
54781   input_path="$new_path"
54782   # Check if we need to convert this using DOS-style short mode. If the path
54783   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54784   # take no chances and rewrite it.
54785   # Note: m4 eats our [], so we need to use [ and ] instead.
54786   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54787   if test "x$has_forbidden_chars" != x; then
54788     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54789     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54790     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54791     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54792       # Going to short mode and back again did indeed matter. Since short mode is
54793       # case insensitive, let's make it lowercase to improve readability.
54794       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54795       # Now convert it back to Unix-style (cygpath)
54796       input_path=`$CYGPATH -u "$shortmode_path"`
54797       new_path="$input_path"
54798     fi
54799   fi
54800 
54801   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54802   if test "x$test_cygdrive_prefix" = x; then
54803     # As a simple fix, exclude /usr/bin since it's not a real path.
54804     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54805       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54806       # a path prefixed by /cygdrive for fixpath to work.
54807       new_path="$CYGWIN_ROOT_PATH$input_path"
54808     fi
54809   fi
54810 
54811 
54812   if test "x$path" != "x$new_path"; then
54813     MSVC_DLL="$new_path"
54814     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54815 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54816   fi
54817 
54818     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54819 
54820   path="$MSVC_DLL"
54821   has_colon=`$ECHO $path | $GREP ^.:`
54822   new_path="$path"
54823   if test "x$has_colon" = x; then
54824     # Not in mixed or Windows style, start by that.
54825     new_path=`cmd //c echo $path`
54826   fi
54827 
54828 
54829   input_path="$new_path"
54830   # Check if we need to convert this using DOS-style short mode. If the path
54831   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54832   # take no chances and rewrite it.
54833   # Note: m4 eats our [], so we need to use [ and ] instead.
54834   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54835   if test "x$has_forbidden_chars" != x; then
54836     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54837     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54838   fi
54839 
54840 
54841   windows_path="$new_path"
54842   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54843     unix_path=`$CYGPATH -u "$windows_path"`
54844     new_path="$unix_path"
54845   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54846     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54847     new_path="$unix_path"
54848   fi
54849 
54850   if test "x$path" != "x$new_path"; then
54851     MSVC_DLL="$new_path"
54852     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54853 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54854   fi
54855 
54856   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54857   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54858 
54859     else
54860       # We're on a unix platform. Hooray! :)
54861       path="$MSVC_DLL"
54862       has_space=`$ECHO "$path" | $GREP " "`
54863       if test "x$has_space" != x; then
54864         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54865 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54866         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54867       fi
54868 
54869       # Use eval to expand a potential ~
54870       eval path="$path"
54871       if test ! -f "$path" && test ! -d "$path"; then
54872         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54873       fi
54874 
54875       if test -d "$path"; then
54876         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54877       else
54878         dir="`$DIRNAME "$path"`"
54879         base="`$BASENAME "$path"`"
54880         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54881       fi
54882     fi
54883   fi
54884 
54885       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54886 $as_echo_n "checking for $DLL_NAME... " >&6; }
54887       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54888 $as_echo "$MSVC_DLL" >&6; }
54889     else
54890       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54891 $as_echo "incorrect, ignoring" >&6; }
54892       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54893 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54894     fi
54895   fi
54896 
54897       if test "x$MSVC_DLL" = x; then
54898         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54899       fi
54900       MSVCP_DLL="$MSVC_DLL"
54901     else
54902 
54903   DLL_NAME="${MSVCP_NAME}"
54904   MSVC_DLL=
54905 
54906   if test "x$MSVC_DLL" = x; then
54907     # Probe: Using well-known location from Visual Studio 10.0
54908     if test "x$VCINSTALLDIR" != x; then
54909       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54910 
54911   windows_path="$CYGWIN_VC_INSTALL_DIR"
54912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54913     unix_path=`$CYGPATH -u "$windows_path"`
54914     CYGWIN_VC_INSTALL_DIR="$unix_path"
54915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54917     CYGWIN_VC_INSTALL_DIR="$unix_path"
54918   fi
54919 
54920       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54921         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54922       else
54923         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54924       fi
54925       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54926 
54927   DLL_NAME="$DLL_NAME"
54928   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54929   METHOD="well-known location in VCINSTALLDIR"
54930   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54931     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54932 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54933 
54934     # Need to check if the found msvcr is correct architecture
54935     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54936 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54937     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54938     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54939       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54940       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54941       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54942         CORRECT_MSVCR_ARCH="PE32 executable"
54943       else
54944         CORRECT_MSVCR_ARCH="PE32+ executable"
54945       fi
54946     else
54947       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54948         CORRECT_MSVCR_ARCH=386
54949       else
54950         CORRECT_MSVCR_ARCH=x86-64
54951       fi
54952     fi
54953     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54954       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54955 $as_echo "ok" >&6; }
54956       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54957 
54958   # Only process if variable expands to non-empty
54959 
54960   if test "x$MSVC_DLL" != x; then
54961     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54962 
54963   # Input might be given as Windows format, start by converting to
54964   # unix format.
54965   path="$MSVC_DLL"
54966   new_path=`$CYGPATH -u "$path"`
54967 
54968   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54969   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54970   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54971   # "foo.exe" is OK but "foo" is an error.
54972   #
54973   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54974   # It is also a way to make sure we got the proper file name for the real test later on.
54975   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54976   if test "x$test_shortpath" = x; then
54977     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54978 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54979     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54980   fi
54981 
54982   # Call helper function which possibly converts this using DOS-style short mode.
54983   # If so, the updated path is stored in $new_path.
54984 
54985   input_path="$new_path"
54986   # Check if we need to convert this using DOS-style short mode. If the path
54987   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54988   # take no chances and rewrite it.
54989   # Note: m4 eats our [], so we need to use [ and ] instead.
54990   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54991   if test "x$has_forbidden_chars" != x; then
54992     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54993     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54994     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54995     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54996       # Going to short mode and back again did indeed matter. Since short mode is
54997       # case insensitive, let's make it lowercase to improve readability.
54998       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54999       # Now convert it back to Unix-style (cygpath)
55000       input_path=`$CYGPATH -u "$shortmode_path"`
55001       new_path="$input_path"
55002     fi
55003   fi
55004 
55005   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55006   if test "x$test_cygdrive_prefix" = x; then
55007     # As a simple fix, exclude /usr/bin since it's not a real path.
55008     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55009       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55010       # a path prefixed by /cygdrive for fixpath to work.
55011       new_path="$CYGWIN_ROOT_PATH$input_path"
55012     fi
55013   fi
55014 
55015 
55016   if test "x$path" != "x$new_path"; then
55017     MSVC_DLL="$new_path"
55018     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55019 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55020   fi
55021 
55022     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55023 
55024   path="$MSVC_DLL"
55025   has_colon=`$ECHO $path | $GREP ^.:`
55026   new_path="$path"
55027   if test "x$has_colon" = x; then
55028     # Not in mixed or Windows style, start by that.
55029     new_path=`cmd //c echo $path`
55030   fi
55031 
55032 
55033   input_path="$new_path"
55034   # Check if we need to convert this using DOS-style short mode. If the path
55035   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55036   # take no chances and rewrite it.
55037   # Note: m4 eats our [], so we need to use [ and ] instead.
55038   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55039   if test "x$has_forbidden_chars" != x; then
55040     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55041     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55042   fi
55043 
55044 
55045   windows_path="$new_path"
55046   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55047     unix_path=`$CYGPATH -u "$windows_path"`
55048     new_path="$unix_path"
55049   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55050     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55051     new_path="$unix_path"
55052   fi
55053 
55054   if test "x$path" != "x$new_path"; then
55055     MSVC_DLL="$new_path"
55056     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55057 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55058   fi
55059 
55060   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55061   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55062 
55063     else
55064       # We're on a unix platform. Hooray! :)
55065       path="$MSVC_DLL"
55066       has_space=`$ECHO "$path" | $GREP " "`
55067       if test "x$has_space" != x; then
55068         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55069 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55070         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55071       fi
55072 
55073       # Use eval to expand a potential ~
55074       eval path="$path"
55075       if test ! -f "$path" && test ! -d "$path"; then
55076         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55077       fi
55078 
55079       if test -d "$path"; then
55080         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55081       else
55082         dir="`$DIRNAME "$path"`"
55083         base="`$BASENAME "$path"`"
55084         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55085       fi
55086     fi
55087   fi
55088 
55089       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55090 $as_echo_n "checking for $DLL_NAME... " >&6; }
55091       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55092 $as_echo "$MSVC_DLL" >&6; }
55093     else
55094       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55095 $as_echo "incorrect, ignoring" >&6; }
55096       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55097 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55098     fi
55099   fi
55100 
55101     fi
55102   fi
55103 
55104   if test "x$MSVC_DLL" = x; then
55105     # Probe: Check in the Boot JDK directory.
55106     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55107 
55108   DLL_NAME="$DLL_NAME"
55109   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55110   METHOD="well-known location in Boot JDK"
55111   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55112     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55113 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55114 
55115     # Need to check if the found msvcr is correct architecture
55116     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55117 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55118     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55119     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55120       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55121       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55122       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55123         CORRECT_MSVCR_ARCH="PE32 executable"
55124       else
55125         CORRECT_MSVCR_ARCH="PE32+ executable"
55126       fi
55127     else
55128       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55129         CORRECT_MSVCR_ARCH=386
55130       else
55131         CORRECT_MSVCR_ARCH=x86-64
55132       fi
55133     fi
55134     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55135       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55136 $as_echo "ok" >&6; }
55137       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55138 
55139   # Only process if variable expands to non-empty
55140 
55141   if test "x$MSVC_DLL" != x; then
55142     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55143 
55144   # Input might be given as Windows format, start by converting to
55145   # unix format.
55146   path="$MSVC_DLL"
55147   new_path=`$CYGPATH -u "$path"`
55148 
55149   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55150   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55151   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55152   # "foo.exe" is OK but "foo" is an error.
55153   #
55154   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55155   # It is also a way to make sure we got the proper file name for the real test later on.
55156   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55157   if test "x$test_shortpath" = x; then
55158     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55159 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55160     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55161   fi
55162 
55163   # Call helper function which possibly converts this using DOS-style short mode.
55164   # If so, the updated path is stored in $new_path.
55165 
55166   input_path="$new_path"
55167   # Check if we need to convert this using DOS-style short mode. If the path
55168   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55169   # take no chances and rewrite it.
55170   # Note: m4 eats our [], so we need to use [ and ] instead.
55171   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55172   if test "x$has_forbidden_chars" != x; then
55173     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55174     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55175     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55176     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55177       # Going to short mode and back again did indeed matter. Since short mode is
55178       # case insensitive, let's make it lowercase to improve readability.
55179       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55180       # Now convert it back to Unix-style (cygpath)
55181       input_path=`$CYGPATH -u "$shortmode_path"`
55182       new_path="$input_path"
55183     fi
55184   fi
55185 
55186   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55187   if test "x$test_cygdrive_prefix" = x; then
55188     # As a simple fix, exclude /usr/bin since it's not a real path.
55189     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55190       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55191       # a path prefixed by /cygdrive for fixpath to work.
55192       new_path="$CYGWIN_ROOT_PATH$input_path"
55193     fi
55194   fi
55195 
55196 
55197   if test "x$path" != "x$new_path"; then
55198     MSVC_DLL="$new_path"
55199     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55200 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55201   fi
55202 
55203     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55204 
55205   path="$MSVC_DLL"
55206   has_colon=`$ECHO $path | $GREP ^.:`
55207   new_path="$path"
55208   if test "x$has_colon" = x; then
55209     # Not in mixed or Windows style, start by that.
55210     new_path=`cmd //c echo $path`
55211   fi
55212 
55213 
55214   input_path="$new_path"
55215   # Check if we need to convert this using DOS-style short mode. If the path
55216   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55217   # take no chances and rewrite it.
55218   # Note: m4 eats our [], so we need to use [ and ] instead.
55219   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55220   if test "x$has_forbidden_chars" != x; then
55221     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55222     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55223   fi
55224 
55225 
55226   windows_path="$new_path"
55227   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55228     unix_path=`$CYGPATH -u "$windows_path"`
55229     new_path="$unix_path"
55230   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55231     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55232     new_path="$unix_path"
55233   fi
55234 
55235   if test "x$path" != "x$new_path"; then
55236     MSVC_DLL="$new_path"
55237     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55238 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55239   fi
55240 
55241   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55242   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55243 
55244     else
55245       # We're on a unix platform. Hooray! :)
55246       path="$MSVC_DLL"
55247       has_space=`$ECHO "$path" | $GREP " "`
55248       if test "x$has_space" != x; then
55249         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55250 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55251         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55252       fi
55253 
55254       # Use eval to expand a potential ~
55255       eval path="$path"
55256       if test ! -f "$path" && test ! -d "$path"; then
55257         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55258       fi
55259 
55260       if test -d "$path"; then
55261         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55262       else
55263         dir="`$DIRNAME "$path"`"
55264         base="`$BASENAME "$path"`"
55265         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55266       fi
55267     fi
55268   fi
55269 
55270       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55271 $as_echo_n "checking for $DLL_NAME... " >&6; }
55272       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55273 $as_echo "$MSVC_DLL" >&6; }
55274     else
55275       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55276 $as_echo "incorrect, ignoring" >&6; }
55277       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55278 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55279     fi
55280   fi
55281 
55282   fi
55283 
55284   if test "x$MSVC_DLL" = x; then
55285     # Probe: Look in the Windows system32 directory
55286     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55287 
55288   windows_path="$CYGWIN_SYSTEMROOT"
55289   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55290     unix_path=`$CYGPATH -u "$windows_path"`
55291     CYGWIN_SYSTEMROOT="$unix_path"
55292   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55293     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55294     CYGWIN_SYSTEMROOT="$unix_path"
55295   fi
55296 
55297     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55298 
55299   DLL_NAME="$DLL_NAME"
55300   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55301   METHOD="well-known location in SYSTEMROOT"
55302   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55303     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55304 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55305 
55306     # Need to check if the found msvcr is correct architecture
55307     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55308 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55309     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55310     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55311       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55312       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55313       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55314         CORRECT_MSVCR_ARCH="PE32 executable"
55315       else
55316         CORRECT_MSVCR_ARCH="PE32+ executable"
55317       fi
55318     else
55319       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55320         CORRECT_MSVCR_ARCH=386
55321       else
55322         CORRECT_MSVCR_ARCH=x86-64
55323       fi
55324     fi
55325     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55326       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55327 $as_echo "ok" >&6; }
55328       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55329 
55330   # Only process if variable expands to non-empty
55331 
55332   if test "x$MSVC_DLL" != x; then
55333     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55334 
55335   # Input might be given as Windows format, start by converting to
55336   # unix format.
55337   path="$MSVC_DLL"
55338   new_path=`$CYGPATH -u "$path"`
55339 
55340   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55341   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55342   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55343   # "foo.exe" is OK but "foo" is an error.
55344   #
55345   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55346   # It is also a way to make sure we got the proper file name for the real test later on.
55347   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55348   if test "x$test_shortpath" = x; then
55349     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55350 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55351     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55352   fi
55353 
55354   # Call helper function which possibly converts this using DOS-style short mode.
55355   # If so, the updated path is stored in $new_path.
55356 
55357   input_path="$new_path"
55358   # Check if we need to convert this using DOS-style short mode. If the path
55359   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55360   # take no chances and rewrite it.
55361   # Note: m4 eats our [], so we need to use [ and ] instead.
55362   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55363   if test "x$has_forbidden_chars" != x; then
55364     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55365     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55366     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55367     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55368       # Going to short mode and back again did indeed matter. Since short mode is
55369       # case insensitive, let's make it lowercase to improve readability.
55370       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55371       # Now convert it back to Unix-style (cygpath)
55372       input_path=`$CYGPATH -u "$shortmode_path"`
55373       new_path="$input_path"
55374     fi
55375   fi
55376 
55377   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55378   if test "x$test_cygdrive_prefix" = x; then
55379     # As a simple fix, exclude /usr/bin since it's not a real path.
55380     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55381       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55382       # a path prefixed by /cygdrive for fixpath to work.
55383       new_path="$CYGWIN_ROOT_PATH$input_path"
55384     fi
55385   fi
55386 
55387 
55388   if test "x$path" != "x$new_path"; then
55389     MSVC_DLL="$new_path"
55390     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55391 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55392   fi
55393 
55394     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55395 
55396   path="$MSVC_DLL"
55397   has_colon=`$ECHO $path | $GREP ^.:`
55398   new_path="$path"
55399   if test "x$has_colon" = x; then
55400     # Not in mixed or Windows style, start by that.
55401     new_path=`cmd //c echo $path`
55402   fi
55403 
55404 
55405   input_path="$new_path"
55406   # Check if we need to convert this using DOS-style short mode. If the path
55407   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55408   # take no chances and rewrite it.
55409   # Note: m4 eats our [], so we need to use [ and ] instead.
55410   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55411   if test "x$has_forbidden_chars" != x; then
55412     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55413     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55414   fi
55415 
55416 
55417   windows_path="$new_path"
55418   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55419     unix_path=`$CYGPATH -u "$windows_path"`
55420     new_path="$unix_path"
55421   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55422     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55423     new_path="$unix_path"
55424   fi
55425 
55426   if test "x$path" != "x$new_path"; then
55427     MSVC_DLL="$new_path"
55428     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55429 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55430   fi
55431 
55432   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55433   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55434 
55435     else
55436       # We're on a unix platform. Hooray! :)
55437       path="$MSVC_DLL"
55438       has_space=`$ECHO "$path" | $GREP " "`
55439       if test "x$has_space" != x; then
55440         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55441 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55442         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55443       fi
55444 
55445       # Use eval to expand a potential ~
55446       eval path="$path"
55447       if test ! -f "$path" && test ! -d "$path"; then
55448         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55449       fi
55450 
55451       if test -d "$path"; then
55452         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55453       else
55454         dir="`$DIRNAME "$path"`"
55455         base="`$BASENAME "$path"`"
55456         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55457       fi
55458     fi
55459   fi
55460 
55461       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55462 $as_echo_n "checking for $DLL_NAME... " >&6; }
55463       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55464 $as_echo "$MSVC_DLL" >&6; }
55465     else
55466       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55467 $as_echo "incorrect, ignoring" >&6; }
55468       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55469 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55470     fi
55471   fi
55472 
55473   fi
55474 
55475   if test "x$MSVC_DLL" = x; then
55476     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55477     if test "x$VS100COMNTOOLS" != x; then
55478       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55479 
55480   windows_path="$CYGWIN_VS_TOOLS_DIR"
55481   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55482     unix_path=`$CYGPATH -u "$windows_path"`
55483     CYGWIN_VS_TOOLS_DIR="$unix_path"
55484   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55485     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55486     CYGWIN_VS_TOOLS_DIR="$unix_path"
55487   fi
55488 
55489       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55490         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55491             | $GREP -i /x64/ | $HEAD --lines 1`
55492       else
55493         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55494             | $GREP -i /x86/ | $HEAD --lines 1`
55495       fi
55496 
55497   DLL_NAME="$DLL_NAME"
55498   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55499   METHOD="search of VS100COMNTOOLS"
55500   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55501     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55502 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55503 
55504     # Need to check if the found msvcr is correct architecture
55505     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55506 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55507     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55508     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55509       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55510       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55511       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55512         CORRECT_MSVCR_ARCH="PE32 executable"
55513       else
55514         CORRECT_MSVCR_ARCH="PE32+ executable"
55515       fi
55516     else
55517       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55518         CORRECT_MSVCR_ARCH=386
55519       else
55520         CORRECT_MSVCR_ARCH=x86-64
55521       fi
55522     fi
55523     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55524       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55525 $as_echo "ok" >&6; }
55526       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55527 
55528   # Only process if variable expands to non-empty
55529 
55530   if test "x$MSVC_DLL" != x; then
55531     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55532 
55533   # Input might be given as Windows format, start by converting to
55534   # unix format.
55535   path="$MSVC_DLL"
55536   new_path=`$CYGPATH -u "$path"`
55537 
55538   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55539   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55540   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55541   # "foo.exe" is OK but "foo" is an error.
55542   #
55543   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55544   # It is also a way to make sure we got the proper file name for the real test later on.
55545   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55546   if test "x$test_shortpath" = x; then
55547     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55548 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55549     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55550   fi
55551 
55552   # Call helper function which possibly converts this using DOS-style short mode.
55553   # If so, the updated path is stored in $new_path.
55554 
55555   input_path="$new_path"
55556   # Check if we need to convert this using DOS-style short mode. If the path
55557   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55558   # take no chances and rewrite it.
55559   # Note: m4 eats our [], so we need to use [ and ] instead.
55560   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55561   if test "x$has_forbidden_chars" != x; then
55562     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55563     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55564     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55565     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55566       # Going to short mode and back again did indeed matter. Since short mode is
55567       # case insensitive, let's make it lowercase to improve readability.
55568       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55569       # Now convert it back to Unix-style (cygpath)
55570       input_path=`$CYGPATH -u "$shortmode_path"`
55571       new_path="$input_path"
55572     fi
55573   fi
55574 
55575   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55576   if test "x$test_cygdrive_prefix" = x; then
55577     # As a simple fix, exclude /usr/bin since it's not a real path.
55578     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55579       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55580       # a path prefixed by /cygdrive for fixpath to work.
55581       new_path="$CYGWIN_ROOT_PATH$input_path"
55582     fi
55583   fi
55584 
55585 
55586   if test "x$path" != "x$new_path"; then
55587     MSVC_DLL="$new_path"
55588     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55589 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55590   fi
55591 
55592     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55593 
55594   path="$MSVC_DLL"
55595   has_colon=`$ECHO $path | $GREP ^.:`
55596   new_path="$path"
55597   if test "x$has_colon" = x; then
55598     # Not in mixed or Windows style, start by that.
55599     new_path=`cmd //c echo $path`
55600   fi
55601 
55602 
55603   input_path="$new_path"
55604   # Check if we need to convert this using DOS-style short mode. If the path
55605   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55606   # take no chances and rewrite it.
55607   # Note: m4 eats our [], so we need to use [ and ] instead.
55608   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55609   if test "x$has_forbidden_chars" != x; then
55610     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55611     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55612   fi
55613 
55614 
55615   windows_path="$new_path"
55616   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55617     unix_path=`$CYGPATH -u "$windows_path"`
55618     new_path="$unix_path"
55619   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55620     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55621     new_path="$unix_path"
55622   fi
55623 
55624   if test "x$path" != "x$new_path"; then
55625     MSVC_DLL="$new_path"
55626     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55627 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55628   fi
55629 
55630   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55631   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55632 
55633     else
55634       # We're on a unix platform. Hooray! :)
55635       path="$MSVC_DLL"
55636       has_space=`$ECHO "$path" | $GREP " "`
55637       if test "x$has_space" != x; then
55638         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55639 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55640         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55641       fi
55642 
55643       # Use eval to expand a potential ~
55644       eval path="$path"
55645       if test ! -f "$path" && test ! -d "$path"; then
55646         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55647       fi
55648 
55649       if test -d "$path"; then
55650         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55651       else
55652         dir="`$DIRNAME "$path"`"
55653         base="`$BASENAME "$path"`"
55654         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55655       fi
55656     fi
55657   fi
55658 
55659       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55660 $as_echo_n "checking for $DLL_NAME... " >&6; }
55661       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55662 $as_echo "$MSVC_DLL" >&6; }
55663     else
55664       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55665 $as_echo "incorrect, ignoring" >&6; }
55666       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55667 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55668     fi
55669   fi
55670 
55671     fi
55672   fi
55673 
55674   if test "x$MSVC_DLL" = x; then
55675     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55676     # (This was the original behaviour; kept since it might turn something up)
55677     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55678       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55679         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55680             | $GREP x64 | $HEAD --lines 1`
55681       else
55682         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55683             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55684         if test "x$POSSIBLE_MSVC_DLL" = x; then
55685           # We're grasping at straws now...
55686           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55687               | $HEAD --lines 1`
55688         fi
55689       fi
55690 
55691 
55692   DLL_NAME="$DLL_NAME"
55693   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55694   METHOD="search of VCINSTALLDIR"
55695   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55696     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55697 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55698 
55699     # Need to check if the found msvcr is correct architecture
55700     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55701 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55702     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55703     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55704       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55705       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55706       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55707         CORRECT_MSVCR_ARCH="PE32 executable"
55708       else
55709         CORRECT_MSVCR_ARCH="PE32+ executable"
55710       fi
55711     else
55712       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55713         CORRECT_MSVCR_ARCH=386
55714       else
55715         CORRECT_MSVCR_ARCH=x86-64
55716       fi
55717     fi
55718     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55719       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55720 $as_echo "ok" >&6; }
55721       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55722 
55723   # Only process if variable expands to non-empty
55724 
55725   if test "x$MSVC_DLL" != x; then
55726     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55727 
55728   # Input might be given as Windows format, start by converting to
55729   # unix format.
55730   path="$MSVC_DLL"
55731   new_path=`$CYGPATH -u "$path"`
55732 
55733   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55734   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55735   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55736   # "foo.exe" is OK but "foo" is an error.
55737   #
55738   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55739   # It is also a way to make sure we got the proper file name for the real test later on.
55740   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55741   if test "x$test_shortpath" = x; then
55742     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55743 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55744     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55745   fi
55746 
55747   # Call helper function which possibly converts this using DOS-style short mode.
55748   # If so, the updated path is stored in $new_path.
55749 
55750   input_path="$new_path"
55751   # Check if we need to convert this using DOS-style short mode. If the path
55752   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55753   # take no chances and rewrite it.
55754   # Note: m4 eats our [], so we need to use [ and ] instead.
55755   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55756   if test "x$has_forbidden_chars" != x; then
55757     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55758     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55759     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55760     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55761       # Going to short mode and back again did indeed matter. Since short mode is
55762       # case insensitive, let's make it lowercase to improve readability.
55763       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55764       # Now convert it back to Unix-style (cygpath)
55765       input_path=`$CYGPATH -u "$shortmode_path"`
55766       new_path="$input_path"
55767     fi
55768   fi
55769 
55770   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55771   if test "x$test_cygdrive_prefix" = x; then
55772     # As a simple fix, exclude /usr/bin since it's not a real path.
55773     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55774       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55775       # a path prefixed by /cygdrive for fixpath to work.
55776       new_path="$CYGWIN_ROOT_PATH$input_path"
55777     fi
55778   fi
55779 
55780 
55781   if test "x$path" != "x$new_path"; then
55782     MSVC_DLL="$new_path"
55783     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55784 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55785   fi
55786 
55787     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55788 
55789   path="$MSVC_DLL"
55790   has_colon=`$ECHO $path | $GREP ^.:`
55791   new_path="$path"
55792   if test "x$has_colon" = x; then
55793     # Not in mixed or Windows style, start by that.
55794     new_path=`cmd //c echo $path`
55795   fi
55796 
55797 
55798   input_path="$new_path"
55799   # Check if we need to convert this using DOS-style short mode. If the path
55800   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55801   # take no chances and rewrite it.
55802   # Note: m4 eats our [], so we need to use [ and ] instead.
55803   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55804   if test "x$has_forbidden_chars" != x; then
55805     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55806     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55807   fi
55808 
55809 
55810   windows_path="$new_path"
55811   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55812     unix_path=`$CYGPATH -u "$windows_path"`
55813     new_path="$unix_path"
55814   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55815     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55816     new_path="$unix_path"
55817   fi
55818 
55819   if test "x$path" != "x$new_path"; then
55820     MSVC_DLL="$new_path"
55821     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55822 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55823   fi
55824 
55825   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55826   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55827 
55828     else
55829       # We're on a unix platform. Hooray! :)
55830       path="$MSVC_DLL"
55831       has_space=`$ECHO "$path" | $GREP " "`
55832       if test "x$has_space" != x; then
55833         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55834 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55835         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55836       fi
55837 
55838       # Use eval to expand a potential ~
55839       eval path="$path"
55840       if test ! -f "$path" && test ! -d "$path"; then
55841         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55842       fi
55843 
55844       if test -d "$path"; then
55845         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55846       else
55847         dir="`$DIRNAME "$path"`"
55848         base="`$BASENAME "$path"`"
55849         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55850       fi
55851     fi
55852   fi
55853 
55854       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55855 $as_echo_n "checking for $DLL_NAME... " >&6; }
55856       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55857 $as_echo "$MSVC_DLL" >&6; }
55858     else
55859       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55860 $as_echo "incorrect, ignoring" >&6; }
55861       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55862 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55863     fi
55864   fi
55865 
55866     fi
55867   fi
55868 
55869   if test "x$MSVC_DLL" = x; then
55870     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55871 $as_echo_n "checking for $DLL_NAME... " >&6; }
55872     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55873 $as_echo "no" >&6; }
55874     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55875   fi
55876 
55877       MSVCP_DLL="$MSVC_DLL"
55878     fi
55879 
55880   fi
55881 
55882   fi
55883 
55884 
55885   if test "x$NEEDS_LIB_X11" = xfalse; then
55886     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55887       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55888 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55889     fi
55890     X_CFLAGS=
55891     X_LIBS=
55892   else
55893 
55894     if test "x${with_x}" = xno; then
55895       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55896     fi
55897 
55898     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55899       # The user has specified a X11 base directory. Use it for includes and
55900       # libraries, unless explicitely overridden.
55901       if test "x$x_includes" = xNONE; then
55902         x_includes="${with_x}/include"
55903       fi
55904       if test "x$x_libraries" = xNONE; then
55905         x_libraries="${with_x}/lib"
55906       fi
55907     else
55908       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55909       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55910       # --x-libraries for the sysroot, if that seems to be correct.
55911       if test "x$SYSROOT" != "x"; then
55912         if test "x$x_includes" = xNONE; then
55913           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55914             x_includes="$SYSROOT/usr/X11R6/include"
55915           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55916             x_includes="$SYSROOT/usr/include"
55917           fi
55918         fi
55919         if test "x$x_libraries" = xNONE; then
55920           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55921             x_libraries="$SYSROOT/usr/X11R6/lib"
55922           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55923             x_libraries="$SYSROOT/usr/lib64"
55924           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55925             x_libraries="$SYSROOT/usr/lib"
55926           fi
55927         fi
55928       fi
55929     fi
55930 
55931     # Now let autoconf do it's magic
55932     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55933 $as_echo_n "checking for X... " >&6; }
55934 
55935 
55936 # Check whether --with-x was given.
55937 if test "${with_x+set}" = set; then :
55938   withval=$with_x;
55939 fi
55940 
55941 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55942 if test "x$with_x" = xno; then
55943   # The user explicitly disabled X.
55944   have_x=disabled
55945 else
55946   case $x_includes,$x_libraries in #(
55947     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55948     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55949   $as_echo_n "(cached) " >&6
55950 else
55951   # One or both of the vars are not set, and there is no cached value.
55952 ac_x_includes=no ac_x_libraries=no
55953 rm -f -r conftest.dir
55954 if mkdir conftest.dir; then
55955   cd conftest.dir
55956   cat >Imakefile <<'_ACEOF'
55957 incroot:
55958         @echo incroot='${INCROOT}'
55959 usrlibdir:
55960         @echo usrlibdir='${USRLIBDIR}'
55961 libdir:
55962         @echo libdir='${LIBDIR}'
55963 _ACEOF
55964   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55965     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55966     for ac_var in incroot usrlibdir libdir; do
55967       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55968     done
55969     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55970     for ac_extension in a so sl dylib la dll; do
55971       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55972          test -f "$ac_im_libdir/libX11.$ac_extension"; then
55973         ac_im_usrlibdir=$ac_im_libdir; break
55974       fi
55975     done
55976     # Screen out bogus values from the imake configuration.  They are
55977     # bogus both because they are the default anyway, and because
55978     # using them would break gcc on systems where it needs fixed includes.
55979     case $ac_im_incroot in
55980         /usr/include) ac_x_includes= ;;
55981         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55982     esac
55983     case $ac_im_usrlibdir in
55984         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
55985         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55986     esac
55987   fi
55988   cd ..
55989   rm -f -r conftest.dir
55990 fi
55991 
55992 # Standard set of common directories for X headers.
55993 # Check X11 before X11Rn because it is often a symlink to the current release.
55994 ac_x_header_dirs='
55995 /usr/X11/include
55996 /usr/X11R7/include
55997 /usr/X11R6/include
55998 /usr/X11R5/include
55999 /usr/X11R4/include
56000 
56001 /usr/include/X11
56002 /usr/include/X11R7
56003 /usr/include/X11R6
56004 /usr/include/X11R5
56005 /usr/include/X11R4
56006 
56007 /usr/local/X11/include
56008 /usr/local/X11R7/include
56009 /usr/local/X11R6/include
56010 /usr/local/X11R5/include
56011 /usr/local/X11R4/include
56012 
56013 /usr/local/include/X11
56014 /usr/local/include/X11R7
56015 /usr/local/include/X11R6
56016 /usr/local/include/X11R5
56017 /usr/local/include/X11R4
56018 
56019 /usr/X386/include
56020 /usr/x386/include
56021 /usr/XFree86/include/X11
56022 
56023 /usr/include
56024 /usr/local/include
56025 /usr/unsupported/include
56026 /usr/athena/include
56027 /usr/local/x11r5/include
56028 /usr/lpp/Xamples/include
56029 
56030 /usr/openwin/include
56031 /usr/openwin/share/include'
56032 
56033 if test "$ac_x_includes" = no; then
56034   # Guess where to find include files, by looking for Xlib.h.
56035   # First, try using that file with no special directory specified.
56036   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56037 /* end confdefs.h.  */
56038 #include <X11/Xlib.h>
56039 _ACEOF
56040 if ac_fn_cxx_try_cpp "$LINENO"; then :
56041   # We can compile using X headers with no special include directory.
56042 ac_x_includes=
56043 else
56044   for ac_dir in $ac_x_header_dirs; do
56045   if test -r "$ac_dir/X11/Xlib.h"; then
56046     ac_x_includes=$ac_dir
56047     break
56048   fi
56049 done
56050 fi
56051 rm -f conftest.err conftest.i conftest.$ac_ext
56052 fi # $ac_x_includes = no
56053 
56054 if test "$ac_x_libraries" = no; then
56055   # Check for the libraries.
56056   # See if we find them without any special options.
56057   # Don't add to $LIBS permanently.
56058   ac_save_LIBS=$LIBS
56059   LIBS="-lX11 $LIBS"
56060   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56061 /* end confdefs.h.  */
56062 #include <X11/Xlib.h>
56063 int
56064 main ()
56065 {
56066 XrmInitialize ()
56067   ;
56068   return 0;
56069 }
56070 _ACEOF
56071 if ac_fn_cxx_try_link "$LINENO"; then :
56072   LIBS=$ac_save_LIBS
56073 # We can link X programs with no special library path.
56074 ac_x_libraries=
56075 else
56076   LIBS=$ac_save_LIBS
56077 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56078 do
56079   # Don't even attempt the hair of trying to link an X program!
56080   for ac_extension in a so sl dylib la dll; do
56081     if test -r "$ac_dir/libX11.$ac_extension"; then
56082       ac_x_libraries=$ac_dir
56083       break 2
56084     fi
56085   done
56086 done
56087 fi
56088 rm -f core conftest.err conftest.$ac_objext \
56089     conftest$ac_exeext conftest.$ac_ext
56090 fi # $ac_x_libraries = no
56091 
56092 case $ac_x_includes,$ac_x_libraries in #(
56093   no,* | *,no | *\'*)
56094     # Didn't find X, or a directory has "'" in its name.
56095     ac_cv_have_x="have_x=no";; #(
56096   *)
56097     # Record where we found X for the cache.
56098     ac_cv_have_x="have_x=yes\
56099         ac_x_includes='$ac_x_includes'\
56100         ac_x_libraries='$ac_x_libraries'"
56101 esac
56102 fi
56103 ;; #(
56104     *) have_x=yes;;
56105   esac
56106   eval "$ac_cv_have_x"
56107 fi # $with_x != no
56108 
56109 if test "$have_x" != yes; then
56110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56111 $as_echo "$have_x" >&6; }
56112   no_x=yes
56113 else
56114   # If each of the values was on the command line, it overrides each guess.
56115   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56116   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56117   # Update the cache value to reflect the command line values.
56118   ac_cv_have_x="have_x=yes\
56119         ac_x_includes='$x_includes'\
56120         ac_x_libraries='$x_libraries'"
56121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56122 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56123 fi
56124 
56125     if test "$no_x" = yes; then
56126   # Not all programs may use this symbol, but it does not hurt to define it.
56127 
56128 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56129 
56130   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56131 else
56132   if test -n "$x_includes"; then
56133     X_CFLAGS="$X_CFLAGS -I$x_includes"
56134   fi
56135 
56136   # It would also be nice to do this for all -L options, not just this one.
56137   if test -n "$x_libraries"; then
56138     X_LIBS="$X_LIBS -L$x_libraries"
56139     # For Solaris; some versions of Sun CC require a space after -R and
56140     # others require no space.  Words are not sufficient . . . .
56141     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56142 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
56143     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56144     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56145     ac_cxx_werror_flag=yes
56146     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56147 /* end confdefs.h.  */
56148 
56149 int
56150 main ()
56151 {
56152 
56153   ;
56154   return 0;
56155 }
56156 _ACEOF
56157 if ac_fn_cxx_try_link "$LINENO"; then :
56158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56159 $as_echo "no" >&6; }
56160        X_LIBS="$X_LIBS -R$x_libraries"
56161 else
56162   LIBS="$ac_xsave_LIBS -R $x_libraries"
56163        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56164 /* end confdefs.h.  */
56165 
56166 int
56167 main ()
56168 {
56169 
56170   ;
56171   return 0;
56172 }
56173 _ACEOF
56174 if ac_fn_cxx_try_link "$LINENO"; then :
56175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56176 $as_echo "yes" >&6; }
56177           X_LIBS="$X_LIBS -R $x_libraries"
56178 else
56179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56180 $as_echo "neither works" >&6; }
56181 fi
56182 rm -f core conftest.err conftest.$ac_objext \
56183     conftest$ac_exeext conftest.$ac_ext
56184 fi
56185 rm -f core conftest.err conftest.$ac_objext \
56186     conftest$ac_exeext conftest.$ac_ext
56187     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56188     LIBS=$ac_xsave_LIBS
56189   fi
56190 
56191   # Check for system-dependent libraries X programs must link with.
56192   # Do this before checking for the system-independent R6 libraries
56193   # (-lICE), since we may need -lsocket or whatever for X linking.
56194 
56195   if test "$ISC" = yes; then
56196     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56197   else
56198     # Martyn Johnson says this is needed for Ultrix, if the X
56199     # libraries were built with DECnet support.  And Karl Berry says
56200     # the Alpha needs dnet_stub (dnet does not exist).
56201     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56202     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56203 /* end confdefs.h.  */
56204 
56205 /* Override any GCC internal prototype to avoid an error.
56206    Use char because int might match the return type of a GCC
56207    builtin and then its argument prototype would still apply.  */
56208 #ifdef __cplusplus
56209 extern "C"
56210 #endif
56211 char XOpenDisplay ();
56212 int
56213 main ()
56214 {
56215 return XOpenDisplay ();
56216   ;
56217   return 0;
56218 }
56219 _ACEOF
56220 if ac_fn_cxx_try_link "$LINENO"; then :
56221 
56222 else
56223   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56224 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56225 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56226   $as_echo_n "(cached) " >&6
56227 else
56228   ac_check_lib_save_LIBS=$LIBS
56229 LIBS="-ldnet  $LIBS"
56230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56231 /* end confdefs.h.  */
56232 
56233 /* Override any GCC internal prototype to avoid an error.
56234    Use char because int might match the return type of a GCC
56235    builtin and then its argument prototype would still apply.  */
56236 #ifdef __cplusplus
56237 extern "C"
56238 #endif
56239 char dnet_ntoa ();
56240 int
56241 main ()
56242 {
56243 return dnet_ntoa ();
56244   ;
56245   return 0;
56246 }
56247 _ACEOF
56248 if ac_fn_cxx_try_link "$LINENO"; then :
56249   ac_cv_lib_dnet_dnet_ntoa=yes
56250 else
56251   ac_cv_lib_dnet_dnet_ntoa=no
56252 fi
56253 rm -f core conftest.err conftest.$ac_objext \
56254     conftest$ac_exeext conftest.$ac_ext
56255 LIBS=$ac_check_lib_save_LIBS
56256 fi
56257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56258 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56259 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56260   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56261 fi
56262 
56263     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56264       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56265 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56266 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56267   $as_echo_n "(cached) " >&6
56268 else
56269   ac_check_lib_save_LIBS=$LIBS
56270 LIBS="-ldnet_stub  $LIBS"
56271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56272 /* end confdefs.h.  */
56273 
56274 /* Override any GCC internal prototype to avoid an error.
56275    Use char because int might match the return type of a GCC
56276    builtin and then its argument prototype would still apply.  */
56277 #ifdef __cplusplus
56278 extern "C"
56279 #endif
56280 char dnet_ntoa ();
56281 int
56282 main ()
56283 {
56284 return dnet_ntoa ();
56285   ;
56286   return 0;
56287 }
56288 _ACEOF
56289 if ac_fn_cxx_try_link "$LINENO"; then :
56290   ac_cv_lib_dnet_stub_dnet_ntoa=yes
56291 else
56292   ac_cv_lib_dnet_stub_dnet_ntoa=no
56293 fi
56294 rm -f core conftest.err conftest.$ac_objext \
56295     conftest$ac_exeext conftest.$ac_ext
56296 LIBS=$ac_check_lib_save_LIBS
56297 fi
56298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56299 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56300 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56301   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56302 fi
56303 
56304     fi
56305 fi
56306 rm -f core conftest.err conftest.$ac_objext \
56307     conftest$ac_exeext conftest.$ac_ext
56308     LIBS="$ac_xsave_LIBS"
56309 
56310     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56311     # to get the SysV transport functions.
56312     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56313     # needs -lnsl.
56314     # The nsl library prevents programs from opening the X display
56315     # on Irix 5.2, according to T.E. Dickey.
56316     # The functions gethostbyname, getservbyname, and inet_addr are
56317     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56318     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56319 if test "x$ac_cv_func_gethostbyname" = xyes; then :
56320 
56321 fi
56322 
56323     if test $ac_cv_func_gethostbyname = no; then
56324       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56325 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56326 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56327   $as_echo_n "(cached) " >&6
56328 else
56329   ac_check_lib_save_LIBS=$LIBS
56330 LIBS="-lnsl  $LIBS"
56331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56332 /* end confdefs.h.  */
56333 
56334 /* Override any GCC internal prototype to avoid an error.
56335    Use char because int might match the return type of a GCC
56336    builtin and then its argument prototype would still apply.  */
56337 #ifdef __cplusplus
56338 extern "C"
56339 #endif
56340 char gethostbyname ();
56341 int
56342 main ()
56343 {
56344 return gethostbyname ();
56345   ;
56346   return 0;
56347 }
56348 _ACEOF
56349 if ac_fn_cxx_try_link "$LINENO"; then :
56350   ac_cv_lib_nsl_gethostbyname=yes
56351 else
56352   ac_cv_lib_nsl_gethostbyname=no
56353 fi
56354 rm -f core conftest.err conftest.$ac_objext \
56355     conftest$ac_exeext conftest.$ac_ext
56356 LIBS=$ac_check_lib_save_LIBS
56357 fi
56358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56359 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56360 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56361   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56362 fi
56363 
56364       if test $ac_cv_lib_nsl_gethostbyname = no; then
56365         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56366 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56367 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56368   $as_echo_n "(cached) " >&6
56369 else
56370   ac_check_lib_save_LIBS=$LIBS
56371 LIBS="-lbsd  $LIBS"
56372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56373 /* end confdefs.h.  */
56374 
56375 /* Override any GCC internal prototype to avoid an error.
56376    Use char because int might match the return type of a GCC
56377    builtin and then its argument prototype would still apply.  */
56378 #ifdef __cplusplus
56379 extern "C"
56380 #endif
56381 char gethostbyname ();
56382 int
56383 main ()
56384 {
56385 return gethostbyname ();
56386   ;
56387   return 0;
56388 }
56389 _ACEOF
56390 if ac_fn_cxx_try_link "$LINENO"; then :
56391   ac_cv_lib_bsd_gethostbyname=yes
56392 else
56393   ac_cv_lib_bsd_gethostbyname=no
56394 fi
56395 rm -f core conftest.err conftest.$ac_objext \
56396     conftest$ac_exeext conftest.$ac_ext
56397 LIBS=$ac_check_lib_save_LIBS
56398 fi
56399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56400 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56401 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56402   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56403 fi
56404 
56405       fi
56406     fi
56407 
56408     # lieder@skyler.mavd.honeywell.com says without -lsocket,
56409     # socket/setsockopt and other routines are undefined under SCO ODT
56410     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56411     # on later versions), says Simon Leinen: it contains gethostby*
56412     # variants that don't use the name server (or something).  -lsocket
56413     # must be given before -lnsl if both are needed.  We assume that
56414     # if connect needs -lnsl, so does gethostbyname.
56415     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56416 if test "x$ac_cv_func_connect" = xyes; then :
56417 
56418 fi
56419 
56420     if test $ac_cv_func_connect = no; then
56421       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56422 $as_echo_n "checking for connect in -lsocket... " >&6; }
56423 if ${ac_cv_lib_socket_connect+:} false; then :
56424   $as_echo_n "(cached) " >&6
56425 else
56426   ac_check_lib_save_LIBS=$LIBS
56427 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56429 /* end confdefs.h.  */
56430 
56431 /* Override any GCC internal prototype to avoid an error.
56432    Use char because int might match the return type of a GCC
56433    builtin and then its argument prototype would still apply.  */
56434 #ifdef __cplusplus
56435 extern "C"
56436 #endif
56437 char connect ();
56438 int
56439 main ()
56440 {
56441 return connect ();
56442   ;
56443   return 0;
56444 }
56445 _ACEOF
56446 if ac_fn_cxx_try_link "$LINENO"; then :
56447   ac_cv_lib_socket_connect=yes
56448 else
56449   ac_cv_lib_socket_connect=no
56450 fi
56451 rm -f core conftest.err conftest.$ac_objext \
56452     conftest$ac_exeext conftest.$ac_ext
56453 LIBS=$ac_check_lib_save_LIBS
56454 fi
56455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56456 $as_echo "$ac_cv_lib_socket_connect" >&6; }
56457 if test "x$ac_cv_lib_socket_connect" = xyes; then :
56458   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56459 fi
56460 
56461     fi
56462 
56463     # Guillermo Gomez says -lposix is necessary on A/UX.
56464     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56465 if test "x$ac_cv_func_remove" = xyes; then :
56466 
56467 fi
56468 
56469     if test $ac_cv_func_remove = no; then
56470       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56471 $as_echo_n "checking for remove in -lposix... " >&6; }
56472 if ${ac_cv_lib_posix_remove+:} false; then :
56473   $as_echo_n "(cached) " >&6
56474 else
56475   ac_check_lib_save_LIBS=$LIBS
56476 LIBS="-lposix  $LIBS"
56477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56478 /* end confdefs.h.  */
56479 
56480 /* Override any GCC internal prototype to avoid an error.
56481    Use char because int might match the return type of a GCC
56482    builtin and then its argument prototype would still apply.  */
56483 #ifdef __cplusplus
56484 extern "C"
56485 #endif
56486 char remove ();
56487 int
56488 main ()
56489 {
56490 return remove ();
56491   ;
56492   return 0;
56493 }
56494 _ACEOF
56495 if ac_fn_cxx_try_link "$LINENO"; then :
56496   ac_cv_lib_posix_remove=yes
56497 else
56498   ac_cv_lib_posix_remove=no
56499 fi
56500 rm -f core conftest.err conftest.$ac_objext \
56501     conftest$ac_exeext conftest.$ac_ext
56502 LIBS=$ac_check_lib_save_LIBS
56503 fi
56504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56505 $as_echo "$ac_cv_lib_posix_remove" >&6; }
56506 if test "x$ac_cv_lib_posix_remove" = xyes; then :
56507   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56508 fi
56509 
56510     fi
56511 
56512     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56513     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56514 if test "x$ac_cv_func_shmat" = xyes; then :
56515 
56516 fi
56517 
56518     if test $ac_cv_func_shmat = no; then
56519       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56520 $as_echo_n "checking for shmat in -lipc... " >&6; }
56521 if ${ac_cv_lib_ipc_shmat+:} false; then :
56522   $as_echo_n "(cached) " >&6
56523 else
56524   ac_check_lib_save_LIBS=$LIBS
56525 LIBS="-lipc  $LIBS"
56526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56527 /* end confdefs.h.  */
56528 
56529 /* Override any GCC internal prototype to avoid an error.
56530    Use char because int might match the return type of a GCC
56531    builtin and then its argument prototype would still apply.  */
56532 #ifdef __cplusplus
56533 extern "C"
56534 #endif
56535 char shmat ();
56536 int
56537 main ()
56538 {
56539 return shmat ();
56540   ;
56541   return 0;
56542 }
56543 _ACEOF
56544 if ac_fn_cxx_try_link "$LINENO"; then :
56545   ac_cv_lib_ipc_shmat=yes
56546 else
56547   ac_cv_lib_ipc_shmat=no
56548 fi
56549 rm -f core conftest.err conftest.$ac_objext \
56550     conftest$ac_exeext conftest.$ac_ext
56551 LIBS=$ac_check_lib_save_LIBS
56552 fi
56553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56554 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56555 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56556   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56557 fi
56558 
56559     fi
56560   fi
56561 
56562   # Check for libraries that X11R6 Xt/Xaw programs need.
56563   ac_save_LDFLAGS=$LDFLAGS
56564   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56565   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56566   # check for ICE first), but we must link in the order -lSM -lICE or
56567   # we get undefined symbols.  So assume we have SM if we have ICE.
56568   # These have to be linked with before -lX11, unlike the other
56569   # libraries we check for below, so use a different variable.
56570   # John Interrante, Karl Berry
56571   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56572 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56573 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56574   $as_echo_n "(cached) " >&6
56575 else
56576   ac_check_lib_save_LIBS=$LIBS
56577 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56579 /* end confdefs.h.  */
56580 
56581 /* Override any GCC internal prototype to avoid an error.
56582    Use char because int might match the return type of a GCC
56583    builtin and then its argument prototype would still apply.  */
56584 #ifdef __cplusplus
56585 extern "C"
56586 #endif
56587 char IceConnectionNumber ();
56588 int
56589 main ()
56590 {
56591 return IceConnectionNumber ();
56592   ;
56593   return 0;
56594 }
56595 _ACEOF
56596 if ac_fn_cxx_try_link "$LINENO"; then :
56597   ac_cv_lib_ICE_IceConnectionNumber=yes
56598 else
56599   ac_cv_lib_ICE_IceConnectionNumber=no
56600 fi
56601 rm -f core conftest.err conftest.$ac_objext \
56602     conftest$ac_exeext conftest.$ac_ext
56603 LIBS=$ac_check_lib_save_LIBS
56604 fi
56605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56606 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56607 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56608   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56609 fi
56610 
56611   LDFLAGS=$ac_save_LDFLAGS
56612 
56613 fi
56614 
56615 
56616     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56617     # this doesn't make sense so we remove it.
56618     if test "x$COMPILE_TYPE" = xcross; then
56619       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56620     fi
56621 
56622     if test "x$no_x" = xyes; then
56623 
56624   # Print a helpful message on how to acquire the necessary build dependency.
56625   # x11 is the help tag: freetype, cups, alsa etc
56626   MISSING_DEPENDENCY=x11
56627 
56628   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56629     cygwin_help $MISSING_DEPENDENCY
56630   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56631     msys_help $MISSING_DEPENDENCY
56632   else
56633     PKGHANDLER_COMMAND=
56634 
56635     case $PKGHANDLER in
56636       apt-get)
56637         apt_help     $MISSING_DEPENDENCY ;;
56638       yum)
56639         yum_help     $MISSING_DEPENDENCY ;;
56640       port)
56641         port_help    $MISSING_DEPENDENCY ;;
56642       pkgutil)
56643         pkgutil_help $MISSING_DEPENDENCY ;;
56644       pkgadd)
56645         pkgadd_help  $MISSING_DEPENDENCY ;;
56646     esac
56647 
56648     if test "x$PKGHANDLER_COMMAND" != x; then
56649       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56650     fi
56651   fi
56652 
56653       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56654     fi
56655 
56656     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56657       OPENWIN_HOME="/usr/openwin"
56658       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56659       X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56660           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56661     fi
56662 
56663     ac_ext=c
56664 ac_cpp='$CPP $CPPFLAGS'
56665 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56666 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56667 ac_compiler_gnu=$ac_cv_c_compiler_gnu
56668 
56669     OLD_CFLAGS="$CFLAGS"
56670     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56671 
56672     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56673     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56674 do :
56675   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56676 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56677           # include <X11/Xlib.h>
56678           # include <X11/Xutil.h>
56679 
56680 
56681 "
56682 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56683   cat >>confdefs.h <<_ACEOF
56684 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56685 _ACEOF
56686  X11_HEADERS_OK=yes
56687 else
56688   X11_HEADERS_OK=no; break
56689 fi
56690 
56691 done
56692 
56693 
56694     if test "x$X11_HEADERS_OK" = xno; then
56695 
56696   # Print a helpful message on how to acquire the necessary build dependency.
56697   # x11 is the help tag: freetype, cups, alsa etc
56698   MISSING_DEPENDENCY=x11
56699 
56700   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56701     cygwin_help $MISSING_DEPENDENCY
56702   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56703     msys_help $MISSING_DEPENDENCY
56704   else
56705     PKGHANDLER_COMMAND=
56706 
56707     case $PKGHANDLER in
56708       apt-get)
56709         apt_help     $MISSING_DEPENDENCY ;;
56710       yum)
56711         yum_help     $MISSING_DEPENDENCY ;;
56712       port)
56713         port_help    $MISSING_DEPENDENCY ;;
56714       pkgutil)
56715         pkgutil_help $MISSING_DEPENDENCY ;;
56716       pkgadd)
56717         pkgadd_help  $MISSING_DEPENDENCY ;;
56718     esac
56719 
56720     if test "x$PKGHANDLER_COMMAND" != x; then
56721       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56722     fi
56723   fi
56724 
56725       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56726     fi
56727 
56728     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56729     # defined in libawt_xawt.
56730     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56731 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56732     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56733 /* end confdefs.h.  */
56734 #include <X11/extensions/Xrender.h>
56735 int
56736 main ()
56737 {
56738 XLinearGradient x;
56739   ;
56740   return 0;
56741 }
56742 _ACEOF
56743 if ac_fn_c_try_compile "$LINENO"; then :
56744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56745 $as_echo "yes" >&6; }
56746 else
56747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56748 $as_echo "no" >&6; }
56749          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56750 fi
56751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56752 
56753     CFLAGS="$OLD_CFLAGS"
56754     ac_ext=cpp
56755 ac_cpp='$CXXCPP $CPPFLAGS'
56756 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56757 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56758 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56759 
56760   fi # NEEDS_LIB_X11
56761 
56762 
56763 
56764 
56765 
56766 
56767 # Check whether --with-cups was given.
56768 if test "${with_cups+set}" = set; then :
56769   withval=$with_cups;
56770 fi
56771 
56772 
56773 # Check whether --with-cups-include was given.
56774 if test "${with_cups_include+set}" = set; then :
56775   withval=$with_cups_include;
56776 fi
56777 
56778 
56779   if test "x$NEEDS_LIB_CUPS" = xfalse; then
56780     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56781         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56782       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56783 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56784     fi
56785     CUPS_CFLAGS=
56786   else
56787     CUPS_FOUND=no
56788 
56789     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56790       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56791     fi
56792 
56793     if test "x${with_cups}" != x; then
56794       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56795 $as_echo_n "checking for cups headers... " >&6; }
56796       if test -s "${with_cups}/include/cups/cups.h"; then
56797         CUPS_CFLAGS="-I${with_cups}/include"
56798         CUPS_FOUND=yes
56799         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56800 $as_echo "$CUPS_FOUND" >&6; }
56801       else
56802         as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56803       fi
56804     fi
56805     if test "x${with_cups_include}" != x; then
56806       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56807 $as_echo_n "checking for cups headers... " >&6; }
56808       if test -s "${with_cups_include}/cups/cups.h"; then
56809         CUPS_CFLAGS="-I${with_cups_include}"
56810         CUPS_FOUND=yes
56811         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56812 $as_echo "$CUPS_FOUND" >&6; }
56813       else
56814         as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56815       fi
56816     fi
56817     if test "x$CUPS_FOUND" = xno; then
56818       # Are the cups headers installed in the default /usr/include location?
56819       for ac_header in cups/cups.h cups/ppd.h
56820 do :
56821   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56822 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56823 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56824   cat >>confdefs.h <<_ACEOF
56825 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56826 _ACEOF
56827 
56828           CUPS_FOUND=yes
56829           CUPS_CFLAGS=
56830           DEFAULT_CUPS=yes
56831 
56832 fi
56833 
56834 done
56835 
56836     fi
56837     if test "x$CUPS_FOUND" = xno; then
56838 
56839   # Print a helpful message on how to acquire the necessary build dependency.
56840   # cups is the help tag: freetype, cups, alsa etc
56841   MISSING_DEPENDENCY=cups
56842 
56843   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56844     cygwin_help $MISSING_DEPENDENCY
56845   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56846     msys_help $MISSING_DEPENDENCY
56847   else
56848     PKGHANDLER_COMMAND=
56849 
56850     case $PKGHANDLER in
56851       apt-get)
56852         apt_help     $MISSING_DEPENDENCY ;;
56853       yum)
56854         yum_help     $MISSING_DEPENDENCY ;;
56855       port)
56856         port_help    $MISSING_DEPENDENCY ;;
56857       pkgutil)
56858         pkgutil_help $MISSING_DEPENDENCY ;;
56859       pkgadd)
56860         pkgadd_help  $MISSING_DEPENDENCY ;;
56861     esac
56862 
56863     if test "x$PKGHANDLER_COMMAND" != x; then
56864       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56865     fi
56866   fi
56867 
56868       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56869     fi
56870   fi
56871 
56872 
56873 
56874 
56875 
56876 # Check whether --with-freetype was given.
56877 if test "${with_freetype+set}" = set; then :
56878   withval=$with_freetype;
56879 fi
56880 
56881 
56882 # Check whether --with-freetype-include was given.
56883 if test "${with_freetype_include+set}" = set; then :
56884   withval=$with_freetype_include;
56885 fi
56886 
56887 
56888 # Check whether --with-freetype-lib was given.
56889 if test "${with_freetype_lib+set}" = set; then :
56890   withval=$with_freetype_lib;
56891 fi
56892 
56893 
56894 # Check whether --with-freetype-src was given.
56895 if test "${with_freetype_src+set}" = set; then :
56896   withval=$with_freetype_src;
56897 fi
56898 
56899   # Check whether --enable-freetype-bundling was given.
56900 if test "${enable_freetype_bundling+set}" = set; then :
56901   enableval=$enable_freetype_bundling;
56902 fi
56903 
56904 
56905   # Need to specify explicitly since it needs to be overridden on some versions of macosx
56906   FREETYPE_BASE_NAME=freetype
56907   FREETYPE_CFLAGS=
56908   FREETYPE_LIBS=
56909   FREETYPE_BUNDLE_LIB_PATH=
56910 
56911   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56912     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56913         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56914         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56915         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56916       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56917 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56918     fi
56919     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56920       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56921 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56922     fi
56923   else
56924     # freetype is needed to build; go get it!
56925 
56926     BUNDLE_FREETYPE="$enable_freetype_bundling"
56927 
56928     if  test "x$with_freetype_src" != x; then
56929       if test "x$OPENJDK_TARGET_OS" = xwindows; then
56930         # Try to build freetype if --with-freetype-src was given on Windows
56931 
56932   FREETYPE_SRC_PATH="$with_freetype_src"
56933   BUILD_FREETYPE=yes
56934 
56935   # Check if the freetype sources are acessible..
56936   if ! test -d $FREETYPE_SRC_PATH; then
56937     { $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
56938 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56939     BUILD_FREETYPE=no
56940   fi
56941   # ..and contain a vc2010 project file
56942   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56943   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56944     { $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
56945 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56946     BUILD_FREETYPE=no
56947   fi
56948   # Now check if configure found a version of 'msbuild.exe'
56949   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56950     { $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
56951 $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;}
56952     BUILD_FREETYPE=no
56953   fi
56954 
56955   # Ready to go..
56956   if test "x$BUILD_FREETYPE" = xyes; then
56957     # msbuild requires trailing slashes for output directories
56958     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56959     freetype_lib_path_unix="$freetype_lib_path"
56960     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56961 
56962   unix_path="$vcxproj_path"
56963   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56964     windows_path=`$CYGPATH -m "$unix_path"`
56965     vcxproj_path="$windows_path"
56966   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56967     windows_path=`cmd //c echo $unix_path`
56968     vcxproj_path="$windows_path"
56969   fi
56970 
56971 
56972   unix_path="$freetype_lib_path"
56973   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56974     windows_path=`$CYGPATH -m "$unix_path"`
56975     freetype_lib_path="$windows_path"
56976   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56977     windows_path=`cmd //c echo $unix_path`
56978     freetype_lib_path="$windows_path"
56979   fi
56980 
56981 
56982   unix_path="$freetype_obj_path"
56983   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56984     windows_path=`$CYGPATH -m "$unix_path"`
56985     freetype_obj_path="$windows_path"
56986   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56987     windows_path=`cmd //c echo $unix_path`
56988     freetype_obj_path="$windows_path"
56989   fi
56990 
56991     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56992       freetype_platform=x64
56993     else
56994       freetype_platform=win32
56995     fi
56996 
56997     # The original freetype project file is for VS 2010 (i.e. 'v100'),
56998     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56999     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57000     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57001     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57002 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57003 
57004     # First we try to build the freetype.dll
57005     $ECHO -e "@echo off\n"\
57006         "$MSBUILD $vcxproj_path "\
57007         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57008         "/p:Configuration=\"Release Multithreaded\" "\
57009         "/p:Platform=$freetype_platform "\
57010         "/p:ConfigurationType=DynamicLibrary "\
57011         "/p:TargetName=freetype "\
57012         "/p:OutDir=\"$freetype_lib_path\" "\
57013         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57014     cmd /c freetype.bat
57015 
57016     if test -s "$freetype_lib_path_unix/freetype.dll"; then
57017       # If that succeeds we also build freetype.lib
57018       $ECHO -e "@echo off\n"\
57019           "$MSBUILD $vcxproj_path "\
57020           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57021           "/p:Configuration=\"Release Multithreaded\" "\
57022           "/p:Platform=$freetype_platform "\
57023           "/p:ConfigurationType=StaticLibrary "\
57024           "/p:TargetName=freetype "\
57025           "/p:OutDir=\"$freetype_lib_path\" "\
57026           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57027       cmd /c freetype.bat
57028 
57029       if test -s "$freetype_lib_path_unix/freetype.lib"; then
57030         # Once we build both, lib and dll, set freetype lib and include path appropriately
57031         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57032         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57033         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57034 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57035       else
57036         BUILD_FREETYPE=no
57037       fi
57038     else
57039       BUILD_FREETYPE=no
57040     fi
57041   fi
57042 
57043         if test "x$BUILD_FREETYPE" = xyes; then
57044           # Okay, we built it. Check that it works.
57045 
57046   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57047   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57048   METHOD="--with-freetype-src"
57049 
57050   # Let's start with an optimistic view of the world :-)
57051   FOUND_FREETYPE=yes
57052 
57053   # First look for the canonical freetype main include file ft2build.h.
57054   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57055     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57056     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57057     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57058       # Fail.
57059       FOUND_FREETYPE=no
57060     fi
57061   fi
57062 
57063   if test "x$FOUND_FREETYPE" = xyes; then
57064     # Include file found, let's continue the sanity check.
57065     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57066 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57067 
57068     # Reset to default value
57069     FREETYPE_BASE_NAME=freetype
57070     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57071     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57072       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57073           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57074         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57075         # for the .6 version explicitly.
57076         FREETYPE_BASE_NAME=freetype.6
57077         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57078         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57079 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57080       else
57081         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57082 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57083         FOUND_FREETYPE=no
57084       fi
57085     else
57086       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57087         # On Windows, we will need both .lib and .dll file.
57088         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57089           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57090 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57091           FOUND_FREETYPE=no
57092         fi
57093       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57094           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57095         # Found lib in isa dir, use that instead.
57096         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57097         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57098 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57099       fi
57100     fi
57101   fi
57102 
57103   if test "x$FOUND_FREETYPE" = xyes; then
57104 
57105   # Only process if variable expands to non-empty
57106 
57107   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57108     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57109 
57110   # Input might be given as Windows format, start by converting to
57111   # unix format.
57112   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57113   new_path=`$CYGPATH -u "$path"`
57114 
57115   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57116   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57117   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57118   # "foo.exe" is OK but "foo" is an error.
57119   #
57120   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57121   # It is also a way to make sure we got the proper file name for the real test later on.
57122   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57123   if test "x$test_shortpath" = x; then
57124     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57125 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57126     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57127   fi
57128 
57129   # Call helper function which possibly converts this using DOS-style short mode.
57130   # If so, the updated path is stored in $new_path.
57131 
57132   input_path="$new_path"
57133   # Check if we need to convert this using DOS-style short mode. If the path
57134   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57135   # take no chances and rewrite it.
57136   # Note: m4 eats our [], so we need to use [ and ] instead.
57137   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57138   if test "x$has_forbidden_chars" != x; then
57139     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57140     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57141     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57142     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57143       # Going to short mode and back again did indeed matter. Since short mode is
57144       # case insensitive, let's make it lowercase to improve readability.
57145       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57146       # Now convert it back to Unix-style (cygpath)
57147       input_path=`$CYGPATH -u "$shortmode_path"`
57148       new_path="$input_path"
57149     fi
57150   fi
57151 
57152   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57153   if test "x$test_cygdrive_prefix" = x; then
57154     # As a simple fix, exclude /usr/bin since it's not a real path.
57155     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57156       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57157       # a path prefixed by /cygdrive for fixpath to work.
57158       new_path="$CYGWIN_ROOT_PATH$input_path"
57159     fi
57160   fi
57161 
57162 
57163   if test "x$path" != "x$new_path"; then
57164     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57165     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57166 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57167   fi
57168 
57169     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57170 
57171   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57172   has_colon=`$ECHO $path | $GREP ^.:`
57173   new_path="$path"
57174   if test "x$has_colon" = x; then
57175     # Not in mixed or Windows style, start by that.
57176     new_path=`cmd //c echo $path`
57177   fi
57178 
57179 
57180   input_path="$new_path"
57181   # Check if we need to convert this using DOS-style short mode. If the path
57182   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57183   # take no chances and rewrite it.
57184   # Note: m4 eats our [], so we need to use [ and ] instead.
57185   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57186   if test "x$has_forbidden_chars" != x; then
57187     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57188     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57189   fi
57190 
57191 
57192   windows_path="$new_path"
57193   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57194     unix_path=`$CYGPATH -u "$windows_path"`
57195     new_path="$unix_path"
57196   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57197     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57198     new_path="$unix_path"
57199   fi
57200 
57201   if test "x$path" != "x$new_path"; then
57202     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57203     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57204 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57205   fi
57206 
57207   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57208   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57209 
57210     else
57211       # We're on a unix platform. Hooray! :)
57212       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57213       has_space=`$ECHO "$path" | $GREP " "`
57214       if test "x$has_space" != x; then
57215         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57216 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57217         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57218       fi
57219 
57220       # Use eval to expand a potential ~
57221       eval path="$path"
57222       if test ! -f "$path" && test ! -d "$path"; then
57223         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57224       fi
57225 
57226       if test -d "$path"; then
57227         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57228       else
57229         dir="`$DIRNAME "$path"`"
57230         base="`$BASENAME "$path"`"
57231         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57232       fi
57233     fi
57234   fi
57235 
57236 
57237   # Only process if variable expands to non-empty
57238 
57239   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57240     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57241 
57242   # Input might be given as Windows format, start by converting to
57243   # unix format.
57244   path="$POTENTIAL_FREETYPE_LIB_PATH"
57245   new_path=`$CYGPATH -u "$path"`
57246 
57247   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57248   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57249   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57250   # "foo.exe" is OK but "foo" is an error.
57251   #
57252   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57253   # It is also a way to make sure we got the proper file name for the real test later on.
57254   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57255   if test "x$test_shortpath" = x; then
57256     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57257 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57258     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57259   fi
57260 
57261   # Call helper function which possibly converts this using DOS-style short mode.
57262   # If so, the updated path is stored in $new_path.
57263 
57264   input_path="$new_path"
57265   # Check if we need to convert this using DOS-style short mode. If the path
57266   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57267   # take no chances and rewrite it.
57268   # Note: m4 eats our [], so we need to use [ and ] instead.
57269   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57270   if test "x$has_forbidden_chars" != x; then
57271     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57272     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57273     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57274     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57275       # Going to short mode and back again did indeed matter. Since short mode is
57276       # case insensitive, let's make it lowercase to improve readability.
57277       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57278       # Now convert it back to Unix-style (cygpath)
57279       input_path=`$CYGPATH -u "$shortmode_path"`
57280       new_path="$input_path"
57281     fi
57282   fi
57283 
57284   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57285   if test "x$test_cygdrive_prefix" = x; then
57286     # As a simple fix, exclude /usr/bin since it's not a real path.
57287     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57288       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57289       # a path prefixed by /cygdrive for fixpath to work.
57290       new_path="$CYGWIN_ROOT_PATH$input_path"
57291     fi
57292   fi
57293 
57294 
57295   if test "x$path" != "x$new_path"; then
57296     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57297     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57298 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57299   fi
57300 
57301     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57302 
57303   path="$POTENTIAL_FREETYPE_LIB_PATH"
57304   has_colon=`$ECHO $path | $GREP ^.:`
57305   new_path="$path"
57306   if test "x$has_colon" = x; then
57307     # Not in mixed or Windows style, start by that.
57308     new_path=`cmd //c echo $path`
57309   fi
57310 
57311 
57312   input_path="$new_path"
57313   # Check if we need to convert this using DOS-style short mode. If the path
57314   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57315   # take no chances and rewrite it.
57316   # Note: m4 eats our [], so we need to use [ and ] instead.
57317   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57318   if test "x$has_forbidden_chars" != x; then
57319     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57320     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57321   fi
57322 
57323 
57324   windows_path="$new_path"
57325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57326     unix_path=`$CYGPATH -u "$windows_path"`
57327     new_path="$unix_path"
57328   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57329     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57330     new_path="$unix_path"
57331   fi
57332 
57333   if test "x$path" != "x$new_path"; then
57334     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57335     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57336 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57337   fi
57338 
57339   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57340   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57341 
57342     else
57343       # We're on a unix platform. Hooray! :)
57344       path="$POTENTIAL_FREETYPE_LIB_PATH"
57345       has_space=`$ECHO "$path" | $GREP " "`
57346       if test "x$has_space" != x; then
57347         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57348 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57349         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57350       fi
57351 
57352       # Use eval to expand a potential ~
57353       eval path="$path"
57354       if test ! -f "$path" && test ! -d "$path"; then
57355         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57356       fi
57357 
57358       if test -d "$path"; then
57359         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57360       else
57361         dir="`$DIRNAME "$path"`"
57362         base="`$BASENAME "$path"`"
57363         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57364       fi
57365     fi
57366   fi
57367 
57368 
57369     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57370     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57371 $as_echo_n "checking for freetype includes... " >&6; }
57372     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57373 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57374     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57375     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57376 $as_echo_n "checking for freetype libraries... " >&6; }
57377     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57378 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57379   fi
57380 
57381           if test "x$FOUND_FREETYPE" != xyes; then
57382             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57383           fi
57384         else
57385           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57386 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57387           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57388         fi
57389       else
57390         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57391 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57392       fi
57393     fi
57394 
57395     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57396       # User has specified settings
57397 
57398       if test "x$BUNDLE_FREETYPE" = x; then
57399         # If not specified, default is to bundle freetype
57400         BUNDLE_FREETYPE=yes
57401       fi
57402 
57403       if test "x$with_freetype" != x; then
57404         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57405         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57406       fi
57407 
57408       # Allow --with-freetype-lib and --with-freetype-include to override
57409       if test "x$with_freetype_include" != x; then
57410         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57411       fi
57412       if test "x$with_freetype_lib" != x; then
57413         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57414       fi
57415 
57416       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57417         # Okay, we got it. Check that it works.
57418 
57419   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57420   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57421   METHOD="--with-freetype"
57422 
57423   # Let's start with an optimistic view of the world :-)
57424   FOUND_FREETYPE=yes
57425 
57426   # First look for the canonical freetype main include file ft2build.h.
57427   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57428     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57429     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57430     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57431       # Fail.
57432       FOUND_FREETYPE=no
57433     fi
57434   fi
57435 
57436   if test "x$FOUND_FREETYPE" = xyes; then
57437     # Include file found, let's continue the sanity check.
57438     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57439 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57440 
57441     # Reset to default value
57442     FREETYPE_BASE_NAME=freetype
57443     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57444     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57445       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57446           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57447         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57448         # for the .6 version explicitly.
57449         FREETYPE_BASE_NAME=freetype.6
57450         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57451         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57452 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57453       else
57454         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57455 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57456         FOUND_FREETYPE=no
57457       fi
57458     else
57459       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57460         # On Windows, we will need both .lib and .dll file.
57461         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57462           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57463 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57464           FOUND_FREETYPE=no
57465         fi
57466       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57467           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57468         # Found lib in isa dir, use that instead.
57469         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57470         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57471 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57472       fi
57473     fi
57474   fi
57475 
57476   if test "x$FOUND_FREETYPE" = xyes; then
57477 
57478   # Only process if variable expands to non-empty
57479 
57480   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57481     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57482 
57483   # Input might be given as Windows format, start by converting to
57484   # unix format.
57485   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57486   new_path=`$CYGPATH -u "$path"`
57487 
57488   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57489   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57490   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57491   # "foo.exe" is OK but "foo" is an error.
57492   #
57493   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57494   # It is also a way to make sure we got the proper file name for the real test later on.
57495   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57496   if test "x$test_shortpath" = x; then
57497     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57498 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57499     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57500   fi
57501 
57502   # Call helper function which possibly converts this using DOS-style short mode.
57503   # If so, the updated path is stored in $new_path.
57504 
57505   input_path="$new_path"
57506   # Check if we need to convert this using DOS-style short mode. If the path
57507   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57508   # take no chances and rewrite it.
57509   # Note: m4 eats our [], so we need to use [ and ] instead.
57510   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57511   if test "x$has_forbidden_chars" != x; then
57512     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57513     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57514     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57515     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57516       # Going to short mode and back again did indeed matter. Since short mode is
57517       # case insensitive, let's make it lowercase to improve readability.
57518       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57519       # Now convert it back to Unix-style (cygpath)
57520       input_path=`$CYGPATH -u "$shortmode_path"`
57521       new_path="$input_path"
57522     fi
57523   fi
57524 
57525   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57526   if test "x$test_cygdrive_prefix" = x; then
57527     # As a simple fix, exclude /usr/bin since it's not a real path.
57528     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57529       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57530       # a path prefixed by /cygdrive for fixpath to work.
57531       new_path="$CYGWIN_ROOT_PATH$input_path"
57532     fi
57533   fi
57534 
57535 
57536   if test "x$path" != "x$new_path"; then
57537     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57538     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57539 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57540   fi
57541 
57542     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57543 
57544   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57545   has_colon=`$ECHO $path | $GREP ^.:`
57546   new_path="$path"
57547   if test "x$has_colon" = x; then
57548     # Not in mixed or Windows style, start by that.
57549     new_path=`cmd //c echo $path`
57550   fi
57551 
57552 
57553   input_path="$new_path"
57554   # Check if we need to convert this using DOS-style short mode. If the path
57555   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57556   # take no chances and rewrite it.
57557   # Note: m4 eats our [], so we need to use [ and ] instead.
57558   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57559   if test "x$has_forbidden_chars" != x; then
57560     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57561     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57562   fi
57563 
57564 
57565   windows_path="$new_path"
57566   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57567     unix_path=`$CYGPATH -u "$windows_path"`
57568     new_path="$unix_path"
57569   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57570     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57571     new_path="$unix_path"
57572   fi
57573 
57574   if test "x$path" != "x$new_path"; then
57575     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57576     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57577 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57578   fi
57579 
57580   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57581   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57582 
57583     else
57584       # We're on a unix platform. Hooray! :)
57585       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57586       has_space=`$ECHO "$path" | $GREP " "`
57587       if test "x$has_space" != x; then
57588         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57589 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57590         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57591       fi
57592 
57593       # Use eval to expand a potential ~
57594       eval path="$path"
57595       if test ! -f "$path" && test ! -d "$path"; then
57596         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57597       fi
57598 
57599       if test -d "$path"; then
57600         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57601       else
57602         dir="`$DIRNAME "$path"`"
57603         base="`$BASENAME "$path"`"
57604         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57605       fi
57606     fi
57607   fi
57608 
57609 
57610   # Only process if variable expands to non-empty
57611 
57612   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57613     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57614 
57615   # Input might be given as Windows format, start by converting to
57616   # unix format.
57617   path="$POTENTIAL_FREETYPE_LIB_PATH"
57618   new_path=`$CYGPATH -u "$path"`
57619 
57620   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57621   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57622   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57623   # "foo.exe" is OK but "foo" is an error.
57624   #
57625   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57626   # It is also a way to make sure we got the proper file name for the real test later on.
57627   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57628   if test "x$test_shortpath" = x; then
57629     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57630 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57631     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57632   fi
57633 
57634   # Call helper function which possibly converts this using DOS-style short mode.
57635   # If so, the updated path is stored in $new_path.
57636 
57637   input_path="$new_path"
57638   # Check if we need to convert this using DOS-style short mode. If the path
57639   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57640   # take no chances and rewrite it.
57641   # Note: m4 eats our [], so we need to use [ and ] instead.
57642   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57643   if test "x$has_forbidden_chars" != x; then
57644     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57645     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57646     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57647     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57648       # Going to short mode and back again did indeed matter. Since short mode is
57649       # case insensitive, let's make it lowercase to improve readability.
57650       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57651       # Now convert it back to Unix-style (cygpath)
57652       input_path=`$CYGPATH -u "$shortmode_path"`
57653       new_path="$input_path"
57654     fi
57655   fi
57656 
57657   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57658   if test "x$test_cygdrive_prefix" = x; then
57659     # As a simple fix, exclude /usr/bin since it's not a real path.
57660     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57661       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57662       # a path prefixed by /cygdrive for fixpath to work.
57663       new_path="$CYGWIN_ROOT_PATH$input_path"
57664     fi
57665   fi
57666 
57667 
57668   if test "x$path" != "x$new_path"; then
57669     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57670     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57671 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57672   fi
57673 
57674     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57675 
57676   path="$POTENTIAL_FREETYPE_LIB_PATH"
57677   has_colon=`$ECHO $path | $GREP ^.:`
57678   new_path="$path"
57679   if test "x$has_colon" = x; then
57680     # Not in mixed or Windows style, start by that.
57681     new_path=`cmd //c echo $path`
57682   fi
57683 
57684 
57685   input_path="$new_path"
57686   # Check if we need to convert this using DOS-style short mode. If the path
57687   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57688   # take no chances and rewrite it.
57689   # Note: m4 eats our [], so we need to use [ and ] instead.
57690   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57691   if test "x$has_forbidden_chars" != x; then
57692     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57693     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57694   fi
57695 
57696 
57697   windows_path="$new_path"
57698   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57699     unix_path=`$CYGPATH -u "$windows_path"`
57700     new_path="$unix_path"
57701   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57702     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57703     new_path="$unix_path"
57704   fi
57705 
57706   if test "x$path" != "x$new_path"; then
57707     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57708     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57709 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57710   fi
57711 
57712   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57713   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57714 
57715     else
57716       # We're on a unix platform. Hooray! :)
57717       path="$POTENTIAL_FREETYPE_LIB_PATH"
57718       has_space=`$ECHO "$path" | $GREP " "`
57719       if test "x$has_space" != x; then
57720         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57721 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57722         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57723       fi
57724 
57725       # Use eval to expand a potential ~
57726       eval path="$path"
57727       if test ! -f "$path" && test ! -d "$path"; then
57728         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57729       fi
57730 
57731       if test -d "$path"; then
57732         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57733       else
57734         dir="`$DIRNAME "$path"`"
57735         base="`$BASENAME "$path"`"
57736         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57737       fi
57738     fi
57739   fi
57740 
57741 
57742     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57743     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57744 $as_echo_n "checking for freetype includes... " >&6; }
57745     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57746 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57747     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57748     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57749 $as_echo_n "checking for freetype libraries... " >&6; }
57750     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57751 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57752   fi
57753 
57754         if test "x$FOUND_FREETYPE" != xyes; then
57755           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57756         fi
57757       else
57758         # User specified only one of lib or include. This is an error.
57759         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57760           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57761 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57762           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57763         else
57764           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57765 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57766           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57767         fi
57768       fi
57769     else
57770       # User did not specify settings, but we need freetype. Try to locate it.
57771 
57772       if test "x$BUNDLE_FREETYPE" = x; then
57773         # If not specified, default is to bundle freetype only on windows
57774         if test "x$OPENJDK_TARGET_OS" = xwindows; then
57775           BUNDLE_FREETYPE=yes
57776         else
57777           BUNDLE_FREETYPE=no
57778         fi
57779       fi
57780 
57781       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57782       if test "x$SYSROOT" = x; then
57783         if test "x$FOUND_FREETYPE" != xyes; then
57784           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57785           if test "x$PKG_CONFIG" != x; then
57786 
57787 pkg_failed=no
57788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57789 $as_echo_n "checking for FREETYPE... " >&6; }
57790 
57791 if test -n "$FREETYPE_CFLAGS"; then
57792     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57793  elif test -n "$PKG_CONFIG"; then
57794     if test -n "$PKG_CONFIG" && \
57795     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57796   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57797   ac_status=$?
57798   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57799   test $ac_status = 0; }; then
57800   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57801 else
57802   pkg_failed=yes
57803 fi
57804  else
57805     pkg_failed=untried
57806 fi
57807 if test -n "$FREETYPE_LIBS"; then
57808     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57809  elif test -n "$PKG_CONFIG"; then
57810     if test -n "$PKG_CONFIG" && \
57811     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57812   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57813   ac_status=$?
57814   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57815   test $ac_status = 0; }; then
57816   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57817 else
57818   pkg_failed=yes
57819 fi
57820  else
57821     pkg_failed=untried
57822 fi
57823 
57824 
57825 
57826 if test $pkg_failed = yes; then
57827 
57828 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57829         _pkg_short_errors_supported=yes
57830 else
57831         _pkg_short_errors_supported=no
57832 fi
57833         if test $_pkg_short_errors_supported = yes; then
57834                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57835         else
57836                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57837         fi
57838         # Put the nasty error message in config.log where it belongs
57839         echo "$FREETYPE_PKG_ERRORS" >&5
57840 
57841         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57842 $as_echo "no" >&6; }
57843                 FOUND_FREETYPE=no
57844 elif test $pkg_failed = untried; then
57845         FOUND_FREETYPE=no
57846 else
57847         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57848         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57849         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57850 $as_echo "yes" >&6; }
57851         FOUND_FREETYPE=yes
57852 fi
57853             if test "x$FOUND_FREETYPE" = xyes; then
57854               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57855               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57856               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57857               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57858                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57859               fi
57860               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57861               if test "x$BUNDLE_FREETYPE" = xyes; then
57862                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57863 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57864                 FOUND_FREETYPE=no
57865               else
57866                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57867 $as_echo_n "checking for freetype... " >&6; }
57868                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57869 $as_echo "yes (using pkg-config)" >&6; }
57870               fi
57871             fi
57872           fi
57873         fi
57874       fi
57875 
57876       if test "x$FOUND_FREETYPE" != xyes; then
57877         # Check in well-known locations
57878         if test "x$OPENJDK_TARGET_OS" = xwindows; then
57879           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57880 
57881   windows_path="$FREETYPE_BASE_DIR"
57882   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57883     unix_path=`$CYGPATH -u "$windows_path"`
57884     FREETYPE_BASE_DIR="$unix_path"
57885   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57886     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57887     FREETYPE_BASE_DIR="$unix_path"
57888   fi
57889 
57890 
57891   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57892   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57893   METHOD="well-known location"
57894 
57895   # Let's start with an optimistic view of the world :-)
57896   FOUND_FREETYPE=yes
57897 
57898   # First look for the canonical freetype main include file ft2build.h.
57899   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57900     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57901     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57902     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57903       # Fail.
57904       FOUND_FREETYPE=no
57905     fi
57906   fi
57907 
57908   if test "x$FOUND_FREETYPE" = xyes; then
57909     # Include file found, let's continue the sanity check.
57910     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57911 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57912 
57913     # Reset to default value
57914     FREETYPE_BASE_NAME=freetype
57915     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57916     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57917       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57918           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57919         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57920         # for the .6 version explicitly.
57921         FREETYPE_BASE_NAME=freetype.6
57922         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57923         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57924 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57925       else
57926         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57927 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57928         FOUND_FREETYPE=no
57929       fi
57930     else
57931       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57932         # On Windows, we will need both .lib and .dll file.
57933         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57934           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57935 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57936           FOUND_FREETYPE=no
57937         fi
57938       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57939           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57940         # Found lib in isa dir, use that instead.
57941         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57942         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57943 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57944       fi
57945     fi
57946   fi
57947 
57948   if test "x$FOUND_FREETYPE" = xyes; then
57949 
57950   # Only process if variable expands to non-empty
57951 
57952   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57953     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57954 
57955   # Input might be given as Windows format, start by converting to
57956   # unix format.
57957   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57958   new_path=`$CYGPATH -u "$path"`
57959 
57960   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57961   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57962   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57963   # "foo.exe" is OK but "foo" is an error.
57964   #
57965   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57966   # It is also a way to make sure we got the proper file name for the real test later on.
57967   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57968   if test "x$test_shortpath" = x; then
57969     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57970 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57971     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57972   fi
57973 
57974   # Call helper function which possibly converts this using DOS-style short mode.
57975   # If so, the updated path is stored in $new_path.
57976 
57977   input_path="$new_path"
57978   # Check if we need to convert this using DOS-style short mode. If the path
57979   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57980   # take no chances and rewrite it.
57981   # Note: m4 eats our [], so we need to use [ and ] instead.
57982   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57983   if test "x$has_forbidden_chars" != x; then
57984     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57985     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57986     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57987     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57988       # Going to short mode and back again did indeed matter. Since short mode is
57989       # case insensitive, let's make it lowercase to improve readability.
57990       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57991       # Now convert it back to Unix-style (cygpath)
57992       input_path=`$CYGPATH -u "$shortmode_path"`
57993       new_path="$input_path"
57994     fi
57995   fi
57996 
57997   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57998   if test "x$test_cygdrive_prefix" = x; then
57999     # As a simple fix, exclude /usr/bin since it's not a real path.
58000     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58001       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58002       # a path prefixed by /cygdrive for fixpath to work.
58003       new_path="$CYGWIN_ROOT_PATH$input_path"
58004     fi
58005   fi
58006 
58007 
58008   if test "x$path" != "x$new_path"; then
58009     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58010     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58011 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58012   fi
58013 
58014     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58015 
58016   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58017   has_colon=`$ECHO $path | $GREP ^.:`
58018   new_path="$path"
58019   if test "x$has_colon" = x; then
58020     # Not in mixed or Windows style, start by that.
58021     new_path=`cmd //c echo $path`
58022   fi
58023 
58024 
58025   input_path="$new_path"
58026   # Check if we need to convert this using DOS-style short mode. If the path
58027   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58028   # take no chances and rewrite it.
58029   # Note: m4 eats our [], so we need to use [ and ] instead.
58030   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58031   if test "x$has_forbidden_chars" != x; then
58032     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58033     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58034   fi
58035 
58036 
58037   windows_path="$new_path"
58038   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58039     unix_path=`$CYGPATH -u "$windows_path"`
58040     new_path="$unix_path"
58041   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58042     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58043     new_path="$unix_path"
58044   fi
58045 
58046   if test "x$path" != "x$new_path"; then
58047     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58048     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58049 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58050   fi
58051 
58052   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58053   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58054 
58055     else
58056       # We're on a unix platform. Hooray! :)
58057       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58058       has_space=`$ECHO "$path" | $GREP " "`
58059       if test "x$has_space" != x; then
58060         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58061 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58062         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58063       fi
58064 
58065       # Use eval to expand a potential ~
58066       eval path="$path"
58067       if test ! -f "$path" && test ! -d "$path"; then
58068         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58069       fi
58070 
58071       if test -d "$path"; then
58072         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58073       else
58074         dir="`$DIRNAME "$path"`"
58075         base="`$BASENAME "$path"`"
58076         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58077       fi
58078     fi
58079   fi
58080 
58081 
58082   # Only process if variable expands to non-empty
58083 
58084   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58085     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58086 
58087   # Input might be given as Windows format, start by converting to
58088   # unix format.
58089   path="$POTENTIAL_FREETYPE_LIB_PATH"
58090   new_path=`$CYGPATH -u "$path"`
58091 
58092   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58093   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58094   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58095   # "foo.exe" is OK but "foo" is an error.
58096   #
58097   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58098   # It is also a way to make sure we got the proper file name for the real test later on.
58099   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58100   if test "x$test_shortpath" = x; then
58101     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58102 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58103     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58104   fi
58105 
58106   # Call helper function which possibly converts this using DOS-style short mode.
58107   # If so, the updated path is stored in $new_path.
58108 
58109   input_path="$new_path"
58110   # Check if we need to convert this using DOS-style short mode. If the path
58111   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58112   # take no chances and rewrite it.
58113   # Note: m4 eats our [], so we need to use [ and ] instead.
58114   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58115   if test "x$has_forbidden_chars" != x; then
58116     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58117     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58118     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58119     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58120       # Going to short mode and back again did indeed matter. Since short mode is
58121       # case insensitive, let's make it lowercase to improve readability.
58122       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58123       # Now convert it back to Unix-style (cygpath)
58124       input_path=`$CYGPATH -u "$shortmode_path"`
58125       new_path="$input_path"
58126     fi
58127   fi
58128 
58129   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58130   if test "x$test_cygdrive_prefix" = x; then
58131     # As a simple fix, exclude /usr/bin since it's not a real path.
58132     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58133       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58134       # a path prefixed by /cygdrive for fixpath to work.
58135       new_path="$CYGWIN_ROOT_PATH$input_path"
58136     fi
58137   fi
58138 
58139 
58140   if test "x$path" != "x$new_path"; then
58141     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58142     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58143 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58144   fi
58145 
58146     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58147 
58148   path="$POTENTIAL_FREETYPE_LIB_PATH"
58149   has_colon=`$ECHO $path | $GREP ^.:`
58150   new_path="$path"
58151   if test "x$has_colon" = x; then
58152     # Not in mixed or Windows style, start by that.
58153     new_path=`cmd //c echo $path`
58154   fi
58155 
58156 
58157   input_path="$new_path"
58158   # Check if we need to convert this using DOS-style short mode. If the path
58159   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58160   # take no chances and rewrite it.
58161   # Note: m4 eats our [], so we need to use [ and ] instead.
58162   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58163   if test "x$has_forbidden_chars" != x; then
58164     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58165     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58166   fi
58167 
58168 
58169   windows_path="$new_path"
58170   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58171     unix_path=`$CYGPATH -u "$windows_path"`
58172     new_path="$unix_path"
58173   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58174     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58175     new_path="$unix_path"
58176   fi
58177 
58178   if test "x$path" != "x$new_path"; then
58179     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58180     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58181 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58182   fi
58183 
58184   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58185   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58186 
58187     else
58188       # We're on a unix platform. Hooray! :)
58189       path="$POTENTIAL_FREETYPE_LIB_PATH"
58190       has_space=`$ECHO "$path" | $GREP " "`
58191       if test "x$has_space" != x; then
58192         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58193 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58194         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58195       fi
58196 
58197       # Use eval to expand a potential ~
58198       eval path="$path"
58199       if test ! -f "$path" && test ! -d "$path"; then
58200         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58201       fi
58202 
58203       if test -d "$path"; then
58204         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58205       else
58206         dir="`$DIRNAME "$path"`"
58207         base="`$BASENAME "$path"`"
58208         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58209       fi
58210     fi
58211   fi
58212 
58213 
58214     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58215     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58216 $as_echo_n "checking for freetype includes... " >&6; }
58217     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58218 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58219     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58220     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58221 $as_echo_n "checking for freetype libraries... " >&6; }
58222     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58223 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58224   fi
58225 
58226           if test "x$FOUND_FREETYPE" != xyes; then
58227             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58228 
58229   windows_path="$FREETYPE_BASE_DIR"
58230   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58231     unix_path=`$CYGPATH -u "$windows_path"`
58232     FREETYPE_BASE_DIR="$unix_path"
58233   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58234     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58235     FREETYPE_BASE_DIR="$unix_path"
58236   fi
58237 
58238 
58239   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58240   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58241   METHOD="well-known location"
58242 
58243   # Let's start with an optimistic view of the world :-)
58244   FOUND_FREETYPE=yes
58245 
58246   # First look for the canonical freetype main include file ft2build.h.
58247   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58248     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58249     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58250     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58251       # Fail.
58252       FOUND_FREETYPE=no
58253     fi
58254   fi
58255 
58256   if test "x$FOUND_FREETYPE" = xyes; then
58257     # Include file found, let's continue the sanity check.
58258     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58259 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58260 
58261     # Reset to default value
58262     FREETYPE_BASE_NAME=freetype
58263     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58264     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58265       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58266           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58267         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58268         # for the .6 version explicitly.
58269         FREETYPE_BASE_NAME=freetype.6
58270         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58271         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58272 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58273       else
58274         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58275 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58276         FOUND_FREETYPE=no
58277       fi
58278     else
58279       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58280         # On Windows, we will need both .lib and .dll file.
58281         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58282           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58283 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58284           FOUND_FREETYPE=no
58285         fi
58286       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58287           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58288         # Found lib in isa dir, use that instead.
58289         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58290         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58291 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58292       fi
58293     fi
58294   fi
58295 
58296   if test "x$FOUND_FREETYPE" = xyes; then
58297 
58298   # Only process if variable expands to non-empty
58299 
58300   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58301     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58302 
58303   # Input might be given as Windows format, start by converting to
58304   # unix format.
58305   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58306   new_path=`$CYGPATH -u "$path"`
58307 
58308   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58309   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58310   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58311   # "foo.exe" is OK but "foo" is an error.
58312   #
58313   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58314   # It is also a way to make sure we got the proper file name for the real test later on.
58315   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58316   if test "x$test_shortpath" = x; then
58317     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58318 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58319     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58320   fi
58321 
58322   # Call helper function which possibly converts this using DOS-style short mode.
58323   # If so, the updated path is stored in $new_path.
58324 
58325   input_path="$new_path"
58326   # Check if we need to convert this using DOS-style short mode. If the path
58327   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58328   # take no chances and rewrite it.
58329   # Note: m4 eats our [], so we need to use [ and ] instead.
58330   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58331   if test "x$has_forbidden_chars" != x; then
58332     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58333     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58334     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58335     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58336       # Going to short mode and back again did indeed matter. Since short mode is
58337       # case insensitive, let's make it lowercase to improve readability.
58338       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58339       # Now convert it back to Unix-style (cygpath)
58340       input_path=`$CYGPATH -u "$shortmode_path"`
58341       new_path="$input_path"
58342     fi
58343   fi
58344 
58345   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58346   if test "x$test_cygdrive_prefix" = x; then
58347     # As a simple fix, exclude /usr/bin since it's not a real path.
58348     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58349       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58350       # a path prefixed by /cygdrive for fixpath to work.
58351       new_path="$CYGWIN_ROOT_PATH$input_path"
58352     fi
58353   fi
58354 
58355 
58356   if test "x$path" != "x$new_path"; then
58357     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58358     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58359 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58360   fi
58361 
58362     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58363 
58364   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58365   has_colon=`$ECHO $path | $GREP ^.:`
58366   new_path="$path"
58367   if test "x$has_colon" = x; then
58368     # Not in mixed or Windows style, start by that.
58369     new_path=`cmd //c echo $path`
58370   fi
58371 
58372 
58373   input_path="$new_path"
58374   # Check if we need to convert this using DOS-style short mode. If the path
58375   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58376   # take no chances and rewrite it.
58377   # Note: m4 eats our [], so we need to use [ and ] instead.
58378   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58379   if test "x$has_forbidden_chars" != x; then
58380     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58381     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58382   fi
58383 
58384 
58385   windows_path="$new_path"
58386   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58387     unix_path=`$CYGPATH -u "$windows_path"`
58388     new_path="$unix_path"
58389   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58390     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58391     new_path="$unix_path"
58392   fi
58393 
58394   if test "x$path" != "x$new_path"; then
58395     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58396     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58397 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58398   fi
58399 
58400   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58401   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58402 
58403     else
58404       # We're on a unix platform. Hooray! :)
58405       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58406       has_space=`$ECHO "$path" | $GREP " "`
58407       if test "x$has_space" != x; then
58408         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58409 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58410         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58411       fi
58412 
58413       # Use eval to expand a potential ~
58414       eval path="$path"
58415       if test ! -f "$path" && test ! -d "$path"; then
58416         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58417       fi
58418 
58419       if test -d "$path"; then
58420         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58421       else
58422         dir="`$DIRNAME "$path"`"
58423         base="`$BASENAME "$path"`"
58424         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58425       fi
58426     fi
58427   fi
58428 
58429 
58430   # Only process if variable expands to non-empty
58431 
58432   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58433     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58434 
58435   # Input might be given as Windows format, start by converting to
58436   # unix format.
58437   path="$POTENTIAL_FREETYPE_LIB_PATH"
58438   new_path=`$CYGPATH -u "$path"`
58439 
58440   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58441   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58442   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58443   # "foo.exe" is OK but "foo" is an error.
58444   #
58445   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58446   # It is also a way to make sure we got the proper file name for the real test later on.
58447   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58448   if test "x$test_shortpath" = x; then
58449     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58450 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58451     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58452   fi
58453 
58454   # Call helper function which possibly converts this using DOS-style short mode.
58455   # If so, the updated path is stored in $new_path.
58456 
58457   input_path="$new_path"
58458   # Check if we need to convert this using DOS-style short mode. If the path
58459   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58460   # take no chances and rewrite it.
58461   # Note: m4 eats our [], so we need to use [ and ] instead.
58462   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58463   if test "x$has_forbidden_chars" != x; then
58464     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58465     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58466     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58467     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58468       # Going to short mode and back again did indeed matter. Since short mode is
58469       # case insensitive, let's make it lowercase to improve readability.
58470       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58471       # Now convert it back to Unix-style (cygpath)
58472       input_path=`$CYGPATH -u "$shortmode_path"`
58473       new_path="$input_path"
58474     fi
58475   fi
58476 
58477   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58478   if test "x$test_cygdrive_prefix" = x; then
58479     # As a simple fix, exclude /usr/bin since it's not a real path.
58480     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58481       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58482       # a path prefixed by /cygdrive for fixpath to work.
58483       new_path="$CYGWIN_ROOT_PATH$input_path"
58484     fi
58485   fi
58486 
58487 
58488   if test "x$path" != "x$new_path"; then
58489     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58490     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58491 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58492   fi
58493 
58494     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58495 
58496   path="$POTENTIAL_FREETYPE_LIB_PATH"
58497   has_colon=`$ECHO $path | $GREP ^.:`
58498   new_path="$path"
58499   if test "x$has_colon" = x; then
58500     # Not in mixed or Windows style, start by that.
58501     new_path=`cmd //c echo $path`
58502   fi
58503 
58504 
58505   input_path="$new_path"
58506   # Check if we need to convert this using DOS-style short mode. If the path
58507   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58508   # take no chances and rewrite it.
58509   # Note: m4 eats our [], so we need to use [ and ] instead.
58510   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58511   if test "x$has_forbidden_chars" != x; then
58512     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58513     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58514   fi
58515 
58516 
58517   windows_path="$new_path"
58518   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58519     unix_path=`$CYGPATH -u "$windows_path"`
58520     new_path="$unix_path"
58521   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58522     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58523     new_path="$unix_path"
58524   fi
58525 
58526   if test "x$path" != "x$new_path"; then
58527     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58528     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58529 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58530   fi
58531 
58532   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58533   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58534 
58535     else
58536       # We're on a unix platform. Hooray! :)
58537       path="$POTENTIAL_FREETYPE_LIB_PATH"
58538       has_space=`$ECHO "$path" | $GREP " "`
58539       if test "x$has_space" != x; then
58540         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58541 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58542         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58543       fi
58544 
58545       # Use eval to expand a potential ~
58546       eval path="$path"
58547       if test ! -f "$path" && test ! -d "$path"; then
58548         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58549       fi
58550 
58551       if test -d "$path"; then
58552         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58553       else
58554         dir="`$DIRNAME "$path"`"
58555         base="`$BASENAME "$path"`"
58556         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58557       fi
58558     fi
58559   fi
58560 
58561 
58562     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58563     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58564 $as_echo_n "checking for freetype includes... " >&6; }
58565     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58566 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58567     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58568     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58569 $as_echo_n "checking for freetype libraries... " >&6; }
58570     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58571 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58572   fi
58573 
58574           fi
58575           if test "x$FOUND_FREETYPE" != xyes; then
58576             FREETYPE_BASE_DIR="$HOME/freetype"
58577 
58578   windows_path="$FREETYPE_BASE_DIR"
58579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58580     unix_path=`$CYGPATH -u "$windows_path"`
58581     FREETYPE_BASE_DIR="$unix_path"
58582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58583     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58584     FREETYPE_BASE_DIR="$unix_path"
58585   fi
58586 
58587             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58588 
58589   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58590   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58591   METHOD="well-known location"
58592 
58593   # Let's start with an optimistic view of the world :-)
58594   FOUND_FREETYPE=yes
58595 
58596   # First look for the canonical freetype main include file ft2build.h.
58597   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58598     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58599     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58600     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58601       # Fail.
58602       FOUND_FREETYPE=no
58603     fi
58604   fi
58605 
58606   if test "x$FOUND_FREETYPE" = xyes; then
58607     # Include file found, let's continue the sanity check.
58608     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58609 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58610 
58611     # Reset to default value
58612     FREETYPE_BASE_NAME=freetype
58613     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58614     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58615       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58616           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58617         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58618         # for the .6 version explicitly.
58619         FREETYPE_BASE_NAME=freetype.6
58620         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58621         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58622 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58623       else
58624         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58625 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58626         FOUND_FREETYPE=no
58627       fi
58628     else
58629       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58630         # On Windows, we will need both .lib and .dll file.
58631         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58632           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58633 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58634           FOUND_FREETYPE=no
58635         fi
58636       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58637           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58638         # Found lib in isa dir, use that instead.
58639         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58640         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58641 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58642       fi
58643     fi
58644   fi
58645 
58646   if test "x$FOUND_FREETYPE" = xyes; then
58647 
58648   # Only process if variable expands to non-empty
58649 
58650   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58651     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58652 
58653   # Input might be given as Windows format, start by converting to
58654   # unix format.
58655   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58656   new_path=`$CYGPATH -u "$path"`
58657 
58658   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58659   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58660   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58661   # "foo.exe" is OK but "foo" is an error.
58662   #
58663   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58664   # It is also a way to make sure we got the proper file name for the real test later on.
58665   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58666   if test "x$test_shortpath" = x; then
58667     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58668 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58669     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58670   fi
58671 
58672   # Call helper function which possibly converts this using DOS-style short mode.
58673   # If so, the updated path is stored in $new_path.
58674 
58675   input_path="$new_path"
58676   # Check if we need to convert this using DOS-style short mode. If the path
58677   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58678   # take no chances and rewrite it.
58679   # Note: m4 eats our [], so we need to use [ and ] instead.
58680   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58681   if test "x$has_forbidden_chars" != x; then
58682     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58683     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58684     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58685     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58686       # Going to short mode and back again did indeed matter. Since short mode is
58687       # case insensitive, let's make it lowercase to improve readability.
58688       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58689       # Now convert it back to Unix-style (cygpath)
58690       input_path=`$CYGPATH -u "$shortmode_path"`
58691       new_path="$input_path"
58692     fi
58693   fi
58694 
58695   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58696   if test "x$test_cygdrive_prefix" = x; then
58697     # As a simple fix, exclude /usr/bin since it's not a real path.
58698     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58699       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58700       # a path prefixed by /cygdrive for fixpath to work.
58701       new_path="$CYGWIN_ROOT_PATH$input_path"
58702     fi
58703   fi
58704 
58705 
58706   if test "x$path" != "x$new_path"; then
58707     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58708     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58709 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58710   fi
58711 
58712     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58713 
58714   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58715   has_colon=`$ECHO $path | $GREP ^.:`
58716   new_path="$path"
58717   if test "x$has_colon" = x; then
58718     # Not in mixed or Windows style, start by that.
58719     new_path=`cmd //c echo $path`
58720   fi
58721 
58722 
58723   input_path="$new_path"
58724   # Check if we need to convert this using DOS-style short mode. If the path
58725   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58726   # take no chances and rewrite it.
58727   # Note: m4 eats our [], so we need to use [ and ] instead.
58728   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58729   if test "x$has_forbidden_chars" != x; then
58730     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58731     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58732   fi
58733 
58734 
58735   windows_path="$new_path"
58736   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58737     unix_path=`$CYGPATH -u "$windows_path"`
58738     new_path="$unix_path"
58739   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58740     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58741     new_path="$unix_path"
58742   fi
58743 
58744   if test "x$path" != "x$new_path"; then
58745     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58746     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58747 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58748   fi
58749 
58750   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58751   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58752 
58753     else
58754       # We're on a unix platform. Hooray! :)
58755       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58756       has_space=`$ECHO "$path" | $GREP " "`
58757       if test "x$has_space" != x; then
58758         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58759 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58760         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58761       fi
58762 
58763       # Use eval to expand a potential ~
58764       eval path="$path"
58765       if test ! -f "$path" && test ! -d "$path"; then
58766         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58767       fi
58768 
58769       if test -d "$path"; then
58770         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58771       else
58772         dir="`$DIRNAME "$path"`"
58773         base="`$BASENAME "$path"`"
58774         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58775       fi
58776     fi
58777   fi
58778 
58779 
58780   # Only process if variable expands to non-empty
58781 
58782   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58783     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58784 
58785   # Input might be given as Windows format, start by converting to
58786   # unix format.
58787   path="$POTENTIAL_FREETYPE_LIB_PATH"
58788   new_path=`$CYGPATH -u "$path"`
58789 
58790   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58791   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58792   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58793   # "foo.exe" is OK but "foo" is an error.
58794   #
58795   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58796   # It is also a way to make sure we got the proper file name for the real test later on.
58797   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58798   if test "x$test_shortpath" = x; then
58799     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58800 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58801     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58802   fi
58803 
58804   # Call helper function which possibly converts this using DOS-style short mode.
58805   # If so, the updated path is stored in $new_path.
58806 
58807   input_path="$new_path"
58808   # Check if we need to convert this using DOS-style short mode. If the path
58809   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58810   # take no chances and rewrite it.
58811   # Note: m4 eats our [], so we need to use [ and ] instead.
58812   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58813   if test "x$has_forbidden_chars" != x; then
58814     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58815     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58816     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58817     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58818       # Going to short mode and back again did indeed matter. Since short mode is
58819       # case insensitive, let's make it lowercase to improve readability.
58820       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58821       # Now convert it back to Unix-style (cygpath)
58822       input_path=`$CYGPATH -u "$shortmode_path"`
58823       new_path="$input_path"
58824     fi
58825   fi
58826 
58827   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58828   if test "x$test_cygdrive_prefix" = x; then
58829     # As a simple fix, exclude /usr/bin since it's not a real path.
58830     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58831       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58832       # a path prefixed by /cygdrive for fixpath to work.
58833       new_path="$CYGWIN_ROOT_PATH$input_path"
58834     fi
58835   fi
58836 
58837 
58838   if test "x$path" != "x$new_path"; then
58839     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58840     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58841 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58842   fi
58843 
58844     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58845 
58846   path="$POTENTIAL_FREETYPE_LIB_PATH"
58847   has_colon=`$ECHO $path | $GREP ^.:`
58848   new_path="$path"
58849   if test "x$has_colon" = x; then
58850     # Not in mixed or Windows style, start by that.
58851     new_path=`cmd //c echo $path`
58852   fi
58853 
58854 
58855   input_path="$new_path"
58856   # Check if we need to convert this using DOS-style short mode. If the path
58857   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58858   # take no chances and rewrite it.
58859   # Note: m4 eats our [], so we need to use [ and ] instead.
58860   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58861   if test "x$has_forbidden_chars" != x; then
58862     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58863     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58864   fi
58865 
58866 
58867   windows_path="$new_path"
58868   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58869     unix_path=`$CYGPATH -u "$windows_path"`
58870     new_path="$unix_path"
58871   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58872     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58873     new_path="$unix_path"
58874   fi
58875 
58876   if test "x$path" != "x$new_path"; then
58877     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58878     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58879 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58880   fi
58881 
58882   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58883   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58884 
58885     else
58886       # We're on a unix platform. Hooray! :)
58887       path="$POTENTIAL_FREETYPE_LIB_PATH"
58888       has_space=`$ECHO "$path" | $GREP " "`
58889       if test "x$has_space" != x; then
58890         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58891 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58892         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58893       fi
58894 
58895       # Use eval to expand a potential ~
58896       eval path="$path"
58897       if test ! -f "$path" && test ! -d "$path"; then
58898         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58899       fi
58900 
58901       if test -d "$path"; then
58902         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58903       else
58904         dir="`$DIRNAME "$path"`"
58905         base="`$BASENAME "$path"`"
58906         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58907       fi
58908     fi
58909   fi
58910 
58911 
58912     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58913     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58914 $as_echo_n "checking for freetype includes... " >&6; }
58915     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58916 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58917     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58918     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58919 $as_echo_n "checking for freetype libraries... " >&6; }
58920     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58921 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58922   fi
58923 
58924             else
58925 
58926   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58927   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58928   METHOD="well-known location"
58929 
58930   # Let's start with an optimistic view of the world :-)
58931   FOUND_FREETYPE=yes
58932 
58933   # First look for the canonical freetype main include file ft2build.h.
58934   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58935     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58936     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58937     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58938       # Fail.
58939       FOUND_FREETYPE=no
58940     fi
58941   fi
58942 
58943   if test "x$FOUND_FREETYPE" = xyes; then
58944     # Include file found, let's continue the sanity check.
58945     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58946 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58947 
58948     # Reset to default value
58949     FREETYPE_BASE_NAME=freetype
58950     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58951     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58952       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58953           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58954         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58955         # for the .6 version explicitly.
58956         FREETYPE_BASE_NAME=freetype.6
58957         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58958         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58959 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58960       else
58961         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58962 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58963         FOUND_FREETYPE=no
58964       fi
58965     else
58966       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58967         # On Windows, we will need both .lib and .dll file.
58968         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58969           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58970 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58971           FOUND_FREETYPE=no
58972         fi
58973       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58974           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58975         # Found lib in isa dir, use that instead.
58976         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58977         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58978 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58979       fi
58980     fi
58981   fi
58982 
58983   if test "x$FOUND_FREETYPE" = xyes; then
58984 
58985   # Only process if variable expands to non-empty
58986 
58987   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58988     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58989 
58990   # Input might be given as Windows format, start by converting to
58991   # unix format.
58992   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58993   new_path=`$CYGPATH -u "$path"`
58994 
58995   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58996   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58997   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58998   # "foo.exe" is OK but "foo" is an error.
58999   #
59000   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59001   # It is also a way to make sure we got the proper file name for the real test later on.
59002   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59003   if test "x$test_shortpath" = x; then
59004     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59005 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59006     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59007   fi
59008 
59009   # Call helper function which possibly converts this using DOS-style short mode.
59010   # If so, the updated path is stored in $new_path.
59011 
59012   input_path="$new_path"
59013   # Check if we need to convert this using DOS-style short mode. If the path
59014   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59015   # take no chances and rewrite it.
59016   # Note: m4 eats our [], so we need to use [ and ] instead.
59017   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59018   if test "x$has_forbidden_chars" != x; then
59019     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59020     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59021     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59022     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59023       # Going to short mode and back again did indeed matter. Since short mode is
59024       # case insensitive, let's make it lowercase to improve readability.
59025       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59026       # Now convert it back to Unix-style (cygpath)
59027       input_path=`$CYGPATH -u "$shortmode_path"`
59028       new_path="$input_path"
59029     fi
59030   fi
59031 
59032   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59033   if test "x$test_cygdrive_prefix" = x; then
59034     # As a simple fix, exclude /usr/bin since it's not a real path.
59035     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59036       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59037       # a path prefixed by /cygdrive for fixpath to work.
59038       new_path="$CYGWIN_ROOT_PATH$input_path"
59039     fi
59040   fi
59041 
59042 
59043   if test "x$path" != "x$new_path"; then
59044     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59045     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59046 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59047   fi
59048 
59049     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59050 
59051   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59052   has_colon=`$ECHO $path | $GREP ^.:`
59053   new_path="$path"
59054   if test "x$has_colon" = x; then
59055     # Not in mixed or Windows style, start by that.
59056     new_path=`cmd //c echo $path`
59057   fi
59058 
59059 
59060   input_path="$new_path"
59061   # Check if we need to convert this using DOS-style short mode. If the path
59062   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59063   # take no chances and rewrite it.
59064   # Note: m4 eats our [], so we need to use [ and ] instead.
59065   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59066   if test "x$has_forbidden_chars" != x; then
59067     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59068     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59069   fi
59070 
59071 
59072   windows_path="$new_path"
59073   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59074     unix_path=`$CYGPATH -u "$windows_path"`
59075     new_path="$unix_path"
59076   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59077     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59078     new_path="$unix_path"
59079   fi
59080 
59081   if test "x$path" != "x$new_path"; then
59082     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59083     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59084 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59085   fi
59086 
59087   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59088   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59089 
59090     else
59091       # We're on a unix platform. Hooray! :)
59092       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59093       has_space=`$ECHO "$path" | $GREP " "`
59094       if test "x$has_space" != x; then
59095         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59096 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59097         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59098       fi
59099 
59100       # Use eval to expand a potential ~
59101       eval path="$path"
59102       if test ! -f "$path" && test ! -d "$path"; then
59103         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59104       fi
59105 
59106       if test -d "$path"; then
59107         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59108       else
59109         dir="`$DIRNAME "$path"`"
59110         base="`$BASENAME "$path"`"
59111         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59112       fi
59113     fi
59114   fi
59115 
59116 
59117   # Only process if variable expands to non-empty
59118 
59119   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59120     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59121 
59122   # Input might be given as Windows format, start by converting to
59123   # unix format.
59124   path="$POTENTIAL_FREETYPE_LIB_PATH"
59125   new_path=`$CYGPATH -u "$path"`
59126 
59127   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59128   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59129   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59130   # "foo.exe" is OK but "foo" is an error.
59131   #
59132   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59133   # It is also a way to make sure we got the proper file name for the real test later on.
59134   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59135   if test "x$test_shortpath" = x; then
59136     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59137 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59138     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59139   fi
59140 
59141   # Call helper function which possibly converts this using DOS-style short mode.
59142   # If so, the updated path is stored in $new_path.
59143 
59144   input_path="$new_path"
59145   # Check if we need to convert this using DOS-style short mode. If the path
59146   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59147   # take no chances and rewrite it.
59148   # Note: m4 eats our [], so we need to use [ and ] instead.
59149   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59150   if test "x$has_forbidden_chars" != x; then
59151     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59152     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59153     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59154     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59155       # Going to short mode and back again did indeed matter. Since short mode is
59156       # case insensitive, let's make it lowercase to improve readability.
59157       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59158       # Now convert it back to Unix-style (cygpath)
59159       input_path=`$CYGPATH -u "$shortmode_path"`
59160       new_path="$input_path"
59161     fi
59162   fi
59163 
59164   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59165   if test "x$test_cygdrive_prefix" = x; then
59166     # As a simple fix, exclude /usr/bin since it's not a real path.
59167     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59168       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59169       # a path prefixed by /cygdrive for fixpath to work.
59170       new_path="$CYGWIN_ROOT_PATH$input_path"
59171     fi
59172   fi
59173 
59174 
59175   if test "x$path" != "x$new_path"; then
59176     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59177     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59178 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59179   fi
59180 
59181     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59182 
59183   path="$POTENTIAL_FREETYPE_LIB_PATH"
59184   has_colon=`$ECHO $path | $GREP ^.:`
59185   new_path="$path"
59186   if test "x$has_colon" = x; then
59187     # Not in mixed or Windows style, start by that.
59188     new_path=`cmd //c echo $path`
59189   fi
59190 
59191 
59192   input_path="$new_path"
59193   # Check if we need to convert this using DOS-style short mode. If the path
59194   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59195   # take no chances and rewrite it.
59196   # Note: m4 eats our [], so we need to use [ and ] instead.
59197   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59198   if test "x$has_forbidden_chars" != x; then
59199     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59200     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59201   fi
59202 
59203 
59204   windows_path="$new_path"
59205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59206     unix_path=`$CYGPATH -u "$windows_path"`
59207     new_path="$unix_path"
59208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59209     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59210     new_path="$unix_path"
59211   fi
59212 
59213   if test "x$path" != "x$new_path"; then
59214     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59215     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59216 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59217   fi
59218 
59219   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59220   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59221 
59222     else
59223       # We're on a unix platform. Hooray! :)
59224       path="$POTENTIAL_FREETYPE_LIB_PATH"
59225       has_space=`$ECHO "$path" | $GREP " "`
59226       if test "x$has_space" != x; then
59227         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59228 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59229         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59230       fi
59231 
59232       # Use eval to expand a potential ~
59233       eval path="$path"
59234       if test ! -f "$path" && test ! -d "$path"; then
59235         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59236       fi
59237 
59238       if test -d "$path"; then
59239         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59240       else
59241         dir="`$DIRNAME "$path"`"
59242         base="`$BASENAME "$path"`"
59243         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59244       fi
59245     fi
59246   fi
59247 
59248 
59249     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59250     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59251 $as_echo_n "checking for freetype includes... " >&6; }
59252     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59253 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59254     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59255     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59256 $as_echo_n "checking for freetype libraries... " >&6; }
59257     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59258 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59259   fi
59260 
59261             fi
59262             if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59263                 && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59264               # Source is available, as a last resort try to build freetype in default location
59265 
59266   FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59267   BUILD_FREETYPE=yes
59268 
59269   # Check if the freetype sources are acessible..
59270   if ! test -d $FREETYPE_SRC_PATH; then
59271     { $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
59272 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59273     BUILD_FREETYPE=no
59274   fi
59275   # ..and contain a vc2010 project file
59276   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59277   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59278     { $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
59279 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59280     BUILD_FREETYPE=no
59281   fi
59282   # Now check if configure found a version of 'msbuild.exe'
59283   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59284     { $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
59285 $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;}
59286     BUILD_FREETYPE=no
59287   fi
59288 
59289   # Ready to go..
59290   if test "x$BUILD_FREETYPE" = xyes; then
59291     # msbuild requires trailing slashes for output directories
59292     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59293     freetype_lib_path_unix="$freetype_lib_path"
59294     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59295 
59296   unix_path="$vcxproj_path"
59297   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59298     windows_path=`$CYGPATH -m "$unix_path"`
59299     vcxproj_path="$windows_path"
59300   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59301     windows_path=`cmd //c echo $unix_path`
59302     vcxproj_path="$windows_path"
59303   fi
59304 
59305 
59306   unix_path="$freetype_lib_path"
59307   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59308     windows_path=`$CYGPATH -m "$unix_path"`
59309     freetype_lib_path="$windows_path"
59310   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59311     windows_path=`cmd //c echo $unix_path`
59312     freetype_lib_path="$windows_path"
59313   fi
59314 
59315 
59316   unix_path="$freetype_obj_path"
59317   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59318     windows_path=`$CYGPATH -m "$unix_path"`
59319     freetype_obj_path="$windows_path"
59320   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59321     windows_path=`cmd //c echo $unix_path`
59322     freetype_obj_path="$windows_path"
59323   fi
59324 
59325     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59326       freetype_platform=x64
59327     else
59328       freetype_platform=win32
59329     fi
59330 
59331     # The original freetype project file is for VS 2010 (i.e. 'v100'),
59332     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59333     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59334     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59335     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59336 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59337 
59338     # First we try to build the freetype.dll
59339     $ECHO -e "@echo off\n"\
59340         "$MSBUILD $vcxproj_path "\
59341         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59342         "/p:Configuration=\"Release Multithreaded\" "\
59343         "/p:Platform=$freetype_platform "\
59344         "/p:ConfigurationType=DynamicLibrary "\
59345         "/p:TargetName=freetype "\
59346         "/p:OutDir=\"$freetype_lib_path\" "\
59347         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59348     cmd /c freetype.bat
59349 
59350     if test -s "$freetype_lib_path_unix/freetype.dll"; then
59351       # If that succeeds we also build freetype.lib
59352       $ECHO -e "@echo off\n"\
59353           "$MSBUILD $vcxproj_path "\
59354           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59355           "/p:Configuration=\"Release Multithreaded\" "\
59356           "/p:Platform=$freetype_platform "\
59357           "/p:ConfigurationType=StaticLibrary "\
59358           "/p:TargetName=freetype "\
59359           "/p:OutDir=\"$freetype_lib_path\" "\
59360           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59361       cmd /c freetype.bat
59362 
59363       if test -s "$freetype_lib_path_unix/freetype.lib"; then
59364         # Once we build both, lib and dll, set freetype lib and include path appropriately
59365         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59366         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59367         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59368 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59369       else
59370         BUILD_FREETYPE=no
59371       fi
59372     else
59373       BUILD_FREETYPE=no
59374     fi
59375   fi
59376 
59377               if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59378 
59379   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59380   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59381   METHOD="well-known location"
59382 
59383   # Let's start with an optimistic view of the world :-)
59384   FOUND_FREETYPE=yes
59385 
59386   # First look for the canonical freetype main include file ft2build.h.
59387   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59388     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59389     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59390     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59391       # Fail.
59392       FOUND_FREETYPE=no
59393     fi
59394   fi
59395 
59396   if test "x$FOUND_FREETYPE" = xyes; then
59397     # Include file found, let's continue the sanity check.
59398     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59399 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59400 
59401     # Reset to default value
59402     FREETYPE_BASE_NAME=freetype
59403     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59404     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59405       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59406           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59407         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59408         # for the .6 version explicitly.
59409         FREETYPE_BASE_NAME=freetype.6
59410         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59411         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59412 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59413       else
59414         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59415 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59416         FOUND_FREETYPE=no
59417       fi
59418     else
59419       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59420         # On Windows, we will need both .lib and .dll file.
59421         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59422           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59423 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59424           FOUND_FREETYPE=no
59425         fi
59426       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59427           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59428         # Found lib in isa dir, use that instead.
59429         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59430         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59431 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59432       fi
59433     fi
59434   fi
59435 
59436   if test "x$FOUND_FREETYPE" = xyes; then
59437 
59438   # Only process if variable expands to non-empty
59439 
59440   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59441     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59442 
59443   # Input might be given as Windows format, start by converting to
59444   # unix format.
59445   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59446   new_path=`$CYGPATH -u "$path"`
59447 
59448   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59449   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59450   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59451   # "foo.exe" is OK but "foo" is an error.
59452   #
59453   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59454   # It is also a way to make sure we got the proper file name for the real test later on.
59455   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59456   if test "x$test_shortpath" = x; then
59457     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59458 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59459     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59460   fi
59461 
59462   # Call helper function which possibly converts this using DOS-style short mode.
59463   # If so, the updated path is stored in $new_path.
59464 
59465   input_path="$new_path"
59466   # Check if we need to convert this using DOS-style short mode. If the path
59467   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59468   # take no chances and rewrite it.
59469   # Note: m4 eats our [], so we need to use [ and ] instead.
59470   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59471   if test "x$has_forbidden_chars" != x; then
59472     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59473     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59474     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59475     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59476       # Going to short mode and back again did indeed matter. Since short mode is
59477       # case insensitive, let's make it lowercase to improve readability.
59478       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59479       # Now convert it back to Unix-style (cygpath)
59480       input_path=`$CYGPATH -u "$shortmode_path"`
59481       new_path="$input_path"
59482     fi
59483   fi
59484 
59485   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59486   if test "x$test_cygdrive_prefix" = x; then
59487     # As a simple fix, exclude /usr/bin since it's not a real path.
59488     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59489       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59490       # a path prefixed by /cygdrive for fixpath to work.
59491       new_path="$CYGWIN_ROOT_PATH$input_path"
59492     fi
59493   fi
59494 
59495 
59496   if test "x$path" != "x$new_path"; then
59497     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59498     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59499 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59500   fi
59501 
59502     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59503 
59504   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59505   has_colon=`$ECHO $path | $GREP ^.:`
59506   new_path="$path"
59507   if test "x$has_colon" = x; then
59508     # Not in mixed or Windows style, start by that.
59509     new_path=`cmd //c echo $path`
59510   fi
59511 
59512 
59513   input_path="$new_path"
59514   # Check if we need to convert this using DOS-style short mode. If the path
59515   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59516   # take no chances and rewrite it.
59517   # Note: m4 eats our [], so we need to use [ and ] instead.
59518   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59519   if test "x$has_forbidden_chars" != x; then
59520     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59521     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59522   fi
59523 
59524 
59525   windows_path="$new_path"
59526   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59527     unix_path=`$CYGPATH -u "$windows_path"`
59528     new_path="$unix_path"
59529   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59530     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59531     new_path="$unix_path"
59532   fi
59533 
59534   if test "x$path" != "x$new_path"; then
59535     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59536     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59537 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59538   fi
59539 
59540   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59541   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59542 
59543     else
59544       # We're on a unix platform. Hooray! :)
59545       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59546       has_space=`$ECHO "$path" | $GREP " "`
59547       if test "x$has_space" != x; then
59548         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59549 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59550         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59551       fi
59552 
59553       # Use eval to expand a potential ~
59554       eval path="$path"
59555       if test ! -f "$path" && test ! -d "$path"; then
59556         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59557       fi
59558 
59559       if test -d "$path"; then
59560         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59561       else
59562         dir="`$DIRNAME "$path"`"
59563         base="`$BASENAME "$path"`"
59564         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59565       fi
59566     fi
59567   fi
59568 
59569 
59570   # Only process if variable expands to non-empty
59571 
59572   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59573     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59574 
59575   # Input might be given as Windows format, start by converting to
59576   # unix format.
59577   path="$POTENTIAL_FREETYPE_LIB_PATH"
59578   new_path=`$CYGPATH -u "$path"`
59579 
59580   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59581   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59582   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59583   # "foo.exe" is OK but "foo" is an error.
59584   #
59585   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59586   # It is also a way to make sure we got the proper file name for the real test later on.
59587   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59588   if test "x$test_shortpath" = x; then
59589     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59590 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59591     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59592   fi
59593 
59594   # Call helper function which possibly converts this using DOS-style short mode.
59595   # If so, the updated path is stored in $new_path.
59596 
59597   input_path="$new_path"
59598   # Check if we need to convert this using DOS-style short mode. If the path
59599   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59600   # take no chances and rewrite it.
59601   # Note: m4 eats our [], so we need to use [ and ] instead.
59602   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59603   if test "x$has_forbidden_chars" != x; then
59604     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59605     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59606     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59607     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59608       # Going to short mode and back again did indeed matter. Since short mode is
59609       # case insensitive, let's make it lowercase to improve readability.
59610       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59611       # Now convert it back to Unix-style (cygpath)
59612       input_path=`$CYGPATH -u "$shortmode_path"`
59613       new_path="$input_path"
59614     fi
59615   fi
59616 
59617   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59618   if test "x$test_cygdrive_prefix" = x; then
59619     # As a simple fix, exclude /usr/bin since it's not a real path.
59620     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59621       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59622       # a path prefixed by /cygdrive for fixpath to work.
59623       new_path="$CYGWIN_ROOT_PATH$input_path"
59624     fi
59625   fi
59626 
59627 
59628   if test "x$path" != "x$new_path"; then
59629     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59630     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59631 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59632   fi
59633 
59634     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59635 
59636   path="$POTENTIAL_FREETYPE_LIB_PATH"
59637   has_colon=`$ECHO $path | $GREP ^.:`
59638   new_path="$path"
59639   if test "x$has_colon" = x; then
59640     # Not in mixed or Windows style, start by that.
59641     new_path=`cmd //c echo $path`
59642   fi
59643 
59644 
59645   input_path="$new_path"
59646   # Check if we need to convert this using DOS-style short mode. If the path
59647   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59648   # take no chances and rewrite it.
59649   # Note: m4 eats our [], so we need to use [ and ] instead.
59650   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59651   if test "x$has_forbidden_chars" != x; then
59652     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59653     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59654   fi
59655 
59656 
59657   windows_path="$new_path"
59658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59659     unix_path=`$CYGPATH -u "$windows_path"`
59660     new_path="$unix_path"
59661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59662     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59663     new_path="$unix_path"
59664   fi
59665 
59666   if test "x$path" != "x$new_path"; then
59667     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59668     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59669 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59670   fi
59671 
59672   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59673   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59674 
59675     else
59676       # We're on a unix platform. Hooray! :)
59677       path="$POTENTIAL_FREETYPE_LIB_PATH"
59678       has_space=`$ECHO "$path" | $GREP " "`
59679       if test "x$has_space" != x; then
59680         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59681 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59682         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59683       fi
59684 
59685       # Use eval to expand a potential ~
59686       eval path="$path"
59687       if test ! -f "$path" && test ! -d "$path"; then
59688         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59689       fi
59690 
59691       if test -d "$path"; then
59692         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59693       else
59694         dir="`$DIRNAME "$path"`"
59695         base="`$BASENAME "$path"`"
59696         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59697       fi
59698     fi
59699   fi
59700 
59701 
59702     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59703     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59704 $as_echo_n "checking for freetype includes... " >&6; }
59705     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59706 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59707     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59708     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59709 $as_echo_n "checking for freetype libraries... " >&6; }
59710     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59711 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59712   fi
59713 
59714               else
59715 
59716   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59717   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59718   METHOD="well-known location"
59719 
59720   # Let's start with an optimistic view of the world :-)
59721   FOUND_FREETYPE=yes
59722 
59723   # First look for the canonical freetype main include file ft2build.h.
59724   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59725     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59726     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59727     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59728       # Fail.
59729       FOUND_FREETYPE=no
59730     fi
59731   fi
59732 
59733   if test "x$FOUND_FREETYPE" = xyes; then
59734     # Include file found, let's continue the sanity check.
59735     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59736 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59737 
59738     # Reset to default value
59739     FREETYPE_BASE_NAME=freetype
59740     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59741     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59742       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59743           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59744         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59745         # for the .6 version explicitly.
59746         FREETYPE_BASE_NAME=freetype.6
59747         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59748         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59749 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59750       else
59751         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59752 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59753         FOUND_FREETYPE=no
59754       fi
59755     else
59756       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59757         # On Windows, we will need both .lib and .dll file.
59758         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59759           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59760 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59761           FOUND_FREETYPE=no
59762         fi
59763       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59764           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59765         # Found lib in isa dir, use that instead.
59766         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59767         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59768 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59769       fi
59770     fi
59771   fi
59772 
59773   if test "x$FOUND_FREETYPE" = xyes; then
59774 
59775   # Only process if variable expands to non-empty
59776 
59777   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59778     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59779 
59780   # Input might be given as Windows format, start by converting to
59781   # unix format.
59782   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59783   new_path=`$CYGPATH -u "$path"`
59784 
59785   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59786   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59787   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59788   # "foo.exe" is OK but "foo" is an error.
59789   #
59790   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59791   # It is also a way to make sure we got the proper file name for the real test later on.
59792   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59793   if test "x$test_shortpath" = x; then
59794     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59795 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59796     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59797   fi
59798 
59799   # Call helper function which possibly converts this using DOS-style short mode.
59800   # If so, the updated path is stored in $new_path.
59801 
59802   input_path="$new_path"
59803   # Check if we need to convert this using DOS-style short mode. If the path
59804   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59805   # take no chances and rewrite it.
59806   # Note: m4 eats our [], so we need to use [ and ] instead.
59807   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59808   if test "x$has_forbidden_chars" != x; then
59809     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59810     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59811     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59812     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59813       # Going to short mode and back again did indeed matter. Since short mode is
59814       # case insensitive, let's make it lowercase to improve readability.
59815       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59816       # Now convert it back to Unix-style (cygpath)
59817       input_path=`$CYGPATH -u "$shortmode_path"`
59818       new_path="$input_path"
59819     fi
59820   fi
59821 
59822   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59823   if test "x$test_cygdrive_prefix" = x; then
59824     # As a simple fix, exclude /usr/bin since it's not a real path.
59825     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59826       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59827       # a path prefixed by /cygdrive for fixpath to work.
59828       new_path="$CYGWIN_ROOT_PATH$input_path"
59829     fi
59830   fi
59831 
59832 
59833   if test "x$path" != "x$new_path"; then
59834     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59835     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59836 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59837   fi
59838 
59839     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59840 
59841   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59842   has_colon=`$ECHO $path | $GREP ^.:`
59843   new_path="$path"
59844   if test "x$has_colon" = x; then
59845     # Not in mixed or Windows style, start by that.
59846     new_path=`cmd //c echo $path`
59847   fi
59848 
59849 
59850   input_path="$new_path"
59851   # Check if we need to convert this using DOS-style short mode. If the path
59852   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59853   # take no chances and rewrite it.
59854   # Note: m4 eats our [], so we need to use [ and ] instead.
59855   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59856   if test "x$has_forbidden_chars" != x; then
59857     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59858     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59859   fi
59860 
59861 
59862   windows_path="$new_path"
59863   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59864     unix_path=`$CYGPATH -u "$windows_path"`
59865     new_path="$unix_path"
59866   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59867     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59868     new_path="$unix_path"
59869   fi
59870 
59871   if test "x$path" != "x$new_path"; then
59872     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59873     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59874 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59875   fi
59876 
59877   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59878   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59879 
59880     else
59881       # We're on a unix platform. Hooray! :)
59882       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59883       has_space=`$ECHO "$path" | $GREP " "`
59884       if test "x$has_space" != x; then
59885         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59886 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59887         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59888       fi
59889 
59890       # Use eval to expand a potential ~
59891       eval path="$path"
59892       if test ! -f "$path" && test ! -d "$path"; then
59893         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59894       fi
59895 
59896       if test -d "$path"; then
59897         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59898       else
59899         dir="`$DIRNAME "$path"`"
59900         base="`$BASENAME "$path"`"
59901         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59902       fi
59903     fi
59904   fi
59905 
59906 
59907   # Only process if variable expands to non-empty
59908 
59909   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59910     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59911 
59912   # Input might be given as Windows format, start by converting to
59913   # unix format.
59914   path="$POTENTIAL_FREETYPE_LIB_PATH"
59915   new_path=`$CYGPATH -u "$path"`
59916 
59917   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59918   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59919   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59920   # "foo.exe" is OK but "foo" is an error.
59921   #
59922   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59923   # It is also a way to make sure we got the proper file name for the real test later on.
59924   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59925   if test "x$test_shortpath" = x; then
59926     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59927 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59928     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59929   fi
59930 
59931   # Call helper function which possibly converts this using DOS-style short mode.
59932   # If so, the updated path is stored in $new_path.
59933 
59934   input_path="$new_path"
59935   # Check if we need to convert this using DOS-style short mode. If the path
59936   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59937   # take no chances and rewrite it.
59938   # Note: m4 eats our [], so we need to use [ and ] instead.
59939   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59940   if test "x$has_forbidden_chars" != x; then
59941     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59942     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59943     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59944     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59945       # Going to short mode and back again did indeed matter. Since short mode is
59946       # case insensitive, let's make it lowercase to improve readability.
59947       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59948       # Now convert it back to Unix-style (cygpath)
59949       input_path=`$CYGPATH -u "$shortmode_path"`
59950       new_path="$input_path"
59951     fi
59952   fi
59953 
59954   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59955   if test "x$test_cygdrive_prefix" = x; then
59956     # As a simple fix, exclude /usr/bin since it's not a real path.
59957     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59958       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59959       # a path prefixed by /cygdrive for fixpath to work.
59960       new_path="$CYGWIN_ROOT_PATH$input_path"
59961     fi
59962   fi
59963 
59964 
59965   if test "x$path" != "x$new_path"; then
59966     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59967     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59968 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59969   fi
59970 
59971     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59972 
59973   path="$POTENTIAL_FREETYPE_LIB_PATH"
59974   has_colon=`$ECHO $path | $GREP ^.:`
59975   new_path="$path"
59976   if test "x$has_colon" = x; then
59977     # Not in mixed or Windows style, start by that.
59978     new_path=`cmd //c echo $path`
59979   fi
59980 
59981 
59982   input_path="$new_path"
59983   # Check if we need to convert this using DOS-style short mode. If the path
59984   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59985   # take no chances and rewrite it.
59986   # Note: m4 eats our [], so we need to use [ and ] instead.
59987   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59988   if test "x$has_forbidden_chars" != x; then
59989     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59990     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59991   fi
59992 
59993 
59994   windows_path="$new_path"
59995   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59996     unix_path=`$CYGPATH -u "$windows_path"`
59997     new_path="$unix_path"
59998   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59999     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60000     new_path="$unix_path"
60001   fi
60002 
60003   if test "x$path" != "x$new_path"; then
60004     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60005     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60006 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60007   fi
60008 
60009   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60010   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60011 
60012     else
60013       # We're on a unix platform. Hooray! :)
60014       path="$POTENTIAL_FREETYPE_LIB_PATH"
60015       has_space=`$ECHO "$path" | $GREP " "`
60016       if test "x$has_space" != x; then
60017         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60018 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60019         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60020       fi
60021 
60022       # Use eval to expand a potential ~
60023       eval path="$path"
60024       if test ! -f "$path" && test ! -d "$path"; then
60025         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60026       fi
60027 
60028       if test -d "$path"; then
60029         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60030       else
60031         dir="`$DIRNAME "$path"`"
60032         base="`$BASENAME "$path"`"
60033         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60034       fi
60035     fi
60036   fi
60037 
60038 
60039     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60040     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60041 $as_echo_n "checking for freetype includes... " >&6; }
60042     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60043 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60044     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60045     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60046 $as_echo_n "checking for freetype libraries... " >&6; }
60047     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60048 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60049   fi
60050 
60051               fi
60052             fi
60053           fi
60054         else
60055           FREETYPE_BASE_DIR="$SYSROOT/usr"
60056 
60057   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60058   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60059   METHOD="well-known location"
60060 
60061   # Let's start with an optimistic view of the world :-)
60062   FOUND_FREETYPE=yes
60063 
60064   # First look for the canonical freetype main include file ft2build.h.
60065   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60066     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60067     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60068     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60069       # Fail.
60070       FOUND_FREETYPE=no
60071     fi
60072   fi
60073 
60074   if test "x$FOUND_FREETYPE" = xyes; then
60075     # Include file found, let's continue the sanity check.
60076     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60077 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60078 
60079     # Reset to default value
60080     FREETYPE_BASE_NAME=freetype
60081     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60082     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60083       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60084           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60085         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60086         # for the .6 version explicitly.
60087         FREETYPE_BASE_NAME=freetype.6
60088         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60089         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60090 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60091       else
60092         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60093 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60094         FOUND_FREETYPE=no
60095       fi
60096     else
60097       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60098         # On Windows, we will need both .lib and .dll file.
60099         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60100           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60101 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60102           FOUND_FREETYPE=no
60103         fi
60104       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60105           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60106         # Found lib in isa dir, use that instead.
60107         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60108         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60109 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60110       fi
60111     fi
60112   fi
60113 
60114   if test "x$FOUND_FREETYPE" = xyes; then
60115 
60116   # Only process if variable expands to non-empty
60117 
60118   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60119     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60120 
60121   # Input might be given as Windows format, start by converting to
60122   # unix format.
60123   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60124   new_path=`$CYGPATH -u "$path"`
60125 
60126   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60127   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60128   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60129   # "foo.exe" is OK but "foo" is an error.
60130   #
60131   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60132   # It is also a way to make sure we got the proper file name for the real test later on.
60133   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60134   if test "x$test_shortpath" = x; then
60135     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60136 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60137     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60138   fi
60139 
60140   # Call helper function which possibly converts this using DOS-style short mode.
60141   # If so, the updated path is stored in $new_path.
60142 
60143   input_path="$new_path"
60144   # Check if we need to convert this using DOS-style short mode. If the path
60145   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60146   # take no chances and rewrite it.
60147   # Note: m4 eats our [], so we need to use [ and ] instead.
60148   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60149   if test "x$has_forbidden_chars" != x; then
60150     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60151     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60152     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60153     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60154       # Going to short mode and back again did indeed matter. Since short mode is
60155       # case insensitive, let's make it lowercase to improve readability.
60156       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60157       # Now convert it back to Unix-style (cygpath)
60158       input_path=`$CYGPATH -u "$shortmode_path"`
60159       new_path="$input_path"
60160     fi
60161   fi
60162 
60163   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60164   if test "x$test_cygdrive_prefix" = x; then
60165     # As a simple fix, exclude /usr/bin since it's not a real path.
60166     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60167       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60168       # a path prefixed by /cygdrive for fixpath to work.
60169       new_path="$CYGWIN_ROOT_PATH$input_path"
60170     fi
60171   fi
60172 
60173 
60174   if test "x$path" != "x$new_path"; then
60175     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60176     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60177 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60178   fi
60179 
60180     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60181 
60182   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60183   has_colon=`$ECHO $path | $GREP ^.:`
60184   new_path="$path"
60185   if test "x$has_colon" = x; then
60186     # Not in mixed or Windows style, start by that.
60187     new_path=`cmd //c echo $path`
60188   fi
60189 
60190 
60191   input_path="$new_path"
60192   # Check if we need to convert this using DOS-style short mode. If the path
60193   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60194   # take no chances and rewrite it.
60195   # Note: m4 eats our [], so we need to use [ and ] instead.
60196   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60197   if test "x$has_forbidden_chars" != x; then
60198     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60199     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60200   fi
60201 
60202 
60203   windows_path="$new_path"
60204   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60205     unix_path=`$CYGPATH -u "$windows_path"`
60206     new_path="$unix_path"
60207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60208     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60209     new_path="$unix_path"
60210   fi
60211 
60212   if test "x$path" != "x$new_path"; then
60213     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60214     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60215 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60216   fi
60217 
60218   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60219   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60220 
60221     else
60222       # We're on a unix platform. Hooray! :)
60223       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60224       has_space=`$ECHO "$path" | $GREP " "`
60225       if test "x$has_space" != x; then
60226         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60227 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60228         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60229       fi
60230 
60231       # Use eval to expand a potential ~
60232       eval path="$path"
60233       if test ! -f "$path" && test ! -d "$path"; then
60234         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60235       fi
60236 
60237       if test -d "$path"; then
60238         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60239       else
60240         dir="`$DIRNAME "$path"`"
60241         base="`$BASENAME "$path"`"
60242         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60243       fi
60244     fi
60245   fi
60246 
60247 
60248   # Only process if variable expands to non-empty
60249 
60250   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60251     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60252 
60253   # Input might be given as Windows format, start by converting to
60254   # unix format.
60255   path="$POTENTIAL_FREETYPE_LIB_PATH"
60256   new_path=`$CYGPATH -u "$path"`
60257 
60258   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60259   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60260   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60261   # "foo.exe" is OK but "foo" is an error.
60262   #
60263   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60264   # It is also a way to make sure we got the proper file name for the real test later on.
60265   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60266   if test "x$test_shortpath" = x; then
60267     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60268 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60269     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60270   fi
60271 
60272   # Call helper function which possibly converts this using DOS-style short mode.
60273   # If so, the updated path is stored in $new_path.
60274 
60275   input_path="$new_path"
60276   # Check if we need to convert this using DOS-style short mode. If the path
60277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60278   # take no chances and rewrite it.
60279   # Note: m4 eats our [], so we need to use [ and ] instead.
60280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60281   if test "x$has_forbidden_chars" != x; then
60282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60283     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60284     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60285     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60286       # Going to short mode and back again did indeed matter. Since short mode is
60287       # case insensitive, let's make it lowercase to improve readability.
60288       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60289       # Now convert it back to Unix-style (cygpath)
60290       input_path=`$CYGPATH -u "$shortmode_path"`
60291       new_path="$input_path"
60292     fi
60293   fi
60294 
60295   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60296   if test "x$test_cygdrive_prefix" = x; then
60297     # As a simple fix, exclude /usr/bin since it's not a real path.
60298     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60299       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60300       # a path prefixed by /cygdrive for fixpath to work.
60301       new_path="$CYGWIN_ROOT_PATH$input_path"
60302     fi
60303   fi
60304 
60305 
60306   if test "x$path" != "x$new_path"; then
60307     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60308     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60309 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60310   fi
60311 
60312     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60313 
60314   path="$POTENTIAL_FREETYPE_LIB_PATH"
60315   has_colon=`$ECHO $path | $GREP ^.:`
60316   new_path="$path"
60317   if test "x$has_colon" = x; then
60318     # Not in mixed or Windows style, start by that.
60319     new_path=`cmd //c echo $path`
60320   fi
60321 
60322 
60323   input_path="$new_path"
60324   # Check if we need to convert this using DOS-style short mode. If the path
60325   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60326   # take no chances and rewrite it.
60327   # Note: m4 eats our [], so we need to use [ and ] instead.
60328   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60329   if test "x$has_forbidden_chars" != x; then
60330     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60331     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60332   fi
60333 
60334 
60335   windows_path="$new_path"
60336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60337     unix_path=`$CYGPATH -u "$windows_path"`
60338     new_path="$unix_path"
60339   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60340     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60341     new_path="$unix_path"
60342   fi
60343 
60344   if test "x$path" != "x$new_path"; then
60345     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60346     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60347 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60348   fi
60349 
60350   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60351   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60352 
60353     else
60354       # We're on a unix platform. Hooray! :)
60355       path="$POTENTIAL_FREETYPE_LIB_PATH"
60356       has_space=`$ECHO "$path" | $GREP " "`
60357       if test "x$has_space" != x; then
60358         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60359 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60360         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60361       fi
60362 
60363       # Use eval to expand a potential ~
60364       eval path="$path"
60365       if test ! -f "$path" && test ! -d "$path"; then
60366         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60367       fi
60368 
60369       if test -d "$path"; then
60370         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60371       else
60372         dir="`$DIRNAME "$path"`"
60373         base="`$BASENAME "$path"`"
60374         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60375       fi
60376     fi
60377   fi
60378 
60379 
60380     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60381     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60382 $as_echo_n "checking for freetype includes... " >&6; }
60383     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60384 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60385     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60386     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60387 $as_echo_n "checking for freetype libraries... " >&6; }
60388     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60389 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60390   fi
60391 
60392 
60393           if test "x$FOUND_FREETYPE" != xyes; then
60394             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60395 
60396   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60397   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60398   METHOD="well-known location"
60399 
60400   # Let's start with an optimistic view of the world :-)
60401   FOUND_FREETYPE=yes
60402 
60403   # First look for the canonical freetype main include file ft2build.h.
60404   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60405     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60406     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60407     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60408       # Fail.
60409       FOUND_FREETYPE=no
60410     fi
60411   fi
60412 
60413   if test "x$FOUND_FREETYPE" = xyes; then
60414     # Include file found, let's continue the sanity check.
60415     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60416 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60417 
60418     # Reset to default value
60419     FREETYPE_BASE_NAME=freetype
60420     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60421     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60422       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60423           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60424         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60425         # for the .6 version explicitly.
60426         FREETYPE_BASE_NAME=freetype.6
60427         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60428         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60429 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60430       else
60431         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60432 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60433         FOUND_FREETYPE=no
60434       fi
60435     else
60436       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60437         # On Windows, we will need both .lib and .dll file.
60438         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60439           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60440 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60441           FOUND_FREETYPE=no
60442         fi
60443       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60444           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60445         # Found lib in isa dir, use that instead.
60446         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60447         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60448 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60449       fi
60450     fi
60451   fi
60452 
60453   if test "x$FOUND_FREETYPE" = xyes; then
60454 
60455   # Only process if variable expands to non-empty
60456 
60457   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60458     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60459 
60460   # Input might be given as Windows format, start by converting to
60461   # unix format.
60462   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60463   new_path=`$CYGPATH -u "$path"`
60464 
60465   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60466   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60467   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60468   # "foo.exe" is OK but "foo" is an error.
60469   #
60470   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60471   # It is also a way to make sure we got the proper file name for the real test later on.
60472   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60473   if test "x$test_shortpath" = x; then
60474     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60475 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60476     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60477   fi
60478 
60479   # Call helper function which possibly converts this using DOS-style short mode.
60480   # If so, the updated path is stored in $new_path.
60481 
60482   input_path="$new_path"
60483   # Check if we need to convert this using DOS-style short mode. If the path
60484   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60485   # take no chances and rewrite it.
60486   # Note: m4 eats our [], so we need to use [ and ] instead.
60487   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60488   if test "x$has_forbidden_chars" != x; then
60489     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60490     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60491     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60492     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60493       # Going to short mode and back again did indeed matter. Since short mode is
60494       # case insensitive, let's make it lowercase to improve readability.
60495       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60496       # Now convert it back to Unix-style (cygpath)
60497       input_path=`$CYGPATH -u "$shortmode_path"`
60498       new_path="$input_path"
60499     fi
60500   fi
60501 
60502   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60503   if test "x$test_cygdrive_prefix" = x; then
60504     # As a simple fix, exclude /usr/bin since it's not a real path.
60505     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60506       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60507       # a path prefixed by /cygdrive for fixpath to work.
60508       new_path="$CYGWIN_ROOT_PATH$input_path"
60509     fi
60510   fi
60511 
60512 
60513   if test "x$path" != "x$new_path"; then
60514     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60515     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60516 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60517   fi
60518 
60519     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60520 
60521   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60522   has_colon=`$ECHO $path | $GREP ^.:`
60523   new_path="$path"
60524   if test "x$has_colon" = x; then
60525     # Not in mixed or Windows style, start by that.
60526     new_path=`cmd //c echo $path`
60527   fi
60528 
60529 
60530   input_path="$new_path"
60531   # Check if we need to convert this using DOS-style short mode. If the path
60532   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60533   # take no chances and rewrite it.
60534   # Note: m4 eats our [], so we need to use [ and ] instead.
60535   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60536   if test "x$has_forbidden_chars" != x; then
60537     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60538     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60539   fi
60540 
60541 
60542   windows_path="$new_path"
60543   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60544     unix_path=`$CYGPATH -u "$windows_path"`
60545     new_path="$unix_path"
60546   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60547     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60548     new_path="$unix_path"
60549   fi
60550 
60551   if test "x$path" != "x$new_path"; then
60552     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60553     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60554 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60555   fi
60556 
60557   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60558   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60559 
60560     else
60561       # We're on a unix platform. Hooray! :)
60562       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60563       has_space=`$ECHO "$path" | $GREP " "`
60564       if test "x$has_space" != x; then
60565         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60566 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60567         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60568       fi
60569 
60570       # Use eval to expand a potential ~
60571       eval path="$path"
60572       if test ! -f "$path" && test ! -d "$path"; then
60573         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60574       fi
60575 
60576       if test -d "$path"; then
60577         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60578       else
60579         dir="`$DIRNAME "$path"`"
60580         base="`$BASENAME "$path"`"
60581         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60582       fi
60583     fi
60584   fi
60585 
60586 
60587   # Only process if variable expands to non-empty
60588 
60589   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60590     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60591 
60592   # Input might be given as Windows format, start by converting to
60593   # unix format.
60594   path="$POTENTIAL_FREETYPE_LIB_PATH"
60595   new_path=`$CYGPATH -u "$path"`
60596 
60597   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60598   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60599   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60600   # "foo.exe" is OK but "foo" is an error.
60601   #
60602   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60603   # It is also a way to make sure we got the proper file name for the real test later on.
60604   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60605   if test "x$test_shortpath" = x; then
60606     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60607 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60608     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60609   fi
60610 
60611   # Call helper function which possibly converts this using DOS-style short mode.
60612   # If so, the updated path is stored in $new_path.
60613 
60614   input_path="$new_path"
60615   # Check if we need to convert this using DOS-style short mode. If the path
60616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60617   # take no chances and rewrite it.
60618   # Note: m4 eats our [], so we need to use [ and ] instead.
60619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60620   if test "x$has_forbidden_chars" != x; then
60621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60622     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60623     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60624     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60625       # Going to short mode and back again did indeed matter. Since short mode is
60626       # case insensitive, let's make it lowercase to improve readability.
60627       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60628       # Now convert it back to Unix-style (cygpath)
60629       input_path=`$CYGPATH -u "$shortmode_path"`
60630       new_path="$input_path"
60631     fi
60632   fi
60633 
60634   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60635   if test "x$test_cygdrive_prefix" = x; then
60636     # As a simple fix, exclude /usr/bin since it's not a real path.
60637     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60638       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60639       # a path prefixed by /cygdrive for fixpath to work.
60640       new_path="$CYGWIN_ROOT_PATH$input_path"
60641     fi
60642   fi
60643 
60644 
60645   if test "x$path" != "x$new_path"; then
60646     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60647     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60648 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60649   fi
60650 
60651     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60652 
60653   path="$POTENTIAL_FREETYPE_LIB_PATH"
60654   has_colon=`$ECHO $path | $GREP ^.:`
60655   new_path="$path"
60656   if test "x$has_colon" = x; then
60657     # Not in mixed or Windows style, start by that.
60658     new_path=`cmd //c echo $path`
60659   fi
60660 
60661 
60662   input_path="$new_path"
60663   # Check if we need to convert this using DOS-style short mode. If the path
60664   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60665   # take no chances and rewrite it.
60666   # Note: m4 eats our [], so we need to use [ and ] instead.
60667   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60668   if test "x$has_forbidden_chars" != x; then
60669     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60670     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60671   fi
60672 
60673 
60674   windows_path="$new_path"
60675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60676     unix_path=`$CYGPATH -u "$windows_path"`
60677     new_path="$unix_path"
60678   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60679     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60680     new_path="$unix_path"
60681   fi
60682 
60683   if test "x$path" != "x$new_path"; then
60684     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60685     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60686 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60687   fi
60688 
60689   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60690   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60691 
60692     else
60693       # We're on a unix platform. Hooray! :)
60694       path="$POTENTIAL_FREETYPE_LIB_PATH"
60695       has_space=`$ECHO "$path" | $GREP " "`
60696       if test "x$has_space" != x; then
60697         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60698 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60699         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60700       fi
60701 
60702       # Use eval to expand a potential ~
60703       eval path="$path"
60704       if test ! -f "$path" && test ! -d "$path"; then
60705         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60706       fi
60707 
60708       if test -d "$path"; then
60709         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60710       else
60711         dir="`$DIRNAME "$path"`"
60712         base="`$BASENAME "$path"`"
60713         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60714       fi
60715     fi
60716   fi
60717 
60718 
60719     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60720     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60721 $as_echo_n "checking for freetype includes... " >&6; }
60722     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60723 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60724     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60725     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60726 $as_echo_n "checking for freetype libraries... " >&6; }
60727     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60728 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60729   fi
60730 
60731           fi
60732 
60733           if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60734             if test "x$FOUND_FREETYPE" != xyes; then
60735               # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60736               FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60737 
60738   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60739   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60740   METHOD="well-known location"
60741 
60742   # Let's start with an optimistic view of the world :-)
60743   FOUND_FREETYPE=yes
60744 
60745   # First look for the canonical freetype main include file ft2build.h.
60746   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60747     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60748     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60749     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60750       # Fail.
60751       FOUND_FREETYPE=no
60752     fi
60753   fi
60754 
60755   if test "x$FOUND_FREETYPE" = xyes; then
60756     # Include file found, let's continue the sanity check.
60757     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60758 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60759 
60760     # Reset to default value
60761     FREETYPE_BASE_NAME=freetype
60762     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60763     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60764       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60765           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60766         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60767         # for the .6 version explicitly.
60768         FREETYPE_BASE_NAME=freetype.6
60769         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60770         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60771 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60772       else
60773         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60774 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60775         FOUND_FREETYPE=no
60776       fi
60777     else
60778       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60779         # On Windows, we will need both .lib and .dll file.
60780         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60781           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60782 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60783           FOUND_FREETYPE=no
60784         fi
60785       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60786           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60787         # Found lib in isa dir, use that instead.
60788         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60789         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60790 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60791       fi
60792     fi
60793   fi
60794 
60795   if test "x$FOUND_FREETYPE" = xyes; then
60796 
60797   # Only process if variable expands to non-empty
60798 
60799   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60800     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60801 
60802   # Input might be given as Windows format, start by converting to
60803   # unix format.
60804   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60805   new_path=`$CYGPATH -u "$path"`
60806 
60807   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60808   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60809   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60810   # "foo.exe" is OK but "foo" is an error.
60811   #
60812   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60813   # It is also a way to make sure we got the proper file name for the real test later on.
60814   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60815   if test "x$test_shortpath" = x; then
60816     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60817 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60818     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60819   fi
60820 
60821   # Call helper function which possibly converts this using DOS-style short mode.
60822   # If so, the updated path is stored in $new_path.
60823 
60824   input_path="$new_path"
60825   # Check if we need to convert this using DOS-style short mode. If the path
60826   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60827   # take no chances and rewrite it.
60828   # Note: m4 eats our [], so we need to use [ and ] instead.
60829   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60830   if test "x$has_forbidden_chars" != x; then
60831     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60832     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60833     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60834     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60835       # Going to short mode and back again did indeed matter. Since short mode is
60836       # case insensitive, let's make it lowercase to improve readability.
60837       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60838       # Now convert it back to Unix-style (cygpath)
60839       input_path=`$CYGPATH -u "$shortmode_path"`
60840       new_path="$input_path"
60841     fi
60842   fi
60843 
60844   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60845   if test "x$test_cygdrive_prefix" = x; then
60846     # As a simple fix, exclude /usr/bin since it's not a real path.
60847     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60848       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60849       # a path prefixed by /cygdrive for fixpath to work.
60850       new_path="$CYGWIN_ROOT_PATH$input_path"
60851     fi
60852   fi
60853 
60854 
60855   if test "x$path" != "x$new_path"; then
60856     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60857     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60858 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60859   fi
60860 
60861     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60862 
60863   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60864   has_colon=`$ECHO $path | $GREP ^.:`
60865   new_path="$path"
60866   if test "x$has_colon" = x; then
60867     # Not in mixed or Windows style, start by that.
60868     new_path=`cmd //c echo $path`
60869   fi
60870 
60871 
60872   input_path="$new_path"
60873   # Check if we need to convert this using DOS-style short mode. If the path
60874   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60875   # take no chances and rewrite it.
60876   # Note: m4 eats our [], so we need to use [ and ] instead.
60877   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60878   if test "x$has_forbidden_chars" != x; then
60879     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60880     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60881   fi
60882 
60883 
60884   windows_path="$new_path"
60885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60886     unix_path=`$CYGPATH -u "$windows_path"`
60887     new_path="$unix_path"
60888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60889     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60890     new_path="$unix_path"
60891   fi
60892 
60893   if test "x$path" != "x$new_path"; then
60894     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60895     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60896 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60897   fi
60898 
60899   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60900   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60901 
60902     else
60903       # We're on a unix platform. Hooray! :)
60904       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60905       has_space=`$ECHO "$path" | $GREP " "`
60906       if test "x$has_space" != x; then
60907         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60908 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60909         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60910       fi
60911 
60912       # Use eval to expand a potential ~
60913       eval path="$path"
60914       if test ! -f "$path" && test ! -d "$path"; then
60915         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60916       fi
60917 
60918       if test -d "$path"; then
60919         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60920       else
60921         dir="`$DIRNAME "$path"`"
60922         base="`$BASENAME "$path"`"
60923         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60924       fi
60925     fi
60926   fi
60927 
60928 
60929   # Only process if variable expands to non-empty
60930 
60931   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60932     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60933 
60934   # Input might be given as Windows format, start by converting to
60935   # unix format.
60936   path="$POTENTIAL_FREETYPE_LIB_PATH"
60937   new_path=`$CYGPATH -u "$path"`
60938 
60939   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60940   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60941   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60942   # "foo.exe" is OK but "foo" is an error.
60943   #
60944   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60945   # It is also a way to make sure we got the proper file name for the real test later on.
60946   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60947   if test "x$test_shortpath" = x; then
60948     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60949 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60950     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60951   fi
60952 
60953   # Call helper function which possibly converts this using DOS-style short mode.
60954   # If so, the updated path is stored in $new_path.
60955 
60956   input_path="$new_path"
60957   # Check if we need to convert this using DOS-style short mode. If the path
60958   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60959   # take no chances and rewrite it.
60960   # Note: m4 eats our [], so we need to use [ and ] instead.
60961   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60962   if test "x$has_forbidden_chars" != x; then
60963     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60964     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60965     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60966     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60967       # Going to short mode and back again did indeed matter. Since short mode is
60968       # case insensitive, let's make it lowercase to improve readability.
60969       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60970       # Now convert it back to Unix-style (cygpath)
60971       input_path=`$CYGPATH -u "$shortmode_path"`
60972       new_path="$input_path"
60973     fi
60974   fi
60975 
60976   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60977   if test "x$test_cygdrive_prefix" = x; then
60978     # As a simple fix, exclude /usr/bin since it's not a real path.
60979     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60980       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60981       # a path prefixed by /cygdrive for fixpath to work.
60982       new_path="$CYGWIN_ROOT_PATH$input_path"
60983     fi
60984   fi
60985 
60986 
60987   if test "x$path" != "x$new_path"; then
60988     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60989     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60990 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60991   fi
60992 
60993     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60994 
60995   path="$POTENTIAL_FREETYPE_LIB_PATH"
60996   has_colon=`$ECHO $path | $GREP ^.:`
60997   new_path="$path"
60998   if test "x$has_colon" = x; then
60999     # Not in mixed or Windows style, start by that.
61000     new_path=`cmd //c echo $path`
61001   fi
61002 
61003 
61004   input_path="$new_path"
61005   # Check if we need to convert this using DOS-style short mode. If the path
61006   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61007   # take no chances and rewrite it.
61008   # Note: m4 eats our [], so we need to use [ and ] instead.
61009   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61010   if test "x$has_forbidden_chars" != x; then
61011     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61012     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61013   fi
61014 
61015 
61016   windows_path="$new_path"
61017   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61018     unix_path=`$CYGPATH -u "$windows_path"`
61019     new_path="$unix_path"
61020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61021     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61022     new_path="$unix_path"
61023   fi
61024 
61025   if test "x$path" != "x$new_path"; then
61026     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61027     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61028 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61029   fi
61030 
61031   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61032   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61033 
61034     else
61035       # We're on a unix platform. Hooray! :)
61036       path="$POTENTIAL_FREETYPE_LIB_PATH"
61037       has_space=`$ECHO "$path" | $GREP " "`
61038       if test "x$has_space" != x; then
61039         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61040 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61041         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61042       fi
61043 
61044       # Use eval to expand a potential ~
61045       eval path="$path"
61046       if test ! -f "$path" && test ! -d "$path"; then
61047         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61048       fi
61049 
61050       if test -d "$path"; then
61051         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61052       else
61053         dir="`$DIRNAME "$path"`"
61054         base="`$BASENAME "$path"`"
61055         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61056       fi
61057     fi
61058   fi
61059 
61060 
61061     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61062     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61063 $as_echo_n "checking for freetype includes... " >&6; }
61064     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61065 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61066     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61067     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61068 $as_echo_n "checking for freetype libraries... " >&6; }
61069     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61070 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61071   fi
61072 
61073             fi
61074           fi
61075 
61076           if test "x$FOUND_FREETYPE" != xyes; then
61077             FREETYPE_BASE_DIR="$SYSROOT/usr"
61078             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61079 
61080   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61081   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61082   METHOD="well-known location"
61083 
61084   # Let's start with an optimistic view of the world :-)
61085   FOUND_FREETYPE=yes
61086 
61087   # First look for the canonical freetype main include file ft2build.h.
61088   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61089     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61090     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61091     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61092       # Fail.
61093       FOUND_FREETYPE=no
61094     fi
61095   fi
61096 
61097   if test "x$FOUND_FREETYPE" = xyes; then
61098     # Include file found, let's continue the sanity check.
61099     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61100 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61101 
61102     # Reset to default value
61103     FREETYPE_BASE_NAME=freetype
61104     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61105     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61106       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61107           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61108         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61109         # for the .6 version explicitly.
61110         FREETYPE_BASE_NAME=freetype.6
61111         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61112         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61113 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61114       else
61115         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61116 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61117         FOUND_FREETYPE=no
61118       fi
61119     else
61120       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61121         # On Windows, we will need both .lib and .dll file.
61122         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61123           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61124 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61125           FOUND_FREETYPE=no
61126         fi
61127       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61128           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61129         # Found lib in isa dir, use that instead.
61130         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61131         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61132 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61133       fi
61134     fi
61135   fi
61136 
61137   if test "x$FOUND_FREETYPE" = xyes; then
61138 
61139   # Only process if variable expands to non-empty
61140 
61141   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61142     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61143 
61144   # Input might be given as Windows format, start by converting to
61145   # unix format.
61146   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61147   new_path=`$CYGPATH -u "$path"`
61148 
61149   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61150   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61151   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61152   # "foo.exe" is OK but "foo" is an error.
61153   #
61154   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61155   # It is also a way to make sure we got the proper file name for the real test later on.
61156   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61157   if test "x$test_shortpath" = x; then
61158     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61159 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61160     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61161   fi
61162 
61163   # Call helper function which possibly converts this using DOS-style short mode.
61164   # If so, the updated path is stored in $new_path.
61165 
61166   input_path="$new_path"
61167   # Check if we need to convert this using DOS-style short mode. If the path
61168   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61169   # take no chances and rewrite it.
61170   # Note: m4 eats our [], so we need to use [ and ] instead.
61171   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61172   if test "x$has_forbidden_chars" != x; then
61173     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61174     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61175     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61176     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61177       # Going to short mode and back again did indeed matter. Since short mode is
61178       # case insensitive, let's make it lowercase to improve readability.
61179       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61180       # Now convert it back to Unix-style (cygpath)
61181       input_path=`$CYGPATH -u "$shortmode_path"`
61182       new_path="$input_path"
61183     fi
61184   fi
61185 
61186   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61187   if test "x$test_cygdrive_prefix" = x; then
61188     # As a simple fix, exclude /usr/bin since it's not a real path.
61189     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61190       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61191       # a path prefixed by /cygdrive for fixpath to work.
61192       new_path="$CYGWIN_ROOT_PATH$input_path"
61193     fi
61194   fi
61195 
61196 
61197   if test "x$path" != "x$new_path"; then
61198     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61199     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61200 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61201   fi
61202 
61203     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61204 
61205   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61206   has_colon=`$ECHO $path | $GREP ^.:`
61207   new_path="$path"
61208   if test "x$has_colon" = x; then
61209     # Not in mixed or Windows style, start by that.
61210     new_path=`cmd //c echo $path`
61211   fi
61212 
61213 
61214   input_path="$new_path"
61215   # Check if we need to convert this using DOS-style short mode. If the path
61216   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61217   # take no chances and rewrite it.
61218   # Note: m4 eats our [], so we need to use [ and ] instead.
61219   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61220   if test "x$has_forbidden_chars" != x; then
61221     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61222     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61223   fi
61224 
61225 
61226   windows_path="$new_path"
61227   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61228     unix_path=`$CYGPATH -u "$windows_path"`
61229     new_path="$unix_path"
61230   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61231     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61232     new_path="$unix_path"
61233   fi
61234 
61235   if test "x$path" != "x$new_path"; then
61236     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61237     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61238 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61239   fi
61240 
61241   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61242   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61243 
61244     else
61245       # We're on a unix platform. Hooray! :)
61246       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61247       has_space=`$ECHO "$path" | $GREP " "`
61248       if test "x$has_space" != x; then
61249         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61250 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61251         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61252       fi
61253 
61254       # Use eval to expand a potential ~
61255       eval path="$path"
61256       if test ! -f "$path" && test ! -d "$path"; then
61257         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61258       fi
61259 
61260       if test -d "$path"; then
61261         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61262       else
61263         dir="`$DIRNAME "$path"`"
61264         base="`$BASENAME "$path"`"
61265         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61266       fi
61267     fi
61268   fi
61269 
61270 
61271   # Only process if variable expands to non-empty
61272 
61273   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61274     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61275 
61276   # Input might be given as Windows format, start by converting to
61277   # unix format.
61278   path="$POTENTIAL_FREETYPE_LIB_PATH"
61279   new_path=`$CYGPATH -u "$path"`
61280 
61281   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61282   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61283   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61284   # "foo.exe" is OK but "foo" is an error.
61285   #
61286   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61287   # It is also a way to make sure we got the proper file name for the real test later on.
61288   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61289   if test "x$test_shortpath" = x; then
61290     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61291 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61292     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61293   fi
61294 
61295   # Call helper function which possibly converts this using DOS-style short mode.
61296   # If so, the updated path is stored in $new_path.
61297 
61298   input_path="$new_path"
61299   # Check if we need to convert this using DOS-style short mode. If the path
61300   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61301   # take no chances and rewrite it.
61302   # Note: m4 eats our [], so we need to use [ and ] instead.
61303   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61304   if test "x$has_forbidden_chars" != x; then
61305     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61306     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61307     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61308     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61309       # Going to short mode and back again did indeed matter. Since short mode is
61310       # case insensitive, let's make it lowercase to improve readability.
61311       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61312       # Now convert it back to Unix-style (cygpath)
61313       input_path=`$CYGPATH -u "$shortmode_path"`
61314       new_path="$input_path"
61315     fi
61316   fi
61317 
61318   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61319   if test "x$test_cygdrive_prefix" = x; then
61320     # As a simple fix, exclude /usr/bin since it's not a real path.
61321     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61322       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61323       # a path prefixed by /cygdrive for fixpath to work.
61324       new_path="$CYGWIN_ROOT_PATH$input_path"
61325     fi
61326   fi
61327 
61328 
61329   if test "x$path" != "x$new_path"; then
61330     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61331     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61332 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61333   fi
61334 
61335     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61336 
61337   path="$POTENTIAL_FREETYPE_LIB_PATH"
61338   has_colon=`$ECHO $path | $GREP ^.:`
61339   new_path="$path"
61340   if test "x$has_colon" = x; then
61341     # Not in mixed or Windows style, start by that.
61342     new_path=`cmd //c echo $path`
61343   fi
61344 
61345 
61346   input_path="$new_path"
61347   # Check if we need to convert this using DOS-style short mode. If the path
61348   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61349   # take no chances and rewrite it.
61350   # Note: m4 eats our [], so we need to use [ and ] instead.
61351   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61352   if test "x$has_forbidden_chars" != x; then
61353     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61354     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61355   fi
61356 
61357 
61358   windows_path="$new_path"
61359   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61360     unix_path=`$CYGPATH -u "$windows_path"`
61361     new_path="$unix_path"
61362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61363     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61364     new_path="$unix_path"
61365   fi
61366 
61367   if test "x$path" != "x$new_path"; then
61368     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61369     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61370 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61371   fi
61372 
61373   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61374   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61375 
61376     else
61377       # We're on a unix platform. Hooray! :)
61378       path="$POTENTIAL_FREETYPE_LIB_PATH"
61379       has_space=`$ECHO "$path" | $GREP " "`
61380       if test "x$has_space" != x; then
61381         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61382 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61383         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61384       fi
61385 
61386       # Use eval to expand a potential ~
61387       eval path="$path"
61388       if test ! -f "$path" && test ! -d "$path"; then
61389         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61390       fi
61391 
61392       if test -d "$path"; then
61393         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61394       else
61395         dir="`$DIRNAME "$path"`"
61396         base="`$BASENAME "$path"`"
61397         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61398       fi
61399     fi
61400   fi
61401 
61402 
61403     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61404     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61405 $as_echo_n "checking for freetype includes... " >&6; }
61406     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61407 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61408     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61409     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61410 $as_echo_n "checking for freetype libraries... " >&6; }
61411     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61412 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61413   fi
61414 
61415             else
61416 
61417   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61418   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61419   METHOD="well-known location"
61420 
61421   # Let's start with an optimistic view of the world :-)
61422   FOUND_FREETYPE=yes
61423 
61424   # First look for the canonical freetype main include file ft2build.h.
61425   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61426     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61427     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61428     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61429       # Fail.
61430       FOUND_FREETYPE=no
61431     fi
61432   fi
61433 
61434   if test "x$FOUND_FREETYPE" = xyes; then
61435     # Include file found, let's continue the sanity check.
61436     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61437 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61438 
61439     # Reset to default value
61440     FREETYPE_BASE_NAME=freetype
61441     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61442     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61443       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61444           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61445         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61446         # for the .6 version explicitly.
61447         FREETYPE_BASE_NAME=freetype.6
61448         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61449         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61450 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61451       else
61452         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61453 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61454         FOUND_FREETYPE=no
61455       fi
61456     else
61457       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61458         # On Windows, we will need both .lib and .dll file.
61459         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61460           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61461 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61462           FOUND_FREETYPE=no
61463         fi
61464       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61465           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61466         # Found lib in isa dir, use that instead.
61467         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61468         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61469 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61470       fi
61471     fi
61472   fi
61473 
61474   if test "x$FOUND_FREETYPE" = xyes; then
61475 
61476   # Only process if variable expands to non-empty
61477 
61478   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61479     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61480 
61481   # Input might be given as Windows format, start by converting to
61482   # unix format.
61483   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61484   new_path=`$CYGPATH -u "$path"`
61485 
61486   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61487   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61488   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61489   # "foo.exe" is OK but "foo" is an error.
61490   #
61491   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61492   # It is also a way to make sure we got the proper file name for the real test later on.
61493   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61494   if test "x$test_shortpath" = x; then
61495     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61496 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61497     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61498   fi
61499 
61500   # Call helper function which possibly converts this using DOS-style short mode.
61501   # If so, the updated path is stored in $new_path.
61502 
61503   input_path="$new_path"
61504   # Check if we need to convert this using DOS-style short mode. If the path
61505   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61506   # take no chances and rewrite it.
61507   # Note: m4 eats our [], so we need to use [ and ] instead.
61508   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61509   if test "x$has_forbidden_chars" != x; then
61510     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61511     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61512     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61513     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61514       # Going to short mode and back again did indeed matter. Since short mode is
61515       # case insensitive, let's make it lowercase to improve readability.
61516       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61517       # Now convert it back to Unix-style (cygpath)
61518       input_path=`$CYGPATH -u "$shortmode_path"`
61519       new_path="$input_path"
61520     fi
61521   fi
61522 
61523   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61524   if test "x$test_cygdrive_prefix" = x; then
61525     # As a simple fix, exclude /usr/bin since it's not a real path.
61526     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61527       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61528       # a path prefixed by /cygdrive for fixpath to work.
61529       new_path="$CYGWIN_ROOT_PATH$input_path"
61530     fi
61531   fi
61532 
61533 
61534   if test "x$path" != "x$new_path"; then
61535     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61536     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61537 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61538   fi
61539 
61540     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61541 
61542   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61543   has_colon=`$ECHO $path | $GREP ^.:`
61544   new_path="$path"
61545   if test "x$has_colon" = x; then
61546     # Not in mixed or Windows style, start by that.
61547     new_path=`cmd //c echo $path`
61548   fi
61549 
61550 
61551   input_path="$new_path"
61552   # Check if we need to convert this using DOS-style short mode. If the path
61553   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61554   # take no chances and rewrite it.
61555   # Note: m4 eats our [], so we need to use [ and ] instead.
61556   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61557   if test "x$has_forbidden_chars" != x; then
61558     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61559     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61560   fi
61561 
61562 
61563   windows_path="$new_path"
61564   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61565     unix_path=`$CYGPATH -u "$windows_path"`
61566     new_path="$unix_path"
61567   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61568     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61569     new_path="$unix_path"
61570   fi
61571 
61572   if test "x$path" != "x$new_path"; then
61573     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61574     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61575 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61576   fi
61577 
61578   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61579   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61580 
61581     else
61582       # We're on a unix platform. Hooray! :)
61583       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61584       has_space=`$ECHO "$path" | $GREP " "`
61585       if test "x$has_space" != x; then
61586         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61587 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61588         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61589       fi
61590 
61591       # Use eval to expand a potential ~
61592       eval path="$path"
61593       if test ! -f "$path" && test ! -d "$path"; then
61594         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61595       fi
61596 
61597       if test -d "$path"; then
61598         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61599       else
61600         dir="`$DIRNAME "$path"`"
61601         base="`$BASENAME "$path"`"
61602         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61603       fi
61604     fi
61605   fi
61606 
61607 
61608   # Only process if variable expands to non-empty
61609 
61610   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61611     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61612 
61613   # Input might be given as Windows format, start by converting to
61614   # unix format.
61615   path="$POTENTIAL_FREETYPE_LIB_PATH"
61616   new_path=`$CYGPATH -u "$path"`
61617 
61618   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61619   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61620   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61621   # "foo.exe" is OK but "foo" is an error.
61622   #
61623   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61624   # It is also a way to make sure we got the proper file name for the real test later on.
61625   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61626   if test "x$test_shortpath" = x; then
61627     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61628 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61629     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61630   fi
61631 
61632   # Call helper function which possibly converts this using DOS-style short mode.
61633   # If so, the updated path is stored in $new_path.
61634 
61635   input_path="$new_path"
61636   # Check if we need to convert this using DOS-style short mode. If the path
61637   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61638   # take no chances and rewrite it.
61639   # Note: m4 eats our [], so we need to use [ and ] instead.
61640   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61641   if test "x$has_forbidden_chars" != x; then
61642     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61643     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61644     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61645     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61646       # Going to short mode and back again did indeed matter. Since short mode is
61647       # case insensitive, let's make it lowercase to improve readability.
61648       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61649       # Now convert it back to Unix-style (cygpath)
61650       input_path=`$CYGPATH -u "$shortmode_path"`
61651       new_path="$input_path"
61652     fi
61653   fi
61654 
61655   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61656   if test "x$test_cygdrive_prefix" = x; then
61657     # As a simple fix, exclude /usr/bin since it's not a real path.
61658     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61659       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61660       # a path prefixed by /cygdrive for fixpath to work.
61661       new_path="$CYGWIN_ROOT_PATH$input_path"
61662     fi
61663   fi
61664 
61665 
61666   if test "x$path" != "x$new_path"; then
61667     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61668     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61669 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61670   fi
61671 
61672     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61673 
61674   path="$POTENTIAL_FREETYPE_LIB_PATH"
61675   has_colon=`$ECHO $path | $GREP ^.:`
61676   new_path="$path"
61677   if test "x$has_colon" = x; then
61678     # Not in mixed or Windows style, start by that.
61679     new_path=`cmd //c echo $path`
61680   fi
61681 
61682 
61683   input_path="$new_path"
61684   # Check if we need to convert this using DOS-style short mode. If the path
61685   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61686   # take no chances and rewrite it.
61687   # Note: m4 eats our [], so we need to use [ and ] instead.
61688   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61689   if test "x$has_forbidden_chars" != x; then
61690     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61691     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61692   fi
61693 
61694 
61695   windows_path="$new_path"
61696   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61697     unix_path=`$CYGPATH -u "$windows_path"`
61698     new_path="$unix_path"
61699   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61700     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61701     new_path="$unix_path"
61702   fi
61703 
61704   if test "x$path" != "x$new_path"; then
61705     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61706     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61707 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61708   fi
61709 
61710   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61711   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61712 
61713     else
61714       # We're on a unix platform. Hooray! :)
61715       path="$POTENTIAL_FREETYPE_LIB_PATH"
61716       has_space=`$ECHO "$path" | $GREP " "`
61717       if test "x$has_space" != x; then
61718         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61719 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61720         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61721       fi
61722 
61723       # Use eval to expand a potential ~
61724       eval path="$path"
61725       if test ! -f "$path" && test ! -d "$path"; then
61726         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61727       fi
61728 
61729       if test -d "$path"; then
61730         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61731       else
61732         dir="`$DIRNAME "$path"`"
61733         base="`$BASENAME "$path"`"
61734         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61735       fi
61736     fi
61737   fi
61738 
61739 
61740     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61741     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61742 $as_echo_n "checking for freetype includes... " >&6; }
61743     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61744 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61745     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61746     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61747 $as_echo_n "checking for freetype libraries... " >&6; }
61748     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61749 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61750   fi
61751 
61752               if test "x$FOUND_FREETYPE" != xyes; then
61753 
61754   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61755   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61756   METHOD="well-known location"
61757 
61758   # Let's start with an optimistic view of the world :-)
61759   FOUND_FREETYPE=yes
61760 
61761   # First look for the canonical freetype main include file ft2build.h.
61762   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61763     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61764     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61765     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61766       # Fail.
61767       FOUND_FREETYPE=no
61768     fi
61769   fi
61770 
61771   if test "x$FOUND_FREETYPE" = xyes; then
61772     # Include file found, let's continue the sanity check.
61773     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61774 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61775 
61776     # Reset to default value
61777     FREETYPE_BASE_NAME=freetype
61778     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61779     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61780       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61781           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61782         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61783         # for the .6 version explicitly.
61784         FREETYPE_BASE_NAME=freetype.6
61785         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61786         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61787 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61788       else
61789         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61790 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61791         FOUND_FREETYPE=no
61792       fi
61793     else
61794       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61795         # On Windows, we will need both .lib and .dll file.
61796         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61797           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61798 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61799           FOUND_FREETYPE=no
61800         fi
61801       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61802           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61803         # Found lib in isa dir, use that instead.
61804         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61805         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61806 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61807       fi
61808     fi
61809   fi
61810 
61811   if test "x$FOUND_FREETYPE" = xyes; then
61812 
61813   # Only process if variable expands to non-empty
61814 
61815   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61816     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61817 
61818   # Input might be given as Windows format, start by converting to
61819   # unix format.
61820   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61821   new_path=`$CYGPATH -u "$path"`
61822 
61823   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61824   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61825   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61826   # "foo.exe" is OK but "foo" is an error.
61827   #
61828   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61829   # It is also a way to make sure we got the proper file name for the real test later on.
61830   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61831   if test "x$test_shortpath" = x; then
61832     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61833 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61834     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61835   fi
61836 
61837   # Call helper function which possibly converts this using DOS-style short mode.
61838   # If so, the updated path is stored in $new_path.
61839 
61840   input_path="$new_path"
61841   # Check if we need to convert this using DOS-style short mode. If the path
61842   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61843   # take no chances and rewrite it.
61844   # Note: m4 eats our [], so we need to use [ and ] instead.
61845   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61846   if test "x$has_forbidden_chars" != x; then
61847     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61848     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61849     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61850     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61851       # Going to short mode and back again did indeed matter. Since short mode is
61852       # case insensitive, let's make it lowercase to improve readability.
61853       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61854       # Now convert it back to Unix-style (cygpath)
61855       input_path=`$CYGPATH -u "$shortmode_path"`
61856       new_path="$input_path"
61857     fi
61858   fi
61859 
61860   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61861   if test "x$test_cygdrive_prefix" = x; then
61862     # As a simple fix, exclude /usr/bin since it's not a real path.
61863     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61864       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61865       # a path prefixed by /cygdrive for fixpath to work.
61866       new_path="$CYGWIN_ROOT_PATH$input_path"
61867     fi
61868   fi
61869 
61870 
61871   if test "x$path" != "x$new_path"; then
61872     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61873     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61874 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61875   fi
61876 
61877     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61878 
61879   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61880   has_colon=`$ECHO $path | $GREP ^.:`
61881   new_path="$path"
61882   if test "x$has_colon" = x; then
61883     # Not in mixed or Windows style, start by that.
61884     new_path=`cmd //c echo $path`
61885   fi
61886 
61887 
61888   input_path="$new_path"
61889   # Check if we need to convert this using DOS-style short mode. If the path
61890   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61891   # take no chances and rewrite it.
61892   # Note: m4 eats our [], so we need to use [ and ] instead.
61893   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61894   if test "x$has_forbidden_chars" != x; then
61895     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61896     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61897   fi
61898 
61899 
61900   windows_path="$new_path"
61901   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61902     unix_path=`$CYGPATH -u "$windows_path"`
61903     new_path="$unix_path"
61904   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61905     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61906     new_path="$unix_path"
61907   fi
61908 
61909   if test "x$path" != "x$new_path"; then
61910     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61911     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61912 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61913   fi
61914 
61915   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61916   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61917 
61918     else
61919       # We're on a unix platform. Hooray! :)
61920       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61921       has_space=`$ECHO "$path" | $GREP " "`
61922       if test "x$has_space" != x; then
61923         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61924 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61925         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61926       fi
61927 
61928       # Use eval to expand a potential ~
61929       eval path="$path"
61930       if test ! -f "$path" && test ! -d "$path"; then
61931         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61932       fi
61933 
61934       if test -d "$path"; then
61935         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61936       else
61937         dir="`$DIRNAME "$path"`"
61938         base="`$BASENAME "$path"`"
61939         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61940       fi
61941     fi
61942   fi
61943 
61944 
61945   # Only process if variable expands to non-empty
61946 
61947   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61948     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61949 
61950   # Input might be given as Windows format, start by converting to
61951   # unix format.
61952   path="$POTENTIAL_FREETYPE_LIB_PATH"
61953   new_path=`$CYGPATH -u "$path"`
61954 
61955   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61956   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61957   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61958   # "foo.exe" is OK but "foo" is an error.
61959   #
61960   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61961   # It is also a way to make sure we got the proper file name for the real test later on.
61962   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61963   if test "x$test_shortpath" = x; then
61964     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61965 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61966     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61967   fi
61968 
61969   # Call helper function which possibly converts this using DOS-style short mode.
61970   # If so, the updated path is stored in $new_path.
61971 
61972   input_path="$new_path"
61973   # Check if we need to convert this using DOS-style short mode. If the path
61974   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61975   # take no chances and rewrite it.
61976   # Note: m4 eats our [], so we need to use [ and ] instead.
61977   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61978   if test "x$has_forbidden_chars" != x; then
61979     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61980     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61981     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61982     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61983       # Going to short mode and back again did indeed matter. Since short mode is
61984       # case insensitive, let's make it lowercase to improve readability.
61985       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61986       # Now convert it back to Unix-style (cygpath)
61987       input_path=`$CYGPATH -u "$shortmode_path"`
61988       new_path="$input_path"
61989     fi
61990   fi
61991 
61992   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61993   if test "x$test_cygdrive_prefix" = x; then
61994     # As a simple fix, exclude /usr/bin since it's not a real path.
61995     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61996       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61997       # a path prefixed by /cygdrive for fixpath to work.
61998       new_path="$CYGWIN_ROOT_PATH$input_path"
61999     fi
62000   fi
62001 
62002 
62003   if test "x$path" != "x$new_path"; then
62004     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62005     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62006 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62007   fi
62008 
62009     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62010 
62011   path="$POTENTIAL_FREETYPE_LIB_PATH"
62012   has_colon=`$ECHO $path | $GREP ^.:`
62013   new_path="$path"
62014   if test "x$has_colon" = x; then
62015     # Not in mixed or Windows style, start by that.
62016     new_path=`cmd //c echo $path`
62017   fi
62018 
62019 
62020   input_path="$new_path"
62021   # Check if we need to convert this using DOS-style short mode. If the path
62022   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62023   # take no chances and rewrite it.
62024   # Note: m4 eats our [], so we need to use [ and ] instead.
62025   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62026   if test "x$has_forbidden_chars" != x; then
62027     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62028     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62029   fi
62030 
62031 
62032   windows_path="$new_path"
62033   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62034     unix_path=`$CYGPATH -u "$windows_path"`
62035     new_path="$unix_path"
62036   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62037     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62038     new_path="$unix_path"
62039   fi
62040 
62041   if test "x$path" != "x$new_path"; then
62042     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62043     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62044 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62045   fi
62046 
62047   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62048   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62049 
62050     else
62051       # We're on a unix platform. Hooray! :)
62052       path="$POTENTIAL_FREETYPE_LIB_PATH"
62053       has_space=`$ECHO "$path" | $GREP " "`
62054       if test "x$has_space" != x; then
62055         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62056 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62057         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62058       fi
62059 
62060       # Use eval to expand a potential ~
62061       eval path="$path"
62062       if test ! -f "$path" && test ! -d "$path"; then
62063         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62064       fi
62065 
62066       if test -d "$path"; then
62067         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62068       else
62069         dir="`$DIRNAME "$path"`"
62070         base="`$BASENAME "$path"`"
62071         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62072       fi
62073     fi
62074   fi
62075 
62076 
62077     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62078     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62079 $as_echo_n "checking for freetype includes... " >&6; }
62080     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62081 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62082     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62083     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62084 $as_echo_n "checking for freetype libraries... " >&6; }
62085     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62086 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62087   fi
62088 
62089               fi
62090             fi
62091           fi
62092         fi
62093       fi # end check in well-known locations
62094 
62095       if test "x$FOUND_FREETYPE" != xyes; then
62096 
62097   # Print a helpful message on how to acquire the necessary build dependency.
62098   # freetype is the help tag: freetype, cups, alsa etc
62099   MISSING_DEPENDENCY=freetype
62100 
62101   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62102     cygwin_help $MISSING_DEPENDENCY
62103   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62104     msys_help $MISSING_DEPENDENCY
62105   else
62106     PKGHANDLER_COMMAND=
62107 
62108     case $PKGHANDLER in
62109       apt-get)
62110         apt_help     $MISSING_DEPENDENCY ;;
62111       yum)
62112         yum_help     $MISSING_DEPENDENCY ;;
62113       port)
62114         port_help    $MISSING_DEPENDENCY ;;
62115       pkgutil)
62116         pkgutil_help $MISSING_DEPENDENCY ;;
62117       pkgadd)
62118         pkgadd_help  $MISSING_DEPENDENCY ;;
62119     esac
62120 
62121     if test "x$PKGHANDLER_COMMAND" != x; then
62122       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62123     fi
62124   fi
62125 
62126         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62127       fi
62128     fi # end user specified settings
62129 
62130     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62131     if test "x$FREETYPE_CFLAGS" = x; then
62132 
62133   # Only process if variable expands to non-empty
62134 
62135   if test "x$FREETYPE_INCLUDE_PATH" != x; then
62136     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62137 
62138   # Input might be given as Windows format, start by converting to
62139   # unix format.
62140   path="$FREETYPE_INCLUDE_PATH"
62141   new_path=`$CYGPATH -u "$path"`
62142 
62143   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62144   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62145   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62146   # "foo.exe" is OK but "foo" is an error.
62147   #
62148   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62149   # It is also a way to make sure we got the proper file name for the real test later on.
62150   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62151   if test "x$test_shortpath" = x; then
62152     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62153 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62154     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62155   fi
62156 
62157   # Call helper function which possibly converts this using DOS-style short mode.
62158   # If so, the updated path is stored in $new_path.
62159 
62160   input_path="$new_path"
62161   # Check if we need to convert this using DOS-style short mode. If the path
62162   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62163   # take no chances and rewrite it.
62164   # Note: m4 eats our [], so we need to use [ and ] instead.
62165   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62166   if test "x$has_forbidden_chars" != x; then
62167     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62168     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62169     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62170     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62171       # Going to short mode and back again did indeed matter. Since short mode is
62172       # case insensitive, let's make it lowercase to improve readability.
62173       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62174       # Now convert it back to Unix-style (cygpath)
62175       input_path=`$CYGPATH -u "$shortmode_path"`
62176       new_path="$input_path"
62177     fi
62178   fi
62179 
62180   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62181   if test "x$test_cygdrive_prefix" = x; then
62182     # As a simple fix, exclude /usr/bin since it's not a real path.
62183     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62184       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62185       # a path prefixed by /cygdrive for fixpath to work.
62186       new_path="$CYGWIN_ROOT_PATH$input_path"
62187     fi
62188   fi
62189 
62190 
62191   if test "x$path" != "x$new_path"; then
62192     FREETYPE_INCLUDE_PATH="$new_path"
62193     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62194 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62195   fi
62196 
62197     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62198 
62199   path="$FREETYPE_INCLUDE_PATH"
62200   has_colon=`$ECHO $path | $GREP ^.:`
62201   new_path="$path"
62202   if test "x$has_colon" = x; then
62203     # Not in mixed or Windows style, start by that.
62204     new_path=`cmd //c echo $path`
62205   fi
62206 
62207 
62208   input_path="$new_path"
62209   # Check if we need to convert this using DOS-style short mode. If the path
62210   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62211   # take no chances and rewrite it.
62212   # Note: m4 eats our [], so we need to use [ and ] instead.
62213   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62214   if test "x$has_forbidden_chars" != x; then
62215     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62216     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62217   fi
62218 
62219 
62220   windows_path="$new_path"
62221   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62222     unix_path=`$CYGPATH -u "$windows_path"`
62223     new_path="$unix_path"
62224   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62225     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62226     new_path="$unix_path"
62227   fi
62228 
62229   if test "x$path" != "x$new_path"; then
62230     FREETYPE_INCLUDE_PATH="$new_path"
62231     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62232 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62233   fi
62234 
62235   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62236   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62237 
62238     else
62239       # We're on a unix platform. Hooray! :)
62240       path="$FREETYPE_INCLUDE_PATH"
62241       has_space=`$ECHO "$path" | $GREP " "`
62242       if test "x$has_space" != x; then
62243         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62244 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62245         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62246       fi
62247 
62248       # Use eval to expand a potential ~
62249       eval path="$path"
62250       if test ! -f "$path" && test ! -d "$path"; then
62251         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62252       fi
62253 
62254       if test -d "$path"; then
62255         FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62256       else
62257         dir="`$DIRNAME "$path"`"
62258         base="`$BASENAME "$path"`"
62259         FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62260       fi
62261     fi
62262   fi
62263 
62264       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62265         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62266       else
62267         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62268       fi
62269     fi
62270 
62271     if test "x$FREETYPE_LIBS" = x; then
62272 
62273   # Only process if variable expands to non-empty
62274 
62275   if test "x$FREETYPE_LIB_PATH" != x; then
62276     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62277 
62278   # Input might be given as Windows format, start by converting to
62279   # unix format.
62280   path="$FREETYPE_LIB_PATH"
62281   new_path=`$CYGPATH -u "$path"`
62282 
62283   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62284   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62285   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62286   # "foo.exe" is OK but "foo" is an error.
62287   #
62288   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62289   # It is also a way to make sure we got the proper file name for the real test later on.
62290   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62291   if test "x$test_shortpath" = x; then
62292     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62293 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62294     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62295   fi
62296 
62297   # Call helper function which possibly converts this using DOS-style short mode.
62298   # If so, the updated path is stored in $new_path.
62299 
62300   input_path="$new_path"
62301   # Check if we need to convert this using DOS-style short mode. If the path
62302   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62303   # take no chances and rewrite it.
62304   # Note: m4 eats our [], so we need to use [ and ] instead.
62305   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62306   if test "x$has_forbidden_chars" != x; then
62307     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62308     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62309     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62310     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62311       # Going to short mode and back again did indeed matter. Since short mode is
62312       # case insensitive, let's make it lowercase to improve readability.
62313       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62314       # Now convert it back to Unix-style (cygpath)
62315       input_path=`$CYGPATH -u "$shortmode_path"`
62316       new_path="$input_path"
62317     fi
62318   fi
62319 
62320   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62321   if test "x$test_cygdrive_prefix" = x; then
62322     # As a simple fix, exclude /usr/bin since it's not a real path.
62323     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62324       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62325       # a path prefixed by /cygdrive for fixpath to work.
62326       new_path="$CYGWIN_ROOT_PATH$input_path"
62327     fi
62328   fi
62329 
62330 
62331   if test "x$path" != "x$new_path"; then
62332     FREETYPE_LIB_PATH="$new_path"
62333     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62334 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62335   fi
62336 
62337     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62338 
62339   path="$FREETYPE_LIB_PATH"
62340   has_colon=`$ECHO $path | $GREP ^.:`
62341   new_path="$path"
62342   if test "x$has_colon" = x; then
62343     # Not in mixed or Windows style, start by that.
62344     new_path=`cmd //c echo $path`
62345   fi
62346 
62347 
62348   input_path="$new_path"
62349   # Check if we need to convert this using DOS-style short mode. If the path
62350   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62351   # take no chances and rewrite it.
62352   # Note: m4 eats our [], so we need to use [ and ] instead.
62353   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62354   if test "x$has_forbidden_chars" != x; then
62355     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62356     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62357   fi
62358 
62359 
62360   windows_path="$new_path"
62361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62362     unix_path=`$CYGPATH -u "$windows_path"`
62363     new_path="$unix_path"
62364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62365     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62366     new_path="$unix_path"
62367   fi
62368 
62369   if test "x$path" != "x$new_path"; then
62370     FREETYPE_LIB_PATH="$new_path"
62371     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62372 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62373   fi
62374 
62375   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62376   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62377 
62378     else
62379       # We're on a unix platform. Hooray! :)
62380       path="$FREETYPE_LIB_PATH"
62381       has_space=`$ECHO "$path" | $GREP " "`
62382       if test "x$has_space" != x; then
62383         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62384 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62385         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62386       fi
62387 
62388       # Use eval to expand a potential ~
62389       eval path="$path"
62390       if test ! -f "$path" && test ! -d "$path"; then
62391         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62392       fi
62393 
62394       if test -d "$path"; then
62395         FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62396       else
62397         dir="`$DIRNAME "$path"`"
62398         base="`$BASENAME "$path"`"
62399         FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62400       fi
62401     fi
62402   fi
62403 
62404       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62405         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62406       else
62407         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62408       fi
62409     fi
62410 
62411     # Try to compile it
62412     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62413 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
62414     ac_ext=cpp
62415 ac_cpp='$CXXCPP $CPPFLAGS'
62416 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62417 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62418 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62419 
62420     PREV_CXXCFLAGS="$CXXFLAGS"
62421     PREV_LIBS="$LIBS"
62422     PREV_CXX="$CXX"
62423     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62424     LIBS="$LIBS $FREETYPE_LIBS"
62425     CXX="$FIXPATH $CXX"
62426     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62427 /* end confdefs.h.  */
62428 
62429           #include<ft2build.h>
62430           #include FT_FREETYPE_H
62431           int main () {
62432             FT_Init_FreeType(NULL);
62433             return 0;
62434           }
62435 
62436 _ACEOF
62437 if ac_fn_cxx_try_link "$LINENO"; then :
62438 
62439           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62440 $as_echo "yes" >&6; }
62441 
62442 else
62443 
62444           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62445 $as_echo "no" >&6; }
62446           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62447 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62448           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62449 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62450 
62451 
62452   # Print a helpful message on how to acquire the necessary build dependency.
62453   # freetype is the help tag: freetype, cups, alsa etc
62454   MISSING_DEPENDENCY=freetype
62455 
62456   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62457     cygwin_help $MISSING_DEPENDENCY
62458   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62459     msys_help $MISSING_DEPENDENCY
62460   else
62461     PKGHANDLER_COMMAND=
62462 
62463     case $PKGHANDLER in
62464       apt-get)
62465         apt_help     $MISSING_DEPENDENCY ;;
62466       yum)
62467         yum_help     $MISSING_DEPENDENCY ;;
62468       port)
62469         port_help    $MISSING_DEPENDENCY ;;
62470       pkgutil)
62471         pkgutil_help $MISSING_DEPENDENCY ;;
62472       pkgadd)
62473         pkgadd_help  $MISSING_DEPENDENCY ;;
62474     esac
62475 
62476     if test "x$PKGHANDLER_COMMAND" != x; then
62477       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62478     fi
62479   fi
62480 
62481 
62482           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62483 
62484 
62485 fi
62486 rm -f core conftest.err conftest.$ac_objext \
62487     conftest$ac_exeext conftest.$ac_ext
62488     CXXCFLAGS="$PREV_CXXFLAGS"
62489     LIBS="$PREV_LIBS"
62490     CXX="$PREV_CXX"
62491     ac_ext=cpp
62492 ac_cpp='$CXXCPP $CPPFLAGS'
62493 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62494 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62495 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62496 
62497 
62498     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62499 $as_echo_n "checking if we should bundle freetype... " >&6; }
62500     if test "x$BUNDLE_FREETYPE" = xyes; then
62501       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62502     fi
62503     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62504 $as_echo "$BUNDLE_FREETYPE" >&6; }
62505 
62506   fi # end freetype needed
62507 
62508 
62509 
62510 
62511 
62512 
62513 
62514 # Check whether --with-alsa was given.
62515 if test "${with_alsa+set}" = set; then :
62516   withval=$with_alsa;
62517 fi
62518 
62519 
62520 # Check whether --with-alsa-include was given.
62521 if test "${with_alsa_include+set}" = set; then :
62522   withval=$with_alsa_include;
62523 fi
62524 
62525 
62526 # Check whether --with-alsa-lib was given.
62527 if test "${with_alsa_lib+set}" = set; then :
62528   withval=$with_alsa_lib;
62529 fi
62530 
62531 
62532   if test "x$NEEDS_LIB_ALSA" = xfalse; then
62533     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62534         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62535         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62536       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62537 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62538     fi
62539     ALSA_CFLAGS=
62540     ALSA_LIBS=
62541   else
62542     ALSA_FOUND=no
62543 
62544     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62545       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62546     fi
62547 
62548     if test "x${with_alsa}" != x; then
62549       ALSA_LIBS="-L${with_alsa}/lib -lasound"
62550       ALSA_CFLAGS="-I${with_alsa}/include"
62551       ALSA_FOUND=yes
62552     fi
62553     if test "x${with_alsa_include}" != x; then
62554       ALSA_CFLAGS="-I${with_alsa_include}"
62555       ALSA_FOUND=yes
62556     fi
62557     if test "x${with_alsa_lib}" != x; then
62558       ALSA_LIBS="-L${with_alsa_lib} -lasound"
62559       ALSA_FOUND=yes
62560     fi
62561     # Do not try pkg-config if we have a sysroot set.
62562     if test "x$SYSROOT" = x; then
62563       if test "x$ALSA_FOUND" = xno; then
62564 
62565 pkg_failed=no
62566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62567 $as_echo_n "checking for ALSA... " >&6; }
62568 
62569 if test -n "$ALSA_CFLAGS"; then
62570     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62571  elif test -n "$PKG_CONFIG"; then
62572     if test -n "$PKG_CONFIG" && \
62573     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62574   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62575   ac_status=$?
62576   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62577   test $ac_status = 0; }; then
62578   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62579 else
62580   pkg_failed=yes
62581 fi
62582  else
62583     pkg_failed=untried
62584 fi
62585 if test -n "$ALSA_LIBS"; then
62586     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62587  elif test -n "$PKG_CONFIG"; then
62588     if test -n "$PKG_CONFIG" && \
62589     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62590   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62591   ac_status=$?
62592   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62593   test $ac_status = 0; }; then
62594   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62595 else
62596   pkg_failed=yes
62597 fi
62598  else
62599     pkg_failed=untried
62600 fi
62601 
62602 
62603 
62604 if test $pkg_failed = yes; then
62605 
62606 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62607         _pkg_short_errors_supported=yes
62608 else
62609         _pkg_short_errors_supported=no
62610 fi
62611         if test $_pkg_short_errors_supported = yes; then
62612                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62613         else
62614                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62615         fi
62616         # Put the nasty error message in config.log where it belongs
62617         echo "$ALSA_PKG_ERRORS" >&5
62618 
62619         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62620 $as_echo "no" >&6; }
62621                 ALSA_FOUND=no
62622 elif test $pkg_failed = untried; then
62623         ALSA_FOUND=no
62624 else
62625         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62626         ALSA_LIBS=$pkg_cv_ALSA_LIBS
62627         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62628 $as_echo "yes" >&6; }
62629         ALSA_FOUND=yes
62630 fi
62631       fi
62632     fi
62633     if test "x$ALSA_FOUND" = xno; then
62634       for ac_header in alsa/asoundlib.h
62635 do :
62636   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62637 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62638   cat >>confdefs.h <<_ACEOF
62639 #define HAVE_ALSA_ASOUNDLIB_H 1
62640 _ACEOF
62641 
62642             ALSA_FOUND=yes
62643             ALSA_CFLAGS=-Iignoreme
62644             ALSA_LIBS=-lasound
62645             DEFAULT_ALSA=yes
62646 
62647 else
62648   ALSA_FOUND=no
62649 
62650 fi
62651 
62652 done
62653 
62654     fi
62655     if test "x$ALSA_FOUND" = xno; then
62656 
62657   # Print a helpful message on how to acquire the necessary build dependency.
62658   # alsa is the help tag: freetype, cups, alsa etc
62659   MISSING_DEPENDENCY=alsa
62660 
62661   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62662     cygwin_help $MISSING_DEPENDENCY
62663   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62664     msys_help $MISSING_DEPENDENCY
62665   else
62666     PKGHANDLER_COMMAND=
62667 
62668     case $PKGHANDLER in
62669       apt-get)
62670         apt_help     $MISSING_DEPENDENCY ;;
62671       yum)
62672         yum_help     $MISSING_DEPENDENCY ;;
62673       port)
62674         port_help    $MISSING_DEPENDENCY ;;
62675       pkgutil)
62676         pkgutil_help $MISSING_DEPENDENCY ;;
62677       pkgadd)
62678         pkgadd_help  $MISSING_DEPENDENCY ;;
62679     esac
62680 
62681     if test "x$PKGHANDLER_COMMAND" != x; then
62682       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62683     fi
62684   fi
62685 
62686       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62687     fi
62688   fi
62689 
62690 
62691 
62692 
62693 
62694 
62695 # Check whether --with-libffi was given.
62696 if test "${with_libffi+set}" = set; then :
62697   withval=$with_libffi;
62698 fi
62699 
62700 
62701 # Check whether --with-libffi-include was given.
62702 if test "${with_libffi_include+set}" = set; then :
62703   withval=$with_libffi_include;
62704 fi
62705 
62706 
62707 # Check whether --with-libffi-lib was given.
62708 if test "${with_libffi_lib+set}" = set; then :
62709   withval=$with_libffi_lib;
62710 fi
62711 
62712 
62713   if test "x$NEEDS_LIB_FFI" = xfalse; then
62714     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62715         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62716         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62717       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62718 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62719     fi
62720     LIBFFI_CFLAGS=
62721     LIBFFI_LIBS=
62722   else
62723     LIBFFI_FOUND=no
62724 
62725     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62726       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62727     fi
62728 
62729     if test "x${with_libffi}" != x; then
62730       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62731       LIBFFI_CFLAGS="-I${with_libffi}/include"
62732       LIBFFI_FOUND=yes
62733     fi
62734     if test "x${with_libffi_include}" != x; then
62735       LIBFFI_CFLAGS="-I${with_libffi_include}"
62736       LIBFFI_FOUND=yes
62737     fi
62738     if test "x${with_libffi_lib}" != x; then
62739       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62740       LIBFFI_FOUND=yes
62741     fi
62742     # Do not try pkg-config if we have a sysroot set.
62743     if test "x$SYSROOT" = x; then
62744       if test "x$LIBFFI_FOUND" = xno; then
62745         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62746 
62747 pkg_failed=no
62748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62749 $as_echo_n "checking for LIBFFI... " >&6; }
62750 
62751 if test -n "$LIBFFI_CFLAGS"; then
62752     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62753  elif test -n "$PKG_CONFIG"; then
62754     if test -n "$PKG_CONFIG" && \
62755     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62756   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62757   ac_status=$?
62758   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62759   test $ac_status = 0; }; then
62760   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62761 else
62762   pkg_failed=yes
62763 fi
62764  else
62765     pkg_failed=untried
62766 fi
62767 if test -n "$LIBFFI_LIBS"; then
62768     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62769  elif test -n "$PKG_CONFIG"; then
62770     if test -n "$PKG_CONFIG" && \
62771     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62772   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62773   ac_status=$?
62774   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62775   test $ac_status = 0; }; then
62776   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62777 else
62778   pkg_failed=yes
62779 fi
62780  else
62781     pkg_failed=untried
62782 fi
62783 
62784 
62785 
62786 if test $pkg_failed = yes; then
62787 
62788 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62789         _pkg_short_errors_supported=yes
62790 else
62791         _pkg_short_errors_supported=no
62792 fi
62793         if test $_pkg_short_errors_supported = yes; then
62794                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62795         else
62796                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62797         fi
62798         # Put the nasty error message in config.log where it belongs
62799         echo "$LIBFFI_PKG_ERRORS" >&5
62800 
62801         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62802 $as_echo "no" >&6; }
62803                 LIBFFI_FOUND=no
62804 elif test $pkg_failed = untried; then
62805         LIBFFI_FOUND=no
62806 else
62807         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62808         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62809         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62810 $as_echo "yes" >&6; }
62811         LIBFFI_FOUND=yes
62812 fi
62813       fi
62814     fi
62815     if test "x$LIBFFI_FOUND" = xno; then
62816       for ac_header in ffi.h
62817 do :
62818   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62819 if test "x$ac_cv_header_ffi_h" = xyes; then :
62820   cat >>confdefs.h <<_ACEOF
62821 #define HAVE_FFI_H 1
62822 _ACEOF
62823 
62824             LIBFFI_FOUND=yes
62825             LIBFFI_CFLAGS=
62826             LIBFFI_LIBS=-lffi
62827 
62828 else
62829   LIBFFI_FOUND=no
62830 
62831 fi
62832 
62833 done
62834 
62835     fi
62836     if test "x$LIBFFI_FOUND" = xno; then
62837 
62838   # Print a helpful message on how to acquire the necessary build dependency.
62839   # ffi is the help tag: freetype, cups, alsa etc
62840   MISSING_DEPENDENCY=ffi
62841 
62842   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62843     cygwin_help $MISSING_DEPENDENCY
62844   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62845     msys_help $MISSING_DEPENDENCY
62846   else
62847     PKGHANDLER_COMMAND=
62848 
62849     case $PKGHANDLER in
62850       apt-get)
62851         apt_help     $MISSING_DEPENDENCY ;;
62852       yum)
62853         yum_help     $MISSING_DEPENDENCY ;;
62854       port)
62855         port_help    $MISSING_DEPENDENCY ;;
62856       pkgutil)
62857         pkgutil_help $MISSING_DEPENDENCY ;;
62858       pkgadd)
62859         pkgadd_help  $MISSING_DEPENDENCY ;;
62860     esac
62861 
62862     if test "x$PKGHANDLER_COMMAND" != x; then
62863       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62864     fi
62865   fi
62866 
62867       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62868     fi
62869 
62870     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62871 $as_echo_n "checking if libffi works... " >&6; }
62872     ac_ext=c
62873 ac_cpp='$CPP $CPPFLAGS'
62874 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62875 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62876 ac_compiler_gnu=$ac_cv_c_compiler_gnu
62877 
62878     OLD_CFLAGS="$CFLAGS"
62879     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62880     OLD_LIBS="$LIBS"
62881     LIBS="$LIBS $LIBFFI_LIBS"
62882     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62883 /* end confdefs.h.  */
62884 #include <ffi.h>
62885 int
62886 main ()
62887 {
62888 
62889           ffi_call(NULL, NULL, NULL, NULL);
62890           return 0;
62891 
62892   ;
62893   return 0;
62894 }
62895 _ACEOF
62896 if ac_fn_c_try_link "$LINENO"; then :
62897   LIBFFI_WORKS=yes
62898 else
62899   LIBFFI_WORKS=no
62900 
62901 fi
62902 rm -f core conftest.err conftest.$ac_objext \
62903     conftest$ac_exeext conftest.$ac_ext
62904     CFLAGS="$OLD_CFLAGS"
62905     LIBS="$OLD_LIBS"
62906     ac_ext=cpp
62907 ac_cpp='$CXXCPP $CPPFLAGS'
62908 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62909 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62910 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62911 
62912     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62913 $as_echo "$LIBFFI_WORKS" >&6; }
62914 
62915     if test "x$LIBFFI_WORKS" = xno; then
62916 
62917   # Print a helpful message on how to acquire the necessary build dependency.
62918   # ffi is the help tag: freetype, cups, alsa etc
62919   MISSING_DEPENDENCY=ffi
62920 
62921   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62922     cygwin_help $MISSING_DEPENDENCY
62923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62924     msys_help $MISSING_DEPENDENCY
62925   else
62926     PKGHANDLER_COMMAND=
62927 
62928     case $PKGHANDLER in
62929       apt-get)
62930         apt_help     $MISSING_DEPENDENCY ;;
62931       yum)
62932         yum_help     $MISSING_DEPENDENCY ;;
62933       port)
62934         port_help    $MISSING_DEPENDENCY ;;
62935       pkgutil)
62936         pkgutil_help $MISSING_DEPENDENCY ;;
62937       pkgadd)
62938         pkgadd_help  $MISSING_DEPENDENCY ;;
62939     esac
62940 
62941     if test "x$PKGHANDLER_COMMAND" != x; then
62942       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62943     fi
62944   fi
62945 
62946       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62947     fi
62948   fi
62949 
62950 
62951 
62952 
62953 
62954   if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62955     # Extract the first word of "llvm-config", so it can be a program name with args.
62956 set dummy llvm-config; ac_word=$2
62957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62958 $as_echo_n "checking for $ac_word... " >&6; }
62959 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
62960   $as_echo_n "(cached) " >&6
62961 else
62962   if test -n "$LLVM_CONFIG"; then
62963   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
62964 else
62965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62966 for as_dir in $PATH
62967 do
62968   IFS=$as_save_IFS
62969   test -z "$as_dir" && as_dir=.
62970     for ac_exec_ext in '' $ac_executable_extensions; do
62971   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62972     ac_cv_prog_LLVM_CONFIG="llvm-config"
62973     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62974     break 2
62975   fi
62976 done
62977   done
62978 IFS=$as_save_IFS
62979 
62980 fi
62981 fi
62982 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
62983 if test -n "$LLVM_CONFIG"; then
62984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
62985 $as_echo "$LLVM_CONFIG" >&6; }
62986 else
62987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62988 $as_echo "no" >&6; }
62989 fi
62990 
62991 
62992 
62993     if test "x$LLVM_CONFIG" != xllvm-config; then
62994       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
62995     fi
62996 
62997     llvm_components="jit mcjit engine nativecodegen native"
62998     unset LLVM_CFLAGS
62999     for flag in $("$LLVM_CONFIG" --cxxflags); do
63000       if echo "${flag}" | grep -q '^-[ID]'; then
63001         if test "${flag}" != "-D_DEBUG" ; then
63002           if test "${LLVM_CFLAGS}" != "" ; then
63003             LLVM_CFLAGS="${LLVM_CFLAGS} "
63004           fi
63005           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63006         fi
63007       fi
63008     done
63009     llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63010     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63011 
63012     unset LLVM_LDFLAGS
63013     for flag in $("${LLVM_CONFIG}" --ldflags); do
63014       if echo "${flag}" | grep -q '^-L'; then
63015         if test "${LLVM_LDFLAGS}" != ""; then
63016           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63017         fi
63018         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63019       fi
63020     done
63021 
63022     unset LLVM_LIBS
63023     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63024       if echo "${flag}" | grep -q '^-l'; then
63025         if test "${LLVM_LIBS}" != ""; then
63026           LLVM_LIBS="${LLVM_LIBS} "
63027         fi
63028         LLVM_LIBS="${LLVM_LIBS}${flag}"
63029       fi
63030     done
63031 
63032     # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63033     # always properly detect -ltinfo
63034     LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63035 
63036 
63037 
63038 
63039   fi
63040 
63041 
63042 
63043 # Check whether --with-libjpeg was given.
63044 if test "${with_libjpeg+set}" = set; then :
63045   withval=$with_libjpeg;
63046 fi
63047 
63048 
63049   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63050 $as_echo_n "checking for which libjpeg to use... " >&6; }
63051   # default is bundled
63052   DEFAULT_LIBJPEG=bundled
63053   # if user didn't specify, use DEFAULT_LIBJPEG
63054   if test "x${with_libjpeg}" = "x"; then
63055     with_libjpeg=${DEFAULT_LIBJPEG}
63056   fi
63057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63058 $as_echo "${with_libjpeg}" >&6; }
63059 
63060   if test "x${with_libjpeg}" = "xbundled"; then
63061     USE_EXTERNAL_LIBJPEG=false
63062   elif test "x${with_libjpeg}" = "xsystem"; then
63063     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63064 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63065 
63066 else
63067    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63068 fi
63069 
63070 
63071     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63072 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63073 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63074   $as_echo_n "(cached) " >&6
63075 else
63076   ac_check_lib_save_LIBS=$LIBS
63077 LIBS="-ljpeg  $LIBS"
63078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63079 /* end confdefs.h.  */
63080 
63081 /* Override any GCC internal prototype to avoid an error.
63082    Use char because int might match the return type of a GCC
63083    builtin and then its argument prototype would still apply.  */
63084 #ifdef __cplusplus
63085 extern "C"
63086 #endif
63087 char jpeg_CreateDecompress ();
63088 int
63089 main ()
63090 {
63091 return jpeg_CreateDecompress ();
63092   ;
63093   return 0;
63094 }
63095 _ACEOF
63096 if ac_fn_cxx_try_link "$LINENO"; then :
63097   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63098 else
63099   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63100 fi
63101 rm -f core conftest.err conftest.$ac_objext \
63102     conftest$ac_exeext conftest.$ac_ext
63103 LIBS=$ac_check_lib_save_LIBS
63104 fi
63105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63106 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63107 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63108   cat >>confdefs.h <<_ACEOF
63109 #define HAVE_LIBJPEG 1
63110 _ACEOF
63111 
63112   LIBS="-ljpeg $LIBS"
63113 
63114 else
63115    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63116 fi
63117 
63118 
63119     USE_EXTERNAL_LIBJPEG=true
63120   else
63121     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63122   fi
63123 
63124 
63125 
63126 
63127 
63128 # Check whether --with-giflib was given.
63129 if test "${with_giflib+set}" = set; then :
63130   withval=$with_giflib;
63131 fi
63132 
63133 
63134   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63135 $as_echo_n "checking for which giflib to use... " >&6; }
63136   # default is bundled
63137   DEFAULT_GIFLIB=bundled
63138   # if user didn't specify, use DEFAULT_GIFLIB
63139   if test "x${with_giflib}" = "x"; then
63140     with_giflib=${DEFAULT_GIFLIB}
63141   fi
63142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63143 $as_echo "${with_giflib}" >&6; }
63144 
63145   if test "x${with_giflib}" = "xbundled"; then
63146     USE_EXTERNAL_LIBGIF=false
63147   elif test "x${with_giflib}" = "xsystem"; then
63148     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63149 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63150 
63151 else
63152    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63153 fi
63154 
63155 
63156     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63157 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63158 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63159   $as_echo_n "(cached) " >&6
63160 else
63161   ac_check_lib_save_LIBS=$LIBS
63162 LIBS="-lgif  $LIBS"
63163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63164 /* end confdefs.h.  */
63165 
63166 /* Override any GCC internal prototype to avoid an error.
63167    Use char because int might match the return type of a GCC
63168    builtin and then its argument prototype would still apply.  */
63169 #ifdef __cplusplus
63170 extern "C"
63171 #endif
63172 char DGifGetCode ();
63173 int
63174 main ()
63175 {
63176 return DGifGetCode ();
63177   ;
63178   return 0;
63179 }
63180 _ACEOF
63181 if ac_fn_cxx_try_link "$LINENO"; then :
63182   ac_cv_lib_gif_DGifGetCode=yes
63183 else
63184   ac_cv_lib_gif_DGifGetCode=no
63185 fi
63186 rm -f core conftest.err conftest.$ac_objext \
63187     conftest$ac_exeext conftest.$ac_ext
63188 LIBS=$ac_check_lib_save_LIBS
63189 fi
63190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63191 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63192 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63193   cat >>confdefs.h <<_ACEOF
63194 #define HAVE_LIBGIF 1
63195 _ACEOF
63196 
63197   LIBS="-lgif $LIBS"
63198 
63199 else
63200    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63201 fi
63202 
63203 
63204     USE_EXTERNAL_LIBGIF=true
63205   else
63206     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63207   fi
63208 
63209 
63210 
63211 
63212 
63213 # Check whether --with-libpng was given.
63214 if test "${with_libpng+set}" = set; then :
63215   withval=$with_libpng;
63216 fi
63217 
63218 
63219   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63220 $as_echo_n "checking for which libpng to use... " >&6; }
63221 
63222   # default is bundled
63223   DEFAULT_LIBPNG=bundled
63224   # if user didn't specify, use DEFAULT_LIBPNG
63225   if test "x${with_libpng}" = "x"; then
63226       with_libpng=${DEFAULT_LIBPNG}
63227   fi
63228 
63229   if test "x${with_libpng}" = "xbundled"; then
63230       USE_EXTERNAL_LIBPNG=false
63231       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63232 $as_echo "bundled" >&6; }
63233   elif test "x${with_libpng}" = "xsystem"; then
63234 
63235 pkg_failed=no
63236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63237 $as_echo_n "checking for PNG... " >&6; }
63238 
63239 if test -n "$PNG_CFLAGS"; then
63240     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63241  elif test -n "$PKG_CONFIG"; then
63242     if test -n "$PKG_CONFIG" && \
63243     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63244   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63245   ac_status=$?
63246   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63247   test $ac_status = 0; }; then
63248   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63249 else
63250   pkg_failed=yes
63251 fi
63252  else
63253     pkg_failed=untried
63254 fi
63255 if test -n "$PNG_LIBS"; then
63256     pkg_cv_PNG_LIBS="$PNG_LIBS"
63257  elif test -n "$PKG_CONFIG"; then
63258     if test -n "$PKG_CONFIG" && \
63259     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63260   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63261   ac_status=$?
63262   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63263   test $ac_status = 0; }; then
63264   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63265 else
63266   pkg_failed=yes
63267 fi
63268  else
63269     pkg_failed=untried
63270 fi
63271 
63272 
63273 
63274 if test $pkg_failed = yes; then
63275 
63276 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63277         _pkg_short_errors_supported=yes
63278 else
63279         _pkg_short_errors_supported=no
63280 fi
63281         if test $_pkg_short_errors_supported = yes; then
63282                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63283         else
63284                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63285         fi
63286         # Put the nasty error message in config.log where it belongs
63287         echo "$PNG_PKG_ERRORS" >&5
63288 
63289         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63290 $as_echo "no" >&6; }
63291                  LIBPNG_FOUND=no
63292 elif test $pkg_failed = untried; then
63293          LIBPNG_FOUND=no
63294 else
63295         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63296         PNG_LIBS=$pkg_cv_PNG_LIBS
63297         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63298 $as_echo "yes" >&6; }
63299          LIBPNG_FOUND=yes
63300 fi
63301       if test "x${LIBPNG_FOUND}" = "xyes"; then
63302           USE_EXTERNAL_LIBPNG=true
63303           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63304 $as_echo "system" >&6; }
63305       else
63306           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63307 $as_echo "system not found" >&6; }
63308           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63309       fi
63310   else
63311       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63312   fi
63313 
63314 
63315 
63316 
63317 
63318 # Check whether --with-zlib was given.
63319 if test "${with_zlib+set}" = set; then :
63320   withval=$with_zlib;
63321 fi
63322 
63323 
63324   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63325 $as_echo_n "checking for compress in -lz... " >&6; }
63326 if ${ac_cv_lib_z_compress+:} false; then :
63327   $as_echo_n "(cached) " >&6
63328 else
63329   ac_check_lib_save_LIBS=$LIBS
63330 LIBS="-lz  $LIBS"
63331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63332 /* end confdefs.h.  */
63333 
63334 /* Override any GCC internal prototype to avoid an error.
63335    Use char because int might match the return type of a GCC
63336    builtin and then its argument prototype would still apply.  */
63337 #ifdef __cplusplus
63338 extern "C"
63339 #endif
63340 char compress ();
63341 int
63342 main ()
63343 {
63344 return compress ();
63345   ;
63346   return 0;
63347 }
63348 _ACEOF
63349 if ac_fn_cxx_try_link "$LINENO"; then :
63350   ac_cv_lib_z_compress=yes
63351 else
63352   ac_cv_lib_z_compress=no
63353 fi
63354 rm -f core conftest.err conftest.$ac_objext \
63355     conftest$ac_exeext conftest.$ac_ext
63356 LIBS=$ac_check_lib_save_LIBS
63357 fi
63358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63359 $as_echo "$ac_cv_lib_z_compress" >&6; }
63360 if test "x$ac_cv_lib_z_compress" = xyes; then :
63361    ZLIB_FOUND=yes
63362 else
63363    ZLIB_FOUND=no
63364 fi
63365 
63366 
63367   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63368 $as_echo_n "checking for which zlib to use... " >&6; }
63369 
63370   DEFAULT_ZLIB=system
63371   if test "x$OPENJDK_TARGET_OS" = xwindows; then
63372     # On windows default is bundled...on others default is system
63373     DEFAULT_ZLIB=bundled
63374   fi
63375 
63376   if test "x${ZLIB_FOUND}" != "xyes"; then
63377     # If we don't find any system...set default to bundled
63378     DEFAULT_ZLIB=bundled
63379   fi
63380 
63381   # If user didn't specify, use DEFAULT_ZLIB
63382   if test "x${with_zlib}" = "x"; then
63383     with_zlib=${DEFAULT_ZLIB}
63384   fi
63385 
63386   if test "x${with_zlib}" = "xbundled"; then
63387     USE_EXTERNAL_LIBZ=false
63388     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63389 $as_echo "bundled" >&6; }
63390   elif test "x${with_zlib}" = "xsystem"; then
63391     if test "x${ZLIB_FOUND}" = "xyes"; then
63392       USE_EXTERNAL_LIBZ=true
63393       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63394 $as_echo "system" >&6; }
63395     else
63396       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63397 $as_echo "system not found" >&6; }
63398       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63399     fi
63400   else
63401     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63402   fi
63403 
63404 
63405 
63406 
63407 
63408 # Check whether --with-lcms was given.
63409 if test "${with_lcms+set}" = set; then :
63410   withval=$with_lcms;
63411 fi
63412 
63413 
63414   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63415 $as_echo_n "checking for which lcms to use... " >&6; }
63416 
63417   DEFAULT_LCMS=bundled
63418   # If user didn't specify, use DEFAULT_LCMS
63419   if test "x${with_lcms}" = "x"; then
63420       with_lcms=${DEFAULT_LCMS}
63421   fi
63422 
63423   if test "x${with_lcms}" = "xbundled"; then
63424     USE_EXTERNAL_LCMS=false
63425     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63426 $as_echo "bundled" >&6; }
63427   elif test "x${with_lcms}" = "xsystem"; then
63428     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63429 $as_echo "system" >&6; }
63430 
63431 pkg_failed=no
63432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63433 $as_echo_n "checking for LCMS... " >&6; }
63434 
63435 if test -n "$LCMS_CFLAGS"; then
63436     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63437  elif test -n "$PKG_CONFIG"; then
63438     if test -n "$PKG_CONFIG" && \
63439     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63440   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63441   ac_status=$?
63442   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63443   test $ac_status = 0; }; then
63444   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63445 else
63446   pkg_failed=yes
63447 fi
63448  else
63449     pkg_failed=untried
63450 fi
63451 if test -n "$LCMS_LIBS"; then
63452     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63453  elif test -n "$PKG_CONFIG"; then
63454     if test -n "$PKG_CONFIG" && \
63455     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63456   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63457   ac_status=$?
63458   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63459   test $ac_status = 0; }; then
63460   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63461 else
63462   pkg_failed=yes
63463 fi
63464  else
63465     pkg_failed=untried
63466 fi
63467 
63468 
63469 
63470 if test $pkg_failed = yes; then
63471 
63472 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63473         _pkg_short_errors_supported=yes
63474 else
63475         _pkg_short_errors_supported=no
63476 fi
63477         if test $_pkg_short_errors_supported = yes; then
63478                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63479         else
63480                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63481         fi
63482         # Put the nasty error message in config.log where it belongs
63483         echo "$LCMS_PKG_ERRORS" >&5
63484 
63485         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63486 $as_echo "no" >&6; }
63487                 LCMS_FOUND=no
63488 elif test $pkg_failed = untried; then
63489         LCMS_FOUND=no
63490 else
63491         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63492         LCMS_LIBS=$pkg_cv_LCMS_LIBS
63493         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63494 $as_echo "yes" >&6; }
63495         LCMS_FOUND=yes
63496 fi
63497     if test "x${LCMS_FOUND}" = "xyes"; then
63498       USE_EXTERNAL_LCMS=true
63499     else
63500       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63501     fi
63502   else
63503     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63504   fi
63505 
63506 
63507 
63508 
63509 
63510 
63511 
63512 
63513 
63514 
63515 
63516   # Setup libm (the maths library)
63517   if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63518     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63519 $as_echo_n "checking for cos in -lm... " >&6; }
63520 if ${ac_cv_lib_m_cos+:} false; then :
63521   $as_echo_n "(cached) " >&6
63522 else
63523   ac_check_lib_save_LIBS=$LIBS
63524 LIBS="-lm  $LIBS"
63525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63526 /* end confdefs.h.  */
63527 
63528 /* Override any GCC internal prototype to avoid an error.
63529    Use char because int might match the return type of a GCC
63530    builtin and then its argument prototype would still apply.  */
63531 #ifdef __cplusplus
63532 extern "C"
63533 #endif
63534 char cos ();
63535 int
63536 main ()
63537 {
63538 return cos ();
63539   ;
63540   return 0;
63541 }
63542 _ACEOF
63543 if ac_fn_cxx_try_link "$LINENO"; then :
63544   ac_cv_lib_m_cos=yes
63545 else
63546   ac_cv_lib_m_cos=no
63547 fi
63548 rm -f core conftest.err conftest.$ac_objext \
63549     conftest$ac_exeext conftest.$ac_ext
63550 LIBS=$ac_check_lib_save_LIBS
63551 fi
63552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63553 $as_echo "$ac_cv_lib_m_cos" >&6; }
63554 if test "x$ac_cv_lib_m_cos" = xyes; then :
63555   cat >>confdefs.h <<_ACEOF
63556 #define HAVE_LIBM 1
63557 _ACEOF
63558 
63559   LIBS="-lm $LIBS"
63560 
63561 else
63562 
63563         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63564 $as_echo "$as_me: Maths library was not found" >&6;}
63565 
63566 fi
63567 
63568     LIBM="-lm"
63569   else
63570     LIBM=""
63571   fi
63572 
63573 
63574   # Setup libdl (for dynamic library loading)
63575   save_LIBS="$LIBS"
63576   LIBS=""
63577   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63578 $as_echo_n "checking for dlopen in -ldl... " >&6; }
63579 if ${ac_cv_lib_dl_dlopen+:} false; then :
63580   $as_echo_n "(cached) " >&6
63581 else
63582   ac_check_lib_save_LIBS=$LIBS
63583 LIBS="-ldl  $LIBS"
63584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63585 /* end confdefs.h.  */
63586 
63587 /* Override any GCC internal prototype to avoid an error.
63588    Use char because int might match the return type of a GCC
63589    builtin and then its argument prototype would still apply.  */
63590 #ifdef __cplusplus
63591 extern "C"
63592 #endif
63593 char dlopen ();
63594 int
63595 main ()
63596 {
63597 return dlopen ();
63598   ;
63599   return 0;
63600 }
63601 _ACEOF
63602 if ac_fn_cxx_try_link "$LINENO"; then :
63603   ac_cv_lib_dl_dlopen=yes
63604 else
63605   ac_cv_lib_dl_dlopen=no
63606 fi
63607 rm -f core conftest.err conftest.$ac_objext \
63608     conftest$ac_exeext conftest.$ac_ext
63609 LIBS=$ac_check_lib_save_LIBS
63610 fi
63611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63612 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63613 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63614   cat >>confdefs.h <<_ACEOF
63615 #define HAVE_LIBDL 1
63616 _ACEOF
63617 
63618   LIBS="-ldl $LIBS"
63619 
63620 fi
63621 
63622   LIBDL="$LIBS"
63623 
63624   LIBS="$save_LIBS"
63625 
63626   # Deprecated libraries, keep the flags for backwards compatibility
63627   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63628 
63629 
63630 # Check whether --with-dxsdk was given.
63631 if test "${with_dxsdk+set}" = set; then :
63632   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63633 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63634 fi
63635 
63636 
63637 
63638 
63639 # Check whether --with-dxsdk-lib was given.
63640 if test "${with_dxsdk_lib+set}" = set; then :
63641   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63642 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63643 fi
63644 
63645 
63646 
63647 
63648 # Check whether --with-dxsdk-include was given.
63649 if test "${with_dxsdk_include+set}" = set; then :
63650   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63651 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63652 fi
63653 
63654 
63655   fi
63656 
63657   # Control if libzip can use mmap. Available for purposes of overriding.
63658   LIBZIP_CAN_USE_MMAP=true
63659 
63660 
63661 
63662   if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63663     # Find the root of the Solaris Studio installation from the compiler path
63664     SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63665     STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63666     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63667 $as_echo_n "checking for libstlport.so.1... " >&6; }
63668     if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63669       # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63670       STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63671     fi
63672     if test -f "$STLPORT_LIB"; then
63673       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63674 $as_echo "yes, $STLPORT_LIB" >&6; }
63675 
63676   # Only process if variable expands to non-empty
63677 
63678   if test "x$STLPORT_LIB" != x; then
63679     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63680 
63681   # Input might be given as Windows format, start by converting to
63682   # unix format.
63683   path="$STLPORT_LIB"
63684   new_path=`$CYGPATH -u "$path"`
63685 
63686   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63687   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63688   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63689   # "foo.exe" is OK but "foo" is an error.
63690   #
63691   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63692   # It is also a way to make sure we got the proper file name for the real test later on.
63693   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63694   if test "x$test_shortpath" = x; then
63695     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63696 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63697     as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63698   fi
63699 
63700   # Call helper function which possibly converts this using DOS-style short mode.
63701   # If so, the updated path is stored in $new_path.
63702 
63703   input_path="$new_path"
63704   # Check if we need to convert this using DOS-style short mode. If the path
63705   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63706   # take no chances and rewrite it.
63707   # Note: m4 eats our [], so we need to use [ and ] instead.
63708   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63709   if test "x$has_forbidden_chars" != x; then
63710     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63711     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63712     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63713     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63714       # Going to short mode and back again did indeed matter. Since short mode is
63715       # case insensitive, let's make it lowercase to improve readability.
63716       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63717       # Now convert it back to Unix-style (cygpath)
63718       input_path=`$CYGPATH -u "$shortmode_path"`
63719       new_path="$input_path"
63720     fi
63721   fi
63722 
63723   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63724   if test "x$test_cygdrive_prefix" = x; then
63725     # As a simple fix, exclude /usr/bin since it's not a real path.
63726     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63727       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63728       # a path prefixed by /cygdrive for fixpath to work.
63729       new_path="$CYGWIN_ROOT_PATH$input_path"
63730     fi
63731   fi
63732 
63733 
63734   if test "x$path" != "x$new_path"; then
63735     STLPORT_LIB="$new_path"
63736     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63737 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63738   fi
63739 
63740     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63741 
63742   path="$STLPORT_LIB"
63743   has_colon=`$ECHO $path | $GREP ^.:`
63744   new_path="$path"
63745   if test "x$has_colon" = x; then
63746     # Not in mixed or Windows style, start by that.
63747     new_path=`cmd //c echo $path`
63748   fi
63749 
63750 
63751   input_path="$new_path"
63752   # Check if we need to convert this using DOS-style short mode. If the path
63753   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63754   # take no chances and rewrite it.
63755   # Note: m4 eats our [], so we need to use [ and ] instead.
63756   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63757   if test "x$has_forbidden_chars" != x; then
63758     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63759     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63760   fi
63761 
63762 
63763   windows_path="$new_path"
63764   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63765     unix_path=`$CYGPATH -u "$windows_path"`
63766     new_path="$unix_path"
63767   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63768     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63769     new_path="$unix_path"
63770   fi
63771 
63772   if test "x$path" != "x$new_path"; then
63773     STLPORT_LIB="$new_path"
63774     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63775 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63776   fi
63777 
63778   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63779   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63780 
63781     else
63782       # We're on a unix platform. Hooray! :)
63783       path="$STLPORT_LIB"
63784       has_space=`$ECHO "$path" | $GREP " "`
63785       if test "x$has_space" != x; then
63786         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63787 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63788         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63789       fi
63790 
63791       # Use eval to expand a potential ~
63792       eval path="$path"
63793       if test ! -f "$path" && test ! -d "$path"; then
63794         as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63795       fi
63796 
63797       if test -d "$path"; then
63798         STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63799       else
63800         dir="`$DIRNAME "$path"`"
63801         base="`$BASENAME "$path"`"
63802         STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63803       fi
63804     fi
63805   fi
63806 
63807     else
63808       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63809 $as_echo "no, not found at $STLPORT_LIB" >&6; }
63810       as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63811     fi
63812 
63813   fi
63814 
63815 
63816 
63817 
63818 
63819 
63820 
63821 
63822 
63823 
63824 
63825 
63826 
63827 
63828 ###############################################################################
63829 #
63830 # We need to do some final tweaking, when everything else is done.
63831 #
63832 ###############################################################################
63833 
63834 
63835   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63836 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63837 
63838   if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63839     ENABLE_INTREE_EC=yes
63840     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63841 $as_echo "yes" >&6; }
63842   else
63843     ENABLE_INTREE_EC=no
63844     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63845 $as_echo "no" >&6; }
63846   fi
63847 
63848 
63849 
63850 
63851   # Check whether --enable-jtreg-failure-handler was given.
63852 if test "${enable_jtreg_failure_handler+set}" = set; then :
63853   enableval=$enable_jtreg_failure_handler;
63854 fi
63855 
63856 
63857   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63858 $as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63859 
63860   if test "x$enable_jtreg_failure_handler" = "xyes"; then
63861     if test "x$JT_HOME" = "x"; then
63862       as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63863     else
63864       BUILD_FAILURE_HANDLER=true
63865       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63866 $as_echo "yes, forced" >&6; }
63867     fi
63868   elif test "x$enable_jtreg_failure_handler" = "xno"; then
63869     BUILD_FAILURE_HANDLER=false
63870     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63871 $as_echo "no, forced" >&6; }
63872   elif test "x$enable_jtreg_failure_handler" = "xauto" \
63873       || test "x$enable_jtreg_failure_handler" = "x"; then
63874     if test "x$JT_HOME" = "x"; then
63875       BUILD_FAILURE_HANDLER=false
63876       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63877 $as_echo "no, missing jtreg" >&6; }
63878     else
63879       BUILD_FAILURE_HANDLER=true
63880       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63881 $as_echo "yes, jtreg present" >&6; }
63882     fi
63883   else
63884     as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63885   fi
63886 
63887 
63888 
63889 
63890   # Check whether --enable-generate-classlist was given.
63891 if test "${enable_generate_classlist+set}" = set; then :
63892   enableval=$enable_generate_classlist;
63893 fi
63894 
63895 
63896   # Check if it's likely that it's possible to generate the classlist. Depending
63897   # on exact jvm configuration it could be possible anyway.
63898   if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
63899     ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
63900   else
63901     ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
63902   fi
63903 
63904   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
63905 $as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
63906   if test "x$enable_generate_classlist" = "xyes"; then
63907     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63908 $as_echo "yes, forced" >&6; }
63909     ENABLE_GENERATE_CLASSLIST="true"
63910     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
63911       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
63912 $as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
63913     fi
63914   elif test "x$enable_generate_classlist" = "xno"; then
63915     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63916 $as_echo "no, forced" >&6; }
63917     ENABLE_GENERATE_CLASSLIST="false"
63918   elif test "x$enable_generate_classlist" = "x"; then
63919     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
63920       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63921 $as_echo "yes" >&6; }
63922       ENABLE_GENERATE_CLASSLIST="true"
63923     else
63924       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63925 $as_echo "no" >&6; }
63926       ENABLE_GENERATE_CLASSLIST="false"
63927     fi
63928   else
63929     as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
63930   fi
63931 
63932 
63933 
63934 
63935 ###############################################################################
63936 #
63937 # Configure parts of the build that only affect the build performance,
63938 # not the result.
63939 #
63940 ###############################################################################
63941 
63942 
63943   # How many cores do we have on this build system?
63944 
63945 # Check whether --with-num-cores was given.
63946 if test "${with_num_cores+set}" = set; then :
63947   withval=$with_num_cores;
63948 fi
63949 
63950   if test "x$with_num_cores" = x; then
63951     # The number of cores were not specified, try to probe them.
63952 
63953   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63954 $as_echo_n "checking for number of cores... " >&6; }
63955   NUM_CORES=1
63956   FOUND_CORES=no
63957 
63958   if test -f /proc/cpuinfo; then
63959     # Looks like a Linux (or cygwin) system
63960     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63961     FOUND_CORES=yes
63962   elif test -x /usr/sbin/psrinfo; then
63963     # Looks like a Solaris system
63964     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63965     FOUND_CORES=yes
63966   elif test -x /usr/sbin/sysctl; then
63967     # Looks like a MacOSX system
63968     NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63969     FOUND_CORES=yes
63970   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63971     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63972     FOUND_CORES=yes
63973   elif test -n "$NUMBER_OF_PROCESSORS"; then
63974     # On windows, look in the env
63975     NUM_CORES=$NUMBER_OF_PROCESSORS
63976     FOUND_CORES=yes
63977   fi
63978 
63979   if test "x$FOUND_CORES" = xyes; then
63980     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63981 $as_echo "$NUM_CORES" >&6; }
63982   else
63983     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63984 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
63985     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63986 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63987   fi
63988 
63989   else
63990     NUM_CORES=$with_num_cores
63991   fi
63992 
63993 
63994 
63995   # How much memory do we have on this build system?
63996 
63997 # Check whether --with-memory-size was given.
63998 if test "${with_memory_size+set}" = set; then :
63999   withval=$with_memory_size;
64000 fi
64001 
64002   if test "x$with_memory_size" = x; then
64003     # The memory size was not specified, try to probe it.
64004 
64005   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64006 $as_echo_n "checking for memory size... " >&6; }
64007   # Default to 1024 MB
64008   MEMORY_SIZE=1024
64009   FOUND_MEM=no
64010 
64011   if test -f /proc/meminfo; then
64012     # Looks like a Linux (or cygwin) system
64013     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64014     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64015     FOUND_MEM=yes
64016   elif test -x /usr/sbin/prtconf; then
64017     # Looks like a Solaris or AIX system
64018     MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64019     FOUND_MEM=yes
64020   elif test -x /usr/sbin/sysctl; then
64021     # Looks like a MacOSX system
64022     MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64023     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64024     FOUND_MEM=yes
64025   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64026     # Windows, but without cygwin
64027     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64028     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64029     FOUND_MEM=yes
64030   fi
64031 
64032   if test "x$FOUND_MEM" = xyes; then
64033     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64034 $as_echo "$MEMORY_SIZE MB" >&6; }
64035   else
64036     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64037 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64038     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64039 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64040   fi
64041 
64042   else
64043     MEMORY_SIZE=$with_memory_size
64044   fi
64045 
64046 
64047 
64048   # Provide a decent default number of parallel jobs for make depending on
64049   # number of cores, amount of memory and machine architecture.
64050 
64051 # Check whether --with-jobs was given.
64052 if test "${with_jobs+set}" = set; then :
64053   withval=$with_jobs;
64054 fi
64055 
64056   if test "x$with_jobs" = x; then
64057     # Number of jobs was not specified, calculate.
64058     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64059 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64060     # Approximate memory in GB.
64061     memory_gb=`expr $MEMORY_SIZE / 1024`
64062     # Pick the lowest of memory in gb and number of cores.
64063     if test "$memory_gb" -lt "$NUM_CORES"; then
64064       JOBS="$memory_gb"
64065     else
64066       JOBS="$NUM_CORES"
64067     fi
64068     if test "$JOBS" -eq "0"; then
64069       JOBS=1
64070     fi
64071     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64072 $as_echo "$JOBS" >&6; }
64073   else
64074     JOBS=$with_jobs
64075   fi
64076 
64077 
64078 
64079   # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64080 
64081 # Check whether --with-test-jobs was given.
64082 if test "${with_test_jobs+set}" = set; then :
64083   withval=$with_test_jobs;
64084 fi
64085 
64086   if test "x$with_test_jobs" = x; then
64087       TEST_JOBS=0
64088   else
64089       TEST_JOBS=$with_test_jobs
64090   fi
64091 
64092 
64093 
64094 # Setup arguments for the boot jdk (after cores and memory have been setup)
64095 
64096   ##############################################################################
64097   #
64098   # Specify jvm options for anything that is run with the Boot JDK.
64099   # Not all JVM:s accept the same arguments on the command line.
64100   #
64101 
64102 # Check whether --with-boot-jdk-jvmargs was given.
64103 if test "${with_boot_jdk_jvmargs+set}" = set; then :
64104   withval=$with_boot_jdk_jvmargs;
64105 fi
64106 
64107 
64108   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64109 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
64110 
64111   # Disable special log output when a debug build is used as Boot JDK...
64112 
64113   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64114   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64115   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64116   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64117   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64118   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64119     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64120     JVM_ARG_OK=true
64121   else
64122     $ECHO "Arg failed:" >&5
64123     $ECHO "$OUTPUT" >&5
64124     JVM_ARG_OK=false
64125   fi
64126 
64127 
64128   # Force en-US environment
64129 
64130   $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64131   $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64132   OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64133   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64134   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64135   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64136     boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64137     JVM_ARG_OK=true
64138   else
64139     $ECHO "Arg failed:" >&5
64140     $ECHO "$OUTPUT" >&5
64141     JVM_ARG_OK=false
64142   fi
64143 
64144 
64145   # Apply user provided options.
64146 
64147   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64148   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64149   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64150   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64151   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64152   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64153     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64154     JVM_ARG_OK=true
64155   else
64156     $ECHO "Arg failed:" >&5
64157     $ECHO "$OUTPUT" >&5
64158     JVM_ARG_OK=false
64159   fi
64160 
64161 
64162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64163 $as_echo "$boot_jdk_jvmargs" >&6; }
64164 
64165   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64166   JAVA_FLAGS=$boot_jdk_jvmargs
64167 
64168 
64169 
64170   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64171 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64172 
64173   # Starting amount of heap memory.
64174 
64175   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64176   $ECHO "Command: $JAVA -Xms64M -version" >&5
64177   OUTPUT=`$JAVA -Xms64M -version 2>&1`
64178   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64179   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64180   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64181     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64182     JVM_ARG_OK=true
64183   else
64184     $ECHO "Arg failed:" >&5
64185     $ECHO "$OUTPUT" >&5
64186     JVM_ARG_OK=false
64187   fi
64188 
64189   BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64190 
64191   # Maximum amount of heap memory and stack size.
64192   JVM_HEAP_LIMIT_32="1024"
64193   # Running a 64 bit JVM allows for and requires a bigger heap
64194   JVM_HEAP_LIMIT_64="1600"
64195   STACK_SIZE_32=768
64196   STACK_SIZE_64=1536
64197   JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64198   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64199     JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64200   fi
64201   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64202     JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64203   fi
64204   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64205     JVM_HEAP_LIMIT_32=512
64206     JVM_HEAP_LIMIT_64=512
64207   fi
64208 
64209   if test "x$BOOT_JDK_BITS" = "x32"; then
64210     STACK_SIZE=$STACK_SIZE_32
64211     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64212   else
64213     STACK_SIZE=$STACK_SIZE_64
64214     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64215   fi
64216 
64217   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64218   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64219   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64220   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64221   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64222   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64223     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64224     JVM_ARG_OK=true
64225   else
64226     $ECHO "Arg failed:" >&5
64227     $ECHO "$OUTPUT" >&5
64228     JVM_ARG_OK=false
64229   fi
64230 
64231 
64232   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64233   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64234   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64235   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64236   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64237   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64238     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64239     JVM_ARG_OK=true
64240   else
64241     $ECHO "Arg failed:" >&5
64242     $ECHO "$OUTPUT" >&5
64243     JVM_ARG_OK=false
64244   fi
64245 
64246 
64247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64248 $as_echo "$boot_jdk_jvmargs_big" >&6; }
64249 
64250   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64251 
64252 
64253   if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64254     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64255     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64256   else
64257     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64258     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64259   fi
64260   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64261   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64262   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64263 $as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64265 $as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64266 
64267 
64268   # By default, the main javac compilations use big
64269   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64270 
64271 
64272   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64273 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64274 
64275   # Use serial gc for small short lived tools if possible
64276 
64277   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64278   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64279   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64280   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64281   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64282   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64283     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64284     JVM_ARG_OK=true
64285   else
64286     $ECHO "Arg failed:" >&5
64287     $ECHO "$OUTPUT" >&5
64288     JVM_ARG_OK=false
64289   fi
64290 
64291 
64292   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64293   $ECHO "Command: $JAVA -Xms32M -version" >&5
64294   OUTPUT=`$JAVA -Xms32M -version 2>&1`
64295   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64296   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64297   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64298     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64299     JVM_ARG_OK=true
64300   else
64301     $ECHO "Arg failed:" >&5
64302     $ECHO "$OUTPUT" >&5
64303     JVM_ARG_OK=false
64304   fi
64305 
64306 
64307   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64308   $ECHO "Command: $JAVA -Xmx512M -version" >&5
64309   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64310   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64311   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64312   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64313     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64314     JVM_ARG_OK=true
64315   else
64316     $ECHO "Arg failed:" >&5
64317     $ECHO "$OUTPUT" >&5
64318     JVM_ARG_OK=false
64319   fi
64320 
64321 
64322   $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64323   $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64324   OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64325   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64326   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64327   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64328     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64329     JVM_ARG_OK=true
64330   else
64331     $ECHO "Arg failed:" >&5
64332     $ECHO "$OUTPUT" >&5
64333     JVM_ARG_OK=false
64334   fi
64335 
64336 
64337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64338 $as_echo "$boot_jdk_jvmargs_small" >&6; }
64339 
64340   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64341 
64342 
64343   JAVA_TOOL_FLAGS_SMALL=""
64344   for f in $JAVA_FLAGS_SMALL; do
64345     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64346   done
64347 
64348 
64349 
64350 # Setup smart javac (after cores and memory have been setup)
64351 
64352 
64353 # Check whether --with-sjavac-server-java was given.
64354 if test "${with_sjavac_server_java+set}" = set; then :
64355   withval=$with_sjavac_server_java;
64356 fi
64357 
64358 
64359   if test "x$with_sjavac_server_java" != x; then
64360     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64361     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64362     if test "x$FOUND_VERSION" = x; then
64363       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64364     fi
64365   else
64366     SJAVAC_SERVER_JAVA="$JAVA"
64367   fi
64368 
64369 
64370   if test "$MEMORY_SIZE" -gt "3000"; then
64371 
64372   $ECHO "Check if jvm arg is ok: -d64" >&5
64373   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64374   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64375   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64376   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64377   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64378     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64379     JVM_ARG_OK=true
64380   else
64381     $ECHO "Arg failed:" >&5
64382     $ECHO "$OUTPUT" >&5
64383     JVM_ARG_OK=false
64384   fi
64385 
64386     if test "$JVM_ARG_OK" = true; then
64387       JVM_64BIT=true
64388       JVM_ARG_OK=false
64389     fi
64390   fi
64391 
64392   MX_VALUE=`expr $MEMORY_SIZE / 2`
64393   if test "$JVM_64BIT" = true; then
64394     # Set ms lower than mx since more than one instance of the server might
64395     # get launched at the same time before they figure out which instance won.
64396     MS_VALUE=512
64397     if test "$MX_VALUE" -gt "2048"; then
64398       MX_VALUE=2048
64399     fi
64400   else
64401     MS_VALUE=256
64402     if test "$MX_VALUE" -gt "1500"; then
64403       MX_VALUE=1500
64404     fi
64405   fi
64406   if test "$MX_VALUE" -lt "512"; then
64407     MX_VALUE=512
64408   fi
64409 
64410   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64411   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64412   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64413   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64414   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64415   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64416     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64417     JVM_ARG_OK=true
64418   else
64419     $ECHO "Arg failed:" >&5
64420     $ECHO "$OUTPUT" >&5
64421     JVM_ARG_OK=false
64422   fi
64423 
64424 
64425 
64426   # Check whether --enable-sjavac was given.
64427 if test "${enable_sjavac+set}" = set; then :
64428   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64429 else
64430   ENABLE_SJAVAC="no"
64431 fi
64432 
64433   if test "x$JVM_ARG_OK" = "xfalse"; then
64434     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64435 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64436     ENABLE_SJAVAC="no"
64437   fi
64438   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64439 $as_echo_n "checking whether to use sjavac... " >&6; }
64440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64441 $as_echo "$ENABLE_SJAVAC" >&6; }
64442 
64443 
64444   # Check whether --enable-javac-server was given.
64445 if test "${enable_javac_server+set}" = set; then :
64446   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64447 else
64448   ENABLE_JAVAC_SERVER="yes"
64449 fi
64450 
64451   if test "x$JVM_ARG_OK" = "xfalse"; then
64452     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64453 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64454     ENABLE_JAVAC_SERVER="no"
64455   fi
64456   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64457 $as_echo_n "checking whether to use javac server... " >&6; }
64458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64459 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64460 
64461 
64462   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64463     # When using a server javac, the small client instances do not need much
64464     # resources.
64465     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64466   fi
64467 
64468 
64469 # Setup use of icecc if requested
64470 
64471   # Check whether --enable-icecc was given.
64472 if test "${enable_icecc+set}" = set; then :
64473   enableval=$enable_icecc;
64474 fi
64475 
64476 
64477   if test "x${enable_icecc}" = "xyes"; then
64478 
64479 
64480 
64481   # Publish this variable in the help.
64482 
64483 
64484   if [ -z "${ICECC_CMD+x}" ]; then
64485     # The variable is not set by user, try to locate tool using the code snippet
64486     for ac_prog in icecc
64487 do
64488   # Extract the first word of "$ac_prog", so it can be a program name with args.
64489 set dummy $ac_prog; ac_word=$2
64490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64491 $as_echo_n "checking for $ac_word... " >&6; }
64492 if ${ac_cv_path_ICECC_CMD+:} false; then :
64493   $as_echo_n "(cached) " >&6
64494 else
64495   case $ICECC_CMD in
64496   [\\/]* | ?:[\\/]*)
64497   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64498   ;;
64499   *)
64500   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64501 for as_dir in $PATH
64502 do
64503   IFS=$as_save_IFS
64504   test -z "$as_dir" && as_dir=.
64505     for ac_exec_ext in '' $ac_executable_extensions; do
64506   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64507     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64508     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64509     break 2
64510   fi
64511 done
64512   done
64513 IFS=$as_save_IFS
64514 
64515   ;;
64516 esac
64517 fi
64518 ICECC_CMD=$ac_cv_path_ICECC_CMD
64519 if test -n "$ICECC_CMD"; then
64520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64521 $as_echo "$ICECC_CMD" >&6; }
64522 else
64523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64524 $as_echo "no" >&6; }
64525 fi
64526 
64527 
64528   test -n "$ICECC_CMD" && break
64529 done
64530 
64531   else
64532     # The variable is set, but is it from the command line or the environment?
64533 
64534     # Try to remove the string !ICECC_CMD! from our list.
64535     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64536     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64537       # If it failed, the variable was not from the command line. Ignore it,
64538       # but warn the user (except for BASH, which is always set by the calling BASH).
64539       if test "xICECC_CMD" != xBASH; then
64540         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64541 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64542       fi
64543       # Try to locate tool using the code snippet
64544       for ac_prog in icecc
64545 do
64546   # Extract the first word of "$ac_prog", so it can be a program name with args.
64547 set dummy $ac_prog; ac_word=$2
64548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64549 $as_echo_n "checking for $ac_word... " >&6; }
64550 if ${ac_cv_path_ICECC_CMD+:} false; then :
64551   $as_echo_n "(cached) " >&6
64552 else
64553   case $ICECC_CMD in
64554   [\\/]* | ?:[\\/]*)
64555   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64556   ;;
64557   *)
64558   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64559 for as_dir in $PATH
64560 do
64561   IFS=$as_save_IFS
64562   test -z "$as_dir" && as_dir=.
64563     for ac_exec_ext in '' $ac_executable_extensions; do
64564   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64565     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64566     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64567     break 2
64568   fi
64569 done
64570   done
64571 IFS=$as_save_IFS
64572 
64573   ;;
64574 esac
64575 fi
64576 ICECC_CMD=$ac_cv_path_ICECC_CMD
64577 if test -n "$ICECC_CMD"; then
64578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64579 $as_echo "$ICECC_CMD" >&6; }
64580 else
64581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64582 $as_echo "no" >&6; }
64583 fi
64584 
64585 
64586   test -n "$ICECC_CMD" && break
64587 done
64588 
64589     else
64590       # If it succeeded, then it was overridden by the user. We will use it
64591       # for the tool.
64592 
64593       # First remove it from the list of overridden variables, so we can test
64594       # for unknown variables in the end.
64595       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64596 
64597       # Check if we try to supply an empty value
64598       if test "x$ICECC_CMD" = x; then
64599         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64600 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64601         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64602 $as_echo_n "checking for ICECC_CMD... " >&6; }
64603         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64604 $as_echo "disabled" >&6; }
64605       else
64606         # Check if the provided tool contains a complete path.
64607         tool_specified="$ICECC_CMD"
64608         tool_basename="${tool_specified##*/}"
64609         if test "x$tool_basename" = "x$tool_specified"; then
64610           # A command without a complete path is provided, search $PATH.
64611           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64612 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64613           # Extract the first word of "$tool_basename", so it can be a program name with args.
64614 set dummy $tool_basename; ac_word=$2
64615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64616 $as_echo_n "checking for $ac_word... " >&6; }
64617 if ${ac_cv_path_ICECC_CMD+:} false; then :
64618   $as_echo_n "(cached) " >&6
64619 else
64620   case $ICECC_CMD in
64621   [\\/]* | ?:[\\/]*)
64622   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64623   ;;
64624   *)
64625   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64626 for as_dir in $PATH
64627 do
64628   IFS=$as_save_IFS
64629   test -z "$as_dir" && as_dir=.
64630     for ac_exec_ext in '' $ac_executable_extensions; do
64631   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64632     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64633     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64634     break 2
64635   fi
64636 done
64637   done
64638 IFS=$as_save_IFS
64639 
64640   ;;
64641 esac
64642 fi
64643 ICECC_CMD=$ac_cv_path_ICECC_CMD
64644 if test -n "$ICECC_CMD"; then
64645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64646 $as_echo "$ICECC_CMD" >&6; }
64647 else
64648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64649 $as_echo "no" >&6; }
64650 fi
64651 
64652 
64653           if test "x$ICECC_CMD" = x; then
64654             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64655           fi
64656         else
64657           # Otherwise we believe it is a complete path. Use it as it is.
64658           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64659 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64660           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64661 $as_echo_n "checking for ICECC_CMD... " >&6; }
64662           if test ! -x "$tool_specified"; then
64663             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64664 $as_echo "not found" >&6; }
64665             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64666           fi
64667           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64668 $as_echo "$tool_specified" >&6; }
64669         fi
64670       fi
64671     fi
64672 
64673   fi
64674 
64675 
64676 
64677   if test "x$ICECC_CMD" = x; then
64678     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64679   fi
64680 
64681 
64682     old_path="$PATH"
64683 
64684     # Look for icecc-create-env in some known places
64685     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64686 
64687 
64688 
64689   # Publish this variable in the help.
64690 
64691 
64692   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64693     # The variable is not set by user, try to locate tool using the code snippet
64694     for ac_prog in icecc-create-env
64695 do
64696   # Extract the first word of "$ac_prog", so it can be a program name with args.
64697 set dummy $ac_prog; ac_word=$2
64698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64699 $as_echo_n "checking for $ac_word... " >&6; }
64700 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64701   $as_echo_n "(cached) " >&6
64702 else
64703   case $ICECC_CREATE_ENV in
64704   [\\/]* | ?:[\\/]*)
64705   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64706   ;;
64707   *)
64708   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64709 for as_dir in $PATH
64710 do
64711   IFS=$as_save_IFS
64712   test -z "$as_dir" && as_dir=.
64713     for ac_exec_ext in '' $ac_executable_extensions; do
64714   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64715     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64716     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64717     break 2
64718   fi
64719 done
64720   done
64721 IFS=$as_save_IFS
64722 
64723   ;;
64724 esac
64725 fi
64726 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64727 if test -n "$ICECC_CREATE_ENV"; then
64728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64729 $as_echo "$ICECC_CREATE_ENV" >&6; }
64730 else
64731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64732 $as_echo "no" >&6; }
64733 fi
64734 
64735 
64736   test -n "$ICECC_CREATE_ENV" && break
64737 done
64738 
64739   else
64740     # The variable is set, but is it from the command line or the environment?
64741 
64742     # Try to remove the string !ICECC_CREATE_ENV! from our list.
64743     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64744     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64745       # If it failed, the variable was not from the command line. Ignore it,
64746       # but warn the user (except for BASH, which is always set by the calling BASH).
64747       if test "xICECC_CREATE_ENV" != xBASH; then
64748         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64749 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64750       fi
64751       # Try to locate tool using the code snippet
64752       for ac_prog in icecc-create-env
64753 do
64754   # Extract the first word of "$ac_prog", so it can be a program name with args.
64755 set dummy $ac_prog; ac_word=$2
64756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64757 $as_echo_n "checking for $ac_word... " >&6; }
64758 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64759   $as_echo_n "(cached) " >&6
64760 else
64761   case $ICECC_CREATE_ENV in
64762   [\\/]* | ?:[\\/]*)
64763   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64764   ;;
64765   *)
64766   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64767 for as_dir in $PATH
64768 do
64769   IFS=$as_save_IFS
64770   test -z "$as_dir" && as_dir=.
64771     for ac_exec_ext in '' $ac_executable_extensions; do
64772   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64773     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64774     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64775     break 2
64776   fi
64777 done
64778   done
64779 IFS=$as_save_IFS
64780 
64781   ;;
64782 esac
64783 fi
64784 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64785 if test -n "$ICECC_CREATE_ENV"; then
64786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64787 $as_echo "$ICECC_CREATE_ENV" >&6; }
64788 else
64789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64790 $as_echo "no" >&6; }
64791 fi
64792 
64793 
64794   test -n "$ICECC_CREATE_ENV" && break
64795 done
64796 
64797     else
64798       # If it succeeded, then it was overridden by the user. We will use it
64799       # for the tool.
64800 
64801       # First remove it from the list of overridden variables, so we can test
64802       # for unknown variables in the end.
64803       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64804 
64805       # Check if we try to supply an empty value
64806       if test "x$ICECC_CREATE_ENV" = x; then
64807         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64808 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64809         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64810 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64811         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64812 $as_echo "disabled" >&6; }
64813       else
64814         # Check if the provided tool contains a complete path.
64815         tool_specified="$ICECC_CREATE_ENV"
64816         tool_basename="${tool_specified##*/}"
64817         if test "x$tool_basename" = "x$tool_specified"; then
64818           # A command without a complete path is provided, search $PATH.
64819           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64820 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64821           # Extract the first word of "$tool_basename", so it can be a program name with args.
64822 set dummy $tool_basename; ac_word=$2
64823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64824 $as_echo_n "checking for $ac_word... " >&6; }
64825 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64826   $as_echo_n "(cached) " >&6
64827 else
64828   case $ICECC_CREATE_ENV in
64829   [\\/]* | ?:[\\/]*)
64830   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64831   ;;
64832   *)
64833   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64834 for as_dir in $PATH
64835 do
64836   IFS=$as_save_IFS
64837   test -z "$as_dir" && as_dir=.
64838     for ac_exec_ext in '' $ac_executable_extensions; do
64839   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64840     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64841     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64842     break 2
64843   fi
64844 done
64845   done
64846 IFS=$as_save_IFS
64847 
64848   ;;
64849 esac
64850 fi
64851 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64852 if test -n "$ICECC_CREATE_ENV"; then
64853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64854 $as_echo "$ICECC_CREATE_ENV" >&6; }
64855 else
64856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64857 $as_echo "no" >&6; }
64858 fi
64859 
64860 
64861           if test "x$ICECC_CREATE_ENV" = x; then
64862             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64863           fi
64864         else
64865           # Otherwise we believe it is a complete path. Use it as it is.
64866           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64867 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64868           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64869 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64870           if test ! -x "$tool_specified"; then
64871             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64872 $as_echo "not found" >&6; }
64873             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64874           fi
64875           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64876 $as_echo "$tool_specified" >&6; }
64877         fi
64878       fi
64879     fi
64880 
64881   fi
64882 
64883 
64884 
64885   if test "x$ICECC_CREATE_ENV" = x; then
64886     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64887   fi
64888 
64889 
64890     # Use icecc-create-env to create a minimal compilation environment that can
64891     # be sent to the other hosts in the icecream cluster.
64892     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64893     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64894     # Older versions of icecc does not have the --gcc parameter
64895     if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64896       icecc_gcc_arg="--gcc"
64897     fi
64898     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64899 
64900   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64901       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64902           ${icecc_create_env_log} 2>&1 )
64903   if test "$?" != "0"; then
64904     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64905 $as_echo "$as_me: icecc-create-env output:" >&6;}
64906     cat \
64907           ${icecc_create_env_log}
64908     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64909   fi
64910 
64911     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64912       # For clang, the icecc compilerwrapper is needed. It usually resides next
64913       # to icecc-create-env.
64914 
64915 
64916 
64917   # Publish this variable in the help.
64918 
64919 
64920   if [ -z "${ICECC_WRAPPER+x}" ]; then
64921     # The variable is not set by user, try to locate tool using the code snippet
64922     for ac_prog in compilerwrapper
64923 do
64924   # Extract the first word of "$ac_prog", so it can be a program name with args.
64925 set dummy $ac_prog; ac_word=$2
64926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64927 $as_echo_n "checking for $ac_word... " >&6; }
64928 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64929   $as_echo_n "(cached) " >&6
64930 else
64931   case $ICECC_WRAPPER in
64932   [\\/]* | ?:[\\/]*)
64933   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64934   ;;
64935   *)
64936   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64937 for as_dir in $PATH
64938 do
64939   IFS=$as_save_IFS
64940   test -z "$as_dir" && as_dir=.
64941     for ac_exec_ext in '' $ac_executable_extensions; do
64942   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64943     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64944     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64945     break 2
64946   fi
64947 done
64948   done
64949 IFS=$as_save_IFS
64950 
64951   ;;
64952 esac
64953 fi
64954 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64955 if test -n "$ICECC_WRAPPER"; then
64956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64957 $as_echo "$ICECC_WRAPPER" >&6; }
64958 else
64959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64960 $as_echo "no" >&6; }
64961 fi
64962 
64963 
64964   test -n "$ICECC_WRAPPER" && break
64965 done
64966 
64967   else
64968     # The variable is set, but is it from the command line or the environment?
64969 
64970     # Try to remove the string !ICECC_WRAPPER! from our list.
64971     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64972     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64973       # If it failed, the variable was not from the command line. Ignore it,
64974       # but warn the user (except for BASH, which is always set by the calling BASH).
64975       if test "xICECC_WRAPPER" != xBASH; then
64976         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64977 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64978       fi
64979       # Try to locate tool using the code snippet
64980       for ac_prog in compilerwrapper
64981 do
64982   # Extract the first word of "$ac_prog", so it can be a program name with args.
64983 set dummy $ac_prog; ac_word=$2
64984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64985 $as_echo_n "checking for $ac_word... " >&6; }
64986 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64987   $as_echo_n "(cached) " >&6
64988 else
64989   case $ICECC_WRAPPER in
64990   [\\/]* | ?:[\\/]*)
64991   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64992   ;;
64993   *)
64994   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64995 for as_dir in $PATH
64996 do
64997   IFS=$as_save_IFS
64998   test -z "$as_dir" && as_dir=.
64999     for ac_exec_ext in '' $ac_executable_extensions; do
65000   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65001     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65002     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65003     break 2
65004   fi
65005 done
65006   done
65007 IFS=$as_save_IFS
65008 
65009   ;;
65010 esac
65011 fi
65012 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65013 if test -n "$ICECC_WRAPPER"; then
65014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65015 $as_echo "$ICECC_WRAPPER" >&6; }
65016 else
65017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65018 $as_echo "no" >&6; }
65019 fi
65020 
65021 
65022   test -n "$ICECC_WRAPPER" && break
65023 done
65024 
65025     else
65026       # If it succeeded, then it was overridden by the user. We will use it
65027       # for the tool.
65028 
65029       # First remove it from the list of overridden variables, so we can test
65030       # for unknown variables in the end.
65031       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65032 
65033       # Check if we try to supply an empty value
65034       if test "x$ICECC_WRAPPER" = x; then
65035         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65036 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65037         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65038 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65039         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65040 $as_echo "disabled" >&6; }
65041       else
65042         # Check if the provided tool contains a complete path.
65043         tool_specified="$ICECC_WRAPPER"
65044         tool_basename="${tool_specified##*/}"
65045         if test "x$tool_basename" = "x$tool_specified"; then
65046           # A command without a complete path is provided, search $PATH.
65047           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65048 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65049           # Extract the first word of "$tool_basename", so it can be a program name with args.
65050 set dummy $tool_basename; ac_word=$2
65051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65052 $as_echo_n "checking for $ac_word... " >&6; }
65053 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65054   $as_echo_n "(cached) " >&6
65055 else
65056   case $ICECC_WRAPPER in
65057   [\\/]* | ?:[\\/]*)
65058   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65059   ;;
65060   *)
65061   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65062 for as_dir in $PATH
65063 do
65064   IFS=$as_save_IFS
65065   test -z "$as_dir" && as_dir=.
65066     for ac_exec_ext in '' $ac_executable_extensions; do
65067   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65068     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65069     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65070     break 2
65071   fi
65072 done
65073   done
65074 IFS=$as_save_IFS
65075 
65076   ;;
65077 esac
65078 fi
65079 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65080 if test -n "$ICECC_WRAPPER"; then
65081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65082 $as_echo "$ICECC_WRAPPER" >&6; }
65083 else
65084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65085 $as_echo "no" >&6; }
65086 fi
65087 
65088 
65089           if test "x$ICECC_WRAPPER" = x; then
65090             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65091           fi
65092         else
65093           # Otherwise we believe it is a complete path. Use it as it is.
65094           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65095 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65096           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65097 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65098           if test ! -x "$tool_specified"; then
65099             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65100 $as_echo "not found" >&6; }
65101             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65102           fi
65103           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65104 $as_echo "$tool_specified" >&6; }
65105         fi
65106       fi
65107     fi
65108 
65109   fi
65110 
65111 
65112 
65113   if test "x$ICECC_WRAPPER" = x; then
65114     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65115   fi
65116 
65117 
65118 
65119   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65120       && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65121   if test "$?" != "0"; then
65122     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65123 $as_echo "$as_me: icecc-create-env output:" >&6;}
65124     cat ${icecc_create_env_log}
65125     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65126   fi
65127 
65128     else
65129       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65130     fi
65131     PATH="$old_path"
65132     # The bundle with the compiler gets a name based on checksums. Parse log file
65133     # to find it.
65134     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65135     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65136     if test ! -f ${ICECC_ENV_BUNDLE}; then
65137       as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65138     fi
65139     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65140 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65141     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65142 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65143     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65144 
65145     if test "x${COMPILE_TYPE}" = "xcross"; then
65146       # If cross compiling, create a separate env package for the build compiler
65147       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65148       icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65149       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65150 
65151   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65152       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65153             ${icecc_create_env_log_build} 2>&1 )
65154   if test "$?" != "0"; then
65155     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65156 $as_echo "$as_me: icecc-create-env output:" >&6;}
65157     cat \
65158             ${icecc_create_env_log_build}
65159     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65160   fi
65161 
65162       elif test "x${BUILD_CC##*/}" = "xclang"; then
65163 
65164   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65165       && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65166   if test "$?" != "0"; then
65167     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65168 $as_echo "$as_me: icecc-create-env output:" >&6;}
65169     cat ${icecc_create_env_log_build}
65170     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65171   fi
65172 
65173       else
65174         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65175       fi
65176       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65177       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65178       if test ! -f ${ICECC_ENV_BUNDLE}; then
65179         as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65180       fi
65181       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65182 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65183       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65184 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65185       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65186           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65187     else
65188       BUILD_ICECC="${ICECC}"
65189     fi
65190 
65191 
65192   fi
65193 
65194 
65195 # Can the C/C++ compiler use precompiled headers?
65196 
65197 
65198   ###############################################################################
65199   #
65200   # Can the C/C++ compiler use precompiled headers?
65201   #
65202   # Check whether --enable-precompiled-headers was given.
65203 if test "${enable_precompiled_headers+set}" = set; then :
65204   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65205 else
65206   ENABLE_PRECOMPH=yes
65207 fi
65208 
65209 
65210   USE_PRECOMPILED_HEADER=1
65211   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65212 $as_echo_n "checking If precompiled header is enabled... " >&6; }
65213   if test "x$ENABLE_PRECOMPH" = xno; then
65214     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65215 $as_echo "no, forced" >&6; }
65216     USE_PRECOMPILED_HEADER=0
65217   elif test "x$ICECC" != "x"; then
65218     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65219 $as_echo "no, does not work effectively with icecc" >&6; }
65220     USE_PRECOMPILED_HEADER=0
65221   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65222     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65223 $as_echo "no, does not work with Solaris Studio" >&6; }
65224     USE_PRECOMPILED_HEADER=0
65225   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65226     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65227 $as_echo "no, does not work with xlc" >&6; }
65228     USE_PRECOMPILED_HEADER=0
65229   else
65230     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65231 $as_echo "yes" >&6; }
65232   fi
65233 
65234   if test "x$ENABLE_PRECOMPH" = xyes; then
65235     # Check that the compiler actually supports precomp headers.
65236     if test "x$TOOLCHAIN_TYPE" = xgcc; then
65237       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65238 $as_echo_n "checking that precompiled headers work... " >&6; }
65239       echo "int alfa();" > conftest.h
65240       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65241       if test ! -f conftest.hpp.gch; then
65242         USE_PRECOMPILED_HEADER=0
65243         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65244 $as_echo "no" >&6; }
65245       else
65246         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65247 $as_echo "yes" >&6; }
65248       fi
65249       $RM conftest.h conftest.hpp.gch
65250     fi
65251   fi
65252 
65253 
65254 
65255 
65256 # Setup use of ccache, if available
65257 
65258   # Check whether --enable-ccache was given.
65259 if test "${enable_ccache+set}" = set; then :
65260   enableval=$enable_ccache;
65261 fi
65262 
65263 
65264   CCACHE_STATUS=
65265   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65266 $as_echo_n "checking is ccache enabled... " >&6; }
65267   if test "x$enable_ccache" = xyes; then
65268     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65269       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65270 $as_echo "yes" >&6; }
65271       OLD_PATH="$PATH"
65272       if test "x$TOOLCHAIN_PATH" != x; then
65273         PATH=$TOOLCHAIN_PATH:$PATH
65274       fi
65275 
65276 
65277 
65278   # Publish this variable in the help.
65279 
65280 
65281   if [ -z "${CCACHE+x}" ]; then
65282     # The variable is not set by user, try to locate tool using the code snippet
65283     for ac_prog in ccache
65284 do
65285   # Extract the first word of "$ac_prog", so it can be a program name with args.
65286 set dummy $ac_prog; ac_word=$2
65287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65288 $as_echo_n "checking for $ac_word... " >&6; }
65289 if ${ac_cv_path_CCACHE+:} false; then :
65290   $as_echo_n "(cached) " >&6
65291 else
65292   case $CCACHE in
65293   [\\/]* | ?:[\\/]*)
65294   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65295   ;;
65296   *)
65297   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65298 for as_dir in $PATH
65299 do
65300   IFS=$as_save_IFS
65301   test -z "$as_dir" && as_dir=.
65302     for ac_exec_ext in '' $ac_executable_extensions; do
65303   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65304     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65305     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65306     break 2
65307   fi
65308 done
65309   done
65310 IFS=$as_save_IFS
65311 
65312   ;;
65313 esac
65314 fi
65315 CCACHE=$ac_cv_path_CCACHE
65316 if test -n "$CCACHE"; then
65317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65318 $as_echo "$CCACHE" >&6; }
65319 else
65320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65321 $as_echo "no" >&6; }
65322 fi
65323 
65324 
65325   test -n "$CCACHE" && break
65326 done
65327 
65328   else
65329     # The variable is set, but is it from the command line or the environment?
65330 
65331     # Try to remove the string !CCACHE! from our list.
65332     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65333     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65334       # If it failed, the variable was not from the command line. Ignore it,
65335       # but warn the user (except for BASH, which is always set by the calling BASH).
65336       if test "xCCACHE" != xBASH; then
65337         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65338 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65339       fi
65340       # Try to locate tool using the code snippet
65341       for ac_prog in ccache
65342 do
65343   # Extract the first word of "$ac_prog", so it can be a program name with args.
65344 set dummy $ac_prog; ac_word=$2
65345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65346 $as_echo_n "checking for $ac_word... " >&6; }
65347 if ${ac_cv_path_CCACHE+:} false; then :
65348   $as_echo_n "(cached) " >&6
65349 else
65350   case $CCACHE in
65351   [\\/]* | ?:[\\/]*)
65352   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65353   ;;
65354   *)
65355   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65356 for as_dir in $PATH
65357 do
65358   IFS=$as_save_IFS
65359   test -z "$as_dir" && as_dir=.
65360     for ac_exec_ext in '' $ac_executable_extensions; do
65361   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65362     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65363     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65364     break 2
65365   fi
65366 done
65367   done
65368 IFS=$as_save_IFS
65369 
65370   ;;
65371 esac
65372 fi
65373 CCACHE=$ac_cv_path_CCACHE
65374 if test -n "$CCACHE"; then
65375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65376 $as_echo "$CCACHE" >&6; }
65377 else
65378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65379 $as_echo "no" >&6; }
65380 fi
65381 
65382 
65383   test -n "$CCACHE" && break
65384 done
65385 
65386     else
65387       # If it succeeded, then it was overridden by the user. We will use it
65388       # for the tool.
65389 
65390       # First remove it from the list of overridden variables, so we can test
65391       # for unknown variables in the end.
65392       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65393 
65394       # Check if we try to supply an empty value
65395       if test "x$CCACHE" = x; then
65396         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65397 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65398         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65399 $as_echo_n "checking for CCACHE... " >&6; }
65400         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65401 $as_echo "disabled" >&6; }
65402       else
65403         # Check if the provided tool contains a complete path.
65404         tool_specified="$CCACHE"
65405         tool_basename="${tool_specified##*/}"
65406         if test "x$tool_basename" = "x$tool_specified"; then
65407           # A command without a complete path is provided, search $PATH.
65408           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65409 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65410           # Extract the first word of "$tool_basename", so it can be a program name with args.
65411 set dummy $tool_basename; ac_word=$2
65412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65413 $as_echo_n "checking for $ac_word... " >&6; }
65414 if ${ac_cv_path_CCACHE+:} false; then :
65415   $as_echo_n "(cached) " >&6
65416 else
65417   case $CCACHE in
65418   [\\/]* | ?:[\\/]*)
65419   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65420   ;;
65421   *)
65422   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65423 for as_dir in $PATH
65424 do
65425   IFS=$as_save_IFS
65426   test -z "$as_dir" && as_dir=.
65427     for ac_exec_ext in '' $ac_executable_extensions; do
65428   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65429     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65430     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65431     break 2
65432   fi
65433 done
65434   done
65435 IFS=$as_save_IFS
65436 
65437   ;;
65438 esac
65439 fi
65440 CCACHE=$ac_cv_path_CCACHE
65441 if test -n "$CCACHE"; then
65442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65443 $as_echo "$CCACHE" >&6; }
65444 else
65445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65446 $as_echo "no" >&6; }
65447 fi
65448 
65449 
65450           if test "x$CCACHE" = x; then
65451             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65452           fi
65453         else
65454           # Otherwise we believe it is a complete path. Use it as it is.
65455           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65456 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65457           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65458 $as_echo_n "checking for CCACHE... " >&6; }
65459           if test ! -x "$tool_specified"; then
65460             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65461 $as_echo "not found" >&6; }
65462             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65463           fi
65464           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65465 $as_echo "$tool_specified" >&6; }
65466         fi
65467       fi
65468     fi
65469 
65470   fi
65471 
65472 
65473 
65474   if test "x$CCACHE" = x; then
65475     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65476   fi
65477 
65478 
65479       PATH="$OLD_PATH"
65480       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65481       CCACHE_STATUS="Active ($CCACHE_VERSION)"
65482     else
65483       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65484 $as_echo "no" >&6; }
65485       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65486 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65487     fi
65488   elif test "x$enable_ccache" = xno; then
65489     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65490 $as_echo "no, explicitly disabled" >&6; }
65491     CCACHE_STATUS="Disabled"
65492   elif test "x$enable_ccache" = x; then
65493     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65494 $as_echo "no" >&6; }
65495   else
65496     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65497 $as_echo "unknown" >&6; }
65498     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65499   fi
65500 
65501 
65502 
65503 # Check whether --with-ccache-dir was given.
65504 if test "${with_ccache_dir+set}" = set; then :
65505   withval=$with_ccache_dir;
65506 fi
65507 
65508 
65509   if test "x$with_ccache_dir" != x; then
65510     # When using a non home ccache directory, assume the use is to share ccache files
65511     # with other users. Thus change the umask.
65512     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65513     if test "x$CCACHE" = x; then
65514       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65515 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65516     fi
65517   fi
65518 
65519   if test "x$CCACHE" != x; then
65520 
65521   if test "x$CCACHE" != x; then
65522     if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65523       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65524           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65525       if test "x$HAS_BAD_CCACHE" != "x"; then
65526         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65527       fi
65528       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65529 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65530       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65531       PUSHED_FLAGS="$CXXFLAGS"
65532       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65533       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65534 /* end confdefs.h.  */
65535 
65536 int
65537 main ()
65538 {
65539 
65540   ;
65541   return 0;
65542 }
65543 _ACEOF
65544 if ac_fn_cxx_try_compile "$LINENO"; then :
65545   CC_KNOWS_CCACHE_TRICK=yes
65546 else
65547   CC_KNOWS_CCACHE_TRICK=no
65548 fi
65549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65550       CXXFLAGS="$PUSHED_FLAGS"
65551       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65552         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65553 $as_echo "yes" >&6; }
65554         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65555 
65556         CCACHE_SLOPPINESS=pch_defines,time_macros
65557       else
65558         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65559 $as_echo "no" >&6; }
65560         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65561       fi
65562     fi
65563 
65564     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65565         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65566 
65567     if test "x$SET_CCACHE_DIR" != x; then
65568       mkdir -p $CCACHE_DIR > /dev/null 2>&1
65569       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65570     fi
65571   fi
65572 
65573   fi
65574 
65575 
65576 ###############################################################################
65577 #
65578 # And now the finish...
65579 #
65580 ###############################################################################
65581 
65582 # Check for some common pitfalls
65583 
65584   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65585     file_to_test="$SRC_ROOT/LICENSE"
65586     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65587       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
65588     fi
65589   fi
65590 
65591 
65592   # Did user specify any unknown variables?
65593 
65594   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65595     # Replace the separating ! with spaces before presenting for end user.
65596     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65597     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65598 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65599   fi
65600 
65601 
65602   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65603 $as_echo_n "checking if build directory is on local disk... " >&6; }
65604 
65605   # df -l lists only local disks; if the given directory is not found then
65606   # a non-zero exit code is given
65607   if test "x$DF" = x; then
65608     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65609       # msys does not have df; use Windows "net use" instead.
65610       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65611       if test "x$IS_NETWORK_DISK" = x; then
65612         OUTPUT_DIR_IS_LOCAL="yes"
65613       else
65614         OUTPUT_DIR_IS_LOCAL="no"
65615       fi
65616     else
65617       # No df here, say it's local
65618       OUTPUT_DIR_IS_LOCAL="yes"
65619     fi
65620   else
65621     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65622       OUTPUT_DIR_IS_LOCAL="yes"
65623     else
65624       OUTPUT_DIR_IS_LOCAL="no"
65625     fi
65626   fi
65627 
65628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65629 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65630 
65631 
65632 
65633   # Check if the user has any old-style ALT_ variables set.
65634   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65635 
65636   # Before generating output files, test if they exist. If they do, this is a reconfigure.
65637   # Since we can't properly handle the dependencies for this, warn the user about the situation
65638   if test -e $OUTPUT_ROOT/spec.gmk; then
65639     IS_RECONFIGURE=yes
65640   else
65641     IS_RECONFIGURE=no
65642   fi
65643 
65644 
65645 # At the end, call the custom hook. (Dummy macro if no custom sources available)
65646 
65647 
65648 # This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65649 
65650   # Keep feature lists sorted and free of duplicates
65651   JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65652   JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65653   JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65654   JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65655   JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65656   JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65657   JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65658 
65659   # Validate features
65660   for variant in $JVM_VARIANTS; do
65661     { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65662 $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65663     features_var_name=JVM_FEATURES_$variant
65664     JVM_FEATURES_TO_TEST=${!features_var_name}
65665     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65666 $as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65667     NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65668     STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65669     INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65670     if test "x$INVALID_FEATURES" != x; then
65671       as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65672     fi
65673   done
65674 
65675 
65676 # We're messing a bit with internal autoconf variables to put the config.status
65677 # in the output directory instead of the current directory.
65678 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65679 
65680 # Create the actual output files. Now the main work of configure is done.
65681 cat >confcache <<\_ACEOF
65682 # This file is a shell script that caches the results of configure
65683 # tests run on this system so they can be shared between configure
65684 # scripts and configure runs, see configure's option --config-cache.
65685 # It is not useful on other systems.  If it contains results you don't
65686 # want to keep, you may remove or edit it.
65687 #
65688 # config.status only pays attention to the cache file if you give it
65689 # the --recheck option to rerun configure.
65690 #
65691 # `ac_cv_env_foo' variables (set or unset) will be overridden when
65692 # loading this file, other *unset* `ac_cv_foo' will be assigned the
65693 # following values.
65694 
65695 _ACEOF
65696 
65697 # The following way of writing the cache mishandles newlines in values,
65698 # but we know of no workaround that is simple, portable, and efficient.
65699 # So, we kill variables containing newlines.
65700 # Ultrix sh set writes to stderr and can't be redirected directly,
65701 # and sets the high bit in the cache file unless we assign to the vars.
65702 (
65703   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65704     eval ac_val=\$$ac_var
65705     case $ac_val in #(
65706     *${as_nl}*)
65707       case $ac_var in #(
65708       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65709 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65710       esac
65711       case $ac_var in #(
65712       _ | IFS | as_nl) ;; #(
65713       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65714       *) { eval $ac_var=; unset $ac_var;} ;;
65715       esac ;;
65716     esac
65717   done
65718 
65719   (set) 2>&1 |
65720     case $as_nl`(ac_space=' '; set) 2>&1` in #(
65721     *${as_nl}ac_space=\ *)
65722       # `set' does not quote correctly, so add quotes: double-quote
65723       # substitution turns \\\\ into \\, and sed turns \\ into \.
65724       sed -n \
65725         "s/'/'\\\\''/g;
65726           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65727       ;; #(
65728     *)
65729       # `set' quotes correctly as required by POSIX, so do not add quotes.
65730       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65731       ;;
65732     esac |
65733     sort
65734 ) |
65735   sed '
65736      /^ac_cv_env_/b end
65737      t clear
65738      :clear
65739      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65740      t end
65741      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65742      :end' >>confcache
65743 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65744   if test -w "$cache_file"; then
65745     if test "x$cache_file" != "x/dev/null"; then
65746       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65747 $as_echo "$as_me: updating cache $cache_file" >&6;}
65748       if test ! -f "$cache_file" || test -h "$cache_file"; then
65749         cat confcache >"$cache_file"
65750       else
65751         case $cache_file in #(
65752         */* | ?:*)
65753           mv -f confcache "$cache_file"$$ &&
65754           mv -f "$cache_file"$$ "$cache_file" ;; #(
65755         *)
65756           mv -f confcache "$cache_file" ;;
65757         esac
65758       fi
65759     fi
65760   else
65761     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65762 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65763   fi
65764 fi
65765 rm -f confcache
65766 
65767 test "x$prefix" = xNONE && prefix=$ac_default_prefix
65768 # Let make expand exec_prefix.
65769 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65770 
65771 # Transform confdefs.h into DEFS.
65772 # Protect against shell expansion while executing Makefile rules.
65773 # Protect against Makefile macro expansion.
65774 #
65775 # If the first sed substitution is executed (which looks for macros that
65776 # take arguments), then branch to the quote section.  Otherwise,
65777 # look for a macro that doesn't take arguments.
65778 ac_script='
65779 :mline
65780 /\\$/{
65781  N
65782  s,\\\n,,
65783  b mline
65784 }
65785 t clear
65786 :clear
65787 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
65788 t quote
65789 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
65790 t quote
65791 b any
65792 :quote
65793 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65794 s/\[/\\&/g
65795 s/\]/\\&/g
65796 s/\$/$$/g
65797 H
65798 :any
65799 ${
65800         g
65801         s/^\n//
65802         s/\n/ /g
65803         p
65804 }
65805 '
65806 DEFS=`sed -n "$ac_script" confdefs.h`
65807 
65808 
65809 ac_libobjs=
65810 ac_ltlibobjs=
65811 U=
65812 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65813   # 1. Remove the extension, and $U if already installed.
65814   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65815   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65816   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65817   #    will be set to the directory where LIBOBJS objects are built.
65818   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65819   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65820 done
65821 LIBOBJS=$ac_libobjs
65822 
65823 LTLIBOBJS=$ac_ltlibobjs
65824 
65825 
65826 
65827 : "${CONFIG_STATUS=./config.status}"
65828 ac_write_fail=0
65829 ac_clean_files_save=$ac_clean_files
65830 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65831 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65832 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65833 as_write_fail=0
65834 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65835 #! $SHELL
65836 # Generated by $as_me.
65837 # Run this file to recreate the current configuration.
65838 # Compiler output produced by configure, useful for debugging
65839 # configure, is in config.log if it exists.
65840 
65841 debug=false
65842 ac_cs_recheck=false
65843 ac_cs_silent=false
65844 
65845 SHELL=\${CONFIG_SHELL-$SHELL}
65846 export SHELL
65847 _ASEOF
65848 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65849 ## -------------------- ##
65850 ## M4sh Initialization. ##
65851 ## -------------------- ##
65852 
65853 # Be more Bourne compatible
65854 DUALCASE=1; export DUALCASE # for MKS sh
65855 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65856   emulate sh
65857   NULLCMD=:
65858   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65859   # is contrary to our usage.  Disable this feature.
65860   alias -g '${1+"$@"}'='"$@"'
65861   setopt NO_GLOB_SUBST
65862 else
65863   case `(set -o) 2>/dev/null` in #(
65864   *posix*) :
65865     set -o posix ;; #(
65866   *) :
65867      ;;
65868 esac
65869 fi
65870 
65871 
65872 as_nl='
65873 '
65874 export as_nl
65875 # Printing a long string crashes Solaris 7 /usr/bin/printf.
65876 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65877 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65878 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65879 # Prefer a ksh shell builtin over an external printf program on Solaris,
65880 # but without wasting forks for bash or zsh.
65881 if test -z "$BASH_VERSION$ZSH_VERSION" \
65882     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65883   as_echo='print -r --'
65884   as_echo_n='print -rn --'
65885 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65886   as_echo='printf %s\n'
65887   as_echo_n='printf %s'
65888 else
65889   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65890     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65891     as_echo_n='/usr/ucb/echo -n'
65892   else
65893     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65894     as_echo_n_body='eval
65895       arg=$1;
65896       case $arg in #(
65897       *"$as_nl"*)
65898         expr "X$arg" : "X\\(.*\\)$as_nl";
65899         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65900       esac;
65901       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65902     '
65903     export as_echo_n_body
65904     as_echo_n='sh -c $as_echo_n_body as_echo'
65905   fi
65906   export as_echo_body
65907   as_echo='sh -c $as_echo_body as_echo'
65908 fi
65909 
65910 # The user is always right.
65911 if test "${PATH_SEPARATOR+set}" != set; then
65912   PATH_SEPARATOR=:
65913   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65914     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65915       PATH_SEPARATOR=';'
65916   }
65917 fi
65918 
65919 
65920 # IFS
65921 # We need space, tab and new line, in precisely that order.  Quoting is
65922 # there to prevent editors from complaining about space-tab.
65923 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
65924 # splitting by setting IFS to empty value.)
65925 IFS=" ""        $as_nl"
65926 
65927 # Find who we are.  Look in the path if we contain no directory separator.
65928 as_myself=
65929 case $0 in #((
65930   *[\\/]* ) as_myself=$0 ;;
65931   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65932 for as_dir in $PATH
65933 do
65934   IFS=$as_save_IFS
65935   test -z "$as_dir" && as_dir=.
65936     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65937   done
65938 IFS=$as_save_IFS
65939 
65940      ;;
65941 esac
65942 # We did not find ourselves, most probably we were run as `sh COMMAND'
65943 # in which case we are not to be found in the path.
65944 if test "x$as_myself" = x; then
65945   as_myself=$0
65946 fi
65947 if test ! -f "$as_myself"; then
65948   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65949   exit 1
65950 fi
65951 
65952 # Unset variables that we do not need and which cause bugs (e.g. in
65953 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65954 # suppresses any "Segmentation fault" message there.  '((' could
65955 # trigger a bug in pdksh 5.2.14.
65956 for as_var in BASH_ENV ENV MAIL MAILPATH
65957 do eval test x\${$as_var+set} = xset \
65958   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65959 done
65960 PS1='$ '
65961 PS2='> '
65962 PS4='+ '
65963 
65964 # NLS nuisances.
65965 LC_ALL=C
65966 export LC_ALL
65967 LANGUAGE=C
65968 export LANGUAGE
65969 
65970 # CDPATH.
65971 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65972 
65973 
65974 # as_fn_error STATUS ERROR [LINENO LOG_FD]
65975 # ----------------------------------------
65976 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65977 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65978 # script with STATUS, using 1 if that was 0.
65979 as_fn_error ()
65980 {
65981   as_status=$1; test $as_status -eq 0 && as_status=1
65982   if test "$4"; then
65983     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65984     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65985   fi
65986   $as_echo "$as_me: error: $2" >&2
65987   as_fn_exit $as_status
65988 } # as_fn_error
65989 
65990 
65991 # as_fn_set_status STATUS
65992 # -----------------------
65993 # Set $? to STATUS, without forking.
65994 as_fn_set_status ()
65995 {
65996   return $1
65997 } # as_fn_set_status
65998 
65999 # as_fn_exit STATUS
66000 # -----------------
66001 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66002 as_fn_exit ()
66003 {
66004   set +e
66005   as_fn_set_status $1
66006   exit $1
66007 } # as_fn_exit
66008 
66009 # as_fn_unset VAR
66010 # ---------------
66011 # Portably unset VAR.
66012 as_fn_unset ()
66013 {
66014   { eval $1=; unset $1;}
66015 }
66016 as_unset=as_fn_unset
66017 # as_fn_append VAR VALUE
66018 # ----------------------
66019 # Append the text in VALUE to the end of the definition contained in VAR. Take
66020 # advantage of any shell optimizations that allow amortized linear growth over
66021 # repeated appends, instead of the typical quadratic growth present in naive
66022 # implementations.
66023 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66024   eval 'as_fn_append ()
66025   {
66026     eval $1+=\$2
66027   }'
66028 else
66029   as_fn_append ()
66030   {
66031     eval $1=\$$1\$2
66032   }
66033 fi # as_fn_append
66034 
66035 # as_fn_arith ARG...
66036 # ------------------
66037 # Perform arithmetic evaluation on the ARGs, and store the result in the
66038 # global $as_val. Take advantage of shells that can avoid forks. The arguments
66039 # must be portable across $(()) and expr.
66040 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66041   eval 'as_fn_arith ()
66042   {
66043     as_val=$(( $* ))
66044   }'
66045 else
66046   as_fn_arith ()
66047   {
66048     as_val=`expr "$@" || test $? -eq 1`
66049   }
66050 fi # as_fn_arith
66051 
66052 
66053 if expr a : '\(a\)' >/dev/null 2>&1 &&
66054    test "X`expr 00001 : '.*\(...\)'`" = X001; then
66055   as_expr=expr
66056 else
66057   as_expr=false
66058 fi
66059 
66060 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66061   as_basename=basename
66062 else
66063   as_basename=false
66064 fi
66065 
66066 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66067   as_dirname=dirname
66068 else
66069   as_dirname=false
66070 fi
66071 
66072 as_me=`$as_basename -- "$0" ||
66073 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66074          X"$0" : 'X\(//\)$' \| \
66075          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66076 $as_echo X/"$0" |
66077     sed '/^.*\/\([^/][^/]*\)\/*$/{
66078             s//\1/
66079             q
66080           }
66081           /^X\/\(\/\/\)$/{
66082             s//\1/
66083             q
66084           }
66085           /^X\/\(\/\).*/{
66086             s//\1/
66087             q
66088           }
66089           s/.*/./; q'`
66090 
66091 # Avoid depending upon Character Ranges.
66092 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66093 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66094 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66095 as_cr_digits='0123456789'
66096 as_cr_alnum=$as_cr_Letters$as_cr_digits
66097 
66098 ECHO_C= ECHO_N= ECHO_T=
66099 case `echo -n x` in #(((((
66100 -n*)
66101   case `echo 'xy\c'` in
66102   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
66103   xy)  ECHO_C='\c';;
66104   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66105        ECHO_T=' ';;
66106   esac;;
66107 *)
66108   ECHO_N='-n';;
66109 esac
66110 
66111 rm -f conf$$ conf$$.exe conf$$.file
66112 if test -d conf$$.dir; then
66113   rm -f conf$$.dir/conf$$.file
66114 else
66115   rm -f conf$$.dir
66116   mkdir conf$$.dir 2>/dev/null
66117 fi
66118 if (echo >conf$$.file) 2>/dev/null; then
66119   if ln -s conf$$.file conf$$ 2>/dev/null; then
66120     as_ln_s='ln -s'
66121     # ... but there are two gotchas:
66122     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66123     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66124     # In both cases, we have to default to `cp -pR'.
66125     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66126       as_ln_s='cp -pR'
66127   elif ln conf$$.file conf$$ 2>/dev/null; then
66128     as_ln_s=ln
66129   else
66130     as_ln_s='cp -pR'
66131   fi
66132 else
66133   as_ln_s='cp -pR'
66134 fi
66135 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66136 rmdir conf$$.dir 2>/dev/null
66137 
66138 
66139 # as_fn_mkdir_p
66140 # -------------
66141 # Create "$as_dir" as a directory, including parents if necessary.
66142 as_fn_mkdir_p ()
66143 {
66144 
66145   case $as_dir in #(
66146   -*) as_dir=./$as_dir;;
66147   esac
66148   test -d "$as_dir" || eval $as_mkdir_p || {
66149     as_dirs=
66150     while :; do
66151       case $as_dir in #(
66152       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66153       *) as_qdir=$as_dir;;
66154       esac
66155       as_dirs="'$as_qdir' $as_dirs"
66156       as_dir=`$as_dirname -- "$as_dir" ||
66157 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66158          X"$as_dir" : 'X\(//\)[^/]' \| \
66159          X"$as_dir" : 'X\(//\)$' \| \
66160          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66161 $as_echo X"$as_dir" |
66162     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66163             s//\1/
66164             q
66165           }
66166           /^X\(\/\/\)[^/].*/{
66167             s//\1/
66168             q
66169           }
66170           /^X\(\/\/\)$/{
66171             s//\1/
66172             q
66173           }
66174           /^X\(\/\).*/{
66175             s//\1/
66176             q
66177           }
66178           s/.*/./; q'`
66179       test -d "$as_dir" && break
66180     done
66181     test -z "$as_dirs" || eval "mkdir $as_dirs"
66182   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66183 
66184 
66185 } # as_fn_mkdir_p
66186 if mkdir -p . 2>/dev/null; then
66187   as_mkdir_p='mkdir -p "$as_dir"'
66188 else
66189   test -d ./-p && rmdir ./-p
66190   as_mkdir_p=false
66191 fi
66192 
66193 
66194 # as_fn_executable_p FILE
66195 # -----------------------
66196 # Test if FILE is an executable regular file.
66197 as_fn_executable_p ()
66198 {
66199   test -f "$1" && test -x "$1"
66200 } # as_fn_executable_p
66201 as_test_x='test -x'
66202 as_executable_p=as_fn_executable_p
66203 
66204 # Sed expression to map a string onto a valid CPP name.
66205 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66206 
66207 # Sed expression to map a string onto a valid variable name.
66208 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66209 
66210 
66211 exec 6>&1
66212 ## ----------------------------------- ##
66213 ## Main body of $CONFIG_STATUS script. ##
66214 ## ----------------------------------- ##
66215 _ASEOF
66216 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66217 
66218 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66219 # Save the log message, to keep $0 and so on meaningful, and to
66220 # report actual input values of CONFIG_FILES etc. instead of their
66221 # values after options handling.
66222 ac_log="
66223 This file was extended by OpenJDK $as_me jdk9, which was
66224 generated by GNU Autoconf 2.69.  Invocation command line was
66225 
66226   CONFIG_FILES    = $CONFIG_FILES
66227   CONFIG_HEADERS  = $CONFIG_HEADERS
66228   CONFIG_LINKS    = $CONFIG_LINKS
66229   CONFIG_COMMANDS = $CONFIG_COMMANDS
66230   $ $0 $@
66231 
66232 on `(hostname || uname -n) 2>/dev/null | sed 1q`
66233 "
66234 
66235 _ACEOF
66236 
66237 case $ac_config_files in *"
66238 "*) set x $ac_config_files; shift; ac_config_files=$*;;
66239 esac
66240 
66241 
66242 
66243 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66244 # Files that config.status was made for.
66245 config_files="$ac_config_files"
66246 
66247 _ACEOF
66248 
66249 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66250 ac_cs_usage="\
66251 \`$as_me' instantiates files and other configuration actions
66252 from templates according to the current configuration.  Unless the files
66253 and actions are specified as TAGs, all are instantiated by default.
66254 
66255 Usage: $0 [OPTION]... [TAG]...
66256 
66257   -h, --help       print this help, then exit
66258   -V, --version    print version number and configuration settings, then exit
66259       --config     print configuration, then exit
66260   -q, --quiet, --silent
66261                    do not print progress messages
66262   -d, --debug      don't remove temporary files
66263       --recheck    update $as_me by reconfiguring in the same conditions
66264       --file=FILE[:TEMPLATE]
66265                    instantiate the configuration file FILE
66266 
66267 Configuration files:
66268 $config_files
66269 
66270 Report bugs to <build-dev@openjdk.java.net>.
66271 OpenJDK home page: <http://openjdk.java.net>."
66272 
66273 _ACEOF
66274 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66275 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66276 ac_cs_version="\\
66277 OpenJDK config.status jdk9
66278 configured by $0, generated by GNU Autoconf 2.69,
66279   with options \\"\$ac_cs_config\\"
66280 
66281 Copyright (C) 2012 Free Software Foundation, Inc.
66282 This config.status script is free software; the Free Software Foundation
66283 gives unlimited permission to copy, distribute and modify it."
66284 
66285 ac_pwd='$ac_pwd'
66286 srcdir='$srcdir'
66287 AWK='$AWK'
66288 test -n "\$AWK" || AWK=awk
66289 _ACEOF
66290 
66291 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66292 # The default lists apply if the user does not specify any file.
66293 ac_need_defaults=:
66294 while test $# != 0
66295 do
66296   case $1 in
66297   --*=?*)
66298     ac_option=`expr "X$1" : 'X\([^=]*\)='`
66299     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66300     ac_shift=:
66301     ;;
66302   --*=)
66303     ac_option=`expr "X$1" : 'X\([^=]*\)='`
66304     ac_optarg=
66305     ac_shift=:
66306     ;;
66307   *)
66308     ac_option=$1
66309     ac_optarg=$2
66310     ac_shift=shift
66311     ;;
66312   esac
66313 
66314   case $ac_option in
66315   # Handling of the options.
66316   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66317     ac_cs_recheck=: ;;
66318   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66319     $as_echo "$ac_cs_version"; exit ;;
66320   --config | --confi | --conf | --con | --co | --c )
66321     $as_echo "$ac_cs_config"; exit ;;
66322   --debug | --debu | --deb | --de | --d | -d )
66323     debug=: ;;
66324   --file | --fil | --fi | --f )
66325     $ac_shift
66326     case $ac_optarg in
66327     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66328     '') as_fn_error $? "missing file argument" ;;
66329     esac
66330     as_fn_append CONFIG_FILES " '$ac_optarg'"
66331     ac_need_defaults=false;;
66332   --he | --h |  --help | --hel | -h )
66333     $as_echo "$ac_cs_usage"; exit ;;
66334   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66335   | -silent | --silent | --silen | --sile | --sil | --si | --s)
66336     ac_cs_silent=: ;;
66337 
66338   # This is an error.
66339   -*) as_fn_error $? "unrecognized option: \`$1'
66340 Try \`$0 --help' for more information." ;;
66341 
66342   *) as_fn_append ac_config_targets " $1"
66343      ac_need_defaults=false ;;
66344 
66345   esac
66346   shift
66347 done
66348 
66349 ac_configure_extra_args=
66350 
66351 if $ac_cs_silent; then
66352   exec 6>/dev/null
66353   ac_configure_extra_args="$ac_configure_extra_args --silent"
66354 fi
66355 
66356 _ACEOF
66357 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66358 if \$ac_cs_recheck; then
66359   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66360   shift
66361   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66362   CONFIG_SHELL='$SHELL'
66363   export CONFIG_SHELL
66364   exec "\$@"
66365 fi
66366 
66367 _ACEOF
66368 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66369 exec 5>>config.log
66370 {
66371   echo
66372   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66373 ## Running $as_me. ##
66374 _ASBOX
66375   $as_echo "$ac_log"
66376 } >&5
66377 
66378 _ACEOF
66379 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66380 _ACEOF
66381 
66382 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66383 
66384 # Handling of arguments.
66385 for ac_config_target in $ac_config_targets
66386 do
66387   case $ac_config_target in
66388     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66389     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66390     "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66391     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66392     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66393 
66394   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66395   esac
66396 done
66397 
66398 
66399 # If the user did not use the arguments to specify the items to instantiate,
66400 # then the envvar interface is used.  Set only those that are not.
66401 # We use the long form for the default assignment because of an extremely
66402 # bizarre bug on SunOS 4.1.3.
66403 if $ac_need_defaults; then
66404   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66405 fi
66406 
66407 # Have a temporary directory for convenience.  Make it in the build tree
66408 # simply because there is no reason against having it here, and in addition,
66409 # creating and moving files from /tmp can sometimes cause problems.
66410 # Hook for its removal unless debugging.
66411 # Note that there is a small window in which the directory will not be cleaned:
66412 # after its creation but before its name has been assigned to `$tmp'.
66413 $debug ||
66414 {
66415   tmp= ac_tmp=
66416   trap 'exit_status=$?
66417   : "${ac_tmp:=$tmp}"
66418   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66419 ' 0
66420   trap 'as_fn_exit 1' 1 2 13 15
66421 }
66422 # Create a (secure) tmp directory for tmp files.
66423 
66424 {
66425   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66426   test -d "$tmp"
66427 }  ||
66428 {
66429   tmp=./conf$$-$RANDOM
66430   (umask 077 && mkdir "$tmp")
66431 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66432 ac_tmp=$tmp
66433 
66434 # Set up the scripts for CONFIG_FILES section.
66435 # No need to generate them if there are no CONFIG_FILES.
66436 # This happens for instance with `./config.status config.h'.
66437 if test -n "$CONFIG_FILES"; then
66438 
66439 
66440 ac_cr=`echo X | tr X '\015'`
66441 # On cygwin, bash can eat \r inside `` if the user requested igncr.
66442 # But we know of no other shell where ac_cr would be empty at this
66443 # point, so we can use a bashism as a fallback.
66444 if test "x$ac_cr" = x; then
66445   eval ac_cr=\$\'\\r\'
66446 fi
66447 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66448 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66449   ac_cs_awk_cr='\\r'
66450 else
66451   ac_cs_awk_cr=$ac_cr
66452 fi
66453 
66454 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66455 _ACEOF
66456 
66457 
66458 {
66459   echo "cat >conf$$subs.awk <<_ACEOF" &&
66460   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66461   echo "_ACEOF"
66462 } >conf$$subs.sh ||
66463   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66464 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66465 ac_delim='%!_!# '
66466 for ac_last_try in false false false false false :; do
66467   . ./conf$$subs.sh ||
66468     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66469 
66470   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66471   if test $ac_delim_n = $ac_delim_num; then
66472     break
66473   elif $ac_last_try; then
66474     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66475   else
66476     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66477   fi
66478 done
66479 rm -f conf$$subs.sh
66480 
66481 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66482 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66483 _ACEOF
66484 sed -n '
66485 h
66486 s/^/S["/; s/!.*/"]=/
66487 p
66488 g
66489 s/^[^!]*!//
66490 :repl
66491 t repl
66492 s/'"$ac_delim"'$//
66493 t delim
66494 :nl
66495 h
66496 s/\(.\{148\}\)..*/\1/
66497 t more1
66498 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66499 p
66500 n
66501 b repl
66502 :more1
66503 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66504 p
66505 g
66506 s/.\{148\}//
66507 t nl
66508 :delim
66509 h
66510 s/\(.\{148\}\)..*/\1/
66511 t more2
66512 s/["\\]/\\&/g; s/^/"/; s/$/"/
66513 p
66514 b
66515 :more2
66516 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66517 p
66518 g
66519 s/.\{148\}//
66520 t delim
66521 ' <conf$$subs.awk | sed '
66522 /^[^""]/{
66523   N
66524   s/\n//
66525 }
66526 ' >>$CONFIG_STATUS || ac_write_fail=1
66527 rm -f conf$$subs.awk
66528 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66529 _ACAWK
66530 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66531   for (key in S) S_is_set[key] = 1
66532   FS = ""
66533 
66534 }
66535 {
66536   line = $ 0
66537   nfields = split(line, field, "@")
66538   substed = 0
66539   len = length(field[1])
66540   for (i = 2; i < nfields; i++) {
66541     key = field[i]
66542     keylen = length(key)
66543     if (S_is_set[key]) {
66544       value = S[key]
66545       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66546       len += length(value) + length(field[++i])
66547       substed = 1
66548     } else
66549       len += 1 + keylen
66550   }
66551 
66552   print line
66553 }
66554 
66555 _ACAWK
66556 _ACEOF
66557 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66558 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66559   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66560 else
66561   cat
66562 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66563   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66564 _ACEOF
66565 
66566 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66567 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66568 # trailing colons and then remove the whole line if VPATH becomes empty
66569 # (actually we leave an empty line to preserve line numbers).
66570 if test "x$srcdir" = x.; then
66571   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
66572 h
66573 s///
66574 s/^/:/
66575 s/[      ]*$/:/
66576 s/:\$(srcdir):/:/g
66577 s/:\${srcdir}:/:/g
66578 s/:@srcdir@:/:/g
66579 s/^:*//
66580 s/:*$//
66581 x
66582 s/\(=[   ]*\).*/\1/
66583 G
66584 s/\n//
66585 s/^[^=]*=[       ]*$//
66586 }'
66587 fi
66588 
66589 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66590 fi # test -n "$CONFIG_FILES"
66591 
66592 
66593 eval set X "  :F $CONFIG_FILES      "
66594 shift
66595 for ac_tag
66596 do
66597   case $ac_tag in
66598   :[FHLC]) ac_mode=$ac_tag; continue;;
66599   esac
66600   case $ac_mode$ac_tag in
66601   :[FHL]*:*);;
66602   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66603   :[FH]-) ac_tag=-:-;;
66604   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66605   esac
66606   ac_save_IFS=$IFS
66607   IFS=:
66608   set x $ac_tag
66609   IFS=$ac_save_IFS
66610   shift
66611   ac_file=$1
66612   shift
66613 
66614   case $ac_mode in
66615   :L) ac_source=$1;;
66616   :[FH])
66617     ac_file_inputs=
66618     for ac_f
66619     do
66620       case $ac_f in
66621       -) ac_f="$ac_tmp/stdin";;
66622       *) # Look for the file first in the build tree, then in the source tree
66623          # (if the path is not absolute).  The absolute path cannot be DOS-style,
66624          # because $ac_f cannot contain `:'.
66625          test -f "$ac_f" ||
66626            case $ac_f in
66627            [\\/$]*) false;;
66628            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66629            esac ||
66630            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66631       esac
66632       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66633       as_fn_append ac_file_inputs " '$ac_f'"
66634     done
66635 
66636     # Let's still pretend it is `configure' which instantiates (i.e., don't
66637     # use $as_me), people would be surprised to read:
66638     #    /* config.h.  Generated by config.status.  */
66639     configure_input='Generated from '`
66640           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66641         `' by configure.'
66642     if test x"$ac_file" != x-; then
66643       configure_input="$ac_file.  $configure_input"
66644       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66645 $as_echo "$as_me: creating $ac_file" >&6;}
66646     fi
66647     # Neutralize special characters interpreted by sed in replacement strings.
66648     case $configure_input in #(
66649     *\&* | *\|* | *\\* )
66650        ac_sed_conf_input=`$as_echo "$configure_input" |
66651        sed 's/[\\\\&|]/\\\\&/g'`;; #(
66652     *) ac_sed_conf_input=$configure_input;;
66653     esac
66654 
66655     case $ac_tag in
66656     *:-:* | *:-) cat >"$ac_tmp/stdin" \
66657       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66658     esac
66659     ;;
66660   esac
66661 
66662   ac_dir=`$as_dirname -- "$ac_file" ||
66663 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66664          X"$ac_file" : 'X\(//\)[^/]' \| \
66665          X"$ac_file" : 'X\(//\)$' \| \
66666          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66667 $as_echo X"$ac_file" |
66668     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66669             s//\1/
66670             q
66671           }
66672           /^X\(\/\/\)[^/].*/{
66673             s//\1/
66674             q
66675           }
66676           /^X\(\/\/\)$/{
66677             s//\1/
66678             q
66679           }
66680           /^X\(\/\).*/{
66681             s//\1/
66682             q
66683           }
66684           s/.*/./; q'`
66685   as_dir="$ac_dir"; as_fn_mkdir_p
66686   ac_builddir=.
66687 
66688 case "$ac_dir" in
66689 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66690 *)
66691   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66692   # A ".." for each directory in $ac_dir_suffix.
66693   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66694   case $ac_top_builddir_sub in
66695   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66696   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66697   esac ;;
66698 esac
66699 ac_abs_top_builddir=$ac_pwd
66700 ac_abs_builddir=$ac_pwd$ac_dir_suffix
66701 # for backward compatibility:
66702 ac_top_builddir=$ac_top_build_prefix
66703 
66704 case $srcdir in
66705   .)  # We are building in place.
66706     ac_srcdir=.
66707     ac_top_srcdir=$ac_top_builddir_sub
66708     ac_abs_top_srcdir=$ac_pwd ;;
66709   [\\/]* | ?:[\\/]* )  # Absolute name.
66710     ac_srcdir=$srcdir$ac_dir_suffix;
66711     ac_top_srcdir=$srcdir
66712     ac_abs_top_srcdir=$srcdir ;;
66713   *) # Relative name.
66714     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66715     ac_top_srcdir=$ac_top_build_prefix$srcdir
66716     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66717 esac
66718 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66719 
66720 
66721   case $ac_mode in
66722   :F)
66723   #
66724   # CONFIG_FILE
66725   #
66726 
66727 _ACEOF
66728 
66729 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66730 # If the template does not know about datarootdir, expand it.
66731 # FIXME: This hack should be removed a few years after 2.60.
66732 ac_datarootdir_hack=; ac_datarootdir_seen=
66733 ac_sed_dataroot='
66734 /datarootdir/ {
66735   p
66736   q
66737 }
66738 /@datadir@/p
66739 /@docdir@/p
66740 /@infodir@/p
66741 /@localedir@/p
66742 /@mandir@/p'
66743 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66744 *datarootdir*) ac_datarootdir_seen=yes;;
66745 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66746   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66747 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66748 _ACEOF
66749 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66750   ac_datarootdir_hack='
66751   s&@datadir@&$datadir&g
66752   s&@docdir@&$docdir&g
66753   s&@infodir@&$infodir&g
66754   s&@localedir@&$localedir&g
66755   s&@mandir@&$mandir&g
66756   s&\\\${datarootdir}&$datarootdir&g' ;;
66757 esac
66758 _ACEOF
66759 
66760 # Neutralize VPATH when `$srcdir' = `.'.
66761 # Shell code in configure.ac might set extrasub.
66762 # FIXME: do we really want to maintain this feature?
66763 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66764 ac_sed_extra="$ac_vpsub
66765 $extrasub
66766 _ACEOF
66767 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66768 :t
66769 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66770 s|@configure_input@|$ac_sed_conf_input|;t t
66771 s&@top_builddir@&$ac_top_builddir_sub&;t t
66772 s&@top_build_prefix@&$ac_top_build_prefix&;t t
66773 s&@srcdir@&$ac_srcdir&;t t
66774 s&@abs_srcdir@&$ac_abs_srcdir&;t t
66775 s&@top_srcdir@&$ac_top_srcdir&;t t
66776 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66777 s&@builddir@&$ac_builddir&;t t
66778 s&@abs_builddir@&$ac_abs_builddir&;t t
66779 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66780 $ac_datarootdir_hack
66781 "
66782 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66783   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66784 
66785 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66786   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66787   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
66788       "$ac_tmp/out"`; test -z "$ac_out"; } &&
66789   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66790 which seems to be undefined.  Please make sure it is defined" >&5
66791 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66792 which seems to be undefined.  Please make sure it is defined" >&2;}
66793 
66794   rm -f "$ac_tmp/stdin"
66795   case $ac_file in
66796   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66797   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66798   esac \
66799   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66800  ;;
66801 
66802 
66803 
66804   esac
66805 
66806 done # for ac_tag
66807 
66808 
66809 as_fn_exit 0
66810 _ACEOF
66811 ac_clean_files=$ac_clean_files_save
66812 
66813 test $ac_write_fail = 0 ||
66814   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66815 
66816 
66817 # configure is writing to config.log, and then calls config.status.
66818 # config.status does its own redirection, appending to config.log.
66819 # Unfortunately, on DOS this fails, as config.log is still kept open
66820 # by configure, so config.status won't be able to write to it; its
66821 # output is simply discarded.  So we exec the FD to /dev/null,
66822 # effectively closing config.log, so it can be properly (re)opened and
66823 # appended to by config.status.  When coming back to configure, we
66824 # need to make the FD available again.
66825 if test "$no_create" != yes; then
66826   ac_cs_success=:
66827   ac_config_status_args=
66828   test "$silent" = yes &&
66829     ac_config_status_args="$ac_config_status_args --quiet"
66830   exec 5>/dev/null
66831   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66832   exec 5>>config.log
66833   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66834   # would make configure fail if this is the last instruction.
66835   $ac_cs_success || as_fn_exit 1
66836 fi
66837 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66838   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66839 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66840 fi
66841 
66842 
66843 # After AC_OUTPUT, we need to do final work
66844 
66845 
66846   # Try to move config.log (generated by autoconf) to the configure-support directory.
66847   if test -e ./config.log; then
66848     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66849   fi
66850 
66851   # Rotate our log file (configure.log)
66852   if test -e "$OUTPUT_ROOT/configure.log.old"; then
66853     $RM -f "$OUTPUT_ROOT/configure.log.old"
66854   fi
66855   if test -e "$OUTPUT_ROOT/configure.log"; then
66856     $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66857   fi
66858 
66859   # Move configure.log from current directory to the build output root
66860   if test -e ./configure.log; then
66861     $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66862   fi
66863 
66864   # Make the compare script executable
66865   $CHMOD +x $OUTPUT_ROOT/compare.sh
66866 
66867 
66868 # Finally output some useful information to the user
66869 
66870   # Finally output some useful information to the user
66871 
66872   printf "\n"
66873   printf "====================================================\n"
66874   if test "x$no_create" != "xyes"; then
66875     if test "x$IS_RECONFIGURE" != "xyes"; then
66876       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66877     else
66878       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66879     fi
66880   else
66881     if test "x$IS_RECONFIGURE" != "xyes"; then
66882       printf "A configuration has been successfully checked but not created\n"
66883     else
66884       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66885     fi
66886   fi
66887   if test "x$CONFIGURE_COMMAND_LINE" != x; then
66888     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66889   else
66890     printf "using default settings.\n"
66891   fi
66892 
66893   printf "\n"
66894   printf "Configuration summary:\n"
66895   printf "* Debug level:    $DEBUG_LEVEL\n"
66896   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66897   printf "* JDK variant:    $JDK_VARIANT\n"
66898   printf "* JVM variants:   $JVM_VARIANTS\n"
66899   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66900   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66901 
66902   printf "\n"
66903   printf "Tools summary:\n"
66904   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66905     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66906   fi
66907   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66908   if test "x$TOOLCHAIN_VERSION" != "x"; then
66909     print_version=" $TOOLCHAIN_VERSION"
66910   fi
66911   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66912   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66913   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66914 
66915   printf "\n"
66916   printf "Build performance summary:\n"
66917   printf "* Cores to use:   $JOBS\n"
66918   printf "* Memory limit:   $MEMORY_SIZE MB\n"
66919   if test "x$CCACHE_STATUS" != "x"; then
66920     printf "* ccache status:  $CCACHE_STATUS\n"
66921   fi
66922   printf "\n"
66923 
66924   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66925     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66926     printf "will result in longer build times.\n"
66927     printf "\n"
66928   fi
66929 
66930   if test "x$FOUND_ALT_VARIABLES" != "x"; then
66931     printf "WARNING: You have old-style ALT_ environment variables set.\n"
66932     printf "These are not respected, and will be ignored. It is recommended\n"
66933     printf "that you clean your environment. The following variables are set:\n"
66934     printf "$FOUND_ALT_VARIABLES\n"
66935     printf "\n"
66936   fi
66937 
66938   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66939     printf "WARNING: Your build output directory is not on a local disk.\n"
66940     printf "This will severely degrade build performance!\n"
66941     printf "It is recommended that you create an output directory on a local disk,\n"
66942     printf "and run the configure script again from that directory.\n"
66943     printf "\n"
66944   fi
66945 
66946   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66947     printf "WARNING: The result of this configuration has overridden an older\n"
66948     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66949     printf "proper build. Failure to do so might result in strange build problems.\n"
66950     printf "\n"
66951   fi
66952 
66953   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66954     printf "WARNING: The result of this configuration was not saved.\n"
66955     printf "You should run without '--no-create | -n' to create the configuration.\n"
66956     printf "\n"
66957   fi
66958 
66959 
66960 
66961   # Locate config.log.
66962   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66963     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66964   elif test -e "./config.log"; then
66965     CONFIG_LOG_PATH="."
66966   fi
66967 
66968   if test -e "$CONFIG_LOG_PATH/config.log"; then
66969     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66970     if test $? -eq 0; then
66971       printf "The following warnings were produced. Repeated here for convenience:\n"
66972       # We must quote sed expression (using []) to stop m4 from eating the [].
66973       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66974       printf "\n"
66975     fi
66976   fi
66977