1 #!/bin/bash
   2 #
   3 # ##########################################################
   4 # ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
   5 # ##########################################################
   6 #
   7 #! /bin/sh
   8 # Guess values for system-dependent variables and create Makefiles.
   9 # Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
  10 #
  11 # Report bugs to <build-dev@openjdk.java.net>.
  12 #
  13 #
  14 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
  15 #
  16 #
  17 # This configure script is free software; the Free Software Foundation
  18 # gives unlimited permission to copy, distribute and modify it.
  19 ## -------------------- ##
  20 ## M4sh Initialization. ##
  21 ## -------------------- ##
  22 
  23 # Be more Bourne compatible
  24 DUALCASE=1; export DUALCASE # for MKS sh
  25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  26   emulate sh
  27   NULLCMD=:
  28   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  29   # is contrary to our usage.  Disable this feature.
  30   alias -g '${1+"$@"}'='"$@"'
  31   setopt NO_GLOB_SUBST
  32 else
  33   case `(set -o) 2>/dev/null` in #(
  34   *posix*) :
  35     set -o posix ;; #(
  36   *) :
  37      ;;
  38 esac
  39 fi
  40 
  41 
  42 as_nl='
  43 '
  44 export as_nl
  45 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  46 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  47 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  48 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  49 # Prefer a ksh shell builtin over an external printf program on Solaris,
  50 # but without wasting forks for bash or zsh.
  51 if test -z "$BASH_VERSION$ZSH_VERSION" \
  52     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  53   as_echo='print -r --'
  54   as_echo_n='print -rn --'
  55 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  56   as_echo='printf %s\n'
  57   as_echo_n='printf %s'
  58 else
  59   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  60     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  61     as_echo_n='/usr/ucb/echo -n'
  62   else
  63     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  64     as_echo_n_body='eval
  65       arg=$1;
  66       case $arg in #(
  67       *"$as_nl"*)
  68         expr "X$arg" : "X\\(.*\\)$as_nl";
  69         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  70       esac;
  71       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  72     '
  73     export as_echo_n_body
  74     as_echo_n='sh -c $as_echo_n_body as_echo'
  75   fi
  76   export as_echo_body
  77   as_echo='sh -c $as_echo_body as_echo'
  78 fi
  79 
  80 # The user is always right.
  81 if test "${PATH_SEPARATOR+set}" != set; then
  82   PATH_SEPARATOR=:
  83   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  84     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  85       PATH_SEPARATOR=';'
  86   }
  87 fi
  88 
  89 
  90 # IFS
  91 # We need space, tab and new line, in precisely that order.  Quoting is
  92 # there to prevent editors from complaining about space-tab.
  93 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  94 # splitting by setting IFS to empty value.)
  95 IFS=" ""        $as_nl"
  96 
  97 # Find who we are.  Look in the path if we contain no directory separator.
  98 as_myself=
  99 case $0 in #((
 100   *[\\/]* ) as_myself=$0 ;;
 101   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 102 for as_dir in $PATH
 103 do
 104   IFS=$as_save_IFS
 105   test -z "$as_dir" && as_dir=.
 106     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 107   done
 108 IFS=$as_save_IFS
 109 
 110      ;;
 111 esac
 112 # We did not find ourselves, most probably we were run as `sh COMMAND'
 113 # in which case we are not to be found in the path.
 114 if test "x$as_myself" = x; then
 115   as_myself=$0
 116 fi
 117 if test ! -f "$as_myself"; then
 118   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 119   exit 1
 120 fi
 121 
 122 # Unset variables that we do not need and which cause bugs (e.g. in
 123 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 124 # suppresses any "Segmentation fault" message there.  '((' could
 125 # trigger a bug in pdksh 5.2.14.
 126 for as_var in BASH_ENV ENV MAIL MAILPATH
 127 do eval test x\${$as_var+set} = xset \
 128   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 129 done
 130 PS1='$ '
 131 PS2='> '
 132 PS4='+ '
 133 
 134 # NLS nuisances.
 135 LC_ALL=C
 136 export LC_ALL
 137 LANGUAGE=C
 138 export LANGUAGE
 139 
 140 # CDPATH.
 141 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 142 
 143 # Use a proper internal environment variable to ensure we don't fall
 144   # into an infinite loop, continuously re-executing ourselves.
 145   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
 146     _as_can_reexec=no; export _as_can_reexec;
 147     # We cannot yet assume a decent shell, so we have to provide a
 148 # neutralization value for shells without unset; and this also
 149 # works around shells that cannot unset nonexistent variables.
 150 # Preserve -v and -x to the replacement shell.
 151 BASH_ENV=/dev/null
 152 ENV=/dev/null
 153 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 154 case $- in # ((((
 155   *v*x* | *x*v* ) as_opts=-vx ;;
 156   *v* ) as_opts=-v ;;
 157   *x* ) as_opts=-x ;;
 158   * ) as_opts= ;;
 159 esac
 160 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 161 # Admittedly, this is quite paranoid, since all the known shells bail
 162 # out after a failed `exec'.
 163 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 164 as_fn_exit 255
 165   fi
 166   # We don't want this to propagate to other subprocesses.
 167           { _as_can_reexec=; unset _as_can_reexec;}
 168 if test "x$CONFIG_SHELL" = x; then
 169   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 170   emulate sh
 171   NULLCMD=:
 172   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 173   # is contrary to our usage.  Disable this feature.
 174   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 175   setopt NO_GLOB_SUBST
 176 else
 177   case \`(set -o) 2>/dev/null\` in #(
 178   *posix*) :
 179     set -o posix ;; #(
 180   *) :
 181      ;;
 182 esac
 183 fi
 184 "
 185   as_required="as_fn_return () { (exit \$1); }
 186 as_fn_success () { as_fn_return 0; }
 187 as_fn_failure () { as_fn_return 1; }
 188 as_fn_ret_success () { return 0; }
 189 as_fn_ret_failure () { return 1; }
 190 
 191 exitcode=0
 192 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 193 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 194 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 195 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 196 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 197 
 198 else
 199   exitcode=1; echo positional parameters were not saved.
 200 fi
 201 test x\$exitcode = x0 || exit 1
 202 test -x / || exit 1"
 203   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 204   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 205   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 206   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 207 test \$(( 1 + 1 )) = 2 || exit 1"
 208   if (eval "$as_required") 2>/dev/null; then :
 209   as_have_required=yes
 210 else
 211   as_have_required=no
 212 fi
 213   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 214 
 215 else
 216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 217 as_found=false
 218 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 219 do
 220   IFS=$as_save_IFS
 221   test -z "$as_dir" && as_dir=.
 222   as_found=:
 223   case $as_dir in #(
 224          /*)
 225            for as_base in sh bash ksh sh5; do
 226              # Try only shells that exist, to save several forks.
 227              as_shell=$as_dir/$as_base
 228              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 229                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 230   CONFIG_SHELL=$as_shell as_have_required=yes
 231                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 232   break 2
 233 fi
 234 fi
 235            done;;
 236        esac
 237   as_found=false
 238 done
 239 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 240               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 241   CONFIG_SHELL=$SHELL as_have_required=yes
 242 fi; }
 243 IFS=$as_save_IFS
 244 
 245 
 246       if test "x$CONFIG_SHELL" != x; then :
 247   export CONFIG_SHELL
 248              # We cannot yet assume a decent shell, so we have to provide a
 249 # neutralization value for shells without unset; and this also
 250 # works around shells that cannot unset nonexistent variables.
 251 # Preserve -v and -x to the replacement shell.
 252 BASH_ENV=/dev/null
 253 ENV=/dev/null
 254 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 255 case $- in # ((((
 256   *v*x* | *x*v* ) as_opts=-vx ;;
 257   *v* ) as_opts=-v ;;
 258   *x* ) as_opts=-x ;;
 259   * ) as_opts= ;;
 260 esac
 261 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 262 # Admittedly, this is quite paranoid, since all the known shells bail
 263 # out after a failed `exec'.
 264 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 265 exit 255
 266 fi
 267 
 268     if test x$as_have_required = xno; then :
 269   $as_echo "$0: This script requires a shell more modern than all"
 270   $as_echo "$0: the shells that I found on your system."
 271   if test x${ZSH_VERSION+set} = xset ; then
 272     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 273     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 274   else
 275     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 276 $0: build-dev@openjdk.java.net about your system, including
 277 $0: any error possibly output before this message. Then
 278 $0: install a modern shell, or manually run the script
 279 $0: under such a shell if you do have one."
 280   fi
 281   exit 1
 282 fi
 283 fi
 284 fi
 285 SHELL=${CONFIG_SHELL-/bin/sh}
 286 export SHELL
 287 # Unset more variables known to interfere with behavior of common tools.
 288 CLICOLOR_FORCE= GREP_OPTIONS=
 289 unset CLICOLOR_FORCE GREP_OPTIONS
 290 
 291 ## --------------------- ##
 292 ## M4sh Shell Functions. ##
 293 ## --------------------- ##
 294 # as_fn_unset VAR
 295 # ---------------
 296 # Portably unset VAR.
 297 as_fn_unset ()
 298 {
 299   { eval $1=; unset $1;}
 300 }
 301 as_unset=as_fn_unset
 302 
 303 # as_fn_set_status STATUS
 304 # -----------------------
 305 # Set $? to STATUS, without forking.
 306 as_fn_set_status ()
 307 {
 308   return $1
 309 } # as_fn_set_status
 310 
 311 # as_fn_exit STATUS
 312 # -----------------
 313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 314 as_fn_exit ()
 315 {
 316   set +e
 317   as_fn_set_status $1
 318   exit $1
 319 } # as_fn_exit
 320 
 321 # as_fn_mkdir_p
 322 # -------------
 323 # Create "$as_dir" as a directory, including parents if necessary.
 324 as_fn_mkdir_p ()
 325 {
 326 
 327   case $as_dir in #(
 328   -*) as_dir=./$as_dir;;
 329   esac
 330   test -d "$as_dir" || eval $as_mkdir_p || {
 331     as_dirs=
 332     while :; do
 333       case $as_dir in #(
 334       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 335       *) as_qdir=$as_dir;;
 336       esac
 337       as_dirs="'$as_qdir' $as_dirs"
 338       as_dir=`$as_dirname -- "$as_dir" ||
 339 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 340          X"$as_dir" : 'X\(//\)[^/]' \| \
 341          X"$as_dir" : 'X\(//\)$' \| \
 342          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 343 $as_echo X"$as_dir" |
 344     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 345             s//\1/
 346             q
 347           }
 348           /^X\(\/\/\)[^/].*/{
 349             s//\1/
 350             q
 351           }
 352           /^X\(\/\/\)$/{
 353             s//\1/
 354             q
 355           }
 356           /^X\(\/\).*/{
 357             s//\1/
 358             q
 359           }
 360           s/.*/./; q'`
 361       test -d "$as_dir" && break
 362     done
 363     test -z "$as_dirs" || eval "mkdir $as_dirs"
 364   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 365 
 366 
 367 } # as_fn_mkdir_p
 368 
 369 # as_fn_executable_p FILE
 370 # -----------------------
 371 # Test if FILE is an executable regular file.
 372 as_fn_executable_p ()
 373 {
 374   test -f "$1" && test -x "$1"
 375 } # as_fn_executable_p
 376 # as_fn_append VAR VALUE
 377 # ----------------------
 378 # Append the text in VALUE to the end of the definition contained in VAR. Take
 379 # advantage of any shell optimizations that allow amortized linear growth over
 380 # repeated appends, instead of the typical quadratic growth present in naive
 381 # implementations.
 382 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 383   eval 'as_fn_append ()
 384   {
 385     eval $1+=\$2
 386   }'
 387 else
 388   as_fn_append ()
 389   {
 390     eval $1=\$$1\$2
 391   }
 392 fi # as_fn_append
 393 
 394 # as_fn_arith ARG...
 395 # ------------------
 396 # Perform arithmetic evaluation on the ARGs, and store the result in the
 397 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 398 # must be portable across $(()) and expr.
 399 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 400   eval 'as_fn_arith ()
 401   {
 402     as_val=$(( $* ))
 403   }'
 404 else
 405   as_fn_arith ()
 406   {
 407     as_val=`expr "$@" || test $? -eq 1`
 408   }
 409 fi # as_fn_arith
 410 
 411 
 412 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 413 # ----------------------------------------
 414 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 415 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 416 # script with STATUS, using 1 if that was 0.
 417 as_fn_error ()
 418 {
 419   as_status=$1; test $as_status -eq 0 && as_status=1
 420   if test "$4"; then
 421     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 422     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 423   fi
 424   $as_echo "$as_me: error: $2" >&2
 425   as_fn_exit $as_status
 426 } # as_fn_error
 427 
 428 if expr a : '\(a\)' >/dev/null 2>&1 &&
 429    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 430   as_expr=expr
 431 else
 432   as_expr=false
 433 fi
 434 
 435 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 436   as_basename=basename
 437 else
 438   as_basename=false
 439 fi
 440 
 441 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 442   as_dirname=dirname
 443 else
 444   as_dirname=false
 445 fi
 446 
 447 as_me=`$as_basename -- "$0" ||
 448 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 449          X"$0" : 'X\(//\)$' \| \
 450          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 451 $as_echo X/"$0" |
 452     sed '/^.*\/\([^/][^/]*\)\/*$/{
 453             s//\1/
 454             q
 455           }
 456           /^X\/\(\/\/\)$/{
 457             s//\1/
 458             q
 459           }
 460           /^X\/\(\/\).*/{
 461             s//\1/
 462             q
 463           }
 464           s/.*/./; q'`
 465 
 466 # Avoid depending upon Character Ranges.
 467 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 468 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 469 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 470 as_cr_digits='0123456789'
 471 as_cr_alnum=$as_cr_Letters$as_cr_digits
 472 
 473 
 474   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 475   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 476   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 477   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 478   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 479   sed -n '
 480     p
 481     /[$]LINENO/=
 482   ' <$as_myself |
 483     sed '
 484       s/[$]LINENO.*/&-/
 485       t lineno
 486       b
 487       :lineno
 488       N
 489       :loop
 490       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 491       t loop
 492       s/-\n.*//
 493     ' >$as_me.lineno &&
 494   chmod +x "$as_me.lineno" ||
 495     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 496 
 497   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
 498   # already done that, so ensure we don't try to do so again and fall
 499   # in an infinite loop.  This has already happened in practice.
 500   _as_can_reexec=no; export _as_can_reexec
 501   # Don't try to exec as it changes $[0], causing all sort of problems
 502   # (the dirname of $[0] is not the place where we might find the
 503   # original and so on.  Autoconf is especially sensitive to this).
 504   . "./$as_me.lineno"
 505   # Exit status is that of the last command.
 506   exit
 507 }
 508 
 509 ECHO_C= ECHO_N= ECHO_T=
 510 case `echo -n x` in #(((((
 511 -n*)
 512   case `echo 'xy\c'` in
 513   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 514   xy)  ECHO_C='\c';;
 515   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 516        ECHO_T=' ';;
 517   esac;;
 518 *)
 519   ECHO_N='-n';;
 520 esac
 521 
 522 rm -f conf$$ conf$$.exe conf$$.file
 523 if test -d conf$$.dir; then
 524   rm -f conf$$.dir/conf$$.file
 525 else
 526   rm -f conf$$.dir
 527   mkdir conf$$.dir 2>/dev/null
 528 fi
 529 if (echo >conf$$.file) 2>/dev/null; then
 530   if ln -s conf$$.file conf$$ 2>/dev/null; then
 531     as_ln_s='ln -s'
 532     # ... but there are two gotchas:
 533     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 534     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 535     # In both cases, we have to default to `cp -pR'.
 536     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 537       as_ln_s='cp -pR'
 538   elif ln conf$$.file conf$$ 2>/dev/null; then
 539     as_ln_s=ln
 540   else
 541     as_ln_s='cp -pR'
 542   fi
 543 else
 544   as_ln_s='cp -pR'
 545 fi
 546 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 547 rmdir conf$$.dir 2>/dev/null
 548 
 549 if mkdir -p . 2>/dev/null; then
 550   as_mkdir_p='mkdir -p "$as_dir"'
 551 else
 552   test -d ./-p && rmdir ./-p
 553   as_mkdir_p=false
 554 fi
 555 
 556 as_test_x='test -x'
 557 as_executable_p=as_fn_executable_p
 558 
 559 # Sed expression to map a string onto a valid CPP name.
 560 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 561 
 562 # Sed expression to map a string onto a valid variable name.
 563 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 564 
 565 
 566 test -n "$DJDIR" || exec 7<&0 </dev/null
 567 exec 6>&1
 568 
 569 # Name of the host.
 570 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 571 # so uname gets run too.
 572 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 573 
 574 #
 575 # Initializations.
 576 #
 577 ac_default_prefix=/usr/local
 578 ac_clean_files=
 579 ac_config_libobj_dir=.
 580 LIBOBJS=
 581 cross_compiling=no
 582 subdirs=
 583 MFLAGS=
 584 MAKEFLAGS=
 585 
 586 # Identity of this package.
 587 PACKAGE_NAME='OpenJDK'
 588 PACKAGE_TARNAME='openjdk'
 589 PACKAGE_VERSION='jdk9'
 590 PACKAGE_STRING='OpenJDK jdk9'
 591 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 592 PACKAGE_URL='http://openjdk.java.net'
 593 
 594 # Factoring default headers for most tests.
 595 ac_includes_default="\
 596 #include <stdio.h>
 597 #ifdef HAVE_SYS_TYPES_H
 598 # include <sys/types.h>
 599 #endif
 600 #ifdef HAVE_SYS_STAT_H
 601 # include <sys/stat.h>
 602 #endif
 603 #ifdef STDC_HEADERS
 604 # include <stdlib.h>
 605 # include <stddef.h>
 606 #else
 607 # ifdef HAVE_STDLIB_H
 608 #  include <stdlib.h>
 609 # endif
 610 #endif
 611 #ifdef HAVE_STRING_H
 612 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 613 #  include <memory.h>
 614 # endif
 615 # include <string.h>
 616 #endif
 617 #ifdef HAVE_STRINGS_H
 618 # include <strings.h>
 619 #endif
 620 #ifdef HAVE_INTTYPES_H
 621 # include <inttypes.h>
 622 #endif
 623 #ifdef HAVE_STDINT_H
 624 # include <stdint.h>
 625 #endif
 626 #ifdef HAVE_UNISTD_H
 627 # include <unistd.h>
 628 #endif"
 629 
 630 ac_subst_vars='LTLIBOBJS
 631 LIBOBJS
 632 CFLAGS_CCACHE
 633 CCACHE
 634 USE_PRECOMPILED_HEADER
 635 BUILD_ICECC
 636 ICECC
 637 ICECC_WRAPPER
 638 ICECC_CREATE_ENV
 639 ICECC_CMD
 640 ENABLE_JAVAC_SERVER
 641 ENABLE_SJAVAC
 642 SJAVAC_SERVER_JAVA_FLAGS
 643 SJAVAC_SERVER_JAVA
 644 JAVA_TOOL_FLAGS_SMALL
 645 JAVA_FLAGS_SMALL
 646 JAVA_FLAGS_JAVAC
 647 JAVA_FLAGS_BIG
 648 JAVA_FLAGS
 649 TEST_JOBS
 650 JOBS
 651 MEMORY_SIZE
 652 NUM_CORES
 653 ENABLE_INTREE_EC
 654 JVM_VARIANT_CORE
 655 JVM_VARIANT_ZEROSHARK
 656 JVM_VARIANT_ZERO
 657 JVM_VARIANT_HOTSPOT
 658 JVM_VARIANT_MINIMAL1
 659 JVM_VARIANT_CLIENT
 660 JVM_VARIANT_SERVER
 661 JVM_VARIANTS_COMMA
 662 TEST_IN_BUILD
 663 HOTSPOT_MAKE_ARGS
 664 MACOSX_UNIVERSAL
 665 DEBUG_CLASSFILES
 666 FASTDEBUG
 667 VARIANT
 668 USE_NEW_HOTSPOT_BUILD
 669 LIBZIP_CAN_USE_MMAP
 670 LIBDL
 671 LIBM
 672 USE_EXTERNAL_LCMS
 673 LCMS_LIBS
 674 LCMS_CFLAGS
 675 USE_EXTERNAL_LIBZ
 676 USE_EXTERNAL_LIBPNG
 677 PNG_LIBS
 678 PNG_CFLAGS
 679 USE_EXTERNAL_LIBGIF
 680 USE_EXTERNAL_LIBJPEG
 681 LLVM_LIBS
 682 LLVM_LDFLAGS
 683 LLVM_CFLAGS
 684 LLVM_CONFIG
 685 LIBFFI_LIBS
 686 LIBFFI_CFLAGS
 687 ALSA_LIBS
 688 ALSA_CFLAGS
 689 FREETYPE_BUNDLE_LIB_PATH
 690 FREETYPE_LIBS
 691 FREETYPE_CFLAGS
 692 CUPS_CFLAGS
 693 X_EXTRA_LIBS
 694 X_LIBS
 695 X_PRE_LIBS
 696 X_CFLAGS
 697 XMKMF
 698 MSVCP_DLL
 699 MSVCR_DLL
 700 LIBCXX
 701 STATIC_CXX_SETTING
 702 FIXPATH_DETACH_FLAG
 703 FIXPATH
 704 VALID_JVM_FEATURES
 705 JVM_FEATURES_custom
 706 JVM_FEATURES_zeroshark
 707 JVM_FEATURES_zero
 708 JVM_FEATURES_minimal
 709 JVM_FEATURES_core
 710 JVM_FEATURES_client
 711 JVM_FEATURES_server
 712 INCLUDE_DTRACE
 713 GCOV_ENABLED
 714 STRIP_POLICY
 715 DEBUG_BINARIES
 716 ZIP_EXTERNAL_DEBUG_SYMBOLS
 717 COPY_DEBUG_SYMBOLS
 718 COMPILE_WITH_DEBUG_SYMBOLS
 719 CFLAGS_WARNINGS_ARE_ERRORS
 720 BUILD_CC_DISABLE_WARNING_PREFIX
 721 DISABLE_WARNING_PREFIX
 722 HOTSPOT_SET_WARNINGS_AS_ERRORS
 723 WARNINGS_AS_ERRORS
 724 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 725 ZERO_ARCHFLAG
 726 LDFLAGS_TESTEXE
 727 LDFLAGS_TESTLIB
 728 CXXFLAGS_TESTEXE
 729 CXXFLAGS_TESTLIB
 730 CFLAGS_TESTEXE
 731 CFLAGS_TESTLIB
 732 OPENJDK_BUILD_JVM_LIBS
 733 OPENJDK_BUILD_JVM_ASFLAGS
 734 OPENJDK_BUILD_JVM_LDFLAGS
 735 OPENJDK_BUILD_JVM_CFLAGS
 736 OPENJDK_BUILD_LDFLAGS_HASH_STYLE
 737 OPENJDK_BUILD_LDFLAGS_CXX_JDK
 738 OPENJDK_BUILD_JDKEXE_LIBS
 739 OPENJDK_BUILD_JDKLIB_LIBS
 740 OPENJDK_BUILD_LDFLAGS_JDKEXE
 741 OPENJDK_BUILD_LDFLAGS_JDKLIB
 742 OPENJDK_BUILD_CXXFLAGS_JDKEXE
 743 OPENJDK_BUILD_CXXFLAGS_JDKLIB
 744 OPENJDK_BUILD_CFLAGS_JDKEXE
 745 OPENJDK_BUILD_CFLAGS_JDKLIB
 746 OPENJDK_BUILD_CXXSTD_CXXFLAG
 747 JVM_LIBS
 748 JVM_ASFLAGS
 749 JVM_LDFLAGS
 750 JVM_CFLAGS
 751 LDFLAGS_HASH_STYLE
 752 LDFLAGS_CXX_JDK
 753 JDKEXE_LIBS
 754 JDKLIB_LIBS
 755 LDFLAGS_JDKEXE
 756 LDFLAGS_JDKLIB
 757 CXXFLAGS_JDKEXE
 758 CXXFLAGS_JDKLIB
 759 CFLAGS_JDKEXE
 760 CFLAGS_JDKLIB
 761 MACOSX_VERSION_MIN
 762 NO_LIFETIME_DSE_CFLAG
 763 NO_NULL_POINTER_CHECK_CFLAG
 764 CXXSTD_CXXFLAG
 765 CXX_O_FLAG_SIZE
 766 CXX_O_FLAG_NONE
 767 CXX_O_FLAG_DEBUG
 768 CXX_O_FLAG_NORM
 769 CXX_O_FLAG_HI
 770 CXX_O_FLAG_HIGHEST
 771 CXX_O_FLAG_HIGHEST_JVM
 772 C_O_FLAG_SIZE
 773 C_O_FLAG_NONE
 774 C_O_FLAG_DEBUG
 775 C_O_FLAG_NORM
 776 C_O_FLAG_HI
 777 C_O_FLAG_HIGHEST
 778 C_O_FLAG_HIGHEST_JVM
 779 JVM_CFLAGS_SYMBOLS
 780 CXXFLAGS_DEBUG_SYMBOLS
 781 CFLAGS_DEBUG_SYMBOLS
 782 CXX_FLAG_DEPS
 783 C_FLAG_DEPS
 784 SHARED_LIBRARY_FLAGS
 785 SET_SHARED_LIBRARY_MAPFILE
 786 SET_SHARED_LIBRARY_NAME
 787 SET_SHARED_LIBRARY_ORIGIN
 788 SET_EXECUTABLE_ORIGIN
 789 CXX_FLAG_REORDER
 790 C_FLAG_REORDER
 791 JVM_RCFLAGS
 792 RC_FLAGS
 793 AR_OUT_OPTION
 794 LD_OUT_OPTION
 795 EXE_OUT_OPTION
 796 CC_OUT_OPTION
 797 STRIPFLAGS
 798 ARFLAGS
 799 COMPILER_BINDCMD_FILE_FLAG
 800 COMPILER_COMMAND_FILE_FLAG
 801 COMPILER_TARGET_BITS_FLAG
 802 JT_HOME
 803 JTREGEXE
 804 HOTSPOT_TOOLCHAIN_TYPE
 805 USING_BROKEN_SUSE_LD
 806 PACKAGE_PATH
 807 USE_CLANG
 808 HOTSPOT_LD
 809 HOTSPOT_CXX
 810 HOTSPOT_RC
 811 HOTSPOT_MT
 812 BUILD_AS
 813 BUILD_LDCXX
 814 BUILD_LD
 815 BUILD_STRIP
 816 BUILD_OBJCOPY
 817 BUILD_AR
 818 BUILD_NM
 819 BUILD_CXX
 820 BUILD_CC
 821 BUILD_SYSROOT_LDFLAGS
 822 BUILD_SYSROOT_CFLAGS
 823 ac_ct_OBJDUMP
 824 OBJDUMP
 825 ac_ct_OBJCOPY
 826 OBJCOPY
 827 ac_ct_NM
 828 ac_ct_STRIP
 829 GNM
 830 NM
 831 STRIP
 832 MSBUILD
 833 DUMPBIN
 834 RC
 835 MT
 836 LIPO
 837 ac_ct_AR
 838 AR
 839 AS
 840 LDCXX
 841 LD
 842 CXXCPP
 843 CPP
 844 CXX_VERSION_NUMBER
 845 CC_VERSION_NUMBER
 846 ac_ct_CXX
 847 CXXFLAGS
 848 CXX
 849 TOOLCHAIN_PATH_CXX
 850 POTENTIAL_CXX
 851 OBJEXT
 852 EXEEXT
 853 ac_ct_CC
 854 CPPFLAGS
 855 LDFLAGS
 856 CFLAGS
 857 CC
 858 TOOLCHAIN_PATH_CC
 859 POTENTIAL_CC
 860 TOOLCHAIN_VERSION
 861 VS_LIB
 862 VS_INCLUDE
 863 VS_PATH
 864 CYGWIN_LINK
 865 SYSROOT_LDFLAGS
 866 SYSROOT_CFLAGS
 867 EXTRA_LDFLAGS
 868 EXTRA_CXXFLAGS
 869 EXTRA_CFLAGS
 870 LEGACY_EXTRA_LDFLAGS
 871 LEGACY_EXTRA_CXXFLAGS
 872 LEGACY_EXTRA_CFLAGS
 873 EXE_SUFFIX
 874 OBJ_SUFFIX
 875 STATIC_LIBRARY
 876 SHARED_LIBRARY
 877 STATIC_LIBRARY_SUFFIX
 878 SHARED_LIBRARY_SUFFIX
 879 LIBRARY_PREFIX
 880 TOOLCHAIN_TYPE
 881 STATIC_BUILD
 882 IMPORT_MODULES_MAKE
 883 IMPORT_MODULES_SRC
 884 IMPORT_MODULES_CONF
 885 IMPORT_MODULES_LIBS
 886 IMPORT_MODULES_CMDS
 887 IMPORT_MODULES_CLASSES
 888 BUILD_HOTSPOT
 889 HOTSPOT_DIST
 890 BUILD_OUTPUT
 891 JDK_TOPDIR
 892 NASHORN_TOPDIR
 893 HOTSPOT_TOPDIR
 894 JAXWS_TOPDIR
 895 JAXP_TOPDIR
 896 CORBA_TOPDIR
 897 LANGTOOLS_TOPDIR
 898 BUILD_JDK
 899 CREATE_BUILDJDK
 900 BOOT_JDK_BITS
 901 JAVAC_FLAGS
 902 BOOT_JDK_MODULAR
 903 BOOT_JDK_SOURCETARGET
 904 JARSIGNER
 905 JAR
 906 JAVAH
 907 JAVAC
 908 JAVA
 909 BOOT_JDK
 910 JAVA_CHECK
 911 JAVAC_CHECK
 912 VERSION_IS_GA
 913 VERSION_SHORT
 914 VERSION_STRING
 915 VERSION_NUMBER_FOUR_POSITIONS
 916 VERSION_NUMBER
 917 VERSION_OPT
 918 VERSION_BUILD
 919 VERSION_PRE
 920 VERSION_PATCH
 921 VERSION_SECURITY
 922 VERSION_MINOR
 923 VERSION_MAJOR
 924 MACOSX_BUNDLE_ID_BASE
 925 MACOSX_BUNDLE_NAME_BASE
 926 HOTSPOT_VM_DISTRO
 927 COMPANY_NAME
 928 JDK_RC_PLATFORM_NAME
 929 PRODUCT_SUFFIX
 930 PRODUCT_NAME
 931 LAUNCHER_NAME
 932 JLINK_KEEP_PACKAGED_MODULES
 933 COPYRIGHT_YEAR
 934 COMPRESS_JARS
 935 INCLUDE_SA
 936 UNLIMITED_CRYPTO
 937 CACERTS_FILE
 938 BUILD_HEADLESS
 939 SUPPORT_HEADFUL
 940 SUPPORT_HEADLESS
 941 DEFAULT_MAKE_TARGET
 942 OS_VERSION_MICRO
 943 OS_VERSION_MINOR
 944 OS_VERSION_MAJOR
 945 PKG_CONFIG
 946 BASH_ARGS
 947 SETFILE
 948 CODESIGN
 949 XATTR
 950 DSYMUTIL
 951 IS_GNU_TIME
 952 PATCH
 953 DTRACE
 954 TIME
 955 STAT
 956 HG
 957 READELF
 958 OTOOL
 959 LDD
 960 ZIP
 961 UNZIP
 962 FIND_DELETE
 963 OUTPUT_SYNC
 964 OUTPUT_SYNC_SUPPORTED
 965 CHECK_TOOLSDIR_MAKE
 966 CHECK_TOOLSDIR_GMAKE
 967 CHECK_MAKE
 968 CHECK_GMAKE
 969 MAKE
 970 PKGHANDLER
 971 CONFIGURESUPPORT_OUTPUTDIR
 972 OUTPUT_ROOT
 973 CONF_NAME
 974 SPEC
 975 SDKROOT
 976 XCODEBUILD
 977 VALID_JVM_VARIANTS
 978 JVM_VARIANTS
 979 DEBUG_LEVEL
 980 HOTSPOT_DEBUG_LEVEL
 981 JDK_VARIANT
 982 SET_OPENJDK
 983 USERNAME
 984 CANONICAL_TOPDIR
 985 ORIGINAL_TOPDIR
 986 TOPDIR
 987 PATH_SEP
 988 ZERO_ARCHDEF
 989 HOTSPOT_BUILD_CPU_DEFINE
 990 HOTSPOT_BUILD_CPU_ARCH
 991 HOTSPOT_BUILD_CPU
 992 HOTSPOT_BUILD_OS_TYPE
 993 HOTSPOT_BUILD_OS
 994 OPENJDK_BUILD_OS_EXPORT_DIR
 995 OPENJDK_BUILD_CPU_JLI_CFLAGS
 996 OPENJDK_BUILD_CPU_OSARCH
 997 OPENJDK_BUILD_CPU_ISADIR
 998 OPENJDK_BUILD_CPU_LIBDIR
 999 OPENJDK_BUILD_CPU_LEGACY_LIB
1000 OPENJDK_BUILD_CPU_LEGACY
1001 HOTSPOT_TARGET_CPU_DEFINE
1002 HOTSPOT_TARGET_CPU_ARCH
1003 HOTSPOT_TARGET_CPU
1004 HOTSPOT_TARGET_OS_TYPE
1005 HOTSPOT_TARGET_OS
1006 DEFINE_CROSS_COMPILE_ARCH
1007 LP64
1008 OPENJDK_TARGET_OS_EXPORT_DIR
1009 OPENJDK_TARGET_CPU_JLI_CFLAGS
1010 OPENJDK_TARGET_CPU_OSARCH
1011 OPENJDK_TARGET_CPU_ISADIR
1012 OPENJDK_TARGET_CPU_LIBDIR
1013 OPENJDK_TARGET_CPU_LEGACY_LIB
1014 OPENJDK_TARGET_CPU_LEGACY
1015 REQUIRED_OS_VERSION
1016 REQUIRED_OS_NAME
1017 COMPILE_TYPE
1018 OPENJDK_TARGET_CPU_ENDIAN
1019 OPENJDK_TARGET_CPU_BITS
1020 OPENJDK_TARGET_CPU_ARCH
1021 OPENJDK_TARGET_CPU
1022 OPENJDK_TARGET_OS_ENV
1023 OPENJDK_TARGET_OS_TYPE
1024 OPENJDK_TARGET_OS
1025 OPENJDK_BUILD_CPU_ENDIAN
1026 OPENJDK_BUILD_CPU_BITS
1027 OPENJDK_BUILD_CPU_ARCH
1028 OPENJDK_BUILD_CPU
1029 OPENJDK_BUILD_OS_ENV
1030 OPENJDK_BUILD_OS_TYPE
1031 OPENJDK_BUILD_OS
1032 OPENJDK_BUILD_AUTOCONF_NAME
1033 OPENJDK_TARGET_AUTOCONF_NAME
1034 target_os
1035 target_vendor
1036 target_cpu
1037 target
1038 host_os
1039 host_vendor
1040 host_cpu
1041 host
1042 build_os
1043 build_vendor
1044 build_cpu
1045 build
1046 NICE
1047 CPIO
1048 DF
1049 READLINK
1050 CYGPATH
1051 SED
1052 FGREP
1053 EGREP
1054 GREP
1055 AWK
1056 XARGS
1057 WHICH
1058 WC
1059 UNIQ
1060 UNAME
1061 TR
1062 TOUCH
1063 TEE
1064 TAR
1065 TAIL
1066 SORT
1067 SH
1068 RMDIR
1069 RM
1070 PRINTF
1071 NAWK
1072 MV
1073 MKTEMP
1074 MKDIR
1075 LS
1076 LN
1077 HEAD
1078 FIND
1079 FILE
1080 EXPR
1081 ECHO
1082 DIRNAME
1083 DIFF
1084 DATE
1085 CUT
1086 CP
1087 COMM
1088 CMP
1089 CHMOD
1090 CAT
1091 BASH
1092 BASENAME
1093 DATE_WHEN_CONFIGURED
1094 ORIGINAL_PATH
1095 CONFIGURE_COMMAND_LINE
1096 target_alias
1097 host_alias
1098 build_alias
1099 LIBS
1100 ECHO_T
1101 ECHO_N
1102 ECHO_C
1103 DEFS
1104 mandir
1105 localedir
1106 libdir
1107 psdir
1108 pdfdir
1109 dvidir
1110 htmldir
1111 infodir
1112 docdir
1113 oldincludedir
1114 includedir
1115 localstatedir
1116 sharedstatedir
1117 sysconfdir
1118 datadir
1119 datarootdir
1120 libexecdir
1121 sbindir
1122 bindir
1123 program_transform_name
1124 prefix
1125 exec_prefix
1126 PACKAGE_URL
1127 PACKAGE_BUGREPORT
1128 PACKAGE_STRING
1129 PACKAGE_VERSION
1130 PACKAGE_TARNAME
1131 PACKAGE_NAME
1132 PATH_SEPARATOR
1133 SHELL'
1134 ac_subst_files=''
1135 ac_user_opts='
1136 enable_option_checking
1137 with_target_bits
1138 enable_openjdk_only
1139 with_custom_make_dir
1140 with_jdk_variant
1141 enable_debug
1142 with_debug_level
1143 with_jvm_variants
1144 with_devkit
1145 with_sys_root
1146 with_sysroot
1147 with_tools_dir
1148 with_toolchain_path
1149 with_extra_path
1150 with_sdk_name
1151 with_conf_name
1152 with_output_sync
1153 with_default_make_target
1154 enable_headful
1155 with_cacerts_file
1156 enable_unlimited_crypto
1157 with_copyright_year
1158 enable_keep_packaged_modules
1159 with_milestone
1160 with_update_version
1161 with_user_release_suffix
1162 with_build_number
1163 with_version_string
1164 with_version_pre
1165 with_version_opt
1166 with_version_build
1167 with_version_major
1168 with_version_minor
1169 with_version_security
1170 with_version_patch
1171 with_boot_jdk
1172 with_build_jdk
1173 with_add_source_root
1174 with_override_source_root
1175 with_adds_and_overrides
1176 with_override_langtools
1177 with_override_corba
1178 with_override_jaxp
1179 with_override_jaxws
1180 with_override_hotspot
1181 with_override_nashorn
1182 with_override_jdk
1183 with_import_hotspot
1184 with_import_modules
1185 enable_static_build
1186 with_toolchain_type
1187 with_extra_cflags
1188 with_extra_cxxflags
1189 with_extra_ldflags
1190 with_toolchain_version
1191 with_build_devkit
1192 with_jtreg
1193 enable_warnings_as_errors
1194 with_native_debug_symbols
1195 enable_debug_symbols
1196 enable_zip_debug_info
1197 enable_native_coverage
1198 enable_dtrace
1199 with_jvm_features
1200 with_jvm_interpreter
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_new_hotspot_build
1227 enable_hotspot_test_in_build
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 LN
1261 LS
1262 MKDIR
1263 MKTEMP
1264 MV
1265 NAWK
1266 PRINTF
1267 RM
1268 RMDIR
1269 SH
1270 SORT
1271 TAIL
1272 TAR
1273 TEE
1274 TOUCH
1275 TR
1276 UNAME
1277 UNIQ
1278 WC
1279 WHICH
1280 XARGS
1281 AWK
1282 GREP
1283 EGREP
1284 FGREP
1285 SED
1286 CYGPATH
1287 READLINK
1288 DF
1289 CPIO
1290 NICE
1291 MAKE
1292 UNZIP
1293 ZIP
1294 LDD
1295 OTOOL
1296 READELF
1297 HG
1298 STAT
1299 TIME
1300 DTRACE
1301 PATCH
1302 DSYMUTIL
1303 XATTR
1304 CODESIGN
1305 SETFILE
1306 PKG_CONFIG
1307 JAVA
1308 JAVAC
1309 JAVAH
1310 JAR
1311 JARSIGNER
1312 CC
1313 CFLAGS
1314 LDFLAGS
1315 LIBS
1316 CPPFLAGS
1317 CXX
1318 CXXFLAGS
1319 CCC
1320 CPP
1321 CXXCPP
1322 AS
1323 AR
1324 LIPO
1325 STRIP
1326 NM
1327 GNM
1328 OBJCOPY
1329 OBJDUMP
1330 BUILD_CC
1331 BUILD_CXX
1332 BUILD_NM
1333 BUILD_AR
1334 BUILD_OBJCOPY
1335 BUILD_STRIP
1336 JTREGEXE
1337 XMKMF
1338 FREETYPE_CFLAGS
1339 FREETYPE_LIBS
1340 ALSA_CFLAGS
1341 ALSA_LIBS
1342 LIBFFI_CFLAGS
1343 LIBFFI_LIBS
1344 PNG_CFLAGS
1345 PNG_LIBS
1346 LCMS_CFLAGS
1347 LCMS_LIBS
1348 ICECC_CMD
1349 ICECC_CREATE_ENV
1350 ICECC_WRAPPER
1351 CCACHE'
1352 
1353 
1354 # Initialize some variables set by options.
1355 ac_init_help=
1356 ac_init_version=false
1357 ac_unrecognized_opts=
1358 ac_unrecognized_sep=
1359 # The variables have the same names as the options, with
1360 # dashes changed to underlines.
1361 cache_file=/dev/null
1362 exec_prefix=NONE
1363 no_create=
1364 no_recursion=
1365 prefix=NONE
1366 program_prefix=NONE
1367 program_suffix=NONE
1368 program_transform_name=s,x,x,
1369 silent=
1370 site=
1371 srcdir=
1372 verbose=
1373 x_includes=NONE
1374 x_libraries=NONE
1375 
1376 # Installation directory options.
1377 # These are left unexpanded so users can "make install exec_prefix=/foo"
1378 # and all the variables that are supposed to be based on exec_prefix
1379 # by default will actually change.
1380 # Use braces instead of parens because sh, perl, etc. also accept them.
1381 # (The list follows the same order as the GNU Coding Standards.)
1382 bindir='${exec_prefix}/bin'
1383 sbindir='${exec_prefix}/sbin'
1384 libexecdir='${exec_prefix}/libexec'
1385 datarootdir='${prefix}/share'
1386 datadir='${datarootdir}'
1387 sysconfdir='${prefix}/etc'
1388 sharedstatedir='${prefix}/com'
1389 localstatedir='${prefix}/var'
1390 includedir='${prefix}/include'
1391 oldincludedir='/usr/include'
1392 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1393 infodir='${datarootdir}/info'
1394 htmldir='${docdir}'
1395 dvidir='${docdir}'
1396 pdfdir='${docdir}'
1397 psdir='${docdir}'
1398 libdir='${exec_prefix}/lib'
1399 localedir='${datarootdir}/locale'
1400 mandir='${datarootdir}/man'
1401 
1402 ac_prev=
1403 ac_dashdash=
1404 for ac_option
1405 do
1406   # If the previous option needs an argument, assign it.
1407   if test -n "$ac_prev"; then
1408     eval $ac_prev=\$ac_option
1409     ac_prev=
1410     continue
1411   fi
1412 
1413   case $ac_option in
1414   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1415   *=)   ac_optarg= ;;
1416   *)    ac_optarg=yes ;;
1417   esac
1418 
1419   # Accept the important Cygnus configure options, so we can diagnose typos.
1420 
1421   case $ac_dashdash$ac_option in
1422   --)
1423     ac_dashdash=yes ;;
1424 
1425   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1426     ac_prev=bindir ;;
1427   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1428     bindir=$ac_optarg ;;
1429 
1430   -build | --build | --buil | --bui | --bu)
1431     ac_prev=build_alias ;;
1432   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1433     build_alias=$ac_optarg ;;
1434 
1435   -cache-file | --cache-file | --cache-fil | --cache-fi \
1436   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1437     ac_prev=cache_file ;;
1438   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1439   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1440     cache_file=$ac_optarg ;;
1441 
1442   --config-cache | -C)
1443     cache_file=config.cache ;;
1444 
1445   -datadir | --datadir | --datadi | --datad)
1446     ac_prev=datadir ;;
1447   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1448     datadir=$ac_optarg ;;
1449 
1450   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1451   | --dataroo | --dataro | --datar)
1452     ac_prev=datarootdir ;;
1453   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1454   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1455     datarootdir=$ac_optarg ;;
1456 
1457   -disable-* | --disable-*)
1458     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1459     # Reject names that are not valid shell variable names.
1460     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1461       as_fn_error $? "invalid feature name: $ac_useropt"
1462     ac_useropt_orig=$ac_useropt
1463     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1464     case $ac_user_opts in
1465       *"
1466 "enable_$ac_useropt"
1467 "*) ;;
1468       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1469          ac_unrecognized_sep=', ';;
1470     esac
1471     eval enable_$ac_useropt=no ;;
1472 
1473   -docdir | --docdir | --docdi | --doc | --do)
1474     ac_prev=docdir ;;
1475   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1476     docdir=$ac_optarg ;;
1477 
1478   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1479     ac_prev=dvidir ;;
1480   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1481     dvidir=$ac_optarg ;;
1482 
1483   -enable-* | --enable-*)
1484     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1485     # Reject names that are not valid shell variable names.
1486     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1487       as_fn_error $? "invalid feature name: $ac_useropt"
1488     ac_useropt_orig=$ac_useropt
1489     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1490     case $ac_user_opts in
1491       *"
1492 "enable_$ac_useropt"
1493 "*) ;;
1494       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1495          ac_unrecognized_sep=', ';;
1496     esac
1497     eval enable_$ac_useropt=\$ac_optarg ;;
1498 
1499   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1500   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1501   | --exec | --exe | --ex)
1502     ac_prev=exec_prefix ;;
1503   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1504   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1505   | --exec=* | --exe=* | --ex=*)
1506     exec_prefix=$ac_optarg ;;
1507 
1508   -gas | --gas | --ga | --g)
1509     # Obsolete; use --with-gas.
1510     with_gas=yes ;;
1511 
1512   -help | --help | --hel | --he | -h)
1513     ac_init_help=long ;;
1514   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1515     ac_init_help=recursive ;;
1516   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1517     ac_init_help=short ;;
1518 
1519   -host | --host | --hos | --ho)
1520     ac_prev=host_alias ;;
1521   -host=* | --host=* | --hos=* | --ho=*)
1522     host_alias=$ac_optarg ;;
1523 
1524   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1525     ac_prev=htmldir ;;
1526   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1527   | --ht=*)
1528     htmldir=$ac_optarg ;;
1529 
1530   -includedir | --includedir | --includedi | --included | --include \
1531   | --includ | --inclu | --incl | --inc)
1532     ac_prev=includedir ;;
1533   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1534   | --includ=* | --inclu=* | --incl=* | --inc=*)
1535     includedir=$ac_optarg ;;
1536 
1537   -infodir | --infodir | --infodi | --infod | --info | --inf)
1538     ac_prev=infodir ;;
1539   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1540     infodir=$ac_optarg ;;
1541 
1542   -libdir | --libdir | --libdi | --libd)
1543     ac_prev=libdir ;;
1544   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1545     libdir=$ac_optarg ;;
1546 
1547   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1548   | --libexe | --libex | --libe)
1549     ac_prev=libexecdir ;;
1550   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1551   | --libexe=* | --libex=* | --libe=*)
1552     libexecdir=$ac_optarg ;;
1553 
1554   -localedir | --localedir | --localedi | --localed | --locale)
1555     ac_prev=localedir ;;
1556   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1557     localedir=$ac_optarg ;;
1558 
1559   -localstatedir | --localstatedir | --localstatedi | --localstated \
1560   | --localstate | --localstat | --localsta | --localst | --locals)
1561     ac_prev=localstatedir ;;
1562   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1563   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1564     localstatedir=$ac_optarg ;;
1565 
1566   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1567     ac_prev=mandir ;;
1568   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1569     mandir=$ac_optarg ;;
1570 
1571   -nfp | --nfp | --nf)
1572     # Obsolete; use --without-fp.
1573     with_fp=no ;;
1574 
1575   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1576   | --no-cr | --no-c | -n)
1577     no_create=yes ;;
1578 
1579   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1580   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1581     no_recursion=yes ;;
1582 
1583   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1584   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1585   | --oldin | --oldi | --old | --ol | --o)
1586     ac_prev=oldincludedir ;;
1587   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1588   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1589   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1590     oldincludedir=$ac_optarg ;;
1591 
1592   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1593     ac_prev=prefix ;;
1594   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1595     prefix=$ac_optarg ;;
1596 
1597   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1598   | --program-pre | --program-pr | --program-p)
1599     ac_prev=program_prefix ;;
1600   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1601   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1602     program_prefix=$ac_optarg ;;
1603 
1604   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1605   | --program-suf | --program-su | --program-s)
1606     ac_prev=program_suffix ;;
1607   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1608   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1609     program_suffix=$ac_optarg ;;
1610 
1611   -program-transform-name | --program-transform-name \
1612   | --program-transform-nam | --program-transform-na \
1613   | --program-transform-n | --program-transform- \
1614   | --program-transform | --program-transfor \
1615   | --program-transfo | --program-transf \
1616   | --program-trans | --program-tran \
1617   | --progr-tra | --program-tr | --program-t)
1618     ac_prev=program_transform_name ;;
1619   -program-transform-name=* | --program-transform-name=* \
1620   | --program-transform-nam=* | --program-transform-na=* \
1621   | --program-transform-n=* | --program-transform-=* \
1622   | --program-transform=* | --program-transfor=* \
1623   | --program-transfo=* | --program-transf=* \
1624   | --program-trans=* | --program-tran=* \
1625   | --progr-tra=* | --program-tr=* | --program-t=*)
1626     program_transform_name=$ac_optarg ;;
1627 
1628   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1629     ac_prev=pdfdir ;;
1630   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1631     pdfdir=$ac_optarg ;;
1632 
1633   -psdir | --psdir | --psdi | --psd | --ps)
1634     ac_prev=psdir ;;
1635   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1636     psdir=$ac_optarg ;;
1637 
1638   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1639   | -silent | --silent | --silen | --sile | --sil)
1640     silent=yes ;;
1641 
1642   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1643     ac_prev=sbindir ;;
1644   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1645   | --sbi=* | --sb=*)
1646     sbindir=$ac_optarg ;;
1647 
1648   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1649   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1650   | --sharedst | --shareds | --shared | --share | --shar \
1651   | --sha | --sh)
1652     ac_prev=sharedstatedir ;;
1653   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1654   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1655   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1656   | --sha=* | --sh=*)
1657     sharedstatedir=$ac_optarg ;;
1658 
1659   -site | --site | --sit)
1660     ac_prev=site ;;
1661   -site=* | --site=* | --sit=*)
1662     site=$ac_optarg ;;
1663 
1664   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1665     ac_prev=srcdir ;;
1666   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1667     srcdir=$ac_optarg ;;
1668 
1669   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1670   | --syscon | --sysco | --sysc | --sys | --sy)
1671     ac_prev=sysconfdir ;;
1672   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1673   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1674     sysconfdir=$ac_optarg ;;
1675 
1676   -target | --target | --targe | --targ | --tar | --ta | --t)
1677     ac_prev=target_alias ;;
1678   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1679     target_alias=$ac_optarg ;;
1680 
1681   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1682     verbose=yes ;;
1683 
1684   -version | --version | --versio | --versi | --vers | -V)
1685     ac_init_version=: ;;
1686 
1687   -with-* | --with-*)
1688     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1689     # Reject names that are not valid shell variable names.
1690     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1691       as_fn_error $? "invalid package name: $ac_useropt"
1692     ac_useropt_orig=$ac_useropt
1693     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1694     case $ac_user_opts in
1695       *"
1696 "with_$ac_useropt"
1697 "*) ;;
1698       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1699          ac_unrecognized_sep=', ';;
1700     esac
1701     eval with_$ac_useropt=\$ac_optarg ;;
1702 
1703   -without-* | --without-*)
1704     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1705     # Reject names that are not valid shell variable names.
1706     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1707       as_fn_error $? "invalid package name: $ac_useropt"
1708     ac_useropt_orig=$ac_useropt
1709     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1710     case $ac_user_opts in
1711       *"
1712 "with_$ac_useropt"
1713 "*) ;;
1714       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1715          ac_unrecognized_sep=', ';;
1716     esac
1717     eval with_$ac_useropt=no ;;
1718 
1719   --x)
1720     # Obsolete; use --with-x.
1721     with_x=yes ;;
1722 
1723   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1724   | --x-incl | --x-inc | --x-in | --x-i)
1725     ac_prev=x_includes ;;
1726   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1727   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1728     x_includes=$ac_optarg ;;
1729 
1730   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1731   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1732     ac_prev=x_libraries ;;
1733   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1734   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1735     x_libraries=$ac_optarg ;;
1736 
1737   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1738 Try \`$0 --help' for more information"
1739     ;;
1740 
1741   *=*)
1742     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1743     # Reject names that are not valid shell variable names.
1744     case $ac_envvar in #(
1745       '' | [0-9]* | *[!_$as_cr_alnum]* )
1746       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1747     esac
1748     eval $ac_envvar=\$ac_optarg
1749     export $ac_envvar ;;
1750 
1751   *)
1752     # FIXME: should be removed in autoconf 3.0.
1753     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1754     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1755       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1756     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1757     ;;
1758 
1759   esac
1760 done
1761 
1762 if test -n "$ac_prev"; then
1763   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1764   as_fn_error $? "missing argument to $ac_option"
1765 fi
1766 
1767 if test -n "$ac_unrecognized_opts"; then
1768   case $enable_option_checking in
1769     no) ;;
1770     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1771     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1772   esac
1773 fi
1774 
1775 # Check all directory arguments for consistency.
1776 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1777                 datadir sysconfdir sharedstatedir localstatedir includedir \
1778                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1779                 libdir localedir mandir
1780 do
1781   eval ac_val=\$$ac_var
1782   # Remove trailing slashes.
1783   case $ac_val in
1784     */ )
1785       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1786       eval $ac_var=\$ac_val;;
1787   esac
1788   # Be sure to have absolute directory names.
1789   case $ac_val in
1790     [\\/$]* | ?:[\\/]* )  continue;;
1791     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1792   esac
1793   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1794 done
1795 
1796 # There might be people who depend on the old broken behavior: `$host'
1797 # used to hold the argument of --host etc.
1798 # FIXME: To remove some day.
1799 build=$build_alias
1800 host=$host_alias
1801 target=$target_alias
1802 
1803 # FIXME: To remove some day.
1804 if test "x$host_alias" != x; then
1805   if test "x$build_alias" = x; then
1806     cross_compiling=maybe
1807   elif test "x$build_alias" != "x$host_alias"; then
1808     cross_compiling=yes
1809   fi
1810 fi
1811 
1812 ac_tool_prefix=
1813 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1814 
1815 test "$silent" = yes && exec 6>/dev/null
1816 
1817 
1818 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1819 ac_ls_di=`ls -di .` &&
1820 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1821   as_fn_error $? "working directory cannot be determined"
1822 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1823   as_fn_error $? "pwd does not report name of working directory"
1824 
1825 
1826 # Find the source files, if location was not specified.
1827 if test -z "$srcdir"; then
1828   ac_srcdir_defaulted=yes
1829   # Try the directory containing this script, then the parent directory.
1830   ac_confdir=`$as_dirname -- "$as_myself" ||
1831 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1832          X"$as_myself" : 'X\(//\)[^/]' \| \
1833          X"$as_myself" : 'X\(//\)$' \| \
1834          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1835 $as_echo X"$as_myself" |
1836     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1837             s//\1/
1838             q
1839           }
1840           /^X\(\/\/\)[^/].*/{
1841             s//\1/
1842             q
1843           }
1844           /^X\(\/\/\)$/{
1845             s//\1/
1846             q
1847           }
1848           /^X\(\/\).*/{
1849             s//\1/
1850             q
1851           }
1852           s/.*/./; q'`
1853   srcdir=$ac_confdir
1854   if test ! -r "$srcdir/$ac_unique_file"; then
1855     srcdir=..
1856   fi
1857 else
1858   ac_srcdir_defaulted=no
1859 fi
1860 if test ! -r "$srcdir/$ac_unique_file"; then
1861   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1862   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1863 fi
1864 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1865 ac_abs_confdir=`(
1866         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1867         pwd)`
1868 # When building in place, set srcdir=.
1869 if test "$ac_abs_confdir" = "$ac_pwd"; then
1870   srcdir=.
1871 fi
1872 # Remove unnecessary trailing slashes from srcdir.
1873 # Double slashes in file names in object file debugging info
1874 # mess up M-x gdb in Emacs.
1875 case $srcdir in
1876 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1877 esac
1878 for ac_var in $ac_precious_vars; do
1879   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1880   eval ac_env_${ac_var}_value=\$${ac_var}
1881   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1882   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1883 done
1884 
1885 #
1886 # Report the --help message.
1887 #
1888 if test "$ac_init_help" = "long"; then
1889   # Omit some internal or obsolete options to make the list less imposing.
1890   # This message is too long to be a string in the A/UX 3.1 sh.
1891   cat <<_ACEOF
1892 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1893 
1894 Usage: $0 [OPTION]... [VAR=VALUE]...
1895 
1896 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1897 VAR=VALUE.  See below for descriptions of some of the useful variables.
1898 
1899 Defaults for the options are specified in brackets.
1900 
1901 Configuration:
1902   -h, --help              display this help and exit
1903       --help=short        display options specific to this package
1904       --help=recursive    display the short help of all the included packages
1905   -V, --version           display version information and exit
1906   -q, --quiet, --silent   do not print \`checking ...' messages
1907       --cache-file=FILE   cache test results in FILE [disabled]
1908   -C, --config-cache      alias for \`--cache-file=config.cache'
1909   -n, --no-create         do not create output files
1910       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1911 
1912 Installation directories:
1913   --prefix=PREFIX         install architecture-independent files in PREFIX
1914                           [$ac_default_prefix]
1915   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1916                           [PREFIX]
1917 
1918 By default, \`make install' will install all the files in
1919 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1920 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1921 for instance \`--prefix=\$HOME'.
1922 
1923 For better control, use the options below.
1924 
1925 Fine tuning of the installation directories:
1926   --bindir=DIR            user executables [EPREFIX/bin]
1927   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1928   --libexecdir=DIR        program executables [EPREFIX/libexec]
1929   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1930   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1931   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1932   --libdir=DIR            object code libraries [EPREFIX/lib]
1933   --includedir=DIR        C header files [PREFIX/include]
1934   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1935   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1936   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1937   --infodir=DIR           info documentation [DATAROOTDIR/info]
1938   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1939   --mandir=DIR            man documentation [DATAROOTDIR/man]
1940   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1941   --htmldir=DIR           html documentation [DOCDIR]
1942   --dvidir=DIR            dvi documentation [DOCDIR]
1943   --pdfdir=DIR            pdf documentation [DOCDIR]
1944   --psdir=DIR             ps documentation [DOCDIR]
1945 _ACEOF
1946 
1947   cat <<\_ACEOF
1948 
1949 X features:
1950   --x-includes=DIR    X include files are in DIR
1951   --x-libraries=DIR   X library files are in DIR
1952 
1953 System types:
1954   --build=BUILD     configure for building on BUILD [guessed]
1955   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1956   --target=TARGET   configure for building compilers for TARGET [HOST]
1957 _ACEOF
1958 fi
1959 
1960 if test -n "$ac_init_help"; then
1961   case $ac_init_help in
1962      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1963    esac
1964   cat <<\_ACEOF
1965 
1966 Optional Features:
1967   --disable-option-checking  ignore unrecognized --enable/--with options
1968   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1969   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1970   --enable-openjdk-only   suppress building custom source even if present
1971                           [disabled]
1972   --enable-debug          set the debug level to fastdebug (shorthand for
1973                           --with-debug-level=fastdebug) [disabled]
1974   --disable-headful       disable building headful support (graphical UI
1975                           support) [enabled]
1976   --enable-unlimited-crypto
1977                           Enable unlimited crypto policy [disabled]
1978   --disable-keep-packaged-modules
1979                           Do not keep packaged modules in jdk image [enable]
1980   --enable-static-build   enable static library build [disabled]
1981   --disable-warnings-as-errors
1982                           do not consider native warnings to be an error
1983                           [enabled]
1984   --enable-debug-symbols  Deprecated. Option is kept for backwards
1985                           compatibility and is ignored
1986   --enable-zip-debug-info Deprecated. Option is kept for backwards
1987                           compatibility and is ignored
1988   --enable-native-coverage
1989                           enable native compilation with code coverage
1990                           data[disabled]
1991   --enable-dtrace[=yes/no/auto]
1992                           enable dtrace. Default is auto, where dtrace is
1993                           enabled if all dependencies are present.
1994   --disable-freetype-bundling
1995                           disable bundling of the freetype library with the
1996                           build result [enabled on Windows or when using
1997                           --with-freetype, disabled otherwise]
1998   --disable-new-hotspot-build
1999                           disable the new hotspot build system (use the old)
2000                           [enabled]
2001   --enable-hotspot-test-in-build
2002                           run the Queens test after Hotspot build [disabled]
2003   --enable-sjavac         use sjavac to do fast incremental compiles
2004                           [disabled]
2005   --disable-javac-server  disable javac server [enabled]
2006   --enable-icecc          enable distribted compilation of native code using
2007                           icecc/icecream [disabled]
2008   --disable-precompiled-headers
2009                           disable using precompiled headers when compiling C++
2010                           [enabled]
2011   --enable-ccache         enable using ccache to speed up recompilations
2012                           [disabled]
2013 
2014 Optional Packages:
2015   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2016   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2017   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2018                           support it), e.g. --with-target-bits=32 [guessed]
2019   --with-custom-make-dir  Deprecated. Option is kept for backwards
2020                           compatibility and is ignored
2021   --with-jdk-variant      JDK variant to build (normal) [normal]
2022   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2023                           optimized) [release]
2024   --with-jvm-variants     JVM variants (separated by commas) to build
2025                           (server,client,minimal,core,zero,zeroshark,custom)
2026                           [server]
2027   --with-devkit           use this devkit for compilers, tools and resources
2028   --with-sys-root         alias for --with-sysroot for backwards compatability
2029   --with-sysroot          use this directory as sysroot
2030   --with-tools-dir        alias for --with-toolchain-path for backwards
2031                           compatibility
2032   --with-toolchain-path   prepend these directories when searching for
2033                           toolchain binaries (compilers etc)
2034   --with-extra-path       prepend these directories to the default path
2035   --with-sdk-name         use the platform SDK of the given name. [macosx]
2036   --with-conf-name        use this as the name of the configuration [generated
2037                           from important configuration options]
2038   --with-output-sync      set make output sync type if supported by make.
2039                           [recurse]
2040   --with-default-make-target
2041                           set the default make target [exploded-image]
2042   --with-cacerts-file     specify alternative cacerts file
2043   --with-copyright-year   Set copyright year value for build [current year]
2044   --with-milestone        Deprecated. Option is kept for backwards
2045                           compatibility and is ignored
2046   --with-update-version   Deprecated. Option is kept for backwards
2047                           compatibility and is ignored
2048   --with-user-release-suffix
2049                           Deprecated. Option is kept for backwards
2050                           compatibility and is ignored
2051   --with-build-number     Deprecated. Option is kept for backwards
2052                           compatibility and is ignored
2053   --with-version-string   Set version string [calculated]
2054   --with-version-pre      Set the base part of the version 'PRE' field
2055                           (pre-release identifier) ['internal']
2056   --with-version-opt      Set version 'OPT' field (build metadata)
2057                           [<timestamp>.<user>.<dirname>]
2058   --with-version-build    Set version 'BUILD' field (build number) [not
2059                           specified]
2060   --with-version-major    Set version 'MAJOR' field (first number) [current
2061                           source value]
2062   --with-version-minor    Set version 'MINOR' field (second number) [current
2063                           source value]
2064   --with-version-security Set version 'SECURITY' field (third number) [current
2065                           source value]
2066   --with-version-patch    Set version 'PATCH' field (fourth number) [not
2067                           specified]
2068   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2069   --with-build-jdk        path to JDK of same version as is being built[the
2070                           newly built JDK]
2071   --with-add-source-root  Deprecated. Option is kept for backwards
2072                           compatibility and is ignored
2073   --with-override-source-root
2074                           Deprecated. Option is kept for backwards
2075                           compatibility and is ignored
2076   --with-adds-and-overrides
2077                           Deprecated. Option is kept for backwards
2078                           compatibility and is ignored
2079   --with-override-langtools
2080                           Deprecated. Option is kept for backwards
2081                           compatibility and is ignored
2082   --with-override-corba   Deprecated. Option is kept for backwards
2083                           compatibility and is ignored
2084   --with-override-jaxp    Deprecated. Option is kept for backwards
2085                           compatibility and is ignored
2086   --with-override-jaxws   Deprecated. Option is kept for backwards
2087                           compatibility and is ignored
2088   --with-override-hotspot Deprecated. Option is kept for backwards
2089                           compatibility and is ignored
2090   --with-override-nashorn Deprecated. Option is kept for backwards
2091                           compatibility and is ignored
2092   --with-override-jdk     Deprecated. Option is kept for backwards
2093                           compatibility and is ignored
2094   --with-import-hotspot   import hotspot binaries from this jdk image or
2095                           hotspot build dist dir instead of building from
2096                           source
2097   --with-import-modules   import a set of prebuilt modules either as a zip
2098                           file or an exploded directory
2099   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2100                           to show possible values [platform dependent]
2101   --with-extra-cflags     extra flags to be used when compiling jdk c-files
2102   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2103   --with-extra-ldflags    extra flags to be used when linking jdk
2104   --with-toolchain-version
2105                           the version of the toolchain to look for, use
2106                           '--help' to show possible values [platform
2107                           dependent]
2108   --with-build-devkit     Devkit to use for the build platform toolchain
2109   --with-jtreg            Regression Test Harness [probed]
2110   --with-native-debug-symbols
2111                           set the native debug symbol configuration (none,
2112                           internal, external, zipped) [varying]
2113   --with-jvm-features     additional JVM features to enable (separated by
2114                           comma), use '--help' to show possible values [none]
2115   --with-jvm-interpreter  Deprecated. Option is kept for backwards
2116                           compatibility and is ignored
2117   --with-stdc++lib=<static>,<dynamic>,<default>
2118                           force linking of the C++ runtime on Linux to either
2119                           static or dynamic, default is static with dynamic as
2120                           fallback
2121   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2122                           (Windows only) [probed]
2123   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2124                           (Windows only) [probed]
2125   --with-x                use the X Window System
2126   --with-cups             specify prefix directory for the cups package
2127                           (expecting the headers under PATH/include)
2128   --with-cups-include     specify directory for the cups include files
2129   --with-freetype         specify prefix directory for the freetype package
2130                           (expecting the libraries under PATH/lib and the
2131                           headers under PATH/include)
2132   --with-freetype-include specify directory for the freetype include files
2133   --with-freetype-lib     specify directory for the freetype library
2134   --with-freetype-src     specify directory with freetype sources to
2135                           automatically build the library (experimental,
2136                           Windows-only)
2137   --with-alsa             specify prefix directory for the alsa package
2138                           (expecting the libraries under PATH/lib and the
2139                           headers under PATH/include)
2140   --with-alsa-include     specify directory for the alsa include files
2141   --with-alsa-lib         specify directory for the alsa library
2142   --with-libffi           specify prefix directory for the libffi package
2143                           (expecting the libraries under PATH/lib and the
2144                           headers under PATH/include)
2145   --with-libffi-include   specify directory for the libffi include files
2146   --with-libffi-lib       specify directory for the libffi library
2147   --with-libjpeg          use libjpeg from build system or OpenJDK source
2148                           (system, bundled) [bundled]
2149   --with-giflib           use giflib from build system or OpenJDK source
2150                           (system, bundled) [bundled]
2151   --with-libpng           use libpng from build system or OpenJDK source
2152                           (system, bundled) [bundled]
2153   --with-zlib             use zlib from build system or OpenJDK source
2154                           (system, bundled) [bundled]
2155   --with-lcms             use lcms2 from build system or OpenJDK source
2156                           (system, bundled) [bundled]
2157   --with-dxsdk            Deprecated. Option is kept for backwards
2158                           compatibility and is ignored
2159   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2160                           compatibility and is ignored
2161   --with-dxsdk-include    Deprecated. Option is kept for backwards
2162                           compatibility and is ignored
2163   --with-num-cores        number of cores in the build system, e.g.
2164                           --with-num-cores=8 [probed]
2165   --with-memory-size      memory (in MB) available in the build system, e.g.
2166                           --with-memory-size=1024 [probed]
2167   --with-jobs             number of parallel jobs to let make run [calculated
2168                           based on cores and memory]
2169   --with-test-jobs        number of parallel tests jobs to run [based on build
2170                           jobs]
2171   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2172                           invocations of boot JDK, overriding the default
2173                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2174                           -enableassertions"
2175   --with-sjavac-server-java
2176                           use this java binary for running the sjavac
2177                           background server [Boot JDK java]
2178   --with-ccache-dir       where to store ccache files [~/.ccache]
2179 
2180 Some influential environment variables:
2181   BASENAME    Override default value for BASENAME
2182   BASH        Override default value for BASH
2183   CAT         Override default value for CAT
2184   CHMOD       Override default value for CHMOD
2185   CMP         Override default value for CMP
2186   COMM        Override default value for COMM
2187   CP          Override default value for CP
2188   CUT         Override default value for CUT
2189   DATE        Override default value for DATE
2190   DIFF        Override default value for DIFF
2191   DIRNAME     Override default value for DIRNAME
2192   ECHO        Override default value for ECHO
2193   EXPR        Override default value for EXPR
2194   FILE        Override default value for FILE
2195   FIND        Override default value for FIND
2196   HEAD        Override default value for HEAD
2197   LN          Override default value for LN
2198   LS          Override default value for LS
2199   MKDIR       Override default value for MKDIR
2200   MKTEMP      Override default value for MKTEMP
2201   MV          Override default value for MV
2202   NAWK        Override default value for NAWK
2203   PRINTF      Override default value for PRINTF
2204   RM          Override default value for RM
2205   RMDIR       Override default value for RMDIR
2206   SH          Override default value for SH
2207   SORT        Override default value for SORT
2208   TAIL        Override default value for TAIL
2209   TAR         Override default value for TAR
2210   TEE         Override default value for TEE
2211   TOUCH       Override default value for TOUCH
2212   TR          Override default value for TR
2213   UNAME       Override default value for UNAME
2214   UNIQ        Override default value for UNIQ
2215   WC          Override default value for WC
2216   WHICH       Override default value for WHICH
2217   XARGS       Override default value for XARGS
2218   AWK         Override default value for AWK
2219   GREP        Override default value for GREP
2220   EGREP       Override default value for EGREP
2221   FGREP       Override default value for FGREP
2222   SED         Override default value for SED
2223   CYGPATH     Override default value for CYGPATH
2224   READLINK    Override default value for READLINK
2225   DF          Override default value for DF
2226   CPIO        Override default value for CPIO
2227   NICE        Override default value for NICE
2228   MAKE        Override default value for MAKE
2229   UNZIP       Override default value for UNZIP
2230   ZIP         Override default value for ZIP
2231   LDD         Override default value for LDD
2232   OTOOL       Override default value for OTOOL
2233   READELF     Override default value for READELF
2234   HG          Override default value for HG
2235   STAT        Override default value for STAT
2236   TIME        Override default value for TIME
2237   DTRACE      Override default value for DTRACE
2238   PATCH       Override default value for PATCH
2239   DSYMUTIL    Override default value for DSYMUTIL
2240   XATTR       Override default value for XATTR
2241   CODESIGN    Override default value for CODESIGN
2242   SETFILE     Override default value for SETFILE
2243   PKG_CONFIG  path to pkg-config utility
2244   JAVA        Override default value for JAVA
2245   JAVAC       Override default value for JAVAC
2246   JAVAH       Override default value for JAVAH
2247   JAR         Override default value for JAR
2248   JARSIGNER   Override default value for JARSIGNER
2249   CC          C compiler command
2250   CFLAGS      C compiler flags
2251   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2252               nonstandard directory <lib dir>
2253   LIBS        libraries to pass to the linker, e.g. -l<library>
2254   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2255               you have headers in a nonstandard directory <include dir>
2256   CXX         C++ compiler command
2257   CXXFLAGS    C++ compiler flags
2258   CPP         C preprocessor
2259   CXXCPP      C++ preprocessor
2260   AS          Override default value for AS
2261   AR          Override default value for AR
2262   LIPO        Override default value for LIPO
2263   STRIP       Override default value for STRIP
2264   NM          Override default value for NM
2265   GNM         Override default value for GNM
2266   OBJCOPY     Override default value for OBJCOPY
2267   OBJDUMP     Override default value for OBJDUMP
2268   BUILD_CC    Override default value for BUILD_CC
2269   BUILD_CXX   Override default value for BUILD_CXX
2270   BUILD_NM    Override default value for BUILD_NM
2271   BUILD_AR    Override default value for BUILD_AR
2272   BUILD_OBJCOPY
2273               Override default value for BUILD_OBJCOPY
2274   BUILD_STRIP Override default value for BUILD_STRIP
2275   JTREGEXE    Override default value for JTREGEXE
2276   XMKMF       Path to xmkmf, Makefile generator for X Window System
2277   FREETYPE_CFLAGS
2278               C compiler flags for FREETYPE, overriding pkg-config
2279   FREETYPE_LIBS
2280               linker flags for FREETYPE, overriding pkg-config
2281   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2282   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2283   LIBFFI_CFLAGS
2284               C compiler flags for LIBFFI, overriding pkg-config
2285   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2286   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2287   PNG_LIBS    linker flags for PNG, overriding pkg-config
2288   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2289   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2290   ICECC_CMD   Override default value for ICECC_CMD
2291   ICECC_CREATE_ENV
2292               Override default value for ICECC_CREATE_ENV
2293   ICECC_WRAPPER
2294               Override default value for ICECC_WRAPPER
2295   CCACHE      Override default value for CCACHE
2296 
2297 Use these variables to override the choices made by `configure' or to help
2298 it to find libraries and programs with nonstandard names/locations.
2299 
2300 Report bugs to <build-dev@openjdk.java.net>.
2301 OpenJDK home page: <http://openjdk.java.net>.
2302 _ACEOF
2303 ac_status=$?
2304 fi
2305 
2306 if test "$ac_init_help" = "recursive"; then
2307   # If there are subdirs, report their specific --help.
2308   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2309     test -d "$ac_dir" ||
2310       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2311       continue
2312     ac_builddir=.
2313 
2314 case "$ac_dir" in
2315 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2316 *)
2317   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2318   # A ".." for each directory in $ac_dir_suffix.
2319   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2320   case $ac_top_builddir_sub in
2321   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2322   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2323   esac ;;
2324 esac
2325 ac_abs_top_builddir=$ac_pwd
2326 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2327 # for backward compatibility:
2328 ac_top_builddir=$ac_top_build_prefix
2329 
2330 case $srcdir in
2331   .)  # We are building in place.
2332     ac_srcdir=.
2333     ac_top_srcdir=$ac_top_builddir_sub
2334     ac_abs_top_srcdir=$ac_pwd ;;
2335   [\\/]* | ?:[\\/]* )  # Absolute name.
2336     ac_srcdir=$srcdir$ac_dir_suffix;
2337     ac_top_srcdir=$srcdir
2338     ac_abs_top_srcdir=$srcdir ;;
2339   *) # Relative name.
2340     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2341     ac_top_srcdir=$ac_top_build_prefix$srcdir
2342     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2343 esac
2344 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2345 
2346     cd "$ac_dir" || { ac_status=$?; continue; }
2347     # Check for guested configure.
2348     if test -f "$ac_srcdir/configure.gnu"; then
2349       echo &&
2350       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2351     elif test -f "$ac_srcdir/configure"; then
2352       echo &&
2353       $SHELL "$ac_srcdir/configure" --help=recursive
2354     else
2355       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2356     fi || ac_status=$?
2357     cd "$ac_pwd" || { ac_status=$?; break; }
2358   done
2359 fi
2360 
2361 test -n "$ac_init_help" && exit $ac_status
2362 if $ac_init_version; then
2363   cat <<\_ACEOF
2364 OpenJDK configure jdk9
2365 generated by GNU Autoconf 2.69
2366 
2367 Copyright (C) 2012 Free Software Foundation, Inc.
2368 This configure script is free software; the Free Software Foundation
2369 gives unlimited permission to copy, distribute and modify it.
2370 _ACEOF
2371   exit
2372 fi
2373 
2374 ## ------------------------ ##
2375 ## Autoconf initialization. ##
2376 ## ------------------------ ##
2377 
2378 # ac_fn_c_try_compile LINENO
2379 # --------------------------
2380 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2381 ac_fn_c_try_compile ()
2382 {
2383   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2384   rm -f conftest.$ac_objext
2385   if { { ac_try="$ac_compile"
2386 case "(($ac_try" in
2387   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2388   *) ac_try_echo=$ac_try;;
2389 esac
2390 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2391 $as_echo "$ac_try_echo"; } >&5
2392   (eval "$ac_compile") 2>conftest.err
2393   ac_status=$?
2394   if test -s conftest.err; then
2395     grep -v '^ *+' conftest.err >conftest.er1
2396     cat conftest.er1 >&5
2397     mv -f conftest.er1 conftest.err
2398   fi
2399   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2400   test $ac_status = 0; } && {
2401          test -z "$ac_c_werror_flag" ||
2402          test ! -s conftest.err
2403        } && test -s conftest.$ac_objext; then :
2404   ac_retval=0
2405 else
2406   $as_echo "$as_me: failed program was:" >&5
2407 sed 's/^/| /' conftest.$ac_ext >&5
2408 
2409         ac_retval=1
2410 fi
2411   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2412   as_fn_set_status $ac_retval
2413 
2414 } # ac_fn_c_try_compile
2415 
2416 # ac_fn_cxx_try_compile LINENO
2417 # ----------------------------
2418 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2419 ac_fn_cxx_try_compile ()
2420 {
2421   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2422   rm -f conftest.$ac_objext
2423   if { { ac_try="$ac_compile"
2424 case "(($ac_try" in
2425   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2426   *) ac_try_echo=$ac_try;;
2427 esac
2428 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2429 $as_echo "$ac_try_echo"; } >&5
2430   (eval "$ac_compile") 2>conftest.err
2431   ac_status=$?
2432   if test -s conftest.err; then
2433     grep -v '^ *+' conftest.err >conftest.er1
2434     cat conftest.er1 >&5
2435     mv -f conftest.er1 conftest.err
2436   fi
2437   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2438   test $ac_status = 0; } && {
2439          test -z "$ac_cxx_werror_flag" ||
2440          test ! -s conftest.err
2441        } && test -s conftest.$ac_objext; then :
2442   ac_retval=0
2443 else
2444   $as_echo "$as_me: failed program was:" >&5
2445 sed 's/^/| /' conftest.$ac_ext >&5
2446 
2447         ac_retval=1
2448 fi
2449   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2450   as_fn_set_status $ac_retval
2451 
2452 } # ac_fn_cxx_try_compile
2453 
2454 # ac_fn_c_try_cpp LINENO
2455 # ----------------------
2456 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2457 ac_fn_c_try_cpp ()
2458 {
2459   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2460   if { { ac_try="$ac_cpp conftest.$ac_ext"
2461 case "(($ac_try" in
2462   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2463   *) ac_try_echo=$ac_try;;
2464 esac
2465 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2466 $as_echo "$ac_try_echo"; } >&5
2467   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2468   ac_status=$?
2469   if test -s conftest.err; then
2470     grep -v '^ *+' conftest.err >conftest.er1
2471     cat conftest.er1 >&5
2472     mv -f conftest.er1 conftest.err
2473   fi
2474   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2475   test $ac_status = 0; } > conftest.i && {
2476          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2477          test ! -s conftest.err
2478        }; then :
2479   ac_retval=0
2480 else
2481   $as_echo "$as_me: failed program was:" >&5
2482 sed 's/^/| /' conftest.$ac_ext >&5
2483 
2484     ac_retval=1
2485 fi
2486   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2487   as_fn_set_status $ac_retval
2488 
2489 } # ac_fn_c_try_cpp
2490 
2491 # ac_fn_cxx_try_cpp LINENO
2492 # ------------------------
2493 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2494 ac_fn_cxx_try_cpp ()
2495 {
2496   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2497   if { { ac_try="$ac_cpp conftest.$ac_ext"
2498 case "(($ac_try" in
2499   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2500   *) ac_try_echo=$ac_try;;
2501 esac
2502 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2503 $as_echo "$ac_try_echo"; } >&5
2504   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2505   ac_status=$?
2506   if test -s conftest.err; then
2507     grep -v '^ *+' conftest.err >conftest.er1
2508     cat conftest.er1 >&5
2509     mv -f conftest.er1 conftest.err
2510   fi
2511   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2512   test $ac_status = 0; } > conftest.i && {
2513          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2514          test ! -s conftest.err
2515        }; then :
2516   ac_retval=0
2517 else
2518   $as_echo "$as_me: failed program was:" >&5
2519 sed 's/^/| /' conftest.$ac_ext >&5
2520 
2521     ac_retval=1
2522 fi
2523   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2524   as_fn_set_status $ac_retval
2525 
2526 } # ac_fn_cxx_try_cpp
2527 
2528 # ac_fn_c_try_link LINENO
2529 # -----------------------
2530 # Try to link conftest.$ac_ext, and return whether this succeeded.
2531 ac_fn_c_try_link ()
2532 {
2533   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2534   rm -f conftest.$ac_objext conftest$ac_exeext
2535   if { { ac_try="$ac_link"
2536 case "(($ac_try" in
2537   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2538   *) ac_try_echo=$ac_try;;
2539 esac
2540 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2541 $as_echo "$ac_try_echo"; } >&5
2542   (eval "$ac_link") 2>conftest.err
2543   ac_status=$?
2544   if test -s conftest.err; then
2545     grep -v '^ *+' conftest.err >conftest.er1
2546     cat conftest.er1 >&5
2547     mv -f conftest.er1 conftest.err
2548   fi
2549   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2550   test $ac_status = 0; } && {
2551          test -z "$ac_c_werror_flag" ||
2552          test ! -s conftest.err
2553        } && test -s conftest$ac_exeext && {
2554          test "$cross_compiling" = yes ||
2555          test -x conftest$ac_exeext
2556        }; then :
2557   ac_retval=0
2558 else
2559   $as_echo "$as_me: failed program was:" >&5
2560 sed 's/^/| /' conftest.$ac_ext >&5
2561 
2562         ac_retval=1
2563 fi
2564   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2565   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2566   # interfere with the next link command; also delete a directory that is
2567   # left behind by Apple's compiler.  We do this before executing the actions.
2568   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2569   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2570   as_fn_set_status $ac_retval
2571 
2572 } # ac_fn_c_try_link
2573 
2574 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2575 # ---------------------------------------------------------
2576 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2577 # the include files in INCLUDES and setting the cache variable VAR
2578 # accordingly.
2579 ac_fn_cxx_check_header_mongrel ()
2580 {
2581   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2582   if eval \${$3+:} false; then :
2583   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2584 $as_echo_n "checking for $2... " >&6; }
2585 if eval \${$3+:} false; then :
2586   $as_echo_n "(cached) " >&6
2587 fi
2588 eval ac_res=\$$3
2589                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2590 $as_echo "$ac_res" >&6; }
2591 else
2592   # Is the header compilable?
2593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2594 $as_echo_n "checking $2 usability... " >&6; }
2595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2596 /* end confdefs.h.  */
2597 $4
2598 #include <$2>
2599 _ACEOF
2600 if ac_fn_cxx_try_compile "$LINENO"; then :
2601   ac_header_compiler=yes
2602 else
2603   ac_header_compiler=no
2604 fi
2605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2607 $as_echo "$ac_header_compiler" >&6; }
2608 
2609 # Is the header present?
2610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2611 $as_echo_n "checking $2 presence... " >&6; }
2612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2613 /* end confdefs.h.  */
2614 #include <$2>
2615 _ACEOF
2616 if ac_fn_cxx_try_cpp "$LINENO"; then :
2617   ac_header_preproc=yes
2618 else
2619   ac_header_preproc=no
2620 fi
2621 rm -f conftest.err conftest.i conftest.$ac_ext
2622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2623 $as_echo "$ac_header_preproc" >&6; }
2624 
2625 # So?  What about this header?
2626 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2627   yes:no: )
2628     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2629 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2630     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2631 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2632     ;;
2633   no:yes:* )
2634     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2635 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2636     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2637 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2638     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2639 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2640     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2641 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2642     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2643 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2644 ( $as_echo "## ----------------------------------------- ##
2645 ## Report this to build-dev@openjdk.java.net ##
2646 ## ----------------------------------------- ##"
2647      ) | sed "s/^/$as_me: WARNING:     /" >&2
2648     ;;
2649 esac
2650   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2651 $as_echo_n "checking for $2... " >&6; }
2652 if eval \${$3+:} false; then :
2653   $as_echo_n "(cached) " >&6
2654 else
2655   eval "$3=\$ac_header_compiler"
2656 fi
2657 eval ac_res=\$$3
2658                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2659 $as_echo "$ac_res" >&6; }
2660 fi
2661   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2662 
2663 } # ac_fn_cxx_check_header_mongrel
2664 
2665 # ac_fn_cxx_try_run LINENO
2666 # ------------------------
2667 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2668 # that executables *can* be run.
2669 ac_fn_cxx_try_run ()
2670 {
2671   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2672   if { { ac_try="$ac_link"
2673 case "(($ac_try" in
2674   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2675   *) ac_try_echo=$ac_try;;
2676 esac
2677 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2678 $as_echo "$ac_try_echo"; } >&5
2679   (eval "$ac_link") 2>&5
2680   ac_status=$?
2681   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2682   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2683   { { case "(($ac_try" in
2684   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2685   *) ac_try_echo=$ac_try;;
2686 esac
2687 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2688 $as_echo "$ac_try_echo"; } >&5
2689   (eval "$ac_try") 2>&5
2690   ac_status=$?
2691   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2692   test $ac_status = 0; }; }; then :
2693   ac_retval=0
2694 else
2695   $as_echo "$as_me: program exited with status $ac_status" >&5
2696        $as_echo "$as_me: failed program was:" >&5
2697 sed 's/^/| /' conftest.$ac_ext >&5
2698 
2699        ac_retval=$ac_status
2700 fi
2701   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2702   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2703   as_fn_set_status $ac_retval
2704 
2705 } # ac_fn_cxx_try_run
2706 
2707 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2708 # ---------------------------------------------------------
2709 # Tests whether HEADER exists and can be compiled using the include files in
2710 # INCLUDES, setting the cache variable VAR accordingly.
2711 ac_fn_cxx_check_header_compile ()
2712 {
2713   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2714   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2715 $as_echo_n "checking for $2... " >&6; }
2716 if eval \${$3+:} false; then :
2717   $as_echo_n "(cached) " >&6
2718 else
2719   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2720 /* end confdefs.h.  */
2721 $4
2722 #include <$2>
2723 _ACEOF
2724 if ac_fn_cxx_try_compile "$LINENO"; then :
2725   eval "$3=yes"
2726 else
2727   eval "$3=no"
2728 fi
2729 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2730 fi
2731 eval ac_res=\$$3
2732                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2733 $as_echo "$ac_res" >&6; }
2734   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2735 
2736 } # ac_fn_cxx_check_header_compile
2737 
2738 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2739 # ----------------------------------------------
2740 # Tries to find the compile-time value of EXPR in a program that includes
2741 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2742 # computed
2743 ac_fn_cxx_compute_int ()
2744 {
2745   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2746   if test "$cross_compiling" = yes; then
2747     # Depending upon the size, compute the lo and hi bounds.
2748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2749 /* end confdefs.h.  */
2750 $4
2751 int
2752 main ()
2753 {
2754 static int test_array [1 - 2 * !(($2) >= 0)];
2755 test_array [0] = 0;
2756 return test_array [0];
2757 
2758   ;
2759   return 0;
2760 }
2761 _ACEOF
2762 if ac_fn_cxx_try_compile "$LINENO"; then :
2763   ac_lo=0 ac_mid=0
2764   while :; do
2765     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2766 /* end confdefs.h.  */
2767 $4
2768 int
2769 main ()
2770 {
2771 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2772 test_array [0] = 0;
2773 return test_array [0];
2774 
2775   ;
2776   return 0;
2777 }
2778 _ACEOF
2779 if ac_fn_cxx_try_compile "$LINENO"; then :
2780   ac_hi=$ac_mid; break
2781 else
2782   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2783                         if test $ac_lo -le $ac_mid; then
2784                           ac_lo= ac_hi=
2785                           break
2786                         fi
2787                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2788 fi
2789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2790   done
2791 else
2792   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2793 /* end confdefs.h.  */
2794 $4
2795 int
2796 main ()
2797 {
2798 static int test_array [1 - 2 * !(($2) < 0)];
2799 test_array [0] = 0;
2800 return test_array [0];
2801 
2802   ;
2803   return 0;
2804 }
2805 _ACEOF
2806 if ac_fn_cxx_try_compile "$LINENO"; then :
2807   ac_hi=-1 ac_mid=-1
2808   while :; do
2809     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2810 /* end confdefs.h.  */
2811 $4
2812 int
2813 main ()
2814 {
2815 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2816 test_array [0] = 0;
2817 return test_array [0];
2818 
2819   ;
2820   return 0;
2821 }
2822 _ACEOF
2823 if ac_fn_cxx_try_compile "$LINENO"; then :
2824   ac_lo=$ac_mid; break
2825 else
2826   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2827                         if test $ac_mid -le $ac_hi; then
2828                           ac_lo= ac_hi=
2829                           break
2830                         fi
2831                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2832 fi
2833 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2834   done
2835 else
2836   ac_lo= ac_hi=
2837 fi
2838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2839 fi
2840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2841 # Binary search between lo and hi bounds.
2842 while test "x$ac_lo" != "x$ac_hi"; do
2843   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2844   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2845 /* end confdefs.h.  */
2846 $4
2847 int
2848 main ()
2849 {
2850 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2851 test_array [0] = 0;
2852 return test_array [0];
2853 
2854   ;
2855   return 0;
2856 }
2857 _ACEOF
2858 if ac_fn_cxx_try_compile "$LINENO"; then :
2859   ac_hi=$ac_mid
2860 else
2861   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2862 fi
2863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2864 done
2865 case $ac_lo in #((
2866 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2867 '') ac_retval=1 ;;
2868 esac
2869   else
2870     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2871 /* end confdefs.h.  */
2872 $4
2873 static long int longval () { return $2; }
2874 static unsigned long int ulongval () { return $2; }
2875 #include <stdio.h>
2876 #include <stdlib.h>
2877 int
2878 main ()
2879 {
2880 
2881   FILE *f = fopen ("conftest.val", "w");
2882   if (! f)
2883     return 1;
2884   if (($2) < 0)
2885     {
2886       long int i = longval ();
2887       if (i != ($2))
2888         return 1;
2889       fprintf (f, "%ld", i);
2890     }
2891   else
2892     {
2893       unsigned long int i = ulongval ();
2894       if (i != ($2))
2895         return 1;
2896       fprintf (f, "%lu", i);
2897     }
2898   /* Do not output a trailing newline, as this causes \r\n confusion
2899      on some platforms.  */
2900   return ferror (f) || fclose (f) != 0;
2901 
2902   ;
2903   return 0;
2904 }
2905 _ACEOF
2906 if ac_fn_cxx_try_run "$LINENO"; then :
2907   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2908 else
2909   ac_retval=1
2910 fi
2911 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2912   conftest.$ac_objext conftest.beam conftest.$ac_ext
2913 rm -f conftest.val
2914 
2915   fi
2916   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2917   as_fn_set_status $ac_retval
2918 
2919 } # ac_fn_cxx_compute_int
2920 
2921 # ac_fn_cxx_try_link LINENO
2922 # -------------------------
2923 # Try to link conftest.$ac_ext, and return whether this succeeded.
2924 ac_fn_cxx_try_link ()
2925 {
2926   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2927   rm -f conftest.$ac_objext conftest$ac_exeext
2928   if { { ac_try="$ac_link"
2929 case "(($ac_try" in
2930   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2931   *) ac_try_echo=$ac_try;;
2932 esac
2933 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2934 $as_echo "$ac_try_echo"; } >&5
2935   (eval "$ac_link") 2>conftest.err
2936   ac_status=$?
2937   if test -s conftest.err; then
2938     grep -v '^ *+' conftest.err >conftest.er1
2939     cat conftest.er1 >&5
2940     mv -f conftest.er1 conftest.err
2941   fi
2942   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2943   test $ac_status = 0; } && {
2944          test -z "$ac_cxx_werror_flag" ||
2945          test ! -s conftest.err
2946        } && test -s conftest$ac_exeext && {
2947          test "$cross_compiling" = yes ||
2948          test -x conftest$ac_exeext
2949        }; then :
2950   ac_retval=0
2951 else
2952   $as_echo "$as_me: failed program was:" >&5
2953 sed 's/^/| /' conftest.$ac_ext >&5
2954 
2955         ac_retval=1
2956 fi
2957   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2958   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2959   # interfere with the next link command; also delete a directory that is
2960   # left behind by Apple's compiler.  We do this before executing the actions.
2961   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2962   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2963   as_fn_set_status $ac_retval
2964 
2965 } # ac_fn_cxx_try_link
2966 
2967 # ac_fn_cxx_check_func LINENO FUNC VAR
2968 # ------------------------------------
2969 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2970 ac_fn_cxx_check_func ()
2971 {
2972   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2973   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2974 $as_echo_n "checking for $2... " >&6; }
2975 if eval \${$3+:} false; then :
2976   $as_echo_n "(cached) " >&6
2977 else
2978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2979 /* end confdefs.h.  */
2980 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2981    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2982 #define $2 innocuous_$2
2983 
2984 /* System header to define __stub macros and hopefully few prototypes,
2985     which can conflict with char $2 (); below.
2986     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2987     <limits.h> exists even on freestanding compilers.  */
2988 
2989 #ifdef __STDC__
2990 # include <limits.h>
2991 #else
2992 # include <assert.h>
2993 #endif
2994 
2995 #undef $2
2996 
2997 /* Override any GCC internal prototype to avoid an error.
2998    Use char because int might match the return type of a GCC
2999    builtin and then its argument prototype would still apply.  */
3000 #ifdef __cplusplus
3001 extern "C"
3002 #endif
3003 char $2 ();
3004 /* The GNU C library defines this for functions which it implements
3005     to always fail with ENOSYS.  Some functions are actually named
3006     something starting with __ and the normal name is an alias.  */
3007 #if defined __stub_$2 || defined __stub___$2
3008 choke me
3009 #endif
3010 
3011 int
3012 main ()
3013 {
3014 return $2 ();
3015   ;
3016   return 0;
3017 }
3018 _ACEOF
3019 if ac_fn_cxx_try_link "$LINENO"; then :
3020   eval "$3=yes"
3021 else
3022   eval "$3=no"
3023 fi
3024 rm -f core conftest.err conftest.$ac_objext \
3025     conftest$ac_exeext conftest.$ac_ext
3026 fi
3027 eval ac_res=\$$3
3028                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3029 $as_echo "$ac_res" >&6; }
3030   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3031 
3032 } # ac_fn_cxx_check_func
3033 
3034 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3035 # -------------------------------------------------------
3036 # Tests whether HEADER exists and can be compiled using the include files in
3037 # INCLUDES, setting the cache variable VAR accordingly.
3038 ac_fn_c_check_header_compile ()
3039 {
3040   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3041   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3042 $as_echo_n "checking for $2... " >&6; }
3043 if eval \${$3+:} false; then :
3044   $as_echo_n "(cached) " >&6
3045 else
3046   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3047 /* end confdefs.h.  */
3048 $4
3049 #include <$2>
3050 _ACEOF
3051 if ac_fn_c_try_compile "$LINENO"; then :
3052   eval "$3=yes"
3053 else
3054   eval "$3=no"
3055 fi
3056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3057 fi
3058 eval ac_res=\$$3
3059                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3060 $as_echo "$ac_res" >&6; }
3061   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3062 
3063 } # ac_fn_c_check_header_compile
3064 cat >config.log <<_ACEOF
3065 This file contains any messages produced by compilers while
3066 running configure, to aid debugging if configure makes a mistake.
3067 
3068 It was created by OpenJDK $as_me jdk9, which was
3069 generated by GNU Autoconf 2.69.  Invocation command line was
3070 
3071   $ $0 $@
3072 
3073 _ACEOF
3074 exec 5>>config.log
3075 {
3076 cat <<_ASUNAME
3077 ## --------- ##
3078 ## Platform. ##
3079 ## --------- ##
3080 
3081 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3082 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3083 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3084 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3085 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3086 
3087 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3088 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3089 
3090 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3091 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3092 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3093 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3094 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3095 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3096 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3097 
3098 _ASUNAME
3099 
3100 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3101 for as_dir in $PATH
3102 do
3103   IFS=$as_save_IFS
3104   test -z "$as_dir" && as_dir=.
3105     $as_echo "PATH: $as_dir"
3106   done
3107 IFS=$as_save_IFS
3108 
3109 } >&5
3110 
3111 cat >&5 <<_ACEOF
3112 
3113 
3114 ## ----------- ##
3115 ## Core tests. ##
3116 ## ----------- ##
3117 
3118 _ACEOF
3119 
3120 
3121 # Keep a trace of the command line.
3122 # Strip out --no-create and --no-recursion so they do not pile up.
3123 # Strip out --silent because we don't want to record it for future runs.
3124 # Also quote any args containing shell meta-characters.
3125 # Make two passes to allow for proper duplicate-argument suppression.
3126 ac_configure_args=
3127 ac_configure_args0=
3128 ac_configure_args1=
3129 ac_must_keep_next=false
3130 for ac_pass in 1 2
3131 do
3132   for ac_arg
3133   do
3134     case $ac_arg in
3135     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3136     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3137     | -silent | --silent | --silen | --sile | --sil)
3138       continue ;;
3139     *\'*)
3140       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3141     esac
3142     case $ac_pass in
3143     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3144     2)
3145       as_fn_append ac_configure_args1 " '$ac_arg'"
3146       if test $ac_must_keep_next = true; then
3147         ac_must_keep_next=false # Got value, back to normal.
3148       else
3149         case $ac_arg in
3150           *=* | --config-cache | -C | -disable-* | --disable-* \
3151           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3152           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3153           | -with-* | --with-* | -without-* | --without-* | --x)
3154             case "$ac_configure_args0 " in
3155               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3156             esac
3157             ;;
3158           -* ) ac_must_keep_next=true ;;
3159         esac
3160       fi
3161       as_fn_append ac_configure_args " '$ac_arg'"
3162       ;;
3163     esac
3164   done
3165 done
3166 { ac_configure_args0=; unset ac_configure_args0;}
3167 { ac_configure_args1=; unset ac_configure_args1;}
3168 
3169 # When interrupted or exit'd, cleanup temporary files, and complete
3170 # config.log.  We remove comments because anyway the quotes in there
3171 # would cause problems or look ugly.
3172 # WARNING: Use '\'' to represent an apostrophe within the trap.
3173 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3174 trap 'exit_status=$?
3175   # Save into config.log some information that might help in debugging.
3176   {
3177     echo
3178 
3179     $as_echo "## ---------------- ##
3180 ## Cache variables. ##
3181 ## ---------------- ##"
3182     echo
3183     # The following way of writing the cache mishandles newlines in values,
3184 (
3185   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3186     eval ac_val=\$$ac_var
3187     case $ac_val in #(
3188     *${as_nl}*)
3189       case $ac_var in #(
3190       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3191 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3192       esac
3193       case $ac_var in #(
3194       _ | IFS | as_nl) ;; #(
3195       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3196       *) { eval $ac_var=; unset $ac_var;} ;;
3197       esac ;;
3198     esac
3199   done
3200   (set) 2>&1 |
3201     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3202     *${as_nl}ac_space=\ *)
3203       sed -n \
3204         "s/'\''/'\''\\\\'\'''\''/g;
3205           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3206       ;; #(
3207     *)
3208       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3209       ;;
3210     esac |
3211     sort
3212 )
3213     echo
3214 
3215     $as_echo "## ----------------- ##
3216 ## Output variables. ##
3217 ## ----------------- ##"
3218     echo
3219     for ac_var in $ac_subst_vars
3220     do
3221       eval ac_val=\$$ac_var
3222       case $ac_val in
3223       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3224       esac
3225       $as_echo "$ac_var='\''$ac_val'\''"
3226     done | sort
3227     echo
3228 
3229     if test -n "$ac_subst_files"; then
3230       $as_echo "## ------------------- ##
3231 ## File substitutions. ##
3232 ## ------------------- ##"
3233       echo
3234       for ac_var in $ac_subst_files
3235       do
3236         eval ac_val=\$$ac_var
3237         case $ac_val in
3238         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3239         esac
3240         $as_echo "$ac_var='\''$ac_val'\''"
3241       done | sort
3242       echo
3243     fi
3244 
3245     if test -s confdefs.h; then
3246       $as_echo "## ----------- ##
3247 ## confdefs.h. ##
3248 ## ----------- ##"
3249       echo
3250       cat confdefs.h
3251       echo
3252     fi
3253     test "$ac_signal" != 0 &&
3254       $as_echo "$as_me: caught signal $ac_signal"
3255     $as_echo "$as_me: exit $exit_status"
3256   } >&5
3257   rm -f core *.core core.conftest.* &&
3258     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3259     exit $exit_status
3260 ' 0
3261 for ac_signal in 1 2 13 15; do
3262   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3263 done
3264 ac_signal=0
3265 
3266 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3267 rm -f -r conftest* confdefs.h
3268 
3269 $as_echo "/* confdefs.h */" > confdefs.h
3270 
3271 # Predefined preprocessor variables.
3272 
3273 cat >>confdefs.h <<_ACEOF
3274 #define PACKAGE_NAME "$PACKAGE_NAME"
3275 _ACEOF
3276 
3277 cat >>confdefs.h <<_ACEOF
3278 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3279 _ACEOF
3280 
3281 cat >>confdefs.h <<_ACEOF
3282 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3283 _ACEOF
3284 
3285 cat >>confdefs.h <<_ACEOF
3286 #define PACKAGE_STRING "$PACKAGE_STRING"
3287 _ACEOF
3288 
3289 cat >>confdefs.h <<_ACEOF
3290 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3291 _ACEOF
3292 
3293 cat >>confdefs.h <<_ACEOF
3294 #define PACKAGE_URL "$PACKAGE_URL"
3295 _ACEOF
3296 
3297 
3298 # Let the site file select an alternate cache file if it wants to.
3299 # Prefer an explicitly selected file to automatically selected ones.
3300 ac_site_file1=NONE
3301 ac_site_file2=NONE
3302 if test -n "$CONFIG_SITE"; then
3303   # We do not want a PATH search for config.site.
3304   case $CONFIG_SITE in #((
3305     -*)  ac_site_file1=./$CONFIG_SITE;;
3306     */*) ac_site_file1=$CONFIG_SITE;;
3307     *)   ac_site_file1=./$CONFIG_SITE;;
3308   esac
3309 elif test "x$prefix" != xNONE; then
3310   ac_site_file1=$prefix/share/config.site
3311   ac_site_file2=$prefix/etc/config.site
3312 else
3313   ac_site_file1=$ac_default_prefix/share/config.site
3314   ac_site_file2=$ac_default_prefix/etc/config.site
3315 fi
3316 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3317 do
3318   test "x$ac_site_file" = xNONE && continue
3319   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3320     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3321 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3322     sed 's/^/| /' "$ac_site_file" >&5
3323     . "$ac_site_file" \
3324       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3325 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3326 as_fn_error $? "failed to load site script $ac_site_file
3327 See \`config.log' for more details" "$LINENO" 5; }
3328   fi
3329 done
3330 
3331 if test -r "$cache_file"; then
3332   # Some versions of bash will fail to source /dev/null (special files
3333   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3334   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3335     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3336 $as_echo "$as_me: loading cache $cache_file" >&6;}
3337     case $cache_file in
3338       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3339       *)                      . "./$cache_file";;
3340     esac
3341   fi
3342 else
3343   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3344 $as_echo "$as_me: creating cache $cache_file" >&6;}
3345   >$cache_file
3346 fi
3347 
3348 # Check that the precious variables saved in the cache have kept the same
3349 # value.
3350 ac_cache_corrupted=false
3351 for ac_var in $ac_precious_vars; do
3352   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3353   eval ac_new_set=\$ac_env_${ac_var}_set
3354   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3355   eval ac_new_val=\$ac_env_${ac_var}_value
3356   case $ac_old_set,$ac_new_set in
3357     set,)
3358       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3359 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3360       ac_cache_corrupted=: ;;
3361     ,set)
3362       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3363 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3364       ac_cache_corrupted=: ;;
3365     ,);;
3366     *)
3367       if test "x$ac_old_val" != "x$ac_new_val"; then
3368         # differences in whitespace do not lead to failure.
3369         ac_old_val_w=`echo x $ac_old_val`
3370         ac_new_val_w=`echo x $ac_new_val`
3371         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3372           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3373 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3374           ac_cache_corrupted=:
3375         else
3376           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3377 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3378           eval $ac_var=\$ac_old_val
3379         fi
3380         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3381 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3382         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3383 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3384       fi;;
3385   esac
3386   # Pass precious variables to config.status.
3387   if test "$ac_new_set" = set; then
3388     case $ac_new_val in
3389     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3390     *) ac_arg=$ac_var=$ac_new_val ;;
3391     esac
3392     case " $ac_configure_args " in
3393       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3394       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3395     esac
3396   fi
3397 done
3398 if $ac_cache_corrupted; then
3399   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3400 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3401   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3402 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3403   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3404 fi
3405 ## -------------------- ##
3406 ## Main body of script. ##
3407 ## -------------------- ##
3408 
3409 ac_ext=c
3410 ac_cpp='$CPP $CPPFLAGS'
3411 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3412 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3413 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3414 
3415 
3416 
3417 ac_aux_dir=
3418 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3419   if test -f "$ac_dir/install-sh"; then
3420     ac_aux_dir=$ac_dir
3421     ac_install_sh="$ac_aux_dir/install-sh -c"
3422     break
3423   elif test -f "$ac_dir/install.sh"; then
3424     ac_aux_dir=$ac_dir
3425     ac_install_sh="$ac_aux_dir/install.sh -c"
3426     break
3427   elif test -f "$ac_dir/shtool"; then
3428     ac_aux_dir=$ac_dir
3429     ac_install_sh="$ac_aux_dir/shtool install -c"
3430     break
3431   fi
3432 done
3433 if test -z "$ac_aux_dir"; then
3434   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
3435 fi
3436 
3437 # These three variables are undocumented and unsupported,
3438 # and are intended to be withdrawn in a future Autoconf release.
3439 # They can cause serious problems if a builder's source tree is in a directory
3440 # whose full name contains unusual characters.
3441 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3442 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3443 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3444 
3445 
3446 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3447 
3448 #
3449 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3450 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3451 #
3452 # This code is free software; you can redistribute it and/or modify it
3453 # under the terms of the GNU General Public License version 2 only, as
3454 # published by the Free Software Foundation.  Oracle designates this
3455 # particular file as subject to the "Classpath" exception as provided
3456 # by Oracle in the LICENSE file that accompanied this code.
3457 #
3458 # This code is distributed in the hope that it will be useful, but WITHOUT
3459 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3460 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3461 # version 2 for more details (a copy is included in the LICENSE file that
3462 # accompanied this code).
3463 #
3464 # You should have received a copy of the GNU General Public License version
3465 # 2 along with this work; if not, write to the Free Software Foundation,
3466 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3467 #
3468 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3469 # or visit www.oracle.com if you need additional information or have any
3470 # questions.
3471 #
3472 
3473 #
3474 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3475 #
3476 # This program is free software; you can redistribute it and/or modify
3477 # it under the terms of the GNU General Public License as published by
3478 # the Free Software Foundation; either version 2 of the License, or
3479 # (at your option) any later version.
3480 #
3481 # This program is distributed in the hope that it will be useful, but
3482 # WITHOUT ANY WARRANTY; without even the implied warranty of
3483 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3484 # General Public License for more details.
3485 #
3486 # You should have received a copy of the GNU General Public License
3487 # along with this program; if not, write to the Free Software
3488 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3489 #
3490 # As a special exception to the GNU General Public License, if you
3491 # distribute this file as part of a program that contains a
3492 # configuration script generated by Autoconf, you may include it under
3493 # the same distribution terms that you use for the rest of that program.
3494 
3495 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3496 # ----------------------------------
3497 # PKG_PROG_PKG_CONFIG
3498 
3499 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3500 #
3501 # Check to see whether a particular set of modules exists.  Similar
3502 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3503 #
3504 #
3505 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3506 # this or PKG_CHECK_MODULES is called, or make sure to call
3507 # PKG_CHECK_EXISTS manually
3508 # --------------------------------------------------------------
3509 
3510 
3511 
3512 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3513 # ---------------------------------------------
3514 # _PKG_CONFIG
3515 
3516 # _PKG_SHORT_ERRORS_SUPPORTED
3517 # -----------------------------
3518 # _PKG_SHORT_ERRORS_SUPPORTED
3519 
3520 
3521 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3522 # [ACTION-IF-NOT-FOUND])
3523 #
3524 #
3525 # Note that if there is a possibility the first call to
3526 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3527 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3528 #
3529 #
3530 # --------------------------------------------------------------
3531 # PKG_CHECK_MODULES
3532 
3533 
3534 # Include these first...
3535 #
3536 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3537 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3538 #
3539 # This code is free software; you can redistribute it and/or modify it
3540 # under the terms of the GNU General Public License version 2 only, as
3541 # published by the Free Software Foundation.  Oracle designates this
3542 # particular file as subject to the "Classpath" exception as provided
3543 # by Oracle in the LICENSE file that accompanied this code.
3544 #
3545 # This code is distributed in the hope that it will be useful, but WITHOUT
3546 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3547 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3548 # version 2 for more details (a copy is included in the LICENSE file that
3549 # accompanied this code).
3550 #
3551 # You should have received a copy of the GNU General Public License version
3552 # 2 along with this work; if not, write to the Free Software Foundation,
3553 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3554 #
3555 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3556 # or visit www.oracle.com if you need additional information or have any
3557 # questions.
3558 #
3559 
3560 # Create a function/macro that takes a series of named arguments. The call is
3561 # similar to AC_DEFUN, but the setup of the function looks like this:
3562 # BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3563 # ... do something
3564 #   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3565 # ])
3566 # A star (*) in front of a named argument means that it is required and it's
3567 # presence will be verified. To pass e.g. the first value as a normal indexed
3568 # argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3569 # arguments are referenced in the function by their name prefixed by ARG_, e.g.
3570 # "ARG_FOO".
3571 #
3572 # The generated function can be called like this:
3573 # MYFUNC(FOO: [foo-val],
3574 #     BAR: [
3575 #         $ECHO hello world
3576 #     ])
3577 # Note that the argument value must start on the same line as the argument name.
3578 #
3579 # Argument 1: Name of the function to define
3580 # Argument 2: List of legal named arguments, with a * prefix for required arguments
3581 # Argument 3: Argument array to treat as named, typically $@
3582 # Argument 4: The main function body
3583 
3584 
3585 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3586 # If so, then append $1 to $2 \
3587 # Also set JVM_ARG_OK to true/false depending on outcome.
3588 
3589 
3590 # Appends a string to a path variable, only adding the : when needed.
3591 
3592 
3593 # Prepends a string to a path variable, only adding the : when needed.
3594 
3595 
3596 # This will make sure the given variable points to a full and proper
3597 # path. This means:
3598 # 1) There will be no spaces in the path. On unix platforms,
3599 #    spaces in the path will result in an error. On Windows,
3600 #    the path will be rewritten using short-style to be space-free.
3601 # 2) The path will be absolute, and it will be in unix-style (on
3602 #     cygwin).
3603 # $1: The name of the variable to fix
3604 
3605 
3606 # This will make sure the given variable points to a executable
3607 # with a full and proper path. This means:
3608 # 1) There will be no spaces in the path. On unix platforms,
3609 #    spaces in the path will result in an error. On Windows,
3610 #    the path will be rewritten using short-style to be space-free.
3611 # 2) The path will be absolute, and it will be in unix-style (on
3612 #     cygwin).
3613 # Any arguments given to the executable is preserved.
3614 # If the input variable does not have a directory specification, then
3615 # it need to be in the PATH.
3616 # $1: The name of the variable to fix
3617 
3618 
3619 
3620 
3621 # Register a --with argument but mark it as deprecated
3622 # $1: The name of the with argument to deprecate, not including --with-
3623 
3624 
3625 # Register a --enable argument but mark it as deprecated
3626 # $1: The name of the with argument to deprecate, not including --enable-
3627 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3628 # $3: Messages to user.
3629 
3630 
3631 
3632 
3633 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3634 # $1: variable to check
3635 
3636 
3637 # Check that there are no unprocessed overridden variables left.
3638 # If so, they are an incorrect argument and we will exit with an error.
3639 
3640 
3641 # Setup a tool for the given variable. If correctly specified by the user,
3642 # use that value, otherwise search for the tool using the supplied code snippet.
3643 # $1: variable to set
3644 # $2: code snippet to call to look for the tool
3645 # $3: code snippet to call if variable was used to find tool
3646 
3647 
3648 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3649 # $1: variable to set
3650 # $2: executable name (or list of names) to look for
3651 
3652 
3653 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3654 # $1: variable to set
3655 # $2: executable name (or list of names) to look for
3656 
3657 
3658 # Like BASIC_PATH_PROGS but fails if no tool was found.
3659 # $1: variable to set
3660 # $2: executable name (or list of names) to look for
3661 
3662 
3663 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3664 # $1: variable to set
3665 # $2: autoconf macro to call to look for the special tool
3666 
3667 
3668 # Setup the most fundamental tools that relies on not much else to set up,
3669 # but is used by much of the early bootstrap code.
3670 
3671 
3672 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3673 
3674 
3675 # Evaluates platform specific overrides for devkit variables.
3676 # $1: Name of variable
3677 
3678 
3679 
3680 
3681 
3682 
3683 #%%% Simple tools %%%
3684 
3685 # Check if we have found a usable version of make
3686 # $1: the path to a potential make binary (or empty)
3687 # $2: the description on how we found this
3688 
3689 
3690 
3691 
3692 # Goes looking for a usable version of GNU make.
3693 
3694 
3695 
3696 
3697 
3698 
3699 # Check if build directory is on local disk. If not possible to determine,
3700 # we prefer to claim it's local.
3701 # Argument 1: directory to test
3702 # Argument 2: what to do if it is on local disk
3703 # Argument 3: what to do otherwise (remote disk or failure)
3704 
3705 
3706 # Check that source files have basic read permissions set. This might
3707 # not be the case in cygwin in certain conditions.
3708 
3709 
3710 
3711 
3712 # Check for support for specific options in bash
3713 
3714 
3715 ################################################################################
3716 #
3717 # Default make target
3718 #
3719 
3720 
3721 # Code to run after AC_OUTPUT
3722 
3723 
3724 #
3725 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3726 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3727 #
3728 # This code is free software; you can redistribute it and/or modify it
3729 # under the terms of the GNU General Public License version 2 only, as
3730 # published by the Free Software Foundation.  Oracle designates this
3731 # particular file as subject to the "Classpath" exception as provided
3732 # by Oracle in the LICENSE file that accompanied this code.
3733 #
3734 # This code is distributed in the hope that it will be useful, but WITHOUT
3735 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3736 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3737 # version 2 for more details (a copy is included in the LICENSE file that
3738 # accompanied this code).
3739 #
3740 # You should have received a copy of the GNU General Public License version
3741 # 2 along with this work; if not, write to the Free Software Foundation,
3742 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3743 #
3744 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3745 # or visit www.oracle.com if you need additional information or have any
3746 # questions.
3747 #
3748 
3749 
3750 
3751 
3752 
3753 # Helper function which possibly converts a path using DOS-style short mode.
3754 # If so, the updated path is stored in $new_path.
3755 # $1: The path to check
3756 
3757 
3758 # Helper function which possibly converts a path using DOS-style short mode.
3759 # If so, the updated path is stored in $new_path.
3760 # $1: The path to check
3761 
3762 
3763 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3764 # and could probably be heavily simplified. However, all changes in this
3765 # area tend to need lot of testing in different scenarios, and in lack of
3766 # proper unit testing, cleaning this up has not been deemed worth the effort
3767 # at the moment.
3768 
3769 
3770 
3771 
3772 
3773 
3774 
3775 
3776 
3777 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3778 
3779 
3780 
3781 
3782 # ... then the rest
3783 #
3784 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3785 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3786 #
3787 # This code is free software; you can redistribute it and/or modify it
3788 # under the terms of the GNU General Public License version 2 only, as
3789 # published by the Free Software Foundation.  Oracle designates this
3790 # particular file as subject to the "Classpath" exception as provided
3791 # by Oracle in the LICENSE file that accompanied this code.
3792 #
3793 # This code is distributed in the hope that it will be useful, but WITHOUT
3794 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3795 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3796 # version 2 for more details (a copy is included in the LICENSE file that
3797 # accompanied this code).
3798 #
3799 # You should have received a copy of the GNU General Public License version
3800 # 2 along with this work; if not, write to the Free Software Foundation,
3801 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3802 #
3803 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3804 # or visit www.oracle.com if you need additional information or have any
3805 # questions.
3806 #
3807 
3808 ########################################################################
3809 # This file handles detection of the Boot JDK. The Boot JDK detection
3810 # process has been developed as a response to solve a complex real-world
3811 # problem. Initially, it was simple, but it has grown as platform after
3812 # platform, idiosyncracy after idiosyncracy has been supported.
3813 #
3814 # The basic idea is this:
3815 # 1) You need an acceptable *) JDK to use as a Boot JDK
3816 # 2) There are several ways to locate a JDK, that are mostly platform
3817 #    dependent **)
3818 # 3) You can have multiple JDKs installed
3819 # 4) If possible, configure should try to dig out an acceptable JDK
3820 #    automatically, without having to resort to command-line options
3821 #
3822 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3823 #     javac) and not a JRE, etc.
3824 #
3825 # **) On Windows we typically use a well-known path.
3826 #     On MacOSX we typically use the tool java_home.
3827 #     On Linux we typically find javac in the $PATH, and then follow a
3828 #     chain of symlinks that often ends up in a real JDK.
3829 #
3830 # This leads to the code where we check in different ways to locate a
3831 # JDK, and if one is found, check if it is acceptable. If not, we print
3832 # our reasons for rejecting it (useful when debugging non-working
3833 # configure situations) and continue checking the next one.
3834 ########################################################################
3835 
3836 # Execute the check given as argument, and verify the result
3837 # If the Boot JDK was previously found, do nothing
3838 # $1 A command line (typically autoconf macro) to execute
3839 
3840 
3841 # Test: Is bootjdk explicitely set by command line arguments?
3842 
3843 
3844 # Test: Is $JAVA_HOME set?
3845 
3846 
3847 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3848 
3849 
3850 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3851 # $1: Argument to the java_home binary (optional)
3852 
3853 
3854 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3855 
3856 
3857 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3858 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3859 # $1 = Path to directory containing jdk installations.
3860 # $2 = String to append to the found JDK directory to get the proper JDK home
3861 
3862 
3863 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3864 # environmental variable as base for where to look.
3865 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3866 
3867 
3868 # Test: Is there a JDK installed in default, well-known locations?
3869 
3870 
3871 # Check that a command-line tool in the Boot JDK is correct
3872 # $1 = name of variable to assign
3873 # $2 = name of binary
3874 
3875 
3876 ###############################################################################
3877 #
3878 # We need a Boot JDK to bootstrap the build.
3879 #
3880 
3881 
3882 
3883 
3884 
3885 # BUILD_JDK: the location of the latest JDK that can run
3886 #   on the host system and supports the target class file version
3887 #   generated in this JDK build.  This variable should only be
3888 #   used after the launchers are built.
3889 #
3890 
3891 # Execute the check given as argument, and verify the result.
3892 # If the JDK was previously found, do nothing.
3893 # $1 A command line (typically autoconf macro) to execute
3894 
3895 
3896 # By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3897 # is different than the host system doing the build (e.g. cross-compilation),
3898 # a special BUILD_JDK is built as part of the build process.  An external
3899 # prebuilt BUILD_JDK can also be supplied.
3900 
3901 
3902 #
3903 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3904 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3905 #
3906 # This code is free software; you can redistribute it and/or modify it
3907 # under the terms of the GNU General Public License version 2 only, as
3908 # published by the Free Software Foundation.  Oracle designates this
3909 # particular file as subject to the "Classpath" exception as provided
3910 # by Oracle in the LICENSE file that accompanied this code.
3911 #
3912 # This code is distributed in the hope that it will be useful, but WITHOUT
3913 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3914 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3915 # version 2 for more details (a copy is included in the LICENSE file that
3916 # accompanied this code).
3917 #
3918 # You should have received a copy of the GNU General Public License version
3919 # 2 along with this work; if not, write to the Free Software Foundation,
3920 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3921 #
3922 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3923 # or visit www.oracle.com if you need additional information or have any
3924 # questions.
3925 #
3926 
3927 
3928 
3929 
3930 
3931 
3932 
3933 
3934 
3935 
3936 
3937 
3938 
3939 
3940 
3941 
3942 
3943 ################################################################################
3944 #
3945 # Runs icecc-create-env once and prints the error if it fails
3946 #
3947 # $1: arguments to icecc-create-env
3948 # $2: log file
3949 #
3950 
3951 
3952 ################################################################################
3953 #
3954 # Optionally enable distributed compilation of native code using icecc/icecream
3955 #
3956 
3957 
3958 
3959 
3960 
3961 
3962 
3963 #
3964 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3965 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3966 #
3967 # This code is free software; you can redistribute it and/or modify it
3968 # under the terms of the GNU General Public License version 2 only, as
3969 # published by the Free Software Foundation.  Oracle designates this
3970 # particular file as subject to the "Classpath" exception as provided
3971 # by Oracle in the LICENSE file that accompanied this code.
3972 #
3973 # This code is distributed in the hope that it will be useful, but WITHOUT
3974 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3975 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3976 # version 2 for more details (a copy is included in the LICENSE file that
3977 # accompanied this code).
3978 #
3979 # You should have received a copy of the GNU General Public License version
3980 # 2 along with this work; if not, write to the Free Software Foundation,
3981 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3982 #
3983 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3984 # or visit www.oracle.com if you need additional information or have any
3985 # questions.
3986 #
3987 
3988 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3989 # corresponding configure arguments instead
3990 
3991 
3992 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3993 # that configure can use them while detecting compilers.
3994 # TOOLCHAIN_TYPE is available here.
3995 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
3996 
3997 
3998 
3999 
4000 
4001 
4002 # Documentation on common flags used for solstudio in HIGHEST.
4003 #
4004 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4005 #          done with care, there are some assumptions below that need to
4006 #          be understood about the use of pointers, and IEEE behavior.
4007 #
4008 # -fns: Use non-standard floating point mode (not IEEE 754)
4009 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4010 # -fsingle: Use single precision floating point with 'float'
4011 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
4012 #   (Source with excessing pointer casting and data access with mixed
4013 #    pointer types are not recommended)
4014 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4015 #   (If you expect perfect errno behavior, do not use this)
4016 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4017 # -xrestrict: Pointer parameters to functions do not overlap
4018 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4019 #    If you pass in multiple pointers to the same data, do not use this)
4020 # -xlibmil: Inline some library routines
4021 #   (If you expect perfect errno behavior, do not use this)
4022 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4023 #   (If you expect perfect errno behavior, do not use this)
4024 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4025 
4026     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4027     # Bug?
4028     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4029     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4030     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4031     #fi
4032 
4033 
4034 
4035 
4036 
4037 
4038 ################################################################################
4039 # $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4040 #      conditionals against.
4041 # $2 - Optional prefix for each variable defined.
4042 
4043 
4044 # FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4045 #                                  IF_FALSE: [RUN-IF-FALSE])
4046 # ------------------------------------------------------------
4047 # Check that the C compiler supports an argument
4048 
4049 
4050 
4051 
4052 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4053 #                                    IF_FALSE: [RUN-IF-FALSE])
4054 # ------------------------------------------------------------
4055 # Check that the C++ compiler supports an argument
4056 
4057 
4058 
4059 
4060 # FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4061 #                                IF_FALSE: [RUN-IF-FALSE])
4062 # ------------------------------------------------------------
4063 # Check that the C and C++ compilers support an argument
4064 
4065 
4066 
4067 
4068 # FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4069 #                                   IF_FALSE: [RUN-IF-FALSE])
4070 # ------------------------------------------------------------
4071 # Check that the linker support an argument
4072 
4073 
4074 
4075 
4076 
4077 
4078 
4079 
4080 #
4081 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4082 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4083 #
4084 # This code is free software; you can redistribute it and/or modify it
4085 # under the terms of the GNU General Public License version 2 only, as
4086 # published by the Free Software Foundation.  Oracle designates this
4087 # particular file as subject to the "Classpath" exception as provided
4088 # by Oracle in the LICENSE file that accompanied this code.
4089 #
4090 # This code is distributed in the hope that it will be useful, but WITHOUT
4091 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4092 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4093 # version 2 for more details (a copy is included in the LICENSE file that
4094 # accompanied this code).
4095 #
4096 # You should have received a copy of the GNU General Public License version
4097 # 2 along with this work; if not, write to the Free Software Foundation,
4098 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4099 #
4100 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4101 # or visit www.oracle.com if you need additional information or have any
4102 # questions.
4103 #
4104 
4105 
4106 
4107 
4108 
4109 cygwin_help() {
4110   case $1 in
4111     unzip)
4112       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4113       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4114       ;;
4115     zip)
4116       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4117       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4118       ;;
4119     make)
4120       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4121       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4122       ;;
4123     freetype)
4124       HELP_MSG="
4125 The freetype library can now be build during the configure process.
4126 Download the freetype sources and unpack them into an arbitrary directory:
4127 
4128 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4129 tar -xzf freetype-2.5.3.tar.gz
4130 
4131 Then run configure with '--with-freetype-src=<freetype_src>'. This will
4132 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4133 builds or into '<freetype_src>/lib32' for 32-bit builds.
4134 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4135 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4136 
4137 Alternatively you can unpack the sources like this to use the default directory:
4138 
4139 tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4140       ;;
4141   esac
4142 }
4143 
4144 msys_help() {
4145   PKGHANDLER_COMMAND=""
4146 }
4147 
4148 apt_help() {
4149   case $1 in
4150     reduced)
4151       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4152     devkit)
4153       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4154     openjdk)
4155       PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4156     alsa)
4157       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4158     cups)
4159       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4160     freetype)
4161       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4162     ffi)
4163       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4164     x11)
4165       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4166     ccache)
4167       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4168     dtrace)
4169       PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4170   esac
4171 }
4172 
4173 yum_help() {
4174   case $1 in
4175     devkit)
4176       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4177     openjdk)
4178       PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4179     alsa)
4180       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4181     cups)
4182       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4183     freetype)
4184       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4185     x11)
4186       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4187     ccache)
4188       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4189   esac
4190 }
4191 
4192 port_help() {
4193   PKGHANDLER_COMMAND=""
4194 }
4195 
4196 pkgutil_help() {
4197   PKGHANDLER_COMMAND=""
4198 }
4199 
4200 pkgadd_help() {
4201   PKGHANDLER_COMMAND=""
4202 }
4203 
4204 # This function will check if we're called from the "configure" wrapper while
4205 # printing --help. If so, we will print out additional information that can
4206 # only be extracted within the autoconf script, and then exit. This must be
4207 # called at the very beginning in configure.ac.
4208 
4209 
4210 
4211 
4212 
4213 
4214 #
4215 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4216 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4217 #
4218 # This code is free software; you can redistribute it and/or modify it
4219 # under the terms of the GNU General Public License version 2 only, as
4220 # published by the Free Software Foundation.  Oracle designates this
4221 # particular file as subject to the "Classpath" exception as provided
4222 # by Oracle in the LICENSE file that accompanied this code.
4223 #
4224 # This code is distributed in the hope that it will be useful, but WITHOUT
4225 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4226 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4227 # version 2 for more details (a copy is included in the LICENSE file that
4228 # accompanied this code).
4229 #
4230 # You should have received a copy of the GNU General Public License version
4231 # 2 along with this work; if not, write to the Free Software Foundation,
4232 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4233 #
4234 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4235 # or visit www.oracle.com if you need additional information or have any
4236 # questions.
4237 #
4238 
4239 # All valid JVM features, regardless of platform
4240 VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4241     fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4242 
4243 # All valid JVM variants
4244 VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4245 
4246 ###############################################################################
4247 # Check if the specified JVM variant should be built. To be used in shell if
4248 # constructs, like this:
4249 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
4250 #
4251 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4252 
4253 # Definition kept in one line to allow inlining in if statements.
4254 # Additional [] needed to keep m4 from mangling shell constructs.
4255 
4256 
4257 ###############################################################################
4258 # Check if the specified JVM features are explicitly enabled. To be used in
4259 # shell if constructs, like this:
4260 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4261 #
4262 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4263 
4264 # Definition kept in one line to allow inlining in if statements.
4265 # Additional [] needed to keep m4 from mangling shell constructs.
4266 
4267 
4268 ###############################################################################
4269 # Check which variants of the JVM that we want to build. Available variants are:
4270 #   server: normal interpreter, and a tiered C1/C2 compiler
4271 #   client: normal interpreter, and C1 (no C2 compiler)
4272 #   minimal: reduced form of client with optional features stripped out
4273 #   core: normal interpreter only, no compiler
4274 #   zero: C++ based interpreter only, no compiler
4275 #   zeroshark: C++ based interpreter, and a llvm-based compiler
4276 #   custom: baseline JVM with no default features
4277 #
4278 
4279 
4280 ###############################################################################
4281 # Check if dtrace should be enabled and has all prerequisites present.
4282 #
4283 
4284 
4285 ###############################################################################
4286 # Set up all JVM features for each JVM variant.
4287 #
4288 
4289 
4290 ###############################################################################
4291 # Validate JVM features once all setup is complete, including custom setup.
4292 #
4293 
4294 
4295 ###############################################################################
4296 # Support for old hotspot build. Remove once new hotspot build has proven
4297 # to work satisfactory.
4298 #
4299 
4300 
4301 #
4302 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4303 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4304 #
4305 # This code is free software; you can redistribute it and/or modify it
4306 # under the terms of the GNU General Public License version 2 only, as
4307 # published by the Free Software Foundation.  Oracle designates this
4308 # particular file as subject to the "Classpath" exception as provided
4309 # by Oracle in the LICENSE file that accompanied this code.
4310 #
4311 # This code is distributed in the hope that it will be useful, but WITHOUT
4312 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4313 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4314 # version 2 for more details (a copy is included in the LICENSE file that
4315 # accompanied this code).
4316 #
4317 # You should have received a copy of the GNU General Public License version
4318 # 2 along with this work; if not, write to the Free Software Foundation,
4319 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4320 #
4321 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4322 # or visit www.oracle.com if you need additional information or have any
4323 # questions.
4324 #
4325 
4326 ###############################################################################
4327 # Check which variant of the JDK that we want to build.
4328 # Currently we have:
4329 #    normal:   standard edition
4330 # but the custom make system may add other variants
4331 #
4332 # Effectively the JDK variant gives a name to a specific set of
4333 # modules to compile into the JDK.
4334 
4335 
4336 ###############################################################################
4337 # Set the debug level
4338 #    release: no debug information, all optimizations, no asserts.
4339 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4340 #    fastdebug: debug information (-g), all optimizations, all asserts
4341 #    slowdebug: debug information (-g), no optimizations, all asserts
4342 
4343 
4344 ###############################################################################
4345 #
4346 # Should we build only OpenJDK even if closed sources are present?
4347 #
4348 
4349 
4350 
4351 
4352 ###############################################################################
4353 #
4354 # Enable or disable the elliptic curve crypto implementation
4355 #
4356 
4357 
4358 
4359 
4360 ################################################################################
4361 #
4362 # Gcov coverage data for hotspot
4363 #
4364 
4365 
4366 ################################################################################
4367 #
4368 # Static build support.  When enabled will generate static
4369 # libraries instead of shared libraries for all JDK libs.
4370 #
4371 
4372 
4373 ################################################################################
4374 #
4375 # jlink options.
4376 # We always keep packaged modules in JDK image.
4377 #
4378 
4379 
4380 #
4381 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4382 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4383 #
4384 # This code is free software; you can redistribute it and/or modify it
4385 # under the terms of the GNU General Public License version 2 only, as
4386 # published by the Free Software Foundation.  Oracle designates this
4387 # particular file as subject to the "Classpath" exception as provided
4388 # by Oracle in the LICENSE file that accompanied this code.
4389 #
4390 # This code is distributed in the hope that it will be useful, but WITHOUT
4391 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4392 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4393 # version 2 for more details (a copy is included in the LICENSE file that
4394 # accompanied this code).
4395 #
4396 # You should have received a copy of the GNU General Public License version
4397 # 2 along with this work; if not, write to the Free Software Foundation,
4398 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4399 #
4400 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4401 # or visit www.oracle.com if you need additional information or have any
4402 # questions.
4403 #
4404 
4405 ###############################################################################
4406 #
4407 # Setup version numbers
4408 #
4409 
4410 # Verify that a given string represents a valid version number, and assign it
4411 # to a variable.
4412 
4413 # Argument 1: the variable to assign to
4414 # Argument 2: the value given by the user
4415 
4416 
4417 
4418 
4419 #
4420 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4421 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4422 #
4423 # This code is free software; you can redistribute it and/or modify it
4424 # under the terms of the GNU General Public License version 2 only, as
4425 # published by the Free Software Foundation.  Oracle designates this
4426 # particular file as subject to the "Classpath" exception as provided
4427 # by Oracle in the LICENSE file that accompanied this code.
4428 #
4429 # This code is distributed in the hope that it will be useful, but WITHOUT
4430 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4431 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4432 # version 2 for more details (a copy is included in the LICENSE file that
4433 # accompanied this code).
4434 #
4435 # You should have received a copy of the GNU General Public License version
4436 # 2 along with this work; if not, write to the Free Software Foundation,
4437 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4438 #
4439 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4440 # or visit www.oracle.com if you need additional information or have any
4441 # questions.
4442 #
4443 
4444 # Major library component reside in separate files.
4445 #
4446 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4447 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4448 #
4449 # This code is free software; you can redistribute it and/or modify it
4450 # under the terms of the GNU General Public License version 2 only, as
4451 # published by the Free Software Foundation.  Oracle designates this
4452 # particular file as subject to the "Classpath" exception as provided
4453 # by Oracle in the LICENSE file that accompanied this code.
4454 #
4455 # This code is distributed in the hope that it will be useful, but WITHOUT
4456 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4457 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4458 # version 2 for more details (a copy is included in the LICENSE file that
4459 # accompanied this code).
4460 #
4461 # You should have received a copy of the GNU General Public License version
4462 # 2 along with this work; if not, write to the Free Software Foundation,
4463 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4464 #
4465 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4466 # or visit www.oracle.com if you need additional information or have any
4467 # questions.
4468 #
4469 
4470 ################################################################################
4471 # Setup alsa (Advanced Linux Sound Architecture)
4472 ################################################################################
4473 
4474 
4475 #
4476 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4477 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4478 #
4479 # This code is free software; you can redistribute it and/or modify it
4480 # under the terms of the GNU General Public License version 2 only, as
4481 # published by the Free Software Foundation.  Oracle designates this
4482 # particular file as subject to the "Classpath" exception as provided
4483 # by Oracle in the LICENSE file that accompanied this code.
4484 #
4485 # This code is distributed in the hope that it will be useful, but WITHOUT
4486 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4487 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4488 # version 2 for more details (a copy is included in the LICENSE file that
4489 # accompanied this code).
4490 #
4491 # You should have received a copy of the GNU General Public License version
4492 # 2 along with this work; if not, write to the Free Software Foundation,
4493 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4494 #
4495 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4496 # or visit www.oracle.com if you need additional information or have any
4497 # questions.
4498 #
4499 
4500 ################################################################################
4501 # Setup bundled libraries.
4502 #
4503 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4504 # OpenJDK repository. Default is to use these libraries as bundled, but they
4505 # might be replaced by en external version by the user.
4506 ################################################################################
4507 
4508 
4509 ################################################################################
4510 # Setup libjpeg
4511 ################################################################################
4512 
4513 
4514 ################################################################################
4515 # Setup giflib
4516 ################################################################################
4517 
4518 
4519 ################################################################################
4520 # Setup libpng
4521 ################################################################################
4522 
4523 
4524 ################################################################################
4525 # Setup zlib
4526 ################################################################################
4527 
4528 
4529 ################################################################################
4530 # Setup lcms (Little CMS)
4531 ################################################################################
4532 
4533 
4534 #
4535 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4536 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4537 #
4538 # This code is free software; you can redistribute it and/or modify it
4539 # under the terms of the GNU General Public License version 2 only, as
4540 # published by the Free Software Foundation.  Oracle designates this
4541 # particular file as subject to the "Classpath" exception as provided
4542 # by Oracle in the LICENSE file that accompanied this code.
4543 #
4544 # This code is distributed in the hope that it will be useful, but WITHOUT
4545 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4546 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4547 # version 2 for more details (a copy is included in the LICENSE file that
4548 # accompanied this code).
4549 #
4550 # You should have received a copy of the GNU General Public License version
4551 # 2 along with this work; if not, write to the Free Software Foundation,
4552 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4553 #
4554 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4555 # or visit www.oracle.com if you need additional information or have any
4556 # questions.
4557 #
4558 
4559 ################################################################################
4560 # Setup cups (Common Unix Printing System)
4561 ################################################################################
4562 
4563 
4564 #
4565 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4566 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4567 #
4568 # This code is free software; you can redistribute it and/or modify it
4569 # under the terms of the GNU General Public License version 2 only, as
4570 # published by the Free Software Foundation.  Oracle designates this
4571 # particular file as subject to the "Classpath" exception as provided
4572 # by Oracle in the LICENSE file that accompanied this code.
4573 #
4574 # This code is distributed in the hope that it will be useful, but WITHOUT
4575 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4576 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4577 # version 2 for more details (a copy is included in the LICENSE file that
4578 # accompanied this code).
4579 #
4580 # You should have received a copy of the GNU General Public License version
4581 # 2 along with this work; if not, write to the Free Software Foundation,
4582 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4583 #
4584 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4585 # or visit www.oracle.com if you need additional information or have any
4586 # questions.
4587 #
4588 
4589 ################################################################################
4590 # Setup libffi (Foreign Function Interface)
4591 ################################################################################
4592 
4593 
4594 #
4595 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4596 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4597 #
4598 # This code is free software; you can redistribute it and/or modify it
4599 # under the terms of the GNU General Public License version 2 only, as
4600 # published by the Free Software Foundation.  Oracle designates this
4601 # particular file as subject to the "Classpath" exception as provided
4602 # by Oracle in the LICENSE file that accompanied this code.
4603 #
4604 # This code is distributed in the hope that it will be useful, but WITHOUT
4605 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4606 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4607 # version 2 for more details (a copy is included in the LICENSE file that
4608 # accompanied this code).
4609 #
4610 # You should have received a copy of the GNU General Public License version
4611 # 2 along with this work; if not, write to the Free Software Foundation,
4612 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4613 #
4614 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4615 # or visit www.oracle.com if you need additional information or have any
4616 # questions.
4617 #
4618 
4619 ################################################################################
4620 # Build the freetype lib from source
4621 ################################################################################
4622 
4623 
4624 ################################################################################
4625 # Check if a potential freeype library match is correct and usable
4626 ################################################################################
4627 
4628 
4629 ################################################################################
4630 # Setup freetype (The FreeType2 font rendering library)
4631 ################################################################################
4632 
4633 
4634 #
4635 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4636 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4637 #
4638 # This code is free software; you can redistribute it and/or modify it
4639 # under the terms of the GNU General Public License version 2 only, as
4640 # published by the Free Software Foundation.  Oracle designates this
4641 # particular file as subject to the "Classpath" exception as provided
4642 # by Oracle in the LICENSE file that accompanied this code.
4643 #
4644 # This code is distributed in the hope that it will be useful, but WITHOUT
4645 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4646 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4647 # version 2 for more details (a copy is included in the LICENSE file that
4648 # accompanied this code).
4649 #
4650 # You should have received a copy of the GNU General Public License version
4651 # 2 along with this work; if not, write to the Free Software Foundation,
4652 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4653 #
4654 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4655 # or visit www.oracle.com if you need additional information or have any
4656 # questions.
4657 #
4658 
4659 ################################################################################
4660 # Setup the standard C/C++ runtime libraries.
4661 #
4662 # Most importantly, determine if stdc++ should be linked statically or
4663 # dynamically.
4664 ################################################################################
4665 
4666 
4667 #
4668 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4669 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4670 #
4671 # This code is free software; you can redistribute it and/or modify it
4672 # under the terms of the GNU General Public License version 2 only, as
4673 # published by the Free Software Foundation.  Oracle designates this
4674 # particular file as subject to the "Classpath" exception as provided
4675 # by Oracle in the LICENSE file that accompanied this code.
4676 #
4677 # This code is distributed in the hope that it will be useful, but WITHOUT
4678 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4679 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4680 # version 2 for more details (a copy is included in the LICENSE file that
4681 # accompanied this code).
4682 #
4683 # You should have received a copy of the GNU General Public License version
4684 # 2 along with this work; if not, write to the Free Software Foundation,
4685 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4686 #
4687 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4688 # or visit www.oracle.com if you need additional information or have any
4689 # questions.
4690 #
4691 
4692 ################################################################################
4693 # Setup X11 Windows system
4694 ################################################################################
4695 
4696 
4697 
4698 ################################################################################
4699 # Determine which libraries are needed for this configuration
4700 ################################################################################
4701 
4702 
4703 ################################################################################
4704 # Parse library options, and setup needed libraries
4705 ################################################################################
4706 
4707 
4708 ################################################################################
4709 # Setup llvm (Low-Level VM)
4710 ################################################################################
4711 
4712 
4713 ################################################################################
4714 # Setup various libraries, typically small system libraries
4715 ################################################################################
4716 
4717 
4718 #
4719 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4720 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4721 #
4722 # This code is free software; you can redistribute it and/or modify it
4723 # under the terms of the GNU General Public License version 2 only, as
4724 # published by the Free Software Foundation.  Oracle designates this
4725 # particular file as subject to the "Classpath" exception as provided
4726 # by Oracle in the LICENSE file that accompanied this code.
4727 #
4728 # This code is distributed in the hope that it will be useful, but WITHOUT
4729 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4730 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4731 # version 2 for more details (a copy is included in the LICENSE file that
4732 # accompanied this code).
4733 #
4734 # You should have received a copy of the GNU General Public License version
4735 # 2 along with this work; if not, write to the Free Software Foundation,
4736 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4737 #
4738 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4739 # or visit www.oracle.com if you need additional information or have any
4740 # questions.
4741 #
4742 
4743 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4744 # Converts autoconf style CPU name to OpenJDK style, into
4745 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4746 
4747 
4748 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4749 # Converts autoconf style OS name to OpenJDK style, into
4750 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4751 
4752 
4753 # Expects $host_os $host_cpu $build_os and $build_cpu
4754 # and $with_target_bits to have been setup!
4755 #
4756 # Translate the standard triplet(quadruplet) definition
4757 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4758 # OPENJDK_BUILD_OS, etc.
4759 
4760 
4761 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4762 # accordingly. Must be done after setting up build and target system, but before
4763 # doing anything else with these values.
4764 
4765 
4766 # Setup the legacy variables, for controlling the old makefiles.
4767 #
4768 
4769 
4770 # $1 - Either TARGET or BUILD to setup the variables for.
4771 
4772 
4773 
4774 
4775 #%%% Build and target systems %%%
4776 
4777 
4778 
4779 
4780 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4781 # Add -mX to various FLAGS variables.
4782 
4783 
4784 
4785 
4786 
4787 
4788 #
4789 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4790 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4791 #
4792 # This code is free software; you can redistribute it and/or modify it
4793 # under the terms of the GNU General Public License version 2 only, as
4794 # published by the Free Software Foundation.  Oracle designates this
4795 # particular file as subject to the "Classpath" exception as provided
4796 # by Oracle in the LICENSE file that accompanied this code.
4797 #
4798 # This code is distributed in the hope that it will be useful, but WITHOUT
4799 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4800 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4801 # version 2 for more details (a copy is included in the LICENSE file that
4802 # accompanied this code).
4803 #
4804 # You should have received a copy of the GNU General Public License version
4805 # 2 along with this work; if not, write to the Free Software Foundation,
4806 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4807 #
4808 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4809 # or visit www.oracle.com if you need additional information or have any
4810 # questions.
4811 #
4812 
4813 
4814 
4815 
4816 
4817 
4818 
4819 ################################################################################
4820 # Define a mechanism for importing extra prebuilt modules
4821 #
4822 
4823 
4824 
4825 #
4826 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4827 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4828 #
4829 # This code is free software; you can redistribute it and/or modify it
4830 # under the terms of the GNU General Public License version 2 only, as
4831 # published by the Free Software Foundation.  Oracle designates this
4832 # particular file as subject to the "Classpath" exception as provided
4833 # by Oracle in the LICENSE file that accompanied this code.
4834 #
4835 # This code is distributed in the hope that it will be useful, but WITHOUT
4836 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4837 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4838 # version 2 for more details (a copy is included in the LICENSE file that
4839 # accompanied this code).
4840 #
4841 # You should have received a copy of the GNU General Public License version
4842 # 2 along with this work; if not, write to the Free Software Foundation,
4843 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4844 #
4845 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4846 # or visit www.oracle.com if you need additional information or have any
4847 # questions.
4848 #
4849 
4850 ########################################################################
4851 # This file is responsible for detecting, verifying and setting up the
4852 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4853 # proper paths to the binaries, but it will not setup any flags.
4854 #
4855 # The binaries used is determined by the toolchain type, which is the family of
4856 # compilers and related tools that are used.
4857 ########################################################################
4858 
4859 
4860 # All valid toolchains, regardless of platform (used by help.m4)
4861 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4862 
4863 # These toolchains are valid on different platforms
4864 VALID_TOOLCHAINS_linux="gcc clang"
4865 VALID_TOOLCHAINS_solaris="solstudio"
4866 VALID_TOOLCHAINS_macosx="gcc clang"
4867 VALID_TOOLCHAINS_aix="xlc"
4868 VALID_TOOLCHAINS_windows="microsoft"
4869 
4870 # Toolchain descriptions
4871 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4872 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4873 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4874 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4875 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4876 
4877 # Minimum supported versions, empty means unspecified
4878 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4879 TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4880 TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4881 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4882 TOOLCHAIN_MINIMUM_VERSION_xlc=""
4883 
4884 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4885 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4886 
4887 
4888 # Check if the configured compiler (C and C++) is of a specific version or
4889 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4890 #
4891 # Arguments:
4892 #   VERSION:   The version string to check against the found version
4893 #   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4894 #   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4895 
4896 
4897 
4898 
4899 # Setup a number of variables describing how native output files are
4900 # named on this platform/toolchain.
4901 
4902 
4903 # Determine which toolchain type to use, and make sure it is valid for this
4904 # platform. Setup various information about the selected toolchain.
4905 
4906 
4907 # Before we start detecting the toolchain executables, we might need some
4908 # special setup, e.g. additional paths etc.
4909 
4910 
4911 # Restore path, etc
4912 
4913 
4914 # Check if a compiler is of the toolchain type we expect, and save the version
4915 # information from it. If the compiler does not match the expected type,
4916 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4917 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4918 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4919 #
4920 # $1 = compiler to test (CC or CXX)
4921 # $2 = human readable name of compiler (C or C++)
4922 
4923 
4924 # Try to locate the given C or C++ compiler in the path, or otherwise.
4925 #
4926 # $1 = compiler to test (CC or CXX)
4927 # $2 = human readable name of compiler (C or C++)
4928 # $3 = list of compiler names to search for
4929 
4930 
4931 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4932 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4933 # archiver (AR). Verify that the compilers are correct according to the
4934 # toolchain type.
4935 
4936 
4937 # Setup additional tools that is considered a part of the toolchain, but not the
4938 # core part. Many of these are highly platform-specific and do not exist,
4939 # and/or are not needed on all platforms.
4940 
4941 
4942 # Setup the build tools (i.e, the compiler and linker used to build programs
4943 # that should be run on the build platform, not the target platform, as a build
4944 # helper). Since the non-cross-compile case uses the normal, target compilers
4945 # for this, we can only do this after these have been setup.
4946 
4947 
4948 # Setup legacy variables that are still needed as alternative ways to refer to
4949 # parts of the toolchain.
4950 
4951 
4952 # Do some additional checks on the detected tools.
4953 
4954 
4955 # Setup the JTReg Regression Test Harness.
4956 
4957 
4958 #
4959 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4960 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4961 #
4962 # This code is free software; you can redistribute it and/or modify it
4963 # under the terms of the GNU General Public License version 2 only, as
4964 # published by the Free Software Foundation.  Oracle designates this
4965 # particular file as subject to the "Classpath" exception as provided
4966 # by Oracle in the LICENSE file that accompanied this code.
4967 #
4968 # This code is distributed in the hope that it will be useful, but WITHOUT
4969 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4970 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4971 # version 2 for more details (a copy is included in the LICENSE file that
4972 # accompanied this code).
4973 #
4974 # You should have received a copy of the GNU General Public License version
4975 # 2 along with this work; if not, write to the Free Software Foundation,
4976 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4977 #
4978 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4979 # or visit www.oracle.com if you need additional information or have any
4980 # questions.
4981 #
4982 
4983 ################################################################################
4984 # The order of these defines the priority by which we try to find them.
4985 VALID_VS_VERSIONS="2013 2012 2010"
4986 
4987 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4988 VS_VERSION_INTERNAL_2010=100
4989 VS_MSVCR_2010=msvcr100.dll
4990 # We don't use msvcp on Visual Studio 2010
4991 #VS_MSVCP_2010=msvcp100.dll
4992 VS_ENVVAR_2010="VS100COMNTOOLS"
4993 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4994 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4995 VS_VS_PLATFORM_NAME_2010="v100"
4996 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4997 
4998 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4999 VS_VERSION_INTERNAL_2012=110
5000 VS_MSVCR_2012=msvcr110.dll
5001 VS_MSVCP_2012=msvcp110.dll
5002 VS_ENVVAR_2012="VS110COMNTOOLS"
5003 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5004 VS_SDK_INSTALLDIR_2012=
5005 VS_VS_PLATFORM_NAME_2012="v110"
5006 VS_SDK_PLATFORM_NAME_2012=
5007 
5008 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5009 VS_VERSION_INTERNAL_2013=120
5010 VS_MSVCR_2013=msvcr120.dll
5011 VS_MSVCP_2013=msvcp120.dll
5012 VS_ENVVAR_2013="VS120COMNTOOLS"
5013 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5014 VS_SDK_INSTALLDIR_2013=
5015 VS_VS_PLATFORM_NAME_2013="v120"
5016 VS_SDK_PLATFORM_NAME_2013=
5017 
5018 ################################################################################
5019 
5020 
5021 
5022 ################################################################################
5023 
5024 
5025 
5026 ################################################################################
5027 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5028 # build environment and assigns it to VS_ENV_CMD
5029 
5030 
5031 ################################################################################
5032 
5033 
5034 
5035 ################################################################################
5036 # Check if the VS env variables were setup prior to running configure.
5037 # If not, then find vcvarsall.bat and run it automatically, and integrate
5038 # the set env variables into the spec file.
5039 
5040 
5041 
5042 
5043 
5044 
5045 
5046 
5047 
5048 
5049 
5050 
5051 
5052 
5053 # This line needs to be here, verbatim, after all includes and the dummy hook
5054 # definitions. It is replaced with custom functionality when building
5055 # custom sources.
5056 #CUSTOM_AUTOCONF_INCLUDE
5057 
5058 # Do not change or remove the following line, it is needed for consistency checks:
5059 DATE_WHEN_GENERATED=1461064700
5060 
5061 ###############################################################################
5062 #
5063 # Initialization / Boot-strapping
5064 #
5065 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5066 # thus it jumps back and forth, each time gaining something needed later on.
5067 #
5068 ###############################################################################
5069 
5070 # If we are requested to print additional help, do that and then exit.
5071 # This must be the very first call.
5072 
5073   if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5074 
5075     # Print available toolchains
5076     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5077     $PRINTF "Which are valid to use depends on the build platform.\n"
5078     for toolchain in $VALID_TOOLCHAINS_all; do
5079       # Use indirect variable referencing
5080       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5081       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5082       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5083     done
5084     $PRINTF "\n"
5085 
5086     # Print available jvm features
5087     $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5088     $PRINTF "Which are valid to use depends on the target platform.\n  "
5089     $PRINTF "%s " $VALID_JVM_FEATURES
5090     $PRINTF "\n"
5091 
5092     # And now exit directly
5093     exit 0
5094   fi
5095 
5096 
5097 # Basic initialization that must happen first of all in the normal process.
5098 
5099   # Save the original command line. This is passed to us by the wrapper configure script.
5100 
5101   # Save the path variable before it gets changed
5102   ORIGINAL_PATH="$PATH"
5103 
5104   DATE_WHEN_CONFIGURED=`LANG=C date`
5105 
5106   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5107 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5108   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5109 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5110 
5111 
5112   # Start with tools that do not need have cross compilation support
5113   # and can be expected to be found in the default PATH. These tools are
5114   # used by configure.
5115 
5116   # First are all the simple required tools.
5117 
5118 
5119 
5120   # Publish this variable in the help.
5121 
5122 
5123   if [ -z "${BASENAME+x}" ]; then
5124     # The variable is not set by user, try to locate tool using the code snippet
5125     for ac_prog in basename
5126 do
5127   # Extract the first word of "$ac_prog", so it can be a program name with args.
5128 set dummy $ac_prog; ac_word=$2
5129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5130 $as_echo_n "checking for $ac_word... " >&6; }
5131 if ${ac_cv_path_BASENAME+:} false; then :
5132   $as_echo_n "(cached) " >&6
5133 else
5134   case $BASENAME in
5135   [\\/]* | ?:[\\/]*)
5136   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5137   ;;
5138   *)
5139   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5140 for as_dir in $PATH
5141 do
5142   IFS=$as_save_IFS
5143   test -z "$as_dir" && as_dir=.
5144     for ac_exec_ext in '' $ac_executable_extensions; do
5145   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5146     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5147     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5148     break 2
5149   fi
5150 done
5151   done
5152 IFS=$as_save_IFS
5153 
5154   ;;
5155 esac
5156 fi
5157 BASENAME=$ac_cv_path_BASENAME
5158 if test -n "$BASENAME"; then
5159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5160 $as_echo "$BASENAME" >&6; }
5161 else
5162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5163 $as_echo "no" >&6; }
5164 fi
5165 
5166 
5167   test -n "$BASENAME" && break
5168 done
5169 
5170   else
5171     # The variable is set, but is it from the command line or the environment?
5172 
5173     # Try to remove the string !BASENAME! from our list.
5174     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5175     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5176       # If it failed, the variable was not from the command line. Ignore it,
5177       # but warn the user (except for BASH, which is always set by the calling BASH).
5178       if test "xBASENAME" != xBASH; then
5179         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5180 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5181       fi
5182       # Try to locate tool using the code snippet
5183       for ac_prog in basename
5184 do
5185   # Extract the first word of "$ac_prog", so it can be a program name with args.
5186 set dummy $ac_prog; ac_word=$2
5187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5188 $as_echo_n "checking for $ac_word... " >&6; }
5189 if ${ac_cv_path_BASENAME+:} false; then :
5190   $as_echo_n "(cached) " >&6
5191 else
5192   case $BASENAME in
5193   [\\/]* | ?:[\\/]*)
5194   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5195   ;;
5196   *)
5197   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5198 for as_dir in $PATH
5199 do
5200   IFS=$as_save_IFS
5201   test -z "$as_dir" && as_dir=.
5202     for ac_exec_ext in '' $ac_executable_extensions; do
5203   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5204     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5205     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5206     break 2
5207   fi
5208 done
5209   done
5210 IFS=$as_save_IFS
5211 
5212   ;;
5213 esac
5214 fi
5215 BASENAME=$ac_cv_path_BASENAME
5216 if test -n "$BASENAME"; then
5217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5218 $as_echo "$BASENAME" >&6; }
5219 else
5220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5221 $as_echo "no" >&6; }
5222 fi
5223 
5224 
5225   test -n "$BASENAME" && break
5226 done
5227 
5228     else
5229       # If it succeeded, then it was overridden by the user. We will use it
5230       # for the tool.
5231 
5232       # First remove it from the list of overridden variables, so we can test
5233       # for unknown variables in the end.
5234       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5235 
5236       # Check if we try to supply an empty value
5237       if test "x$BASENAME" = x; then
5238         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5239 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5240         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5241 $as_echo_n "checking for BASENAME... " >&6; }
5242         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5243 $as_echo "disabled" >&6; }
5244       else
5245         # Check if the provided tool contains a complete path.
5246         tool_specified="$BASENAME"
5247         tool_basename="${tool_specified##*/}"
5248         if test "x$tool_basename" = "x$tool_specified"; then
5249           # A command without a complete path is provided, search $PATH.
5250           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5251 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5252           # Extract the first word of "$tool_basename", so it can be a program name with args.
5253 set dummy $tool_basename; ac_word=$2
5254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5255 $as_echo_n "checking for $ac_word... " >&6; }
5256 if ${ac_cv_path_BASENAME+:} false; then :
5257   $as_echo_n "(cached) " >&6
5258 else
5259   case $BASENAME in
5260   [\\/]* | ?:[\\/]*)
5261   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5262   ;;
5263   *)
5264   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5265 for as_dir in $PATH
5266 do
5267   IFS=$as_save_IFS
5268   test -z "$as_dir" && as_dir=.
5269     for ac_exec_ext in '' $ac_executable_extensions; do
5270   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5271     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5272     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5273     break 2
5274   fi
5275 done
5276   done
5277 IFS=$as_save_IFS
5278 
5279   ;;
5280 esac
5281 fi
5282 BASENAME=$ac_cv_path_BASENAME
5283 if test -n "$BASENAME"; then
5284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5285 $as_echo "$BASENAME" >&6; }
5286 else
5287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5288 $as_echo "no" >&6; }
5289 fi
5290 
5291 
5292           if test "x$BASENAME" = x; then
5293             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5294           fi
5295         else
5296           # Otherwise we believe it is a complete path. Use it as it is.
5297           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5298 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5299           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5300 $as_echo_n "checking for BASENAME... " >&6; }
5301           if test ! -x "$tool_specified"; then
5302             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5303 $as_echo "not found" >&6; }
5304             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5305           fi
5306           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5307 $as_echo "$tool_specified" >&6; }
5308         fi
5309       fi
5310     fi
5311 
5312   fi
5313 
5314 
5315 
5316   if test "x$BASENAME" = x; then
5317     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5318   fi
5319 
5320 
5321 
5322 
5323 
5324   # Publish this variable in the help.
5325 
5326 
5327   if [ -z "${BASH+x}" ]; then
5328     # The variable is not set by user, try to locate tool using the code snippet
5329     for ac_prog in bash
5330 do
5331   # Extract the first word of "$ac_prog", so it can be a program name with args.
5332 set dummy $ac_prog; ac_word=$2
5333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5334 $as_echo_n "checking for $ac_word... " >&6; }
5335 if ${ac_cv_path_BASH+:} false; then :
5336   $as_echo_n "(cached) " >&6
5337 else
5338   case $BASH in
5339   [\\/]* | ?:[\\/]*)
5340   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5341   ;;
5342   *)
5343   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5344 for as_dir in $PATH
5345 do
5346   IFS=$as_save_IFS
5347   test -z "$as_dir" && as_dir=.
5348     for ac_exec_ext in '' $ac_executable_extensions; do
5349   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5350     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5351     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5352     break 2
5353   fi
5354 done
5355   done
5356 IFS=$as_save_IFS
5357 
5358   ;;
5359 esac
5360 fi
5361 BASH=$ac_cv_path_BASH
5362 if test -n "$BASH"; then
5363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5364 $as_echo "$BASH" >&6; }
5365 else
5366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5367 $as_echo "no" >&6; }
5368 fi
5369 
5370 
5371   test -n "$BASH" && break
5372 done
5373 
5374   else
5375     # The variable is set, but is it from the command line or the environment?
5376 
5377     # Try to remove the string !BASH! from our list.
5378     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5379     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5380       # If it failed, the variable was not from the command line. Ignore it,
5381       # but warn the user (except for BASH, which is always set by the calling BASH).
5382       if test "xBASH" != xBASH; then
5383         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5384 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5385       fi
5386       # Try to locate tool using the code snippet
5387       for ac_prog in bash
5388 do
5389   # Extract the first word of "$ac_prog", so it can be a program name with args.
5390 set dummy $ac_prog; ac_word=$2
5391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5392 $as_echo_n "checking for $ac_word... " >&6; }
5393 if ${ac_cv_path_BASH+:} false; then :
5394   $as_echo_n "(cached) " >&6
5395 else
5396   case $BASH in
5397   [\\/]* | ?:[\\/]*)
5398   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5399   ;;
5400   *)
5401   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5402 for as_dir in $PATH
5403 do
5404   IFS=$as_save_IFS
5405   test -z "$as_dir" && as_dir=.
5406     for ac_exec_ext in '' $ac_executable_extensions; do
5407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5408     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5410     break 2
5411   fi
5412 done
5413   done
5414 IFS=$as_save_IFS
5415 
5416   ;;
5417 esac
5418 fi
5419 BASH=$ac_cv_path_BASH
5420 if test -n "$BASH"; then
5421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5422 $as_echo "$BASH" >&6; }
5423 else
5424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5425 $as_echo "no" >&6; }
5426 fi
5427 
5428 
5429   test -n "$BASH" && break
5430 done
5431 
5432     else
5433       # If it succeeded, then it was overridden by the user. We will use it
5434       # for the tool.
5435 
5436       # First remove it from the list of overridden variables, so we can test
5437       # for unknown variables in the end.
5438       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5439 
5440       # Check if we try to supply an empty value
5441       if test "x$BASH" = x; then
5442         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5443 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5444         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5445 $as_echo_n "checking for BASH... " >&6; }
5446         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5447 $as_echo "disabled" >&6; }
5448       else
5449         # Check if the provided tool contains a complete path.
5450         tool_specified="$BASH"
5451         tool_basename="${tool_specified##*/}"
5452         if test "x$tool_basename" = "x$tool_specified"; then
5453           # A command without a complete path is provided, search $PATH.
5454           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5455 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5456           # Extract the first word of "$tool_basename", so it can be a program name with args.
5457 set dummy $tool_basename; ac_word=$2
5458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5459 $as_echo_n "checking for $ac_word... " >&6; }
5460 if ${ac_cv_path_BASH+:} false; then :
5461   $as_echo_n "(cached) " >&6
5462 else
5463   case $BASH in
5464   [\\/]* | ?:[\\/]*)
5465   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5466   ;;
5467   *)
5468   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5469 for as_dir in $PATH
5470 do
5471   IFS=$as_save_IFS
5472   test -z "$as_dir" && as_dir=.
5473     for ac_exec_ext in '' $ac_executable_extensions; do
5474   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5475     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5476     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5477     break 2
5478   fi
5479 done
5480   done
5481 IFS=$as_save_IFS
5482 
5483   ;;
5484 esac
5485 fi
5486 BASH=$ac_cv_path_BASH
5487 if test -n "$BASH"; then
5488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5489 $as_echo "$BASH" >&6; }
5490 else
5491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5492 $as_echo "no" >&6; }
5493 fi
5494 
5495 
5496           if test "x$BASH" = x; then
5497             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5498           fi
5499         else
5500           # Otherwise we believe it is a complete path. Use it as it is.
5501           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5502 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5503           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5504 $as_echo_n "checking for BASH... " >&6; }
5505           if test ! -x "$tool_specified"; then
5506             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5507 $as_echo "not found" >&6; }
5508             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5509           fi
5510           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5511 $as_echo "$tool_specified" >&6; }
5512         fi
5513       fi
5514     fi
5515 
5516   fi
5517 
5518 
5519 
5520   if test "x$BASH" = x; then
5521     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5522   fi
5523 
5524 
5525 
5526 
5527 
5528   # Publish this variable in the help.
5529 
5530 
5531   if [ -z "${CAT+x}" ]; then
5532     # The variable is not set by user, try to locate tool using the code snippet
5533     for ac_prog in cat
5534 do
5535   # Extract the first word of "$ac_prog", so it can be a program name with args.
5536 set dummy $ac_prog; ac_word=$2
5537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5538 $as_echo_n "checking for $ac_word... " >&6; }
5539 if ${ac_cv_path_CAT+:} false; then :
5540   $as_echo_n "(cached) " >&6
5541 else
5542   case $CAT in
5543   [\\/]* | ?:[\\/]*)
5544   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5545   ;;
5546   *)
5547   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5548 for as_dir in $PATH
5549 do
5550   IFS=$as_save_IFS
5551   test -z "$as_dir" && as_dir=.
5552     for ac_exec_ext in '' $ac_executable_extensions; do
5553   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5554     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5555     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5556     break 2
5557   fi
5558 done
5559   done
5560 IFS=$as_save_IFS
5561 
5562   ;;
5563 esac
5564 fi
5565 CAT=$ac_cv_path_CAT
5566 if test -n "$CAT"; then
5567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5568 $as_echo "$CAT" >&6; }
5569 else
5570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5571 $as_echo "no" >&6; }
5572 fi
5573 
5574 
5575   test -n "$CAT" && break
5576 done
5577 
5578   else
5579     # The variable is set, but is it from the command line or the environment?
5580 
5581     # Try to remove the string !CAT! from our list.
5582     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5583     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5584       # If it failed, the variable was not from the command line. Ignore it,
5585       # but warn the user (except for BASH, which is always set by the calling BASH).
5586       if test "xCAT" != xBASH; then
5587         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5588 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5589       fi
5590       # Try to locate tool using the code snippet
5591       for ac_prog in cat
5592 do
5593   # Extract the first word of "$ac_prog", so it can be a program name with args.
5594 set dummy $ac_prog; ac_word=$2
5595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5596 $as_echo_n "checking for $ac_word... " >&6; }
5597 if ${ac_cv_path_CAT+:} false; then :
5598   $as_echo_n "(cached) " >&6
5599 else
5600   case $CAT in
5601   [\\/]* | ?:[\\/]*)
5602   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5603   ;;
5604   *)
5605   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5606 for as_dir in $PATH
5607 do
5608   IFS=$as_save_IFS
5609   test -z "$as_dir" && as_dir=.
5610     for ac_exec_ext in '' $ac_executable_extensions; do
5611   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5612     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5613     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5614     break 2
5615   fi
5616 done
5617   done
5618 IFS=$as_save_IFS
5619 
5620   ;;
5621 esac
5622 fi
5623 CAT=$ac_cv_path_CAT
5624 if test -n "$CAT"; then
5625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5626 $as_echo "$CAT" >&6; }
5627 else
5628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5629 $as_echo "no" >&6; }
5630 fi
5631 
5632 
5633   test -n "$CAT" && break
5634 done
5635 
5636     else
5637       # If it succeeded, then it was overridden by the user. We will use it
5638       # for the tool.
5639 
5640       # First remove it from the list of overridden variables, so we can test
5641       # for unknown variables in the end.
5642       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5643 
5644       # Check if we try to supply an empty value
5645       if test "x$CAT" = x; then
5646         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5647 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5648         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5649 $as_echo_n "checking for CAT... " >&6; }
5650         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5651 $as_echo "disabled" >&6; }
5652       else
5653         # Check if the provided tool contains a complete path.
5654         tool_specified="$CAT"
5655         tool_basename="${tool_specified##*/}"
5656         if test "x$tool_basename" = "x$tool_specified"; then
5657           # A command without a complete path is provided, search $PATH.
5658           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5659 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5660           # Extract the first word of "$tool_basename", so it can be a program name with args.
5661 set dummy $tool_basename; ac_word=$2
5662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5663 $as_echo_n "checking for $ac_word... " >&6; }
5664 if ${ac_cv_path_CAT+:} false; then :
5665   $as_echo_n "(cached) " >&6
5666 else
5667   case $CAT in
5668   [\\/]* | ?:[\\/]*)
5669   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5670   ;;
5671   *)
5672   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5673 for as_dir in $PATH
5674 do
5675   IFS=$as_save_IFS
5676   test -z "$as_dir" && as_dir=.
5677     for ac_exec_ext in '' $ac_executable_extensions; do
5678   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5679     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5680     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5681     break 2
5682   fi
5683 done
5684   done
5685 IFS=$as_save_IFS
5686 
5687   ;;
5688 esac
5689 fi
5690 CAT=$ac_cv_path_CAT
5691 if test -n "$CAT"; then
5692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5693 $as_echo "$CAT" >&6; }
5694 else
5695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5696 $as_echo "no" >&6; }
5697 fi
5698 
5699 
5700           if test "x$CAT" = x; then
5701             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5702           fi
5703         else
5704           # Otherwise we believe it is a complete path. Use it as it is.
5705           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5706 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5707           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5708 $as_echo_n "checking for CAT... " >&6; }
5709           if test ! -x "$tool_specified"; then
5710             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5711 $as_echo "not found" >&6; }
5712             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5713           fi
5714           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5715 $as_echo "$tool_specified" >&6; }
5716         fi
5717       fi
5718     fi
5719 
5720   fi
5721 
5722 
5723 
5724   if test "x$CAT" = x; then
5725     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5726   fi
5727 
5728 
5729 
5730 
5731 
5732   # Publish this variable in the help.
5733 
5734 
5735   if [ -z "${CHMOD+x}" ]; then
5736     # The variable is not set by user, try to locate tool using the code snippet
5737     for ac_prog in chmod
5738 do
5739   # Extract the first word of "$ac_prog", so it can be a program name with args.
5740 set dummy $ac_prog; ac_word=$2
5741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5742 $as_echo_n "checking for $ac_word... " >&6; }
5743 if ${ac_cv_path_CHMOD+:} false; then :
5744   $as_echo_n "(cached) " >&6
5745 else
5746   case $CHMOD in
5747   [\\/]* | ?:[\\/]*)
5748   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5749   ;;
5750   *)
5751   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5752 for as_dir in $PATH
5753 do
5754   IFS=$as_save_IFS
5755   test -z "$as_dir" && as_dir=.
5756     for ac_exec_ext in '' $ac_executable_extensions; do
5757   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5758     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5759     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5760     break 2
5761   fi
5762 done
5763   done
5764 IFS=$as_save_IFS
5765 
5766   ;;
5767 esac
5768 fi
5769 CHMOD=$ac_cv_path_CHMOD
5770 if test -n "$CHMOD"; then
5771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5772 $as_echo "$CHMOD" >&6; }
5773 else
5774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5775 $as_echo "no" >&6; }
5776 fi
5777 
5778 
5779   test -n "$CHMOD" && break
5780 done
5781 
5782   else
5783     # The variable is set, but is it from the command line or the environment?
5784 
5785     # Try to remove the string !CHMOD! from our list.
5786     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5787     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5788       # If it failed, the variable was not from the command line. Ignore it,
5789       # but warn the user (except for BASH, which is always set by the calling BASH).
5790       if test "xCHMOD" != xBASH; then
5791         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5792 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5793       fi
5794       # Try to locate tool using the code snippet
5795       for ac_prog in chmod
5796 do
5797   # Extract the first word of "$ac_prog", so it can be a program name with args.
5798 set dummy $ac_prog; ac_word=$2
5799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5800 $as_echo_n "checking for $ac_word... " >&6; }
5801 if ${ac_cv_path_CHMOD+:} false; then :
5802   $as_echo_n "(cached) " >&6
5803 else
5804   case $CHMOD in
5805   [\\/]* | ?:[\\/]*)
5806   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5807   ;;
5808   *)
5809   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5810 for as_dir in $PATH
5811 do
5812   IFS=$as_save_IFS
5813   test -z "$as_dir" && as_dir=.
5814     for ac_exec_ext in '' $ac_executable_extensions; do
5815   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5816     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5817     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5818     break 2
5819   fi
5820 done
5821   done
5822 IFS=$as_save_IFS
5823 
5824   ;;
5825 esac
5826 fi
5827 CHMOD=$ac_cv_path_CHMOD
5828 if test -n "$CHMOD"; then
5829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5830 $as_echo "$CHMOD" >&6; }
5831 else
5832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5833 $as_echo "no" >&6; }
5834 fi
5835 
5836 
5837   test -n "$CHMOD" && break
5838 done
5839 
5840     else
5841       # If it succeeded, then it was overridden by the user. We will use it
5842       # for the tool.
5843 
5844       # First remove it from the list of overridden variables, so we can test
5845       # for unknown variables in the end.
5846       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5847 
5848       # Check if we try to supply an empty value
5849       if test "x$CHMOD" = x; then
5850         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5851 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5852         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5853 $as_echo_n "checking for CHMOD... " >&6; }
5854         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5855 $as_echo "disabled" >&6; }
5856       else
5857         # Check if the provided tool contains a complete path.
5858         tool_specified="$CHMOD"
5859         tool_basename="${tool_specified##*/}"
5860         if test "x$tool_basename" = "x$tool_specified"; then
5861           # A command without a complete path is provided, search $PATH.
5862           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5863 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5864           # Extract the first word of "$tool_basename", so it can be a program name with args.
5865 set dummy $tool_basename; ac_word=$2
5866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5867 $as_echo_n "checking for $ac_word... " >&6; }
5868 if ${ac_cv_path_CHMOD+:} false; then :
5869   $as_echo_n "(cached) " >&6
5870 else
5871   case $CHMOD in
5872   [\\/]* | ?:[\\/]*)
5873   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5874   ;;
5875   *)
5876   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5877 for as_dir in $PATH
5878 do
5879   IFS=$as_save_IFS
5880   test -z "$as_dir" && as_dir=.
5881     for ac_exec_ext in '' $ac_executable_extensions; do
5882   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5883     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5884     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5885     break 2
5886   fi
5887 done
5888   done
5889 IFS=$as_save_IFS
5890 
5891   ;;
5892 esac
5893 fi
5894 CHMOD=$ac_cv_path_CHMOD
5895 if test -n "$CHMOD"; then
5896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5897 $as_echo "$CHMOD" >&6; }
5898 else
5899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5900 $as_echo "no" >&6; }
5901 fi
5902 
5903 
5904           if test "x$CHMOD" = x; then
5905             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5906           fi
5907         else
5908           # Otherwise we believe it is a complete path. Use it as it is.
5909           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5910 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5911           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5912 $as_echo_n "checking for CHMOD... " >&6; }
5913           if test ! -x "$tool_specified"; then
5914             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5915 $as_echo "not found" >&6; }
5916             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5917           fi
5918           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5919 $as_echo "$tool_specified" >&6; }
5920         fi
5921       fi
5922     fi
5923 
5924   fi
5925 
5926 
5927 
5928   if test "x$CHMOD" = x; then
5929     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5930   fi
5931 
5932 
5933 
5934 
5935 
5936   # Publish this variable in the help.
5937 
5938 
5939   if [ -z "${CMP+x}" ]; then
5940     # The variable is not set by user, try to locate tool using the code snippet
5941     for ac_prog in cmp
5942 do
5943   # Extract the first word of "$ac_prog", so it can be a program name with args.
5944 set dummy $ac_prog; ac_word=$2
5945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5946 $as_echo_n "checking for $ac_word... " >&6; }
5947 if ${ac_cv_path_CMP+:} false; then :
5948   $as_echo_n "(cached) " >&6
5949 else
5950   case $CMP in
5951   [\\/]* | ?:[\\/]*)
5952   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5953   ;;
5954   *)
5955   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5956 for as_dir in $PATH
5957 do
5958   IFS=$as_save_IFS
5959   test -z "$as_dir" && as_dir=.
5960     for ac_exec_ext in '' $ac_executable_extensions; do
5961   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5962     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5963     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5964     break 2
5965   fi
5966 done
5967   done
5968 IFS=$as_save_IFS
5969 
5970   ;;
5971 esac
5972 fi
5973 CMP=$ac_cv_path_CMP
5974 if test -n "$CMP"; then
5975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5976 $as_echo "$CMP" >&6; }
5977 else
5978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5979 $as_echo "no" >&6; }
5980 fi
5981 
5982 
5983   test -n "$CMP" && break
5984 done
5985 
5986   else
5987     # The variable is set, but is it from the command line or the environment?
5988 
5989     # Try to remove the string !CMP! from our list.
5990     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5991     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5992       # If it failed, the variable was not from the command line. Ignore it,
5993       # but warn the user (except for BASH, which is always set by the calling BASH).
5994       if test "xCMP" != xBASH; then
5995         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5996 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5997       fi
5998       # Try to locate tool using the code snippet
5999       for ac_prog in cmp
6000 do
6001   # Extract the first word of "$ac_prog", so it can be a program name with args.
6002 set dummy $ac_prog; ac_word=$2
6003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6004 $as_echo_n "checking for $ac_word... " >&6; }
6005 if ${ac_cv_path_CMP+:} false; then :
6006   $as_echo_n "(cached) " >&6
6007 else
6008   case $CMP in
6009   [\\/]* | ?:[\\/]*)
6010   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6011   ;;
6012   *)
6013   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6014 for as_dir in $PATH
6015 do
6016   IFS=$as_save_IFS
6017   test -z "$as_dir" && as_dir=.
6018     for ac_exec_ext in '' $ac_executable_extensions; do
6019   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6020     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6021     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6022     break 2
6023   fi
6024 done
6025   done
6026 IFS=$as_save_IFS
6027 
6028   ;;
6029 esac
6030 fi
6031 CMP=$ac_cv_path_CMP
6032 if test -n "$CMP"; then
6033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6034 $as_echo "$CMP" >&6; }
6035 else
6036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6037 $as_echo "no" >&6; }
6038 fi
6039 
6040 
6041   test -n "$CMP" && break
6042 done
6043 
6044     else
6045       # If it succeeded, then it was overridden by the user. We will use it
6046       # for the tool.
6047 
6048       # First remove it from the list of overridden variables, so we can test
6049       # for unknown variables in the end.
6050       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6051 
6052       # Check if we try to supply an empty value
6053       if test "x$CMP" = x; then
6054         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6055 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6056         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6057 $as_echo_n "checking for CMP... " >&6; }
6058         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6059 $as_echo "disabled" >&6; }
6060       else
6061         # Check if the provided tool contains a complete path.
6062         tool_specified="$CMP"
6063         tool_basename="${tool_specified##*/}"
6064         if test "x$tool_basename" = "x$tool_specified"; then
6065           # A command without a complete path is provided, search $PATH.
6066           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6067 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6068           # Extract the first word of "$tool_basename", so it can be a program name with args.
6069 set dummy $tool_basename; ac_word=$2
6070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6071 $as_echo_n "checking for $ac_word... " >&6; }
6072 if ${ac_cv_path_CMP+:} false; then :
6073   $as_echo_n "(cached) " >&6
6074 else
6075   case $CMP in
6076   [\\/]* | ?:[\\/]*)
6077   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6078   ;;
6079   *)
6080   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6081 for as_dir in $PATH
6082 do
6083   IFS=$as_save_IFS
6084   test -z "$as_dir" && as_dir=.
6085     for ac_exec_ext in '' $ac_executable_extensions; do
6086   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6087     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6089     break 2
6090   fi
6091 done
6092   done
6093 IFS=$as_save_IFS
6094 
6095   ;;
6096 esac
6097 fi
6098 CMP=$ac_cv_path_CMP
6099 if test -n "$CMP"; then
6100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6101 $as_echo "$CMP" >&6; }
6102 else
6103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6104 $as_echo "no" >&6; }
6105 fi
6106 
6107 
6108           if test "x$CMP" = x; then
6109             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6110           fi
6111         else
6112           # Otherwise we believe it is a complete path. Use it as it is.
6113           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6114 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6115           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6116 $as_echo_n "checking for CMP... " >&6; }
6117           if test ! -x "$tool_specified"; then
6118             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6119 $as_echo "not found" >&6; }
6120             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6121           fi
6122           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6123 $as_echo "$tool_specified" >&6; }
6124         fi
6125       fi
6126     fi
6127 
6128   fi
6129 
6130 
6131 
6132   if test "x$CMP" = x; then
6133     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6134   fi
6135 
6136 
6137 
6138 
6139 
6140   # Publish this variable in the help.
6141 
6142 
6143   if [ -z "${COMM+x}" ]; then
6144     # The variable is not set by user, try to locate tool using the code snippet
6145     for ac_prog in comm
6146 do
6147   # Extract the first word of "$ac_prog", so it can be a program name with args.
6148 set dummy $ac_prog; ac_word=$2
6149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6150 $as_echo_n "checking for $ac_word... " >&6; }
6151 if ${ac_cv_path_COMM+:} false; then :
6152   $as_echo_n "(cached) " >&6
6153 else
6154   case $COMM in
6155   [\\/]* | ?:[\\/]*)
6156   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6157   ;;
6158   *)
6159   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6160 for as_dir in $PATH
6161 do
6162   IFS=$as_save_IFS
6163   test -z "$as_dir" && as_dir=.
6164     for ac_exec_ext in '' $ac_executable_extensions; do
6165   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6166     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6167     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6168     break 2
6169   fi
6170 done
6171   done
6172 IFS=$as_save_IFS
6173 
6174   ;;
6175 esac
6176 fi
6177 COMM=$ac_cv_path_COMM
6178 if test -n "$COMM"; then
6179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6180 $as_echo "$COMM" >&6; }
6181 else
6182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6183 $as_echo "no" >&6; }
6184 fi
6185 
6186 
6187   test -n "$COMM" && break
6188 done
6189 
6190   else
6191     # The variable is set, but is it from the command line or the environment?
6192 
6193     # Try to remove the string !COMM! from our list.
6194     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6195     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6196       # If it failed, the variable was not from the command line. Ignore it,
6197       # but warn the user (except for BASH, which is always set by the calling BASH).
6198       if test "xCOMM" != xBASH; then
6199         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6200 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6201       fi
6202       # Try to locate tool using the code snippet
6203       for ac_prog in comm
6204 do
6205   # Extract the first word of "$ac_prog", so it can be a program name with args.
6206 set dummy $ac_prog; ac_word=$2
6207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6208 $as_echo_n "checking for $ac_word... " >&6; }
6209 if ${ac_cv_path_COMM+:} false; then :
6210   $as_echo_n "(cached) " >&6
6211 else
6212   case $COMM in
6213   [\\/]* | ?:[\\/]*)
6214   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6215   ;;
6216   *)
6217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6218 for as_dir in $PATH
6219 do
6220   IFS=$as_save_IFS
6221   test -z "$as_dir" && as_dir=.
6222     for ac_exec_ext in '' $ac_executable_extensions; do
6223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6224     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6226     break 2
6227   fi
6228 done
6229   done
6230 IFS=$as_save_IFS
6231 
6232   ;;
6233 esac
6234 fi
6235 COMM=$ac_cv_path_COMM
6236 if test -n "$COMM"; then
6237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6238 $as_echo "$COMM" >&6; }
6239 else
6240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6241 $as_echo "no" >&6; }
6242 fi
6243 
6244 
6245   test -n "$COMM" && break
6246 done
6247 
6248     else
6249       # If it succeeded, then it was overridden by the user. We will use it
6250       # for the tool.
6251 
6252       # First remove it from the list of overridden variables, so we can test
6253       # for unknown variables in the end.
6254       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6255 
6256       # Check if we try to supply an empty value
6257       if test "x$COMM" = x; then
6258         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6259 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6260         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6261 $as_echo_n "checking for COMM... " >&6; }
6262         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6263 $as_echo "disabled" >&6; }
6264       else
6265         # Check if the provided tool contains a complete path.
6266         tool_specified="$COMM"
6267         tool_basename="${tool_specified##*/}"
6268         if test "x$tool_basename" = "x$tool_specified"; then
6269           # A command without a complete path is provided, search $PATH.
6270           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6271 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6272           # Extract the first word of "$tool_basename", so it can be a program name with args.
6273 set dummy $tool_basename; ac_word=$2
6274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6275 $as_echo_n "checking for $ac_word... " >&6; }
6276 if ${ac_cv_path_COMM+:} false; then :
6277   $as_echo_n "(cached) " >&6
6278 else
6279   case $COMM in
6280   [\\/]* | ?:[\\/]*)
6281   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6282   ;;
6283   *)
6284   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6285 for as_dir in $PATH
6286 do
6287   IFS=$as_save_IFS
6288   test -z "$as_dir" && as_dir=.
6289     for ac_exec_ext in '' $ac_executable_extensions; do
6290   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6291     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6292     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6293     break 2
6294   fi
6295 done
6296   done
6297 IFS=$as_save_IFS
6298 
6299   ;;
6300 esac
6301 fi
6302 COMM=$ac_cv_path_COMM
6303 if test -n "$COMM"; then
6304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6305 $as_echo "$COMM" >&6; }
6306 else
6307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6308 $as_echo "no" >&6; }
6309 fi
6310 
6311 
6312           if test "x$COMM" = x; then
6313             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6314           fi
6315         else
6316           # Otherwise we believe it is a complete path. Use it as it is.
6317           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6318 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6319           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6320 $as_echo_n "checking for COMM... " >&6; }
6321           if test ! -x "$tool_specified"; then
6322             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6323 $as_echo "not found" >&6; }
6324             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6325           fi
6326           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6327 $as_echo "$tool_specified" >&6; }
6328         fi
6329       fi
6330     fi
6331 
6332   fi
6333 
6334 
6335 
6336   if test "x$COMM" = x; then
6337     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6338   fi
6339 
6340 
6341 
6342 
6343 
6344   # Publish this variable in the help.
6345 
6346 
6347   if [ -z "${CP+x}" ]; then
6348     # The variable is not set by user, try to locate tool using the code snippet
6349     for ac_prog in cp
6350 do
6351   # Extract the first word of "$ac_prog", so it can be a program name with args.
6352 set dummy $ac_prog; ac_word=$2
6353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6354 $as_echo_n "checking for $ac_word... " >&6; }
6355 if ${ac_cv_path_CP+:} false; then :
6356   $as_echo_n "(cached) " >&6
6357 else
6358   case $CP in
6359   [\\/]* | ?:[\\/]*)
6360   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6361   ;;
6362   *)
6363   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6364 for as_dir in $PATH
6365 do
6366   IFS=$as_save_IFS
6367   test -z "$as_dir" && as_dir=.
6368     for ac_exec_ext in '' $ac_executable_extensions; do
6369   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6370     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6371     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6372     break 2
6373   fi
6374 done
6375   done
6376 IFS=$as_save_IFS
6377 
6378   ;;
6379 esac
6380 fi
6381 CP=$ac_cv_path_CP
6382 if test -n "$CP"; then
6383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6384 $as_echo "$CP" >&6; }
6385 else
6386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6387 $as_echo "no" >&6; }
6388 fi
6389 
6390 
6391   test -n "$CP" && break
6392 done
6393 
6394   else
6395     # The variable is set, but is it from the command line or the environment?
6396 
6397     # Try to remove the string !CP! from our list.
6398     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6399     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6400       # If it failed, the variable was not from the command line. Ignore it,
6401       # but warn the user (except for BASH, which is always set by the calling BASH).
6402       if test "xCP" != xBASH; then
6403         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6404 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6405       fi
6406       # Try to locate tool using the code snippet
6407       for ac_prog in cp
6408 do
6409   # Extract the first word of "$ac_prog", so it can be a program name with args.
6410 set dummy $ac_prog; ac_word=$2
6411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6412 $as_echo_n "checking for $ac_word... " >&6; }
6413 if ${ac_cv_path_CP+:} false; then :
6414   $as_echo_n "(cached) " >&6
6415 else
6416   case $CP in
6417   [\\/]* | ?:[\\/]*)
6418   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6419   ;;
6420   *)
6421   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6422 for as_dir in $PATH
6423 do
6424   IFS=$as_save_IFS
6425   test -z "$as_dir" && as_dir=.
6426     for ac_exec_ext in '' $ac_executable_extensions; do
6427   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6428     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6430     break 2
6431   fi
6432 done
6433   done
6434 IFS=$as_save_IFS
6435 
6436   ;;
6437 esac
6438 fi
6439 CP=$ac_cv_path_CP
6440 if test -n "$CP"; then
6441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6442 $as_echo "$CP" >&6; }
6443 else
6444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6445 $as_echo "no" >&6; }
6446 fi
6447 
6448 
6449   test -n "$CP" && break
6450 done
6451 
6452     else
6453       # If it succeeded, then it was overridden by the user. We will use it
6454       # for the tool.
6455 
6456       # First remove it from the list of overridden variables, so we can test
6457       # for unknown variables in the end.
6458       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6459 
6460       # Check if we try to supply an empty value
6461       if test "x$CP" = x; then
6462         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6463 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6464         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6465 $as_echo_n "checking for CP... " >&6; }
6466         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6467 $as_echo "disabled" >&6; }
6468       else
6469         # Check if the provided tool contains a complete path.
6470         tool_specified="$CP"
6471         tool_basename="${tool_specified##*/}"
6472         if test "x$tool_basename" = "x$tool_specified"; then
6473           # A command without a complete path is provided, search $PATH.
6474           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6475 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6476           # Extract the first word of "$tool_basename", so it can be a program name with args.
6477 set dummy $tool_basename; ac_word=$2
6478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6479 $as_echo_n "checking for $ac_word... " >&6; }
6480 if ${ac_cv_path_CP+:} false; then :
6481   $as_echo_n "(cached) " >&6
6482 else
6483   case $CP in
6484   [\\/]* | ?:[\\/]*)
6485   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6486   ;;
6487   *)
6488   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6489 for as_dir in $PATH
6490 do
6491   IFS=$as_save_IFS
6492   test -z "$as_dir" && as_dir=.
6493     for ac_exec_ext in '' $ac_executable_extensions; do
6494   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6495     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6496     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6497     break 2
6498   fi
6499 done
6500   done
6501 IFS=$as_save_IFS
6502 
6503   ;;
6504 esac
6505 fi
6506 CP=$ac_cv_path_CP
6507 if test -n "$CP"; then
6508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6509 $as_echo "$CP" >&6; }
6510 else
6511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6512 $as_echo "no" >&6; }
6513 fi
6514 
6515 
6516           if test "x$CP" = x; then
6517             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6518           fi
6519         else
6520           # Otherwise we believe it is a complete path. Use it as it is.
6521           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6522 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6523           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6524 $as_echo_n "checking for CP... " >&6; }
6525           if test ! -x "$tool_specified"; then
6526             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6527 $as_echo "not found" >&6; }
6528             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6529           fi
6530           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6531 $as_echo "$tool_specified" >&6; }
6532         fi
6533       fi
6534     fi
6535 
6536   fi
6537 
6538 
6539 
6540   if test "x$CP" = x; then
6541     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6542   fi
6543 
6544 
6545 
6546 
6547 
6548   # Publish this variable in the help.
6549 
6550 
6551   if [ -z "${CUT+x}" ]; then
6552     # The variable is not set by user, try to locate tool using the code snippet
6553     for ac_prog in cut
6554 do
6555   # Extract the first word of "$ac_prog", so it can be a program name with args.
6556 set dummy $ac_prog; ac_word=$2
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6558 $as_echo_n "checking for $ac_word... " >&6; }
6559 if ${ac_cv_path_CUT+:} false; then :
6560   $as_echo_n "(cached) " >&6
6561 else
6562   case $CUT in
6563   [\\/]* | ?:[\\/]*)
6564   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6565   ;;
6566   *)
6567   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6568 for as_dir in $PATH
6569 do
6570   IFS=$as_save_IFS
6571   test -z "$as_dir" && as_dir=.
6572     for ac_exec_ext in '' $ac_executable_extensions; do
6573   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6574     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6575     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6576     break 2
6577   fi
6578 done
6579   done
6580 IFS=$as_save_IFS
6581 
6582   ;;
6583 esac
6584 fi
6585 CUT=$ac_cv_path_CUT
6586 if test -n "$CUT"; then
6587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6588 $as_echo "$CUT" >&6; }
6589 else
6590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6591 $as_echo "no" >&6; }
6592 fi
6593 
6594 
6595   test -n "$CUT" && break
6596 done
6597 
6598   else
6599     # The variable is set, but is it from the command line or the environment?
6600 
6601     # Try to remove the string !CUT! from our list.
6602     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6603     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6604       # If it failed, the variable was not from the command line. Ignore it,
6605       # but warn the user (except for BASH, which is always set by the calling BASH).
6606       if test "xCUT" != xBASH; then
6607         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6608 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6609       fi
6610       # Try to locate tool using the code snippet
6611       for ac_prog in cut
6612 do
6613   # Extract the first word of "$ac_prog", so it can be a program name with args.
6614 set dummy $ac_prog; ac_word=$2
6615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6616 $as_echo_n "checking for $ac_word... " >&6; }
6617 if ${ac_cv_path_CUT+:} false; then :
6618   $as_echo_n "(cached) " >&6
6619 else
6620   case $CUT in
6621   [\\/]* | ?:[\\/]*)
6622   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6623   ;;
6624   *)
6625   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6626 for as_dir in $PATH
6627 do
6628   IFS=$as_save_IFS
6629   test -z "$as_dir" && as_dir=.
6630     for ac_exec_ext in '' $ac_executable_extensions; do
6631   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6632     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6633     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6634     break 2
6635   fi
6636 done
6637   done
6638 IFS=$as_save_IFS
6639 
6640   ;;
6641 esac
6642 fi
6643 CUT=$ac_cv_path_CUT
6644 if test -n "$CUT"; then
6645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6646 $as_echo "$CUT" >&6; }
6647 else
6648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6649 $as_echo "no" >&6; }
6650 fi
6651 
6652 
6653   test -n "$CUT" && break
6654 done
6655 
6656     else
6657       # If it succeeded, then it was overridden by the user. We will use it
6658       # for the tool.
6659 
6660       # First remove it from the list of overridden variables, so we can test
6661       # for unknown variables in the end.
6662       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6663 
6664       # Check if we try to supply an empty value
6665       if test "x$CUT" = x; then
6666         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6667 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6668         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6669 $as_echo_n "checking for CUT... " >&6; }
6670         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6671 $as_echo "disabled" >&6; }
6672       else
6673         # Check if the provided tool contains a complete path.
6674         tool_specified="$CUT"
6675         tool_basename="${tool_specified##*/}"
6676         if test "x$tool_basename" = "x$tool_specified"; then
6677           # A command without a complete path is provided, search $PATH.
6678           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6679 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6680           # Extract the first word of "$tool_basename", so it can be a program name with args.
6681 set dummy $tool_basename; ac_word=$2
6682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6683 $as_echo_n "checking for $ac_word... " >&6; }
6684 if ${ac_cv_path_CUT+:} false; then :
6685   $as_echo_n "(cached) " >&6
6686 else
6687   case $CUT in
6688   [\\/]* | ?:[\\/]*)
6689   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6690   ;;
6691   *)
6692   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6693 for as_dir in $PATH
6694 do
6695   IFS=$as_save_IFS
6696   test -z "$as_dir" && as_dir=.
6697     for ac_exec_ext in '' $ac_executable_extensions; do
6698   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6699     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6700     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6701     break 2
6702   fi
6703 done
6704   done
6705 IFS=$as_save_IFS
6706 
6707   ;;
6708 esac
6709 fi
6710 CUT=$ac_cv_path_CUT
6711 if test -n "$CUT"; then
6712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6713 $as_echo "$CUT" >&6; }
6714 else
6715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6716 $as_echo "no" >&6; }
6717 fi
6718 
6719 
6720           if test "x$CUT" = x; then
6721             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6722           fi
6723         else
6724           # Otherwise we believe it is a complete path. Use it as it is.
6725           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6726 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6727           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6728 $as_echo_n "checking for CUT... " >&6; }
6729           if test ! -x "$tool_specified"; then
6730             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6731 $as_echo "not found" >&6; }
6732             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6733           fi
6734           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6735 $as_echo "$tool_specified" >&6; }
6736         fi
6737       fi
6738     fi
6739 
6740   fi
6741 
6742 
6743 
6744   if test "x$CUT" = x; then
6745     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6746   fi
6747 
6748 
6749 
6750 
6751 
6752   # Publish this variable in the help.
6753 
6754 
6755   if [ -z "${DATE+x}" ]; then
6756     # The variable is not set by user, try to locate tool using the code snippet
6757     for ac_prog in date
6758 do
6759   # Extract the first word of "$ac_prog", so it can be a program name with args.
6760 set dummy $ac_prog; ac_word=$2
6761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6762 $as_echo_n "checking for $ac_word... " >&6; }
6763 if ${ac_cv_path_DATE+:} false; then :
6764   $as_echo_n "(cached) " >&6
6765 else
6766   case $DATE in
6767   [\\/]* | ?:[\\/]*)
6768   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6769   ;;
6770   *)
6771   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6772 for as_dir in $PATH
6773 do
6774   IFS=$as_save_IFS
6775   test -z "$as_dir" && as_dir=.
6776     for ac_exec_ext in '' $ac_executable_extensions; do
6777   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6778     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6779     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6780     break 2
6781   fi
6782 done
6783   done
6784 IFS=$as_save_IFS
6785 
6786   ;;
6787 esac
6788 fi
6789 DATE=$ac_cv_path_DATE
6790 if test -n "$DATE"; then
6791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6792 $as_echo "$DATE" >&6; }
6793 else
6794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6795 $as_echo "no" >&6; }
6796 fi
6797 
6798 
6799   test -n "$DATE" && break
6800 done
6801 
6802   else
6803     # The variable is set, but is it from the command line or the environment?
6804 
6805     # Try to remove the string !DATE! from our list.
6806     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6807     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6808       # If it failed, the variable was not from the command line. Ignore it,
6809       # but warn the user (except for BASH, which is always set by the calling BASH).
6810       if test "xDATE" != xBASH; then
6811         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6812 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6813       fi
6814       # Try to locate tool using the code snippet
6815       for ac_prog in date
6816 do
6817   # Extract the first word of "$ac_prog", so it can be a program name with args.
6818 set dummy $ac_prog; ac_word=$2
6819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6820 $as_echo_n "checking for $ac_word... " >&6; }
6821 if ${ac_cv_path_DATE+:} false; then :
6822   $as_echo_n "(cached) " >&6
6823 else
6824   case $DATE in
6825   [\\/]* | ?:[\\/]*)
6826   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6827   ;;
6828   *)
6829   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6830 for as_dir in $PATH
6831 do
6832   IFS=$as_save_IFS
6833   test -z "$as_dir" && as_dir=.
6834     for ac_exec_ext in '' $ac_executable_extensions; do
6835   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6836     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6837     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6838     break 2
6839   fi
6840 done
6841   done
6842 IFS=$as_save_IFS
6843 
6844   ;;
6845 esac
6846 fi
6847 DATE=$ac_cv_path_DATE
6848 if test -n "$DATE"; then
6849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6850 $as_echo "$DATE" >&6; }
6851 else
6852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6853 $as_echo "no" >&6; }
6854 fi
6855 
6856 
6857   test -n "$DATE" && break
6858 done
6859 
6860     else
6861       # If it succeeded, then it was overridden by the user. We will use it
6862       # for the tool.
6863 
6864       # First remove it from the list of overridden variables, so we can test
6865       # for unknown variables in the end.
6866       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6867 
6868       # Check if we try to supply an empty value
6869       if test "x$DATE" = x; then
6870         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6871 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6872         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6873 $as_echo_n "checking for DATE... " >&6; }
6874         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6875 $as_echo "disabled" >&6; }
6876       else
6877         # Check if the provided tool contains a complete path.
6878         tool_specified="$DATE"
6879         tool_basename="${tool_specified##*/}"
6880         if test "x$tool_basename" = "x$tool_specified"; then
6881           # A command without a complete path is provided, search $PATH.
6882           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6883 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6884           # Extract the first word of "$tool_basename", so it can be a program name with args.
6885 set dummy $tool_basename; ac_word=$2
6886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6887 $as_echo_n "checking for $ac_word... " >&6; }
6888 if ${ac_cv_path_DATE+:} false; then :
6889   $as_echo_n "(cached) " >&6
6890 else
6891   case $DATE in
6892   [\\/]* | ?:[\\/]*)
6893   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6894   ;;
6895   *)
6896   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6897 for as_dir in $PATH
6898 do
6899   IFS=$as_save_IFS
6900   test -z "$as_dir" && as_dir=.
6901     for ac_exec_ext in '' $ac_executable_extensions; do
6902   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6903     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6904     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6905     break 2
6906   fi
6907 done
6908   done
6909 IFS=$as_save_IFS
6910 
6911   ;;
6912 esac
6913 fi
6914 DATE=$ac_cv_path_DATE
6915 if test -n "$DATE"; then
6916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6917 $as_echo "$DATE" >&6; }
6918 else
6919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6920 $as_echo "no" >&6; }
6921 fi
6922 
6923 
6924           if test "x$DATE" = x; then
6925             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6926           fi
6927         else
6928           # Otherwise we believe it is a complete path. Use it as it is.
6929           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6930 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6931           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6932 $as_echo_n "checking for DATE... " >&6; }
6933           if test ! -x "$tool_specified"; then
6934             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6935 $as_echo "not found" >&6; }
6936             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6937           fi
6938           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6939 $as_echo "$tool_specified" >&6; }
6940         fi
6941       fi
6942     fi
6943 
6944   fi
6945 
6946 
6947 
6948   if test "x$DATE" = x; then
6949     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6950   fi
6951 
6952 
6953 
6954 
6955 
6956   # Publish this variable in the help.
6957 
6958 
6959   if [ -z "${DIFF+x}" ]; then
6960     # The variable is not set by user, try to locate tool using the code snippet
6961     for ac_prog in gdiff diff
6962 do
6963   # Extract the first word of "$ac_prog", so it can be a program name with args.
6964 set dummy $ac_prog; ac_word=$2
6965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6966 $as_echo_n "checking for $ac_word... " >&6; }
6967 if ${ac_cv_path_DIFF+:} false; then :
6968   $as_echo_n "(cached) " >&6
6969 else
6970   case $DIFF in
6971   [\\/]* | ?:[\\/]*)
6972   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6973   ;;
6974   *)
6975   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6976 for as_dir in $PATH
6977 do
6978   IFS=$as_save_IFS
6979   test -z "$as_dir" && as_dir=.
6980     for ac_exec_ext in '' $ac_executable_extensions; do
6981   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6982     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6983     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6984     break 2
6985   fi
6986 done
6987   done
6988 IFS=$as_save_IFS
6989 
6990   ;;
6991 esac
6992 fi
6993 DIFF=$ac_cv_path_DIFF
6994 if test -n "$DIFF"; then
6995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6996 $as_echo "$DIFF" >&6; }
6997 else
6998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6999 $as_echo "no" >&6; }
7000 fi
7001 
7002 
7003   test -n "$DIFF" && break
7004 done
7005 
7006   else
7007     # The variable is set, but is it from the command line or the environment?
7008 
7009     # Try to remove the string !DIFF! from our list.
7010     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7011     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7012       # If it failed, the variable was not from the command line. Ignore it,
7013       # but warn the user (except for BASH, which is always set by the calling BASH).
7014       if test "xDIFF" != xBASH; then
7015         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7016 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7017       fi
7018       # Try to locate tool using the code snippet
7019       for ac_prog in gdiff diff
7020 do
7021   # Extract the first word of "$ac_prog", so it can be a program name with args.
7022 set dummy $ac_prog; ac_word=$2
7023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7024 $as_echo_n "checking for $ac_word... " >&6; }
7025 if ${ac_cv_path_DIFF+:} false; then :
7026   $as_echo_n "(cached) " >&6
7027 else
7028   case $DIFF in
7029   [\\/]* | ?:[\\/]*)
7030   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7031   ;;
7032   *)
7033   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7034 for as_dir in $PATH
7035 do
7036   IFS=$as_save_IFS
7037   test -z "$as_dir" && as_dir=.
7038     for ac_exec_ext in '' $ac_executable_extensions; do
7039   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7040     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7042     break 2
7043   fi
7044 done
7045   done
7046 IFS=$as_save_IFS
7047 
7048   ;;
7049 esac
7050 fi
7051 DIFF=$ac_cv_path_DIFF
7052 if test -n "$DIFF"; then
7053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7054 $as_echo "$DIFF" >&6; }
7055 else
7056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7057 $as_echo "no" >&6; }
7058 fi
7059 
7060 
7061   test -n "$DIFF" && break
7062 done
7063 
7064     else
7065       # If it succeeded, then it was overridden by the user. We will use it
7066       # for the tool.
7067 
7068       # First remove it from the list of overridden variables, so we can test
7069       # for unknown variables in the end.
7070       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7071 
7072       # Check if we try to supply an empty value
7073       if test "x$DIFF" = x; then
7074         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7075 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7076         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7077 $as_echo_n "checking for DIFF... " >&6; }
7078         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7079 $as_echo "disabled" >&6; }
7080       else
7081         # Check if the provided tool contains a complete path.
7082         tool_specified="$DIFF"
7083         tool_basename="${tool_specified##*/}"
7084         if test "x$tool_basename" = "x$tool_specified"; then
7085           # A command without a complete path is provided, search $PATH.
7086           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7087 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7088           # Extract the first word of "$tool_basename", so it can be a program name with args.
7089 set dummy $tool_basename; ac_word=$2
7090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7091 $as_echo_n "checking for $ac_word... " >&6; }
7092 if ${ac_cv_path_DIFF+:} false; then :
7093   $as_echo_n "(cached) " >&6
7094 else
7095   case $DIFF in
7096   [\\/]* | ?:[\\/]*)
7097   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7098   ;;
7099   *)
7100   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7101 for as_dir in $PATH
7102 do
7103   IFS=$as_save_IFS
7104   test -z "$as_dir" && as_dir=.
7105     for ac_exec_ext in '' $ac_executable_extensions; do
7106   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7107     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7108     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7109     break 2
7110   fi
7111 done
7112   done
7113 IFS=$as_save_IFS
7114 
7115   ;;
7116 esac
7117 fi
7118 DIFF=$ac_cv_path_DIFF
7119 if test -n "$DIFF"; then
7120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7121 $as_echo "$DIFF" >&6; }
7122 else
7123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7124 $as_echo "no" >&6; }
7125 fi
7126 
7127 
7128           if test "x$DIFF" = x; then
7129             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7130           fi
7131         else
7132           # Otherwise we believe it is a complete path. Use it as it is.
7133           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7134 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7135           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7136 $as_echo_n "checking for DIFF... " >&6; }
7137           if test ! -x "$tool_specified"; then
7138             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7139 $as_echo "not found" >&6; }
7140             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7141           fi
7142           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7143 $as_echo "$tool_specified" >&6; }
7144         fi
7145       fi
7146     fi
7147 
7148   fi
7149 
7150 
7151 
7152   if test "x$DIFF" = x; then
7153     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7154   fi
7155 
7156 
7157 
7158 
7159 
7160   # Publish this variable in the help.
7161 
7162 
7163   if [ -z "${DIRNAME+x}" ]; then
7164     # The variable is not set by user, try to locate tool using the code snippet
7165     for ac_prog in dirname
7166 do
7167   # Extract the first word of "$ac_prog", so it can be a program name with args.
7168 set dummy $ac_prog; ac_word=$2
7169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7170 $as_echo_n "checking for $ac_word... " >&6; }
7171 if ${ac_cv_path_DIRNAME+:} false; then :
7172   $as_echo_n "(cached) " >&6
7173 else
7174   case $DIRNAME in
7175   [\\/]* | ?:[\\/]*)
7176   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7177   ;;
7178   *)
7179   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7180 for as_dir in $PATH
7181 do
7182   IFS=$as_save_IFS
7183   test -z "$as_dir" && as_dir=.
7184     for ac_exec_ext in '' $ac_executable_extensions; do
7185   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7186     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7187     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7188     break 2
7189   fi
7190 done
7191   done
7192 IFS=$as_save_IFS
7193 
7194   ;;
7195 esac
7196 fi
7197 DIRNAME=$ac_cv_path_DIRNAME
7198 if test -n "$DIRNAME"; then
7199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7200 $as_echo "$DIRNAME" >&6; }
7201 else
7202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7203 $as_echo "no" >&6; }
7204 fi
7205 
7206 
7207   test -n "$DIRNAME" && break
7208 done
7209 
7210   else
7211     # The variable is set, but is it from the command line or the environment?
7212 
7213     # Try to remove the string !DIRNAME! from our list.
7214     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7215     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7216       # If it failed, the variable was not from the command line. Ignore it,
7217       # but warn the user (except for BASH, which is always set by the calling BASH).
7218       if test "xDIRNAME" != xBASH; then
7219         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7220 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7221       fi
7222       # Try to locate tool using the code snippet
7223       for ac_prog in dirname
7224 do
7225   # Extract the first word of "$ac_prog", so it can be a program name with args.
7226 set dummy $ac_prog; ac_word=$2
7227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7228 $as_echo_n "checking for $ac_word... " >&6; }
7229 if ${ac_cv_path_DIRNAME+:} false; then :
7230   $as_echo_n "(cached) " >&6
7231 else
7232   case $DIRNAME in
7233   [\\/]* | ?:[\\/]*)
7234   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7235   ;;
7236   *)
7237   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7238 for as_dir in $PATH
7239 do
7240   IFS=$as_save_IFS
7241   test -z "$as_dir" && as_dir=.
7242     for ac_exec_ext in '' $ac_executable_extensions; do
7243   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7244     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7245     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7246     break 2
7247   fi
7248 done
7249   done
7250 IFS=$as_save_IFS
7251 
7252   ;;
7253 esac
7254 fi
7255 DIRNAME=$ac_cv_path_DIRNAME
7256 if test -n "$DIRNAME"; then
7257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7258 $as_echo "$DIRNAME" >&6; }
7259 else
7260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7261 $as_echo "no" >&6; }
7262 fi
7263 
7264 
7265   test -n "$DIRNAME" && break
7266 done
7267 
7268     else
7269       # If it succeeded, then it was overridden by the user. We will use it
7270       # for the tool.
7271 
7272       # First remove it from the list of overridden variables, so we can test
7273       # for unknown variables in the end.
7274       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7275 
7276       # Check if we try to supply an empty value
7277       if test "x$DIRNAME" = x; then
7278         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7279 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7280         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7281 $as_echo_n "checking for DIRNAME... " >&6; }
7282         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7283 $as_echo "disabled" >&6; }
7284       else
7285         # Check if the provided tool contains a complete path.
7286         tool_specified="$DIRNAME"
7287         tool_basename="${tool_specified##*/}"
7288         if test "x$tool_basename" = "x$tool_specified"; then
7289           # A command without a complete path is provided, search $PATH.
7290           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7291 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7292           # Extract the first word of "$tool_basename", so it can be a program name with args.
7293 set dummy $tool_basename; ac_word=$2
7294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7295 $as_echo_n "checking for $ac_word... " >&6; }
7296 if ${ac_cv_path_DIRNAME+:} false; then :
7297   $as_echo_n "(cached) " >&6
7298 else
7299   case $DIRNAME in
7300   [\\/]* | ?:[\\/]*)
7301   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7302   ;;
7303   *)
7304   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7305 for as_dir in $PATH
7306 do
7307   IFS=$as_save_IFS
7308   test -z "$as_dir" && as_dir=.
7309     for ac_exec_ext in '' $ac_executable_extensions; do
7310   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7311     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7312     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7313     break 2
7314   fi
7315 done
7316   done
7317 IFS=$as_save_IFS
7318 
7319   ;;
7320 esac
7321 fi
7322 DIRNAME=$ac_cv_path_DIRNAME
7323 if test -n "$DIRNAME"; then
7324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7325 $as_echo "$DIRNAME" >&6; }
7326 else
7327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7328 $as_echo "no" >&6; }
7329 fi
7330 
7331 
7332           if test "x$DIRNAME" = x; then
7333             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7334           fi
7335         else
7336           # Otherwise we believe it is a complete path. Use it as it is.
7337           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7338 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7339           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7340 $as_echo_n "checking for DIRNAME... " >&6; }
7341           if test ! -x "$tool_specified"; then
7342             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7343 $as_echo "not found" >&6; }
7344             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7345           fi
7346           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7347 $as_echo "$tool_specified" >&6; }
7348         fi
7349       fi
7350     fi
7351 
7352   fi
7353 
7354 
7355 
7356   if test "x$DIRNAME" = x; then
7357     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7358   fi
7359 
7360 
7361 
7362 
7363 
7364   # Publish this variable in the help.
7365 
7366 
7367   if [ -z "${ECHO+x}" ]; then
7368     # The variable is not set by user, try to locate tool using the code snippet
7369     for ac_prog in echo
7370 do
7371   # Extract the first word of "$ac_prog", so it can be a program name with args.
7372 set dummy $ac_prog; ac_word=$2
7373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7374 $as_echo_n "checking for $ac_word... " >&6; }
7375 if ${ac_cv_path_ECHO+:} false; then :
7376   $as_echo_n "(cached) " >&6
7377 else
7378   case $ECHO in
7379   [\\/]* | ?:[\\/]*)
7380   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7381   ;;
7382   *)
7383   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7384 for as_dir in $PATH
7385 do
7386   IFS=$as_save_IFS
7387   test -z "$as_dir" && as_dir=.
7388     for ac_exec_ext in '' $ac_executable_extensions; do
7389   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7390     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7391     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7392     break 2
7393   fi
7394 done
7395   done
7396 IFS=$as_save_IFS
7397 
7398   ;;
7399 esac
7400 fi
7401 ECHO=$ac_cv_path_ECHO
7402 if test -n "$ECHO"; then
7403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7404 $as_echo "$ECHO" >&6; }
7405 else
7406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7407 $as_echo "no" >&6; }
7408 fi
7409 
7410 
7411   test -n "$ECHO" && break
7412 done
7413 
7414   else
7415     # The variable is set, but is it from the command line or the environment?
7416 
7417     # Try to remove the string !ECHO! from our list.
7418     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7419     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7420       # If it failed, the variable was not from the command line. Ignore it,
7421       # but warn the user (except for BASH, which is always set by the calling BASH).
7422       if test "xECHO" != xBASH; then
7423         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7424 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7425       fi
7426       # Try to locate tool using the code snippet
7427       for ac_prog in echo
7428 do
7429   # Extract the first word of "$ac_prog", so it can be a program name with args.
7430 set dummy $ac_prog; ac_word=$2
7431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7432 $as_echo_n "checking for $ac_word... " >&6; }
7433 if ${ac_cv_path_ECHO+:} false; then :
7434   $as_echo_n "(cached) " >&6
7435 else
7436   case $ECHO in
7437   [\\/]* | ?:[\\/]*)
7438   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7439   ;;
7440   *)
7441   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7442 for as_dir in $PATH
7443 do
7444   IFS=$as_save_IFS
7445   test -z "$as_dir" && as_dir=.
7446     for ac_exec_ext in '' $ac_executable_extensions; do
7447   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7448     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7449     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7450     break 2
7451   fi
7452 done
7453   done
7454 IFS=$as_save_IFS
7455 
7456   ;;
7457 esac
7458 fi
7459 ECHO=$ac_cv_path_ECHO
7460 if test -n "$ECHO"; then
7461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7462 $as_echo "$ECHO" >&6; }
7463 else
7464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7465 $as_echo "no" >&6; }
7466 fi
7467 
7468 
7469   test -n "$ECHO" && break
7470 done
7471 
7472     else
7473       # If it succeeded, then it was overridden by the user. We will use it
7474       # for the tool.
7475 
7476       # First remove it from the list of overridden variables, so we can test
7477       # for unknown variables in the end.
7478       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7479 
7480       # Check if we try to supply an empty value
7481       if test "x$ECHO" = x; then
7482         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7483 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7484         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7485 $as_echo_n "checking for ECHO... " >&6; }
7486         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7487 $as_echo "disabled" >&6; }
7488       else
7489         # Check if the provided tool contains a complete path.
7490         tool_specified="$ECHO"
7491         tool_basename="${tool_specified##*/}"
7492         if test "x$tool_basename" = "x$tool_specified"; then
7493           # A command without a complete path is provided, search $PATH.
7494           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7495 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7496           # Extract the first word of "$tool_basename", so it can be a program name with args.
7497 set dummy $tool_basename; ac_word=$2
7498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7499 $as_echo_n "checking for $ac_word... " >&6; }
7500 if ${ac_cv_path_ECHO+:} false; then :
7501   $as_echo_n "(cached) " >&6
7502 else
7503   case $ECHO in
7504   [\\/]* | ?:[\\/]*)
7505   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7506   ;;
7507   *)
7508   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7509 for as_dir in $PATH
7510 do
7511   IFS=$as_save_IFS
7512   test -z "$as_dir" && as_dir=.
7513     for ac_exec_ext in '' $ac_executable_extensions; do
7514   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7515     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7516     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7517     break 2
7518   fi
7519 done
7520   done
7521 IFS=$as_save_IFS
7522 
7523   ;;
7524 esac
7525 fi
7526 ECHO=$ac_cv_path_ECHO
7527 if test -n "$ECHO"; then
7528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7529 $as_echo "$ECHO" >&6; }
7530 else
7531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7532 $as_echo "no" >&6; }
7533 fi
7534 
7535 
7536           if test "x$ECHO" = x; then
7537             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7538           fi
7539         else
7540           # Otherwise we believe it is a complete path. Use it as it is.
7541           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7542 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7543           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7544 $as_echo_n "checking for ECHO... " >&6; }
7545           if test ! -x "$tool_specified"; then
7546             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7547 $as_echo "not found" >&6; }
7548             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7549           fi
7550           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7551 $as_echo "$tool_specified" >&6; }
7552         fi
7553       fi
7554     fi
7555 
7556   fi
7557 
7558 
7559 
7560   if test "x$ECHO" = x; then
7561     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7562   fi
7563 
7564 
7565 
7566 
7567 
7568   # Publish this variable in the help.
7569 
7570 
7571   if [ -z "${EXPR+x}" ]; then
7572     # The variable is not set by user, try to locate tool using the code snippet
7573     for ac_prog in expr
7574 do
7575   # Extract the first word of "$ac_prog", so it can be a program name with args.
7576 set dummy $ac_prog; ac_word=$2
7577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7578 $as_echo_n "checking for $ac_word... " >&6; }
7579 if ${ac_cv_path_EXPR+:} false; then :
7580   $as_echo_n "(cached) " >&6
7581 else
7582   case $EXPR in
7583   [\\/]* | ?:[\\/]*)
7584   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7585   ;;
7586   *)
7587   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7588 for as_dir in $PATH
7589 do
7590   IFS=$as_save_IFS
7591   test -z "$as_dir" && as_dir=.
7592     for ac_exec_ext in '' $ac_executable_extensions; do
7593   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7594     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7595     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7596     break 2
7597   fi
7598 done
7599   done
7600 IFS=$as_save_IFS
7601 
7602   ;;
7603 esac
7604 fi
7605 EXPR=$ac_cv_path_EXPR
7606 if test -n "$EXPR"; then
7607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7608 $as_echo "$EXPR" >&6; }
7609 else
7610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7611 $as_echo "no" >&6; }
7612 fi
7613 
7614 
7615   test -n "$EXPR" && break
7616 done
7617 
7618   else
7619     # The variable is set, but is it from the command line or the environment?
7620 
7621     # Try to remove the string !EXPR! from our list.
7622     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7623     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7624       # If it failed, the variable was not from the command line. Ignore it,
7625       # but warn the user (except for BASH, which is always set by the calling BASH).
7626       if test "xEXPR" != xBASH; then
7627         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7628 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7629       fi
7630       # Try to locate tool using the code snippet
7631       for ac_prog in expr
7632 do
7633   # Extract the first word of "$ac_prog", so it can be a program name with args.
7634 set dummy $ac_prog; ac_word=$2
7635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7636 $as_echo_n "checking for $ac_word... " >&6; }
7637 if ${ac_cv_path_EXPR+:} false; then :
7638   $as_echo_n "(cached) " >&6
7639 else
7640   case $EXPR in
7641   [\\/]* | ?:[\\/]*)
7642   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7643   ;;
7644   *)
7645   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7646 for as_dir in $PATH
7647 do
7648   IFS=$as_save_IFS
7649   test -z "$as_dir" && as_dir=.
7650     for ac_exec_ext in '' $ac_executable_extensions; do
7651   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7652     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7653     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7654     break 2
7655   fi
7656 done
7657   done
7658 IFS=$as_save_IFS
7659 
7660   ;;
7661 esac
7662 fi
7663 EXPR=$ac_cv_path_EXPR
7664 if test -n "$EXPR"; then
7665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7666 $as_echo "$EXPR" >&6; }
7667 else
7668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7669 $as_echo "no" >&6; }
7670 fi
7671 
7672 
7673   test -n "$EXPR" && break
7674 done
7675 
7676     else
7677       # If it succeeded, then it was overridden by the user. We will use it
7678       # for the tool.
7679 
7680       # First remove it from the list of overridden variables, so we can test
7681       # for unknown variables in the end.
7682       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7683 
7684       # Check if we try to supply an empty value
7685       if test "x$EXPR" = x; then
7686         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7687 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7688         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7689 $as_echo_n "checking for EXPR... " >&6; }
7690         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7691 $as_echo "disabled" >&6; }
7692       else
7693         # Check if the provided tool contains a complete path.
7694         tool_specified="$EXPR"
7695         tool_basename="${tool_specified##*/}"
7696         if test "x$tool_basename" = "x$tool_specified"; then
7697           # A command without a complete path is provided, search $PATH.
7698           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7699 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7700           # Extract the first word of "$tool_basename", so it can be a program name with args.
7701 set dummy $tool_basename; ac_word=$2
7702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7703 $as_echo_n "checking for $ac_word... " >&6; }
7704 if ${ac_cv_path_EXPR+:} false; then :
7705   $as_echo_n "(cached) " >&6
7706 else
7707   case $EXPR in
7708   [\\/]* | ?:[\\/]*)
7709   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7710   ;;
7711   *)
7712   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7713 for as_dir in $PATH
7714 do
7715   IFS=$as_save_IFS
7716   test -z "$as_dir" && as_dir=.
7717     for ac_exec_ext in '' $ac_executable_extensions; do
7718   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7719     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7720     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7721     break 2
7722   fi
7723 done
7724   done
7725 IFS=$as_save_IFS
7726 
7727   ;;
7728 esac
7729 fi
7730 EXPR=$ac_cv_path_EXPR
7731 if test -n "$EXPR"; then
7732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7733 $as_echo "$EXPR" >&6; }
7734 else
7735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7736 $as_echo "no" >&6; }
7737 fi
7738 
7739 
7740           if test "x$EXPR" = x; then
7741             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7742           fi
7743         else
7744           # Otherwise we believe it is a complete path. Use it as it is.
7745           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7746 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7747           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7748 $as_echo_n "checking for EXPR... " >&6; }
7749           if test ! -x "$tool_specified"; then
7750             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7751 $as_echo "not found" >&6; }
7752             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7753           fi
7754           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7755 $as_echo "$tool_specified" >&6; }
7756         fi
7757       fi
7758     fi
7759 
7760   fi
7761 
7762 
7763 
7764   if test "x$EXPR" = x; then
7765     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7766   fi
7767 
7768 
7769 
7770 
7771 
7772   # Publish this variable in the help.
7773 
7774 
7775   if [ -z "${FILE+x}" ]; then
7776     # The variable is not set by user, try to locate tool using the code snippet
7777     for ac_prog in file
7778 do
7779   # Extract the first word of "$ac_prog", so it can be a program name with args.
7780 set dummy $ac_prog; ac_word=$2
7781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7782 $as_echo_n "checking for $ac_word... " >&6; }
7783 if ${ac_cv_path_FILE+:} false; then :
7784   $as_echo_n "(cached) " >&6
7785 else
7786   case $FILE in
7787   [\\/]* | ?:[\\/]*)
7788   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7789   ;;
7790   *)
7791   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7792 for as_dir in $PATH
7793 do
7794   IFS=$as_save_IFS
7795   test -z "$as_dir" && as_dir=.
7796     for ac_exec_ext in '' $ac_executable_extensions; do
7797   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7798     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7799     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7800     break 2
7801   fi
7802 done
7803   done
7804 IFS=$as_save_IFS
7805 
7806   ;;
7807 esac
7808 fi
7809 FILE=$ac_cv_path_FILE
7810 if test -n "$FILE"; then
7811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7812 $as_echo "$FILE" >&6; }
7813 else
7814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7815 $as_echo "no" >&6; }
7816 fi
7817 
7818 
7819   test -n "$FILE" && break
7820 done
7821 
7822   else
7823     # The variable is set, but is it from the command line or the environment?
7824 
7825     # Try to remove the string !FILE! from our list.
7826     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7827     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7828       # If it failed, the variable was not from the command line. Ignore it,
7829       # but warn the user (except for BASH, which is always set by the calling BASH).
7830       if test "xFILE" != xBASH; then
7831         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7832 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7833       fi
7834       # Try to locate tool using the code snippet
7835       for ac_prog in file
7836 do
7837   # Extract the first word of "$ac_prog", so it can be a program name with args.
7838 set dummy $ac_prog; ac_word=$2
7839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7840 $as_echo_n "checking for $ac_word... " >&6; }
7841 if ${ac_cv_path_FILE+:} false; then :
7842   $as_echo_n "(cached) " >&6
7843 else
7844   case $FILE in
7845   [\\/]* | ?:[\\/]*)
7846   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7847   ;;
7848   *)
7849   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7850 for as_dir in $PATH
7851 do
7852   IFS=$as_save_IFS
7853   test -z "$as_dir" && as_dir=.
7854     for ac_exec_ext in '' $ac_executable_extensions; do
7855   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7856     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7857     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7858     break 2
7859   fi
7860 done
7861   done
7862 IFS=$as_save_IFS
7863 
7864   ;;
7865 esac
7866 fi
7867 FILE=$ac_cv_path_FILE
7868 if test -n "$FILE"; then
7869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7870 $as_echo "$FILE" >&6; }
7871 else
7872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7873 $as_echo "no" >&6; }
7874 fi
7875 
7876 
7877   test -n "$FILE" && break
7878 done
7879 
7880     else
7881       # If it succeeded, then it was overridden by the user. We will use it
7882       # for the tool.
7883 
7884       # First remove it from the list of overridden variables, so we can test
7885       # for unknown variables in the end.
7886       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7887 
7888       # Check if we try to supply an empty value
7889       if test "x$FILE" = x; then
7890         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7891 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7892         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7893 $as_echo_n "checking for FILE... " >&6; }
7894         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7895 $as_echo "disabled" >&6; }
7896       else
7897         # Check if the provided tool contains a complete path.
7898         tool_specified="$FILE"
7899         tool_basename="${tool_specified##*/}"
7900         if test "x$tool_basename" = "x$tool_specified"; then
7901           # A command without a complete path is provided, search $PATH.
7902           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7903 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7904           # Extract the first word of "$tool_basename", so it can be a program name with args.
7905 set dummy $tool_basename; ac_word=$2
7906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7907 $as_echo_n "checking for $ac_word... " >&6; }
7908 if ${ac_cv_path_FILE+:} false; then :
7909   $as_echo_n "(cached) " >&6
7910 else
7911   case $FILE in
7912   [\\/]* | ?:[\\/]*)
7913   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7914   ;;
7915   *)
7916   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7917 for as_dir in $PATH
7918 do
7919   IFS=$as_save_IFS
7920   test -z "$as_dir" && as_dir=.
7921     for ac_exec_ext in '' $ac_executable_extensions; do
7922   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7923     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7924     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7925     break 2
7926   fi
7927 done
7928   done
7929 IFS=$as_save_IFS
7930 
7931   ;;
7932 esac
7933 fi
7934 FILE=$ac_cv_path_FILE
7935 if test -n "$FILE"; then
7936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7937 $as_echo "$FILE" >&6; }
7938 else
7939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7940 $as_echo "no" >&6; }
7941 fi
7942 
7943 
7944           if test "x$FILE" = x; then
7945             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7946           fi
7947         else
7948           # Otherwise we believe it is a complete path. Use it as it is.
7949           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7950 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7951           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7952 $as_echo_n "checking for FILE... " >&6; }
7953           if test ! -x "$tool_specified"; then
7954             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7955 $as_echo "not found" >&6; }
7956             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7957           fi
7958           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7959 $as_echo "$tool_specified" >&6; }
7960         fi
7961       fi
7962     fi
7963 
7964   fi
7965 
7966 
7967 
7968   if test "x$FILE" = x; then
7969     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7970   fi
7971 
7972 
7973 
7974 
7975 
7976   # Publish this variable in the help.
7977 
7978 
7979   if [ -z "${FIND+x}" ]; then
7980     # The variable is not set by user, try to locate tool using the code snippet
7981     for ac_prog in find
7982 do
7983   # Extract the first word of "$ac_prog", so it can be a program name with args.
7984 set dummy $ac_prog; ac_word=$2
7985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7986 $as_echo_n "checking for $ac_word... " >&6; }
7987 if ${ac_cv_path_FIND+:} false; then :
7988   $as_echo_n "(cached) " >&6
7989 else
7990   case $FIND in
7991   [\\/]* | ?:[\\/]*)
7992   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7993   ;;
7994   *)
7995   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7996 for as_dir in $PATH
7997 do
7998   IFS=$as_save_IFS
7999   test -z "$as_dir" && as_dir=.
8000     for ac_exec_ext in '' $ac_executable_extensions; do
8001   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8002     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8003     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8004     break 2
8005   fi
8006 done
8007   done
8008 IFS=$as_save_IFS
8009 
8010   ;;
8011 esac
8012 fi
8013 FIND=$ac_cv_path_FIND
8014 if test -n "$FIND"; then
8015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8016 $as_echo "$FIND" >&6; }
8017 else
8018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8019 $as_echo "no" >&6; }
8020 fi
8021 
8022 
8023   test -n "$FIND" && break
8024 done
8025 
8026   else
8027     # The variable is set, but is it from the command line or the environment?
8028 
8029     # Try to remove the string !FIND! from our list.
8030     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8031     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8032       # If it failed, the variable was not from the command line. Ignore it,
8033       # but warn the user (except for BASH, which is always set by the calling BASH).
8034       if test "xFIND" != xBASH; then
8035         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8036 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8037       fi
8038       # Try to locate tool using the code snippet
8039       for ac_prog in find
8040 do
8041   # Extract the first word of "$ac_prog", so it can be a program name with args.
8042 set dummy $ac_prog; ac_word=$2
8043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8044 $as_echo_n "checking for $ac_word... " >&6; }
8045 if ${ac_cv_path_FIND+:} false; then :
8046   $as_echo_n "(cached) " >&6
8047 else
8048   case $FIND in
8049   [\\/]* | ?:[\\/]*)
8050   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8051   ;;
8052   *)
8053   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8054 for as_dir in $PATH
8055 do
8056   IFS=$as_save_IFS
8057   test -z "$as_dir" && as_dir=.
8058     for ac_exec_ext in '' $ac_executable_extensions; do
8059   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8060     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8061     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8062     break 2
8063   fi
8064 done
8065   done
8066 IFS=$as_save_IFS
8067 
8068   ;;
8069 esac
8070 fi
8071 FIND=$ac_cv_path_FIND
8072 if test -n "$FIND"; then
8073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8074 $as_echo "$FIND" >&6; }
8075 else
8076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8077 $as_echo "no" >&6; }
8078 fi
8079 
8080 
8081   test -n "$FIND" && break
8082 done
8083 
8084     else
8085       # If it succeeded, then it was overridden by the user. We will use it
8086       # for the tool.
8087 
8088       # First remove it from the list of overridden variables, so we can test
8089       # for unknown variables in the end.
8090       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8091 
8092       # Check if we try to supply an empty value
8093       if test "x$FIND" = x; then
8094         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8095 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8096         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8097 $as_echo_n "checking for FIND... " >&6; }
8098         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8099 $as_echo "disabled" >&6; }
8100       else
8101         # Check if the provided tool contains a complete path.
8102         tool_specified="$FIND"
8103         tool_basename="${tool_specified##*/}"
8104         if test "x$tool_basename" = "x$tool_specified"; then
8105           # A command without a complete path is provided, search $PATH.
8106           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8107 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8108           # Extract the first word of "$tool_basename", so it can be a program name with args.
8109 set dummy $tool_basename; ac_word=$2
8110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8111 $as_echo_n "checking for $ac_word... " >&6; }
8112 if ${ac_cv_path_FIND+:} false; then :
8113   $as_echo_n "(cached) " >&6
8114 else
8115   case $FIND in
8116   [\\/]* | ?:[\\/]*)
8117   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8118   ;;
8119   *)
8120   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8121 for as_dir in $PATH
8122 do
8123   IFS=$as_save_IFS
8124   test -z "$as_dir" && as_dir=.
8125     for ac_exec_ext in '' $ac_executable_extensions; do
8126   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8127     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8128     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8129     break 2
8130   fi
8131 done
8132   done
8133 IFS=$as_save_IFS
8134 
8135   ;;
8136 esac
8137 fi
8138 FIND=$ac_cv_path_FIND
8139 if test -n "$FIND"; then
8140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8141 $as_echo "$FIND" >&6; }
8142 else
8143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8144 $as_echo "no" >&6; }
8145 fi
8146 
8147 
8148           if test "x$FIND" = x; then
8149             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8150           fi
8151         else
8152           # Otherwise we believe it is a complete path. Use it as it is.
8153           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8154 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8155           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8156 $as_echo_n "checking for FIND... " >&6; }
8157           if test ! -x "$tool_specified"; then
8158             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8159 $as_echo "not found" >&6; }
8160             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8161           fi
8162           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8163 $as_echo "$tool_specified" >&6; }
8164         fi
8165       fi
8166     fi
8167 
8168   fi
8169 
8170 
8171 
8172   if test "x$FIND" = x; then
8173     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8174   fi
8175 
8176 
8177 
8178 
8179 
8180   # Publish this variable in the help.
8181 
8182 
8183   if [ -z "${HEAD+x}" ]; then
8184     # The variable is not set by user, try to locate tool using the code snippet
8185     for ac_prog in head
8186 do
8187   # Extract the first word of "$ac_prog", so it can be a program name with args.
8188 set dummy $ac_prog; ac_word=$2
8189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8190 $as_echo_n "checking for $ac_word... " >&6; }
8191 if ${ac_cv_path_HEAD+:} false; then :
8192   $as_echo_n "(cached) " >&6
8193 else
8194   case $HEAD in
8195   [\\/]* | ?:[\\/]*)
8196   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8197   ;;
8198   *)
8199   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8200 for as_dir in $PATH
8201 do
8202   IFS=$as_save_IFS
8203   test -z "$as_dir" && as_dir=.
8204     for ac_exec_ext in '' $ac_executable_extensions; do
8205   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8206     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8207     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8208     break 2
8209   fi
8210 done
8211   done
8212 IFS=$as_save_IFS
8213 
8214   ;;
8215 esac
8216 fi
8217 HEAD=$ac_cv_path_HEAD
8218 if test -n "$HEAD"; then
8219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8220 $as_echo "$HEAD" >&6; }
8221 else
8222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8223 $as_echo "no" >&6; }
8224 fi
8225 
8226 
8227   test -n "$HEAD" && break
8228 done
8229 
8230   else
8231     # The variable is set, but is it from the command line or the environment?
8232 
8233     # Try to remove the string !HEAD! from our list.
8234     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8235     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8236       # If it failed, the variable was not from the command line. Ignore it,
8237       # but warn the user (except for BASH, which is always set by the calling BASH).
8238       if test "xHEAD" != xBASH; then
8239         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8240 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8241       fi
8242       # Try to locate tool using the code snippet
8243       for ac_prog in head
8244 do
8245   # Extract the first word of "$ac_prog", so it can be a program name with args.
8246 set dummy $ac_prog; ac_word=$2
8247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8248 $as_echo_n "checking for $ac_word... " >&6; }
8249 if ${ac_cv_path_HEAD+:} false; then :
8250   $as_echo_n "(cached) " >&6
8251 else
8252   case $HEAD in
8253   [\\/]* | ?:[\\/]*)
8254   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8255   ;;
8256   *)
8257   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8258 for as_dir in $PATH
8259 do
8260   IFS=$as_save_IFS
8261   test -z "$as_dir" && as_dir=.
8262     for ac_exec_ext in '' $ac_executable_extensions; do
8263   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8264     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8265     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8266     break 2
8267   fi
8268 done
8269   done
8270 IFS=$as_save_IFS
8271 
8272   ;;
8273 esac
8274 fi
8275 HEAD=$ac_cv_path_HEAD
8276 if test -n "$HEAD"; then
8277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8278 $as_echo "$HEAD" >&6; }
8279 else
8280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8281 $as_echo "no" >&6; }
8282 fi
8283 
8284 
8285   test -n "$HEAD" && break
8286 done
8287 
8288     else
8289       # If it succeeded, then it was overridden by the user. We will use it
8290       # for the tool.
8291 
8292       # First remove it from the list of overridden variables, so we can test
8293       # for unknown variables in the end.
8294       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8295 
8296       # Check if we try to supply an empty value
8297       if test "x$HEAD" = x; then
8298         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8299 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8300         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8301 $as_echo_n "checking for HEAD... " >&6; }
8302         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8303 $as_echo "disabled" >&6; }
8304       else
8305         # Check if the provided tool contains a complete path.
8306         tool_specified="$HEAD"
8307         tool_basename="${tool_specified##*/}"
8308         if test "x$tool_basename" = "x$tool_specified"; then
8309           # A command without a complete path is provided, search $PATH.
8310           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8311 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8312           # Extract the first word of "$tool_basename", so it can be a program name with args.
8313 set dummy $tool_basename; ac_word=$2
8314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8315 $as_echo_n "checking for $ac_word... " >&6; }
8316 if ${ac_cv_path_HEAD+:} false; then :
8317   $as_echo_n "(cached) " >&6
8318 else
8319   case $HEAD in
8320   [\\/]* | ?:[\\/]*)
8321   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8322   ;;
8323   *)
8324   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8325 for as_dir in $PATH
8326 do
8327   IFS=$as_save_IFS
8328   test -z "$as_dir" && as_dir=.
8329     for ac_exec_ext in '' $ac_executable_extensions; do
8330   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8331     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8332     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8333     break 2
8334   fi
8335 done
8336   done
8337 IFS=$as_save_IFS
8338 
8339   ;;
8340 esac
8341 fi
8342 HEAD=$ac_cv_path_HEAD
8343 if test -n "$HEAD"; then
8344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8345 $as_echo "$HEAD" >&6; }
8346 else
8347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8348 $as_echo "no" >&6; }
8349 fi
8350 
8351 
8352           if test "x$HEAD" = x; then
8353             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8354           fi
8355         else
8356           # Otherwise we believe it is a complete path. Use it as it is.
8357           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8358 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8359           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8360 $as_echo_n "checking for HEAD... " >&6; }
8361           if test ! -x "$tool_specified"; then
8362             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8363 $as_echo "not found" >&6; }
8364             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8365           fi
8366           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8367 $as_echo "$tool_specified" >&6; }
8368         fi
8369       fi
8370     fi
8371 
8372   fi
8373 
8374 
8375 
8376   if test "x$HEAD" = x; then
8377     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8378   fi
8379 
8380 
8381 
8382 
8383 
8384   # Publish this variable in the help.
8385 
8386 
8387   if [ -z "${LN+x}" ]; then
8388     # The variable is not set by user, try to locate tool using the code snippet
8389     for ac_prog in ln
8390 do
8391   # Extract the first word of "$ac_prog", so it can be a program name with args.
8392 set dummy $ac_prog; ac_word=$2
8393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8394 $as_echo_n "checking for $ac_word... " >&6; }
8395 if ${ac_cv_path_LN+:} false; then :
8396   $as_echo_n "(cached) " >&6
8397 else
8398   case $LN in
8399   [\\/]* | ?:[\\/]*)
8400   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8401   ;;
8402   *)
8403   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8404 for as_dir in $PATH
8405 do
8406   IFS=$as_save_IFS
8407   test -z "$as_dir" && as_dir=.
8408     for ac_exec_ext in '' $ac_executable_extensions; do
8409   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8410     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8411     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8412     break 2
8413   fi
8414 done
8415   done
8416 IFS=$as_save_IFS
8417 
8418   ;;
8419 esac
8420 fi
8421 LN=$ac_cv_path_LN
8422 if test -n "$LN"; then
8423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8424 $as_echo "$LN" >&6; }
8425 else
8426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8427 $as_echo "no" >&6; }
8428 fi
8429 
8430 
8431   test -n "$LN" && break
8432 done
8433 
8434   else
8435     # The variable is set, but is it from the command line or the environment?
8436 
8437     # Try to remove the string !LN! from our list.
8438     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8439     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8440       # If it failed, the variable was not from the command line. Ignore it,
8441       # but warn the user (except for BASH, which is always set by the calling BASH).
8442       if test "xLN" != xBASH; then
8443         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8444 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8445       fi
8446       # Try to locate tool using the code snippet
8447       for ac_prog in ln
8448 do
8449   # Extract the first word of "$ac_prog", so it can be a program name with args.
8450 set dummy $ac_prog; ac_word=$2
8451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8452 $as_echo_n "checking for $ac_word... " >&6; }
8453 if ${ac_cv_path_LN+:} false; then :
8454   $as_echo_n "(cached) " >&6
8455 else
8456   case $LN in
8457   [\\/]* | ?:[\\/]*)
8458   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8459   ;;
8460   *)
8461   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8462 for as_dir in $PATH
8463 do
8464   IFS=$as_save_IFS
8465   test -z "$as_dir" && as_dir=.
8466     for ac_exec_ext in '' $ac_executable_extensions; do
8467   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8468     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8469     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8470     break 2
8471   fi
8472 done
8473   done
8474 IFS=$as_save_IFS
8475 
8476   ;;
8477 esac
8478 fi
8479 LN=$ac_cv_path_LN
8480 if test -n "$LN"; then
8481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8482 $as_echo "$LN" >&6; }
8483 else
8484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8485 $as_echo "no" >&6; }
8486 fi
8487 
8488 
8489   test -n "$LN" && break
8490 done
8491 
8492     else
8493       # If it succeeded, then it was overridden by the user. We will use it
8494       # for the tool.
8495 
8496       # First remove it from the list of overridden variables, so we can test
8497       # for unknown variables in the end.
8498       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8499 
8500       # Check if we try to supply an empty value
8501       if test "x$LN" = x; then
8502         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8503 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8504         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8505 $as_echo_n "checking for LN... " >&6; }
8506         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8507 $as_echo "disabled" >&6; }
8508       else
8509         # Check if the provided tool contains a complete path.
8510         tool_specified="$LN"
8511         tool_basename="${tool_specified##*/}"
8512         if test "x$tool_basename" = "x$tool_specified"; then
8513           # A command without a complete path is provided, search $PATH.
8514           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8515 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8516           # Extract the first word of "$tool_basename", so it can be a program name with args.
8517 set dummy $tool_basename; ac_word=$2
8518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8519 $as_echo_n "checking for $ac_word... " >&6; }
8520 if ${ac_cv_path_LN+:} false; then :
8521   $as_echo_n "(cached) " >&6
8522 else
8523   case $LN in
8524   [\\/]* | ?:[\\/]*)
8525   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8526   ;;
8527   *)
8528   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8529 for as_dir in $PATH
8530 do
8531   IFS=$as_save_IFS
8532   test -z "$as_dir" && as_dir=.
8533     for ac_exec_ext in '' $ac_executable_extensions; do
8534   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8535     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8536     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8537     break 2
8538   fi
8539 done
8540   done
8541 IFS=$as_save_IFS
8542 
8543   ;;
8544 esac
8545 fi
8546 LN=$ac_cv_path_LN
8547 if test -n "$LN"; then
8548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8549 $as_echo "$LN" >&6; }
8550 else
8551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8552 $as_echo "no" >&6; }
8553 fi
8554 
8555 
8556           if test "x$LN" = x; then
8557             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8558           fi
8559         else
8560           # Otherwise we believe it is a complete path. Use it as it is.
8561           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8562 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8563           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8564 $as_echo_n "checking for LN... " >&6; }
8565           if test ! -x "$tool_specified"; then
8566             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8567 $as_echo "not found" >&6; }
8568             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8569           fi
8570           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8571 $as_echo "$tool_specified" >&6; }
8572         fi
8573       fi
8574     fi
8575 
8576   fi
8577 
8578 
8579 
8580   if test "x$LN" = x; then
8581     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8582   fi
8583 
8584 
8585 
8586 
8587 
8588   # Publish this variable in the help.
8589 
8590 
8591   if [ -z "${LS+x}" ]; then
8592     # The variable is not set by user, try to locate tool using the code snippet
8593     for ac_prog in ls
8594 do
8595   # Extract the first word of "$ac_prog", so it can be a program name with args.
8596 set dummy $ac_prog; ac_word=$2
8597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8598 $as_echo_n "checking for $ac_word... " >&6; }
8599 if ${ac_cv_path_LS+:} false; then :
8600   $as_echo_n "(cached) " >&6
8601 else
8602   case $LS in
8603   [\\/]* | ?:[\\/]*)
8604   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8605   ;;
8606   *)
8607   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8608 for as_dir in $PATH
8609 do
8610   IFS=$as_save_IFS
8611   test -z "$as_dir" && as_dir=.
8612     for ac_exec_ext in '' $ac_executable_extensions; do
8613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8614     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8616     break 2
8617   fi
8618 done
8619   done
8620 IFS=$as_save_IFS
8621 
8622   ;;
8623 esac
8624 fi
8625 LS=$ac_cv_path_LS
8626 if test -n "$LS"; then
8627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8628 $as_echo "$LS" >&6; }
8629 else
8630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8631 $as_echo "no" >&6; }
8632 fi
8633 
8634 
8635   test -n "$LS" && break
8636 done
8637 
8638   else
8639     # The variable is set, but is it from the command line or the environment?
8640 
8641     # Try to remove the string !LS! from our list.
8642     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8643     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8644       # If it failed, the variable was not from the command line. Ignore it,
8645       # but warn the user (except for BASH, which is always set by the calling BASH).
8646       if test "xLS" != xBASH; then
8647         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8648 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8649       fi
8650       # Try to locate tool using the code snippet
8651       for ac_prog in ls
8652 do
8653   # Extract the first word of "$ac_prog", so it can be a program name with args.
8654 set dummy $ac_prog; ac_word=$2
8655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8656 $as_echo_n "checking for $ac_word... " >&6; }
8657 if ${ac_cv_path_LS+:} false; then :
8658   $as_echo_n "(cached) " >&6
8659 else
8660   case $LS in
8661   [\\/]* | ?:[\\/]*)
8662   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8663   ;;
8664   *)
8665   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8666 for as_dir in $PATH
8667 do
8668   IFS=$as_save_IFS
8669   test -z "$as_dir" && as_dir=.
8670     for ac_exec_ext in '' $ac_executable_extensions; do
8671   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8672     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8673     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8674     break 2
8675   fi
8676 done
8677   done
8678 IFS=$as_save_IFS
8679 
8680   ;;
8681 esac
8682 fi
8683 LS=$ac_cv_path_LS
8684 if test -n "$LS"; then
8685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8686 $as_echo "$LS" >&6; }
8687 else
8688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8689 $as_echo "no" >&6; }
8690 fi
8691 
8692 
8693   test -n "$LS" && break
8694 done
8695 
8696     else
8697       # If it succeeded, then it was overridden by the user. We will use it
8698       # for the tool.
8699 
8700       # First remove it from the list of overridden variables, so we can test
8701       # for unknown variables in the end.
8702       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8703 
8704       # Check if we try to supply an empty value
8705       if test "x$LS" = x; then
8706         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8707 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8708         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8709 $as_echo_n "checking for LS... " >&6; }
8710         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8711 $as_echo "disabled" >&6; }
8712       else
8713         # Check if the provided tool contains a complete path.
8714         tool_specified="$LS"
8715         tool_basename="${tool_specified##*/}"
8716         if test "x$tool_basename" = "x$tool_specified"; then
8717           # A command without a complete path is provided, search $PATH.
8718           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8719 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8720           # Extract the first word of "$tool_basename", so it can be a program name with args.
8721 set dummy $tool_basename; ac_word=$2
8722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8723 $as_echo_n "checking for $ac_word... " >&6; }
8724 if ${ac_cv_path_LS+:} false; then :
8725   $as_echo_n "(cached) " >&6
8726 else
8727   case $LS in
8728   [\\/]* | ?:[\\/]*)
8729   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8730   ;;
8731   *)
8732   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8733 for as_dir in $PATH
8734 do
8735   IFS=$as_save_IFS
8736   test -z "$as_dir" && as_dir=.
8737     for ac_exec_ext in '' $ac_executable_extensions; do
8738   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8739     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8740     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8741     break 2
8742   fi
8743 done
8744   done
8745 IFS=$as_save_IFS
8746 
8747   ;;
8748 esac
8749 fi
8750 LS=$ac_cv_path_LS
8751 if test -n "$LS"; then
8752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8753 $as_echo "$LS" >&6; }
8754 else
8755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8756 $as_echo "no" >&6; }
8757 fi
8758 
8759 
8760           if test "x$LS" = x; then
8761             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8762           fi
8763         else
8764           # Otherwise we believe it is a complete path. Use it as it is.
8765           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8766 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8767           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8768 $as_echo_n "checking for LS... " >&6; }
8769           if test ! -x "$tool_specified"; then
8770             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8771 $as_echo "not found" >&6; }
8772             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8773           fi
8774           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8775 $as_echo "$tool_specified" >&6; }
8776         fi
8777       fi
8778     fi
8779 
8780   fi
8781 
8782 
8783 
8784   if test "x$LS" = x; then
8785     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8786   fi
8787 
8788 
8789 
8790 
8791 
8792   # Publish this variable in the help.
8793 
8794 
8795   if [ -z "${MKDIR+x}" ]; then
8796     # The variable is not set by user, try to locate tool using the code snippet
8797     for ac_prog in mkdir
8798 do
8799   # Extract the first word of "$ac_prog", so it can be a program name with args.
8800 set dummy $ac_prog; ac_word=$2
8801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8802 $as_echo_n "checking for $ac_word... " >&6; }
8803 if ${ac_cv_path_MKDIR+:} false; then :
8804   $as_echo_n "(cached) " >&6
8805 else
8806   case $MKDIR in
8807   [\\/]* | ?:[\\/]*)
8808   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8809   ;;
8810   *)
8811   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8812 for as_dir in $PATH
8813 do
8814   IFS=$as_save_IFS
8815   test -z "$as_dir" && as_dir=.
8816     for ac_exec_ext in '' $ac_executable_extensions; do
8817   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8818     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8819     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8820     break 2
8821   fi
8822 done
8823   done
8824 IFS=$as_save_IFS
8825 
8826   ;;
8827 esac
8828 fi
8829 MKDIR=$ac_cv_path_MKDIR
8830 if test -n "$MKDIR"; then
8831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8832 $as_echo "$MKDIR" >&6; }
8833 else
8834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8835 $as_echo "no" >&6; }
8836 fi
8837 
8838 
8839   test -n "$MKDIR" && break
8840 done
8841 
8842   else
8843     # The variable is set, but is it from the command line or the environment?
8844 
8845     # Try to remove the string !MKDIR! from our list.
8846     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8847     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8848       # If it failed, the variable was not from the command line. Ignore it,
8849       # but warn the user (except for BASH, which is always set by the calling BASH).
8850       if test "xMKDIR" != xBASH; then
8851         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8852 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8853       fi
8854       # Try to locate tool using the code snippet
8855       for ac_prog in mkdir
8856 do
8857   # Extract the first word of "$ac_prog", so it can be a program name with args.
8858 set dummy $ac_prog; ac_word=$2
8859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8860 $as_echo_n "checking for $ac_word... " >&6; }
8861 if ${ac_cv_path_MKDIR+:} false; then :
8862   $as_echo_n "(cached) " >&6
8863 else
8864   case $MKDIR in
8865   [\\/]* | ?:[\\/]*)
8866   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8867   ;;
8868   *)
8869   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8870 for as_dir in $PATH
8871 do
8872   IFS=$as_save_IFS
8873   test -z "$as_dir" && as_dir=.
8874     for ac_exec_ext in '' $ac_executable_extensions; do
8875   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8876     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8877     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8878     break 2
8879   fi
8880 done
8881   done
8882 IFS=$as_save_IFS
8883 
8884   ;;
8885 esac
8886 fi
8887 MKDIR=$ac_cv_path_MKDIR
8888 if test -n "$MKDIR"; then
8889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8890 $as_echo "$MKDIR" >&6; }
8891 else
8892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8893 $as_echo "no" >&6; }
8894 fi
8895 
8896 
8897   test -n "$MKDIR" && break
8898 done
8899 
8900     else
8901       # If it succeeded, then it was overridden by the user. We will use it
8902       # for the tool.
8903 
8904       # First remove it from the list of overridden variables, so we can test
8905       # for unknown variables in the end.
8906       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8907 
8908       # Check if we try to supply an empty value
8909       if test "x$MKDIR" = x; then
8910         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8911 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8912         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8913 $as_echo_n "checking for MKDIR... " >&6; }
8914         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8915 $as_echo "disabled" >&6; }
8916       else
8917         # Check if the provided tool contains a complete path.
8918         tool_specified="$MKDIR"
8919         tool_basename="${tool_specified##*/}"
8920         if test "x$tool_basename" = "x$tool_specified"; then
8921           # A command without a complete path is provided, search $PATH.
8922           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8923 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8924           # Extract the first word of "$tool_basename", so it can be a program name with args.
8925 set dummy $tool_basename; ac_word=$2
8926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8927 $as_echo_n "checking for $ac_word... " >&6; }
8928 if ${ac_cv_path_MKDIR+:} false; then :
8929   $as_echo_n "(cached) " >&6
8930 else
8931   case $MKDIR in
8932   [\\/]* | ?:[\\/]*)
8933   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8934   ;;
8935   *)
8936   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8937 for as_dir in $PATH
8938 do
8939   IFS=$as_save_IFS
8940   test -z "$as_dir" && as_dir=.
8941     for ac_exec_ext in '' $ac_executable_extensions; do
8942   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8943     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8944     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8945     break 2
8946   fi
8947 done
8948   done
8949 IFS=$as_save_IFS
8950 
8951   ;;
8952 esac
8953 fi
8954 MKDIR=$ac_cv_path_MKDIR
8955 if test -n "$MKDIR"; then
8956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8957 $as_echo "$MKDIR" >&6; }
8958 else
8959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8960 $as_echo "no" >&6; }
8961 fi
8962 
8963 
8964           if test "x$MKDIR" = x; then
8965             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8966           fi
8967         else
8968           # Otherwise we believe it is a complete path. Use it as it is.
8969           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8970 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8971           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8972 $as_echo_n "checking for MKDIR... " >&6; }
8973           if test ! -x "$tool_specified"; then
8974             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8975 $as_echo "not found" >&6; }
8976             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8977           fi
8978           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8979 $as_echo "$tool_specified" >&6; }
8980         fi
8981       fi
8982     fi
8983 
8984   fi
8985 
8986 
8987 
8988   if test "x$MKDIR" = x; then
8989     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8990   fi
8991 
8992 
8993 
8994 
8995 
8996   # Publish this variable in the help.
8997 
8998 
8999   if [ -z "${MKTEMP+x}" ]; then
9000     # The variable is not set by user, try to locate tool using the code snippet
9001     for ac_prog in mktemp
9002 do
9003   # Extract the first word of "$ac_prog", so it can be a program name with args.
9004 set dummy $ac_prog; ac_word=$2
9005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9006 $as_echo_n "checking for $ac_word... " >&6; }
9007 if ${ac_cv_path_MKTEMP+:} false; then :
9008   $as_echo_n "(cached) " >&6
9009 else
9010   case $MKTEMP in
9011   [\\/]* | ?:[\\/]*)
9012   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9013   ;;
9014   *)
9015   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9016 for as_dir in $PATH
9017 do
9018   IFS=$as_save_IFS
9019   test -z "$as_dir" && as_dir=.
9020     for ac_exec_ext in '' $ac_executable_extensions; do
9021   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9022     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9024     break 2
9025   fi
9026 done
9027   done
9028 IFS=$as_save_IFS
9029 
9030   ;;
9031 esac
9032 fi
9033 MKTEMP=$ac_cv_path_MKTEMP
9034 if test -n "$MKTEMP"; then
9035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9036 $as_echo "$MKTEMP" >&6; }
9037 else
9038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9039 $as_echo "no" >&6; }
9040 fi
9041 
9042 
9043   test -n "$MKTEMP" && break
9044 done
9045 
9046   else
9047     # The variable is set, but is it from the command line or the environment?
9048 
9049     # Try to remove the string !MKTEMP! from our list.
9050     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9051     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9052       # If it failed, the variable was not from the command line. Ignore it,
9053       # but warn the user (except for BASH, which is always set by the calling BASH).
9054       if test "xMKTEMP" != xBASH; then
9055         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9056 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9057       fi
9058       # Try to locate tool using the code snippet
9059       for ac_prog in mktemp
9060 do
9061   # Extract the first word of "$ac_prog", so it can be a program name with args.
9062 set dummy $ac_prog; ac_word=$2
9063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9064 $as_echo_n "checking for $ac_word... " >&6; }
9065 if ${ac_cv_path_MKTEMP+:} false; then :
9066   $as_echo_n "(cached) " >&6
9067 else
9068   case $MKTEMP in
9069   [\\/]* | ?:[\\/]*)
9070   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9071   ;;
9072   *)
9073   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9074 for as_dir in $PATH
9075 do
9076   IFS=$as_save_IFS
9077   test -z "$as_dir" && as_dir=.
9078     for ac_exec_ext in '' $ac_executable_extensions; do
9079   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9080     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9082     break 2
9083   fi
9084 done
9085   done
9086 IFS=$as_save_IFS
9087 
9088   ;;
9089 esac
9090 fi
9091 MKTEMP=$ac_cv_path_MKTEMP
9092 if test -n "$MKTEMP"; then
9093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9094 $as_echo "$MKTEMP" >&6; }
9095 else
9096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9097 $as_echo "no" >&6; }
9098 fi
9099 
9100 
9101   test -n "$MKTEMP" && break
9102 done
9103 
9104     else
9105       # If it succeeded, then it was overridden by the user. We will use it
9106       # for the tool.
9107 
9108       # First remove it from the list of overridden variables, so we can test
9109       # for unknown variables in the end.
9110       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9111 
9112       # Check if we try to supply an empty value
9113       if test "x$MKTEMP" = x; then
9114         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9115 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9116         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9117 $as_echo_n "checking for MKTEMP... " >&6; }
9118         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9119 $as_echo "disabled" >&6; }
9120       else
9121         # Check if the provided tool contains a complete path.
9122         tool_specified="$MKTEMP"
9123         tool_basename="${tool_specified##*/}"
9124         if test "x$tool_basename" = "x$tool_specified"; then
9125           # A command without a complete path is provided, search $PATH.
9126           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9127 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9128           # Extract the first word of "$tool_basename", so it can be a program name with args.
9129 set dummy $tool_basename; ac_word=$2
9130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9131 $as_echo_n "checking for $ac_word... " >&6; }
9132 if ${ac_cv_path_MKTEMP+:} false; then :
9133   $as_echo_n "(cached) " >&6
9134 else
9135   case $MKTEMP in
9136   [\\/]* | ?:[\\/]*)
9137   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9138   ;;
9139   *)
9140   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9141 for as_dir in $PATH
9142 do
9143   IFS=$as_save_IFS
9144   test -z "$as_dir" && as_dir=.
9145     for ac_exec_ext in '' $ac_executable_extensions; do
9146   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9147     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9148     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9149     break 2
9150   fi
9151 done
9152   done
9153 IFS=$as_save_IFS
9154 
9155   ;;
9156 esac
9157 fi
9158 MKTEMP=$ac_cv_path_MKTEMP
9159 if test -n "$MKTEMP"; then
9160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9161 $as_echo "$MKTEMP" >&6; }
9162 else
9163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9164 $as_echo "no" >&6; }
9165 fi
9166 
9167 
9168           if test "x$MKTEMP" = x; then
9169             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9170           fi
9171         else
9172           # Otherwise we believe it is a complete path. Use it as it is.
9173           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9174 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9175           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9176 $as_echo_n "checking for MKTEMP... " >&6; }
9177           if test ! -x "$tool_specified"; then
9178             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9179 $as_echo "not found" >&6; }
9180             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9181           fi
9182           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9183 $as_echo "$tool_specified" >&6; }
9184         fi
9185       fi
9186     fi
9187 
9188   fi
9189 
9190 
9191 
9192   if test "x$MKTEMP" = x; then
9193     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9194   fi
9195 
9196 
9197 
9198 
9199 
9200   # Publish this variable in the help.
9201 
9202 
9203   if [ -z "${MV+x}" ]; then
9204     # The variable is not set by user, try to locate tool using the code snippet
9205     for ac_prog in mv
9206 do
9207   # Extract the first word of "$ac_prog", so it can be a program name with args.
9208 set dummy $ac_prog; ac_word=$2
9209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9210 $as_echo_n "checking for $ac_word... " >&6; }
9211 if ${ac_cv_path_MV+:} false; then :
9212   $as_echo_n "(cached) " >&6
9213 else
9214   case $MV in
9215   [\\/]* | ?:[\\/]*)
9216   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9217   ;;
9218   *)
9219   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9220 for as_dir in $PATH
9221 do
9222   IFS=$as_save_IFS
9223   test -z "$as_dir" && as_dir=.
9224     for ac_exec_ext in '' $ac_executable_extensions; do
9225   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9226     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9227     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9228     break 2
9229   fi
9230 done
9231   done
9232 IFS=$as_save_IFS
9233 
9234   ;;
9235 esac
9236 fi
9237 MV=$ac_cv_path_MV
9238 if test -n "$MV"; then
9239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9240 $as_echo "$MV" >&6; }
9241 else
9242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9243 $as_echo "no" >&6; }
9244 fi
9245 
9246 
9247   test -n "$MV" && break
9248 done
9249 
9250   else
9251     # The variable is set, but is it from the command line or the environment?
9252 
9253     # Try to remove the string !MV! from our list.
9254     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9255     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9256       # If it failed, the variable was not from the command line. Ignore it,
9257       # but warn the user (except for BASH, which is always set by the calling BASH).
9258       if test "xMV" != xBASH; then
9259         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9260 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9261       fi
9262       # Try to locate tool using the code snippet
9263       for ac_prog in mv
9264 do
9265   # Extract the first word of "$ac_prog", so it can be a program name with args.
9266 set dummy $ac_prog; ac_word=$2
9267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9268 $as_echo_n "checking for $ac_word... " >&6; }
9269 if ${ac_cv_path_MV+:} false; then :
9270   $as_echo_n "(cached) " >&6
9271 else
9272   case $MV in
9273   [\\/]* | ?:[\\/]*)
9274   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9275   ;;
9276   *)
9277   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9278 for as_dir in $PATH
9279 do
9280   IFS=$as_save_IFS
9281   test -z "$as_dir" && as_dir=.
9282     for ac_exec_ext in '' $ac_executable_extensions; do
9283   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9284     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9285     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9286     break 2
9287   fi
9288 done
9289   done
9290 IFS=$as_save_IFS
9291 
9292   ;;
9293 esac
9294 fi
9295 MV=$ac_cv_path_MV
9296 if test -n "$MV"; then
9297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9298 $as_echo "$MV" >&6; }
9299 else
9300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9301 $as_echo "no" >&6; }
9302 fi
9303 
9304 
9305   test -n "$MV" && break
9306 done
9307 
9308     else
9309       # If it succeeded, then it was overridden by the user. We will use it
9310       # for the tool.
9311 
9312       # First remove it from the list of overridden variables, so we can test
9313       # for unknown variables in the end.
9314       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9315 
9316       # Check if we try to supply an empty value
9317       if test "x$MV" = x; then
9318         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9319 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9320         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9321 $as_echo_n "checking for MV... " >&6; }
9322         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9323 $as_echo "disabled" >&6; }
9324       else
9325         # Check if the provided tool contains a complete path.
9326         tool_specified="$MV"
9327         tool_basename="${tool_specified##*/}"
9328         if test "x$tool_basename" = "x$tool_specified"; then
9329           # A command without a complete path is provided, search $PATH.
9330           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9331 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9332           # Extract the first word of "$tool_basename", so it can be a program name with args.
9333 set dummy $tool_basename; ac_word=$2
9334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9335 $as_echo_n "checking for $ac_word... " >&6; }
9336 if ${ac_cv_path_MV+:} false; then :
9337   $as_echo_n "(cached) " >&6
9338 else
9339   case $MV in
9340   [\\/]* | ?:[\\/]*)
9341   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9342   ;;
9343   *)
9344   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9345 for as_dir in $PATH
9346 do
9347   IFS=$as_save_IFS
9348   test -z "$as_dir" && as_dir=.
9349     for ac_exec_ext in '' $ac_executable_extensions; do
9350   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9351     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9352     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9353     break 2
9354   fi
9355 done
9356   done
9357 IFS=$as_save_IFS
9358 
9359   ;;
9360 esac
9361 fi
9362 MV=$ac_cv_path_MV
9363 if test -n "$MV"; then
9364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9365 $as_echo "$MV" >&6; }
9366 else
9367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9368 $as_echo "no" >&6; }
9369 fi
9370 
9371 
9372           if test "x$MV" = x; then
9373             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9374           fi
9375         else
9376           # Otherwise we believe it is a complete path. Use it as it is.
9377           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9378 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9379           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9380 $as_echo_n "checking for MV... " >&6; }
9381           if test ! -x "$tool_specified"; then
9382             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9383 $as_echo "not found" >&6; }
9384             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9385           fi
9386           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9387 $as_echo "$tool_specified" >&6; }
9388         fi
9389       fi
9390     fi
9391 
9392   fi
9393 
9394 
9395 
9396   if test "x$MV" = x; then
9397     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9398   fi
9399 
9400 
9401 
9402 
9403 
9404   # Publish this variable in the help.
9405 
9406 
9407   if [ -z "${NAWK+x}" ]; then
9408     # The variable is not set by user, try to locate tool using the code snippet
9409     for ac_prog in nawk gawk awk
9410 do
9411   # Extract the first word of "$ac_prog", so it can be a program name with args.
9412 set dummy $ac_prog; ac_word=$2
9413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9414 $as_echo_n "checking for $ac_word... " >&6; }
9415 if ${ac_cv_path_NAWK+:} false; then :
9416   $as_echo_n "(cached) " >&6
9417 else
9418   case $NAWK in
9419   [\\/]* | ?:[\\/]*)
9420   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9421   ;;
9422   *)
9423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9424 for as_dir in $PATH
9425 do
9426   IFS=$as_save_IFS
9427   test -z "$as_dir" && as_dir=.
9428     for ac_exec_ext in '' $ac_executable_extensions; do
9429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9430     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9432     break 2
9433   fi
9434 done
9435   done
9436 IFS=$as_save_IFS
9437 
9438   ;;
9439 esac
9440 fi
9441 NAWK=$ac_cv_path_NAWK
9442 if test -n "$NAWK"; then
9443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9444 $as_echo "$NAWK" >&6; }
9445 else
9446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9447 $as_echo "no" >&6; }
9448 fi
9449 
9450 
9451   test -n "$NAWK" && break
9452 done
9453 
9454   else
9455     # The variable is set, but is it from the command line or the environment?
9456 
9457     # Try to remove the string !NAWK! from our list.
9458     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9459     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9460       # If it failed, the variable was not from the command line. Ignore it,
9461       # but warn the user (except for BASH, which is always set by the calling BASH).
9462       if test "xNAWK" != xBASH; then
9463         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9464 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9465       fi
9466       # Try to locate tool using the code snippet
9467       for ac_prog in nawk gawk awk
9468 do
9469   # Extract the first word of "$ac_prog", so it can be a program name with args.
9470 set dummy $ac_prog; ac_word=$2
9471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9472 $as_echo_n "checking for $ac_word... " >&6; }
9473 if ${ac_cv_path_NAWK+:} false; then :
9474   $as_echo_n "(cached) " >&6
9475 else
9476   case $NAWK in
9477   [\\/]* | ?:[\\/]*)
9478   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9479   ;;
9480   *)
9481   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9482 for as_dir in $PATH
9483 do
9484   IFS=$as_save_IFS
9485   test -z "$as_dir" && as_dir=.
9486     for ac_exec_ext in '' $ac_executable_extensions; do
9487   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9488     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9489     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9490     break 2
9491   fi
9492 done
9493   done
9494 IFS=$as_save_IFS
9495 
9496   ;;
9497 esac
9498 fi
9499 NAWK=$ac_cv_path_NAWK
9500 if test -n "$NAWK"; then
9501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9502 $as_echo "$NAWK" >&6; }
9503 else
9504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9505 $as_echo "no" >&6; }
9506 fi
9507 
9508 
9509   test -n "$NAWK" && break
9510 done
9511 
9512     else
9513       # If it succeeded, then it was overridden by the user. We will use it
9514       # for the tool.
9515 
9516       # First remove it from the list of overridden variables, so we can test
9517       # for unknown variables in the end.
9518       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9519 
9520       # Check if we try to supply an empty value
9521       if test "x$NAWK" = x; then
9522         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9523 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9524         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9525 $as_echo_n "checking for NAWK... " >&6; }
9526         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9527 $as_echo "disabled" >&6; }
9528       else
9529         # Check if the provided tool contains a complete path.
9530         tool_specified="$NAWK"
9531         tool_basename="${tool_specified##*/}"
9532         if test "x$tool_basename" = "x$tool_specified"; then
9533           # A command without a complete path is provided, search $PATH.
9534           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9535 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9536           # Extract the first word of "$tool_basename", so it can be a program name with args.
9537 set dummy $tool_basename; ac_word=$2
9538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9539 $as_echo_n "checking for $ac_word... " >&6; }
9540 if ${ac_cv_path_NAWK+:} false; then :
9541   $as_echo_n "(cached) " >&6
9542 else
9543   case $NAWK in
9544   [\\/]* | ?:[\\/]*)
9545   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9546   ;;
9547   *)
9548   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9549 for as_dir in $PATH
9550 do
9551   IFS=$as_save_IFS
9552   test -z "$as_dir" && as_dir=.
9553     for ac_exec_ext in '' $ac_executable_extensions; do
9554   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9555     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9556     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9557     break 2
9558   fi
9559 done
9560   done
9561 IFS=$as_save_IFS
9562 
9563   ;;
9564 esac
9565 fi
9566 NAWK=$ac_cv_path_NAWK
9567 if test -n "$NAWK"; then
9568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9569 $as_echo "$NAWK" >&6; }
9570 else
9571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9572 $as_echo "no" >&6; }
9573 fi
9574 
9575 
9576           if test "x$NAWK" = x; then
9577             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9578           fi
9579         else
9580           # Otherwise we believe it is a complete path. Use it as it is.
9581           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9582 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9583           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9584 $as_echo_n "checking for NAWK... " >&6; }
9585           if test ! -x "$tool_specified"; then
9586             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9587 $as_echo "not found" >&6; }
9588             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9589           fi
9590           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9591 $as_echo "$tool_specified" >&6; }
9592         fi
9593       fi
9594     fi
9595 
9596   fi
9597 
9598 
9599 
9600   if test "x$NAWK" = x; then
9601     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9602   fi
9603 
9604 
9605 
9606 
9607 
9608   # Publish this variable in the help.
9609 
9610 
9611   if [ -z "${PRINTF+x}" ]; then
9612     # The variable is not set by user, try to locate tool using the code snippet
9613     for ac_prog in printf
9614 do
9615   # Extract the first word of "$ac_prog", so it can be a program name with args.
9616 set dummy $ac_prog; ac_word=$2
9617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9618 $as_echo_n "checking for $ac_word... " >&6; }
9619 if ${ac_cv_path_PRINTF+:} false; then :
9620   $as_echo_n "(cached) " >&6
9621 else
9622   case $PRINTF in
9623   [\\/]* | ?:[\\/]*)
9624   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9625   ;;
9626   *)
9627   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9628 for as_dir in $PATH
9629 do
9630   IFS=$as_save_IFS
9631   test -z "$as_dir" && as_dir=.
9632     for ac_exec_ext in '' $ac_executable_extensions; do
9633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9634     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9636     break 2
9637   fi
9638 done
9639   done
9640 IFS=$as_save_IFS
9641 
9642   ;;
9643 esac
9644 fi
9645 PRINTF=$ac_cv_path_PRINTF
9646 if test -n "$PRINTF"; then
9647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9648 $as_echo "$PRINTF" >&6; }
9649 else
9650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9651 $as_echo "no" >&6; }
9652 fi
9653 
9654 
9655   test -n "$PRINTF" && break
9656 done
9657 
9658   else
9659     # The variable is set, but is it from the command line or the environment?
9660 
9661     # Try to remove the string !PRINTF! from our list.
9662     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9663     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9664       # If it failed, the variable was not from the command line. Ignore it,
9665       # but warn the user (except for BASH, which is always set by the calling BASH).
9666       if test "xPRINTF" != xBASH; then
9667         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9668 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9669       fi
9670       # Try to locate tool using the code snippet
9671       for ac_prog in printf
9672 do
9673   # Extract the first word of "$ac_prog", so it can be a program name with args.
9674 set dummy $ac_prog; ac_word=$2
9675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9676 $as_echo_n "checking for $ac_word... " >&6; }
9677 if ${ac_cv_path_PRINTF+:} false; then :
9678   $as_echo_n "(cached) " >&6
9679 else
9680   case $PRINTF in
9681   [\\/]* | ?:[\\/]*)
9682   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9683   ;;
9684   *)
9685   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9686 for as_dir in $PATH
9687 do
9688   IFS=$as_save_IFS
9689   test -z "$as_dir" && as_dir=.
9690     for ac_exec_ext in '' $ac_executable_extensions; do
9691   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9692     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9693     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9694     break 2
9695   fi
9696 done
9697   done
9698 IFS=$as_save_IFS
9699 
9700   ;;
9701 esac
9702 fi
9703 PRINTF=$ac_cv_path_PRINTF
9704 if test -n "$PRINTF"; then
9705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9706 $as_echo "$PRINTF" >&6; }
9707 else
9708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9709 $as_echo "no" >&6; }
9710 fi
9711 
9712 
9713   test -n "$PRINTF" && break
9714 done
9715 
9716     else
9717       # If it succeeded, then it was overridden by the user. We will use it
9718       # for the tool.
9719 
9720       # First remove it from the list of overridden variables, so we can test
9721       # for unknown variables in the end.
9722       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9723 
9724       # Check if we try to supply an empty value
9725       if test "x$PRINTF" = x; then
9726         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9727 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9728         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9729 $as_echo_n "checking for PRINTF... " >&6; }
9730         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9731 $as_echo "disabled" >&6; }
9732       else
9733         # Check if the provided tool contains a complete path.
9734         tool_specified="$PRINTF"
9735         tool_basename="${tool_specified##*/}"
9736         if test "x$tool_basename" = "x$tool_specified"; then
9737           # A command without a complete path is provided, search $PATH.
9738           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9739 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9740           # Extract the first word of "$tool_basename", so it can be a program name with args.
9741 set dummy $tool_basename; ac_word=$2
9742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9743 $as_echo_n "checking for $ac_word... " >&6; }
9744 if ${ac_cv_path_PRINTF+:} false; then :
9745   $as_echo_n "(cached) " >&6
9746 else
9747   case $PRINTF in
9748   [\\/]* | ?:[\\/]*)
9749   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9750   ;;
9751   *)
9752   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9753 for as_dir in $PATH
9754 do
9755   IFS=$as_save_IFS
9756   test -z "$as_dir" && as_dir=.
9757     for ac_exec_ext in '' $ac_executable_extensions; do
9758   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9759     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9760     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9761     break 2
9762   fi
9763 done
9764   done
9765 IFS=$as_save_IFS
9766 
9767   ;;
9768 esac
9769 fi
9770 PRINTF=$ac_cv_path_PRINTF
9771 if test -n "$PRINTF"; then
9772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9773 $as_echo "$PRINTF" >&6; }
9774 else
9775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9776 $as_echo "no" >&6; }
9777 fi
9778 
9779 
9780           if test "x$PRINTF" = x; then
9781             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9782           fi
9783         else
9784           # Otherwise we believe it is a complete path. Use it as it is.
9785           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9786 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9787           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9788 $as_echo_n "checking for PRINTF... " >&6; }
9789           if test ! -x "$tool_specified"; then
9790             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9791 $as_echo "not found" >&6; }
9792             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9793           fi
9794           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9795 $as_echo "$tool_specified" >&6; }
9796         fi
9797       fi
9798     fi
9799 
9800   fi
9801 
9802 
9803 
9804   if test "x$PRINTF" = x; then
9805     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9806   fi
9807 
9808 
9809 
9810 
9811 
9812   # Publish this variable in the help.
9813 
9814 
9815   if [ -z "${RM+x}" ]; then
9816     # The variable is not set by user, try to locate tool using the code snippet
9817     for ac_prog in rm
9818 do
9819   # Extract the first word of "$ac_prog", so it can be a program name with args.
9820 set dummy $ac_prog; ac_word=$2
9821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9822 $as_echo_n "checking for $ac_word... " >&6; }
9823 if ${ac_cv_path_RM+:} false; then :
9824   $as_echo_n "(cached) " >&6
9825 else
9826   case $RM in
9827   [\\/]* | ?:[\\/]*)
9828   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9829   ;;
9830   *)
9831   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9832 for as_dir in $PATH
9833 do
9834   IFS=$as_save_IFS
9835   test -z "$as_dir" && as_dir=.
9836     for ac_exec_ext in '' $ac_executable_extensions; do
9837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9838     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9840     break 2
9841   fi
9842 done
9843   done
9844 IFS=$as_save_IFS
9845 
9846   ;;
9847 esac
9848 fi
9849 RM=$ac_cv_path_RM
9850 if test -n "$RM"; then
9851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9852 $as_echo "$RM" >&6; }
9853 else
9854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9855 $as_echo "no" >&6; }
9856 fi
9857 
9858 
9859   test -n "$RM" && break
9860 done
9861 
9862   else
9863     # The variable is set, but is it from the command line or the environment?
9864 
9865     # Try to remove the string !RM! from our list.
9866     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9867     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9868       # If it failed, the variable was not from the command line. Ignore it,
9869       # but warn the user (except for BASH, which is always set by the calling BASH).
9870       if test "xRM" != xBASH; then
9871         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9872 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9873       fi
9874       # Try to locate tool using the code snippet
9875       for ac_prog in rm
9876 do
9877   # Extract the first word of "$ac_prog", so it can be a program name with args.
9878 set dummy $ac_prog; ac_word=$2
9879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9880 $as_echo_n "checking for $ac_word... " >&6; }
9881 if ${ac_cv_path_RM+:} false; then :
9882   $as_echo_n "(cached) " >&6
9883 else
9884   case $RM in
9885   [\\/]* | ?:[\\/]*)
9886   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9887   ;;
9888   *)
9889   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9890 for as_dir in $PATH
9891 do
9892   IFS=$as_save_IFS
9893   test -z "$as_dir" && as_dir=.
9894     for ac_exec_ext in '' $ac_executable_extensions; do
9895   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9896     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9897     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9898     break 2
9899   fi
9900 done
9901   done
9902 IFS=$as_save_IFS
9903 
9904   ;;
9905 esac
9906 fi
9907 RM=$ac_cv_path_RM
9908 if test -n "$RM"; then
9909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9910 $as_echo "$RM" >&6; }
9911 else
9912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9913 $as_echo "no" >&6; }
9914 fi
9915 
9916 
9917   test -n "$RM" && break
9918 done
9919 
9920     else
9921       # If it succeeded, then it was overridden by the user. We will use it
9922       # for the tool.
9923 
9924       # First remove it from the list of overridden variables, so we can test
9925       # for unknown variables in the end.
9926       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9927 
9928       # Check if we try to supply an empty value
9929       if test "x$RM" = x; then
9930         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9931 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9932         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9933 $as_echo_n "checking for RM... " >&6; }
9934         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9935 $as_echo "disabled" >&6; }
9936       else
9937         # Check if the provided tool contains a complete path.
9938         tool_specified="$RM"
9939         tool_basename="${tool_specified##*/}"
9940         if test "x$tool_basename" = "x$tool_specified"; then
9941           # A command without a complete path is provided, search $PATH.
9942           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9943 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9944           # Extract the first word of "$tool_basename", so it can be a program name with args.
9945 set dummy $tool_basename; ac_word=$2
9946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9947 $as_echo_n "checking for $ac_word... " >&6; }
9948 if ${ac_cv_path_RM+:} false; then :
9949   $as_echo_n "(cached) " >&6
9950 else
9951   case $RM in
9952   [\\/]* | ?:[\\/]*)
9953   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9954   ;;
9955   *)
9956   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9957 for as_dir in $PATH
9958 do
9959   IFS=$as_save_IFS
9960   test -z "$as_dir" && as_dir=.
9961     for ac_exec_ext in '' $ac_executable_extensions; do
9962   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9963     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9964     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9965     break 2
9966   fi
9967 done
9968   done
9969 IFS=$as_save_IFS
9970 
9971   ;;
9972 esac
9973 fi
9974 RM=$ac_cv_path_RM
9975 if test -n "$RM"; then
9976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9977 $as_echo "$RM" >&6; }
9978 else
9979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9980 $as_echo "no" >&6; }
9981 fi
9982 
9983 
9984           if test "x$RM" = x; then
9985             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9986           fi
9987         else
9988           # Otherwise we believe it is a complete path. Use it as it is.
9989           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9990 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9991           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9992 $as_echo_n "checking for RM... " >&6; }
9993           if test ! -x "$tool_specified"; then
9994             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9995 $as_echo "not found" >&6; }
9996             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9997           fi
9998           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9999 $as_echo "$tool_specified" >&6; }
10000         fi
10001       fi
10002     fi
10003 
10004   fi
10005 
10006 
10007 
10008   if test "x$RM" = x; then
10009     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10010   fi
10011 
10012 
10013 
10014 
10015 
10016   # Publish this variable in the help.
10017 
10018 
10019   if [ -z "${RMDIR+x}" ]; then
10020     # The variable is not set by user, try to locate tool using the code snippet
10021     for ac_prog in rmdir
10022 do
10023   # Extract the first word of "$ac_prog", so it can be a program name with args.
10024 set dummy $ac_prog; ac_word=$2
10025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10026 $as_echo_n "checking for $ac_word... " >&6; }
10027 if ${ac_cv_path_RMDIR+:} false; then :
10028   $as_echo_n "(cached) " >&6
10029 else
10030   case $RMDIR in
10031   [\\/]* | ?:[\\/]*)
10032   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10033   ;;
10034   *)
10035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10036 for as_dir in $PATH
10037 do
10038   IFS=$as_save_IFS
10039   test -z "$as_dir" && as_dir=.
10040     for ac_exec_ext in '' $ac_executable_extensions; do
10041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10042     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10044     break 2
10045   fi
10046 done
10047   done
10048 IFS=$as_save_IFS
10049 
10050   ;;
10051 esac
10052 fi
10053 RMDIR=$ac_cv_path_RMDIR
10054 if test -n "$RMDIR"; then
10055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10056 $as_echo "$RMDIR" >&6; }
10057 else
10058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10059 $as_echo "no" >&6; }
10060 fi
10061 
10062 
10063   test -n "$RMDIR" && break
10064 done
10065 
10066   else
10067     # The variable is set, but is it from the command line or the environment?
10068 
10069     # Try to remove the string !RMDIR! from our list.
10070     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10071     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10072       # If it failed, the variable was not from the command line. Ignore it,
10073       # but warn the user (except for BASH, which is always set by the calling BASH).
10074       if test "xRMDIR" != xBASH; then
10075         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10076 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10077       fi
10078       # Try to locate tool using the code snippet
10079       for ac_prog in rmdir
10080 do
10081   # Extract the first word of "$ac_prog", so it can be a program name with args.
10082 set dummy $ac_prog; ac_word=$2
10083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10084 $as_echo_n "checking for $ac_word... " >&6; }
10085 if ${ac_cv_path_RMDIR+:} false; then :
10086   $as_echo_n "(cached) " >&6
10087 else
10088   case $RMDIR in
10089   [\\/]* | ?:[\\/]*)
10090   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10091   ;;
10092   *)
10093   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10094 for as_dir in $PATH
10095 do
10096   IFS=$as_save_IFS
10097   test -z "$as_dir" && as_dir=.
10098     for ac_exec_ext in '' $ac_executable_extensions; do
10099   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10100     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10101     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10102     break 2
10103   fi
10104 done
10105   done
10106 IFS=$as_save_IFS
10107 
10108   ;;
10109 esac
10110 fi
10111 RMDIR=$ac_cv_path_RMDIR
10112 if test -n "$RMDIR"; then
10113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10114 $as_echo "$RMDIR" >&6; }
10115 else
10116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10117 $as_echo "no" >&6; }
10118 fi
10119 
10120 
10121   test -n "$RMDIR" && break
10122 done
10123 
10124     else
10125       # If it succeeded, then it was overridden by the user. We will use it
10126       # for the tool.
10127 
10128       # First remove it from the list of overridden variables, so we can test
10129       # for unknown variables in the end.
10130       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10131 
10132       # Check if we try to supply an empty value
10133       if test "x$RMDIR" = x; then
10134         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10135 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10136         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10137 $as_echo_n "checking for RMDIR... " >&6; }
10138         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10139 $as_echo "disabled" >&6; }
10140       else
10141         # Check if the provided tool contains a complete path.
10142         tool_specified="$RMDIR"
10143         tool_basename="${tool_specified##*/}"
10144         if test "x$tool_basename" = "x$tool_specified"; then
10145           # A command without a complete path is provided, search $PATH.
10146           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10147 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10148           # Extract the first word of "$tool_basename", so it can be a program name with args.
10149 set dummy $tool_basename; ac_word=$2
10150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10151 $as_echo_n "checking for $ac_word... " >&6; }
10152 if ${ac_cv_path_RMDIR+:} false; then :
10153   $as_echo_n "(cached) " >&6
10154 else
10155   case $RMDIR in
10156   [\\/]* | ?:[\\/]*)
10157   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10158   ;;
10159   *)
10160   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10161 for as_dir in $PATH
10162 do
10163   IFS=$as_save_IFS
10164   test -z "$as_dir" && as_dir=.
10165     for ac_exec_ext in '' $ac_executable_extensions; do
10166   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10167     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10168     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10169     break 2
10170   fi
10171 done
10172   done
10173 IFS=$as_save_IFS
10174 
10175   ;;
10176 esac
10177 fi
10178 RMDIR=$ac_cv_path_RMDIR
10179 if test -n "$RMDIR"; then
10180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10181 $as_echo "$RMDIR" >&6; }
10182 else
10183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10184 $as_echo "no" >&6; }
10185 fi
10186 
10187 
10188           if test "x$RMDIR" = x; then
10189             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10190           fi
10191         else
10192           # Otherwise we believe it is a complete path. Use it as it is.
10193           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10194 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10195           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10196 $as_echo_n "checking for RMDIR... " >&6; }
10197           if test ! -x "$tool_specified"; then
10198             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10199 $as_echo "not found" >&6; }
10200             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10201           fi
10202           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10203 $as_echo "$tool_specified" >&6; }
10204         fi
10205       fi
10206     fi
10207 
10208   fi
10209 
10210 
10211 
10212   if test "x$RMDIR" = x; then
10213     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10214   fi
10215 
10216 
10217 
10218 
10219 
10220   # Publish this variable in the help.
10221 
10222 
10223   if [ -z "${SH+x}" ]; then
10224     # The variable is not set by user, try to locate tool using the code snippet
10225     for ac_prog in sh
10226 do
10227   # Extract the first word of "$ac_prog", so it can be a program name with args.
10228 set dummy $ac_prog; ac_word=$2
10229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10230 $as_echo_n "checking for $ac_word... " >&6; }
10231 if ${ac_cv_path_SH+:} false; then :
10232   $as_echo_n "(cached) " >&6
10233 else
10234   case $SH in
10235   [\\/]* | ?:[\\/]*)
10236   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10237   ;;
10238   *)
10239   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10240 for as_dir in $PATH
10241 do
10242   IFS=$as_save_IFS
10243   test -z "$as_dir" && as_dir=.
10244     for ac_exec_ext in '' $ac_executable_extensions; do
10245   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10246     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10247     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10248     break 2
10249   fi
10250 done
10251   done
10252 IFS=$as_save_IFS
10253 
10254   ;;
10255 esac
10256 fi
10257 SH=$ac_cv_path_SH
10258 if test -n "$SH"; then
10259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10260 $as_echo "$SH" >&6; }
10261 else
10262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10263 $as_echo "no" >&6; }
10264 fi
10265 
10266 
10267   test -n "$SH" && break
10268 done
10269 
10270   else
10271     # The variable is set, but is it from the command line or the environment?
10272 
10273     # Try to remove the string !SH! from our list.
10274     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10275     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10276       # If it failed, the variable was not from the command line. Ignore it,
10277       # but warn the user (except for BASH, which is always set by the calling BASH).
10278       if test "xSH" != xBASH; then
10279         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10280 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10281       fi
10282       # Try to locate tool using the code snippet
10283       for ac_prog in sh
10284 do
10285   # Extract the first word of "$ac_prog", so it can be a program name with args.
10286 set dummy $ac_prog; ac_word=$2
10287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10288 $as_echo_n "checking for $ac_word... " >&6; }
10289 if ${ac_cv_path_SH+:} false; then :
10290   $as_echo_n "(cached) " >&6
10291 else
10292   case $SH in
10293   [\\/]* | ?:[\\/]*)
10294   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10295   ;;
10296   *)
10297   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10298 for as_dir in $PATH
10299 do
10300   IFS=$as_save_IFS
10301   test -z "$as_dir" && as_dir=.
10302     for ac_exec_ext in '' $ac_executable_extensions; do
10303   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10304     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10305     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10306     break 2
10307   fi
10308 done
10309   done
10310 IFS=$as_save_IFS
10311 
10312   ;;
10313 esac
10314 fi
10315 SH=$ac_cv_path_SH
10316 if test -n "$SH"; then
10317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10318 $as_echo "$SH" >&6; }
10319 else
10320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10321 $as_echo "no" >&6; }
10322 fi
10323 
10324 
10325   test -n "$SH" && break
10326 done
10327 
10328     else
10329       # If it succeeded, then it was overridden by the user. We will use it
10330       # for the tool.
10331 
10332       # First remove it from the list of overridden variables, so we can test
10333       # for unknown variables in the end.
10334       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10335 
10336       # Check if we try to supply an empty value
10337       if test "x$SH" = x; then
10338         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10339 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10340         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10341 $as_echo_n "checking for SH... " >&6; }
10342         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10343 $as_echo "disabled" >&6; }
10344       else
10345         # Check if the provided tool contains a complete path.
10346         tool_specified="$SH"
10347         tool_basename="${tool_specified##*/}"
10348         if test "x$tool_basename" = "x$tool_specified"; then
10349           # A command without a complete path is provided, search $PATH.
10350           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10351 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10352           # Extract the first word of "$tool_basename", so it can be a program name with args.
10353 set dummy $tool_basename; ac_word=$2
10354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10355 $as_echo_n "checking for $ac_word... " >&6; }
10356 if ${ac_cv_path_SH+:} false; then :
10357   $as_echo_n "(cached) " >&6
10358 else
10359   case $SH in
10360   [\\/]* | ?:[\\/]*)
10361   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10362   ;;
10363   *)
10364   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10365 for as_dir in $PATH
10366 do
10367   IFS=$as_save_IFS
10368   test -z "$as_dir" && as_dir=.
10369     for ac_exec_ext in '' $ac_executable_extensions; do
10370   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10371     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10372     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10373     break 2
10374   fi
10375 done
10376   done
10377 IFS=$as_save_IFS
10378 
10379   ;;
10380 esac
10381 fi
10382 SH=$ac_cv_path_SH
10383 if test -n "$SH"; then
10384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10385 $as_echo "$SH" >&6; }
10386 else
10387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10388 $as_echo "no" >&6; }
10389 fi
10390 
10391 
10392           if test "x$SH" = x; then
10393             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10394           fi
10395         else
10396           # Otherwise we believe it is a complete path. Use it as it is.
10397           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10398 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10399           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10400 $as_echo_n "checking for SH... " >&6; }
10401           if test ! -x "$tool_specified"; then
10402             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10403 $as_echo "not found" >&6; }
10404             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10405           fi
10406           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10407 $as_echo "$tool_specified" >&6; }
10408         fi
10409       fi
10410     fi
10411 
10412   fi
10413 
10414 
10415 
10416   if test "x$SH" = x; then
10417     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10418   fi
10419 
10420 
10421 
10422 
10423 
10424   # Publish this variable in the help.
10425 
10426 
10427   if [ -z "${SORT+x}" ]; then
10428     # The variable is not set by user, try to locate tool using the code snippet
10429     for ac_prog in sort
10430 do
10431   # Extract the first word of "$ac_prog", so it can be a program name with args.
10432 set dummy $ac_prog; ac_word=$2
10433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10434 $as_echo_n "checking for $ac_word... " >&6; }
10435 if ${ac_cv_path_SORT+:} false; then :
10436   $as_echo_n "(cached) " >&6
10437 else
10438   case $SORT in
10439   [\\/]* | ?:[\\/]*)
10440   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10441   ;;
10442   *)
10443   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10444 for as_dir in $PATH
10445 do
10446   IFS=$as_save_IFS
10447   test -z "$as_dir" && as_dir=.
10448     for ac_exec_ext in '' $ac_executable_extensions; do
10449   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10450     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10452     break 2
10453   fi
10454 done
10455   done
10456 IFS=$as_save_IFS
10457 
10458   ;;
10459 esac
10460 fi
10461 SORT=$ac_cv_path_SORT
10462 if test -n "$SORT"; then
10463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10464 $as_echo "$SORT" >&6; }
10465 else
10466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10467 $as_echo "no" >&6; }
10468 fi
10469 
10470 
10471   test -n "$SORT" && break
10472 done
10473 
10474   else
10475     # The variable is set, but is it from the command line or the environment?
10476 
10477     # Try to remove the string !SORT! from our list.
10478     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10479     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10480       # If it failed, the variable was not from the command line. Ignore it,
10481       # but warn the user (except for BASH, which is always set by the calling BASH).
10482       if test "xSORT" != xBASH; then
10483         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10484 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10485       fi
10486       # Try to locate tool using the code snippet
10487       for ac_prog in sort
10488 do
10489   # Extract the first word of "$ac_prog", so it can be a program name with args.
10490 set dummy $ac_prog; ac_word=$2
10491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10492 $as_echo_n "checking for $ac_word... " >&6; }
10493 if ${ac_cv_path_SORT+:} false; then :
10494   $as_echo_n "(cached) " >&6
10495 else
10496   case $SORT in
10497   [\\/]* | ?:[\\/]*)
10498   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10499   ;;
10500   *)
10501   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10502 for as_dir in $PATH
10503 do
10504   IFS=$as_save_IFS
10505   test -z "$as_dir" && as_dir=.
10506     for ac_exec_ext in '' $ac_executable_extensions; do
10507   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10508     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10510     break 2
10511   fi
10512 done
10513   done
10514 IFS=$as_save_IFS
10515 
10516   ;;
10517 esac
10518 fi
10519 SORT=$ac_cv_path_SORT
10520 if test -n "$SORT"; then
10521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10522 $as_echo "$SORT" >&6; }
10523 else
10524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10525 $as_echo "no" >&6; }
10526 fi
10527 
10528 
10529   test -n "$SORT" && break
10530 done
10531 
10532     else
10533       # If it succeeded, then it was overridden by the user. We will use it
10534       # for the tool.
10535 
10536       # First remove it from the list of overridden variables, so we can test
10537       # for unknown variables in the end.
10538       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10539 
10540       # Check if we try to supply an empty value
10541       if test "x$SORT" = x; then
10542         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10543 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10544         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10545 $as_echo_n "checking for SORT... " >&6; }
10546         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10547 $as_echo "disabled" >&6; }
10548       else
10549         # Check if the provided tool contains a complete path.
10550         tool_specified="$SORT"
10551         tool_basename="${tool_specified##*/}"
10552         if test "x$tool_basename" = "x$tool_specified"; then
10553           # A command without a complete path is provided, search $PATH.
10554           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10555 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10556           # Extract the first word of "$tool_basename", so it can be a program name with args.
10557 set dummy $tool_basename; ac_word=$2
10558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10559 $as_echo_n "checking for $ac_word... " >&6; }
10560 if ${ac_cv_path_SORT+:} false; then :
10561   $as_echo_n "(cached) " >&6
10562 else
10563   case $SORT in
10564   [\\/]* | ?:[\\/]*)
10565   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10566   ;;
10567   *)
10568   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10569 for as_dir in $PATH
10570 do
10571   IFS=$as_save_IFS
10572   test -z "$as_dir" && as_dir=.
10573     for ac_exec_ext in '' $ac_executable_extensions; do
10574   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10575     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10576     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10577     break 2
10578   fi
10579 done
10580   done
10581 IFS=$as_save_IFS
10582 
10583   ;;
10584 esac
10585 fi
10586 SORT=$ac_cv_path_SORT
10587 if test -n "$SORT"; then
10588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10589 $as_echo "$SORT" >&6; }
10590 else
10591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10592 $as_echo "no" >&6; }
10593 fi
10594 
10595 
10596           if test "x$SORT" = x; then
10597             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10598           fi
10599         else
10600           # Otherwise we believe it is a complete path. Use it as it is.
10601           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10602 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10603           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10604 $as_echo_n "checking for SORT... " >&6; }
10605           if test ! -x "$tool_specified"; then
10606             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10607 $as_echo "not found" >&6; }
10608             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10609           fi
10610           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10611 $as_echo "$tool_specified" >&6; }
10612         fi
10613       fi
10614     fi
10615 
10616   fi
10617 
10618 
10619 
10620   if test "x$SORT" = x; then
10621     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10622   fi
10623 
10624 
10625 
10626 
10627 
10628   # Publish this variable in the help.
10629 
10630 
10631   if [ -z "${TAIL+x}" ]; then
10632     # The variable is not set by user, try to locate tool using the code snippet
10633     for ac_prog in tail
10634 do
10635   # Extract the first word of "$ac_prog", so it can be a program name with args.
10636 set dummy $ac_prog; ac_word=$2
10637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10638 $as_echo_n "checking for $ac_word... " >&6; }
10639 if ${ac_cv_path_TAIL+:} false; then :
10640   $as_echo_n "(cached) " >&6
10641 else
10642   case $TAIL in
10643   [\\/]* | ?:[\\/]*)
10644   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10645   ;;
10646   *)
10647   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10648 for as_dir in $PATH
10649 do
10650   IFS=$as_save_IFS
10651   test -z "$as_dir" && as_dir=.
10652     for ac_exec_ext in '' $ac_executable_extensions; do
10653   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10654     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10655     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10656     break 2
10657   fi
10658 done
10659   done
10660 IFS=$as_save_IFS
10661 
10662   ;;
10663 esac
10664 fi
10665 TAIL=$ac_cv_path_TAIL
10666 if test -n "$TAIL"; then
10667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10668 $as_echo "$TAIL" >&6; }
10669 else
10670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10671 $as_echo "no" >&6; }
10672 fi
10673 
10674 
10675   test -n "$TAIL" && break
10676 done
10677 
10678   else
10679     # The variable is set, but is it from the command line or the environment?
10680 
10681     # Try to remove the string !TAIL! from our list.
10682     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10683     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10684       # If it failed, the variable was not from the command line. Ignore it,
10685       # but warn the user (except for BASH, which is always set by the calling BASH).
10686       if test "xTAIL" != xBASH; then
10687         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10688 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10689       fi
10690       # Try to locate tool using the code snippet
10691       for ac_prog in tail
10692 do
10693   # Extract the first word of "$ac_prog", so it can be a program name with args.
10694 set dummy $ac_prog; ac_word=$2
10695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10696 $as_echo_n "checking for $ac_word... " >&6; }
10697 if ${ac_cv_path_TAIL+:} false; then :
10698   $as_echo_n "(cached) " >&6
10699 else
10700   case $TAIL in
10701   [\\/]* | ?:[\\/]*)
10702   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10703   ;;
10704   *)
10705   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10706 for as_dir in $PATH
10707 do
10708   IFS=$as_save_IFS
10709   test -z "$as_dir" && as_dir=.
10710     for ac_exec_ext in '' $ac_executable_extensions; do
10711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10712     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10714     break 2
10715   fi
10716 done
10717   done
10718 IFS=$as_save_IFS
10719 
10720   ;;
10721 esac
10722 fi
10723 TAIL=$ac_cv_path_TAIL
10724 if test -n "$TAIL"; then
10725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10726 $as_echo "$TAIL" >&6; }
10727 else
10728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10729 $as_echo "no" >&6; }
10730 fi
10731 
10732 
10733   test -n "$TAIL" && break
10734 done
10735 
10736     else
10737       # If it succeeded, then it was overridden by the user. We will use it
10738       # for the tool.
10739 
10740       # First remove it from the list of overridden variables, so we can test
10741       # for unknown variables in the end.
10742       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10743 
10744       # Check if we try to supply an empty value
10745       if test "x$TAIL" = x; then
10746         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10747 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10748         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10749 $as_echo_n "checking for TAIL... " >&6; }
10750         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10751 $as_echo "disabled" >&6; }
10752       else
10753         # Check if the provided tool contains a complete path.
10754         tool_specified="$TAIL"
10755         tool_basename="${tool_specified##*/}"
10756         if test "x$tool_basename" = "x$tool_specified"; then
10757           # A command without a complete path is provided, search $PATH.
10758           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10759 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10760           # Extract the first word of "$tool_basename", so it can be a program name with args.
10761 set dummy $tool_basename; ac_word=$2
10762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10763 $as_echo_n "checking for $ac_word... " >&6; }
10764 if ${ac_cv_path_TAIL+:} false; then :
10765   $as_echo_n "(cached) " >&6
10766 else
10767   case $TAIL in
10768   [\\/]* | ?:[\\/]*)
10769   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10770   ;;
10771   *)
10772   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10773 for as_dir in $PATH
10774 do
10775   IFS=$as_save_IFS
10776   test -z "$as_dir" && as_dir=.
10777     for ac_exec_ext in '' $ac_executable_extensions; do
10778   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10779     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10780     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10781     break 2
10782   fi
10783 done
10784   done
10785 IFS=$as_save_IFS
10786 
10787   ;;
10788 esac
10789 fi
10790 TAIL=$ac_cv_path_TAIL
10791 if test -n "$TAIL"; then
10792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10793 $as_echo "$TAIL" >&6; }
10794 else
10795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10796 $as_echo "no" >&6; }
10797 fi
10798 
10799 
10800           if test "x$TAIL" = x; then
10801             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10802           fi
10803         else
10804           # Otherwise we believe it is a complete path. Use it as it is.
10805           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10806 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10807           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10808 $as_echo_n "checking for TAIL... " >&6; }
10809           if test ! -x "$tool_specified"; then
10810             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10811 $as_echo "not found" >&6; }
10812             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10813           fi
10814           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10815 $as_echo "$tool_specified" >&6; }
10816         fi
10817       fi
10818     fi
10819 
10820   fi
10821 
10822 
10823 
10824   if test "x$TAIL" = x; then
10825     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10826   fi
10827 
10828 
10829 
10830 
10831 
10832   # Publish this variable in the help.
10833 
10834 
10835   if [ -z "${TAR+x}" ]; then
10836     # The variable is not set by user, try to locate tool using the code snippet
10837     for ac_prog in tar
10838 do
10839   # Extract the first word of "$ac_prog", so it can be a program name with args.
10840 set dummy $ac_prog; ac_word=$2
10841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10842 $as_echo_n "checking for $ac_word... " >&6; }
10843 if ${ac_cv_path_TAR+:} false; then :
10844   $as_echo_n "(cached) " >&6
10845 else
10846   case $TAR in
10847   [\\/]* | ?:[\\/]*)
10848   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10849   ;;
10850   *)
10851   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10852 for as_dir in $PATH
10853 do
10854   IFS=$as_save_IFS
10855   test -z "$as_dir" && as_dir=.
10856     for ac_exec_ext in '' $ac_executable_extensions; do
10857   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10858     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10859     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10860     break 2
10861   fi
10862 done
10863   done
10864 IFS=$as_save_IFS
10865 
10866   ;;
10867 esac
10868 fi
10869 TAR=$ac_cv_path_TAR
10870 if test -n "$TAR"; then
10871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10872 $as_echo "$TAR" >&6; }
10873 else
10874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10875 $as_echo "no" >&6; }
10876 fi
10877 
10878 
10879   test -n "$TAR" && break
10880 done
10881 
10882   else
10883     # The variable is set, but is it from the command line or the environment?
10884 
10885     # Try to remove the string !TAR! from our list.
10886     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10887     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10888       # If it failed, the variable was not from the command line. Ignore it,
10889       # but warn the user (except for BASH, which is always set by the calling BASH).
10890       if test "xTAR" != xBASH; then
10891         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10892 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10893       fi
10894       # Try to locate tool using the code snippet
10895       for ac_prog in tar
10896 do
10897   # Extract the first word of "$ac_prog", so it can be a program name with args.
10898 set dummy $ac_prog; ac_word=$2
10899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10900 $as_echo_n "checking for $ac_word... " >&6; }
10901 if ${ac_cv_path_TAR+:} false; then :
10902   $as_echo_n "(cached) " >&6
10903 else
10904   case $TAR in
10905   [\\/]* | ?:[\\/]*)
10906   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10907   ;;
10908   *)
10909   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10910 for as_dir in $PATH
10911 do
10912   IFS=$as_save_IFS
10913   test -z "$as_dir" && as_dir=.
10914     for ac_exec_ext in '' $ac_executable_extensions; do
10915   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10916     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10917     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10918     break 2
10919   fi
10920 done
10921   done
10922 IFS=$as_save_IFS
10923 
10924   ;;
10925 esac
10926 fi
10927 TAR=$ac_cv_path_TAR
10928 if test -n "$TAR"; then
10929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10930 $as_echo "$TAR" >&6; }
10931 else
10932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10933 $as_echo "no" >&6; }
10934 fi
10935 
10936 
10937   test -n "$TAR" && break
10938 done
10939 
10940     else
10941       # If it succeeded, then it was overridden by the user. We will use it
10942       # for the tool.
10943 
10944       # First remove it from the list of overridden variables, so we can test
10945       # for unknown variables in the end.
10946       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10947 
10948       # Check if we try to supply an empty value
10949       if test "x$TAR" = x; then
10950         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10951 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10952         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10953 $as_echo_n "checking for TAR... " >&6; }
10954         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10955 $as_echo "disabled" >&6; }
10956       else
10957         # Check if the provided tool contains a complete path.
10958         tool_specified="$TAR"
10959         tool_basename="${tool_specified##*/}"
10960         if test "x$tool_basename" = "x$tool_specified"; then
10961           # A command without a complete path is provided, search $PATH.
10962           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10963 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10964           # Extract the first word of "$tool_basename", so it can be a program name with args.
10965 set dummy $tool_basename; ac_word=$2
10966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10967 $as_echo_n "checking for $ac_word... " >&6; }
10968 if ${ac_cv_path_TAR+:} false; then :
10969   $as_echo_n "(cached) " >&6
10970 else
10971   case $TAR in
10972   [\\/]* | ?:[\\/]*)
10973   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10974   ;;
10975   *)
10976   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10977 for as_dir in $PATH
10978 do
10979   IFS=$as_save_IFS
10980   test -z "$as_dir" && as_dir=.
10981     for ac_exec_ext in '' $ac_executable_extensions; do
10982   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10983     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10984     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10985     break 2
10986   fi
10987 done
10988   done
10989 IFS=$as_save_IFS
10990 
10991   ;;
10992 esac
10993 fi
10994 TAR=$ac_cv_path_TAR
10995 if test -n "$TAR"; then
10996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10997 $as_echo "$TAR" >&6; }
10998 else
10999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11000 $as_echo "no" >&6; }
11001 fi
11002 
11003 
11004           if test "x$TAR" = x; then
11005             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11006           fi
11007         else
11008           # Otherwise we believe it is a complete path. Use it as it is.
11009           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11010 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11011           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11012 $as_echo_n "checking for TAR... " >&6; }
11013           if test ! -x "$tool_specified"; then
11014             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11015 $as_echo "not found" >&6; }
11016             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11017           fi
11018           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11019 $as_echo "$tool_specified" >&6; }
11020         fi
11021       fi
11022     fi
11023 
11024   fi
11025 
11026 
11027 
11028   if test "x$TAR" = x; then
11029     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11030   fi
11031 
11032 
11033 
11034 
11035 
11036   # Publish this variable in the help.
11037 
11038 
11039   if [ -z "${TEE+x}" ]; then
11040     # The variable is not set by user, try to locate tool using the code snippet
11041     for ac_prog in tee
11042 do
11043   # Extract the first word of "$ac_prog", so it can be a program name with args.
11044 set dummy $ac_prog; ac_word=$2
11045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11046 $as_echo_n "checking for $ac_word... " >&6; }
11047 if ${ac_cv_path_TEE+:} false; then :
11048   $as_echo_n "(cached) " >&6
11049 else
11050   case $TEE in
11051   [\\/]* | ?:[\\/]*)
11052   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11053   ;;
11054   *)
11055   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11056 for as_dir in $PATH
11057 do
11058   IFS=$as_save_IFS
11059   test -z "$as_dir" && as_dir=.
11060     for ac_exec_ext in '' $ac_executable_extensions; do
11061   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11062     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11063     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11064     break 2
11065   fi
11066 done
11067   done
11068 IFS=$as_save_IFS
11069 
11070   ;;
11071 esac
11072 fi
11073 TEE=$ac_cv_path_TEE
11074 if test -n "$TEE"; then
11075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11076 $as_echo "$TEE" >&6; }
11077 else
11078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11079 $as_echo "no" >&6; }
11080 fi
11081 
11082 
11083   test -n "$TEE" && break
11084 done
11085 
11086   else
11087     # The variable is set, but is it from the command line or the environment?
11088 
11089     # Try to remove the string !TEE! from our list.
11090     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11091     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11092       # If it failed, the variable was not from the command line. Ignore it,
11093       # but warn the user (except for BASH, which is always set by the calling BASH).
11094       if test "xTEE" != xBASH; then
11095         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11096 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11097       fi
11098       # Try to locate tool using the code snippet
11099       for ac_prog in tee
11100 do
11101   # Extract the first word of "$ac_prog", so it can be a program name with args.
11102 set dummy $ac_prog; ac_word=$2
11103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11104 $as_echo_n "checking for $ac_word... " >&6; }
11105 if ${ac_cv_path_TEE+:} false; then :
11106   $as_echo_n "(cached) " >&6
11107 else
11108   case $TEE in
11109   [\\/]* | ?:[\\/]*)
11110   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11111   ;;
11112   *)
11113   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11114 for as_dir in $PATH
11115 do
11116   IFS=$as_save_IFS
11117   test -z "$as_dir" && as_dir=.
11118     for ac_exec_ext in '' $ac_executable_extensions; do
11119   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11120     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11122     break 2
11123   fi
11124 done
11125   done
11126 IFS=$as_save_IFS
11127 
11128   ;;
11129 esac
11130 fi
11131 TEE=$ac_cv_path_TEE
11132 if test -n "$TEE"; then
11133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11134 $as_echo "$TEE" >&6; }
11135 else
11136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11137 $as_echo "no" >&6; }
11138 fi
11139 
11140 
11141   test -n "$TEE" && break
11142 done
11143 
11144     else
11145       # If it succeeded, then it was overridden by the user. We will use it
11146       # for the tool.
11147 
11148       # First remove it from the list of overridden variables, so we can test
11149       # for unknown variables in the end.
11150       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11151 
11152       # Check if we try to supply an empty value
11153       if test "x$TEE" = x; then
11154         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11155 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11156         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11157 $as_echo_n "checking for TEE... " >&6; }
11158         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11159 $as_echo "disabled" >&6; }
11160       else
11161         # Check if the provided tool contains a complete path.
11162         tool_specified="$TEE"
11163         tool_basename="${tool_specified##*/}"
11164         if test "x$tool_basename" = "x$tool_specified"; then
11165           # A command without a complete path is provided, search $PATH.
11166           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11167 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11168           # Extract the first word of "$tool_basename", so it can be a program name with args.
11169 set dummy $tool_basename; ac_word=$2
11170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11171 $as_echo_n "checking for $ac_word... " >&6; }
11172 if ${ac_cv_path_TEE+:} false; then :
11173   $as_echo_n "(cached) " >&6
11174 else
11175   case $TEE in
11176   [\\/]* | ?:[\\/]*)
11177   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11178   ;;
11179   *)
11180   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11181 for as_dir in $PATH
11182 do
11183   IFS=$as_save_IFS
11184   test -z "$as_dir" && as_dir=.
11185     for ac_exec_ext in '' $ac_executable_extensions; do
11186   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11187     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11188     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11189     break 2
11190   fi
11191 done
11192   done
11193 IFS=$as_save_IFS
11194 
11195   ;;
11196 esac
11197 fi
11198 TEE=$ac_cv_path_TEE
11199 if test -n "$TEE"; then
11200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11201 $as_echo "$TEE" >&6; }
11202 else
11203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11204 $as_echo "no" >&6; }
11205 fi
11206 
11207 
11208           if test "x$TEE" = x; then
11209             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11210           fi
11211         else
11212           # Otherwise we believe it is a complete path. Use it as it is.
11213           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11214 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11215           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11216 $as_echo_n "checking for TEE... " >&6; }
11217           if test ! -x "$tool_specified"; then
11218             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11219 $as_echo "not found" >&6; }
11220             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11221           fi
11222           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11223 $as_echo "$tool_specified" >&6; }
11224         fi
11225       fi
11226     fi
11227 
11228   fi
11229 
11230 
11231 
11232   if test "x$TEE" = x; then
11233     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11234   fi
11235 
11236 
11237 
11238 
11239 
11240   # Publish this variable in the help.
11241 
11242 
11243   if [ -z "${TOUCH+x}" ]; then
11244     # The variable is not set by user, try to locate tool using the code snippet
11245     for ac_prog in touch
11246 do
11247   # Extract the first word of "$ac_prog", so it can be a program name with args.
11248 set dummy $ac_prog; ac_word=$2
11249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11250 $as_echo_n "checking for $ac_word... " >&6; }
11251 if ${ac_cv_path_TOUCH+:} false; then :
11252   $as_echo_n "(cached) " >&6
11253 else
11254   case $TOUCH in
11255   [\\/]* | ?:[\\/]*)
11256   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11257   ;;
11258   *)
11259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11260 for as_dir in $PATH
11261 do
11262   IFS=$as_save_IFS
11263   test -z "$as_dir" && as_dir=.
11264     for ac_exec_ext in '' $ac_executable_extensions; do
11265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11266     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11268     break 2
11269   fi
11270 done
11271   done
11272 IFS=$as_save_IFS
11273 
11274   ;;
11275 esac
11276 fi
11277 TOUCH=$ac_cv_path_TOUCH
11278 if test -n "$TOUCH"; then
11279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11280 $as_echo "$TOUCH" >&6; }
11281 else
11282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11283 $as_echo "no" >&6; }
11284 fi
11285 
11286 
11287   test -n "$TOUCH" && break
11288 done
11289 
11290   else
11291     # The variable is set, but is it from the command line or the environment?
11292 
11293     # Try to remove the string !TOUCH! from our list.
11294     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11295     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11296       # If it failed, the variable was not from the command line. Ignore it,
11297       # but warn the user (except for BASH, which is always set by the calling BASH).
11298       if test "xTOUCH" != xBASH; then
11299         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11300 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11301       fi
11302       # Try to locate tool using the code snippet
11303       for ac_prog in touch
11304 do
11305   # Extract the first word of "$ac_prog", so it can be a program name with args.
11306 set dummy $ac_prog; ac_word=$2
11307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11308 $as_echo_n "checking for $ac_word... " >&6; }
11309 if ${ac_cv_path_TOUCH+:} false; then :
11310   $as_echo_n "(cached) " >&6
11311 else
11312   case $TOUCH in
11313   [\\/]* | ?:[\\/]*)
11314   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11315   ;;
11316   *)
11317   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11318 for as_dir in $PATH
11319 do
11320   IFS=$as_save_IFS
11321   test -z "$as_dir" && as_dir=.
11322     for ac_exec_ext in '' $ac_executable_extensions; do
11323   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11324     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11325     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11326     break 2
11327   fi
11328 done
11329   done
11330 IFS=$as_save_IFS
11331 
11332   ;;
11333 esac
11334 fi
11335 TOUCH=$ac_cv_path_TOUCH
11336 if test -n "$TOUCH"; then
11337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11338 $as_echo "$TOUCH" >&6; }
11339 else
11340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11341 $as_echo "no" >&6; }
11342 fi
11343 
11344 
11345   test -n "$TOUCH" && break
11346 done
11347 
11348     else
11349       # If it succeeded, then it was overridden by the user. We will use it
11350       # for the tool.
11351 
11352       # First remove it from the list of overridden variables, so we can test
11353       # for unknown variables in the end.
11354       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11355 
11356       # Check if we try to supply an empty value
11357       if test "x$TOUCH" = x; then
11358         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11359 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11360         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11361 $as_echo_n "checking for TOUCH... " >&6; }
11362         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11363 $as_echo "disabled" >&6; }
11364       else
11365         # Check if the provided tool contains a complete path.
11366         tool_specified="$TOUCH"
11367         tool_basename="${tool_specified##*/}"
11368         if test "x$tool_basename" = "x$tool_specified"; then
11369           # A command without a complete path is provided, search $PATH.
11370           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11371 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11372           # Extract the first word of "$tool_basename", so it can be a program name with args.
11373 set dummy $tool_basename; ac_word=$2
11374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11375 $as_echo_n "checking for $ac_word... " >&6; }
11376 if ${ac_cv_path_TOUCH+:} false; then :
11377   $as_echo_n "(cached) " >&6
11378 else
11379   case $TOUCH in
11380   [\\/]* | ?:[\\/]*)
11381   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11382   ;;
11383   *)
11384   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11385 for as_dir in $PATH
11386 do
11387   IFS=$as_save_IFS
11388   test -z "$as_dir" && as_dir=.
11389     for ac_exec_ext in '' $ac_executable_extensions; do
11390   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11391     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11392     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11393     break 2
11394   fi
11395 done
11396   done
11397 IFS=$as_save_IFS
11398 
11399   ;;
11400 esac
11401 fi
11402 TOUCH=$ac_cv_path_TOUCH
11403 if test -n "$TOUCH"; then
11404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11405 $as_echo "$TOUCH" >&6; }
11406 else
11407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11408 $as_echo "no" >&6; }
11409 fi
11410 
11411 
11412           if test "x$TOUCH" = x; then
11413             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11414           fi
11415         else
11416           # Otherwise we believe it is a complete path. Use it as it is.
11417           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11418 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11419           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11420 $as_echo_n "checking for TOUCH... " >&6; }
11421           if test ! -x "$tool_specified"; then
11422             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11423 $as_echo "not found" >&6; }
11424             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11425           fi
11426           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11427 $as_echo "$tool_specified" >&6; }
11428         fi
11429       fi
11430     fi
11431 
11432   fi
11433 
11434 
11435 
11436   if test "x$TOUCH" = x; then
11437     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11438   fi
11439 
11440 
11441 
11442 
11443 
11444   # Publish this variable in the help.
11445 
11446 
11447   if [ -z "${TR+x}" ]; then
11448     # The variable is not set by user, try to locate tool using the code snippet
11449     for ac_prog in tr
11450 do
11451   # Extract the first word of "$ac_prog", so it can be a program name with args.
11452 set dummy $ac_prog; ac_word=$2
11453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11454 $as_echo_n "checking for $ac_word... " >&6; }
11455 if ${ac_cv_path_TR+:} false; then :
11456   $as_echo_n "(cached) " >&6
11457 else
11458   case $TR in
11459   [\\/]* | ?:[\\/]*)
11460   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11461   ;;
11462   *)
11463   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11464 for as_dir in $PATH
11465 do
11466   IFS=$as_save_IFS
11467   test -z "$as_dir" && as_dir=.
11468     for ac_exec_ext in '' $ac_executable_extensions; do
11469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11470     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11472     break 2
11473   fi
11474 done
11475   done
11476 IFS=$as_save_IFS
11477 
11478   ;;
11479 esac
11480 fi
11481 TR=$ac_cv_path_TR
11482 if test -n "$TR"; then
11483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11484 $as_echo "$TR" >&6; }
11485 else
11486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11487 $as_echo "no" >&6; }
11488 fi
11489 
11490 
11491   test -n "$TR" && break
11492 done
11493 
11494   else
11495     # The variable is set, but is it from the command line or the environment?
11496 
11497     # Try to remove the string !TR! from our list.
11498     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11499     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11500       # If it failed, the variable was not from the command line. Ignore it,
11501       # but warn the user (except for BASH, which is always set by the calling BASH).
11502       if test "xTR" != xBASH; then
11503         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11504 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11505       fi
11506       # Try to locate tool using the code snippet
11507       for ac_prog in tr
11508 do
11509   # Extract the first word of "$ac_prog", so it can be a program name with args.
11510 set dummy $ac_prog; ac_word=$2
11511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11512 $as_echo_n "checking for $ac_word... " >&6; }
11513 if ${ac_cv_path_TR+:} false; then :
11514   $as_echo_n "(cached) " >&6
11515 else
11516   case $TR in
11517   [\\/]* | ?:[\\/]*)
11518   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11519   ;;
11520   *)
11521   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11522 for as_dir in $PATH
11523 do
11524   IFS=$as_save_IFS
11525   test -z "$as_dir" && as_dir=.
11526     for ac_exec_ext in '' $ac_executable_extensions; do
11527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11528     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11530     break 2
11531   fi
11532 done
11533   done
11534 IFS=$as_save_IFS
11535 
11536   ;;
11537 esac
11538 fi
11539 TR=$ac_cv_path_TR
11540 if test -n "$TR"; then
11541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11542 $as_echo "$TR" >&6; }
11543 else
11544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11545 $as_echo "no" >&6; }
11546 fi
11547 
11548 
11549   test -n "$TR" && break
11550 done
11551 
11552     else
11553       # If it succeeded, then it was overridden by the user. We will use it
11554       # for the tool.
11555 
11556       # First remove it from the list of overridden variables, so we can test
11557       # for unknown variables in the end.
11558       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11559 
11560       # Check if we try to supply an empty value
11561       if test "x$TR" = x; then
11562         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11563 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11564         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11565 $as_echo_n "checking for TR... " >&6; }
11566         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11567 $as_echo "disabled" >&6; }
11568       else
11569         # Check if the provided tool contains a complete path.
11570         tool_specified="$TR"
11571         tool_basename="${tool_specified##*/}"
11572         if test "x$tool_basename" = "x$tool_specified"; then
11573           # A command without a complete path is provided, search $PATH.
11574           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11575 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11576           # Extract the first word of "$tool_basename", so it can be a program name with args.
11577 set dummy $tool_basename; ac_word=$2
11578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11579 $as_echo_n "checking for $ac_word... " >&6; }
11580 if ${ac_cv_path_TR+:} false; then :
11581   $as_echo_n "(cached) " >&6
11582 else
11583   case $TR in
11584   [\\/]* | ?:[\\/]*)
11585   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11586   ;;
11587   *)
11588   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11589 for as_dir in $PATH
11590 do
11591   IFS=$as_save_IFS
11592   test -z "$as_dir" && as_dir=.
11593     for ac_exec_ext in '' $ac_executable_extensions; do
11594   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11595     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11596     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11597     break 2
11598   fi
11599 done
11600   done
11601 IFS=$as_save_IFS
11602 
11603   ;;
11604 esac
11605 fi
11606 TR=$ac_cv_path_TR
11607 if test -n "$TR"; then
11608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11609 $as_echo "$TR" >&6; }
11610 else
11611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11612 $as_echo "no" >&6; }
11613 fi
11614 
11615 
11616           if test "x$TR" = x; then
11617             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11618           fi
11619         else
11620           # Otherwise we believe it is a complete path. Use it as it is.
11621           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11622 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11623           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11624 $as_echo_n "checking for TR... " >&6; }
11625           if test ! -x "$tool_specified"; then
11626             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11627 $as_echo "not found" >&6; }
11628             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11629           fi
11630           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11631 $as_echo "$tool_specified" >&6; }
11632         fi
11633       fi
11634     fi
11635 
11636   fi
11637 
11638 
11639 
11640   if test "x$TR" = x; then
11641     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11642   fi
11643 
11644 
11645 
11646 
11647 
11648   # Publish this variable in the help.
11649 
11650 
11651   if [ -z "${UNAME+x}" ]; then
11652     # The variable is not set by user, try to locate tool using the code snippet
11653     for ac_prog in uname
11654 do
11655   # Extract the first word of "$ac_prog", so it can be a program name with args.
11656 set dummy $ac_prog; ac_word=$2
11657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11658 $as_echo_n "checking for $ac_word... " >&6; }
11659 if ${ac_cv_path_UNAME+:} false; then :
11660   $as_echo_n "(cached) " >&6
11661 else
11662   case $UNAME in
11663   [\\/]* | ?:[\\/]*)
11664   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11665   ;;
11666   *)
11667   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11668 for as_dir in $PATH
11669 do
11670   IFS=$as_save_IFS
11671   test -z "$as_dir" && as_dir=.
11672     for ac_exec_ext in '' $ac_executable_extensions; do
11673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11674     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11676     break 2
11677   fi
11678 done
11679   done
11680 IFS=$as_save_IFS
11681 
11682   ;;
11683 esac
11684 fi
11685 UNAME=$ac_cv_path_UNAME
11686 if test -n "$UNAME"; then
11687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11688 $as_echo "$UNAME" >&6; }
11689 else
11690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11691 $as_echo "no" >&6; }
11692 fi
11693 
11694 
11695   test -n "$UNAME" && break
11696 done
11697 
11698   else
11699     # The variable is set, but is it from the command line or the environment?
11700 
11701     # Try to remove the string !UNAME! from our list.
11702     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11703     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11704       # If it failed, the variable was not from the command line. Ignore it,
11705       # but warn the user (except for BASH, which is always set by the calling BASH).
11706       if test "xUNAME" != xBASH; then
11707         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11708 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11709       fi
11710       # Try to locate tool using the code snippet
11711       for ac_prog in uname
11712 do
11713   # Extract the first word of "$ac_prog", so it can be a program name with args.
11714 set dummy $ac_prog; ac_word=$2
11715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11716 $as_echo_n "checking for $ac_word... " >&6; }
11717 if ${ac_cv_path_UNAME+:} false; then :
11718   $as_echo_n "(cached) " >&6
11719 else
11720   case $UNAME in
11721   [\\/]* | ?:[\\/]*)
11722   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11723   ;;
11724   *)
11725   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11726 for as_dir in $PATH
11727 do
11728   IFS=$as_save_IFS
11729   test -z "$as_dir" && as_dir=.
11730     for ac_exec_ext in '' $ac_executable_extensions; do
11731   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11732     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11733     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11734     break 2
11735   fi
11736 done
11737   done
11738 IFS=$as_save_IFS
11739 
11740   ;;
11741 esac
11742 fi
11743 UNAME=$ac_cv_path_UNAME
11744 if test -n "$UNAME"; then
11745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11746 $as_echo "$UNAME" >&6; }
11747 else
11748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11749 $as_echo "no" >&6; }
11750 fi
11751 
11752 
11753   test -n "$UNAME" && break
11754 done
11755 
11756     else
11757       # If it succeeded, then it was overridden by the user. We will use it
11758       # for the tool.
11759 
11760       # First remove it from the list of overridden variables, so we can test
11761       # for unknown variables in the end.
11762       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11763 
11764       # Check if we try to supply an empty value
11765       if test "x$UNAME" = x; then
11766         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11767 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11768         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11769 $as_echo_n "checking for UNAME... " >&6; }
11770         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11771 $as_echo "disabled" >&6; }
11772       else
11773         # Check if the provided tool contains a complete path.
11774         tool_specified="$UNAME"
11775         tool_basename="${tool_specified##*/}"
11776         if test "x$tool_basename" = "x$tool_specified"; then
11777           # A command without a complete path is provided, search $PATH.
11778           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11779 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11780           # Extract the first word of "$tool_basename", so it can be a program name with args.
11781 set dummy $tool_basename; ac_word=$2
11782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11783 $as_echo_n "checking for $ac_word... " >&6; }
11784 if ${ac_cv_path_UNAME+:} false; then :
11785   $as_echo_n "(cached) " >&6
11786 else
11787   case $UNAME in
11788   [\\/]* | ?:[\\/]*)
11789   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11790   ;;
11791   *)
11792   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11793 for as_dir in $PATH
11794 do
11795   IFS=$as_save_IFS
11796   test -z "$as_dir" && as_dir=.
11797     for ac_exec_ext in '' $ac_executable_extensions; do
11798   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11799     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11800     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11801     break 2
11802   fi
11803 done
11804   done
11805 IFS=$as_save_IFS
11806 
11807   ;;
11808 esac
11809 fi
11810 UNAME=$ac_cv_path_UNAME
11811 if test -n "$UNAME"; then
11812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11813 $as_echo "$UNAME" >&6; }
11814 else
11815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11816 $as_echo "no" >&6; }
11817 fi
11818 
11819 
11820           if test "x$UNAME" = x; then
11821             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11822           fi
11823         else
11824           # Otherwise we believe it is a complete path. Use it as it is.
11825           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11826 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11827           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11828 $as_echo_n "checking for UNAME... " >&6; }
11829           if test ! -x "$tool_specified"; then
11830             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11831 $as_echo "not found" >&6; }
11832             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11833           fi
11834           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11835 $as_echo "$tool_specified" >&6; }
11836         fi
11837       fi
11838     fi
11839 
11840   fi
11841 
11842 
11843 
11844   if test "x$UNAME" = x; then
11845     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11846   fi
11847 
11848 
11849 
11850 
11851 
11852   # Publish this variable in the help.
11853 
11854 
11855   if [ -z "${UNIQ+x}" ]; then
11856     # The variable is not set by user, try to locate tool using the code snippet
11857     for ac_prog in uniq
11858 do
11859   # Extract the first word of "$ac_prog", so it can be a program name with args.
11860 set dummy $ac_prog; ac_word=$2
11861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11862 $as_echo_n "checking for $ac_word... " >&6; }
11863 if ${ac_cv_path_UNIQ+:} false; then :
11864   $as_echo_n "(cached) " >&6
11865 else
11866   case $UNIQ in
11867   [\\/]* | ?:[\\/]*)
11868   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11869   ;;
11870   *)
11871   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11872 for as_dir in $PATH
11873 do
11874   IFS=$as_save_IFS
11875   test -z "$as_dir" && as_dir=.
11876     for ac_exec_ext in '' $ac_executable_extensions; do
11877   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11878     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11879     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11880     break 2
11881   fi
11882 done
11883   done
11884 IFS=$as_save_IFS
11885 
11886   ;;
11887 esac
11888 fi
11889 UNIQ=$ac_cv_path_UNIQ
11890 if test -n "$UNIQ"; then
11891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11892 $as_echo "$UNIQ" >&6; }
11893 else
11894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11895 $as_echo "no" >&6; }
11896 fi
11897 
11898 
11899   test -n "$UNIQ" && break
11900 done
11901 
11902   else
11903     # The variable is set, but is it from the command line or the environment?
11904 
11905     # Try to remove the string !UNIQ! from our list.
11906     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11907     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11908       # If it failed, the variable was not from the command line. Ignore it,
11909       # but warn the user (except for BASH, which is always set by the calling BASH).
11910       if test "xUNIQ" != xBASH; then
11911         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11912 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11913       fi
11914       # Try to locate tool using the code snippet
11915       for ac_prog in uniq
11916 do
11917   # Extract the first word of "$ac_prog", so it can be a program name with args.
11918 set dummy $ac_prog; ac_word=$2
11919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11920 $as_echo_n "checking for $ac_word... " >&6; }
11921 if ${ac_cv_path_UNIQ+:} false; then :
11922   $as_echo_n "(cached) " >&6
11923 else
11924   case $UNIQ in
11925   [\\/]* | ?:[\\/]*)
11926   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11927   ;;
11928   *)
11929   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11930 for as_dir in $PATH
11931 do
11932   IFS=$as_save_IFS
11933   test -z "$as_dir" && as_dir=.
11934     for ac_exec_ext in '' $ac_executable_extensions; do
11935   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11936     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11937     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11938     break 2
11939   fi
11940 done
11941   done
11942 IFS=$as_save_IFS
11943 
11944   ;;
11945 esac
11946 fi
11947 UNIQ=$ac_cv_path_UNIQ
11948 if test -n "$UNIQ"; then
11949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11950 $as_echo "$UNIQ" >&6; }
11951 else
11952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11953 $as_echo "no" >&6; }
11954 fi
11955 
11956 
11957   test -n "$UNIQ" && break
11958 done
11959 
11960     else
11961       # If it succeeded, then it was overridden by the user. We will use it
11962       # for the tool.
11963 
11964       # First remove it from the list of overridden variables, so we can test
11965       # for unknown variables in the end.
11966       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11967 
11968       # Check if we try to supply an empty value
11969       if test "x$UNIQ" = x; then
11970         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11971 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11972         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11973 $as_echo_n "checking for UNIQ... " >&6; }
11974         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11975 $as_echo "disabled" >&6; }
11976       else
11977         # Check if the provided tool contains a complete path.
11978         tool_specified="$UNIQ"
11979         tool_basename="${tool_specified##*/}"
11980         if test "x$tool_basename" = "x$tool_specified"; then
11981           # A command without a complete path is provided, search $PATH.
11982           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11983 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11984           # Extract the first word of "$tool_basename", so it can be a program name with args.
11985 set dummy $tool_basename; ac_word=$2
11986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11987 $as_echo_n "checking for $ac_word... " >&6; }
11988 if ${ac_cv_path_UNIQ+:} false; then :
11989   $as_echo_n "(cached) " >&6
11990 else
11991   case $UNIQ in
11992   [\\/]* | ?:[\\/]*)
11993   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11994   ;;
11995   *)
11996   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11997 for as_dir in $PATH
11998 do
11999   IFS=$as_save_IFS
12000   test -z "$as_dir" && as_dir=.
12001     for ac_exec_ext in '' $ac_executable_extensions; do
12002   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12003     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12004     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12005     break 2
12006   fi
12007 done
12008   done
12009 IFS=$as_save_IFS
12010 
12011   ;;
12012 esac
12013 fi
12014 UNIQ=$ac_cv_path_UNIQ
12015 if test -n "$UNIQ"; then
12016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12017 $as_echo "$UNIQ" >&6; }
12018 else
12019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12020 $as_echo "no" >&6; }
12021 fi
12022 
12023 
12024           if test "x$UNIQ" = x; then
12025             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12026           fi
12027         else
12028           # Otherwise we believe it is a complete path. Use it as it is.
12029           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12030 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12031           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12032 $as_echo_n "checking for UNIQ... " >&6; }
12033           if test ! -x "$tool_specified"; then
12034             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12035 $as_echo "not found" >&6; }
12036             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12037           fi
12038           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12039 $as_echo "$tool_specified" >&6; }
12040         fi
12041       fi
12042     fi
12043 
12044   fi
12045 
12046 
12047 
12048   if test "x$UNIQ" = x; then
12049     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12050   fi
12051 
12052 
12053 
12054 
12055 
12056   # Publish this variable in the help.
12057 
12058 
12059   if [ -z "${WC+x}" ]; then
12060     # The variable is not set by user, try to locate tool using the code snippet
12061     for ac_prog in wc
12062 do
12063   # Extract the first word of "$ac_prog", so it can be a program name with args.
12064 set dummy $ac_prog; ac_word=$2
12065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12066 $as_echo_n "checking for $ac_word... " >&6; }
12067 if ${ac_cv_path_WC+:} false; then :
12068   $as_echo_n "(cached) " >&6
12069 else
12070   case $WC in
12071   [\\/]* | ?:[\\/]*)
12072   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12073   ;;
12074   *)
12075   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12076 for as_dir in $PATH
12077 do
12078   IFS=$as_save_IFS
12079   test -z "$as_dir" && as_dir=.
12080     for ac_exec_ext in '' $ac_executable_extensions; do
12081   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12082     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12083     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12084     break 2
12085   fi
12086 done
12087   done
12088 IFS=$as_save_IFS
12089 
12090   ;;
12091 esac
12092 fi
12093 WC=$ac_cv_path_WC
12094 if test -n "$WC"; then
12095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12096 $as_echo "$WC" >&6; }
12097 else
12098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12099 $as_echo "no" >&6; }
12100 fi
12101 
12102 
12103   test -n "$WC" && break
12104 done
12105 
12106   else
12107     # The variable is set, but is it from the command line or the environment?
12108 
12109     # Try to remove the string !WC! from our list.
12110     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12111     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12112       # If it failed, the variable was not from the command line. Ignore it,
12113       # but warn the user (except for BASH, which is always set by the calling BASH).
12114       if test "xWC" != xBASH; then
12115         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12116 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12117       fi
12118       # Try to locate tool using the code snippet
12119       for ac_prog in wc
12120 do
12121   # Extract the first word of "$ac_prog", so it can be a program name with args.
12122 set dummy $ac_prog; ac_word=$2
12123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12124 $as_echo_n "checking for $ac_word... " >&6; }
12125 if ${ac_cv_path_WC+:} false; then :
12126   $as_echo_n "(cached) " >&6
12127 else
12128   case $WC in
12129   [\\/]* | ?:[\\/]*)
12130   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12131   ;;
12132   *)
12133   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12134 for as_dir in $PATH
12135 do
12136   IFS=$as_save_IFS
12137   test -z "$as_dir" && as_dir=.
12138     for ac_exec_ext in '' $ac_executable_extensions; do
12139   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12140     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12141     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12142     break 2
12143   fi
12144 done
12145   done
12146 IFS=$as_save_IFS
12147 
12148   ;;
12149 esac
12150 fi
12151 WC=$ac_cv_path_WC
12152 if test -n "$WC"; then
12153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12154 $as_echo "$WC" >&6; }
12155 else
12156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12157 $as_echo "no" >&6; }
12158 fi
12159 
12160 
12161   test -n "$WC" && break
12162 done
12163 
12164     else
12165       # If it succeeded, then it was overridden by the user. We will use it
12166       # for the tool.
12167 
12168       # First remove it from the list of overridden variables, so we can test
12169       # for unknown variables in the end.
12170       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12171 
12172       # Check if we try to supply an empty value
12173       if test "x$WC" = x; then
12174         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12175 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12176         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12177 $as_echo_n "checking for WC... " >&6; }
12178         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12179 $as_echo "disabled" >&6; }
12180       else
12181         # Check if the provided tool contains a complete path.
12182         tool_specified="$WC"
12183         tool_basename="${tool_specified##*/}"
12184         if test "x$tool_basename" = "x$tool_specified"; then
12185           # A command without a complete path is provided, search $PATH.
12186           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12187 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12188           # Extract the first word of "$tool_basename", so it can be a program name with args.
12189 set dummy $tool_basename; ac_word=$2
12190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12191 $as_echo_n "checking for $ac_word... " >&6; }
12192 if ${ac_cv_path_WC+:} false; then :
12193   $as_echo_n "(cached) " >&6
12194 else
12195   case $WC in
12196   [\\/]* | ?:[\\/]*)
12197   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12198   ;;
12199   *)
12200   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12201 for as_dir in $PATH
12202 do
12203   IFS=$as_save_IFS
12204   test -z "$as_dir" && as_dir=.
12205     for ac_exec_ext in '' $ac_executable_extensions; do
12206   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12207     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12208     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12209     break 2
12210   fi
12211 done
12212   done
12213 IFS=$as_save_IFS
12214 
12215   ;;
12216 esac
12217 fi
12218 WC=$ac_cv_path_WC
12219 if test -n "$WC"; then
12220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12221 $as_echo "$WC" >&6; }
12222 else
12223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12224 $as_echo "no" >&6; }
12225 fi
12226 
12227 
12228           if test "x$WC" = x; then
12229             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12230           fi
12231         else
12232           # Otherwise we believe it is a complete path. Use it as it is.
12233           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12234 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12235           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12236 $as_echo_n "checking for WC... " >&6; }
12237           if test ! -x "$tool_specified"; then
12238             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12239 $as_echo "not found" >&6; }
12240             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12241           fi
12242           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12243 $as_echo "$tool_specified" >&6; }
12244         fi
12245       fi
12246     fi
12247 
12248   fi
12249 
12250 
12251 
12252   if test "x$WC" = x; then
12253     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12254   fi
12255 
12256 
12257 
12258 
12259 
12260   # Publish this variable in the help.
12261 
12262 
12263   if [ -z "${WHICH+x}" ]; then
12264     # The variable is not set by user, try to locate tool using the code snippet
12265     for ac_prog in which
12266 do
12267   # Extract the first word of "$ac_prog", so it can be a program name with args.
12268 set dummy $ac_prog; ac_word=$2
12269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12270 $as_echo_n "checking for $ac_word... " >&6; }
12271 if ${ac_cv_path_WHICH+:} false; then :
12272   $as_echo_n "(cached) " >&6
12273 else
12274   case $WHICH in
12275   [\\/]* | ?:[\\/]*)
12276   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12277   ;;
12278   *)
12279   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12280 for as_dir in $PATH
12281 do
12282   IFS=$as_save_IFS
12283   test -z "$as_dir" && as_dir=.
12284     for ac_exec_ext in '' $ac_executable_extensions; do
12285   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12286     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12287     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12288     break 2
12289   fi
12290 done
12291   done
12292 IFS=$as_save_IFS
12293 
12294   ;;
12295 esac
12296 fi
12297 WHICH=$ac_cv_path_WHICH
12298 if test -n "$WHICH"; then
12299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12300 $as_echo "$WHICH" >&6; }
12301 else
12302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12303 $as_echo "no" >&6; }
12304 fi
12305 
12306 
12307   test -n "$WHICH" && break
12308 done
12309 
12310   else
12311     # The variable is set, but is it from the command line or the environment?
12312 
12313     # Try to remove the string !WHICH! from our list.
12314     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12315     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12316       # If it failed, the variable was not from the command line. Ignore it,
12317       # but warn the user (except for BASH, which is always set by the calling BASH).
12318       if test "xWHICH" != xBASH; then
12319         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12320 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12321       fi
12322       # Try to locate tool using the code snippet
12323       for ac_prog in which
12324 do
12325   # Extract the first word of "$ac_prog", so it can be a program name with args.
12326 set dummy $ac_prog; ac_word=$2
12327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12328 $as_echo_n "checking for $ac_word... " >&6; }
12329 if ${ac_cv_path_WHICH+:} false; then :
12330   $as_echo_n "(cached) " >&6
12331 else
12332   case $WHICH in
12333   [\\/]* | ?:[\\/]*)
12334   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12335   ;;
12336   *)
12337   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12338 for as_dir in $PATH
12339 do
12340   IFS=$as_save_IFS
12341   test -z "$as_dir" && as_dir=.
12342     for ac_exec_ext in '' $ac_executable_extensions; do
12343   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12344     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12345     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12346     break 2
12347   fi
12348 done
12349   done
12350 IFS=$as_save_IFS
12351 
12352   ;;
12353 esac
12354 fi
12355 WHICH=$ac_cv_path_WHICH
12356 if test -n "$WHICH"; then
12357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12358 $as_echo "$WHICH" >&6; }
12359 else
12360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12361 $as_echo "no" >&6; }
12362 fi
12363 
12364 
12365   test -n "$WHICH" && break
12366 done
12367 
12368     else
12369       # If it succeeded, then it was overridden by the user. We will use it
12370       # for the tool.
12371 
12372       # First remove it from the list of overridden variables, so we can test
12373       # for unknown variables in the end.
12374       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12375 
12376       # Check if we try to supply an empty value
12377       if test "x$WHICH" = x; then
12378         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12379 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12380         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12381 $as_echo_n "checking for WHICH... " >&6; }
12382         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12383 $as_echo "disabled" >&6; }
12384       else
12385         # Check if the provided tool contains a complete path.
12386         tool_specified="$WHICH"
12387         tool_basename="${tool_specified##*/}"
12388         if test "x$tool_basename" = "x$tool_specified"; then
12389           # A command without a complete path is provided, search $PATH.
12390           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12391 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12392           # Extract the first word of "$tool_basename", so it can be a program name with args.
12393 set dummy $tool_basename; ac_word=$2
12394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12395 $as_echo_n "checking for $ac_word... " >&6; }
12396 if ${ac_cv_path_WHICH+:} false; then :
12397   $as_echo_n "(cached) " >&6
12398 else
12399   case $WHICH in
12400   [\\/]* | ?:[\\/]*)
12401   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12402   ;;
12403   *)
12404   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12405 for as_dir in $PATH
12406 do
12407   IFS=$as_save_IFS
12408   test -z "$as_dir" && as_dir=.
12409     for ac_exec_ext in '' $ac_executable_extensions; do
12410   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12411     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12412     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12413     break 2
12414   fi
12415 done
12416   done
12417 IFS=$as_save_IFS
12418 
12419   ;;
12420 esac
12421 fi
12422 WHICH=$ac_cv_path_WHICH
12423 if test -n "$WHICH"; then
12424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12425 $as_echo "$WHICH" >&6; }
12426 else
12427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12428 $as_echo "no" >&6; }
12429 fi
12430 
12431 
12432           if test "x$WHICH" = x; then
12433             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12434           fi
12435         else
12436           # Otherwise we believe it is a complete path. Use it as it is.
12437           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12438 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12439           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12440 $as_echo_n "checking for WHICH... " >&6; }
12441           if test ! -x "$tool_specified"; then
12442             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12443 $as_echo "not found" >&6; }
12444             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12445           fi
12446           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12447 $as_echo "$tool_specified" >&6; }
12448         fi
12449       fi
12450     fi
12451 
12452   fi
12453 
12454 
12455 
12456   if test "x$WHICH" = x; then
12457     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12458   fi
12459 
12460 
12461 
12462 
12463 
12464   # Publish this variable in the help.
12465 
12466 
12467   if [ -z "${XARGS+x}" ]; then
12468     # The variable is not set by user, try to locate tool using the code snippet
12469     for ac_prog in xargs
12470 do
12471   # Extract the first word of "$ac_prog", so it can be a program name with args.
12472 set dummy $ac_prog; ac_word=$2
12473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12474 $as_echo_n "checking for $ac_word... " >&6; }
12475 if ${ac_cv_path_XARGS+:} false; then :
12476   $as_echo_n "(cached) " >&6
12477 else
12478   case $XARGS in
12479   [\\/]* | ?:[\\/]*)
12480   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12481   ;;
12482   *)
12483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12484 for as_dir in $PATH
12485 do
12486   IFS=$as_save_IFS
12487   test -z "$as_dir" && as_dir=.
12488     for ac_exec_ext in '' $ac_executable_extensions; do
12489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12490     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12492     break 2
12493   fi
12494 done
12495   done
12496 IFS=$as_save_IFS
12497 
12498   ;;
12499 esac
12500 fi
12501 XARGS=$ac_cv_path_XARGS
12502 if test -n "$XARGS"; then
12503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12504 $as_echo "$XARGS" >&6; }
12505 else
12506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12507 $as_echo "no" >&6; }
12508 fi
12509 
12510 
12511   test -n "$XARGS" && break
12512 done
12513 
12514   else
12515     # The variable is set, but is it from the command line or the environment?
12516 
12517     # Try to remove the string !XARGS! from our list.
12518     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12519     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12520       # If it failed, the variable was not from the command line. Ignore it,
12521       # but warn the user (except for BASH, which is always set by the calling BASH).
12522       if test "xXARGS" != xBASH; then
12523         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12524 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12525       fi
12526       # Try to locate tool using the code snippet
12527       for ac_prog in xargs
12528 do
12529   # Extract the first word of "$ac_prog", so it can be a program name with args.
12530 set dummy $ac_prog; ac_word=$2
12531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12532 $as_echo_n "checking for $ac_word... " >&6; }
12533 if ${ac_cv_path_XARGS+:} false; then :
12534   $as_echo_n "(cached) " >&6
12535 else
12536   case $XARGS in
12537   [\\/]* | ?:[\\/]*)
12538   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12539   ;;
12540   *)
12541   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12542 for as_dir in $PATH
12543 do
12544   IFS=$as_save_IFS
12545   test -z "$as_dir" && as_dir=.
12546     for ac_exec_ext in '' $ac_executable_extensions; do
12547   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12548     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12549     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12550     break 2
12551   fi
12552 done
12553   done
12554 IFS=$as_save_IFS
12555 
12556   ;;
12557 esac
12558 fi
12559 XARGS=$ac_cv_path_XARGS
12560 if test -n "$XARGS"; then
12561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12562 $as_echo "$XARGS" >&6; }
12563 else
12564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12565 $as_echo "no" >&6; }
12566 fi
12567 
12568 
12569   test -n "$XARGS" && break
12570 done
12571 
12572     else
12573       # If it succeeded, then it was overridden by the user. We will use it
12574       # for the tool.
12575 
12576       # First remove it from the list of overridden variables, so we can test
12577       # for unknown variables in the end.
12578       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12579 
12580       # Check if we try to supply an empty value
12581       if test "x$XARGS" = x; then
12582         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12583 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12584         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12585 $as_echo_n "checking for XARGS... " >&6; }
12586         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12587 $as_echo "disabled" >&6; }
12588       else
12589         # Check if the provided tool contains a complete path.
12590         tool_specified="$XARGS"
12591         tool_basename="${tool_specified##*/}"
12592         if test "x$tool_basename" = "x$tool_specified"; then
12593           # A command without a complete path is provided, search $PATH.
12594           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12595 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12596           # Extract the first word of "$tool_basename", so it can be a program name with args.
12597 set dummy $tool_basename; ac_word=$2
12598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12599 $as_echo_n "checking for $ac_word... " >&6; }
12600 if ${ac_cv_path_XARGS+:} false; then :
12601   $as_echo_n "(cached) " >&6
12602 else
12603   case $XARGS in
12604   [\\/]* | ?:[\\/]*)
12605   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12606   ;;
12607   *)
12608   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12609 for as_dir in $PATH
12610 do
12611   IFS=$as_save_IFS
12612   test -z "$as_dir" && as_dir=.
12613     for ac_exec_ext in '' $ac_executable_extensions; do
12614   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12615     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12616     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12617     break 2
12618   fi
12619 done
12620   done
12621 IFS=$as_save_IFS
12622 
12623   ;;
12624 esac
12625 fi
12626 XARGS=$ac_cv_path_XARGS
12627 if test -n "$XARGS"; then
12628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12629 $as_echo "$XARGS" >&6; }
12630 else
12631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12632 $as_echo "no" >&6; }
12633 fi
12634 
12635 
12636           if test "x$XARGS" = x; then
12637             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12638           fi
12639         else
12640           # Otherwise we believe it is a complete path. Use it as it is.
12641           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12642 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12643           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12644 $as_echo_n "checking for XARGS... " >&6; }
12645           if test ! -x "$tool_specified"; then
12646             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12647 $as_echo "not found" >&6; }
12648             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12649           fi
12650           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12651 $as_echo "$tool_specified" >&6; }
12652         fi
12653       fi
12654     fi
12655 
12656   fi
12657 
12658 
12659 
12660   if test "x$XARGS" = x; then
12661     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12662   fi
12663 
12664 
12665 
12666   # Then required tools that require some special treatment.
12667 
12668 
12669   # Publish this variable in the help.
12670 
12671 
12672   if [ -z "${AWK+x}" ]; then
12673     # The variable is not set by user, try to locate tool using the code snippet
12674     for ac_prog in gawk mawk nawk awk
12675 do
12676   # Extract the first word of "$ac_prog", so it can be a program name with args.
12677 set dummy $ac_prog; ac_word=$2
12678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12679 $as_echo_n "checking for $ac_word... " >&6; }
12680 if ${ac_cv_prog_AWK+:} false; then :
12681   $as_echo_n "(cached) " >&6
12682 else
12683   if test -n "$AWK"; then
12684   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12685 else
12686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12687 for as_dir in $PATH
12688 do
12689   IFS=$as_save_IFS
12690   test -z "$as_dir" && as_dir=.
12691     for ac_exec_ext in '' $ac_executable_extensions; do
12692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12693     ac_cv_prog_AWK="$ac_prog"
12694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12695     break 2
12696   fi
12697 done
12698   done
12699 IFS=$as_save_IFS
12700 
12701 fi
12702 fi
12703 AWK=$ac_cv_prog_AWK
12704 if test -n "$AWK"; then
12705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12706 $as_echo "$AWK" >&6; }
12707 else
12708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12709 $as_echo "no" >&6; }
12710 fi
12711 
12712 
12713   test -n "$AWK" && break
12714 done
12715 
12716   else
12717     # The variable is set, but is it from the command line or the environment?
12718 
12719     # Try to remove the string !AWK! from our list.
12720     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12721     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12722       # If it failed, the variable was not from the command line. Ignore it,
12723       # but warn the user (except for BASH, which is always set by the calling BASH).
12724       if test "xAWK" != xBASH; then
12725         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12726 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12727       fi
12728       # Try to locate tool using the code snippet
12729       for ac_prog in gawk mawk nawk awk
12730 do
12731   # Extract the first word of "$ac_prog", so it can be a program name with args.
12732 set dummy $ac_prog; ac_word=$2
12733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12734 $as_echo_n "checking for $ac_word... " >&6; }
12735 if ${ac_cv_prog_AWK+:} false; then :
12736   $as_echo_n "(cached) " >&6
12737 else
12738   if test -n "$AWK"; then
12739   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12740 else
12741 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12742 for as_dir in $PATH
12743 do
12744   IFS=$as_save_IFS
12745   test -z "$as_dir" && as_dir=.
12746     for ac_exec_ext in '' $ac_executable_extensions; do
12747   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12748     ac_cv_prog_AWK="$ac_prog"
12749     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12750     break 2
12751   fi
12752 done
12753   done
12754 IFS=$as_save_IFS
12755 
12756 fi
12757 fi
12758 AWK=$ac_cv_prog_AWK
12759 if test -n "$AWK"; then
12760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12761 $as_echo "$AWK" >&6; }
12762 else
12763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12764 $as_echo "no" >&6; }
12765 fi
12766 
12767 
12768   test -n "$AWK" && break
12769 done
12770 
12771     else
12772       # If it succeeded, then it was overridden by the user. We will use it
12773       # for the tool.
12774 
12775       # First remove it from the list of overridden variables, so we can test
12776       # for unknown variables in the end.
12777       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12778 
12779       # Check if we try to supply an empty value
12780       if test "x$AWK" = x; then
12781         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12782 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12783         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12784 $as_echo_n "checking for AWK... " >&6; }
12785         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12786 $as_echo "disabled" >&6; }
12787       else
12788         # Check if the provided tool contains a complete path.
12789         tool_specified="$AWK"
12790         tool_basename="${tool_specified##*/}"
12791         if test "x$tool_basename" = "x$tool_specified"; then
12792           # A command without a complete path is provided, search $PATH.
12793           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12794 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12795           # Extract the first word of "$tool_basename", so it can be a program name with args.
12796 set dummy $tool_basename; ac_word=$2
12797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12798 $as_echo_n "checking for $ac_word... " >&6; }
12799 if ${ac_cv_path_AWK+:} false; then :
12800   $as_echo_n "(cached) " >&6
12801 else
12802   case $AWK in
12803   [\\/]* | ?:[\\/]*)
12804   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12805   ;;
12806   *)
12807   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12808 for as_dir in $PATH
12809 do
12810   IFS=$as_save_IFS
12811   test -z "$as_dir" && as_dir=.
12812     for ac_exec_ext in '' $ac_executable_extensions; do
12813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12814     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12816     break 2
12817   fi
12818 done
12819   done
12820 IFS=$as_save_IFS
12821 
12822   ;;
12823 esac
12824 fi
12825 AWK=$ac_cv_path_AWK
12826 if test -n "$AWK"; then
12827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12828 $as_echo "$AWK" >&6; }
12829 else
12830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12831 $as_echo "no" >&6; }
12832 fi
12833 
12834 
12835           if test "x$AWK" = x; then
12836             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12837           fi
12838         else
12839           # Otherwise we believe it is a complete path. Use it as it is.
12840           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12841 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12842           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12843 $as_echo_n "checking for AWK... " >&6; }
12844           if test ! -x "$tool_specified"; then
12845             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12846 $as_echo "not found" >&6; }
12847             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12848           fi
12849           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12850 $as_echo "$tool_specified" >&6; }
12851         fi
12852       fi
12853     fi
12854 
12855   fi
12856 
12857 
12858   if test "x$AWK" = x; then
12859     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12860   fi
12861 
12862 
12863 
12864 
12865   # Publish this variable in the help.
12866 
12867 
12868   if [ -z "${GREP+x}" ]; then
12869     # The variable is not set by user, try to locate tool using the code snippet
12870     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12871 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12872 if ${ac_cv_path_GREP+:} false; then :
12873   $as_echo_n "(cached) " >&6
12874 else
12875   if test -z "$GREP"; then
12876   ac_path_GREP_found=false
12877   # Loop through the user's path and test for each of PROGNAME-LIST
12878   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12879 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12880 do
12881   IFS=$as_save_IFS
12882   test -z "$as_dir" && as_dir=.
12883     for ac_prog in grep ggrep; do
12884     for ac_exec_ext in '' $ac_executable_extensions; do
12885       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12886       as_fn_executable_p "$ac_path_GREP" || continue
12887 # Check for GNU ac_path_GREP and select it if it is found.
12888   # Check for GNU $ac_path_GREP
12889 case `"$ac_path_GREP" --version 2>&1` in
12890 *GNU*)
12891   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12892 *)
12893   ac_count=0
12894   $as_echo_n 0123456789 >"conftest.in"
12895   while :
12896   do
12897     cat "conftest.in" "conftest.in" >"conftest.tmp"
12898     mv "conftest.tmp" "conftest.in"
12899     cp "conftest.in" "conftest.nl"
12900     $as_echo 'GREP' >> "conftest.nl"
12901     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12902     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12903     as_fn_arith $ac_count + 1 && ac_count=$as_val
12904     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12905       # Best one so far, save it but keep looking for a better one
12906       ac_cv_path_GREP="$ac_path_GREP"
12907       ac_path_GREP_max=$ac_count
12908     fi
12909     # 10*(2^10) chars as input seems more than enough
12910     test $ac_count -gt 10 && break
12911   done
12912   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12913 esac
12914 
12915       $ac_path_GREP_found && break 3
12916     done
12917   done
12918   done
12919 IFS=$as_save_IFS
12920   if test -z "$ac_cv_path_GREP"; then
12921     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12922   fi
12923 else
12924   ac_cv_path_GREP=$GREP
12925 fi
12926 
12927 fi
12928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12929 $as_echo "$ac_cv_path_GREP" >&6; }
12930  GREP="$ac_cv_path_GREP"
12931 
12932 
12933   else
12934     # The variable is set, but is it from the command line or the environment?
12935 
12936     # Try to remove the string !GREP! from our list.
12937     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12938     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12939       # If it failed, the variable was not from the command line. Ignore it,
12940       # but warn the user (except for BASH, which is always set by the calling BASH).
12941       if test "xGREP" != xBASH; then
12942         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12943 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12944       fi
12945       # Try to locate tool using the code snippet
12946       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12947 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12948 if ${ac_cv_path_GREP+:} false; then :
12949   $as_echo_n "(cached) " >&6
12950 else
12951   if test -z "$GREP"; then
12952   ac_path_GREP_found=false
12953   # Loop through the user's path and test for each of PROGNAME-LIST
12954   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12955 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12956 do
12957   IFS=$as_save_IFS
12958   test -z "$as_dir" && as_dir=.
12959     for ac_prog in grep ggrep; do
12960     for ac_exec_ext in '' $ac_executable_extensions; do
12961       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12962       as_fn_executable_p "$ac_path_GREP" || continue
12963 # Check for GNU ac_path_GREP and select it if it is found.
12964   # Check for GNU $ac_path_GREP
12965 case `"$ac_path_GREP" --version 2>&1` in
12966 *GNU*)
12967   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12968 *)
12969   ac_count=0
12970   $as_echo_n 0123456789 >"conftest.in"
12971   while :
12972   do
12973     cat "conftest.in" "conftest.in" >"conftest.tmp"
12974     mv "conftest.tmp" "conftest.in"
12975     cp "conftest.in" "conftest.nl"
12976     $as_echo 'GREP' >> "conftest.nl"
12977     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12978     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12979     as_fn_arith $ac_count + 1 && ac_count=$as_val
12980     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12981       # Best one so far, save it but keep looking for a better one
12982       ac_cv_path_GREP="$ac_path_GREP"
12983       ac_path_GREP_max=$ac_count
12984     fi
12985     # 10*(2^10) chars as input seems more than enough
12986     test $ac_count -gt 10 && break
12987   done
12988   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12989 esac
12990 
12991       $ac_path_GREP_found && break 3
12992     done
12993   done
12994   done
12995 IFS=$as_save_IFS
12996   if test -z "$ac_cv_path_GREP"; then
12997     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12998   fi
12999 else
13000   ac_cv_path_GREP=$GREP
13001 fi
13002 
13003 fi
13004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13005 $as_echo "$ac_cv_path_GREP" >&6; }
13006  GREP="$ac_cv_path_GREP"
13007 
13008 
13009     else
13010       # If it succeeded, then it was overridden by the user. We will use it
13011       # for the tool.
13012 
13013       # First remove it from the list of overridden variables, so we can test
13014       # for unknown variables in the end.
13015       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13016 
13017       # Check if we try to supply an empty value
13018       if test "x$GREP" = x; then
13019         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13020 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13021         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13022 $as_echo_n "checking for GREP... " >&6; }
13023         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13024 $as_echo "disabled" >&6; }
13025       else
13026         # Check if the provided tool contains a complete path.
13027         tool_specified="$GREP"
13028         tool_basename="${tool_specified##*/}"
13029         if test "x$tool_basename" = "x$tool_specified"; then
13030           # A command without a complete path is provided, search $PATH.
13031           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13032 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13033           # Extract the first word of "$tool_basename", so it can be a program name with args.
13034 set dummy $tool_basename; ac_word=$2
13035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13036 $as_echo_n "checking for $ac_word... " >&6; }
13037 if ${ac_cv_path_GREP+:} false; then :
13038   $as_echo_n "(cached) " >&6
13039 else
13040   case $GREP in
13041   [\\/]* | ?:[\\/]*)
13042   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13043   ;;
13044   *)
13045   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13046 for as_dir in $PATH
13047 do
13048   IFS=$as_save_IFS
13049   test -z "$as_dir" && as_dir=.
13050     for ac_exec_ext in '' $ac_executable_extensions; do
13051   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13052     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13053     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13054     break 2
13055   fi
13056 done
13057   done
13058 IFS=$as_save_IFS
13059 
13060   ;;
13061 esac
13062 fi
13063 GREP=$ac_cv_path_GREP
13064 if test -n "$GREP"; then
13065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13066 $as_echo "$GREP" >&6; }
13067 else
13068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13069 $as_echo "no" >&6; }
13070 fi
13071 
13072 
13073           if test "x$GREP" = x; then
13074             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13075           fi
13076         else
13077           # Otherwise we believe it is a complete path. Use it as it is.
13078           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13079 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13080           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13081 $as_echo_n "checking for GREP... " >&6; }
13082           if test ! -x "$tool_specified"; then
13083             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13084 $as_echo "not found" >&6; }
13085             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13086           fi
13087           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13088 $as_echo "$tool_specified" >&6; }
13089         fi
13090       fi
13091     fi
13092 
13093   fi
13094 
13095 
13096   if test "x$GREP" = x; then
13097     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13098   fi
13099 
13100 
13101 
13102 
13103   # Publish this variable in the help.
13104 
13105 
13106   if [ -z "${EGREP+x}" ]; then
13107     # The variable is not set by user, try to locate tool using the code snippet
13108     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13109 $as_echo_n "checking for egrep... " >&6; }
13110 if ${ac_cv_path_EGREP+:} false; then :
13111   $as_echo_n "(cached) " >&6
13112 else
13113   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13114    then ac_cv_path_EGREP="$GREP -E"
13115    else
13116      if test -z "$EGREP"; then
13117   ac_path_EGREP_found=false
13118   # Loop through the user's path and test for each of PROGNAME-LIST
13119   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13120 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13121 do
13122   IFS=$as_save_IFS
13123   test -z "$as_dir" && as_dir=.
13124     for ac_prog in egrep; do
13125     for ac_exec_ext in '' $ac_executable_extensions; do
13126       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13127       as_fn_executable_p "$ac_path_EGREP" || continue
13128 # Check for GNU ac_path_EGREP and select it if it is found.
13129   # Check for GNU $ac_path_EGREP
13130 case `"$ac_path_EGREP" --version 2>&1` in
13131 *GNU*)
13132   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13133 *)
13134   ac_count=0
13135   $as_echo_n 0123456789 >"conftest.in"
13136   while :
13137   do
13138     cat "conftest.in" "conftest.in" >"conftest.tmp"
13139     mv "conftest.tmp" "conftest.in"
13140     cp "conftest.in" "conftest.nl"
13141     $as_echo 'EGREP' >> "conftest.nl"
13142     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13143     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13144     as_fn_arith $ac_count + 1 && ac_count=$as_val
13145     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13146       # Best one so far, save it but keep looking for a better one
13147       ac_cv_path_EGREP="$ac_path_EGREP"
13148       ac_path_EGREP_max=$ac_count
13149     fi
13150     # 10*(2^10) chars as input seems more than enough
13151     test $ac_count -gt 10 && break
13152   done
13153   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13154 esac
13155 
13156       $ac_path_EGREP_found && break 3
13157     done
13158   done
13159   done
13160 IFS=$as_save_IFS
13161   if test -z "$ac_cv_path_EGREP"; then
13162     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13163   fi
13164 else
13165   ac_cv_path_EGREP=$EGREP
13166 fi
13167 
13168    fi
13169 fi
13170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13171 $as_echo "$ac_cv_path_EGREP" >&6; }
13172  EGREP="$ac_cv_path_EGREP"
13173 
13174 
13175   else
13176     # The variable is set, but is it from the command line or the environment?
13177 
13178     # Try to remove the string !EGREP! from our list.
13179     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13180     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13181       # If it failed, the variable was not from the command line. Ignore it,
13182       # but warn the user (except for BASH, which is always set by the calling BASH).
13183       if test "xEGREP" != xBASH; then
13184         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13185 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13186       fi
13187       # Try to locate tool using the code snippet
13188       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13189 $as_echo_n "checking for egrep... " >&6; }
13190 if ${ac_cv_path_EGREP+:} false; then :
13191   $as_echo_n "(cached) " >&6
13192 else
13193   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13194    then ac_cv_path_EGREP="$GREP -E"
13195    else
13196      if test -z "$EGREP"; then
13197   ac_path_EGREP_found=false
13198   # Loop through the user's path and test for each of PROGNAME-LIST
13199   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13200 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13201 do
13202   IFS=$as_save_IFS
13203   test -z "$as_dir" && as_dir=.
13204     for ac_prog in egrep; do
13205     for ac_exec_ext in '' $ac_executable_extensions; do
13206       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13207       as_fn_executable_p "$ac_path_EGREP" || continue
13208 # Check for GNU ac_path_EGREP and select it if it is found.
13209   # Check for GNU $ac_path_EGREP
13210 case `"$ac_path_EGREP" --version 2>&1` in
13211 *GNU*)
13212   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13213 *)
13214   ac_count=0
13215   $as_echo_n 0123456789 >"conftest.in"
13216   while :
13217   do
13218     cat "conftest.in" "conftest.in" >"conftest.tmp"
13219     mv "conftest.tmp" "conftest.in"
13220     cp "conftest.in" "conftest.nl"
13221     $as_echo 'EGREP' >> "conftest.nl"
13222     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13223     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13224     as_fn_arith $ac_count + 1 && ac_count=$as_val
13225     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13226       # Best one so far, save it but keep looking for a better one
13227       ac_cv_path_EGREP="$ac_path_EGREP"
13228       ac_path_EGREP_max=$ac_count
13229     fi
13230     # 10*(2^10) chars as input seems more than enough
13231     test $ac_count -gt 10 && break
13232   done
13233   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13234 esac
13235 
13236       $ac_path_EGREP_found && break 3
13237     done
13238   done
13239   done
13240 IFS=$as_save_IFS
13241   if test -z "$ac_cv_path_EGREP"; then
13242     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13243   fi
13244 else
13245   ac_cv_path_EGREP=$EGREP
13246 fi
13247 
13248    fi
13249 fi
13250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13251 $as_echo "$ac_cv_path_EGREP" >&6; }
13252  EGREP="$ac_cv_path_EGREP"
13253 
13254 
13255     else
13256       # If it succeeded, then it was overridden by the user. We will use it
13257       # for the tool.
13258 
13259       # First remove it from the list of overridden variables, so we can test
13260       # for unknown variables in the end.
13261       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13262 
13263       # Check if we try to supply an empty value
13264       if test "x$EGREP" = x; then
13265         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13266 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13267         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13268 $as_echo_n "checking for EGREP... " >&6; }
13269         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13270 $as_echo "disabled" >&6; }
13271       else
13272         # Check if the provided tool contains a complete path.
13273         tool_specified="$EGREP"
13274         tool_basename="${tool_specified##*/}"
13275         if test "x$tool_basename" = "x$tool_specified"; then
13276           # A command without a complete path is provided, search $PATH.
13277           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13278 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13279           # Extract the first word of "$tool_basename", so it can be a program name with args.
13280 set dummy $tool_basename; ac_word=$2
13281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13282 $as_echo_n "checking for $ac_word... " >&6; }
13283 if ${ac_cv_path_EGREP+:} false; then :
13284   $as_echo_n "(cached) " >&6
13285 else
13286   case $EGREP in
13287   [\\/]* | ?:[\\/]*)
13288   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13289   ;;
13290   *)
13291   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13292 for as_dir in $PATH
13293 do
13294   IFS=$as_save_IFS
13295   test -z "$as_dir" && as_dir=.
13296     for ac_exec_ext in '' $ac_executable_extensions; do
13297   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13298     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13299     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13300     break 2
13301   fi
13302 done
13303   done
13304 IFS=$as_save_IFS
13305 
13306   ;;
13307 esac
13308 fi
13309 EGREP=$ac_cv_path_EGREP
13310 if test -n "$EGREP"; then
13311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13312 $as_echo "$EGREP" >&6; }
13313 else
13314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13315 $as_echo "no" >&6; }
13316 fi
13317 
13318 
13319           if test "x$EGREP" = x; then
13320             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13321           fi
13322         else
13323           # Otherwise we believe it is a complete path. Use it as it is.
13324           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13325 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13326           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13327 $as_echo_n "checking for EGREP... " >&6; }
13328           if test ! -x "$tool_specified"; then
13329             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13330 $as_echo "not found" >&6; }
13331             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13332           fi
13333           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13334 $as_echo "$tool_specified" >&6; }
13335         fi
13336       fi
13337     fi
13338 
13339   fi
13340 
13341 
13342   if test "x$EGREP" = x; then
13343     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13344   fi
13345 
13346 
13347 
13348 
13349   # Publish this variable in the help.
13350 
13351 
13352   if [ -z "${FGREP+x}" ]; then
13353     # The variable is not set by user, try to locate tool using the code snippet
13354     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13355 $as_echo_n "checking for fgrep... " >&6; }
13356 if ${ac_cv_path_FGREP+:} false; then :
13357   $as_echo_n "(cached) " >&6
13358 else
13359   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13360    then ac_cv_path_FGREP="$GREP -F"
13361    else
13362      if test -z "$FGREP"; then
13363   ac_path_FGREP_found=false
13364   # Loop through the user's path and test for each of PROGNAME-LIST
13365   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13366 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13367 do
13368   IFS=$as_save_IFS
13369   test -z "$as_dir" && as_dir=.
13370     for ac_prog in fgrep; do
13371     for ac_exec_ext in '' $ac_executable_extensions; do
13372       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13373       as_fn_executable_p "$ac_path_FGREP" || continue
13374 # Check for GNU ac_path_FGREP and select it if it is found.
13375   # Check for GNU $ac_path_FGREP
13376 case `"$ac_path_FGREP" --version 2>&1` in
13377 *GNU*)
13378   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13379 *)
13380   ac_count=0
13381   $as_echo_n 0123456789 >"conftest.in"
13382   while :
13383   do
13384     cat "conftest.in" "conftest.in" >"conftest.tmp"
13385     mv "conftest.tmp" "conftest.in"
13386     cp "conftest.in" "conftest.nl"
13387     $as_echo 'FGREP' >> "conftest.nl"
13388     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13389     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13390     as_fn_arith $ac_count + 1 && ac_count=$as_val
13391     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13392       # Best one so far, save it but keep looking for a better one
13393       ac_cv_path_FGREP="$ac_path_FGREP"
13394       ac_path_FGREP_max=$ac_count
13395     fi
13396     # 10*(2^10) chars as input seems more than enough
13397     test $ac_count -gt 10 && break
13398   done
13399   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13400 esac
13401 
13402       $ac_path_FGREP_found && break 3
13403     done
13404   done
13405   done
13406 IFS=$as_save_IFS
13407   if test -z "$ac_cv_path_FGREP"; then
13408     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13409   fi
13410 else
13411   ac_cv_path_FGREP=$FGREP
13412 fi
13413 
13414    fi
13415 fi
13416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13417 $as_echo "$ac_cv_path_FGREP" >&6; }
13418  FGREP="$ac_cv_path_FGREP"
13419 
13420 
13421   else
13422     # The variable is set, but is it from the command line or the environment?
13423 
13424     # Try to remove the string !FGREP! from our list.
13425     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13426     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13427       # If it failed, the variable was not from the command line. Ignore it,
13428       # but warn the user (except for BASH, which is always set by the calling BASH).
13429       if test "xFGREP" != xBASH; then
13430         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13431 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13432       fi
13433       # Try to locate tool using the code snippet
13434       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13435 $as_echo_n "checking for fgrep... " >&6; }
13436 if ${ac_cv_path_FGREP+:} false; then :
13437   $as_echo_n "(cached) " >&6
13438 else
13439   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13440    then ac_cv_path_FGREP="$GREP -F"
13441    else
13442      if test -z "$FGREP"; then
13443   ac_path_FGREP_found=false
13444   # Loop through the user's path and test for each of PROGNAME-LIST
13445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13446 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13447 do
13448   IFS=$as_save_IFS
13449   test -z "$as_dir" && as_dir=.
13450     for ac_prog in fgrep; do
13451     for ac_exec_ext in '' $ac_executable_extensions; do
13452       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13453       as_fn_executable_p "$ac_path_FGREP" || continue
13454 # Check for GNU ac_path_FGREP and select it if it is found.
13455   # Check for GNU $ac_path_FGREP
13456 case `"$ac_path_FGREP" --version 2>&1` in
13457 *GNU*)
13458   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13459 *)
13460   ac_count=0
13461   $as_echo_n 0123456789 >"conftest.in"
13462   while :
13463   do
13464     cat "conftest.in" "conftest.in" >"conftest.tmp"
13465     mv "conftest.tmp" "conftest.in"
13466     cp "conftest.in" "conftest.nl"
13467     $as_echo 'FGREP' >> "conftest.nl"
13468     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13469     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13470     as_fn_arith $ac_count + 1 && ac_count=$as_val
13471     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13472       # Best one so far, save it but keep looking for a better one
13473       ac_cv_path_FGREP="$ac_path_FGREP"
13474       ac_path_FGREP_max=$ac_count
13475     fi
13476     # 10*(2^10) chars as input seems more than enough
13477     test $ac_count -gt 10 && break
13478   done
13479   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13480 esac
13481 
13482       $ac_path_FGREP_found && break 3
13483     done
13484   done
13485   done
13486 IFS=$as_save_IFS
13487   if test -z "$ac_cv_path_FGREP"; then
13488     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13489   fi
13490 else
13491   ac_cv_path_FGREP=$FGREP
13492 fi
13493 
13494    fi
13495 fi
13496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13497 $as_echo "$ac_cv_path_FGREP" >&6; }
13498  FGREP="$ac_cv_path_FGREP"
13499 
13500 
13501     else
13502       # If it succeeded, then it was overridden by the user. We will use it
13503       # for the tool.
13504 
13505       # First remove it from the list of overridden variables, so we can test
13506       # for unknown variables in the end.
13507       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13508 
13509       # Check if we try to supply an empty value
13510       if test "x$FGREP" = x; then
13511         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13512 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13513         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13514 $as_echo_n "checking for FGREP... " >&6; }
13515         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13516 $as_echo "disabled" >&6; }
13517       else
13518         # Check if the provided tool contains a complete path.
13519         tool_specified="$FGREP"
13520         tool_basename="${tool_specified##*/}"
13521         if test "x$tool_basename" = "x$tool_specified"; then
13522           # A command without a complete path is provided, search $PATH.
13523           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13524 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13525           # Extract the first word of "$tool_basename", so it can be a program name with args.
13526 set dummy $tool_basename; ac_word=$2
13527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13528 $as_echo_n "checking for $ac_word... " >&6; }
13529 if ${ac_cv_path_FGREP+:} false; then :
13530   $as_echo_n "(cached) " >&6
13531 else
13532   case $FGREP in
13533   [\\/]* | ?:[\\/]*)
13534   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13535   ;;
13536   *)
13537   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13538 for as_dir in $PATH
13539 do
13540   IFS=$as_save_IFS
13541   test -z "$as_dir" && as_dir=.
13542     for ac_exec_ext in '' $ac_executable_extensions; do
13543   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13544     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13545     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13546     break 2
13547   fi
13548 done
13549   done
13550 IFS=$as_save_IFS
13551 
13552   ;;
13553 esac
13554 fi
13555 FGREP=$ac_cv_path_FGREP
13556 if test -n "$FGREP"; then
13557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13558 $as_echo "$FGREP" >&6; }
13559 else
13560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13561 $as_echo "no" >&6; }
13562 fi
13563 
13564 
13565           if test "x$FGREP" = x; then
13566             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13567           fi
13568         else
13569           # Otherwise we believe it is a complete path. Use it as it is.
13570           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13571 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13572           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13573 $as_echo_n "checking for FGREP... " >&6; }
13574           if test ! -x "$tool_specified"; then
13575             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13576 $as_echo "not found" >&6; }
13577             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13578           fi
13579           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13580 $as_echo "$tool_specified" >&6; }
13581         fi
13582       fi
13583     fi
13584 
13585   fi
13586 
13587 
13588   if test "x$FGREP" = x; then
13589     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13590   fi
13591 
13592 
13593 
13594 
13595   # Publish this variable in the help.
13596 
13597 
13598   if [ -z "${SED+x}" ]; then
13599     # The variable is not set by user, try to locate tool using the code snippet
13600     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13601 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13602 if ${ac_cv_path_SED+:} false; then :
13603   $as_echo_n "(cached) " >&6
13604 else
13605             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13606      for ac_i in 1 2 3 4 5 6 7; do
13607        ac_script="$ac_script$as_nl$ac_script"
13608      done
13609      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13610      { ac_script=; unset ac_script;}
13611      if test -z "$SED"; then
13612   ac_path_SED_found=false
13613   # Loop through the user's path and test for each of PROGNAME-LIST
13614   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13615 for as_dir in $PATH
13616 do
13617   IFS=$as_save_IFS
13618   test -z "$as_dir" && as_dir=.
13619     for ac_prog in sed gsed; do
13620     for ac_exec_ext in '' $ac_executable_extensions; do
13621       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13622       as_fn_executable_p "$ac_path_SED" || continue
13623 # Check for GNU ac_path_SED and select it if it is found.
13624   # Check for GNU $ac_path_SED
13625 case `"$ac_path_SED" --version 2>&1` in
13626 *GNU*)
13627   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13628 *)
13629   ac_count=0
13630   $as_echo_n 0123456789 >"conftest.in"
13631   while :
13632   do
13633     cat "conftest.in" "conftest.in" >"conftest.tmp"
13634     mv "conftest.tmp" "conftest.in"
13635     cp "conftest.in" "conftest.nl"
13636     $as_echo '' >> "conftest.nl"
13637     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13638     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13639     as_fn_arith $ac_count + 1 && ac_count=$as_val
13640     if test $ac_count -gt ${ac_path_SED_max-0}; then
13641       # Best one so far, save it but keep looking for a better one
13642       ac_cv_path_SED="$ac_path_SED"
13643       ac_path_SED_max=$ac_count
13644     fi
13645     # 10*(2^10) chars as input seems more than enough
13646     test $ac_count -gt 10 && break
13647   done
13648   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13649 esac
13650 
13651       $ac_path_SED_found && break 3
13652     done
13653   done
13654   done
13655 IFS=$as_save_IFS
13656   if test -z "$ac_cv_path_SED"; then
13657     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13658   fi
13659 else
13660   ac_cv_path_SED=$SED
13661 fi
13662 
13663 fi
13664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13665 $as_echo "$ac_cv_path_SED" >&6; }
13666  SED="$ac_cv_path_SED"
13667   rm -f conftest.sed
13668 
13669   else
13670     # The variable is set, but is it from the command line or the environment?
13671 
13672     # Try to remove the string !SED! from our list.
13673     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13674     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13675       # If it failed, the variable was not from the command line. Ignore it,
13676       # but warn the user (except for BASH, which is always set by the calling BASH).
13677       if test "xSED" != xBASH; then
13678         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13679 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13680       fi
13681       # Try to locate tool using the code snippet
13682       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13683 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13684 if ${ac_cv_path_SED+:} false; then :
13685   $as_echo_n "(cached) " >&6
13686 else
13687             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13688      for ac_i in 1 2 3 4 5 6 7; do
13689        ac_script="$ac_script$as_nl$ac_script"
13690      done
13691      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13692      { ac_script=; unset ac_script;}
13693      if test -z "$SED"; then
13694   ac_path_SED_found=false
13695   # Loop through the user's path and test for each of PROGNAME-LIST
13696   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13697 for as_dir in $PATH
13698 do
13699   IFS=$as_save_IFS
13700   test -z "$as_dir" && as_dir=.
13701     for ac_prog in sed gsed; do
13702     for ac_exec_ext in '' $ac_executable_extensions; do
13703       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13704       as_fn_executable_p "$ac_path_SED" || continue
13705 # Check for GNU ac_path_SED and select it if it is found.
13706   # Check for GNU $ac_path_SED
13707 case `"$ac_path_SED" --version 2>&1` in
13708 *GNU*)
13709   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13710 *)
13711   ac_count=0
13712   $as_echo_n 0123456789 >"conftest.in"
13713   while :
13714   do
13715     cat "conftest.in" "conftest.in" >"conftest.tmp"
13716     mv "conftest.tmp" "conftest.in"
13717     cp "conftest.in" "conftest.nl"
13718     $as_echo '' >> "conftest.nl"
13719     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13720     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13721     as_fn_arith $ac_count + 1 && ac_count=$as_val
13722     if test $ac_count -gt ${ac_path_SED_max-0}; then
13723       # Best one so far, save it but keep looking for a better one
13724       ac_cv_path_SED="$ac_path_SED"
13725       ac_path_SED_max=$ac_count
13726     fi
13727     # 10*(2^10) chars as input seems more than enough
13728     test $ac_count -gt 10 && break
13729   done
13730   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13731 esac
13732 
13733       $ac_path_SED_found && break 3
13734     done
13735   done
13736   done
13737 IFS=$as_save_IFS
13738   if test -z "$ac_cv_path_SED"; then
13739     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13740   fi
13741 else
13742   ac_cv_path_SED=$SED
13743 fi
13744 
13745 fi
13746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13747 $as_echo "$ac_cv_path_SED" >&6; }
13748  SED="$ac_cv_path_SED"
13749   rm -f conftest.sed
13750 
13751     else
13752       # If it succeeded, then it was overridden by the user. We will use it
13753       # for the tool.
13754 
13755       # First remove it from the list of overridden variables, so we can test
13756       # for unknown variables in the end.
13757       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13758 
13759       # Check if we try to supply an empty value
13760       if test "x$SED" = x; then
13761         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13762 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13763         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13764 $as_echo_n "checking for SED... " >&6; }
13765         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13766 $as_echo "disabled" >&6; }
13767       else
13768         # Check if the provided tool contains a complete path.
13769         tool_specified="$SED"
13770         tool_basename="${tool_specified##*/}"
13771         if test "x$tool_basename" = "x$tool_specified"; then
13772           # A command without a complete path is provided, search $PATH.
13773           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13774 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13775           # Extract the first word of "$tool_basename", so it can be a program name with args.
13776 set dummy $tool_basename; ac_word=$2
13777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13778 $as_echo_n "checking for $ac_word... " >&6; }
13779 if ${ac_cv_path_SED+:} false; then :
13780   $as_echo_n "(cached) " >&6
13781 else
13782   case $SED in
13783   [\\/]* | ?:[\\/]*)
13784   ac_cv_path_SED="$SED" # Let the user override the test with a path.
13785   ;;
13786   *)
13787   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13788 for as_dir in $PATH
13789 do
13790   IFS=$as_save_IFS
13791   test -z "$as_dir" && as_dir=.
13792     for ac_exec_ext in '' $ac_executable_extensions; do
13793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13794     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13796     break 2
13797   fi
13798 done
13799   done
13800 IFS=$as_save_IFS
13801 
13802   ;;
13803 esac
13804 fi
13805 SED=$ac_cv_path_SED
13806 if test -n "$SED"; then
13807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13808 $as_echo "$SED" >&6; }
13809 else
13810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13811 $as_echo "no" >&6; }
13812 fi
13813 
13814 
13815           if test "x$SED" = x; then
13816             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13817           fi
13818         else
13819           # Otherwise we believe it is a complete path. Use it as it is.
13820           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13821 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13822           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13823 $as_echo_n "checking for SED... " >&6; }
13824           if test ! -x "$tool_specified"; then
13825             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13826 $as_echo "not found" >&6; }
13827             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13828           fi
13829           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13830 $as_echo "$tool_specified" >&6; }
13831         fi
13832       fi
13833     fi
13834 
13835   fi
13836 
13837 
13838   if test "x$SED" = x; then
13839     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13840   fi
13841 
13842 
13843 
13844   # Always force rm.
13845   RM="$RM -f"
13846 
13847   # pwd behaves differently on various platforms and some don't support the -L flag.
13848   # Always use the bash builtin pwd to get uniform behavior.
13849   THEPWDCMD=pwd
13850 
13851   # These are not required on all platforms
13852 
13853 
13854   # Publish this variable in the help.
13855 
13856 
13857   if [ -z "${CYGPATH+x}" ]; then
13858     # The variable is not set by user, try to locate tool using the code snippet
13859     for ac_prog in cygpath
13860 do
13861   # Extract the first word of "$ac_prog", so it can be a program name with args.
13862 set dummy $ac_prog; ac_word=$2
13863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13864 $as_echo_n "checking for $ac_word... " >&6; }
13865 if ${ac_cv_path_CYGPATH+:} false; then :
13866   $as_echo_n "(cached) " >&6
13867 else
13868   case $CYGPATH in
13869   [\\/]* | ?:[\\/]*)
13870   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13871   ;;
13872   *)
13873   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13874 for as_dir in $PATH
13875 do
13876   IFS=$as_save_IFS
13877   test -z "$as_dir" && as_dir=.
13878     for ac_exec_ext in '' $ac_executable_extensions; do
13879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13880     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13882     break 2
13883   fi
13884 done
13885   done
13886 IFS=$as_save_IFS
13887 
13888   ;;
13889 esac
13890 fi
13891 CYGPATH=$ac_cv_path_CYGPATH
13892 if test -n "$CYGPATH"; then
13893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13894 $as_echo "$CYGPATH" >&6; }
13895 else
13896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13897 $as_echo "no" >&6; }
13898 fi
13899 
13900 
13901   test -n "$CYGPATH" && break
13902 done
13903 
13904   else
13905     # The variable is set, but is it from the command line or the environment?
13906 
13907     # Try to remove the string !CYGPATH! from our list.
13908     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13909     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13910       # If it failed, the variable was not from the command line. Ignore it,
13911       # but warn the user (except for BASH, which is always set by the calling BASH).
13912       if test "xCYGPATH" != xBASH; then
13913         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13914 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13915       fi
13916       # Try to locate tool using the code snippet
13917       for ac_prog in cygpath
13918 do
13919   # Extract the first word of "$ac_prog", so it can be a program name with args.
13920 set dummy $ac_prog; ac_word=$2
13921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13922 $as_echo_n "checking for $ac_word... " >&6; }
13923 if ${ac_cv_path_CYGPATH+:} false; then :
13924   $as_echo_n "(cached) " >&6
13925 else
13926   case $CYGPATH in
13927   [\\/]* | ?:[\\/]*)
13928   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13929   ;;
13930   *)
13931   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13932 for as_dir in $PATH
13933 do
13934   IFS=$as_save_IFS
13935   test -z "$as_dir" && as_dir=.
13936     for ac_exec_ext in '' $ac_executable_extensions; do
13937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13938     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13940     break 2
13941   fi
13942 done
13943   done
13944 IFS=$as_save_IFS
13945 
13946   ;;
13947 esac
13948 fi
13949 CYGPATH=$ac_cv_path_CYGPATH
13950 if test -n "$CYGPATH"; then
13951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13952 $as_echo "$CYGPATH" >&6; }
13953 else
13954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13955 $as_echo "no" >&6; }
13956 fi
13957 
13958 
13959   test -n "$CYGPATH" && break
13960 done
13961 
13962     else
13963       # If it succeeded, then it was overridden by the user. We will use it
13964       # for the tool.
13965 
13966       # First remove it from the list of overridden variables, so we can test
13967       # for unknown variables in the end.
13968       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13969 
13970       # Check if we try to supply an empty value
13971       if test "x$CYGPATH" = x; then
13972         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13973 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13974         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13975 $as_echo_n "checking for CYGPATH... " >&6; }
13976         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13977 $as_echo "disabled" >&6; }
13978       else
13979         # Check if the provided tool contains a complete path.
13980         tool_specified="$CYGPATH"
13981         tool_basename="${tool_specified##*/}"
13982         if test "x$tool_basename" = "x$tool_specified"; then
13983           # A command without a complete path is provided, search $PATH.
13984           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13985 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13986           # Extract the first word of "$tool_basename", so it can be a program name with args.
13987 set dummy $tool_basename; ac_word=$2
13988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13989 $as_echo_n "checking for $ac_word... " >&6; }
13990 if ${ac_cv_path_CYGPATH+:} false; then :
13991   $as_echo_n "(cached) " >&6
13992 else
13993   case $CYGPATH in
13994   [\\/]* | ?:[\\/]*)
13995   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13996   ;;
13997   *)
13998   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13999 for as_dir in $PATH
14000 do
14001   IFS=$as_save_IFS
14002   test -z "$as_dir" && as_dir=.
14003     for ac_exec_ext in '' $ac_executable_extensions; do
14004   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14005     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14006     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14007     break 2
14008   fi
14009 done
14010   done
14011 IFS=$as_save_IFS
14012 
14013   ;;
14014 esac
14015 fi
14016 CYGPATH=$ac_cv_path_CYGPATH
14017 if test -n "$CYGPATH"; then
14018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14019 $as_echo "$CYGPATH" >&6; }
14020 else
14021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14022 $as_echo "no" >&6; }
14023 fi
14024 
14025 
14026           if test "x$CYGPATH" = x; then
14027             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14028           fi
14029         else
14030           # Otherwise we believe it is a complete path. Use it as it is.
14031           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14032 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14033           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14034 $as_echo_n "checking for CYGPATH... " >&6; }
14035           if test ! -x "$tool_specified"; then
14036             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14037 $as_echo "not found" >&6; }
14038             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14039           fi
14040           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14041 $as_echo "$tool_specified" >&6; }
14042         fi
14043       fi
14044     fi
14045 
14046   fi
14047 
14048 
14049 
14050 
14051   # Publish this variable in the help.
14052 
14053 
14054   if [ -z "${READLINK+x}" ]; then
14055     # The variable is not set by user, try to locate tool using the code snippet
14056     for ac_prog in greadlink readlink
14057 do
14058   # Extract the first word of "$ac_prog", so it can be a program name with args.
14059 set dummy $ac_prog; ac_word=$2
14060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14061 $as_echo_n "checking for $ac_word... " >&6; }
14062 if ${ac_cv_path_READLINK+:} false; then :
14063   $as_echo_n "(cached) " >&6
14064 else
14065   case $READLINK in
14066   [\\/]* | ?:[\\/]*)
14067   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14068   ;;
14069   *)
14070   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14071 for as_dir in $PATH
14072 do
14073   IFS=$as_save_IFS
14074   test -z "$as_dir" && as_dir=.
14075     for ac_exec_ext in '' $ac_executable_extensions; do
14076   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14077     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14079     break 2
14080   fi
14081 done
14082   done
14083 IFS=$as_save_IFS
14084 
14085   ;;
14086 esac
14087 fi
14088 READLINK=$ac_cv_path_READLINK
14089 if test -n "$READLINK"; then
14090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14091 $as_echo "$READLINK" >&6; }
14092 else
14093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14094 $as_echo "no" >&6; }
14095 fi
14096 
14097 
14098   test -n "$READLINK" && break
14099 done
14100 
14101   else
14102     # The variable is set, but is it from the command line or the environment?
14103 
14104     # Try to remove the string !READLINK! from our list.
14105     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14106     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14107       # If it failed, the variable was not from the command line. Ignore it,
14108       # but warn the user (except for BASH, which is always set by the calling BASH).
14109       if test "xREADLINK" != xBASH; then
14110         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14111 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14112       fi
14113       # Try to locate tool using the code snippet
14114       for ac_prog in greadlink readlink
14115 do
14116   # Extract the first word of "$ac_prog", so it can be a program name with args.
14117 set dummy $ac_prog; ac_word=$2
14118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14119 $as_echo_n "checking for $ac_word... " >&6; }
14120 if ${ac_cv_path_READLINK+:} false; then :
14121   $as_echo_n "(cached) " >&6
14122 else
14123   case $READLINK in
14124   [\\/]* | ?:[\\/]*)
14125   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14126   ;;
14127   *)
14128   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14129 for as_dir in $PATH
14130 do
14131   IFS=$as_save_IFS
14132   test -z "$as_dir" && as_dir=.
14133     for ac_exec_ext in '' $ac_executable_extensions; do
14134   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14135     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14136     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14137     break 2
14138   fi
14139 done
14140   done
14141 IFS=$as_save_IFS
14142 
14143   ;;
14144 esac
14145 fi
14146 READLINK=$ac_cv_path_READLINK
14147 if test -n "$READLINK"; then
14148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14149 $as_echo "$READLINK" >&6; }
14150 else
14151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14152 $as_echo "no" >&6; }
14153 fi
14154 
14155 
14156   test -n "$READLINK" && break
14157 done
14158 
14159     else
14160       # If it succeeded, then it was overridden by the user. We will use it
14161       # for the tool.
14162 
14163       # First remove it from the list of overridden variables, so we can test
14164       # for unknown variables in the end.
14165       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14166 
14167       # Check if we try to supply an empty value
14168       if test "x$READLINK" = x; then
14169         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14170 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14171         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14172 $as_echo_n "checking for READLINK... " >&6; }
14173         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14174 $as_echo "disabled" >&6; }
14175       else
14176         # Check if the provided tool contains a complete path.
14177         tool_specified="$READLINK"
14178         tool_basename="${tool_specified##*/}"
14179         if test "x$tool_basename" = "x$tool_specified"; then
14180           # A command without a complete path is provided, search $PATH.
14181           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14182 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14183           # Extract the first word of "$tool_basename", so it can be a program name with args.
14184 set dummy $tool_basename; ac_word=$2
14185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14186 $as_echo_n "checking for $ac_word... " >&6; }
14187 if ${ac_cv_path_READLINK+:} false; then :
14188   $as_echo_n "(cached) " >&6
14189 else
14190   case $READLINK in
14191   [\\/]* | ?:[\\/]*)
14192   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14193   ;;
14194   *)
14195   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14196 for as_dir in $PATH
14197 do
14198   IFS=$as_save_IFS
14199   test -z "$as_dir" && as_dir=.
14200     for ac_exec_ext in '' $ac_executable_extensions; do
14201   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14202     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14204     break 2
14205   fi
14206 done
14207   done
14208 IFS=$as_save_IFS
14209 
14210   ;;
14211 esac
14212 fi
14213 READLINK=$ac_cv_path_READLINK
14214 if test -n "$READLINK"; then
14215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14216 $as_echo "$READLINK" >&6; }
14217 else
14218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14219 $as_echo "no" >&6; }
14220 fi
14221 
14222 
14223           if test "x$READLINK" = x; then
14224             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14225           fi
14226         else
14227           # Otherwise we believe it is a complete path. Use it as it is.
14228           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14229 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14230           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14231 $as_echo_n "checking for READLINK... " >&6; }
14232           if test ! -x "$tool_specified"; then
14233             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14234 $as_echo "not found" >&6; }
14235             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14236           fi
14237           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14238 $as_echo "$tool_specified" >&6; }
14239         fi
14240       fi
14241     fi
14242 
14243   fi
14244 
14245 
14246 
14247 
14248   # Publish this variable in the help.
14249 
14250 
14251   if [ -z "${DF+x}" ]; then
14252     # The variable is not set by user, try to locate tool using the code snippet
14253     for ac_prog in df
14254 do
14255   # Extract the first word of "$ac_prog", so it can be a program name with args.
14256 set dummy $ac_prog; ac_word=$2
14257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14258 $as_echo_n "checking for $ac_word... " >&6; }
14259 if ${ac_cv_path_DF+:} false; then :
14260   $as_echo_n "(cached) " >&6
14261 else
14262   case $DF in
14263   [\\/]* | ?:[\\/]*)
14264   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14265   ;;
14266   *)
14267   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14268 for as_dir in $PATH
14269 do
14270   IFS=$as_save_IFS
14271   test -z "$as_dir" && as_dir=.
14272     for ac_exec_ext in '' $ac_executable_extensions; do
14273   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14274     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14275     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14276     break 2
14277   fi
14278 done
14279   done
14280 IFS=$as_save_IFS
14281 
14282   ;;
14283 esac
14284 fi
14285 DF=$ac_cv_path_DF
14286 if test -n "$DF"; then
14287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14288 $as_echo "$DF" >&6; }
14289 else
14290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14291 $as_echo "no" >&6; }
14292 fi
14293 
14294 
14295   test -n "$DF" && break
14296 done
14297 
14298   else
14299     # The variable is set, but is it from the command line or the environment?
14300 
14301     # Try to remove the string !DF! from our list.
14302     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14303     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14304       # If it failed, the variable was not from the command line. Ignore it,
14305       # but warn the user (except for BASH, which is always set by the calling BASH).
14306       if test "xDF" != xBASH; then
14307         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14308 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14309       fi
14310       # Try to locate tool using the code snippet
14311       for ac_prog in df
14312 do
14313   # Extract the first word of "$ac_prog", so it can be a program name with args.
14314 set dummy $ac_prog; ac_word=$2
14315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14316 $as_echo_n "checking for $ac_word... " >&6; }
14317 if ${ac_cv_path_DF+:} false; then :
14318   $as_echo_n "(cached) " >&6
14319 else
14320   case $DF in
14321   [\\/]* | ?:[\\/]*)
14322   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14323   ;;
14324   *)
14325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14326 for as_dir in $PATH
14327 do
14328   IFS=$as_save_IFS
14329   test -z "$as_dir" && as_dir=.
14330     for ac_exec_ext in '' $ac_executable_extensions; do
14331   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14332     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14334     break 2
14335   fi
14336 done
14337   done
14338 IFS=$as_save_IFS
14339 
14340   ;;
14341 esac
14342 fi
14343 DF=$ac_cv_path_DF
14344 if test -n "$DF"; then
14345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14346 $as_echo "$DF" >&6; }
14347 else
14348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14349 $as_echo "no" >&6; }
14350 fi
14351 
14352 
14353   test -n "$DF" && break
14354 done
14355 
14356     else
14357       # If it succeeded, then it was overridden by the user. We will use it
14358       # for the tool.
14359 
14360       # First remove it from the list of overridden variables, so we can test
14361       # for unknown variables in the end.
14362       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14363 
14364       # Check if we try to supply an empty value
14365       if test "x$DF" = x; then
14366         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14367 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14368         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14369 $as_echo_n "checking for DF... " >&6; }
14370         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14371 $as_echo "disabled" >&6; }
14372       else
14373         # Check if the provided tool contains a complete path.
14374         tool_specified="$DF"
14375         tool_basename="${tool_specified##*/}"
14376         if test "x$tool_basename" = "x$tool_specified"; then
14377           # A command without a complete path is provided, search $PATH.
14378           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14379 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14380           # Extract the first word of "$tool_basename", so it can be a program name with args.
14381 set dummy $tool_basename; ac_word=$2
14382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14383 $as_echo_n "checking for $ac_word... " >&6; }
14384 if ${ac_cv_path_DF+:} false; then :
14385   $as_echo_n "(cached) " >&6
14386 else
14387   case $DF in
14388   [\\/]* | ?:[\\/]*)
14389   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14390   ;;
14391   *)
14392   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14393 for as_dir in $PATH
14394 do
14395   IFS=$as_save_IFS
14396   test -z "$as_dir" && as_dir=.
14397     for ac_exec_ext in '' $ac_executable_extensions; do
14398   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14399     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14400     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14401     break 2
14402   fi
14403 done
14404   done
14405 IFS=$as_save_IFS
14406 
14407   ;;
14408 esac
14409 fi
14410 DF=$ac_cv_path_DF
14411 if test -n "$DF"; then
14412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14413 $as_echo "$DF" >&6; }
14414 else
14415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14416 $as_echo "no" >&6; }
14417 fi
14418 
14419 
14420           if test "x$DF" = x; then
14421             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14422           fi
14423         else
14424           # Otherwise we believe it is a complete path. Use it as it is.
14425           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14426 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14427           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14428 $as_echo_n "checking for DF... " >&6; }
14429           if test ! -x "$tool_specified"; then
14430             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14431 $as_echo "not found" >&6; }
14432             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14433           fi
14434           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14435 $as_echo "$tool_specified" >&6; }
14436         fi
14437       fi
14438     fi
14439 
14440   fi
14441 
14442 
14443 
14444 
14445   # Publish this variable in the help.
14446 
14447 
14448   if [ -z "${CPIO+x}" ]; then
14449     # The variable is not set by user, try to locate tool using the code snippet
14450     for ac_prog in cpio bsdcpio
14451 do
14452   # Extract the first word of "$ac_prog", so it can be a program name with args.
14453 set dummy $ac_prog; ac_word=$2
14454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14455 $as_echo_n "checking for $ac_word... " >&6; }
14456 if ${ac_cv_path_CPIO+:} false; then :
14457   $as_echo_n "(cached) " >&6
14458 else
14459   case $CPIO in
14460   [\\/]* | ?:[\\/]*)
14461   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14462   ;;
14463   *)
14464   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14465 for as_dir in $PATH
14466 do
14467   IFS=$as_save_IFS
14468   test -z "$as_dir" && as_dir=.
14469     for ac_exec_ext in '' $ac_executable_extensions; do
14470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14471     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14473     break 2
14474   fi
14475 done
14476   done
14477 IFS=$as_save_IFS
14478 
14479   ;;
14480 esac
14481 fi
14482 CPIO=$ac_cv_path_CPIO
14483 if test -n "$CPIO"; then
14484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14485 $as_echo "$CPIO" >&6; }
14486 else
14487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14488 $as_echo "no" >&6; }
14489 fi
14490 
14491 
14492   test -n "$CPIO" && break
14493 done
14494 
14495   else
14496     # The variable is set, but is it from the command line or the environment?
14497 
14498     # Try to remove the string !CPIO! from our list.
14499     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14500     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14501       # If it failed, the variable was not from the command line. Ignore it,
14502       # but warn the user (except for BASH, which is always set by the calling BASH).
14503       if test "xCPIO" != xBASH; then
14504         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14505 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14506       fi
14507       # Try to locate tool using the code snippet
14508       for ac_prog in cpio bsdcpio
14509 do
14510   # Extract the first word of "$ac_prog", so it can be a program name with args.
14511 set dummy $ac_prog; ac_word=$2
14512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14513 $as_echo_n "checking for $ac_word... " >&6; }
14514 if ${ac_cv_path_CPIO+:} false; then :
14515   $as_echo_n "(cached) " >&6
14516 else
14517   case $CPIO in
14518   [\\/]* | ?:[\\/]*)
14519   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14520   ;;
14521   *)
14522   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14523 for as_dir in $PATH
14524 do
14525   IFS=$as_save_IFS
14526   test -z "$as_dir" && as_dir=.
14527     for ac_exec_ext in '' $ac_executable_extensions; do
14528   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14529     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14530     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14531     break 2
14532   fi
14533 done
14534   done
14535 IFS=$as_save_IFS
14536 
14537   ;;
14538 esac
14539 fi
14540 CPIO=$ac_cv_path_CPIO
14541 if test -n "$CPIO"; then
14542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14543 $as_echo "$CPIO" >&6; }
14544 else
14545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14546 $as_echo "no" >&6; }
14547 fi
14548 
14549 
14550   test -n "$CPIO" && break
14551 done
14552 
14553     else
14554       # If it succeeded, then it was overridden by the user. We will use it
14555       # for the tool.
14556 
14557       # First remove it from the list of overridden variables, so we can test
14558       # for unknown variables in the end.
14559       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14560 
14561       # Check if we try to supply an empty value
14562       if test "x$CPIO" = x; then
14563         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14564 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14565         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14566 $as_echo_n "checking for CPIO... " >&6; }
14567         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14568 $as_echo "disabled" >&6; }
14569       else
14570         # Check if the provided tool contains a complete path.
14571         tool_specified="$CPIO"
14572         tool_basename="${tool_specified##*/}"
14573         if test "x$tool_basename" = "x$tool_specified"; then
14574           # A command without a complete path is provided, search $PATH.
14575           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14576 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14577           # Extract the first word of "$tool_basename", so it can be a program name with args.
14578 set dummy $tool_basename; ac_word=$2
14579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14580 $as_echo_n "checking for $ac_word... " >&6; }
14581 if ${ac_cv_path_CPIO+:} false; then :
14582   $as_echo_n "(cached) " >&6
14583 else
14584   case $CPIO in
14585   [\\/]* | ?:[\\/]*)
14586   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14587   ;;
14588   *)
14589   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14590 for as_dir in $PATH
14591 do
14592   IFS=$as_save_IFS
14593   test -z "$as_dir" && as_dir=.
14594     for ac_exec_ext in '' $ac_executable_extensions; do
14595   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14596     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14597     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14598     break 2
14599   fi
14600 done
14601   done
14602 IFS=$as_save_IFS
14603 
14604   ;;
14605 esac
14606 fi
14607 CPIO=$ac_cv_path_CPIO
14608 if test -n "$CPIO"; then
14609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14610 $as_echo "$CPIO" >&6; }
14611 else
14612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14613 $as_echo "no" >&6; }
14614 fi
14615 
14616 
14617           if test "x$CPIO" = x; then
14618             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14619           fi
14620         else
14621           # Otherwise we believe it is a complete path. Use it as it is.
14622           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14623 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14624           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14625 $as_echo_n "checking for CPIO... " >&6; }
14626           if test ! -x "$tool_specified"; then
14627             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14628 $as_echo "not found" >&6; }
14629             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14630           fi
14631           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14632 $as_echo "$tool_specified" >&6; }
14633         fi
14634       fi
14635     fi
14636 
14637   fi
14638 
14639 
14640 
14641 
14642   # Publish this variable in the help.
14643 
14644 
14645   if [ -z "${NICE+x}" ]; then
14646     # The variable is not set by user, try to locate tool using the code snippet
14647     for ac_prog in nice
14648 do
14649   # Extract the first word of "$ac_prog", so it can be a program name with args.
14650 set dummy $ac_prog; ac_word=$2
14651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14652 $as_echo_n "checking for $ac_word... " >&6; }
14653 if ${ac_cv_path_NICE+:} false; then :
14654   $as_echo_n "(cached) " >&6
14655 else
14656   case $NICE in
14657   [\\/]* | ?:[\\/]*)
14658   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14659   ;;
14660   *)
14661   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14662 for as_dir in $PATH
14663 do
14664   IFS=$as_save_IFS
14665   test -z "$as_dir" && as_dir=.
14666     for ac_exec_ext in '' $ac_executable_extensions; do
14667   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14668     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14669     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14670     break 2
14671   fi
14672 done
14673   done
14674 IFS=$as_save_IFS
14675 
14676   ;;
14677 esac
14678 fi
14679 NICE=$ac_cv_path_NICE
14680 if test -n "$NICE"; then
14681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14682 $as_echo "$NICE" >&6; }
14683 else
14684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14685 $as_echo "no" >&6; }
14686 fi
14687 
14688 
14689   test -n "$NICE" && break
14690 done
14691 
14692   else
14693     # The variable is set, but is it from the command line or the environment?
14694 
14695     # Try to remove the string !NICE! from our list.
14696     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14697     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14698       # If it failed, the variable was not from the command line. Ignore it,
14699       # but warn the user (except for BASH, which is always set by the calling BASH).
14700       if test "xNICE" != xBASH; then
14701         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14702 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14703       fi
14704       # Try to locate tool using the code snippet
14705       for ac_prog in nice
14706 do
14707   # Extract the first word of "$ac_prog", so it can be a program name with args.
14708 set dummy $ac_prog; ac_word=$2
14709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14710 $as_echo_n "checking for $ac_word... " >&6; }
14711 if ${ac_cv_path_NICE+:} false; then :
14712   $as_echo_n "(cached) " >&6
14713 else
14714   case $NICE in
14715   [\\/]* | ?:[\\/]*)
14716   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14717   ;;
14718   *)
14719   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14720 for as_dir in $PATH
14721 do
14722   IFS=$as_save_IFS
14723   test -z "$as_dir" && as_dir=.
14724     for ac_exec_ext in '' $ac_executable_extensions; do
14725   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14726     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14727     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14728     break 2
14729   fi
14730 done
14731   done
14732 IFS=$as_save_IFS
14733 
14734   ;;
14735 esac
14736 fi
14737 NICE=$ac_cv_path_NICE
14738 if test -n "$NICE"; then
14739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14740 $as_echo "$NICE" >&6; }
14741 else
14742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14743 $as_echo "no" >&6; }
14744 fi
14745 
14746 
14747   test -n "$NICE" && break
14748 done
14749 
14750     else
14751       # If it succeeded, then it was overridden by the user. We will use it
14752       # for the tool.
14753 
14754       # First remove it from the list of overridden variables, so we can test
14755       # for unknown variables in the end.
14756       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14757 
14758       # Check if we try to supply an empty value
14759       if test "x$NICE" = x; then
14760         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14761 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14762         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14763 $as_echo_n "checking for NICE... " >&6; }
14764         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14765 $as_echo "disabled" >&6; }
14766       else
14767         # Check if the provided tool contains a complete path.
14768         tool_specified="$NICE"
14769         tool_basename="${tool_specified##*/}"
14770         if test "x$tool_basename" = "x$tool_specified"; then
14771           # A command without a complete path is provided, search $PATH.
14772           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14773 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14774           # Extract the first word of "$tool_basename", so it can be a program name with args.
14775 set dummy $tool_basename; ac_word=$2
14776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14777 $as_echo_n "checking for $ac_word... " >&6; }
14778 if ${ac_cv_path_NICE+:} false; then :
14779   $as_echo_n "(cached) " >&6
14780 else
14781   case $NICE in
14782   [\\/]* | ?:[\\/]*)
14783   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14784   ;;
14785   *)
14786   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14787 for as_dir in $PATH
14788 do
14789   IFS=$as_save_IFS
14790   test -z "$as_dir" && as_dir=.
14791     for ac_exec_ext in '' $ac_executable_extensions; do
14792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14793     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14795     break 2
14796   fi
14797 done
14798   done
14799 IFS=$as_save_IFS
14800 
14801   ;;
14802 esac
14803 fi
14804 NICE=$ac_cv_path_NICE
14805 if test -n "$NICE"; then
14806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14807 $as_echo "$NICE" >&6; }
14808 else
14809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14810 $as_echo "no" >&6; }
14811 fi
14812 
14813 
14814           if test "x$NICE" = x; then
14815             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14816           fi
14817         else
14818           # Otherwise we believe it is a complete path. Use it as it is.
14819           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14820 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14821           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14822 $as_echo_n "checking for NICE... " >&6; }
14823           if test ! -x "$tool_specified"; then
14824             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14825 $as_echo "not found" >&6; }
14826             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14827           fi
14828           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14829 $as_echo "$tool_specified" >&6; }
14830         fi
14831       fi
14832     fi
14833 
14834   fi
14835 
14836 
14837 
14838 
14839 # Now we can determine OpenJDK build and target platforms. This is required to
14840 # have early on.
14841 # Make sure we can run config.sub.
14842 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14843   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14844 
14845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14846 $as_echo_n "checking build system type... " >&6; }
14847 if ${ac_cv_build+:} false; then :
14848   $as_echo_n "(cached) " >&6
14849 else
14850   ac_build_alias=$build_alias
14851 test "x$ac_build_alias" = x &&
14852   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14853 test "x$ac_build_alias" = x &&
14854   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14855 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14856   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14857 
14858 fi
14859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14860 $as_echo "$ac_cv_build" >&6; }
14861 case $ac_cv_build in
14862 *-*-*) ;;
14863 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14864 esac
14865 build=$ac_cv_build
14866 ac_save_IFS=$IFS; IFS='-'
14867 set x $ac_cv_build
14868 shift
14869 build_cpu=$1
14870 build_vendor=$2
14871 shift; shift
14872 # Remember, the first character of IFS is used to create $*,
14873 # except with old shells:
14874 build_os=$*
14875 IFS=$ac_save_IFS
14876 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14877 
14878 
14879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14880 $as_echo_n "checking host system type... " >&6; }
14881 if ${ac_cv_host+:} false; then :
14882   $as_echo_n "(cached) " >&6
14883 else
14884   if test "x$host_alias" = x; then
14885   ac_cv_host=$ac_cv_build
14886 else
14887   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14888     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14889 fi
14890 
14891 fi
14892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14893 $as_echo "$ac_cv_host" >&6; }
14894 case $ac_cv_host in
14895 *-*-*) ;;
14896 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14897 esac
14898 host=$ac_cv_host
14899 ac_save_IFS=$IFS; IFS='-'
14900 set x $ac_cv_host
14901 shift
14902 host_cpu=$1
14903 host_vendor=$2
14904 shift; shift
14905 # Remember, the first character of IFS is used to create $*,
14906 # except with old shells:
14907 host_os=$*
14908 IFS=$ac_save_IFS
14909 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14910 
14911 
14912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14913 $as_echo_n "checking target system type... " >&6; }
14914 if ${ac_cv_target+:} false; then :
14915   $as_echo_n "(cached) " >&6
14916 else
14917   if test "x$target_alias" = x; then
14918   ac_cv_target=$ac_cv_host
14919 else
14920   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14921     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14922 fi
14923 
14924 fi
14925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14926 $as_echo "$ac_cv_target" >&6; }
14927 case $ac_cv_target in
14928 *-*-*) ;;
14929 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14930 esac
14931 target=$ac_cv_target
14932 ac_save_IFS=$IFS; IFS='-'
14933 set x $ac_cv_target
14934 shift
14935 target_cpu=$1
14936 target_vendor=$2
14937 shift; shift
14938 # Remember, the first character of IFS is used to create $*,
14939 # except with old shells:
14940 target_os=$*
14941 IFS=$ac_save_IFS
14942 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14943 
14944 
14945 # The aliases save the names the user supplied, while $host etc.
14946 # will get canonicalized.
14947 test -n "$target_alias" &&
14948   test "$program_prefix$program_suffix$program_transform_name" = \
14949     NONENONEs,x,x, &&
14950   program_prefix=${target_alias}-
14951 
14952   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14953   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14954   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14955   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14956   # to use the configure naming style.
14957 
14958 
14959 
14960 
14961 
14962   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14963   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14964   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14965   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14966   OPENJDK_TARGET_AUTOCONF_NAME="$host"
14967   OPENJDK_BUILD_AUTOCONF_NAME="$build"
14968 
14969 
14970 
14971   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14972 
14973   case "$build_os" in
14974     *linux*)
14975       VAR_OS=linux
14976       VAR_OS_TYPE=unix
14977       ;;
14978     *solaris*)
14979       VAR_OS=solaris
14980       VAR_OS_TYPE=unix
14981       ;;
14982     *darwin*)
14983       VAR_OS=macosx
14984       VAR_OS_TYPE=unix
14985       ;;
14986     *bsd*)
14987       VAR_OS=bsd
14988       VAR_OS_TYPE=unix
14989       ;;
14990     *cygwin*)
14991       VAR_OS=windows
14992       VAR_OS_ENV=windows.cygwin
14993       ;;
14994     *mingw*)
14995       VAR_OS=windows
14996       VAR_OS_ENV=windows.msys
14997       ;;
14998     *aix*)
14999       VAR_OS=aix
15000       VAR_OS_TYPE=unix
15001       ;;
15002     *)
15003       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15004       ;;
15005   esac
15006 
15007 
15008   # First argument is the cpu name from the trip/quad
15009   case "$build_cpu" in
15010     x86_64)
15011       VAR_CPU=x86_64
15012       VAR_CPU_ARCH=x86
15013       VAR_CPU_BITS=64
15014       VAR_CPU_ENDIAN=little
15015       ;;
15016     i?86)
15017       VAR_CPU=x86
15018       VAR_CPU_ARCH=x86
15019       VAR_CPU_BITS=32
15020       VAR_CPU_ENDIAN=little
15021       ;;
15022     arm*)
15023       VAR_CPU=arm
15024       VAR_CPU_ARCH=arm
15025       VAR_CPU_BITS=32
15026       VAR_CPU_ENDIAN=little
15027       ;;
15028     aarch64)
15029       VAR_CPU=aarch64
15030       VAR_CPU_ARCH=aarch64
15031       VAR_CPU_BITS=64
15032       VAR_CPU_ENDIAN=little
15033       ;;
15034     powerpc)
15035       VAR_CPU=ppc
15036       VAR_CPU_ARCH=ppc
15037       VAR_CPU_BITS=32
15038       VAR_CPU_ENDIAN=big
15039       ;;
15040     powerpc64)
15041       VAR_CPU=ppc64
15042       VAR_CPU_ARCH=ppc
15043       VAR_CPU_BITS=64
15044       VAR_CPU_ENDIAN=big
15045       ;;
15046     powerpc64le)
15047       VAR_CPU=ppc64le
15048       VAR_CPU_ARCH=ppc
15049       VAR_CPU_BITS=64
15050       VAR_CPU_ENDIAN=little
15051       ;;
15052     s390)
15053       VAR_CPU=s390
15054       VAR_CPU_ARCH=s390
15055       VAR_CPU_BITS=32
15056       VAR_CPU_ENDIAN=big
15057       ;;
15058     s390x)
15059       VAR_CPU=s390x
15060       VAR_CPU_ARCH=s390
15061       VAR_CPU_BITS=64
15062       VAR_CPU_ENDIAN=big
15063       ;;
15064     sparc)
15065       VAR_CPU=sparc
15066       VAR_CPU_ARCH=sparc
15067       VAR_CPU_BITS=32
15068       VAR_CPU_ENDIAN=big
15069       ;;
15070     sparcv9|sparc64)
15071       VAR_CPU=sparcv9
15072       VAR_CPU_ARCH=sparc
15073       VAR_CPU_BITS=64
15074       VAR_CPU_ENDIAN=big
15075       ;;
15076     *)
15077       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15078       ;;
15079   esac
15080 
15081   # ..and setup our own variables. (Do this explicitely to facilitate searching)
15082   OPENJDK_BUILD_OS="$VAR_OS"
15083   if test "x$VAR_OS_TYPE" != x; then
15084     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15085   else
15086     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15087   fi
15088   if test "x$VAR_OS_ENV" != x; then
15089     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15090   else
15091     OPENJDK_BUILD_OS_ENV="$VAR_OS"
15092   fi
15093   OPENJDK_BUILD_CPU="$VAR_CPU"
15094   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15095   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15096   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15097 
15098 
15099 
15100 
15101 
15102 
15103 
15104 
15105   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15106 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
15107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15108 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15109 
15110   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15111 
15112   case "$host_os" in
15113     *linux*)
15114       VAR_OS=linux
15115       VAR_OS_TYPE=unix
15116       ;;
15117     *solaris*)
15118       VAR_OS=solaris
15119       VAR_OS_TYPE=unix
15120       ;;
15121     *darwin*)
15122       VAR_OS=macosx
15123       VAR_OS_TYPE=unix
15124       ;;
15125     *bsd*)
15126       VAR_OS=bsd
15127       VAR_OS_TYPE=unix
15128       ;;
15129     *cygwin*)
15130       VAR_OS=windows
15131       VAR_OS_ENV=windows.cygwin
15132       ;;
15133     *mingw*)
15134       VAR_OS=windows
15135       VAR_OS_ENV=windows.msys
15136       ;;
15137     *aix*)
15138       VAR_OS=aix
15139       VAR_OS_TYPE=unix
15140       ;;
15141     *)
15142       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15143       ;;
15144   esac
15145 
15146 
15147   # First argument is the cpu name from the trip/quad
15148   case "$host_cpu" in
15149     x86_64)
15150       VAR_CPU=x86_64
15151       VAR_CPU_ARCH=x86
15152       VAR_CPU_BITS=64
15153       VAR_CPU_ENDIAN=little
15154       ;;
15155     i?86)
15156       VAR_CPU=x86
15157       VAR_CPU_ARCH=x86
15158       VAR_CPU_BITS=32
15159       VAR_CPU_ENDIAN=little
15160       ;;
15161     arm*)
15162       VAR_CPU=arm
15163       VAR_CPU_ARCH=arm
15164       VAR_CPU_BITS=32
15165       VAR_CPU_ENDIAN=little
15166       ;;
15167     aarch64)
15168       VAR_CPU=aarch64
15169       VAR_CPU_ARCH=aarch64
15170       VAR_CPU_BITS=64
15171       VAR_CPU_ENDIAN=little
15172       ;;
15173     powerpc)
15174       VAR_CPU=ppc
15175       VAR_CPU_ARCH=ppc
15176       VAR_CPU_BITS=32
15177       VAR_CPU_ENDIAN=big
15178       ;;
15179     powerpc64)
15180       VAR_CPU=ppc64
15181       VAR_CPU_ARCH=ppc
15182       VAR_CPU_BITS=64
15183       VAR_CPU_ENDIAN=big
15184       ;;
15185     powerpc64le)
15186       VAR_CPU=ppc64le
15187       VAR_CPU_ARCH=ppc
15188       VAR_CPU_BITS=64
15189       VAR_CPU_ENDIAN=little
15190       ;;
15191     s390)
15192       VAR_CPU=s390
15193       VAR_CPU_ARCH=s390
15194       VAR_CPU_BITS=32
15195       VAR_CPU_ENDIAN=big
15196       ;;
15197     s390x)
15198       VAR_CPU=s390x
15199       VAR_CPU_ARCH=s390
15200       VAR_CPU_BITS=64
15201       VAR_CPU_ENDIAN=big
15202       ;;
15203     sparc)
15204       VAR_CPU=sparc
15205       VAR_CPU_ARCH=sparc
15206       VAR_CPU_BITS=32
15207       VAR_CPU_ENDIAN=big
15208       ;;
15209     sparcv9|sparc64)
15210       VAR_CPU=sparcv9
15211       VAR_CPU_ARCH=sparc
15212       VAR_CPU_BITS=64
15213       VAR_CPU_ENDIAN=big
15214       ;;
15215     *)
15216       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15217       ;;
15218   esac
15219 
15220   # ... and setup our own variables. (Do this explicitely to facilitate searching)
15221   OPENJDK_TARGET_OS="$VAR_OS"
15222   if test "x$VAR_OS_TYPE" != x; then
15223     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15224   else
15225     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15226   fi
15227   if test "x$VAR_OS_ENV" != x; then
15228     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15229   else
15230     OPENJDK_TARGET_OS_ENV="$VAR_OS"
15231   fi
15232   OPENJDK_TARGET_CPU="$VAR_CPU"
15233   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15234   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15235   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15236 
15237 
15238 
15239 
15240 
15241 
15242 
15243 
15244   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15245 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
15246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15247 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15248 
15249 
15250 
15251 # Check whether --with-target-bits was given.
15252 if test "${with_target_bits+set}" = set; then :
15253   withval=$with_target_bits;
15254 fi
15255 
15256 
15257   # We have three types of compiles:
15258   # native  == normal compilation, target system == build system
15259   # cross   == traditional cross compilation, target system != build system; special toolchain needed
15260   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15261   #
15262   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15263     # We're doing a proper cross-compilation
15264     COMPILE_TYPE="cross"
15265   else
15266     COMPILE_TYPE="native"
15267   fi
15268 
15269   if test "x$with_target_bits" != x; then
15270     if test "x$COMPILE_TYPE" = "xcross"; then
15271       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15272     fi
15273 
15274     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15275       # A reduced build is requested
15276       COMPILE_TYPE="reduced"
15277       OPENJDK_TARGET_CPU_BITS=32
15278       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15279         OPENJDK_TARGET_CPU=x86
15280       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15281         OPENJDK_TARGET_CPU=sparc
15282       else
15283         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15284       fi
15285     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15286       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
15287     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15288       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15289 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15290     else
15291       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15292     fi
15293   fi
15294 
15295 
15296   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15297 $as_echo_n "checking compilation type... " >&6; }
15298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15299 $as_echo "$COMPILE_TYPE" >&6; }
15300 
15301 
15302   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15303     REQUIRED_OS_NAME=SunOS
15304     REQUIRED_OS_VERSION=5.10
15305   fi
15306   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15307     REQUIRED_OS_NAME=Linux
15308     REQUIRED_OS_VERSION=2.6
15309   fi
15310   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15311     REQUIRED_OS_NAME=Windows
15312     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15313       REQUIRED_OS_VERSION=5.2
15314     else
15315       REQUIRED_OS_VERSION=5.1
15316     fi
15317   fi
15318   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15319     REQUIRED_OS_NAME=Darwin
15320     REQUIRED_OS_VERSION=11.2
15321   fi
15322   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15323     REQUIRED_OS_NAME=AIX
15324     REQUIRED_OS_VERSION=7.1
15325   fi
15326 
15327 
15328 
15329 
15330 
15331 
15332   # Also store the legacy naming of the cpu.
15333   # Ie i586 and amd64 instead of x86 and x86_64
15334   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15335   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15336     OPENJDK_TARGET_CPU_LEGACY="i586"
15337   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15338     # On all platforms except MacOSX replace x86_64 with amd64.
15339     OPENJDK_TARGET_CPU_LEGACY="amd64"
15340   fi
15341 
15342 
15343   # And the second legacy naming of the cpu.
15344   # Ie i386 and amd64 instead of x86 and x86_64.
15345   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15346   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15347     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15348   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15349     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15350   fi
15351 
15352 
15353   # This is the name of the cpu (but using i386 and amd64 instead of
15354   # x86 and x86_64, respectively), preceeded by a /, to be used when
15355   # locating libraries. On macosx, it's empty, though.
15356   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15357   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15358     OPENJDK_TARGET_CPU_LIBDIR=""
15359   fi
15360 
15361 
15362   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15363   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15364   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15365   OPENJDK_TARGET_CPU_ISADIR=""
15366   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15367     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15368       OPENJDK_TARGET_CPU_ISADIR="/amd64"
15369     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15370       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15371     fi
15372   fi
15373 
15374 
15375   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15376   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15377   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15378     # On linux only, we replace x86 with i386.
15379     OPENJDK_TARGET_CPU_OSARCH="i386"
15380   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15381     # On all platforms except macosx, we replace x86_64 with amd64.
15382     OPENJDK_TARGET_CPU_OSARCH="amd64"
15383   fi
15384 
15385 
15386   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15387   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15388     OPENJDK_TARGET_CPU_JLI="i386"
15389   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15390     # On all platforms except macosx, we replace x86_64 with amd64.
15391     OPENJDK_TARGET_CPU_JLI="amd64"
15392   fi
15393   # Now setup the -D flags for building libjli.
15394   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15395   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15396     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15397       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15398     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15399       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15400     fi
15401   fi
15402 
15403 
15404   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15405       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15406   else
15407       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15408   fi
15409 
15410 
15411   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15412     A_LP64="LP64:="
15413     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15414     # unpack200.exe
15415     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15416       OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15417     fi
15418   fi
15419   LP64=$A_LP64
15420 
15421 
15422   if test "x$COMPILE_TYPE" = "xcross"; then
15423     # FIXME: ... or should this include reduced builds..?
15424     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15425   else
15426     DEFINE_CROSS_COMPILE_ARCH=""
15427   fi
15428 
15429 
15430   # Convert openjdk platform names to hotspot names
15431 
15432   HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15433   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15434     HOTSPOT_TARGET_OS=bsd
15435   fi
15436 
15437 
15438   HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15439   if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15440     HOTSPOT_TARGET_OS_TYPE=posix
15441   fi
15442 
15443 
15444   HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15445   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15446     HOTSPOT_TARGET_CPU=x86_32
15447   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15448     HOTSPOT_TARGET_CPU=sparc
15449   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15450     HOTSPOT_TARGET_CPU=ppc_64
15451   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15452     HOTSPOT_TARGET_CPU=ppc_64
15453   fi
15454 
15455 
15456   # This is identical with OPENJDK_*, but define anyway for consistency.
15457   HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15458 
15459 
15460   # Setup HOTSPOT_TARGET_CPU_DEFINE
15461   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15462     HOTSPOT_TARGET_CPU_DEFINE=IA32
15463   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15464     HOTSPOT_TARGET_CPU_DEFINE=AMD64
15465   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15466     HOTSPOT_TARGET_CPU_DEFINE=SPARC
15467   elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15468     HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15469   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15470     HOTSPOT_TARGET_CPU_DEFINE=PPC64
15471   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15472     HOTSPOT_TARGET_CPU_DEFINE=PPC64
15473 
15474   # The cpu defines below are for zero, we don't support them directly.
15475   elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15476     HOTSPOT_TARGET_CPU_DEFINE=SPARC
15477   elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15478     HOTSPOT_TARGET_CPU_DEFINE=PPC32
15479   elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15480     HOTSPOT_TARGET_CPU_DEFINE=S390
15481   elif test "x$OPENJDK_TARGET_CPU" = ss390x; then
15482     HOTSPOT_TARGET_CPU_DEFINE=S390
15483   fi
15484 
15485 
15486 
15487 
15488   # Also store the legacy naming of the cpu.
15489   # Ie i586 and amd64 instead of x86 and x86_64
15490   OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15491   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15492     OPENJDK_BUILD_CPU_LEGACY="i586"
15493   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15494     # On all platforms except MacOSX replace x86_64 with amd64.
15495     OPENJDK_BUILD_CPU_LEGACY="amd64"
15496   fi
15497 
15498 
15499   # And the second legacy naming of the cpu.
15500   # Ie i386 and amd64 instead of x86 and x86_64.
15501   OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15502   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15503     OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15504   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15505     OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15506   fi
15507 
15508 
15509   # This is the name of the cpu (but using i386 and amd64 instead of
15510   # x86 and x86_64, respectively), preceeded by a /, to be used when
15511   # locating libraries. On macosx, it's empty, though.
15512   OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15513   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15514     OPENJDK_BUILD_CPU_LIBDIR=""
15515   fi
15516 
15517 
15518   # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15519   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15520   # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15521   OPENJDK_BUILD_CPU_ISADIR=""
15522   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15523     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15524       OPENJDK_BUILD_CPU_ISADIR="/amd64"
15525     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15526       OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15527     fi
15528   fi
15529 
15530 
15531   # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15532   OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15533   if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15534     # On linux only, we replace x86 with i386.
15535     OPENJDK_BUILD_CPU_OSARCH="i386"
15536   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15537     # On all platforms except macosx, we replace x86_64 with amd64.
15538     OPENJDK_BUILD_CPU_OSARCH="amd64"
15539   fi
15540 
15541 
15542   OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15543   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15544     OPENJDK_BUILD_CPU_JLI="i386"
15545   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15546     # On all platforms except macosx, we replace x86_64 with amd64.
15547     OPENJDK_BUILD_CPU_JLI="amd64"
15548   fi
15549   # Now setup the -D flags for building libjli.
15550   OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
15551   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15552     if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
15553       OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15554     elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
15555       OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15556     fi
15557   fi
15558 
15559 
15560   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15561       OPENJDK_BUILD_OS_EXPORT_DIR=macosx
15562   else
15563       OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
15564   fi
15565 
15566 
15567   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
15568     A_LP64="LP64:="
15569     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15570     # unpack200.exe
15571     if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
15572       OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
15573     fi
15574   fi
15575   LP64=$A_LP64
15576 
15577 
15578   if test "x$COMPILE_TYPE" = "xcross"; then
15579     # FIXME: ... or should this include reduced builds..?
15580     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
15581   else
15582     DEFINE_CROSS_COMPILE_ARCH=""
15583   fi
15584 
15585 
15586   # Convert openjdk platform names to hotspot names
15587 
15588   HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
15589   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15590     HOTSPOT_BUILD_OS=bsd
15591   fi
15592 
15593 
15594   HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
15595   if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
15596     HOTSPOT_BUILD_OS_TYPE=posix
15597   fi
15598 
15599 
15600   HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
15601   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15602     HOTSPOT_BUILD_CPU=x86_32
15603   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15604     HOTSPOT_BUILD_CPU=sparc
15605   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15606     HOTSPOT_BUILD_CPU=ppc_64
15607   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15608     HOTSPOT_BUILD_CPU=ppc_64
15609   fi
15610 
15611 
15612   # This is identical with OPENJDK_*, but define anyway for consistency.
15613   HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
15614 
15615 
15616   # Setup HOTSPOT_BUILD_CPU_DEFINE
15617   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15618     HOTSPOT_BUILD_CPU_DEFINE=IA32
15619   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15620     HOTSPOT_BUILD_CPU_DEFINE=AMD64
15621   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15622     HOTSPOT_BUILD_CPU_DEFINE=SPARC
15623   elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
15624     HOTSPOT_BUILD_CPU_DEFINE=AARCH64
15625   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15626     HOTSPOT_BUILD_CPU_DEFINE=PPC64
15627   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15628     HOTSPOT_BUILD_CPU_DEFINE=PPC64
15629 
15630   # The cpu defines below are for zero, we don't support them directly.
15631   elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
15632     HOTSPOT_BUILD_CPU_DEFINE=SPARC
15633   elif test "x$OPENJDK_BUILD_CPU" = xppc; then
15634     HOTSPOT_BUILD_CPU_DEFINE=PPC32
15635   elif test "x$OPENJDK_BUILD_CPU" = xs390; then
15636     HOTSPOT_BUILD_CPU_DEFINE=S390
15637   elif test "x$OPENJDK_BUILD_CPU" = ss390x; then
15638     HOTSPOT_BUILD_CPU_DEFINE=S390
15639   fi
15640 
15641 
15642 
15643 
15644   # ZERO_ARCHDEF is used to enable architecture-specific code.
15645   # This is used in legacy hotspot build.
15646   ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
15647 
15648 
15649 
15650 
15651 
15652 # Continue setting up basic stuff. Most remaining code require fundamental tools.
15653 
15654   # Save the current directory this script was started from
15655   CURDIR="$PWD"
15656 
15657   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15658   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15659   # was not available at that time.
15660   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15661   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15662     ORIGINAL_PATH="$REWRITTEN_PATH"
15663     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15664 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15665   fi
15666 
15667   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15668     PATH_SEP=";"
15669 
15670   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15671   if test $SRC_ROOT_LENGTH -gt 100; then
15672     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15673   fi
15674 
15675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15676     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15677 $as_echo_n "checking cygwin release... " >&6; }
15678     CYGWIN_VERSION=`$UNAME -r`
15679     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15680 $as_echo "$CYGWIN_VERSION" >&6; }
15681     WINDOWS_ENV_VENDOR='cygwin'
15682     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15683 
15684     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15685     if test "x$CYGWIN_VERSION_OLD" != x; then
15686       { $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
15687 $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;}
15688       as_fn_error $? "Cannot continue" "$LINENO" 5
15689     fi
15690     if test "x$CYGPATH" = x; then
15691       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15692     fi
15693     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15694 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15695     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15696     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15697     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15698     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15699     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15700 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
15701     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15702     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15703     if test "x$test_cygdrive_prefix" = x; then
15704       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15705     fi
15706   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15707     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15708 $as_echo_n "checking msys release... " >&6; }
15709     MSYS_VERSION=`$UNAME -r`
15710     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15711 $as_echo "$MSYS_VERSION" >&6; }
15712 
15713     WINDOWS_ENV_VENDOR='msys'
15714     WINDOWS_ENV_VERSION="$MSYS_VERSION"
15715 
15716     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15717 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
15718     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15719     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15720 
15721   windows_path="$MSYS_ROOT_PATH"
15722   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15723     unix_path=`$CYGPATH -u "$windows_path"`
15724     MSYS_ROOT_PATH="$unix_path"
15725   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15726     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15727     MSYS_ROOT_PATH="$unix_path"
15728   fi
15729 
15730     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15731 $as_echo "$MSYS_ROOT_PATH" >&6; }
15732     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15733   else
15734     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15735   fi
15736 
15737   # Test if windows or unix (cygwin/msys) find is first in path.
15738   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15739 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15740   FIND_BINARY_OUTPUT=`find --version 2>&1`
15741   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15742     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15743 $as_echo "unix style" >&6; }
15744   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15745     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15746 $as_echo "Windows" >&6; }
15747     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15748 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15749     { $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
15750 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15751     as_fn_error $? "Cannot continue" "$LINENO" 5
15752   else
15753     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15754 $as_echo "unknown" >&6; }
15755     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15756 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15757   fi
15758 
15759   else
15760     PATH_SEP=":"
15761   fi
15762 
15763 
15764   # We get the top-level directory from the supporting wrappers.
15765   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15766 $as_echo_n "checking for top-level directory... " >&6; }
15767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15768 $as_echo "$TOPDIR" >&6; }
15769 
15770 
15771   # Save the original version of TOPDIR for string comparisons
15772   ORIGINAL_TOPDIR="$TOPDIR"
15773 
15774 
15775   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15776 
15777   # Only process if variable expands to non-empty
15778 
15779   if test "x$CURDIR" != x; then
15780     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15781 
15782   # Input might be given as Windows format, start by converting to
15783   # unix format.
15784   path="$CURDIR"
15785   new_path=`$CYGPATH -u "$path"`
15786 
15787   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15788   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15789   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15790   # "foo.exe" is OK but "foo" is an error.
15791   #
15792   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15793   # It is also a way to make sure we got the proper file name for the real test later on.
15794   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15795   if test "x$test_shortpath" = x; then
15796     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15797 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15798     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15799   fi
15800 
15801   # Call helper function which possibly converts this using DOS-style short mode.
15802   # If so, the updated path is stored in $new_path.
15803 
15804   input_path="$new_path"
15805   # Check if we need to convert this using DOS-style short mode. If the path
15806   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15807   # take no chances and rewrite it.
15808   # Note: m4 eats our [], so we need to use [ and ] instead.
15809   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15810   if test "x$has_forbidden_chars" != x; then
15811     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15812     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15813     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15814     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15815       # Going to short mode and back again did indeed matter. Since short mode is
15816       # case insensitive, let's make it lowercase to improve readability.
15817       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15818       # Now convert it back to Unix-style (cygpath)
15819       input_path=`$CYGPATH -u "$shortmode_path"`
15820       new_path="$input_path"
15821     fi
15822   fi
15823 
15824   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15825   if test "x$test_cygdrive_prefix" = x; then
15826     # As a simple fix, exclude /usr/bin since it's not a real path.
15827     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15828       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15829       # a path prefixed by /cygdrive for fixpath to work.
15830       new_path="$CYGWIN_ROOT_PATH$input_path"
15831     fi
15832   fi
15833 
15834 
15835   if test "x$path" != "x$new_path"; then
15836     CURDIR="$new_path"
15837     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15838 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15839   fi
15840 
15841     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15842 
15843   path="$CURDIR"
15844   has_colon=`$ECHO $path | $GREP ^.:`
15845   new_path="$path"
15846   if test "x$has_colon" = x; then
15847     # Not in mixed or Windows style, start by that.
15848     new_path=`cmd //c echo $path`
15849   fi
15850 
15851 
15852   input_path="$new_path"
15853   # Check if we need to convert this using DOS-style short mode. If the path
15854   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15855   # take no chances and rewrite it.
15856   # Note: m4 eats our [], so we need to use [ and ] instead.
15857   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15858   if test "x$has_forbidden_chars" != x; then
15859     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15860     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15861   fi
15862 
15863 
15864   windows_path="$new_path"
15865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15866     unix_path=`$CYGPATH -u "$windows_path"`
15867     new_path="$unix_path"
15868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15869     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15870     new_path="$unix_path"
15871   fi
15872 
15873   if test "x$path" != "x$new_path"; then
15874     CURDIR="$new_path"
15875     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15876 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15877   fi
15878 
15879   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15880   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15881 
15882     else
15883       # We're on a unix platform. Hooray! :)
15884       path="$CURDIR"
15885       has_space=`$ECHO "$path" | $GREP " "`
15886       if test "x$has_space" != x; then
15887         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15888 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15889         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15890       fi
15891 
15892       # Use eval to expand a potential ~
15893       eval path="$path"
15894       if test ! -f "$path" && test ! -d "$path"; then
15895         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15896       fi
15897 
15898       if test -d "$path"; then
15899         CURDIR="`cd "$path"; $THEPWDCMD -L`"
15900       else
15901         dir="`$DIRNAME "$path"`"
15902         base="`$BASENAME "$path"`"
15903         CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15904       fi
15905     fi
15906   fi
15907 
15908 
15909   # Only process if variable expands to non-empty
15910 
15911   if test "x$TOPDIR" != x; then
15912     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15913 
15914   # Input might be given as Windows format, start by converting to
15915   # unix format.
15916   path="$TOPDIR"
15917   new_path=`$CYGPATH -u "$path"`
15918 
15919   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15920   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15921   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15922   # "foo.exe" is OK but "foo" is an error.
15923   #
15924   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15925   # It is also a way to make sure we got the proper file name for the real test later on.
15926   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15927   if test "x$test_shortpath" = x; then
15928     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15929 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15930     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15931   fi
15932 
15933   # Call helper function which possibly converts this using DOS-style short mode.
15934   # If so, the updated path is stored in $new_path.
15935 
15936   input_path="$new_path"
15937   # Check if we need to convert this using DOS-style short mode. If the path
15938   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15939   # take no chances and rewrite it.
15940   # Note: m4 eats our [], so we need to use [ and ] instead.
15941   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15942   if test "x$has_forbidden_chars" != x; then
15943     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15944     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15945     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15946     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15947       # Going to short mode and back again did indeed matter. Since short mode is
15948       # case insensitive, let's make it lowercase to improve readability.
15949       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15950       # Now convert it back to Unix-style (cygpath)
15951       input_path=`$CYGPATH -u "$shortmode_path"`
15952       new_path="$input_path"
15953     fi
15954   fi
15955 
15956   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15957   if test "x$test_cygdrive_prefix" = x; then
15958     # As a simple fix, exclude /usr/bin since it's not a real path.
15959     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15960       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15961       # a path prefixed by /cygdrive for fixpath to work.
15962       new_path="$CYGWIN_ROOT_PATH$input_path"
15963     fi
15964   fi
15965 
15966 
15967   if test "x$path" != "x$new_path"; then
15968     TOPDIR="$new_path"
15969     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15970 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15971   fi
15972 
15973     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15974 
15975   path="$TOPDIR"
15976   has_colon=`$ECHO $path | $GREP ^.:`
15977   new_path="$path"
15978   if test "x$has_colon" = x; then
15979     # Not in mixed or Windows style, start by that.
15980     new_path=`cmd //c echo $path`
15981   fi
15982 
15983 
15984   input_path="$new_path"
15985   # Check if we need to convert this using DOS-style short mode. If the path
15986   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15987   # take no chances and rewrite it.
15988   # Note: m4 eats our [], so we need to use [ and ] instead.
15989   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15990   if test "x$has_forbidden_chars" != x; then
15991     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15992     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15993   fi
15994 
15995 
15996   windows_path="$new_path"
15997   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15998     unix_path=`$CYGPATH -u "$windows_path"`
15999     new_path="$unix_path"
16000   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16001     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16002     new_path="$unix_path"
16003   fi
16004 
16005   if test "x$path" != "x$new_path"; then
16006     TOPDIR="$new_path"
16007     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16008 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16009   fi
16010 
16011   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16012   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16013 
16014     else
16015       # We're on a unix platform. Hooray! :)
16016       path="$TOPDIR"
16017       has_space=`$ECHO "$path" | $GREP " "`
16018       if test "x$has_space" != x; then
16019         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16020 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16021         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16022       fi
16023 
16024       # Use eval to expand a potential ~
16025       eval path="$path"
16026       if test ! -f "$path" && test ! -d "$path"; then
16027         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16028       fi
16029 
16030       if test -d "$path"; then
16031         TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16032       else
16033         dir="`$DIRNAME "$path"`"
16034         base="`$BASENAME "$path"`"
16035         TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16036       fi
16037     fi
16038   fi
16039 
16040   # SRC_ROOT is a traditional alias for TOPDIR.
16041   SRC_ROOT=$TOPDIR
16042 
16043   # Calculate a canonical version of TOPDIR for string comparisons
16044   CANONICAL_TOPDIR=$TOPDIR
16045 
16046   if test "x$OPENJDK_BUILD_OS" != xwindows; then
16047     # Follow a chain of symbolic links. Use readlink
16048     # where it exists, else fall back to horribly
16049     # complicated shell code.
16050     if test "x$READLINK_TESTED" != yes; then
16051       # On MacOSX there is a readlink tool with a different
16052       # purpose than the GNU readlink tool. Check the found readlink.
16053       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16054       if test "x$ISGNU" = x; then
16055         # A readlink that we do not know how to use.
16056         # Are there other non-GNU readlinks out there?
16057         READLINK_TESTED=yes
16058         READLINK=
16059       fi
16060     fi
16061 
16062     if test "x$READLINK" != x; then
16063       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16064     else
16065       # Save the current directory for restoring afterwards
16066       STARTDIR=$PWD
16067       COUNTER=0
16068       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16069       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16070       cd $sym_link_dir
16071       # Use -P flag to resolve symlinks in directories.
16072       cd `$THEPWDCMD -P`
16073       sym_link_dir=`$THEPWDCMD -P`
16074       # Resolve file symlinks
16075       while test $COUNTER -lt 20; do
16076         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16077         if test "x$ISLINK" == x; then
16078           # This is not a symbolic link! We are done!
16079           break
16080         fi
16081         # Again resolve directory symlinks since the target of the just found
16082         # link could be in a different directory
16083         cd `$DIRNAME $ISLINK`
16084         sym_link_dir=`$THEPWDCMD -P`
16085         sym_link_file=`$BASENAME $ISLINK`
16086         let COUNTER=COUNTER+1
16087       done
16088       cd $STARTDIR
16089       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16090     fi
16091   fi
16092 
16093 
16094 
16095   # Locate the directory of this script.
16096   AUTOCONF_DIR=$TOPDIR/common/autoconf
16097 
16098   # Setup username (for use in adhoc version strings etc)
16099   # Outer [ ] to quote m4.
16100    USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16101 
16102 
16103 
16104 # Check if it's a pure open build or if custom sources are to be used.
16105 
16106   # Check whether --enable-openjdk-only was given.
16107 if test "${enable_openjdk_only+set}" = set; then :
16108   enableval=$enable_openjdk_only;
16109 else
16110   enable_openjdk_only="no"
16111 fi
16112 
16113 
16114   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
16115 $as_echo_n "checking for presence of closed sources... " >&6; }
16116   if test -d "$SRC_ROOT/jdk/src/closed"; then
16117     CLOSED_SOURCE_PRESENT=yes
16118   else
16119     CLOSED_SOURCE_PRESENT=no
16120   fi
16121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
16122 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
16123 
16124   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
16125 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
16126   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
16127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
16128 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
16129 
16130   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
16131     OPENJDK=true
16132     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16133       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
16134 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
16135     fi
16136   else
16137     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16138       OPENJDK=true
16139     else
16140       OPENJDK=false
16141     fi
16142   fi
16143 
16144   if test "x$OPENJDK" = "xtrue"; then
16145     SET_OPENJDK="OPENJDK=true"
16146   fi
16147 
16148 
16149 
16150   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16151   # the IncludeCustomExtension macro.
16152 
16153 
16154 # Check whether --with-custom-make-dir was given.
16155 if test "${with_custom_make_dir+set}" = set; then :
16156   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
16157 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16158 fi
16159 
16160 
16161 
16162 
16163 # These are needed to be able to create a configuration name (and thus the output directory)
16164 
16165   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16166 $as_echo_n "checking which variant of the JDK to build... " >&6; }
16167 
16168 # Check whether --with-jdk-variant was given.
16169 if test "${with_jdk_variant+set}" = set; then :
16170   withval=$with_jdk_variant;
16171 fi
16172 
16173 
16174   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16175     JDK_VARIANT="normal"
16176   else
16177     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16178   fi
16179 
16180 
16181 
16182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16183 $as_echo "$JDK_VARIANT" >&6; }
16184 
16185 
16186   DEBUG_LEVEL="release"
16187   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16188 $as_echo_n "checking which debug level to use... " >&6; }
16189   # Check whether --enable-debug was given.
16190 if test "${enable_debug+set}" = set; then :
16191   enableval=$enable_debug;
16192         ENABLE_DEBUG="${enableval}"
16193         DEBUG_LEVEL="fastdebug"
16194 
16195 else
16196   ENABLE_DEBUG="no"
16197 fi
16198 
16199 
16200 
16201 # Check whether --with-debug-level was given.
16202 if test "${with_debug_level+set}" = set; then :
16203   withval=$with_debug_level;
16204         DEBUG_LEVEL="${withval}"
16205         if test "x$ENABLE_DEBUG" = xyes; then
16206           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16207         fi
16208 
16209 fi
16210 
16211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16212 $as_echo "$DEBUG_LEVEL" >&6; }
16213 
16214   if test "x$DEBUG_LEVEL" != xrelease && \
16215       test "x$DEBUG_LEVEL" != xoptimized && \
16216       test "x$DEBUG_LEVEL" != xfastdebug && \
16217       test "x$DEBUG_LEVEL" != xslowdebug; then
16218     as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16219   fi
16220 
16221   # Translate DEBUG_LEVEL to debug level used by Hotspot
16222   HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16223   if test "x$DEBUG_LEVEL" = xrelease; then
16224     HOTSPOT_DEBUG_LEVEL="product"
16225   elif test "x$DEBUG_LEVEL" = xslowdebug; then
16226     HOTSPOT_DEBUG_LEVEL="debug"
16227   fi
16228 
16229   if test "x$DEBUG_LEVEL" = xoptimized; then
16230     # The debug level 'optimized' is a little special because it is currently only
16231     # applicable to the HotSpot build where it means to build a completely
16232     # optimized version of the VM without any debugging code (like for the
16233     # 'release' debug level which is called 'product' in the HotSpot build) but
16234     # with the exception that it can contain additional code which is otherwise
16235     # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16236     # test new and/or experimental features which are not intended for customer
16237     # shipment. Because these new features need to be tested and benchmarked in
16238     # real world scenarios, we want to build the containing JDK at the 'release'
16239     # debug level.
16240     DEBUG_LEVEL="release"
16241   fi
16242 
16243 
16244 
16245 
16246 
16247 
16248 # Check whether --with-jvm-variants was given.
16249 if test "${with_jvm_variants+set}" = set; then :
16250   withval=$with_jvm_variants;
16251 fi
16252 
16253 
16254   if test "x$with_jvm_variants" = x; then
16255     with_jvm_variants="server"
16256   fi
16257   JVM_VARIANTS_OPT="$with_jvm_variants"
16258 
16259   # Has the user listed more than one variant?
16260   # Additional [] needed to keep m4 from mangling shell constructs.
16261   if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16262     BUILDING_MULTIPLE_JVM_VARIANTS=true
16263   else
16264     BUILDING_MULTIPLE_JVM_VARIANTS=false
16265   fi
16266   # Replace the commas with AND for use in the build directory name.
16267   JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16268 
16269   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16270 $as_echo_n "checking which variants of the JVM to build... " >&6; }
16271   # JVM_VARIANTS is a space-separated list.
16272   # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16273   JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16275 $as_echo "$JVM_VARIANTS" >&6; }
16276 
16277   # Check that the selected variants are valid
16278 
16279   # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16280   # Notice that the original variant failes on SLES 10 and 11
16281   NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16282   STACK=${JVM_VARIANTS// /$'\n'}
16283   INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16284   if test "x$INVALID_VARIANTS" != x; then
16285     { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16286 $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16287     as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16288   fi
16289 
16290   # All "special" variants share the same output directory ("server")
16291   VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16292   NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16293   STACK=${JVM_VARIANTS// /$'\n'}
16294   INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16295   if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16296     as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16297   fi
16298 
16299 
16300 
16301 
16302   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16303     # zero behaves as a platform and rewrites these values. This is really weird. :(
16304     # We are guaranteed that we do not build any other variants when building zero.
16305     HOTSPOT_TARGET_CPU=zero
16306     HOTSPOT_TARGET_CPU_ARCH=zero
16307   fi
16308 
16309 
16310 # With basic setup done, call the custom early hook.
16311 
16312 
16313 # Check if we have devkits, extra paths or sysroot set.
16314 
16315 
16316 # Check whether --with-devkit was given.
16317 if test "${with_devkit+set}" = set; then :
16318   withval=$with_devkit;
16319 
16320   # Only process if variable expands to non-empty
16321 
16322   if test "x$with_devkit" != x; then
16323     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16324 
16325   # Input might be given as Windows format, start by converting to
16326   # unix format.
16327   path="$with_devkit"
16328   new_path=`$CYGPATH -u "$path"`
16329 
16330   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16331   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16332   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16333   # "foo.exe" is OK but "foo" is an error.
16334   #
16335   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16336   # It is also a way to make sure we got the proper file name for the real test later on.
16337   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16338   if test "x$test_shortpath" = x; then
16339     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16340 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16341     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16342   fi
16343 
16344   # Call helper function which possibly converts this using DOS-style short mode.
16345   # If so, the updated path is stored in $new_path.
16346 
16347   input_path="$new_path"
16348   # Check if we need to convert this using DOS-style short mode. If the path
16349   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16350   # take no chances and rewrite it.
16351   # Note: m4 eats our [], so we need to use [ and ] instead.
16352   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16353   if test "x$has_forbidden_chars" != x; then
16354     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16355     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16356     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16357     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16358       # Going to short mode and back again did indeed matter. Since short mode is
16359       # case insensitive, let's make it lowercase to improve readability.
16360       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16361       # Now convert it back to Unix-style (cygpath)
16362       input_path=`$CYGPATH -u "$shortmode_path"`
16363       new_path="$input_path"
16364     fi
16365   fi
16366 
16367   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16368   if test "x$test_cygdrive_prefix" = x; then
16369     # As a simple fix, exclude /usr/bin since it's not a real path.
16370     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16371       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16372       # a path prefixed by /cygdrive for fixpath to work.
16373       new_path="$CYGWIN_ROOT_PATH$input_path"
16374     fi
16375   fi
16376 
16377 
16378   if test "x$path" != "x$new_path"; then
16379     with_devkit="$new_path"
16380     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16381 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16382   fi
16383 
16384     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16385 
16386   path="$with_devkit"
16387   has_colon=`$ECHO $path | $GREP ^.:`
16388   new_path="$path"
16389   if test "x$has_colon" = x; then
16390     # Not in mixed or Windows style, start by that.
16391     new_path=`cmd //c echo $path`
16392   fi
16393 
16394 
16395   input_path="$new_path"
16396   # Check if we need to convert this using DOS-style short mode. If the path
16397   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16398   # take no chances and rewrite it.
16399   # Note: m4 eats our [], so we need to use [ and ] instead.
16400   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16401   if test "x$has_forbidden_chars" != x; then
16402     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16403     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16404   fi
16405 
16406 
16407   windows_path="$new_path"
16408   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16409     unix_path=`$CYGPATH -u "$windows_path"`
16410     new_path="$unix_path"
16411   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16412     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16413     new_path="$unix_path"
16414   fi
16415 
16416   if test "x$path" != "x$new_path"; then
16417     with_devkit="$new_path"
16418     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16419 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16420   fi
16421 
16422   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16423   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16424 
16425     else
16426       # We're on a unix platform. Hooray! :)
16427       path="$with_devkit"
16428       has_space=`$ECHO "$path" | $GREP " "`
16429       if test "x$has_space" != x; then
16430         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16431 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16432         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16433       fi
16434 
16435       # Use eval to expand a potential ~
16436       eval path="$path"
16437       if test ! -f "$path" && test ! -d "$path"; then
16438         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16439       fi
16440 
16441       if test -d "$path"; then
16442         with_devkit="`cd "$path"; $THEPWDCMD -L`"
16443       else
16444         dir="`$DIRNAME "$path"`"
16445         base="`$BASENAME "$path"`"
16446         with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16447       fi
16448     fi
16449   fi
16450 
16451         DEVKIT_ROOT="$with_devkit"
16452         # Check for a meta data info file in the root of the devkit
16453         if test -f "$DEVKIT_ROOT/devkit.info"; then
16454           . $DEVKIT_ROOT/devkit.info
16455           # This potentially sets the following:
16456           # A descriptive name of the devkit
16457 
16458   if test "x$DEVKIT_NAME" = x; then
16459     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16460   fi
16461 
16462           # Corresponds to --with-extra-path
16463 
16464   if test "x$DEVKIT_EXTRA_PATH" = x; then
16465     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16466   fi
16467 
16468           # Corresponds to --with-toolchain-path
16469 
16470   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16471     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16472   fi
16473 
16474           # Corresponds to --with-sysroot
16475 
16476   if test "x$DEVKIT_SYSROOT" = x; then
16477     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16478   fi
16479 
16480 
16481           # Identifies the Visual Studio version in the devkit
16482 
16483   if test "x$DEVKIT_VS_VERSION" = x; then
16484     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16485   fi
16486 
16487           # The Visual Studio include environment variable
16488 
16489   if test "x$DEVKIT_VS_INCLUDE" = x; then
16490     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16491   fi
16492 
16493           # The Visual Studio lib environment variable
16494 
16495   if test "x$DEVKIT_VS_LIB" = x; then
16496     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16497   fi
16498 
16499           # Corresponds to --with-msvcr-dll
16500 
16501   if test "x$DEVKIT_MSVCR_DLL" = x; then
16502     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16503   fi
16504 
16505           # Corresponds to --with-msvcp-dll
16506 
16507   if test "x$DEVKIT_MSVCP_DLL" = x; then
16508     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16509   fi
16510 
16511         fi
16512 
16513         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16514 $as_echo_n "checking for devkit... " >&6; }
16515         if test "x$DEVKIT_NAME" != x; then
16516           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16517 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16518         else
16519           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16520 $as_echo "$DEVKIT_ROOT" >&6; }
16521         fi
16522 
16523 
16524   if test "x$DEVKIT_EXTRA_PATH" != x; then
16525     if test "x$EXTRA_PATH" = x; then
16526       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16527     else
16528       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16529     fi
16530   fi
16531 
16532 
16533         # Fallback default of just /bin if DEVKIT_PATH is not defined
16534         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16535           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16536         fi
16537 
16538   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16539     if test "x$TOOLCHAIN_PATH" = x; then
16540       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16541     else
16542       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16543     fi
16544   fi
16545 
16546 
16547         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16548         # places for backwards compatiblity.
16549         if test "x$DEVKIT_SYSROOT" != x; then
16550           SYSROOT="$DEVKIT_SYSROOT"
16551         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16552           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16553         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16554           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16555         fi
16556 
16557 
16558 fi
16559 
16560 
16561   # You can force the sysroot if the sysroot encoded into the compiler tools
16562   # is not correct.
16563 
16564 # Check whether --with-sys-root was given.
16565 if test "${with_sys_root+set}" = set; then :
16566   withval=$with_sys_root; SYSROOT=$with_sys_root
16567 
16568 fi
16569 
16570 
16571 
16572 # Check whether --with-sysroot was given.
16573 if test "${with_sysroot+set}" = set; then :
16574   withval=$with_sysroot; SYSROOT=$with_sysroot
16575 
16576 fi
16577 
16578 
16579 
16580 # Check whether --with-tools-dir was given.
16581 if test "${with_tools_dir+set}" = set; then :
16582   withval=$with_tools_dir;
16583   if test "x$with_tools_dir" != x; then
16584     if test "x$TOOLCHAIN_PATH" = x; then
16585       TOOLCHAIN_PATH="$with_tools_dir"
16586     else
16587       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16588     fi
16589   fi
16590 
16591 
16592 fi
16593 
16594 
16595 
16596 # Check whether --with-toolchain-path was given.
16597 if test "${with_toolchain_path+set}" = set; then :
16598   withval=$with_toolchain_path;
16599   if test "x$with_toolchain_path" != x; then
16600     if test "x$TOOLCHAIN_PATH" = x; then
16601       TOOLCHAIN_PATH="$with_toolchain_path"
16602     else
16603       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16604     fi
16605   fi
16606 
16607 
16608 fi
16609 
16610 
16611 
16612 # Check whether --with-extra-path was given.
16613 if test "${with_extra_path+set}" = set; then :
16614   withval=$with_extra_path;
16615   if test "x$with_extra_path" != x; then
16616     if test "x$EXTRA_PATH" = x; then
16617       EXTRA_PATH="$with_extra_path"
16618     else
16619       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16620     fi
16621   fi
16622 
16623 
16624 fi
16625 
16626 
16627   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16628     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16629     # If not, detect if Xcode is installed by running xcodebuild -version
16630     # if no Xcode installed, xcodebuild exits with 1
16631     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16632     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16633       # We need to use xcodebuild in the toolchain dir provided by the user, this will
16634       # fall back on the stub binary in /usr/bin/xcodebuild
16635       # Extract the first word of "xcodebuild", so it can be a program name with args.
16636 set dummy xcodebuild; ac_word=$2
16637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16638 $as_echo_n "checking for $ac_word... " >&6; }
16639 if ${ac_cv_path_XCODEBUILD+:} false; then :
16640   $as_echo_n "(cached) " >&6
16641 else
16642   case $XCODEBUILD in
16643   [\\/]* | ?:[\\/]*)
16644   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16645   ;;
16646   *)
16647   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16648 for as_dir in $TOOLCHAIN_PATH
16649 do
16650   IFS=$as_save_IFS
16651   test -z "$as_dir" && as_dir=.
16652     for ac_exec_ext in '' $ac_executable_extensions; do
16653   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16654     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16655     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16656     break 2
16657   fi
16658 done
16659   done
16660 IFS=$as_save_IFS
16661 
16662   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16663   ;;
16664 esac
16665 fi
16666 XCODEBUILD=$ac_cv_path_XCODEBUILD
16667 if test -n "$XCODEBUILD"; then
16668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16669 $as_echo "$XCODEBUILD" >&6; }
16670 else
16671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16672 $as_echo "no" >&6; }
16673 fi
16674 
16675 
16676     else
16677       # this should result in SYSROOT being empty, unless --with-sysroot is provided
16678       # when only the command line tools are installed there are no SDKs, so headers
16679       # are copied into the system frameworks
16680       XCODEBUILD=
16681 
16682     fi
16683 
16684     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16685 $as_echo_n "checking for sdk name... " >&6; }
16686 
16687 # Check whether --with-sdk-name was given.
16688 if test "${with_sdk_name+set}" = set; then :
16689   withval=$with_sdk_name; SDKNAME=$with_sdk_name
16690 
16691 fi
16692 
16693     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16694 $as_echo "$SDKNAME" >&6; }
16695 
16696     # if toolchain path is specified then don't rely on system headers, they may not compile
16697     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16698     test -z "$TOOLCHAIN_PATH" && \
16699       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16700 
16701     if test -z "$SYSROOT"; then
16702       if test -n "$XCODEBUILD"; then
16703         # if we don't have system headers, use default SDK name (last resort)
16704         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16705           SDKNAME=${SDKNAME:-macosx}
16706         fi
16707 
16708         if test -n "$SDKNAME"; then
16709           # Call xcodebuild to determine SYSROOT
16710           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16711         fi
16712       else
16713         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16714           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
16715         fi
16716       fi
16717     else
16718       # warn user if --with-sdk-name was also set
16719       if test -n "$with_sdk_name"; then
16720         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16721 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16722       fi
16723     fi
16724 
16725     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16726       # If no system framework headers, then SYSROOT must be set, or we won't build
16727       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
16728     fi
16729 
16730     # Perform a basic sanity test
16731     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16732       if test -z "$SYSROOT"; then
16733         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
16734       else
16735         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16736       fi
16737     fi
16738 
16739     # set SDKROOT too, Xcode tools will pick it up
16740     SDKROOT=$SYSROOT
16741 
16742   fi
16743 
16744   # Prepend the extra path to the global path
16745 
16746   if test "x$EXTRA_PATH" != x; then
16747     if test "x$PATH" = x; then
16748       PATH="$EXTRA_PATH"
16749     else
16750       PATH="$EXTRA_PATH:$PATH"
16751     fi
16752   fi
16753 
16754 
16755   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16756     # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
16757     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
16758   fi
16759 
16760   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16761 $as_echo_n "checking for sysroot... " >&6; }
16762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16763 $as_echo "$SYSROOT" >&6; }
16764   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16765 $as_echo_n "checking for toolchain path... " >&6; }
16766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16767 $as_echo "$TOOLCHAIN_PATH" >&6; }
16768   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16769 $as_echo_n "checking for extra path... " >&6; }
16770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16771 $as_echo "$EXTRA_PATH" >&6; }
16772 
16773 
16774 # To properly create a configuration name, we need to have the OpenJDK target
16775 # and options (variants and debug level) parsed.
16776 
16777 
16778 
16779 # Check whether --with-conf-name was given.
16780 if test "${with_conf_name+set}" = set; then :
16781   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16782 fi
16783 
16784 
16785   # Test from where we are running configure, in or outside of src root.
16786   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16787 $as_echo_n "checking where to store configuration... " >&6; }
16788   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16789       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16790       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16791     # We are running configure from the src root.
16792     # Create a default ./build/target-variant-debuglevel output root.
16793     if test "x${CONF_NAME}" = x; then
16794       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16795 $as_echo "in default location" >&6; }
16796       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
16797     else
16798       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16799 $as_echo "in build directory with custom name" >&6; }
16800     fi
16801     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16802     $MKDIR -p "$OUTPUT_ROOT"
16803     if test ! -d "$OUTPUT_ROOT"; then
16804       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16805     fi
16806   else
16807     # We are running configure from outside of the src dir.
16808     # Then use the current directory as output dir!
16809     # If configuration is situated in normal build directory, just use the build
16810     # directory name as configuration name, otherwise use the complete path.
16811     if test "x${CONF_NAME}" = x; then
16812       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16813     fi
16814     OUTPUT_ROOT="$CURDIR"
16815     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16816 $as_echo "in current directory" >&6; }
16817 
16818     # WARNING: This might be a bad thing to do. You need to be sure you want to
16819     # have a configuration in this directory. Do some sanity checks!
16820 
16821     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16822       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16823       # other files
16824       files_present=`$LS $OUTPUT_ROOT`
16825       # Configure has already touched config.log and confdefs.h in the current dir when this check
16826       # is performed.
16827       filtered_files=`$ECHO "$files_present" \
16828           | $SED -e 's/config.log//g' \
16829               -e 's/configure.log//g' \
16830               -e 's/confdefs.h//g' \
16831               -e 's/ //g' \
16832           | $TR -d '\n'`
16833       if test "x$filtered_files" != x; then
16834         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16835 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
16836         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16837 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16838         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16839 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16840         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16841 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16842         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16843 $as_echo "$as_me: seriously mess up just about everything." >&6;}
16844         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16845 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16846         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16847 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16848         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16849       fi
16850     fi
16851   fi
16852   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16853 $as_echo_n "checking what configuration name to use... " >&6; }
16854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16855 $as_echo "$CONF_NAME" >&6; }
16856 
16857 
16858   # Only process if variable expands to non-empty
16859 
16860   if test "x$OUTPUT_ROOT" != x; then
16861     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16862 
16863   # Input might be given as Windows format, start by converting to
16864   # unix format.
16865   path="$OUTPUT_ROOT"
16866   new_path=`$CYGPATH -u "$path"`
16867 
16868   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16869   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16870   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16871   # "foo.exe" is OK but "foo" is an error.
16872   #
16873   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16874   # It is also a way to make sure we got the proper file name for the real test later on.
16875   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16876   if test "x$test_shortpath" = x; then
16877     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16878 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16879     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16880   fi
16881 
16882   # Call helper function which possibly converts this using DOS-style short mode.
16883   # If so, the updated path is stored in $new_path.
16884 
16885   input_path="$new_path"
16886   # Check if we need to convert this using DOS-style short mode. If the path
16887   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16888   # take no chances and rewrite it.
16889   # Note: m4 eats our [], so we need to use [ and ] instead.
16890   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16891   if test "x$has_forbidden_chars" != x; then
16892     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16893     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16894     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16895     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16896       # Going to short mode and back again did indeed matter. Since short mode is
16897       # case insensitive, let's make it lowercase to improve readability.
16898       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16899       # Now convert it back to Unix-style (cygpath)
16900       input_path=`$CYGPATH -u "$shortmode_path"`
16901       new_path="$input_path"
16902     fi
16903   fi
16904 
16905   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16906   if test "x$test_cygdrive_prefix" = x; then
16907     # As a simple fix, exclude /usr/bin since it's not a real path.
16908     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16909       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16910       # a path prefixed by /cygdrive for fixpath to work.
16911       new_path="$CYGWIN_ROOT_PATH$input_path"
16912     fi
16913   fi
16914 
16915 
16916   if test "x$path" != "x$new_path"; then
16917     OUTPUT_ROOT="$new_path"
16918     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16919 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16920   fi
16921 
16922     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16923 
16924   path="$OUTPUT_ROOT"
16925   has_colon=`$ECHO $path | $GREP ^.:`
16926   new_path="$path"
16927   if test "x$has_colon" = x; then
16928     # Not in mixed or Windows style, start by that.
16929     new_path=`cmd //c echo $path`
16930   fi
16931 
16932 
16933   input_path="$new_path"
16934   # Check if we need to convert this using DOS-style short mode. If the path
16935   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16936   # take no chances and rewrite it.
16937   # Note: m4 eats our [], so we need to use [ and ] instead.
16938   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16939   if test "x$has_forbidden_chars" != x; then
16940     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16941     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16942   fi
16943 
16944 
16945   windows_path="$new_path"
16946   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16947     unix_path=`$CYGPATH -u "$windows_path"`
16948     new_path="$unix_path"
16949   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16950     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16951     new_path="$unix_path"
16952   fi
16953 
16954   if test "x$path" != "x$new_path"; then
16955     OUTPUT_ROOT="$new_path"
16956     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16957 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16958   fi
16959 
16960   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16961   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16962 
16963     else
16964       # We're on a unix platform. Hooray! :)
16965       path="$OUTPUT_ROOT"
16966       has_space=`$ECHO "$path" | $GREP " "`
16967       if test "x$has_space" != x; then
16968         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16969 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16970         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16971       fi
16972 
16973       # Use eval to expand a potential ~
16974       eval path="$path"
16975       if test ! -f "$path" && test ! -d "$path"; then
16976         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16977       fi
16978 
16979       if test -d "$path"; then
16980         OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16981       else
16982         dir="`$DIRNAME "$path"`"
16983         base="`$BASENAME "$path"`"
16984         OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16985       fi
16986     fi
16987   fi
16988 
16989 
16990   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16991   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16992 
16993   SPEC=$OUTPUT_ROOT/spec.gmk
16994 
16995   CONF_NAME=$CONF_NAME
16996 
16997   OUTPUT_ROOT=$OUTPUT_ROOT
16998 
16999 
17000 
17001   # The spec.gmk file contains all variables for the make system.
17002   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17003 
17004   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
17005   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
17006 
17007   # The bootcycle-spec.gmk file contains support for boot cycle builds.
17008   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17009 
17010   # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17011   ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17012 
17013   # The compare.sh is used to compare the build output to other builds.
17014   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17015 
17016   # The generated Makefile knows where the spec.gmk is and where the source is.
17017   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17018   # which will look for generated configurations
17019   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17020 
17021 
17022 
17023 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17024 
17025   for ac_prog in apt-get yum port pkgutil pkgadd
17026 do
17027   # Extract the first word of "$ac_prog", so it can be a program name with args.
17028 set dummy $ac_prog; ac_word=$2
17029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17030 $as_echo_n "checking for $ac_word... " >&6; }
17031 if ${ac_cv_prog_PKGHANDLER+:} false; then :
17032   $as_echo_n "(cached) " >&6
17033 else
17034   if test -n "$PKGHANDLER"; then
17035   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17036 else
17037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17038 for as_dir in $PATH
17039 do
17040   IFS=$as_save_IFS
17041   test -z "$as_dir" && as_dir=.
17042     for ac_exec_ext in '' $ac_executable_extensions; do
17043   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17044     ac_cv_prog_PKGHANDLER="$ac_prog"
17045     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17046     break 2
17047   fi
17048 done
17049   done
17050 IFS=$as_save_IFS
17051 
17052 fi
17053 fi
17054 PKGHANDLER=$ac_cv_prog_PKGHANDLER
17055 if test -n "$PKGHANDLER"; then
17056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17057 $as_echo "$PKGHANDLER" >&6; }
17058 else
17059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17060 $as_echo "no" >&6; }
17061 fi
17062 
17063 
17064   test -n "$PKGHANDLER" && break
17065 done
17066 
17067 
17068 
17069 # Setup tools that requires more complex handling, or that is not needed by the configure script.
17070 
17071 
17072 
17073   # Publish this variable in the help.
17074 
17075 
17076   if [ -z "${MAKE+x}" ]; then
17077     # The variable is not set by user, try to locate tool using the code snippet
17078 
17079     # Try our hardest to locate a correct version of GNU make
17080     for ac_prog in gmake
17081 do
17082   # Extract the first word of "$ac_prog", so it can be a program name with args.
17083 set dummy $ac_prog; ac_word=$2
17084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17085 $as_echo_n "checking for $ac_word... " >&6; }
17086 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17087   $as_echo_n "(cached) " >&6
17088 else
17089   case $CHECK_GMAKE in
17090   [\\/]* | ?:[\\/]*)
17091   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17092   ;;
17093   *)
17094   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17095 for as_dir in $PATH
17096 do
17097   IFS=$as_save_IFS
17098   test -z "$as_dir" && as_dir=.
17099     for ac_exec_ext in '' $ac_executable_extensions; do
17100   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17101     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17102     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17103     break 2
17104   fi
17105 done
17106   done
17107 IFS=$as_save_IFS
17108 
17109   ;;
17110 esac
17111 fi
17112 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17113 if test -n "$CHECK_GMAKE"; then
17114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17115 $as_echo "$CHECK_GMAKE" >&6; }
17116 else
17117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17118 $as_echo "no" >&6; }
17119 fi
17120 
17121 
17122   test -n "$CHECK_GMAKE" && break
17123 done
17124 
17125 
17126   MAKE_CANDIDATE=""$CHECK_GMAKE""
17127   DESCRIPTION="gmake in PATH"
17128 
17129   # On Cygwin, we require a newer version of make than on other platforms
17130   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17131     MAKE_VERSION_EXPR="-e 4\."
17132     MAKE_REQUIRED_VERSION="4.0"
17133    else
17134     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17135     MAKE_REQUIRED_VERSION="3.81"
17136   fi
17137 
17138   if test "x$MAKE_CANDIDATE" != x; then
17139     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17140 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17141     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17142     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17143     if test "x$IS_GNU_MAKE" = x; then
17144       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17145 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17146     else
17147       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17148       if test "x$IS_MODERN_MAKE" = x; then
17149         { $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
17150 $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;}
17151       else
17152         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17153           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17154             MAKE_EXPECTED_ENV='cygwin'
17155           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17156             MAKE_EXPECTED_ENV='msys'
17157           else
17158             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17159           fi
17160           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17161           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17162         else
17163           # Not relevant for non-Windows
17164           IS_MAKE_CORRECT_ENV=true
17165         fi
17166         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17167           { $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
17168 $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;}
17169         else
17170           FOUND_MAKE=$MAKE_CANDIDATE
17171 
17172   # Only process if variable expands to non-empty
17173 
17174   if test "x$FOUND_MAKE" != x; then
17175     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17176 
17177   # First separate the path from the arguments. This will split at the first
17178   # space.
17179   complete="$FOUND_MAKE"
17180   path="${complete%% *}"
17181   tmp="$complete EOL"
17182   arguments="${tmp#* }"
17183 
17184   # Input might be given as Windows format, start by converting to
17185   # unix format.
17186   new_path=`$CYGPATH -u "$path"`
17187 
17188   # Now try to locate executable using which
17189   new_path=`$WHICH "$new_path" 2> /dev/null`
17190   # bat and cmd files are not always considered executable in cygwin causing which
17191   # to not find them
17192   if test "x$new_path" = x \
17193       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17194       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17195     new_path=`$CYGPATH -u "$path"`
17196   fi
17197   if test "x$new_path" = x; then
17198     # Oops. Which didn't find the executable.
17199     # The splitting of arguments from the executable at a space might have been incorrect,
17200     # since paths with space are more likely in Windows. Give it another try with the whole
17201     # argument.
17202     path="$complete"
17203     arguments="EOL"
17204     new_path=`$CYGPATH -u "$path"`
17205     new_path=`$WHICH "$new_path" 2> /dev/null`
17206     # bat and cmd files are not always considered executable in cygwin causing which
17207     # to not find them
17208     if test "x$new_path" = x \
17209         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17210         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17211       new_path=`$CYGPATH -u "$path"`
17212     fi
17213     if test "x$new_path" = x; then
17214       # It's still not found. Now this is an unrecoverable error.
17215       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17216 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17217       has_space=`$ECHO "$complete" | $GREP " "`
17218       if test "x$has_space" != x; then
17219         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17220 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17221       fi
17222       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17223     fi
17224   fi
17225 
17226   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17227   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17228   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17229   # "foo.exe" is OK but "foo" is an error.
17230   #
17231   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17232   # It is also a way to make sure we got the proper file name for the real test later on.
17233   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17234   if test "x$test_shortpath" = x; then
17235     # Short path failed, file does not exist as specified.
17236     # Try adding .exe or .cmd
17237     if test -f "${new_path}.exe"; then
17238       input_to_shortpath="${new_path}.exe"
17239     elif test -f "${new_path}.cmd"; then
17240       input_to_shortpath="${new_path}.cmd"
17241     else
17242       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17243 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17244       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17245 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17246       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17247     fi
17248   else
17249     input_to_shortpath="$new_path"
17250   fi
17251 
17252   # Call helper function which possibly converts this using DOS-style short mode.
17253   # If so, the updated path is stored in $new_path.
17254   new_path="$input_to_shortpath"
17255 
17256   input_path="$input_to_shortpath"
17257   # Check if we need to convert this using DOS-style short mode. If the path
17258   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17259   # take no chances and rewrite it.
17260   # Note: m4 eats our [], so we need to use [ and ] instead.
17261   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17262   if test "x$has_forbidden_chars" != x; then
17263     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17264     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17265     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17266     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17267       # Going to short mode and back again did indeed matter. Since short mode is
17268       # case insensitive, let's make it lowercase to improve readability.
17269       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17270       # Now convert it back to Unix-style (cygpath)
17271       input_path=`$CYGPATH -u "$shortmode_path"`
17272       new_path="$input_path"
17273     fi
17274   fi
17275 
17276   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17277   if test "x$test_cygdrive_prefix" = x; then
17278     # As a simple fix, exclude /usr/bin since it's not a real path.
17279     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17280       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17281       # a path prefixed by /cygdrive for fixpath to work.
17282       new_path="$CYGWIN_ROOT_PATH$input_path"
17283     fi
17284   fi
17285 
17286   # remove trailing .exe if any
17287   new_path="${new_path/%.exe/}"
17288 
17289     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17290 
17291   # First separate the path from the arguments. This will split at the first
17292   # space.
17293   complete="$FOUND_MAKE"
17294   path="${complete%% *}"
17295   tmp="$complete EOL"
17296   arguments="${tmp#* }"
17297 
17298   # Input might be given as Windows format, start by converting to
17299   # unix format.
17300   new_path="$path"
17301 
17302   windows_path="$new_path"
17303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17304     unix_path=`$CYGPATH -u "$windows_path"`
17305     new_path="$unix_path"
17306   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17307     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17308     new_path="$unix_path"
17309   fi
17310 
17311 
17312   # Now try to locate executable using which
17313   new_path=`$WHICH "$new_path" 2> /dev/null`
17314 
17315   if test "x$new_path" = x; then
17316     # Oops. Which didn't find the executable.
17317     # The splitting of arguments from the executable at a space might have been incorrect,
17318     # since paths with space are more likely in Windows. Give it another try with the whole
17319     # argument.
17320     path="$complete"
17321     arguments="EOL"
17322     new_path="$path"
17323 
17324   windows_path="$new_path"
17325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17326     unix_path=`$CYGPATH -u "$windows_path"`
17327     new_path="$unix_path"
17328   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17329     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17330     new_path="$unix_path"
17331   fi
17332 
17333 
17334     new_path=`$WHICH "$new_path" 2> /dev/null`
17335     # bat and cmd files are not always considered executable in MSYS causing which
17336     # to not find them
17337     if test "x$new_path" = x \
17338         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17339         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17340       new_path="$path"
17341 
17342   windows_path="$new_path"
17343   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17344     unix_path=`$CYGPATH -u "$windows_path"`
17345     new_path="$unix_path"
17346   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17347     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17348     new_path="$unix_path"
17349   fi
17350 
17351     fi
17352 
17353     if test "x$new_path" = x; then
17354       # It's still not found. Now this is an unrecoverable error.
17355       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17356 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17357       has_space=`$ECHO "$complete" | $GREP " "`
17358       if test "x$has_space" != x; then
17359         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17360 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17361       fi
17362       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17363     fi
17364   fi
17365 
17366   # Now new_path has a complete unix path to the binary
17367   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17368     # Keep paths in /bin as-is, but remove trailing .exe if any
17369     new_path="${new_path/%.exe/}"
17370     # Do not save /bin paths to all_fixpath_prefixes!
17371   else
17372     # Not in mixed or Windows style, start by that.
17373     new_path=`cmd //c echo $new_path`
17374 
17375   input_path="$new_path"
17376   # Check if we need to convert this using DOS-style short mode. If the path
17377   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17378   # take no chances and rewrite it.
17379   # Note: m4 eats our [], so we need to use [ and ] instead.
17380   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17381   if test "x$has_forbidden_chars" != x; then
17382     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17383     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17384   fi
17385 
17386     # Output is in $new_path
17387 
17388   windows_path="$new_path"
17389   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17390     unix_path=`$CYGPATH -u "$windows_path"`
17391     new_path="$unix_path"
17392   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17393     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17394     new_path="$unix_path"
17395   fi
17396 
17397     # remove trailing .exe if any
17398     new_path="${new_path/%.exe/}"
17399 
17400     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17401     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17402   fi
17403 
17404     else
17405       # We're on a unix platform. Hooray! :)
17406       # First separate the path from the arguments. This will split at the first
17407       # space.
17408       complete="$FOUND_MAKE"
17409       path="${complete%% *}"
17410       tmp="$complete EOL"
17411       arguments="${tmp#* }"
17412 
17413       # Cannot rely on the command "which" here since it doesn't always work.
17414       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17415       if test -z "$is_absolute_path"; then
17416         # Path to executable is not absolute. Find it.
17417         IFS_save="$IFS"
17418         IFS=:
17419         for p in $PATH; do
17420           if test -f "$p/$path" && test -x "$p/$path"; then
17421             new_path="$p/$path"
17422             break
17423           fi
17424         done
17425         IFS="$IFS_save"
17426       else
17427         # This is an absolute path, we can use it without further modifications.
17428         new_path="$path"
17429       fi
17430 
17431       if test "x$new_path" = x; then
17432         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17433 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17434         has_space=`$ECHO "$complete" | $GREP " "`
17435         if test "x$has_space" != x; then
17436           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17437 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17438         fi
17439         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17440       fi
17441     fi
17442 
17443     # Now join together the path and the arguments once again
17444     if test "x$arguments" != xEOL; then
17445       new_complete="$new_path ${arguments% *}"
17446     else
17447       new_complete="$new_path"
17448     fi
17449 
17450     if test "x$complete" != "x$new_complete"; then
17451       FOUND_MAKE="$new_complete"
17452       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17453 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17454     fi
17455   fi
17456 
17457         fi
17458       fi
17459     fi
17460   fi
17461 
17462 
17463     if test "x$FOUND_MAKE" = x; then
17464       for ac_prog in make
17465 do
17466   # Extract the first word of "$ac_prog", so it can be a program name with args.
17467 set dummy $ac_prog; ac_word=$2
17468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17469 $as_echo_n "checking for $ac_word... " >&6; }
17470 if ${ac_cv_path_CHECK_MAKE+:} false; then :
17471   $as_echo_n "(cached) " >&6
17472 else
17473   case $CHECK_MAKE in
17474   [\\/]* | ?:[\\/]*)
17475   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17476   ;;
17477   *)
17478   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17479 for as_dir in $PATH
17480 do
17481   IFS=$as_save_IFS
17482   test -z "$as_dir" && as_dir=.
17483     for ac_exec_ext in '' $ac_executable_extensions; do
17484   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17485     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17486     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17487     break 2
17488   fi
17489 done
17490   done
17491 IFS=$as_save_IFS
17492 
17493   ;;
17494 esac
17495 fi
17496 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17497 if test -n "$CHECK_MAKE"; then
17498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17499 $as_echo "$CHECK_MAKE" >&6; }
17500 else
17501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17502 $as_echo "no" >&6; }
17503 fi
17504 
17505 
17506   test -n "$CHECK_MAKE" && break
17507 done
17508 
17509 
17510   MAKE_CANDIDATE=""$CHECK_MAKE""
17511   DESCRIPTION="make in PATH"
17512 
17513   # On Cygwin, we require a newer version of make than on other platforms
17514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17515     MAKE_VERSION_EXPR="-e 4\."
17516     MAKE_REQUIRED_VERSION="4.0"
17517    else
17518     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17519     MAKE_REQUIRED_VERSION="3.81"
17520   fi
17521 
17522   if test "x$MAKE_CANDIDATE" != x; then
17523     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17524 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17525     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17526     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17527     if test "x$IS_GNU_MAKE" = x; then
17528       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17529 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17530     else
17531       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17532       if test "x$IS_MODERN_MAKE" = x; then
17533         { $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
17534 $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;}
17535       else
17536         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17537           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17538             MAKE_EXPECTED_ENV='cygwin'
17539           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17540             MAKE_EXPECTED_ENV='msys'
17541           else
17542             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17543           fi
17544           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17545           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17546         else
17547           # Not relevant for non-Windows
17548           IS_MAKE_CORRECT_ENV=true
17549         fi
17550         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17551           { $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
17552 $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;}
17553         else
17554           FOUND_MAKE=$MAKE_CANDIDATE
17555 
17556   # Only process if variable expands to non-empty
17557 
17558   if test "x$FOUND_MAKE" != x; then
17559     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17560 
17561   # First separate the path from the arguments. This will split at the first
17562   # space.
17563   complete="$FOUND_MAKE"
17564   path="${complete%% *}"
17565   tmp="$complete EOL"
17566   arguments="${tmp#* }"
17567 
17568   # Input might be given as Windows format, start by converting to
17569   # unix format.
17570   new_path=`$CYGPATH -u "$path"`
17571 
17572   # Now try to locate executable using which
17573   new_path=`$WHICH "$new_path" 2> /dev/null`
17574   # bat and cmd files are not always considered executable in cygwin causing which
17575   # to not find them
17576   if test "x$new_path" = x \
17577       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17578       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17579     new_path=`$CYGPATH -u "$path"`
17580   fi
17581   if test "x$new_path" = x; then
17582     # Oops. Which didn't find the executable.
17583     # The splitting of arguments from the executable at a space might have been incorrect,
17584     # since paths with space are more likely in Windows. Give it another try with the whole
17585     # argument.
17586     path="$complete"
17587     arguments="EOL"
17588     new_path=`$CYGPATH -u "$path"`
17589     new_path=`$WHICH "$new_path" 2> /dev/null`
17590     # bat and cmd files are not always considered executable in cygwin causing which
17591     # to not find them
17592     if test "x$new_path" = x \
17593         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17594         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17595       new_path=`$CYGPATH -u "$path"`
17596     fi
17597     if test "x$new_path" = x; then
17598       # It's still not found. Now this is an unrecoverable error.
17599       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17600 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17601       has_space=`$ECHO "$complete" | $GREP " "`
17602       if test "x$has_space" != x; then
17603         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17604 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17605       fi
17606       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17607     fi
17608   fi
17609 
17610   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17611   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17612   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17613   # "foo.exe" is OK but "foo" is an error.
17614   #
17615   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17616   # It is also a way to make sure we got the proper file name for the real test later on.
17617   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17618   if test "x$test_shortpath" = x; then
17619     # Short path failed, file does not exist as specified.
17620     # Try adding .exe or .cmd
17621     if test -f "${new_path}.exe"; then
17622       input_to_shortpath="${new_path}.exe"
17623     elif test -f "${new_path}.cmd"; then
17624       input_to_shortpath="${new_path}.cmd"
17625     else
17626       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17627 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17628       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17629 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17630       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17631     fi
17632   else
17633     input_to_shortpath="$new_path"
17634   fi
17635 
17636   # Call helper function which possibly converts this using DOS-style short mode.
17637   # If so, the updated path is stored in $new_path.
17638   new_path="$input_to_shortpath"
17639 
17640   input_path="$input_to_shortpath"
17641   # Check if we need to convert this using DOS-style short mode. If the path
17642   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17643   # take no chances and rewrite it.
17644   # Note: m4 eats our [], so we need to use [ and ] instead.
17645   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17646   if test "x$has_forbidden_chars" != x; then
17647     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17648     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17649     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17650     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17651       # Going to short mode and back again did indeed matter. Since short mode is
17652       # case insensitive, let's make it lowercase to improve readability.
17653       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17654       # Now convert it back to Unix-style (cygpath)
17655       input_path=`$CYGPATH -u "$shortmode_path"`
17656       new_path="$input_path"
17657     fi
17658   fi
17659 
17660   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17661   if test "x$test_cygdrive_prefix" = x; then
17662     # As a simple fix, exclude /usr/bin since it's not a real path.
17663     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17664       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17665       # a path prefixed by /cygdrive for fixpath to work.
17666       new_path="$CYGWIN_ROOT_PATH$input_path"
17667     fi
17668   fi
17669 
17670   # remove trailing .exe if any
17671   new_path="${new_path/%.exe/}"
17672 
17673     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17674 
17675   # First separate the path from the arguments. This will split at the first
17676   # space.
17677   complete="$FOUND_MAKE"
17678   path="${complete%% *}"
17679   tmp="$complete EOL"
17680   arguments="${tmp#* }"
17681 
17682   # Input might be given as Windows format, start by converting to
17683   # unix format.
17684   new_path="$path"
17685 
17686   windows_path="$new_path"
17687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17688     unix_path=`$CYGPATH -u "$windows_path"`
17689     new_path="$unix_path"
17690   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17691     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17692     new_path="$unix_path"
17693   fi
17694 
17695 
17696   # Now try to locate executable using which
17697   new_path=`$WHICH "$new_path" 2> /dev/null`
17698 
17699   if test "x$new_path" = x; then
17700     # Oops. Which didn't find the executable.
17701     # The splitting of arguments from the executable at a space might have been incorrect,
17702     # since paths with space are more likely in Windows. Give it another try with the whole
17703     # argument.
17704     path="$complete"
17705     arguments="EOL"
17706     new_path="$path"
17707 
17708   windows_path="$new_path"
17709   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17710     unix_path=`$CYGPATH -u "$windows_path"`
17711     new_path="$unix_path"
17712   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17713     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17714     new_path="$unix_path"
17715   fi
17716 
17717 
17718     new_path=`$WHICH "$new_path" 2> /dev/null`
17719     # bat and cmd files are not always considered executable in MSYS causing which
17720     # to not find them
17721     if test "x$new_path" = x \
17722         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17723         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17724       new_path="$path"
17725 
17726   windows_path="$new_path"
17727   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17728     unix_path=`$CYGPATH -u "$windows_path"`
17729     new_path="$unix_path"
17730   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17731     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17732     new_path="$unix_path"
17733   fi
17734 
17735     fi
17736 
17737     if test "x$new_path" = x; then
17738       # It's still not found. Now this is an unrecoverable error.
17739       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17740 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17741       has_space=`$ECHO "$complete" | $GREP " "`
17742       if test "x$has_space" != x; then
17743         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17744 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17745       fi
17746       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17747     fi
17748   fi
17749 
17750   # Now new_path has a complete unix path to the binary
17751   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17752     # Keep paths in /bin as-is, but remove trailing .exe if any
17753     new_path="${new_path/%.exe/}"
17754     # Do not save /bin paths to all_fixpath_prefixes!
17755   else
17756     # Not in mixed or Windows style, start by that.
17757     new_path=`cmd //c echo $new_path`
17758 
17759   input_path="$new_path"
17760   # Check if we need to convert this using DOS-style short mode. If the path
17761   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17762   # take no chances and rewrite it.
17763   # Note: m4 eats our [], so we need to use [ and ] instead.
17764   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17765   if test "x$has_forbidden_chars" != x; then
17766     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17767     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17768   fi
17769 
17770     # Output is in $new_path
17771 
17772   windows_path="$new_path"
17773   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17774     unix_path=`$CYGPATH -u "$windows_path"`
17775     new_path="$unix_path"
17776   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17777     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17778     new_path="$unix_path"
17779   fi
17780 
17781     # remove trailing .exe if any
17782     new_path="${new_path/%.exe/}"
17783 
17784     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17785     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17786   fi
17787 
17788     else
17789       # We're on a unix platform. Hooray! :)
17790       # First separate the path from the arguments. This will split at the first
17791       # space.
17792       complete="$FOUND_MAKE"
17793       path="${complete%% *}"
17794       tmp="$complete EOL"
17795       arguments="${tmp#* }"
17796 
17797       # Cannot rely on the command "which" here since it doesn't always work.
17798       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17799       if test -z "$is_absolute_path"; then
17800         # Path to executable is not absolute. Find it.
17801         IFS_save="$IFS"
17802         IFS=:
17803         for p in $PATH; do
17804           if test -f "$p/$path" && test -x "$p/$path"; then
17805             new_path="$p/$path"
17806             break
17807           fi
17808         done
17809         IFS="$IFS_save"
17810       else
17811         # This is an absolute path, we can use it without further modifications.
17812         new_path="$path"
17813       fi
17814 
17815       if test "x$new_path" = x; then
17816         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17817 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17818         has_space=`$ECHO "$complete" | $GREP " "`
17819         if test "x$has_space" != x; then
17820           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17821 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17822         fi
17823         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17824       fi
17825     fi
17826 
17827     # Now join together the path and the arguments once again
17828     if test "x$arguments" != xEOL; then
17829       new_complete="$new_path ${arguments% *}"
17830     else
17831       new_complete="$new_path"
17832     fi
17833 
17834     if test "x$complete" != "x$new_complete"; then
17835       FOUND_MAKE="$new_complete"
17836       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17837 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17838     fi
17839   fi
17840 
17841         fi
17842       fi
17843     fi
17844   fi
17845 
17846     fi
17847 
17848     if test "x$FOUND_MAKE" = x; then
17849       if test "x$TOOLCHAIN_PATH" != x; then
17850         # We have a toolchain path, check that as well before giving up.
17851         OLD_PATH=$PATH
17852         PATH=$TOOLCHAIN_PATH:$PATH
17853         for ac_prog in gmake
17854 do
17855   # Extract the first word of "$ac_prog", so it can be a program name with args.
17856 set dummy $ac_prog; ac_word=$2
17857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17858 $as_echo_n "checking for $ac_word... " >&6; }
17859 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17860   $as_echo_n "(cached) " >&6
17861 else
17862   case $CHECK_TOOLSDIR_GMAKE in
17863   [\\/]* | ?:[\\/]*)
17864   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17865   ;;
17866   *)
17867   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17868 for as_dir in $PATH
17869 do
17870   IFS=$as_save_IFS
17871   test -z "$as_dir" && as_dir=.
17872     for ac_exec_ext in '' $ac_executable_extensions; do
17873   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17874     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17875     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17876     break 2
17877   fi
17878 done
17879   done
17880 IFS=$as_save_IFS
17881 
17882   ;;
17883 esac
17884 fi
17885 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17886 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17888 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17889 else
17890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17891 $as_echo "no" >&6; }
17892 fi
17893 
17894 
17895   test -n "$CHECK_TOOLSDIR_GMAKE" && break
17896 done
17897 
17898 
17899   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17900   DESCRIPTION="gmake in tools-dir"
17901 
17902   # On Cygwin, we require a newer version of make than on other platforms
17903   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17904     MAKE_VERSION_EXPR="-e 4\."
17905     MAKE_REQUIRED_VERSION="4.0"
17906    else
17907     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17908     MAKE_REQUIRED_VERSION="3.81"
17909   fi
17910 
17911   if test "x$MAKE_CANDIDATE" != x; then
17912     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17913 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17914     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17915     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17916     if test "x$IS_GNU_MAKE" = x; then
17917       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17918 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17919     else
17920       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17921       if test "x$IS_MODERN_MAKE" = x; then
17922         { $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
17923 $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;}
17924       else
17925         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17926           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17927             MAKE_EXPECTED_ENV='cygwin'
17928           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17929             MAKE_EXPECTED_ENV='msys'
17930           else
17931             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17932           fi
17933           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17934           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17935         else
17936           # Not relevant for non-Windows
17937           IS_MAKE_CORRECT_ENV=true
17938         fi
17939         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17940           { $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
17941 $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;}
17942         else
17943           FOUND_MAKE=$MAKE_CANDIDATE
17944 
17945   # Only process if variable expands to non-empty
17946 
17947   if test "x$FOUND_MAKE" != x; then
17948     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17949 
17950   # First separate the path from the arguments. This will split at the first
17951   # space.
17952   complete="$FOUND_MAKE"
17953   path="${complete%% *}"
17954   tmp="$complete EOL"
17955   arguments="${tmp#* }"
17956 
17957   # Input might be given as Windows format, start by converting to
17958   # unix format.
17959   new_path=`$CYGPATH -u "$path"`
17960 
17961   # Now try to locate executable using which
17962   new_path=`$WHICH "$new_path" 2> /dev/null`
17963   # bat and cmd files are not always considered executable in cygwin causing which
17964   # to not find them
17965   if test "x$new_path" = x \
17966       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17967       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17968     new_path=`$CYGPATH -u "$path"`
17969   fi
17970   if test "x$new_path" = x; then
17971     # Oops. Which didn't find the executable.
17972     # The splitting of arguments from the executable at a space might have been incorrect,
17973     # since paths with space are more likely in Windows. Give it another try with the whole
17974     # argument.
17975     path="$complete"
17976     arguments="EOL"
17977     new_path=`$CYGPATH -u "$path"`
17978     new_path=`$WHICH "$new_path" 2> /dev/null`
17979     # bat and cmd files are not always considered executable in cygwin causing which
17980     # to not find them
17981     if test "x$new_path" = x \
17982         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17983         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17984       new_path=`$CYGPATH -u "$path"`
17985     fi
17986     if test "x$new_path" = x; then
17987       # It's still not found. Now this is an unrecoverable error.
17988       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17989 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17990       has_space=`$ECHO "$complete" | $GREP " "`
17991       if test "x$has_space" != x; then
17992         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17993 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17994       fi
17995       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17996     fi
17997   fi
17998 
17999   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18000   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18001   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18002   # "foo.exe" is OK but "foo" is an error.
18003   #
18004   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18005   # It is also a way to make sure we got the proper file name for the real test later on.
18006   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18007   if test "x$test_shortpath" = x; then
18008     # Short path failed, file does not exist as specified.
18009     # Try adding .exe or .cmd
18010     if test -f "${new_path}.exe"; then
18011       input_to_shortpath="${new_path}.exe"
18012     elif test -f "${new_path}.cmd"; then
18013       input_to_shortpath="${new_path}.cmd"
18014     else
18015       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18016 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18017       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18018 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18019       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18020     fi
18021   else
18022     input_to_shortpath="$new_path"
18023   fi
18024 
18025   # Call helper function which possibly converts this using DOS-style short mode.
18026   # If so, the updated path is stored in $new_path.
18027   new_path="$input_to_shortpath"
18028 
18029   input_path="$input_to_shortpath"
18030   # Check if we need to convert this using DOS-style short mode. If the path
18031   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18032   # take no chances and rewrite it.
18033   # Note: m4 eats our [], so we need to use [ and ] instead.
18034   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18035   if test "x$has_forbidden_chars" != x; then
18036     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18037     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18038     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18039     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18040       # Going to short mode and back again did indeed matter. Since short mode is
18041       # case insensitive, let's make it lowercase to improve readability.
18042       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18043       # Now convert it back to Unix-style (cygpath)
18044       input_path=`$CYGPATH -u "$shortmode_path"`
18045       new_path="$input_path"
18046     fi
18047   fi
18048 
18049   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18050   if test "x$test_cygdrive_prefix" = x; then
18051     # As a simple fix, exclude /usr/bin since it's not a real path.
18052     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18053       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18054       # a path prefixed by /cygdrive for fixpath to work.
18055       new_path="$CYGWIN_ROOT_PATH$input_path"
18056     fi
18057   fi
18058 
18059   # remove trailing .exe if any
18060   new_path="${new_path/%.exe/}"
18061 
18062     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18063 
18064   # First separate the path from the arguments. This will split at the first
18065   # space.
18066   complete="$FOUND_MAKE"
18067   path="${complete%% *}"
18068   tmp="$complete EOL"
18069   arguments="${tmp#* }"
18070 
18071   # Input might be given as Windows format, start by converting to
18072   # unix format.
18073   new_path="$path"
18074 
18075   windows_path="$new_path"
18076   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18077     unix_path=`$CYGPATH -u "$windows_path"`
18078     new_path="$unix_path"
18079   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18080     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18081     new_path="$unix_path"
18082   fi
18083 
18084 
18085   # Now try to locate executable using which
18086   new_path=`$WHICH "$new_path" 2> /dev/null`
18087 
18088   if test "x$new_path" = x; then
18089     # Oops. Which didn't find the executable.
18090     # The splitting of arguments from the executable at a space might have been incorrect,
18091     # since paths with space are more likely in Windows. Give it another try with the whole
18092     # argument.
18093     path="$complete"
18094     arguments="EOL"
18095     new_path="$path"
18096 
18097   windows_path="$new_path"
18098   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18099     unix_path=`$CYGPATH -u "$windows_path"`
18100     new_path="$unix_path"
18101   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18102     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18103     new_path="$unix_path"
18104   fi
18105 
18106 
18107     new_path=`$WHICH "$new_path" 2> /dev/null`
18108     # bat and cmd files are not always considered executable in MSYS causing which
18109     # to not find them
18110     if test "x$new_path" = x \
18111         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18112         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18113       new_path="$path"
18114 
18115   windows_path="$new_path"
18116   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18117     unix_path=`$CYGPATH -u "$windows_path"`
18118     new_path="$unix_path"
18119   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18120     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18121     new_path="$unix_path"
18122   fi
18123 
18124     fi
18125 
18126     if test "x$new_path" = x; then
18127       # It's still not found. Now this is an unrecoverable error.
18128       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18129 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18130       has_space=`$ECHO "$complete" | $GREP " "`
18131       if test "x$has_space" != x; then
18132         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18133 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18134       fi
18135       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18136     fi
18137   fi
18138 
18139   # Now new_path has a complete unix path to the binary
18140   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18141     # Keep paths in /bin as-is, but remove trailing .exe if any
18142     new_path="${new_path/%.exe/}"
18143     # Do not save /bin paths to all_fixpath_prefixes!
18144   else
18145     # Not in mixed or Windows style, start by that.
18146     new_path=`cmd //c echo $new_path`
18147 
18148   input_path="$new_path"
18149   # Check if we need to convert this using DOS-style short mode. If the path
18150   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18151   # take no chances and rewrite it.
18152   # Note: m4 eats our [], so we need to use [ and ] instead.
18153   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18154   if test "x$has_forbidden_chars" != x; then
18155     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18156     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18157   fi
18158 
18159     # Output is in $new_path
18160 
18161   windows_path="$new_path"
18162   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18163     unix_path=`$CYGPATH -u "$windows_path"`
18164     new_path="$unix_path"
18165   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18166     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18167     new_path="$unix_path"
18168   fi
18169 
18170     # remove trailing .exe if any
18171     new_path="${new_path/%.exe/}"
18172 
18173     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18174     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18175   fi
18176 
18177     else
18178       # We're on a unix platform. Hooray! :)
18179       # First separate the path from the arguments. This will split at the first
18180       # space.
18181       complete="$FOUND_MAKE"
18182       path="${complete%% *}"
18183       tmp="$complete EOL"
18184       arguments="${tmp#* }"
18185 
18186       # Cannot rely on the command "which" here since it doesn't always work.
18187       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18188       if test -z "$is_absolute_path"; then
18189         # Path to executable is not absolute. Find it.
18190         IFS_save="$IFS"
18191         IFS=:
18192         for p in $PATH; do
18193           if test -f "$p/$path" && test -x "$p/$path"; then
18194             new_path="$p/$path"
18195             break
18196           fi
18197         done
18198         IFS="$IFS_save"
18199       else
18200         # This is an absolute path, we can use it without further modifications.
18201         new_path="$path"
18202       fi
18203 
18204       if test "x$new_path" = x; then
18205         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18206 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18207         has_space=`$ECHO "$complete" | $GREP " "`
18208         if test "x$has_space" != x; then
18209           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18210 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18211         fi
18212         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18213       fi
18214     fi
18215 
18216     # Now join together the path and the arguments once again
18217     if test "x$arguments" != xEOL; then
18218       new_complete="$new_path ${arguments% *}"
18219     else
18220       new_complete="$new_path"
18221     fi
18222 
18223     if test "x$complete" != "x$new_complete"; then
18224       FOUND_MAKE="$new_complete"
18225       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18226 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18227     fi
18228   fi
18229 
18230         fi
18231       fi
18232     fi
18233   fi
18234 
18235         if test "x$FOUND_MAKE" = x; then
18236           for ac_prog in make
18237 do
18238   # Extract the first word of "$ac_prog", so it can be a program name with args.
18239 set dummy $ac_prog; ac_word=$2
18240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18241 $as_echo_n "checking for $ac_word... " >&6; }
18242 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18243   $as_echo_n "(cached) " >&6
18244 else
18245   case $CHECK_TOOLSDIR_MAKE in
18246   [\\/]* | ?:[\\/]*)
18247   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18248   ;;
18249   *)
18250   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18251 for as_dir in $PATH
18252 do
18253   IFS=$as_save_IFS
18254   test -z "$as_dir" && as_dir=.
18255     for ac_exec_ext in '' $ac_executable_extensions; do
18256   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18257     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18258     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18259     break 2
18260   fi
18261 done
18262   done
18263 IFS=$as_save_IFS
18264 
18265   ;;
18266 esac
18267 fi
18268 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18269 if test -n "$CHECK_TOOLSDIR_MAKE"; then
18270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18271 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18272 else
18273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18274 $as_echo "no" >&6; }
18275 fi
18276 
18277 
18278   test -n "$CHECK_TOOLSDIR_MAKE" && break
18279 done
18280 
18281 
18282   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18283   DESCRIPTION="make in tools-dir"
18284 
18285   # On Cygwin, we require a newer version of make than on other platforms
18286   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18287     MAKE_VERSION_EXPR="-e 4\."
18288     MAKE_REQUIRED_VERSION="4.0"
18289    else
18290     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18291     MAKE_REQUIRED_VERSION="3.81"
18292   fi
18293 
18294   if test "x$MAKE_CANDIDATE" != x; then
18295     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18296 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18297     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18298     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18299     if test "x$IS_GNU_MAKE" = x; then
18300       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18301 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18302     else
18303       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18304       if test "x$IS_MODERN_MAKE" = x; then
18305         { $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
18306 $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;}
18307       else
18308         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18309           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18310             MAKE_EXPECTED_ENV='cygwin'
18311           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18312             MAKE_EXPECTED_ENV='msys'
18313           else
18314             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18315           fi
18316           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18317           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18318         else
18319           # Not relevant for non-Windows
18320           IS_MAKE_CORRECT_ENV=true
18321         fi
18322         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18323           { $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
18324 $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;}
18325         else
18326           FOUND_MAKE=$MAKE_CANDIDATE
18327 
18328   # Only process if variable expands to non-empty
18329 
18330   if test "x$FOUND_MAKE" != x; then
18331     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18332 
18333   # First separate the path from the arguments. This will split at the first
18334   # space.
18335   complete="$FOUND_MAKE"
18336   path="${complete%% *}"
18337   tmp="$complete EOL"
18338   arguments="${tmp#* }"
18339 
18340   # Input might be given as Windows format, start by converting to
18341   # unix format.
18342   new_path=`$CYGPATH -u "$path"`
18343 
18344   # Now try to locate executable using which
18345   new_path=`$WHICH "$new_path" 2> /dev/null`
18346   # bat and cmd files are not always considered executable in cygwin causing which
18347   # to not find them
18348   if test "x$new_path" = x \
18349       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18350       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18351     new_path=`$CYGPATH -u "$path"`
18352   fi
18353   if test "x$new_path" = x; then
18354     # Oops. Which didn't find the executable.
18355     # The splitting of arguments from the executable at a space might have been incorrect,
18356     # since paths with space are more likely in Windows. Give it another try with the whole
18357     # argument.
18358     path="$complete"
18359     arguments="EOL"
18360     new_path=`$CYGPATH -u "$path"`
18361     new_path=`$WHICH "$new_path" 2> /dev/null`
18362     # bat and cmd files are not always considered executable in cygwin causing which
18363     # to not find them
18364     if test "x$new_path" = x \
18365         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18366         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18367       new_path=`$CYGPATH -u "$path"`
18368     fi
18369     if test "x$new_path" = x; then
18370       # It's still not found. Now this is an unrecoverable error.
18371       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18372 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18373       has_space=`$ECHO "$complete" | $GREP " "`
18374       if test "x$has_space" != x; then
18375         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18376 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18377       fi
18378       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18379     fi
18380   fi
18381 
18382   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18383   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18384   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18385   # "foo.exe" is OK but "foo" is an error.
18386   #
18387   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18388   # It is also a way to make sure we got the proper file name for the real test later on.
18389   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18390   if test "x$test_shortpath" = x; then
18391     # Short path failed, file does not exist as specified.
18392     # Try adding .exe or .cmd
18393     if test -f "${new_path}.exe"; then
18394       input_to_shortpath="${new_path}.exe"
18395     elif test -f "${new_path}.cmd"; then
18396       input_to_shortpath="${new_path}.cmd"
18397     else
18398       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18399 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18400       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18401 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18402       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18403     fi
18404   else
18405     input_to_shortpath="$new_path"
18406   fi
18407 
18408   # Call helper function which possibly converts this using DOS-style short mode.
18409   # If so, the updated path is stored in $new_path.
18410   new_path="$input_to_shortpath"
18411 
18412   input_path="$input_to_shortpath"
18413   # Check if we need to convert this using DOS-style short mode. If the path
18414   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18415   # take no chances and rewrite it.
18416   # Note: m4 eats our [], so we need to use [ and ] instead.
18417   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18418   if test "x$has_forbidden_chars" != x; then
18419     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18420     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18421     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18422     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18423       # Going to short mode and back again did indeed matter. Since short mode is
18424       # case insensitive, let's make it lowercase to improve readability.
18425       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18426       # Now convert it back to Unix-style (cygpath)
18427       input_path=`$CYGPATH -u "$shortmode_path"`
18428       new_path="$input_path"
18429     fi
18430   fi
18431 
18432   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18433   if test "x$test_cygdrive_prefix" = x; then
18434     # As a simple fix, exclude /usr/bin since it's not a real path.
18435     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18436       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18437       # a path prefixed by /cygdrive for fixpath to work.
18438       new_path="$CYGWIN_ROOT_PATH$input_path"
18439     fi
18440   fi
18441 
18442   # remove trailing .exe if any
18443   new_path="${new_path/%.exe/}"
18444 
18445     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18446 
18447   # First separate the path from the arguments. This will split at the first
18448   # space.
18449   complete="$FOUND_MAKE"
18450   path="${complete%% *}"
18451   tmp="$complete EOL"
18452   arguments="${tmp#* }"
18453 
18454   # Input might be given as Windows format, start by converting to
18455   # unix format.
18456   new_path="$path"
18457 
18458   windows_path="$new_path"
18459   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18460     unix_path=`$CYGPATH -u "$windows_path"`
18461     new_path="$unix_path"
18462   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18463     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18464     new_path="$unix_path"
18465   fi
18466 
18467 
18468   # Now try to locate executable using which
18469   new_path=`$WHICH "$new_path" 2> /dev/null`
18470 
18471   if test "x$new_path" = x; then
18472     # Oops. Which didn't find the executable.
18473     # The splitting of arguments from the executable at a space might have been incorrect,
18474     # since paths with space are more likely in Windows. Give it another try with the whole
18475     # argument.
18476     path="$complete"
18477     arguments="EOL"
18478     new_path="$path"
18479 
18480   windows_path="$new_path"
18481   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18482     unix_path=`$CYGPATH -u "$windows_path"`
18483     new_path="$unix_path"
18484   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18485     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18486     new_path="$unix_path"
18487   fi
18488 
18489 
18490     new_path=`$WHICH "$new_path" 2> /dev/null`
18491     # bat and cmd files are not always considered executable in MSYS causing which
18492     # to not find them
18493     if test "x$new_path" = x \
18494         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18495         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18496       new_path="$path"
18497 
18498   windows_path="$new_path"
18499   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18500     unix_path=`$CYGPATH -u "$windows_path"`
18501     new_path="$unix_path"
18502   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18503     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18504     new_path="$unix_path"
18505   fi
18506 
18507     fi
18508 
18509     if test "x$new_path" = x; then
18510       # It's still not found. Now this is an unrecoverable error.
18511       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18512 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18513       has_space=`$ECHO "$complete" | $GREP " "`
18514       if test "x$has_space" != x; then
18515         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18516 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18517       fi
18518       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18519     fi
18520   fi
18521 
18522   # Now new_path has a complete unix path to the binary
18523   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18524     # Keep paths in /bin as-is, but remove trailing .exe if any
18525     new_path="${new_path/%.exe/}"
18526     # Do not save /bin paths to all_fixpath_prefixes!
18527   else
18528     # Not in mixed or Windows style, start by that.
18529     new_path=`cmd //c echo $new_path`
18530 
18531   input_path="$new_path"
18532   # Check if we need to convert this using DOS-style short mode. If the path
18533   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18534   # take no chances and rewrite it.
18535   # Note: m4 eats our [], so we need to use [ and ] instead.
18536   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18537   if test "x$has_forbidden_chars" != x; then
18538     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18539     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18540   fi
18541 
18542     # Output is in $new_path
18543 
18544   windows_path="$new_path"
18545   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18546     unix_path=`$CYGPATH -u "$windows_path"`
18547     new_path="$unix_path"
18548   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18549     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18550     new_path="$unix_path"
18551   fi
18552 
18553     # remove trailing .exe if any
18554     new_path="${new_path/%.exe/}"
18555 
18556     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18557     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18558   fi
18559 
18560     else
18561       # We're on a unix platform. Hooray! :)
18562       # First separate the path from the arguments. This will split at the first
18563       # space.
18564       complete="$FOUND_MAKE"
18565       path="${complete%% *}"
18566       tmp="$complete EOL"
18567       arguments="${tmp#* }"
18568 
18569       # Cannot rely on the command "which" here since it doesn't always work.
18570       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18571       if test -z "$is_absolute_path"; then
18572         # Path to executable is not absolute. Find it.
18573         IFS_save="$IFS"
18574         IFS=:
18575         for p in $PATH; do
18576           if test -f "$p/$path" && test -x "$p/$path"; then
18577             new_path="$p/$path"
18578             break
18579           fi
18580         done
18581         IFS="$IFS_save"
18582       else
18583         # This is an absolute path, we can use it without further modifications.
18584         new_path="$path"
18585       fi
18586 
18587       if test "x$new_path" = x; then
18588         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18589 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18590         has_space=`$ECHO "$complete" | $GREP " "`
18591         if test "x$has_space" != x; then
18592           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18593 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18594         fi
18595         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18596       fi
18597     fi
18598 
18599     # Now join together the path and the arguments once again
18600     if test "x$arguments" != xEOL; then
18601       new_complete="$new_path ${arguments% *}"
18602     else
18603       new_complete="$new_path"
18604     fi
18605 
18606     if test "x$complete" != "x$new_complete"; then
18607       FOUND_MAKE="$new_complete"
18608       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18609 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18610     fi
18611   fi
18612 
18613         fi
18614       fi
18615     fi
18616   fi
18617 
18618         fi
18619         PATH=$OLD_PATH
18620       fi
18621     fi
18622 
18623     if test "x$FOUND_MAKE" = x; then
18624       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
18625     fi
18626 
18627   else
18628     # The variable is set, but is it from the command line or the environment?
18629 
18630     # Try to remove the string !MAKE! from our list.
18631     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18632     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18633       # If it failed, the variable was not from the command line. Ignore it,
18634       # but warn the user (except for BASH, which is always set by the calling BASH).
18635       if test "xMAKE" != xBASH; then
18636         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18637 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18638       fi
18639       # Try to locate tool using the code snippet
18640 
18641     # Try our hardest to locate a correct version of GNU make
18642     for ac_prog in gmake
18643 do
18644   # Extract the first word of "$ac_prog", so it can be a program name with args.
18645 set dummy $ac_prog; ac_word=$2
18646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18647 $as_echo_n "checking for $ac_word... " >&6; }
18648 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18649   $as_echo_n "(cached) " >&6
18650 else
18651   case $CHECK_GMAKE in
18652   [\\/]* | ?:[\\/]*)
18653   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18654   ;;
18655   *)
18656   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18657 for as_dir in $PATH
18658 do
18659   IFS=$as_save_IFS
18660   test -z "$as_dir" && as_dir=.
18661     for ac_exec_ext in '' $ac_executable_extensions; do
18662   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18663     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18664     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18665     break 2
18666   fi
18667 done
18668   done
18669 IFS=$as_save_IFS
18670 
18671   ;;
18672 esac
18673 fi
18674 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18675 if test -n "$CHECK_GMAKE"; then
18676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18677 $as_echo "$CHECK_GMAKE" >&6; }
18678 else
18679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18680 $as_echo "no" >&6; }
18681 fi
18682 
18683 
18684   test -n "$CHECK_GMAKE" && break
18685 done
18686 
18687 
18688   MAKE_CANDIDATE=""$CHECK_GMAKE""
18689   DESCRIPTION="gmake in PATH"
18690 
18691   # On Cygwin, we require a newer version of make than on other platforms
18692   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18693     MAKE_VERSION_EXPR="-e 4\."
18694     MAKE_REQUIRED_VERSION="4.0"
18695    else
18696     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18697     MAKE_REQUIRED_VERSION="3.81"
18698   fi
18699 
18700   if test "x$MAKE_CANDIDATE" != x; then
18701     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18702 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18703     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18704     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18705     if test "x$IS_GNU_MAKE" = x; then
18706       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18707 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18708     else
18709       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18710       if test "x$IS_MODERN_MAKE" = x; then
18711         { $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
18712 $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;}
18713       else
18714         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18715           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18716             MAKE_EXPECTED_ENV='cygwin'
18717           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18718             MAKE_EXPECTED_ENV='msys'
18719           else
18720             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18721           fi
18722           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18723           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18724         else
18725           # Not relevant for non-Windows
18726           IS_MAKE_CORRECT_ENV=true
18727         fi
18728         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18729           { $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
18730 $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;}
18731         else
18732           FOUND_MAKE=$MAKE_CANDIDATE
18733 
18734   # Only process if variable expands to non-empty
18735 
18736   if test "x$FOUND_MAKE" != x; then
18737     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18738 
18739   # First separate the path from the arguments. This will split at the first
18740   # space.
18741   complete="$FOUND_MAKE"
18742   path="${complete%% *}"
18743   tmp="$complete EOL"
18744   arguments="${tmp#* }"
18745 
18746   # Input might be given as Windows format, start by converting to
18747   # unix format.
18748   new_path=`$CYGPATH -u "$path"`
18749 
18750   # Now try to locate executable using which
18751   new_path=`$WHICH "$new_path" 2> /dev/null`
18752   # bat and cmd files are not always considered executable in cygwin causing which
18753   # to not find them
18754   if test "x$new_path" = x \
18755       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18756       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18757     new_path=`$CYGPATH -u "$path"`
18758   fi
18759   if test "x$new_path" = x; then
18760     # Oops. Which didn't find the executable.
18761     # The splitting of arguments from the executable at a space might have been incorrect,
18762     # since paths with space are more likely in Windows. Give it another try with the whole
18763     # argument.
18764     path="$complete"
18765     arguments="EOL"
18766     new_path=`$CYGPATH -u "$path"`
18767     new_path=`$WHICH "$new_path" 2> /dev/null`
18768     # bat and cmd files are not always considered executable in cygwin causing which
18769     # to not find them
18770     if test "x$new_path" = x \
18771         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18772         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18773       new_path=`$CYGPATH -u "$path"`
18774     fi
18775     if test "x$new_path" = x; then
18776       # It's still not found. Now this is an unrecoverable error.
18777       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18778 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18779       has_space=`$ECHO "$complete" | $GREP " "`
18780       if test "x$has_space" != x; then
18781         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18782 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18783       fi
18784       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18785     fi
18786   fi
18787 
18788   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18789   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18790   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18791   # "foo.exe" is OK but "foo" is an error.
18792   #
18793   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18794   # It is also a way to make sure we got the proper file name for the real test later on.
18795   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18796   if test "x$test_shortpath" = x; then
18797     # Short path failed, file does not exist as specified.
18798     # Try adding .exe or .cmd
18799     if test -f "${new_path}.exe"; then
18800       input_to_shortpath="${new_path}.exe"
18801     elif test -f "${new_path}.cmd"; then
18802       input_to_shortpath="${new_path}.cmd"
18803     else
18804       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18805 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18806       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18807 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18808       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18809     fi
18810   else
18811     input_to_shortpath="$new_path"
18812   fi
18813 
18814   # Call helper function which possibly converts this using DOS-style short mode.
18815   # If so, the updated path is stored in $new_path.
18816   new_path="$input_to_shortpath"
18817 
18818   input_path="$input_to_shortpath"
18819   # Check if we need to convert this using DOS-style short mode. If the path
18820   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18821   # take no chances and rewrite it.
18822   # Note: m4 eats our [], so we need to use [ and ] instead.
18823   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18824   if test "x$has_forbidden_chars" != x; then
18825     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18826     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18827     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18828     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18829       # Going to short mode and back again did indeed matter. Since short mode is
18830       # case insensitive, let's make it lowercase to improve readability.
18831       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18832       # Now convert it back to Unix-style (cygpath)
18833       input_path=`$CYGPATH -u "$shortmode_path"`
18834       new_path="$input_path"
18835     fi
18836   fi
18837 
18838   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18839   if test "x$test_cygdrive_prefix" = x; then
18840     # As a simple fix, exclude /usr/bin since it's not a real path.
18841     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18842       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18843       # a path prefixed by /cygdrive for fixpath to work.
18844       new_path="$CYGWIN_ROOT_PATH$input_path"
18845     fi
18846   fi
18847 
18848   # remove trailing .exe if any
18849   new_path="${new_path/%.exe/}"
18850 
18851     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18852 
18853   # First separate the path from the arguments. This will split at the first
18854   # space.
18855   complete="$FOUND_MAKE"
18856   path="${complete%% *}"
18857   tmp="$complete EOL"
18858   arguments="${tmp#* }"
18859 
18860   # Input might be given as Windows format, start by converting to
18861   # unix format.
18862   new_path="$path"
18863 
18864   windows_path="$new_path"
18865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18866     unix_path=`$CYGPATH -u "$windows_path"`
18867     new_path="$unix_path"
18868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18869     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18870     new_path="$unix_path"
18871   fi
18872 
18873 
18874   # Now try to locate executable using which
18875   new_path=`$WHICH "$new_path" 2> /dev/null`
18876 
18877   if test "x$new_path" = x; then
18878     # Oops. Which didn't find the executable.
18879     # The splitting of arguments from the executable at a space might have been incorrect,
18880     # since paths with space are more likely in Windows. Give it another try with the whole
18881     # argument.
18882     path="$complete"
18883     arguments="EOL"
18884     new_path="$path"
18885 
18886   windows_path="$new_path"
18887   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18888     unix_path=`$CYGPATH -u "$windows_path"`
18889     new_path="$unix_path"
18890   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18891     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18892     new_path="$unix_path"
18893   fi
18894 
18895 
18896     new_path=`$WHICH "$new_path" 2> /dev/null`
18897     # bat and cmd files are not always considered executable in MSYS causing which
18898     # to not find them
18899     if test "x$new_path" = x \
18900         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18901         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18902       new_path="$path"
18903 
18904   windows_path="$new_path"
18905   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18906     unix_path=`$CYGPATH -u "$windows_path"`
18907     new_path="$unix_path"
18908   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18909     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18910     new_path="$unix_path"
18911   fi
18912 
18913     fi
18914 
18915     if test "x$new_path" = x; then
18916       # It's still not found. Now this is an unrecoverable error.
18917       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18918 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18919       has_space=`$ECHO "$complete" | $GREP " "`
18920       if test "x$has_space" != x; then
18921         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18922 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18923       fi
18924       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18925     fi
18926   fi
18927 
18928   # Now new_path has a complete unix path to the binary
18929   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18930     # Keep paths in /bin as-is, but remove trailing .exe if any
18931     new_path="${new_path/%.exe/}"
18932     # Do not save /bin paths to all_fixpath_prefixes!
18933   else
18934     # Not in mixed or Windows style, start by that.
18935     new_path=`cmd //c echo $new_path`
18936 
18937   input_path="$new_path"
18938   # Check if we need to convert this using DOS-style short mode. If the path
18939   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18940   # take no chances and rewrite it.
18941   # Note: m4 eats our [], so we need to use [ and ] instead.
18942   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18943   if test "x$has_forbidden_chars" != x; then
18944     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18945     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18946   fi
18947 
18948     # Output is in $new_path
18949 
18950   windows_path="$new_path"
18951   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18952     unix_path=`$CYGPATH -u "$windows_path"`
18953     new_path="$unix_path"
18954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18955     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18956     new_path="$unix_path"
18957   fi
18958 
18959     # remove trailing .exe if any
18960     new_path="${new_path/%.exe/}"
18961 
18962     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18963     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18964   fi
18965 
18966     else
18967       # We're on a unix platform. Hooray! :)
18968       # First separate the path from the arguments. This will split at the first
18969       # space.
18970       complete="$FOUND_MAKE"
18971       path="${complete%% *}"
18972       tmp="$complete EOL"
18973       arguments="${tmp#* }"
18974 
18975       # Cannot rely on the command "which" here since it doesn't always work.
18976       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18977       if test -z "$is_absolute_path"; then
18978         # Path to executable is not absolute. Find it.
18979         IFS_save="$IFS"
18980         IFS=:
18981         for p in $PATH; do
18982           if test -f "$p/$path" && test -x "$p/$path"; then
18983             new_path="$p/$path"
18984             break
18985           fi
18986         done
18987         IFS="$IFS_save"
18988       else
18989         # This is an absolute path, we can use it without further modifications.
18990         new_path="$path"
18991       fi
18992 
18993       if test "x$new_path" = x; then
18994         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18995 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18996         has_space=`$ECHO "$complete" | $GREP " "`
18997         if test "x$has_space" != x; then
18998           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18999 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19000         fi
19001         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19002       fi
19003     fi
19004 
19005     # Now join together the path and the arguments once again
19006     if test "x$arguments" != xEOL; then
19007       new_complete="$new_path ${arguments% *}"
19008     else
19009       new_complete="$new_path"
19010     fi
19011 
19012     if test "x$complete" != "x$new_complete"; then
19013       FOUND_MAKE="$new_complete"
19014       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19015 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19016     fi
19017   fi
19018 
19019         fi
19020       fi
19021     fi
19022   fi
19023 
19024 
19025     if test "x$FOUND_MAKE" = x; then
19026       for ac_prog in make
19027 do
19028   # Extract the first word of "$ac_prog", so it can be a program name with args.
19029 set dummy $ac_prog; ac_word=$2
19030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19031 $as_echo_n "checking for $ac_word... " >&6; }
19032 if ${ac_cv_path_CHECK_MAKE+:} false; then :
19033   $as_echo_n "(cached) " >&6
19034 else
19035   case $CHECK_MAKE in
19036   [\\/]* | ?:[\\/]*)
19037   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19038   ;;
19039   *)
19040   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19041 for as_dir in $PATH
19042 do
19043   IFS=$as_save_IFS
19044   test -z "$as_dir" && as_dir=.
19045     for ac_exec_ext in '' $ac_executable_extensions; do
19046   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19047     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19048     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19049     break 2
19050   fi
19051 done
19052   done
19053 IFS=$as_save_IFS
19054 
19055   ;;
19056 esac
19057 fi
19058 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19059 if test -n "$CHECK_MAKE"; then
19060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19061 $as_echo "$CHECK_MAKE" >&6; }
19062 else
19063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19064 $as_echo "no" >&6; }
19065 fi
19066 
19067 
19068   test -n "$CHECK_MAKE" && break
19069 done
19070 
19071 
19072   MAKE_CANDIDATE=""$CHECK_MAKE""
19073   DESCRIPTION="make in PATH"
19074 
19075   # On Cygwin, we require a newer version of make than on other platforms
19076   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19077     MAKE_VERSION_EXPR="-e 4\."
19078     MAKE_REQUIRED_VERSION="4.0"
19079    else
19080     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19081     MAKE_REQUIRED_VERSION="3.81"
19082   fi
19083 
19084   if test "x$MAKE_CANDIDATE" != x; then
19085     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19086 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19087     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19088     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19089     if test "x$IS_GNU_MAKE" = x; then
19090       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19091 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19092     else
19093       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19094       if test "x$IS_MODERN_MAKE" = x; then
19095         { $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
19096 $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;}
19097       else
19098         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19099           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19100             MAKE_EXPECTED_ENV='cygwin'
19101           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19102             MAKE_EXPECTED_ENV='msys'
19103           else
19104             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19105           fi
19106           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19107           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19108         else
19109           # Not relevant for non-Windows
19110           IS_MAKE_CORRECT_ENV=true
19111         fi
19112         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19113           { $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
19114 $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;}
19115         else
19116           FOUND_MAKE=$MAKE_CANDIDATE
19117 
19118   # Only process if variable expands to non-empty
19119 
19120   if test "x$FOUND_MAKE" != x; then
19121     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19122 
19123   # First separate the path from the arguments. This will split at the first
19124   # space.
19125   complete="$FOUND_MAKE"
19126   path="${complete%% *}"
19127   tmp="$complete EOL"
19128   arguments="${tmp#* }"
19129 
19130   # Input might be given as Windows format, start by converting to
19131   # unix format.
19132   new_path=`$CYGPATH -u "$path"`
19133 
19134   # Now try to locate executable using which
19135   new_path=`$WHICH "$new_path" 2> /dev/null`
19136   # bat and cmd files are not always considered executable in cygwin causing which
19137   # to not find them
19138   if test "x$new_path" = x \
19139       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19140       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19141     new_path=`$CYGPATH -u "$path"`
19142   fi
19143   if test "x$new_path" = x; then
19144     # Oops. Which didn't find the executable.
19145     # The splitting of arguments from the executable at a space might have been incorrect,
19146     # since paths with space are more likely in Windows. Give it another try with the whole
19147     # argument.
19148     path="$complete"
19149     arguments="EOL"
19150     new_path=`$CYGPATH -u "$path"`
19151     new_path=`$WHICH "$new_path" 2> /dev/null`
19152     # bat and cmd files are not always considered executable in cygwin causing which
19153     # to not find them
19154     if test "x$new_path" = x \
19155         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19156         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19157       new_path=`$CYGPATH -u "$path"`
19158     fi
19159     if test "x$new_path" = x; then
19160       # It's still not found. Now this is an unrecoverable error.
19161       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19162 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19163       has_space=`$ECHO "$complete" | $GREP " "`
19164       if test "x$has_space" != x; then
19165         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19166 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19167       fi
19168       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19169     fi
19170   fi
19171 
19172   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19173   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19174   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19175   # "foo.exe" is OK but "foo" is an error.
19176   #
19177   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19178   # It is also a way to make sure we got the proper file name for the real test later on.
19179   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19180   if test "x$test_shortpath" = x; then
19181     # Short path failed, file does not exist as specified.
19182     # Try adding .exe or .cmd
19183     if test -f "${new_path}.exe"; then
19184       input_to_shortpath="${new_path}.exe"
19185     elif test -f "${new_path}.cmd"; then
19186       input_to_shortpath="${new_path}.cmd"
19187     else
19188       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19189 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19190       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19191 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19192       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19193     fi
19194   else
19195     input_to_shortpath="$new_path"
19196   fi
19197 
19198   # Call helper function which possibly converts this using DOS-style short mode.
19199   # If so, the updated path is stored in $new_path.
19200   new_path="$input_to_shortpath"
19201 
19202   input_path="$input_to_shortpath"
19203   # Check if we need to convert this using DOS-style short mode. If the path
19204   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19205   # take no chances and rewrite it.
19206   # Note: m4 eats our [], so we need to use [ and ] instead.
19207   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19208   if test "x$has_forbidden_chars" != x; then
19209     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19210     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19211     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19212     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19213       # Going to short mode and back again did indeed matter. Since short mode is
19214       # case insensitive, let's make it lowercase to improve readability.
19215       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19216       # Now convert it back to Unix-style (cygpath)
19217       input_path=`$CYGPATH -u "$shortmode_path"`
19218       new_path="$input_path"
19219     fi
19220   fi
19221 
19222   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19223   if test "x$test_cygdrive_prefix" = x; then
19224     # As a simple fix, exclude /usr/bin since it's not a real path.
19225     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19226       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19227       # a path prefixed by /cygdrive for fixpath to work.
19228       new_path="$CYGWIN_ROOT_PATH$input_path"
19229     fi
19230   fi
19231 
19232   # remove trailing .exe if any
19233   new_path="${new_path/%.exe/}"
19234 
19235     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19236 
19237   # First separate the path from the arguments. This will split at the first
19238   # space.
19239   complete="$FOUND_MAKE"
19240   path="${complete%% *}"
19241   tmp="$complete EOL"
19242   arguments="${tmp#* }"
19243 
19244   # Input might be given as Windows format, start by converting to
19245   # unix format.
19246   new_path="$path"
19247 
19248   windows_path="$new_path"
19249   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19250     unix_path=`$CYGPATH -u "$windows_path"`
19251     new_path="$unix_path"
19252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19253     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19254     new_path="$unix_path"
19255   fi
19256 
19257 
19258   # Now try to locate executable using which
19259   new_path=`$WHICH "$new_path" 2> /dev/null`
19260 
19261   if test "x$new_path" = x; then
19262     # Oops. Which didn't find the executable.
19263     # The splitting of arguments from the executable at a space might have been incorrect,
19264     # since paths with space are more likely in Windows. Give it another try with the whole
19265     # argument.
19266     path="$complete"
19267     arguments="EOL"
19268     new_path="$path"
19269 
19270   windows_path="$new_path"
19271   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19272     unix_path=`$CYGPATH -u "$windows_path"`
19273     new_path="$unix_path"
19274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19275     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19276     new_path="$unix_path"
19277   fi
19278 
19279 
19280     new_path=`$WHICH "$new_path" 2> /dev/null`
19281     # bat and cmd files are not always considered executable in MSYS causing which
19282     # to not find them
19283     if test "x$new_path" = x \
19284         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19285         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19286       new_path="$path"
19287 
19288   windows_path="$new_path"
19289   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19290     unix_path=`$CYGPATH -u "$windows_path"`
19291     new_path="$unix_path"
19292   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19293     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19294     new_path="$unix_path"
19295   fi
19296 
19297     fi
19298 
19299     if test "x$new_path" = x; then
19300       # It's still not found. Now this is an unrecoverable error.
19301       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19302 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19303       has_space=`$ECHO "$complete" | $GREP " "`
19304       if test "x$has_space" != x; then
19305         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19306 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19307       fi
19308       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19309     fi
19310   fi
19311 
19312   # Now new_path has a complete unix path to the binary
19313   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19314     # Keep paths in /bin as-is, but remove trailing .exe if any
19315     new_path="${new_path/%.exe/}"
19316     # Do not save /bin paths to all_fixpath_prefixes!
19317   else
19318     # Not in mixed or Windows style, start by that.
19319     new_path=`cmd //c echo $new_path`
19320 
19321   input_path="$new_path"
19322   # Check if we need to convert this using DOS-style short mode. If the path
19323   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19324   # take no chances and rewrite it.
19325   # Note: m4 eats our [], so we need to use [ and ] instead.
19326   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19327   if test "x$has_forbidden_chars" != x; then
19328     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19329     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19330   fi
19331 
19332     # Output is in $new_path
19333 
19334   windows_path="$new_path"
19335   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19336     unix_path=`$CYGPATH -u "$windows_path"`
19337     new_path="$unix_path"
19338   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19339     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19340     new_path="$unix_path"
19341   fi
19342 
19343     # remove trailing .exe if any
19344     new_path="${new_path/%.exe/}"
19345 
19346     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19347     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19348   fi
19349 
19350     else
19351       # We're on a unix platform. Hooray! :)
19352       # First separate the path from the arguments. This will split at the first
19353       # space.
19354       complete="$FOUND_MAKE"
19355       path="${complete%% *}"
19356       tmp="$complete EOL"
19357       arguments="${tmp#* }"
19358 
19359       # Cannot rely on the command "which" here since it doesn't always work.
19360       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19361       if test -z "$is_absolute_path"; then
19362         # Path to executable is not absolute. Find it.
19363         IFS_save="$IFS"
19364         IFS=:
19365         for p in $PATH; do
19366           if test -f "$p/$path" && test -x "$p/$path"; then
19367             new_path="$p/$path"
19368             break
19369           fi
19370         done
19371         IFS="$IFS_save"
19372       else
19373         # This is an absolute path, we can use it without further modifications.
19374         new_path="$path"
19375       fi
19376 
19377       if test "x$new_path" = x; then
19378         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19379 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19380         has_space=`$ECHO "$complete" | $GREP " "`
19381         if test "x$has_space" != x; then
19382           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19383 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19384         fi
19385         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19386       fi
19387     fi
19388 
19389     # Now join together the path and the arguments once again
19390     if test "x$arguments" != xEOL; then
19391       new_complete="$new_path ${arguments% *}"
19392     else
19393       new_complete="$new_path"
19394     fi
19395 
19396     if test "x$complete" != "x$new_complete"; then
19397       FOUND_MAKE="$new_complete"
19398       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19399 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19400     fi
19401   fi
19402 
19403         fi
19404       fi
19405     fi
19406   fi
19407 
19408     fi
19409 
19410     if test "x$FOUND_MAKE" = x; then
19411       if test "x$TOOLCHAIN_PATH" != x; then
19412         # We have a toolchain path, check that as well before giving up.
19413         OLD_PATH=$PATH
19414         PATH=$TOOLCHAIN_PATH:$PATH
19415         for ac_prog in gmake
19416 do
19417   # Extract the first word of "$ac_prog", so it can be a program name with args.
19418 set dummy $ac_prog; ac_word=$2
19419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19420 $as_echo_n "checking for $ac_word... " >&6; }
19421 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19422   $as_echo_n "(cached) " >&6
19423 else
19424   case $CHECK_TOOLSDIR_GMAKE in
19425   [\\/]* | ?:[\\/]*)
19426   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19427   ;;
19428   *)
19429   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19430 for as_dir in $PATH
19431 do
19432   IFS=$as_save_IFS
19433   test -z "$as_dir" && as_dir=.
19434     for ac_exec_ext in '' $ac_executable_extensions; do
19435   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19436     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19437     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19438     break 2
19439   fi
19440 done
19441   done
19442 IFS=$as_save_IFS
19443 
19444   ;;
19445 esac
19446 fi
19447 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19448 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19450 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19451 else
19452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19453 $as_echo "no" >&6; }
19454 fi
19455 
19456 
19457   test -n "$CHECK_TOOLSDIR_GMAKE" && break
19458 done
19459 
19460 
19461   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19462   DESCRIPTION="gmake in tools-dir"
19463 
19464   # On Cygwin, we require a newer version of make than on other platforms
19465   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19466     MAKE_VERSION_EXPR="-e 4\."
19467     MAKE_REQUIRED_VERSION="4.0"
19468    else
19469     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19470     MAKE_REQUIRED_VERSION="3.81"
19471   fi
19472 
19473   if test "x$MAKE_CANDIDATE" != x; then
19474     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19475 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19476     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19477     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19478     if test "x$IS_GNU_MAKE" = x; then
19479       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19480 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19481     else
19482       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19483       if test "x$IS_MODERN_MAKE" = x; then
19484         { $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
19485 $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;}
19486       else
19487         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19488           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19489             MAKE_EXPECTED_ENV='cygwin'
19490           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19491             MAKE_EXPECTED_ENV='msys'
19492           else
19493             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19494           fi
19495           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19496           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19497         else
19498           # Not relevant for non-Windows
19499           IS_MAKE_CORRECT_ENV=true
19500         fi
19501         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19502           { $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
19503 $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;}
19504         else
19505           FOUND_MAKE=$MAKE_CANDIDATE
19506 
19507   # Only process if variable expands to non-empty
19508 
19509   if test "x$FOUND_MAKE" != x; then
19510     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19511 
19512   # First separate the path from the arguments. This will split at the first
19513   # space.
19514   complete="$FOUND_MAKE"
19515   path="${complete%% *}"
19516   tmp="$complete EOL"
19517   arguments="${tmp#* }"
19518 
19519   # Input might be given as Windows format, start by converting to
19520   # unix format.
19521   new_path=`$CYGPATH -u "$path"`
19522 
19523   # Now try to locate executable using which
19524   new_path=`$WHICH "$new_path" 2> /dev/null`
19525   # bat and cmd files are not always considered executable in cygwin causing which
19526   # to not find them
19527   if test "x$new_path" = x \
19528       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19529       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19530     new_path=`$CYGPATH -u "$path"`
19531   fi
19532   if test "x$new_path" = x; then
19533     # Oops. Which didn't find the executable.
19534     # The splitting of arguments from the executable at a space might have been incorrect,
19535     # since paths with space are more likely in Windows. Give it another try with the whole
19536     # argument.
19537     path="$complete"
19538     arguments="EOL"
19539     new_path=`$CYGPATH -u "$path"`
19540     new_path=`$WHICH "$new_path" 2> /dev/null`
19541     # bat and cmd files are not always considered executable in cygwin causing which
19542     # to not find them
19543     if test "x$new_path" = x \
19544         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19545         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19546       new_path=`$CYGPATH -u "$path"`
19547     fi
19548     if test "x$new_path" = x; then
19549       # It's still not found. Now this is an unrecoverable error.
19550       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19551 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19552       has_space=`$ECHO "$complete" | $GREP " "`
19553       if test "x$has_space" != x; then
19554         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19555 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19556       fi
19557       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19558     fi
19559   fi
19560 
19561   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19562   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19563   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19564   # "foo.exe" is OK but "foo" is an error.
19565   #
19566   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19567   # It is also a way to make sure we got the proper file name for the real test later on.
19568   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19569   if test "x$test_shortpath" = x; then
19570     # Short path failed, file does not exist as specified.
19571     # Try adding .exe or .cmd
19572     if test -f "${new_path}.exe"; then
19573       input_to_shortpath="${new_path}.exe"
19574     elif test -f "${new_path}.cmd"; then
19575       input_to_shortpath="${new_path}.cmd"
19576     else
19577       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19578 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19579       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19580 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19581       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19582     fi
19583   else
19584     input_to_shortpath="$new_path"
19585   fi
19586 
19587   # Call helper function which possibly converts this using DOS-style short mode.
19588   # If so, the updated path is stored in $new_path.
19589   new_path="$input_to_shortpath"
19590 
19591   input_path="$input_to_shortpath"
19592   # Check if we need to convert this using DOS-style short mode. If the path
19593   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19594   # take no chances and rewrite it.
19595   # Note: m4 eats our [], so we need to use [ and ] instead.
19596   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19597   if test "x$has_forbidden_chars" != x; then
19598     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19599     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19600     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19601     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19602       # Going to short mode and back again did indeed matter. Since short mode is
19603       # case insensitive, let's make it lowercase to improve readability.
19604       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19605       # Now convert it back to Unix-style (cygpath)
19606       input_path=`$CYGPATH -u "$shortmode_path"`
19607       new_path="$input_path"
19608     fi
19609   fi
19610 
19611   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19612   if test "x$test_cygdrive_prefix" = x; then
19613     # As a simple fix, exclude /usr/bin since it's not a real path.
19614     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19615       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19616       # a path prefixed by /cygdrive for fixpath to work.
19617       new_path="$CYGWIN_ROOT_PATH$input_path"
19618     fi
19619   fi
19620 
19621   # remove trailing .exe if any
19622   new_path="${new_path/%.exe/}"
19623 
19624     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19625 
19626   # First separate the path from the arguments. This will split at the first
19627   # space.
19628   complete="$FOUND_MAKE"
19629   path="${complete%% *}"
19630   tmp="$complete EOL"
19631   arguments="${tmp#* }"
19632 
19633   # Input might be given as Windows format, start by converting to
19634   # unix format.
19635   new_path="$path"
19636 
19637   windows_path="$new_path"
19638   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19639     unix_path=`$CYGPATH -u "$windows_path"`
19640     new_path="$unix_path"
19641   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19642     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19643     new_path="$unix_path"
19644   fi
19645 
19646 
19647   # Now try to locate executable using which
19648   new_path=`$WHICH "$new_path" 2> /dev/null`
19649 
19650   if test "x$new_path" = x; then
19651     # Oops. Which didn't find the executable.
19652     # The splitting of arguments from the executable at a space might have been incorrect,
19653     # since paths with space are more likely in Windows. Give it another try with the whole
19654     # argument.
19655     path="$complete"
19656     arguments="EOL"
19657     new_path="$path"
19658 
19659   windows_path="$new_path"
19660   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19661     unix_path=`$CYGPATH -u "$windows_path"`
19662     new_path="$unix_path"
19663   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19664     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19665     new_path="$unix_path"
19666   fi
19667 
19668 
19669     new_path=`$WHICH "$new_path" 2> /dev/null`
19670     # bat and cmd files are not always considered executable in MSYS causing which
19671     # to not find them
19672     if test "x$new_path" = x \
19673         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19674         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19675       new_path="$path"
19676 
19677   windows_path="$new_path"
19678   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19679     unix_path=`$CYGPATH -u "$windows_path"`
19680     new_path="$unix_path"
19681   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19682     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19683     new_path="$unix_path"
19684   fi
19685 
19686     fi
19687 
19688     if test "x$new_path" = x; then
19689       # It's still not found. Now this is an unrecoverable error.
19690       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19691 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19692       has_space=`$ECHO "$complete" | $GREP " "`
19693       if test "x$has_space" != x; then
19694         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19695 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19696       fi
19697       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19698     fi
19699   fi
19700 
19701   # Now new_path has a complete unix path to the binary
19702   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19703     # Keep paths in /bin as-is, but remove trailing .exe if any
19704     new_path="${new_path/%.exe/}"
19705     # Do not save /bin paths to all_fixpath_prefixes!
19706   else
19707     # Not in mixed or Windows style, start by that.
19708     new_path=`cmd //c echo $new_path`
19709 
19710   input_path="$new_path"
19711   # Check if we need to convert this using DOS-style short mode. If the path
19712   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19713   # take no chances and rewrite it.
19714   # Note: m4 eats our [], so we need to use [ and ] instead.
19715   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19716   if test "x$has_forbidden_chars" != x; then
19717     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19718     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19719   fi
19720 
19721     # Output is in $new_path
19722 
19723   windows_path="$new_path"
19724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19725     unix_path=`$CYGPATH -u "$windows_path"`
19726     new_path="$unix_path"
19727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19729     new_path="$unix_path"
19730   fi
19731 
19732     # remove trailing .exe if any
19733     new_path="${new_path/%.exe/}"
19734 
19735     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19736     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19737   fi
19738 
19739     else
19740       # We're on a unix platform. Hooray! :)
19741       # First separate the path from the arguments. This will split at the first
19742       # space.
19743       complete="$FOUND_MAKE"
19744       path="${complete%% *}"
19745       tmp="$complete EOL"
19746       arguments="${tmp#* }"
19747 
19748       # Cannot rely on the command "which" here since it doesn't always work.
19749       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19750       if test -z "$is_absolute_path"; then
19751         # Path to executable is not absolute. Find it.
19752         IFS_save="$IFS"
19753         IFS=:
19754         for p in $PATH; do
19755           if test -f "$p/$path" && test -x "$p/$path"; then
19756             new_path="$p/$path"
19757             break
19758           fi
19759         done
19760         IFS="$IFS_save"
19761       else
19762         # This is an absolute path, we can use it without further modifications.
19763         new_path="$path"
19764       fi
19765 
19766       if test "x$new_path" = x; then
19767         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19768 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19769         has_space=`$ECHO "$complete" | $GREP " "`
19770         if test "x$has_space" != x; then
19771           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19772 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19773         fi
19774         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19775       fi
19776     fi
19777 
19778     # Now join together the path and the arguments once again
19779     if test "x$arguments" != xEOL; then
19780       new_complete="$new_path ${arguments% *}"
19781     else
19782       new_complete="$new_path"
19783     fi
19784 
19785     if test "x$complete" != "x$new_complete"; then
19786       FOUND_MAKE="$new_complete"
19787       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19788 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19789     fi
19790   fi
19791 
19792         fi
19793       fi
19794     fi
19795   fi
19796 
19797         if test "x$FOUND_MAKE" = x; then
19798           for ac_prog in make
19799 do
19800   # Extract the first word of "$ac_prog", so it can be a program name with args.
19801 set dummy $ac_prog; ac_word=$2
19802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19803 $as_echo_n "checking for $ac_word... " >&6; }
19804 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19805   $as_echo_n "(cached) " >&6
19806 else
19807   case $CHECK_TOOLSDIR_MAKE in
19808   [\\/]* | ?:[\\/]*)
19809   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19810   ;;
19811   *)
19812   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19813 for as_dir in $PATH
19814 do
19815   IFS=$as_save_IFS
19816   test -z "$as_dir" && as_dir=.
19817     for ac_exec_ext in '' $ac_executable_extensions; do
19818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19819     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19821     break 2
19822   fi
19823 done
19824   done
19825 IFS=$as_save_IFS
19826 
19827   ;;
19828 esac
19829 fi
19830 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19831 if test -n "$CHECK_TOOLSDIR_MAKE"; then
19832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19833 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19834 else
19835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19836 $as_echo "no" >&6; }
19837 fi
19838 
19839 
19840   test -n "$CHECK_TOOLSDIR_MAKE" && break
19841 done
19842 
19843 
19844   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19845   DESCRIPTION="make in tools-dir"
19846 
19847   # On Cygwin, we require a newer version of make than on other platforms
19848   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19849     MAKE_VERSION_EXPR="-e 4\."
19850     MAKE_REQUIRED_VERSION="4.0"
19851    else
19852     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19853     MAKE_REQUIRED_VERSION="3.81"
19854   fi
19855 
19856   if test "x$MAKE_CANDIDATE" != x; then
19857     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19858 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19859     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19860     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19861     if test "x$IS_GNU_MAKE" = x; then
19862       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19863 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19864     else
19865       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19866       if test "x$IS_MODERN_MAKE" = x; then
19867         { $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
19868 $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;}
19869       else
19870         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19871           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19872             MAKE_EXPECTED_ENV='cygwin'
19873           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19874             MAKE_EXPECTED_ENV='msys'
19875           else
19876             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19877           fi
19878           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19879           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19880         else
19881           # Not relevant for non-Windows
19882           IS_MAKE_CORRECT_ENV=true
19883         fi
19884         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19885           { $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
19886 $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;}
19887         else
19888           FOUND_MAKE=$MAKE_CANDIDATE
19889 
19890   # Only process if variable expands to non-empty
19891 
19892   if test "x$FOUND_MAKE" != x; then
19893     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19894 
19895   # First separate the path from the arguments. This will split at the first
19896   # space.
19897   complete="$FOUND_MAKE"
19898   path="${complete%% *}"
19899   tmp="$complete EOL"
19900   arguments="${tmp#* }"
19901 
19902   # Input might be given as Windows format, start by converting to
19903   # unix format.
19904   new_path=`$CYGPATH -u "$path"`
19905 
19906   # Now try to locate executable using which
19907   new_path=`$WHICH "$new_path" 2> /dev/null`
19908   # bat and cmd files are not always considered executable in cygwin causing which
19909   # to not find them
19910   if test "x$new_path" = x \
19911       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19912       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19913     new_path=`$CYGPATH -u "$path"`
19914   fi
19915   if test "x$new_path" = x; then
19916     # Oops. Which didn't find the executable.
19917     # The splitting of arguments from the executable at a space might have been incorrect,
19918     # since paths with space are more likely in Windows. Give it another try with the whole
19919     # argument.
19920     path="$complete"
19921     arguments="EOL"
19922     new_path=`$CYGPATH -u "$path"`
19923     new_path=`$WHICH "$new_path" 2> /dev/null`
19924     # bat and cmd files are not always considered executable in cygwin causing which
19925     # to not find them
19926     if test "x$new_path" = x \
19927         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19928         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19929       new_path=`$CYGPATH -u "$path"`
19930     fi
19931     if test "x$new_path" = x; then
19932       # It's still not found. Now this is an unrecoverable error.
19933       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19934 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19935       has_space=`$ECHO "$complete" | $GREP " "`
19936       if test "x$has_space" != x; then
19937         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19938 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19939       fi
19940       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19941     fi
19942   fi
19943 
19944   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19945   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19946   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19947   # "foo.exe" is OK but "foo" is an error.
19948   #
19949   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19950   # It is also a way to make sure we got the proper file name for the real test later on.
19951   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19952   if test "x$test_shortpath" = x; then
19953     # Short path failed, file does not exist as specified.
19954     # Try adding .exe or .cmd
19955     if test -f "${new_path}.exe"; then
19956       input_to_shortpath="${new_path}.exe"
19957     elif test -f "${new_path}.cmd"; then
19958       input_to_shortpath="${new_path}.cmd"
19959     else
19960       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19961 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19962       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19963 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19964       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19965     fi
19966   else
19967     input_to_shortpath="$new_path"
19968   fi
19969 
19970   # Call helper function which possibly converts this using DOS-style short mode.
19971   # If so, the updated path is stored in $new_path.
19972   new_path="$input_to_shortpath"
19973 
19974   input_path="$input_to_shortpath"
19975   # Check if we need to convert this using DOS-style short mode. If the path
19976   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19977   # take no chances and rewrite it.
19978   # Note: m4 eats our [], so we need to use [ and ] instead.
19979   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19980   if test "x$has_forbidden_chars" != x; then
19981     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19982     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19983     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19984     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19985       # Going to short mode and back again did indeed matter. Since short mode is
19986       # case insensitive, let's make it lowercase to improve readability.
19987       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19988       # Now convert it back to Unix-style (cygpath)
19989       input_path=`$CYGPATH -u "$shortmode_path"`
19990       new_path="$input_path"
19991     fi
19992   fi
19993 
19994   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19995   if test "x$test_cygdrive_prefix" = x; then
19996     # As a simple fix, exclude /usr/bin since it's not a real path.
19997     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19998       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19999       # a path prefixed by /cygdrive for fixpath to work.
20000       new_path="$CYGWIN_ROOT_PATH$input_path"
20001     fi
20002   fi
20003 
20004   # remove trailing .exe if any
20005   new_path="${new_path/%.exe/}"
20006 
20007     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20008 
20009   # First separate the path from the arguments. This will split at the first
20010   # space.
20011   complete="$FOUND_MAKE"
20012   path="${complete%% *}"
20013   tmp="$complete EOL"
20014   arguments="${tmp#* }"
20015 
20016   # Input might be given as Windows format, start by converting to
20017   # unix format.
20018   new_path="$path"
20019 
20020   windows_path="$new_path"
20021   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20022     unix_path=`$CYGPATH -u "$windows_path"`
20023     new_path="$unix_path"
20024   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20025     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20026     new_path="$unix_path"
20027   fi
20028 
20029 
20030   # Now try to locate executable using which
20031   new_path=`$WHICH "$new_path" 2> /dev/null`
20032 
20033   if test "x$new_path" = x; then
20034     # Oops. Which didn't find the executable.
20035     # The splitting of arguments from the executable at a space might have been incorrect,
20036     # since paths with space are more likely in Windows. Give it another try with the whole
20037     # argument.
20038     path="$complete"
20039     arguments="EOL"
20040     new_path="$path"
20041 
20042   windows_path="$new_path"
20043   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20044     unix_path=`$CYGPATH -u "$windows_path"`
20045     new_path="$unix_path"
20046   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20047     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20048     new_path="$unix_path"
20049   fi
20050 
20051 
20052     new_path=`$WHICH "$new_path" 2> /dev/null`
20053     # bat and cmd files are not always considered executable in MSYS causing which
20054     # to not find them
20055     if test "x$new_path" = x \
20056         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20057         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20058       new_path="$path"
20059 
20060   windows_path="$new_path"
20061   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20062     unix_path=`$CYGPATH -u "$windows_path"`
20063     new_path="$unix_path"
20064   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20065     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20066     new_path="$unix_path"
20067   fi
20068 
20069     fi
20070 
20071     if test "x$new_path" = x; then
20072       # It's still not found. Now this is an unrecoverable error.
20073       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20074 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20075       has_space=`$ECHO "$complete" | $GREP " "`
20076       if test "x$has_space" != x; then
20077         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20078 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20079       fi
20080       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20081     fi
20082   fi
20083 
20084   # Now new_path has a complete unix path to the binary
20085   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20086     # Keep paths in /bin as-is, but remove trailing .exe if any
20087     new_path="${new_path/%.exe/}"
20088     # Do not save /bin paths to all_fixpath_prefixes!
20089   else
20090     # Not in mixed or Windows style, start by that.
20091     new_path=`cmd //c echo $new_path`
20092 
20093   input_path="$new_path"
20094   # Check if we need to convert this using DOS-style short mode. If the path
20095   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20096   # take no chances and rewrite it.
20097   # Note: m4 eats our [], so we need to use [ and ] instead.
20098   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20099   if test "x$has_forbidden_chars" != x; then
20100     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20101     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20102   fi
20103 
20104     # Output is in $new_path
20105 
20106   windows_path="$new_path"
20107   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20108     unix_path=`$CYGPATH -u "$windows_path"`
20109     new_path="$unix_path"
20110   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20111     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20112     new_path="$unix_path"
20113   fi
20114 
20115     # remove trailing .exe if any
20116     new_path="${new_path/%.exe/}"
20117 
20118     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20119     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20120   fi
20121 
20122     else
20123       # We're on a unix platform. Hooray! :)
20124       # First separate the path from the arguments. This will split at the first
20125       # space.
20126       complete="$FOUND_MAKE"
20127       path="${complete%% *}"
20128       tmp="$complete EOL"
20129       arguments="${tmp#* }"
20130 
20131       # Cannot rely on the command "which" here since it doesn't always work.
20132       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20133       if test -z "$is_absolute_path"; then
20134         # Path to executable is not absolute. Find it.
20135         IFS_save="$IFS"
20136         IFS=:
20137         for p in $PATH; do
20138           if test -f "$p/$path" && test -x "$p/$path"; then
20139             new_path="$p/$path"
20140             break
20141           fi
20142         done
20143         IFS="$IFS_save"
20144       else
20145         # This is an absolute path, we can use it without further modifications.
20146         new_path="$path"
20147       fi
20148 
20149       if test "x$new_path" = x; then
20150         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20151 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20152         has_space=`$ECHO "$complete" | $GREP " "`
20153         if test "x$has_space" != x; then
20154           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20155 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20156         fi
20157         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20158       fi
20159     fi
20160 
20161     # Now join together the path and the arguments once again
20162     if test "x$arguments" != xEOL; then
20163       new_complete="$new_path ${arguments% *}"
20164     else
20165       new_complete="$new_path"
20166     fi
20167 
20168     if test "x$complete" != "x$new_complete"; then
20169       FOUND_MAKE="$new_complete"
20170       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20171 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20172     fi
20173   fi
20174 
20175         fi
20176       fi
20177     fi
20178   fi
20179 
20180         fi
20181         PATH=$OLD_PATH
20182       fi
20183     fi
20184 
20185     if test "x$FOUND_MAKE" = x; then
20186       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
20187     fi
20188 
20189     else
20190       # If it succeeded, then it was overridden by the user. We will use it
20191       # for the tool.
20192 
20193       # First remove it from the list of overridden variables, so we can test
20194       # for unknown variables in the end.
20195       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20196 
20197       # Check if we try to supply an empty value
20198       if test "x$MAKE" = x; then
20199         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20200 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20201         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20202 $as_echo_n "checking for MAKE... " >&6; }
20203         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20204 $as_echo "disabled" >&6; }
20205       else
20206         # Check if the provided tool contains a complete path.
20207         tool_specified="$MAKE"
20208         tool_basename="${tool_specified##*/}"
20209         if test "x$tool_basename" = "x$tool_specified"; then
20210           # A command without a complete path is provided, search $PATH.
20211           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20212 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20213           # Extract the first word of "$tool_basename", so it can be a program name with args.
20214 set dummy $tool_basename; ac_word=$2
20215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20216 $as_echo_n "checking for $ac_word... " >&6; }
20217 if ${ac_cv_path_MAKE+:} false; then :
20218   $as_echo_n "(cached) " >&6
20219 else
20220   case $MAKE in
20221   [\\/]* | ?:[\\/]*)
20222   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20223   ;;
20224   *)
20225   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20226 for as_dir in $PATH
20227 do
20228   IFS=$as_save_IFS
20229   test -z "$as_dir" && as_dir=.
20230     for ac_exec_ext in '' $ac_executable_extensions; do
20231   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20232     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20233     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20234     break 2
20235   fi
20236 done
20237   done
20238 IFS=$as_save_IFS
20239 
20240   ;;
20241 esac
20242 fi
20243 MAKE=$ac_cv_path_MAKE
20244 if test -n "$MAKE"; then
20245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20246 $as_echo "$MAKE" >&6; }
20247 else
20248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20249 $as_echo "no" >&6; }
20250 fi
20251 
20252 
20253           if test "x$MAKE" = x; then
20254             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20255           fi
20256         else
20257           # Otherwise we believe it is a complete path. Use it as it is.
20258           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20259 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20260           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20261 $as_echo_n "checking for MAKE... " >&6; }
20262           if test ! -x "$tool_specified"; then
20263             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20264 $as_echo "not found" >&6; }
20265             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20266           fi
20267           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20268 $as_echo "$tool_specified" >&6; }
20269         fi
20270       fi
20271     fi
20272 
20273     # If MAKE was set by user, verify the version
20274 
20275   MAKE_CANDIDATE=""$MAKE""
20276   DESCRIPTION="user supplied MAKE=$MAKE"
20277 
20278   # On Cygwin, we require a newer version of make than on other platforms
20279   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20280     MAKE_VERSION_EXPR="-e 4\."
20281     MAKE_REQUIRED_VERSION="4.0"
20282    else
20283     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20284     MAKE_REQUIRED_VERSION="3.81"
20285   fi
20286 
20287   if test "x$MAKE_CANDIDATE" != x; then
20288     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20289 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20290     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20291     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20292     if test "x$IS_GNU_MAKE" = x; then
20293       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20294 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20295     else
20296       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20297       if test "x$IS_MODERN_MAKE" = x; then
20298         { $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
20299 $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;}
20300       else
20301         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20302           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20303             MAKE_EXPECTED_ENV='cygwin'
20304           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20305             MAKE_EXPECTED_ENV='msys'
20306           else
20307             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20308           fi
20309           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20310           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20311         else
20312           # Not relevant for non-Windows
20313           IS_MAKE_CORRECT_ENV=true
20314         fi
20315         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20316           { $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
20317 $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;}
20318         else
20319           FOUND_MAKE=$MAKE_CANDIDATE
20320 
20321   # Only process if variable expands to non-empty
20322 
20323   if test "x$FOUND_MAKE" != x; then
20324     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20325 
20326   # First separate the path from the arguments. This will split at the first
20327   # space.
20328   complete="$FOUND_MAKE"
20329   path="${complete%% *}"
20330   tmp="$complete EOL"
20331   arguments="${tmp#* }"
20332 
20333   # Input might be given as Windows format, start by converting to
20334   # unix format.
20335   new_path=`$CYGPATH -u "$path"`
20336 
20337   # Now try to locate executable using which
20338   new_path=`$WHICH "$new_path" 2> /dev/null`
20339   # bat and cmd files are not always considered executable in cygwin causing which
20340   # to not find them
20341   if test "x$new_path" = x \
20342       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20343       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20344     new_path=`$CYGPATH -u "$path"`
20345   fi
20346   if test "x$new_path" = x; then
20347     # Oops. Which didn't find the executable.
20348     # The splitting of arguments from the executable at a space might have been incorrect,
20349     # since paths with space are more likely in Windows. Give it another try with the whole
20350     # argument.
20351     path="$complete"
20352     arguments="EOL"
20353     new_path=`$CYGPATH -u "$path"`
20354     new_path=`$WHICH "$new_path" 2> /dev/null`
20355     # bat and cmd files are not always considered executable in cygwin causing which
20356     # to not find them
20357     if test "x$new_path" = x \
20358         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20359         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20360       new_path=`$CYGPATH -u "$path"`
20361     fi
20362     if test "x$new_path" = x; then
20363       # It's still not found. Now this is an unrecoverable error.
20364       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20365 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20366       has_space=`$ECHO "$complete" | $GREP " "`
20367       if test "x$has_space" != x; then
20368         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20369 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20370       fi
20371       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20372     fi
20373   fi
20374 
20375   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20376   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20377   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20378   # "foo.exe" is OK but "foo" is an error.
20379   #
20380   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20381   # It is also a way to make sure we got the proper file name for the real test later on.
20382   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20383   if test "x$test_shortpath" = x; then
20384     # Short path failed, file does not exist as specified.
20385     # Try adding .exe or .cmd
20386     if test -f "${new_path}.exe"; then
20387       input_to_shortpath="${new_path}.exe"
20388     elif test -f "${new_path}.cmd"; then
20389       input_to_shortpath="${new_path}.cmd"
20390     else
20391       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20392 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20393       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20394 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20395       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20396     fi
20397   else
20398     input_to_shortpath="$new_path"
20399   fi
20400 
20401   # Call helper function which possibly converts this using DOS-style short mode.
20402   # If so, the updated path is stored in $new_path.
20403   new_path="$input_to_shortpath"
20404 
20405   input_path="$input_to_shortpath"
20406   # Check if we need to convert this using DOS-style short mode. If the path
20407   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20408   # take no chances and rewrite it.
20409   # Note: m4 eats our [], so we need to use [ and ] instead.
20410   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20411   if test "x$has_forbidden_chars" != x; then
20412     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20413     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20414     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20415     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20416       # Going to short mode and back again did indeed matter. Since short mode is
20417       # case insensitive, let's make it lowercase to improve readability.
20418       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20419       # Now convert it back to Unix-style (cygpath)
20420       input_path=`$CYGPATH -u "$shortmode_path"`
20421       new_path="$input_path"
20422     fi
20423   fi
20424 
20425   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20426   if test "x$test_cygdrive_prefix" = x; then
20427     # As a simple fix, exclude /usr/bin since it's not a real path.
20428     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20429       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20430       # a path prefixed by /cygdrive for fixpath to work.
20431       new_path="$CYGWIN_ROOT_PATH$input_path"
20432     fi
20433   fi
20434 
20435   # remove trailing .exe if any
20436   new_path="${new_path/%.exe/}"
20437 
20438     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20439 
20440   # First separate the path from the arguments. This will split at the first
20441   # space.
20442   complete="$FOUND_MAKE"
20443   path="${complete%% *}"
20444   tmp="$complete EOL"
20445   arguments="${tmp#* }"
20446 
20447   # Input might be given as Windows format, start by converting to
20448   # unix format.
20449   new_path="$path"
20450 
20451   windows_path="$new_path"
20452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20453     unix_path=`$CYGPATH -u "$windows_path"`
20454     new_path="$unix_path"
20455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20456     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20457     new_path="$unix_path"
20458   fi
20459 
20460 
20461   # Now try to locate executable using which
20462   new_path=`$WHICH "$new_path" 2> /dev/null`
20463 
20464   if test "x$new_path" = x; then
20465     # Oops. Which didn't find the executable.
20466     # The splitting of arguments from the executable at a space might have been incorrect,
20467     # since paths with space are more likely in Windows. Give it another try with the whole
20468     # argument.
20469     path="$complete"
20470     arguments="EOL"
20471     new_path="$path"
20472 
20473   windows_path="$new_path"
20474   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20475     unix_path=`$CYGPATH -u "$windows_path"`
20476     new_path="$unix_path"
20477   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20478     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20479     new_path="$unix_path"
20480   fi
20481 
20482 
20483     new_path=`$WHICH "$new_path" 2> /dev/null`
20484     # bat and cmd files are not always considered executable in MSYS causing which
20485     # to not find them
20486     if test "x$new_path" = x \
20487         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20488         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20489       new_path="$path"
20490 
20491   windows_path="$new_path"
20492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20493     unix_path=`$CYGPATH -u "$windows_path"`
20494     new_path="$unix_path"
20495   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20496     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20497     new_path="$unix_path"
20498   fi
20499 
20500     fi
20501 
20502     if test "x$new_path" = x; then
20503       # It's still not found. Now this is an unrecoverable error.
20504       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20505 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20506       has_space=`$ECHO "$complete" | $GREP " "`
20507       if test "x$has_space" != x; then
20508         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20509 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20510       fi
20511       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20512     fi
20513   fi
20514 
20515   # Now new_path has a complete unix path to the binary
20516   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20517     # Keep paths in /bin as-is, but remove trailing .exe if any
20518     new_path="${new_path/%.exe/}"
20519     # Do not save /bin paths to all_fixpath_prefixes!
20520   else
20521     # Not in mixed or Windows style, start by that.
20522     new_path=`cmd //c echo $new_path`
20523 
20524   input_path="$new_path"
20525   # Check if we need to convert this using DOS-style short mode. If the path
20526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20527   # take no chances and rewrite it.
20528   # Note: m4 eats our [], so we need to use [ and ] instead.
20529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20530   if test "x$has_forbidden_chars" != x; then
20531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20532     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20533   fi
20534 
20535     # Output is in $new_path
20536 
20537   windows_path="$new_path"
20538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20539     unix_path=`$CYGPATH -u "$windows_path"`
20540     new_path="$unix_path"
20541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20543     new_path="$unix_path"
20544   fi
20545 
20546     # remove trailing .exe if any
20547     new_path="${new_path/%.exe/}"
20548 
20549     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20550     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20551   fi
20552 
20553     else
20554       # We're on a unix platform. Hooray! :)
20555       # First separate the path from the arguments. This will split at the first
20556       # space.
20557       complete="$FOUND_MAKE"
20558       path="${complete%% *}"
20559       tmp="$complete EOL"
20560       arguments="${tmp#* }"
20561 
20562       # Cannot rely on the command "which" here since it doesn't always work.
20563       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20564       if test -z "$is_absolute_path"; then
20565         # Path to executable is not absolute. Find it.
20566         IFS_save="$IFS"
20567         IFS=:
20568         for p in $PATH; do
20569           if test -f "$p/$path" && test -x "$p/$path"; then
20570             new_path="$p/$path"
20571             break
20572           fi
20573         done
20574         IFS="$IFS_save"
20575       else
20576         # This is an absolute path, we can use it without further modifications.
20577         new_path="$path"
20578       fi
20579 
20580       if test "x$new_path" = x; then
20581         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20582 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20583         has_space=`$ECHO "$complete" | $GREP " "`
20584         if test "x$has_space" != x; then
20585           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20586 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20587         fi
20588         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20589       fi
20590     fi
20591 
20592     # Now join together the path and the arguments once again
20593     if test "x$arguments" != xEOL; then
20594       new_complete="$new_path ${arguments% *}"
20595     else
20596       new_complete="$new_path"
20597     fi
20598 
20599     if test "x$complete" != "x$new_complete"; then
20600       FOUND_MAKE="$new_complete"
20601       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20602 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20603     fi
20604   fi
20605 
20606         fi
20607       fi
20608     fi
20609   fi
20610 
20611     if test "x$FOUND_MAKE" = x; then
20612       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20613     fi
20614 
20615   fi
20616 
20617 
20618   MAKE=$FOUND_MAKE
20619 
20620   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20621 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20622 
20623 
20624   # Check if make supports the output sync option and if so, setup using it.
20625   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20626 $as_echo_n "checking if make --output-sync is supported... " >&6; }
20627   if $MAKE --version -O > /dev/null 2>&1; then
20628     OUTPUT_SYNC_SUPPORTED=true
20629     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20630 $as_echo "yes" >&6; }
20631     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20632 $as_echo_n "checking for output-sync value... " >&6; }
20633 
20634 # Check whether --with-output-sync was given.
20635 if test "${with_output_sync+set}" = set; then :
20636   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20637 fi
20638 
20639     if test "x$OUTPUT_SYNC" = "x"; then
20640       OUTPUT_SYNC=none
20641     fi
20642     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20643 $as_echo "$OUTPUT_SYNC" >&6; }
20644     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20645       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20646     fi
20647   else
20648     OUTPUT_SYNC_SUPPORTED=false
20649     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20650 $as_echo "no" >&6; }
20651   fi
20652 
20653 
20654 
20655 
20656 
20657 
20658   # Test if find supports -delete
20659   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20660 $as_echo_n "checking if find supports -delete... " >&6; }
20661   FIND_DELETE="-delete"
20662 
20663   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20664 
20665   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20666 
20667   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20668   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20669     # No, it does not.
20670     rm $DELETEDIR/TestIfFindSupportsDelete
20671     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20672       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20673       FIND_DELETE="-print | xargs rm"
20674     else
20675       FIND_DELETE="-exec rm \{\} \+"
20676     fi
20677     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20678 $as_echo "no" >&6; }
20679   else
20680     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20681 $as_echo "yes" >&6; }
20682   fi
20683   rmdir $DELETEDIR
20684 
20685 
20686 
20687   # These tools might not be installed by default,
20688   # need hint on how to install them.
20689 
20690 
20691 
20692   # Publish this variable in the help.
20693 
20694 
20695   if [ -z "${UNZIP+x}" ]; then
20696     # The variable is not set by user, try to locate tool using the code snippet
20697     for ac_prog in unzip
20698 do
20699   # Extract the first word of "$ac_prog", so it can be a program name with args.
20700 set dummy $ac_prog; ac_word=$2
20701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20702 $as_echo_n "checking for $ac_word... " >&6; }
20703 if ${ac_cv_path_UNZIP+:} false; then :
20704   $as_echo_n "(cached) " >&6
20705 else
20706   case $UNZIP in
20707   [\\/]* | ?:[\\/]*)
20708   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20709   ;;
20710   *)
20711   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20712 for as_dir in $PATH
20713 do
20714   IFS=$as_save_IFS
20715   test -z "$as_dir" && as_dir=.
20716     for ac_exec_ext in '' $ac_executable_extensions; do
20717   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20718     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20719     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20720     break 2
20721   fi
20722 done
20723   done
20724 IFS=$as_save_IFS
20725 
20726   ;;
20727 esac
20728 fi
20729 UNZIP=$ac_cv_path_UNZIP
20730 if test -n "$UNZIP"; then
20731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20732 $as_echo "$UNZIP" >&6; }
20733 else
20734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20735 $as_echo "no" >&6; }
20736 fi
20737 
20738 
20739   test -n "$UNZIP" && break
20740 done
20741 
20742   else
20743     # The variable is set, but is it from the command line or the environment?
20744 
20745     # Try to remove the string !UNZIP! from our list.
20746     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20747     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20748       # If it failed, the variable was not from the command line. Ignore it,
20749       # but warn the user (except for BASH, which is always set by the calling BASH).
20750       if test "xUNZIP" != xBASH; then
20751         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20752 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20753       fi
20754       # Try to locate tool using the code snippet
20755       for ac_prog in unzip
20756 do
20757   # Extract the first word of "$ac_prog", so it can be a program name with args.
20758 set dummy $ac_prog; ac_word=$2
20759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20760 $as_echo_n "checking for $ac_word... " >&6; }
20761 if ${ac_cv_path_UNZIP+:} false; then :
20762   $as_echo_n "(cached) " >&6
20763 else
20764   case $UNZIP in
20765   [\\/]* | ?:[\\/]*)
20766   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20767   ;;
20768   *)
20769   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20770 for as_dir in $PATH
20771 do
20772   IFS=$as_save_IFS
20773   test -z "$as_dir" && as_dir=.
20774     for ac_exec_ext in '' $ac_executable_extensions; do
20775   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20776     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20777     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20778     break 2
20779   fi
20780 done
20781   done
20782 IFS=$as_save_IFS
20783 
20784   ;;
20785 esac
20786 fi
20787 UNZIP=$ac_cv_path_UNZIP
20788 if test -n "$UNZIP"; then
20789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20790 $as_echo "$UNZIP" >&6; }
20791 else
20792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20793 $as_echo "no" >&6; }
20794 fi
20795 
20796 
20797   test -n "$UNZIP" && break
20798 done
20799 
20800     else
20801       # If it succeeded, then it was overridden by the user. We will use it
20802       # for the tool.
20803 
20804       # First remove it from the list of overridden variables, so we can test
20805       # for unknown variables in the end.
20806       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20807 
20808       # Check if we try to supply an empty value
20809       if test "x$UNZIP" = x; then
20810         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20811 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20812         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20813 $as_echo_n "checking for UNZIP... " >&6; }
20814         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20815 $as_echo "disabled" >&6; }
20816       else
20817         # Check if the provided tool contains a complete path.
20818         tool_specified="$UNZIP"
20819         tool_basename="${tool_specified##*/}"
20820         if test "x$tool_basename" = "x$tool_specified"; then
20821           # A command without a complete path is provided, search $PATH.
20822           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20823 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20824           # Extract the first word of "$tool_basename", so it can be a program name with args.
20825 set dummy $tool_basename; ac_word=$2
20826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20827 $as_echo_n "checking for $ac_word... " >&6; }
20828 if ${ac_cv_path_UNZIP+:} false; then :
20829   $as_echo_n "(cached) " >&6
20830 else
20831   case $UNZIP in
20832   [\\/]* | ?:[\\/]*)
20833   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20834   ;;
20835   *)
20836   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20837 for as_dir in $PATH
20838 do
20839   IFS=$as_save_IFS
20840   test -z "$as_dir" && as_dir=.
20841     for ac_exec_ext in '' $ac_executable_extensions; do
20842   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20843     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20844     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20845     break 2
20846   fi
20847 done
20848   done
20849 IFS=$as_save_IFS
20850 
20851   ;;
20852 esac
20853 fi
20854 UNZIP=$ac_cv_path_UNZIP
20855 if test -n "$UNZIP"; then
20856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20857 $as_echo "$UNZIP" >&6; }
20858 else
20859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20860 $as_echo "no" >&6; }
20861 fi
20862 
20863 
20864           if test "x$UNZIP" = x; then
20865             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20866           fi
20867         else
20868           # Otherwise we believe it is a complete path. Use it as it is.
20869           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20870 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20871           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20872 $as_echo_n "checking for UNZIP... " >&6; }
20873           if test ! -x "$tool_specified"; then
20874             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20875 $as_echo "not found" >&6; }
20876             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20877           fi
20878           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20879 $as_echo "$tool_specified" >&6; }
20880         fi
20881       fi
20882     fi
20883 
20884   fi
20885 
20886 
20887 
20888   if test "x$UNZIP" = x; then
20889     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20890   fi
20891 
20892 
20893 
20894 
20895 
20896   # Publish this variable in the help.
20897 
20898 
20899   if [ -z "${ZIP+x}" ]; then
20900     # The variable is not set by user, try to locate tool using the code snippet
20901     for ac_prog in zip
20902 do
20903   # Extract the first word of "$ac_prog", so it can be a program name with args.
20904 set dummy $ac_prog; ac_word=$2
20905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20906 $as_echo_n "checking for $ac_word... " >&6; }
20907 if ${ac_cv_path_ZIP+:} false; then :
20908   $as_echo_n "(cached) " >&6
20909 else
20910   case $ZIP in
20911   [\\/]* | ?:[\\/]*)
20912   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20913   ;;
20914   *)
20915   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20916 for as_dir in $PATH
20917 do
20918   IFS=$as_save_IFS
20919   test -z "$as_dir" && as_dir=.
20920     for ac_exec_ext in '' $ac_executable_extensions; do
20921   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20922     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20923     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20924     break 2
20925   fi
20926 done
20927   done
20928 IFS=$as_save_IFS
20929 
20930   ;;
20931 esac
20932 fi
20933 ZIP=$ac_cv_path_ZIP
20934 if test -n "$ZIP"; then
20935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20936 $as_echo "$ZIP" >&6; }
20937 else
20938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20939 $as_echo "no" >&6; }
20940 fi
20941 
20942 
20943   test -n "$ZIP" && break
20944 done
20945 
20946   else
20947     # The variable is set, but is it from the command line or the environment?
20948 
20949     # Try to remove the string !ZIP! from our list.
20950     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20951     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20952       # If it failed, the variable was not from the command line. Ignore it,
20953       # but warn the user (except for BASH, which is always set by the calling BASH).
20954       if test "xZIP" != xBASH; then
20955         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20956 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20957       fi
20958       # Try to locate tool using the code snippet
20959       for ac_prog in zip
20960 do
20961   # Extract the first word of "$ac_prog", so it can be a program name with args.
20962 set dummy $ac_prog; ac_word=$2
20963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20964 $as_echo_n "checking for $ac_word... " >&6; }
20965 if ${ac_cv_path_ZIP+:} false; then :
20966   $as_echo_n "(cached) " >&6
20967 else
20968   case $ZIP in
20969   [\\/]* | ?:[\\/]*)
20970   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20971   ;;
20972   *)
20973   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20974 for as_dir in $PATH
20975 do
20976   IFS=$as_save_IFS
20977   test -z "$as_dir" && as_dir=.
20978     for ac_exec_ext in '' $ac_executable_extensions; do
20979   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20980     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20981     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20982     break 2
20983   fi
20984 done
20985   done
20986 IFS=$as_save_IFS
20987 
20988   ;;
20989 esac
20990 fi
20991 ZIP=$ac_cv_path_ZIP
20992 if test -n "$ZIP"; then
20993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20994 $as_echo "$ZIP" >&6; }
20995 else
20996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20997 $as_echo "no" >&6; }
20998 fi
20999 
21000 
21001   test -n "$ZIP" && break
21002 done
21003 
21004     else
21005       # If it succeeded, then it was overridden by the user. We will use it
21006       # for the tool.
21007 
21008       # First remove it from the list of overridden variables, so we can test
21009       # for unknown variables in the end.
21010       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21011 
21012       # Check if we try to supply an empty value
21013       if test "x$ZIP" = x; then
21014         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21015 $as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21016         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21017 $as_echo_n "checking for ZIP... " >&6; }
21018         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21019 $as_echo "disabled" >&6; }
21020       else
21021         # Check if the provided tool contains a complete path.
21022         tool_specified="$ZIP"
21023         tool_basename="${tool_specified##*/}"
21024         if test "x$tool_basename" = "x$tool_specified"; then
21025           # A command without a complete path is provided, search $PATH.
21026           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21027 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21028           # Extract the first word of "$tool_basename", so it can be a program name with args.
21029 set dummy $tool_basename; ac_word=$2
21030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21031 $as_echo_n "checking for $ac_word... " >&6; }
21032 if ${ac_cv_path_ZIP+:} false; then :
21033   $as_echo_n "(cached) " >&6
21034 else
21035   case $ZIP in
21036   [\\/]* | ?:[\\/]*)
21037   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21038   ;;
21039   *)
21040   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21041 for as_dir in $PATH
21042 do
21043   IFS=$as_save_IFS
21044   test -z "$as_dir" && as_dir=.
21045     for ac_exec_ext in '' $ac_executable_extensions; do
21046   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21047     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21048     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21049     break 2
21050   fi
21051 done
21052   done
21053 IFS=$as_save_IFS
21054 
21055   ;;
21056 esac
21057 fi
21058 ZIP=$ac_cv_path_ZIP
21059 if test -n "$ZIP"; then
21060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21061 $as_echo "$ZIP" >&6; }
21062 else
21063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21064 $as_echo "no" >&6; }
21065 fi
21066 
21067 
21068           if test "x$ZIP" = x; then
21069             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21070           fi
21071         else
21072           # Otherwise we believe it is a complete path. Use it as it is.
21073           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21074 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21075           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21076 $as_echo_n "checking for ZIP... " >&6; }
21077           if test ! -x "$tool_specified"; then
21078             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21079 $as_echo "not found" >&6; }
21080             as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21081           fi
21082           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21083 $as_echo "$tool_specified" >&6; }
21084         fi
21085       fi
21086     fi
21087 
21088   fi
21089 
21090 
21091 
21092   if test "x$ZIP" = x; then
21093     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21094   fi
21095 
21096 
21097 
21098   # Non-required basic tools
21099 
21100 
21101 
21102   # Publish this variable in the help.
21103 
21104 
21105   if [ -z "${LDD+x}" ]; then
21106     # The variable is not set by user, try to locate tool using the code snippet
21107     for ac_prog in ldd
21108 do
21109   # Extract the first word of "$ac_prog", so it can be a program name with args.
21110 set dummy $ac_prog; ac_word=$2
21111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21112 $as_echo_n "checking for $ac_word... " >&6; }
21113 if ${ac_cv_path_LDD+:} false; then :
21114   $as_echo_n "(cached) " >&6
21115 else
21116   case $LDD in
21117   [\\/]* | ?:[\\/]*)
21118   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21119   ;;
21120   *)
21121   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21122 for as_dir in $PATH
21123 do
21124   IFS=$as_save_IFS
21125   test -z "$as_dir" && as_dir=.
21126     for ac_exec_ext in '' $ac_executable_extensions; do
21127   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21128     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21129     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21130     break 2
21131   fi
21132 done
21133   done
21134 IFS=$as_save_IFS
21135 
21136   ;;
21137 esac
21138 fi
21139 LDD=$ac_cv_path_LDD
21140 if test -n "$LDD"; then
21141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21142 $as_echo "$LDD" >&6; }
21143 else
21144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21145 $as_echo "no" >&6; }
21146 fi
21147 
21148 
21149   test -n "$LDD" && break
21150 done
21151 
21152   else
21153     # The variable is set, but is it from the command line or the environment?
21154 
21155     # Try to remove the string !LDD! from our list.
21156     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21157     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21158       # If it failed, the variable was not from the command line. Ignore it,
21159       # but warn the user (except for BASH, which is always set by the calling BASH).
21160       if test "xLDD" != xBASH; then
21161         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21162 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21163       fi
21164       # Try to locate tool using the code snippet
21165       for ac_prog in ldd
21166 do
21167   # Extract the first word of "$ac_prog", so it can be a program name with args.
21168 set dummy $ac_prog; ac_word=$2
21169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21170 $as_echo_n "checking for $ac_word... " >&6; }
21171 if ${ac_cv_path_LDD+:} false; then :
21172   $as_echo_n "(cached) " >&6
21173 else
21174   case $LDD in
21175   [\\/]* | ?:[\\/]*)
21176   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21177   ;;
21178   *)
21179   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21180 for as_dir in $PATH
21181 do
21182   IFS=$as_save_IFS
21183   test -z "$as_dir" && as_dir=.
21184     for ac_exec_ext in '' $ac_executable_extensions; do
21185   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21186     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21187     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21188     break 2
21189   fi
21190 done
21191   done
21192 IFS=$as_save_IFS
21193 
21194   ;;
21195 esac
21196 fi
21197 LDD=$ac_cv_path_LDD
21198 if test -n "$LDD"; then
21199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21200 $as_echo "$LDD" >&6; }
21201 else
21202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21203 $as_echo "no" >&6; }
21204 fi
21205 
21206 
21207   test -n "$LDD" && break
21208 done
21209 
21210     else
21211       # If it succeeded, then it was overridden by the user. We will use it
21212       # for the tool.
21213 
21214       # First remove it from the list of overridden variables, so we can test
21215       # for unknown variables in the end.
21216       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21217 
21218       # Check if we try to supply an empty value
21219       if test "x$LDD" = x; then
21220         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21221 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21222         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21223 $as_echo_n "checking for LDD... " >&6; }
21224         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21225 $as_echo "disabled" >&6; }
21226       else
21227         # Check if the provided tool contains a complete path.
21228         tool_specified="$LDD"
21229         tool_basename="${tool_specified##*/}"
21230         if test "x$tool_basename" = "x$tool_specified"; then
21231           # A command without a complete path is provided, search $PATH.
21232           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21233 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21234           # Extract the first word of "$tool_basename", so it can be a program name with args.
21235 set dummy $tool_basename; ac_word=$2
21236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21237 $as_echo_n "checking for $ac_word... " >&6; }
21238 if ${ac_cv_path_LDD+:} false; then :
21239   $as_echo_n "(cached) " >&6
21240 else
21241   case $LDD in
21242   [\\/]* | ?:[\\/]*)
21243   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21244   ;;
21245   *)
21246   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21247 for as_dir in $PATH
21248 do
21249   IFS=$as_save_IFS
21250   test -z "$as_dir" && as_dir=.
21251     for ac_exec_ext in '' $ac_executable_extensions; do
21252   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21253     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21254     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21255     break 2
21256   fi
21257 done
21258   done
21259 IFS=$as_save_IFS
21260 
21261   ;;
21262 esac
21263 fi
21264 LDD=$ac_cv_path_LDD
21265 if test -n "$LDD"; then
21266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21267 $as_echo "$LDD" >&6; }
21268 else
21269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21270 $as_echo "no" >&6; }
21271 fi
21272 
21273 
21274           if test "x$LDD" = x; then
21275             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21276           fi
21277         else
21278           # Otherwise we believe it is a complete path. Use it as it is.
21279           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21280 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21281           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21282 $as_echo_n "checking for LDD... " >&6; }
21283           if test ! -x "$tool_specified"; then
21284             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21285 $as_echo "not found" >&6; }
21286             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21287           fi
21288           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21289 $as_echo "$tool_specified" >&6; }
21290         fi
21291       fi
21292     fi
21293 
21294   fi
21295 
21296 
21297   if test "x$LDD" = "x"; then
21298     # List shared lib dependencies is used for
21299     # debug output and checking for forbidden dependencies.
21300     # We can build without it.
21301     LDD="true"
21302   fi
21303 
21304 
21305   # Publish this variable in the help.
21306 
21307 
21308   if [ -z "${OTOOL+x}" ]; then
21309     # The variable is not set by user, try to locate tool using the code snippet
21310     for ac_prog in otool
21311 do
21312   # Extract the first word of "$ac_prog", so it can be a program name with args.
21313 set dummy $ac_prog; ac_word=$2
21314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21315 $as_echo_n "checking for $ac_word... " >&6; }
21316 if ${ac_cv_path_OTOOL+:} false; then :
21317   $as_echo_n "(cached) " >&6
21318 else
21319   case $OTOOL in
21320   [\\/]* | ?:[\\/]*)
21321   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21322   ;;
21323   *)
21324   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21325 for as_dir in $PATH
21326 do
21327   IFS=$as_save_IFS
21328   test -z "$as_dir" && as_dir=.
21329     for ac_exec_ext in '' $ac_executable_extensions; do
21330   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21331     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21332     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21333     break 2
21334   fi
21335 done
21336   done
21337 IFS=$as_save_IFS
21338 
21339   ;;
21340 esac
21341 fi
21342 OTOOL=$ac_cv_path_OTOOL
21343 if test -n "$OTOOL"; then
21344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21345 $as_echo "$OTOOL" >&6; }
21346 else
21347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21348 $as_echo "no" >&6; }
21349 fi
21350 
21351 
21352   test -n "$OTOOL" && break
21353 done
21354 
21355   else
21356     # The variable is set, but is it from the command line or the environment?
21357 
21358     # Try to remove the string !OTOOL! from our list.
21359     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21360     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21361       # If it failed, the variable was not from the command line. Ignore it,
21362       # but warn the user (except for BASH, which is always set by the calling BASH).
21363       if test "xOTOOL" != xBASH; then
21364         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21365 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21366       fi
21367       # Try to locate tool using the code snippet
21368       for ac_prog in otool
21369 do
21370   # Extract the first word of "$ac_prog", so it can be a program name with args.
21371 set dummy $ac_prog; ac_word=$2
21372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21373 $as_echo_n "checking for $ac_word... " >&6; }
21374 if ${ac_cv_path_OTOOL+:} false; then :
21375   $as_echo_n "(cached) " >&6
21376 else
21377   case $OTOOL in
21378   [\\/]* | ?:[\\/]*)
21379   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21380   ;;
21381   *)
21382   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21383 for as_dir in $PATH
21384 do
21385   IFS=$as_save_IFS
21386   test -z "$as_dir" && as_dir=.
21387     for ac_exec_ext in '' $ac_executable_extensions; do
21388   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21389     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21390     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21391     break 2
21392   fi
21393 done
21394   done
21395 IFS=$as_save_IFS
21396 
21397   ;;
21398 esac
21399 fi
21400 OTOOL=$ac_cv_path_OTOOL
21401 if test -n "$OTOOL"; then
21402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21403 $as_echo "$OTOOL" >&6; }
21404 else
21405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21406 $as_echo "no" >&6; }
21407 fi
21408 
21409 
21410   test -n "$OTOOL" && break
21411 done
21412 
21413     else
21414       # If it succeeded, then it was overridden by the user. We will use it
21415       # for the tool.
21416 
21417       # First remove it from the list of overridden variables, so we can test
21418       # for unknown variables in the end.
21419       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21420 
21421       # Check if we try to supply an empty value
21422       if test "x$OTOOL" = x; then
21423         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21424 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21425         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21426 $as_echo_n "checking for OTOOL... " >&6; }
21427         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21428 $as_echo "disabled" >&6; }
21429       else
21430         # Check if the provided tool contains a complete path.
21431         tool_specified="$OTOOL"
21432         tool_basename="${tool_specified##*/}"
21433         if test "x$tool_basename" = "x$tool_specified"; then
21434           # A command without a complete path is provided, search $PATH.
21435           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21436 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21437           # Extract the first word of "$tool_basename", so it can be a program name with args.
21438 set dummy $tool_basename; ac_word=$2
21439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21440 $as_echo_n "checking for $ac_word... " >&6; }
21441 if ${ac_cv_path_OTOOL+:} false; then :
21442   $as_echo_n "(cached) " >&6
21443 else
21444   case $OTOOL in
21445   [\\/]* | ?:[\\/]*)
21446   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21447   ;;
21448   *)
21449   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21450 for as_dir in $PATH
21451 do
21452   IFS=$as_save_IFS
21453   test -z "$as_dir" && as_dir=.
21454     for ac_exec_ext in '' $ac_executable_extensions; do
21455   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21456     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21457     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21458     break 2
21459   fi
21460 done
21461   done
21462 IFS=$as_save_IFS
21463 
21464   ;;
21465 esac
21466 fi
21467 OTOOL=$ac_cv_path_OTOOL
21468 if test -n "$OTOOL"; then
21469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21470 $as_echo "$OTOOL" >&6; }
21471 else
21472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21473 $as_echo "no" >&6; }
21474 fi
21475 
21476 
21477           if test "x$OTOOL" = x; then
21478             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21479           fi
21480         else
21481           # Otherwise we believe it is a complete path. Use it as it is.
21482           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21483 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21484           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21485 $as_echo_n "checking for OTOOL... " >&6; }
21486           if test ! -x "$tool_specified"; then
21487             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21488 $as_echo "not found" >&6; }
21489             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21490           fi
21491           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21492 $as_echo "$tool_specified" >&6; }
21493         fi
21494       fi
21495     fi
21496 
21497   fi
21498 
21499 
21500   if test "x$OTOOL" = "x"; then
21501     OTOOL="true"
21502   fi
21503 
21504 
21505   # Publish this variable in the help.
21506 
21507 
21508   if [ -z "${READELF+x}" ]; then
21509     # The variable is not set by user, try to locate tool using the code snippet
21510     for ac_prog in greadelf readelf
21511 do
21512   # Extract the first word of "$ac_prog", so it can be a program name with args.
21513 set dummy $ac_prog; ac_word=$2
21514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21515 $as_echo_n "checking for $ac_word... " >&6; }
21516 if ${ac_cv_path_READELF+:} false; then :
21517   $as_echo_n "(cached) " >&6
21518 else
21519   case $READELF in
21520   [\\/]* | ?:[\\/]*)
21521   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21522   ;;
21523   *)
21524   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21525 for as_dir in $PATH
21526 do
21527   IFS=$as_save_IFS
21528   test -z "$as_dir" && as_dir=.
21529     for ac_exec_ext in '' $ac_executable_extensions; do
21530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21531     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21533     break 2
21534   fi
21535 done
21536   done
21537 IFS=$as_save_IFS
21538 
21539   ;;
21540 esac
21541 fi
21542 READELF=$ac_cv_path_READELF
21543 if test -n "$READELF"; then
21544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21545 $as_echo "$READELF" >&6; }
21546 else
21547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21548 $as_echo "no" >&6; }
21549 fi
21550 
21551 
21552   test -n "$READELF" && break
21553 done
21554 
21555   else
21556     # The variable is set, but is it from the command line or the environment?
21557 
21558     # Try to remove the string !READELF! from our list.
21559     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21560     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21561       # If it failed, the variable was not from the command line. Ignore it,
21562       # but warn the user (except for BASH, which is always set by the calling BASH).
21563       if test "xREADELF" != xBASH; then
21564         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21565 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21566       fi
21567       # Try to locate tool using the code snippet
21568       for ac_prog in greadelf readelf
21569 do
21570   # Extract the first word of "$ac_prog", so it can be a program name with args.
21571 set dummy $ac_prog; ac_word=$2
21572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21573 $as_echo_n "checking for $ac_word... " >&6; }
21574 if ${ac_cv_path_READELF+:} false; then :
21575   $as_echo_n "(cached) " >&6
21576 else
21577   case $READELF in
21578   [\\/]* | ?:[\\/]*)
21579   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21580   ;;
21581   *)
21582   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21583 for as_dir in $PATH
21584 do
21585   IFS=$as_save_IFS
21586   test -z "$as_dir" && as_dir=.
21587     for ac_exec_ext in '' $ac_executable_extensions; do
21588   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21589     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21591     break 2
21592   fi
21593 done
21594   done
21595 IFS=$as_save_IFS
21596 
21597   ;;
21598 esac
21599 fi
21600 READELF=$ac_cv_path_READELF
21601 if test -n "$READELF"; then
21602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21603 $as_echo "$READELF" >&6; }
21604 else
21605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21606 $as_echo "no" >&6; }
21607 fi
21608 
21609 
21610   test -n "$READELF" && break
21611 done
21612 
21613     else
21614       # If it succeeded, then it was overridden by the user. We will use it
21615       # for the tool.
21616 
21617       # First remove it from the list of overridden variables, so we can test
21618       # for unknown variables in the end.
21619       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21620 
21621       # Check if we try to supply an empty value
21622       if test "x$READELF" = x; then
21623         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21624 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21625         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21626 $as_echo_n "checking for READELF... " >&6; }
21627         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21628 $as_echo "disabled" >&6; }
21629       else
21630         # Check if the provided tool contains a complete path.
21631         tool_specified="$READELF"
21632         tool_basename="${tool_specified##*/}"
21633         if test "x$tool_basename" = "x$tool_specified"; then
21634           # A command without a complete path is provided, search $PATH.
21635           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21636 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21637           # Extract the first word of "$tool_basename", so it can be a program name with args.
21638 set dummy $tool_basename; ac_word=$2
21639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21640 $as_echo_n "checking for $ac_word... " >&6; }
21641 if ${ac_cv_path_READELF+:} false; then :
21642   $as_echo_n "(cached) " >&6
21643 else
21644   case $READELF in
21645   [\\/]* | ?:[\\/]*)
21646   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21647   ;;
21648   *)
21649   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21650 for as_dir in $PATH
21651 do
21652   IFS=$as_save_IFS
21653   test -z "$as_dir" && as_dir=.
21654     for ac_exec_ext in '' $ac_executable_extensions; do
21655   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21656     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21658     break 2
21659   fi
21660 done
21661   done
21662 IFS=$as_save_IFS
21663 
21664   ;;
21665 esac
21666 fi
21667 READELF=$ac_cv_path_READELF
21668 if test -n "$READELF"; then
21669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21670 $as_echo "$READELF" >&6; }
21671 else
21672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21673 $as_echo "no" >&6; }
21674 fi
21675 
21676 
21677           if test "x$READELF" = x; then
21678             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21679           fi
21680         else
21681           # Otherwise we believe it is a complete path. Use it as it is.
21682           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21683 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21684           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21685 $as_echo_n "checking for READELF... " >&6; }
21686           if test ! -x "$tool_specified"; then
21687             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21688 $as_echo "not found" >&6; }
21689             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21690           fi
21691           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21692 $as_echo "$tool_specified" >&6; }
21693         fi
21694       fi
21695     fi
21696 
21697   fi
21698 
21699 
21700 
21701 
21702   # Publish this variable in the help.
21703 
21704 
21705   if [ -z "${HG+x}" ]; then
21706     # The variable is not set by user, try to locate tool using the code snippet
21707     for ac_prog in hg
21708 do
21709   # Extract the first word of "$ac_prog", so it can be a program name with args.
21710 set dummy $ac_prog; ac_word=$2
21711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21712 $as_echo_n "checking for $ac_word... " >&6; }
21713 if ${ac_cv_path_HG+:} false; then :
21714   $as_echo_n "(cached) " >&6
21715 else
21716   case $HG in
21717   [\\/]* | ?:[\\/]*)
21718   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21719   ;;
21720   *)
21721   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21722 for as_dir in $PATH
21723 do
21724   IFS=$as_save_IFS
21725   test -z "$as_dir" && as_dir=.
21726     for ac_exec_ext in '' $ac_executable_extensions; do
21727   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21728     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21729     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21730     break 2
21731   fi
21732 done
21733   done
21734 IFS=$as_save_IFS
21735 
21736   ;;
21737 esac
21738 fi
21739 HG=$ac_cv_path_HG
21740 if test -n "$HG"; then
21741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21742 $as_echo "$HG" >&6; }
21743 else
21744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21745 $as_echo "no" >&6; }
21746 fi
21747 
21748 
21749   test -n "$HG" && break
21750 done
21751 
21752   else
21753     # The variable is set, but is it from the command line or the environment?
21754 
21755     # Try to remove the string !HG! from our list.
21756     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21757     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21758       # If it failed, the variable was not from the command line. Ignore it,
21759       # but warn the user (except for BASH, which is always set by the calling BASH).
21760       if test "xHG" != xBASH; then
21761         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21762 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21763       fi
21764       # Try to locate tool using the code snippet
21765       for ac_prog in hg
21766 do
21767   # Extract the first word of "$ac_prog", so it can be a program name with args.
21768 set dummy $ac_prog; ac_word=$2
21769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21770 $as_echo_n "checking for $ac_word... " >&6; }
21771 if ${ac_cv_path_HG+:} false; then :
21772   $as_echo_n "(cached) " >&6
21773 else
21774   case $HG in
21775   [\\/]* | ?:[\\/]*)
21776   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21777   ;;
21778   *)
21779   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21780 for as_dir in $PATH
21781 do
21782   IFS=$as_save_IFS
21783   test -z "$as_dir" && as_dir=.
21784     for ac_exec_ext in '' $ac_executable_extensions; do
21785   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21786     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21787     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21788     break 2
21789   fi
21790 done
21791   done
21792 IFS=$as_save_IFS
21793 
21794   ;;
21795 esac
21796 fi
21797 HG=$ac_cv_path_HG
21798 if test -n "$HG"; then
21799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21800 $as_echo "$HG" >&6; }
21801 else
21802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21803 $as_echo "no" >&6; }
21804 fi
21805 
21806 
21807   test -n "$HG" && break
21808 done
21809 
21810     else
21811       # If it succeeded, then it was overridden by the user. We will use it
21812       # for the tool.
21813 
21814       # First remove it from the list of overridden variables, so we can test
21815       # for unknown variables in the end.
21816       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21817 
21818       # Check if we try to supply an empty value
21819       if test "x$HG" = x; then
21820         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21821 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21822         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21823 $as_echo_n "checking for HG... " >&6; }
21824         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21825 $as_echo "disabled" >&6; }
21826       else
21827         # Check if the provided tool contains a complete path.
21828         tool_specified="$HG"
21829         tool_basename="${tool_specified##*/}"
21830         if test "x$tool_basename" = "x$tool_specified"; then
21831           # A command without a complete path is provided, search $PATH.
21832           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21833 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21834           # Extract the first word of "$tool_basename", so it can be a program name with args.
21835 set dummy $tool_basename; ac_word=$2
21836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21837 $as_echo_n "checking for $ac_word... " >&6; }
21838 if ${ac_cv_path_HG+:} false; then :
21839   $as_echo_n "(cached) " >&6
21840 else
21841   case $HG in
21842   [\\/]* | ?:[\\/]*)
21843   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21844   ;;
21845   *)
21846   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21847 for as_dir in $PATH
21848 do
21849   IFS=$as_save_IFS
21850   test -z "$as_dir" && as_dir=.
21851     for ac_exec_ext in '' $ac_executable_extensions; do
21852   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21853     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21855     break 2
21856   fi
21857 done
21858   done
21859 IFS=$as_save_IFS
21860 
21861   ;;
21862 esac
21863 fi
21864 HG=$ac_cv_path_HG
21865 if test -n "$HG"; then
21866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21867 $as_echo "$HG" >&6; }
21868 else
21869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21870 $as_echo "no" >&6; }
21871 fi
21872 
21873 
21874           if test "x$HG" = x; then
21875             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21876           fi
21877         else
21878           # Otherwise we believe it is a complete path. Use it as it is.
21879           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21880 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21881           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21882 $as_echo_n "checking for HG... " >&6; }
21883           if test ! -x "$tool_specified"; then
21884             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21885 $as_echo "not found" >&6; }
21886             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21887           fi
21888           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21889 $as_echo "$tool_specified" >&6; }
21890         fi
21891       fi
21892     fi
21893 
21894   fi
21895 
21896 
21897 
21898 
21899   # Publish this variable in the help.
21900 
21901 
21902   if [ -z "${STAT+x}" ]; then
21903     # The variable is not set by user, try to locate tool using the code snippet
21904     for ac_prog in stat
21905 do
21906   # Extract the first word of "$ac_prog", so it can be a program name with args.
21907 set dummy $ac_prog; ac_word=$2
21908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21909 $as_echo_n "checking for $ac_word... " >&6; }
21910 if ${ac_cv_path_STAT+:} false; then :
21911   $as_echo_n "(cached) " >&6
21912 else
21913   case $STAT in
21914   [\\/]* | ?:[\\/]*)
21915   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21916   ;;
21917   *)
21918   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21919 for as_dir in $PATH
21920 do
21921   IFS=$as_save_IFS
21922   test -z "$as_dir" && as_dir=.
21923     for ac_exec_ext in '' $ac_executable_extensions; do
21924   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21925     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21926     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21927     break 2
21928   fi
21929 done
21930   done
21931 IFS=$as_save_IFS
21932 
21933   ;;
21934 esac
21935 fi
21936 STAT=$ac_cv_path_STAT
21937 if test -n "$STAT"; then
21938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21939 $as_echo "$STAT" >&6; }
21940 else
21941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21942 $as_echo "no" >&6; }
21943 fi
21944 
21945 
21946   test -n "$STAT" && break
21947 done
21948 
21949   else
21950     # The variable is set, but is it from the command line or the environment?
21951 
21952     # Try to remove the string !STAT! from our list.
21953     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21954     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21955       # If it failed, the variable was not from the command line. Ignore it,
21956       # but warn the user (except for BASH, which is always set by the calling BASH).
21957       if test "xSTAT" != xBASH; then
21958         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21959 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21960       fi
21961       # Try to locate tool using the code snippet
21962       for ac_prog in stat
21963 do
21964   # Extract the first word of "$ac_prog", so it can be a program name with args.
21965 set dummy $ac_prog; ac_word=$2
21966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21967 $as_echo_n "checking for $ac_word... " >&6; }
21968 if ${ac_cv_path_STAT+:} false; then :
21969   $as_echo_n "(cached) " >&6
21970 else
21971   case $STAT in
21972   [\\/]* | ?:[\\/]*)
21973   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21974   ;;
21975   *)
21976   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21977 for as_dir in $PATH
21978 do
21979   IFS=$as_save_IFS
21980   test -z "$as_dir" && as_dir=.
21981     for ac_exec_ext in '' $ac_executable_extensions; do
21982   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21983     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21984     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21985     break 2
21986   fi
21987 done
21988   done
21989 IFS=$as_save_IFS
21990 
21991   ;;
21992 esac
21993 fi
21994 STAT=$ac_cv_path_STAT
21995 if test -n "$STAT"; then
21996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21997 $as_echo "$STAT" >&6; }
21998 else
21999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22000 $as_echo "no" >&6; }
22001 fi
22002 
22003 
22004   test -n "$STAT" && break
22005 done
22006 
22007     else
22008       # If it succeeded, then it was overridden by the user. We will use it
22009       # for the tool.
22010 
22011       # First remove it from the list of overridden variables, so we can test
22012       # for unknown variables in the end.
22013       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22014 
22015       # Check if we try to supply an empty value
22016       if test "x$STAT" = x; then
22017         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22018 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22019         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22020 $as_echo_n "checking for STAT... " >&6; }
22021         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22022 $as_echo "disabled" >&6; }
22023       else
22024         # Check if the provided tool contains a complete path.
22025         tool_specified="$STAT"
22026         tool_basename="${tool_specified##*/}"
22027         if test "x$tool_basename" = "x$tool_specified"; then
22028           # A command without a complete path is provided, search $PATH.
22029           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22030 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22031           # Extract the first word of "$tool_basename", so it can be a program name with args.
22032 set dummy $tool_basename; ac_word=$2
22033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22034 $as_echo_n "checking for $ac_word... " >&6; }
22035 if ${ac_cv_path_STAT+:} false; then :
22036   $as_echo_n "(cached) " >&6
22037 else
22038   case $STAT in
22039   [\\/]* | ?:[\\/]*)
22040   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22041   ;;
22042   *)
22043   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22044 for as_dir in $PATH
22045 do
22046   IFS=$as_save_IFS
22047   test -z "$as_dir" && as_dir=.
22048     for ac_exec_ext in '' $ac_executable_extensions; do
22049   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22050     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22051     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22052     break 2
22053   fi
22054 done
22055   done
22056 IFS=$as_save_IFS
22057 
22058   ;;
22059 esac
22060 fi
22061 STAT=$ac_cv_path_STAT
22062 if test -n "$STAT"; then
22063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22064 $as_echo "$STAT" >&6; }
22065 else
22066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22067 $as_echo "no" >&6; }
22068 fi
22069 
22070 
22071           if test "x$STAT" = x; then
22072             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22073           fi
22074         else
22075           # Otherwise we believe it is a complete path. Use it as it is.
22076           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22077 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22078           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22079 $as_echo_n "checking for STAT... " >&6; }
22080           if test ! -x "$tool_specified"; then
22081             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22082 $as_echo "not found" >&6; }
22083             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22084           fi
22085           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22086 $as_echo "$tool_specified" >&6; }
22087         fi
22088       fi
22089     fi
22090 
22091   fi
22092 
22093 
22094 
22095 
22096   # Publish this variable in the help.
22097 
22098 
22099   if [ -z "${TIME+x}" ]; then
22100     # The variable is not set by user, try to locate tool using the code snippet
22101     for ac_prog in time
22102 do
22103   # Extract the first word of "$ac_prog", so it can be a program name with args.
22104 set dummy $ac_prog; ac_word=$2
22105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22106 $as_echo_n "checking for $ac_word... " >&6; }
22107 if ${ac_cv_path_TIME+:} false; then :
22108   $as_echo_n "(cached) " >&6
22109 else
22110   case $TIME in
22111   [\\/]* | ?:[\\/]*)
22112   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22113   ;;
22114   *)
22115   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22116 for as_dir in $PATH
22117 do
22118   IFS=$as_save_IFS
22119   test -z "$as_dir" && as_dir=.
22120     for ac_exec_ext in '' $ac_executable_extensions; do
22121   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22122     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22124     break 2
22125   fi
22126 done
22127   done
22128 IFS=$as_save_IFS
22129 
22130   ;;
22131 esac
22132 fi
22133 TIME=$ac_cv_path_TIME
22134 if test -n "$TIME"; then
22135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22136 $as_echo "$TIME" >&6; }
22137 else
22138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22139 $as_echo "no" >&6; }
22140 fi
22141 
22142 
22143   test -n "$TIME" && break
22144 done
22145 
22146   else
22147     # The variable is set, but is it from the command line or the environment?
22148 
22149     # Try to remove the string !TIME! from our list.
22150     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22151     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22152       # If it failed, the variable was not from the command line. Ignore it,
22153       # but warn the user (except for BASH, which is always set by the calling BASH).
22154       if test "xTIME" != xBASH; then
22155         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22156 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22157       fi
22158       # Try to locate tool using the code snippet
22159       for ac_prog in time
22160 do
22161   # Extract the first word of "$ac_prog", so it can be a program name with args.
22162 set dummy $ac_prog; ac_word=$2
22163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22164 $as_echo_n "checking for $ac_word... " >&6; }
22165 if ${ac_cv_path_TIME+:} false; then :
22166   $as_echo_n "(cached) " >&6
22167 else
22168   case $TIME in
22169   [\\/]* | ?:[\\/]*)
22170   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22171   ;;
22172   *)
22173   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22174 for as_dir in $PATH
22175 do
22176   IFS=$as_save_IFS
22177   test -z "$as_dir" && as_dir=.
22178     for ac_exec_ext in '' $ac_executable_extensions; do
22179   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22180     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22181     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22182     break 2
22183   fi
22184 done
22185   done
22186 IFS=$as_save_IFS
22187 
22188   ;;
22189 esac
22190 fi
22191 TIME=$ac_cv_path_TIME
22192 if test -n "$TIME"; then
22193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22194 $as_echo "$TIME" >&6; }
22195 else
22196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22197 $as_echo "no" >&6; }
22198 fi
22199 
22200 
22201   test -n "$TIME" && break
22202 done
22203 
22204     else
22205       # If it succeeded, then it was overridden by the user. We will use it
22206       # for the tool.
22207 
22208       # First remove it from the list of overridden variables, so we can test
22209       # for unknown variables in the end.
22210       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22211 
22212       # Check if we try to supply an empty value
22213       if test "x$TIME" = x; then
22214         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22215 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22216         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22217 $as_echo_n "checking for TIME... " >&6; }
22218         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22219 $as_echo "disabled" >&6; }
22220       else
22221         # Check if the provided tool contains a complete path.
22222         tool_specified="$TIME"
22223         tool_basename="${tool_specified##*/}"
22224         if test "x$tool_basename" = "x$tool_specified"; then
22225           # A command without a complete path is provided, search $PATH.
22226           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22227 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22228           # Extract the first word of "$tool_basename", so it can be a program name with args.
22229 set dummy $tool_basename; ac_word=$2
22230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22231 $as_echo_n "checking for $ac_word... " >&6; }
22232 if ${ac_cv_path_TIME+:} false; then :
22233   $as_echo_n "(cached) " >&6
22234 else
22235   case $TIME in
22236   [\\/]* | ?:[\\/]*)
22237   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22238   ;;
22239   *)
22240   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22241 for as_dir in $PATH
22242 do
22243   IFS=$as_save_IFS
22244   test -z "$as_dir" && as_dir=.
22245     for ac_exec_ext in '' $ac_executable_extensions; do
22246   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22247     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22248     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22249     break 2
22250   fi
22251 done
22252   done
22253 IFS=$as_save_IFS
22254 
22255   ;;
22256 esac
22257 fi
22258 TIME=$ac_cv_path_TIME
22259 if test -n "$TIME"; then
22260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22261 $as_echo "$TIME" >&6; }
22262 else
22263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22264 $as_echo "no" >&6; }
22265 fi
22266 
22267 
22268           if test "x$TIME" = x; then
22269             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22270           fi
22271         else
22272           # Otherwise we believe it is a complete path. Use it as it is.
22273           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22274 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22275           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22276 $as_echo_n "checking for TIME... " >&6; }
22277           if test ! -x "$tool_specified"; then
22278             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22279 $as_echo "not found" >&6; }
22280             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22281           fi
22282           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22283 $as_echo "$tool_specified" >&6; }
22284         fi
22285       fi
22286     fi
22287 
22288   fi
22289 
22290 
22291 
22292 
22293   # Publish this variable in the help.
22294 
22295 
22296   if [ -z "${DTRACE+x}" ]; then
22297     # The variable is not set by user, try to locate tool using the code snippet
22298     for ac_prog in dtrace
22299 do
22300   # Extract the first word of "$ac_prog", so it can be a program name with args.
22301 set dummy $ac_prog; ac_word=$2
22302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22303 $as_echo_n "checking for $ac_word... " >&6; }
22304 if ${ac_cv_path_DTRACE+:} false; then :
22305   $as_echo_n "(cached) " >&6
22306 else
22307   case $DTRACE in
22308   [\\/]* | ?:[\\/]*)
22309   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22310   ;;
22311   *)
22312   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22313 for as_dir in $PATH
22314 do
22315   IFS=$as_save_IFS
22316   test -z "$as_dir" && as_dir=.
22317     for ac_exec_ext in '' $ac_executable_extensions; do
22318   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22319     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22320     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22321     break 2
22322   fi
22323 done
22324   done
22325 IFS=$as_save_IFS
22326 
22327   ;;
22328 esac
22329 fi
22330 DTRACE=$ac_cv_path_DTRACE
22331 if test -n "$DTRACE"; then
22332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22333 $as_echo "$DTRACE" >&6; }
22334 else
22335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22336 $as_echo "no" >&6; }
22337 fi
22338 
22339 
22340   test -n "$DTRACE" && break
22341 done
22342 
22343   else
22344     # The variable is set, but is it from the command line or the environment?
22345 
22346     # Try to remove the string !DTRACE! from our list.
22347     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22348     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22349       # If it failed, the variable was not from the command line. Ignore it,
22350       # but warn the user (except for BASH, which is always set by the calling BASH).
22351       if test "xDTRACE" != xBASH; then
22352         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22353 $as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22354       fi
22355       # Try to locate tool using the code snippet
22356       for ac_prog in dtrace
22357 do
22358   # Extract the first word of "$ac_prog", so it can be a program name with args.
22359 set dummy $ac_prog; ac_word=$2
22360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22361 $as_echo_n "checking for $ac_word... " >&6; }
22362 if ${ac_cv_path_DTRACE+:} false; then :
22363   $as_echo_n "(cached) " >&6
22364 else
22365   case $DTRACE in
22366   [\\/]* | ?:[\\/]*)
22367   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22368   ;;
22369   *)
22370   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22371 for as_dir in $PATH
22372 do
22373   IFS=$as_save_IFS
22374   test -z "$as_dir" && as_dir=.
22375     for ac_exec_ext in '' $ac_executable_extensions; do
22376   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22377     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22378     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22379     break 2
22380   fi
22381 done
22382   done
22383 IFS=$as_save_IFS
22384 
22385   ;;
22386 esac
22387 fi
22388 DTRACE=$ac_cv_path_DTRACE
22389 if test -n "$DTRACE"; then
22390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22391 $as_echo "$DTRACE" >&6; }
22392 else
22393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22394 $as_echo "no" >&6; }
22395 fi
22396 
22397 
22398   test -n "$DTRACE" && break
22399 done
22400 
22401     else
22402       # If it succeeded, then it was overridden by the user. We will use it
22403       # for the tool.
22404 
22405       # First remove it from the list of overridden variables, so we can test
22406       # for unknown variables in the end.
22407       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22408 
22409       # Check if we try to supply an empty value
22410       if test "x$DTRACE" = x; then
22411         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22412 $as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22413         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22414 $as_echo_n "checking for DTRACE... " >&6; }
22415         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22416 $as_echo "disabled" >&6; }
22417       else
22418         # Check if the provided tool contains a complete path.
22419         tool_specified="$DTRACE"
22420         tool_basename="${tool_specified##*/}"
22421         if test "x$tool_basename" = "x$tool_specified"; then
22422           # A command without a complete path is provided, search $PATH.
22423           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22424 $as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22425           # Extract the first word of "$tool_basename", so it can be a program name with args.
22426 set dummy $tool_basename; ac_word=$2
22427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22428 $as_echo_n "checking for $ac_word... " >&6; }
22429 if ${ac_cv_path_DTRACE+:} false; then :
22430   $as_echo_n "(cached) " >&6
22431 else
22432   case $DTRACE in
22433   [\\/]* | ?:[\\/]*)
22434   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22435   ;;
22436   *)
22437   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22438 for as_dir in $PATH
22439 do
22440   IFS=$as_save_IFS
22441   test -z "$as_dir" && as_dir=.
22442     for ac_exec_ext in '' $ac_executable_extensions; do
22443   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22444     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22445     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22446     break 2
22447   fi
22448 done
22449   done
22450 IFS=$as_save_IFS
22451 
22452   ;;
22453 esac
22454 fi
22455 DTRACE=$ac_cv_path_DTRACE
22456 if test -n "$DTRACE"; then
22457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22458 $as_echo "$DTRACE" >&6; }
22459 else
22460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22461 $as_echo "no" >&6; }
22462 fi
22463 
22464 
22465           if test "x$DTRACE" = x; then
22466             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22467           fi
22468         else
22469           # Otherwise we believe it is a complete path. Use it as it is.
22470           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22471 $as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22472           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22473 $as_echo_n "checking for DTRACE... " >&6; }
22474           if test ! -x "$tool_specified"; then
22475             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22476 $as_echo "not found" >&6; }
22477             as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22478           fi
22479           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22480 $as_echo "$tool_specified" >&6; }
22481         fi
22482       fi
22483     fi
22484 
22485   fi
22486 
22487 
22488 
22489 
22490   # Publish this variable in the help.
22491 
22492 
22493   if [ -z "${PATCH+x}" ]; then
22494     # The variable is not set by user, try to locate tool using the code snippet
22495     for ac_prog in gpatch patch
22496 do
22497   # Extract the first word of "$ac_prog", so it can be a program name with args.
22498 set dummy $ac_prog; ac_word=$2
22499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22500 $as_echo_n "checking for $ac_word... " >&6; }
22501 if ${ac_cv_path_PATCH+:} false; then :
22502   $as_echo_n "(cached) " >&6
22503 else
22504   case $PATCH in
22505   [\\/]* | ?:[\\/]*)
22506   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22507   ;;
22508   *)
22509   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22510 for as_dir in $PATH
22511 do
22512   IFS=$as_save_IFS
22513   test -z "$as_dir" && as_dir=.
22514     for ac_exec_ext in '' $ac_executable_extensions; do
22515   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22516     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22517     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22518     break 2
22519   fi
22520 done
22521   done
22522 IFS=$as_save_IFS
22523 
22524   ;;
22525 esac
22526 fi
22527 PATCH=$ac_cv_path_PATCH
22528 if test -n "$PATCH"; then
22529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22530 $as_echo "$PATCH" >&6; }
22531 else
22532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22533 $as_echo "no" >&6; }
22534 fi
22535 
22536 
22537   test -n "$PATCH" && break
22538 done
22539 
22540   else
22541     # The variable is set, but is it from the command line or the environment?
22542 
22543     # Try to remove the string !PATCH! from our list.
22544     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22545     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22546       # If it failed, the variable was not from the command line. Ignore it,
22547       # but warn the user (except for BASH, which is always set by the calling BASH).
22548       if test "xPATCH" != xBASH; then
22549         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22550 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22551       fi
22552       # Try to locate tool using the code snippet
22553       for ac_prog in gpatch patch
22554 do
22555   # Extract the first word of "$ac_prog", so it can be a program name with args.
22556 set dummy $ac_prog; ac_word=$2
22557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22558 $as_echo_n "checking for $ac_word... " >&6; }
22559 if ${ac_cv_path_PATCH+:} false; then :
22560   $as_echo_n "(cached) " >&6
22561 else
22562   case $PATCH in
22563   [\\/]* | ?:[\\/]*)
22564   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22565   ;;
22566   *)
22567   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22568 for as_dir in $PATH
22569 do
22570   IFS=$as_save_IFS
22571   test -z "$as_dir" && as_dir=.
22572     for ac_exec_ext in '' $ac_executable_extensions; do
22573   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22574     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22575     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22576     break 2
22577   fi
22578 done
22579   done
22580 IFS=$as_save_IFS
22581 
22582   ;;
22583 esac
22584 fi
22585 PATCH=$ac_cv_path_PATCH
22586 if test -n "$PATCH"; then
22587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22588 $as_echo "$PATCH" >&6; }
22589 else
22590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22591 $as_echo "no" >&6; }
22592 fi
22593 
22594 
22595   test -n "$PATCH" && break
22596 done
22597 
22598     else
22599       # If it succeeded, then it was overridden by the user. We will use it
22600       # for the tool.
22601 
22602       # First remove it from the list of overridden variables, so we can test
22603       # for unknown variables in the end.
22604       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22605 
22606       # Check if we try to supply an empty value
22607       if test "x$PATCH" = x; then
22608         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22609 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22610         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22611 $as_echo_n "checking for PATCH... " >&6; }
22612         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22613 $as_echo "disabled" >&6; }
22614       else
22615         # Check if the provided tool contains a complete path.
22616         tool_specified="$PATCH"
22617         tool_basename="${tool_specified##*/}"
22618         if test "x$tool_basename" = "x$tool_specified"; then
22619           # A command without a complete path is provided, search $PATH.
22620           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22621 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22622           # Extract the first word of "$tool_basename", so it can be a program name with args.
22623 set dummy $tool_basename; ac_word=$2
22624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22625 $as_echo_n "checking for $ac_word... " >&6; }
22626 if ${ac_cv_path_PATCH+:} false; then :
22627   $as_echo_n "(cached) " >&6
22628 else
22629   case $PATCH in
22630   [\\/]* | ?:[\\/]*)
22631   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22632   ;;
22633   *)
22634   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22635 for as_dir in $PATH
22636 do
22637   IFS=$as_save_IFS
22638   test -z "$as_dir" && as_dir=.
22639     for ac_exec_ext in '' $ac_executable_extensions; do
22640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22641     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22643     break 2
22644   fi
22645 done
22646   done
22647 IFS=$as_save_IFS
22648 
22649   ;;
22650 esac
22651 fi
22652 PATCH=$ac_cv_path_PATCH
22653 if test -n "$PATCH"; then
22654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22655 $as_echo "$PATCH" >&6; }
22656 else
22657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22658 $as_echo "no" >&6; }
22659 fi
22660 
22661 
22662           if test "x$PATCH" = x; then
22663             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22664           fi
22665         else
22666           # Otherwise we believe it is a complete path. Use it as it is.
22667           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22668 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22669           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22670 $as_echo_n "checking for PATCH... " >&6; }
22671           if test ! -x "$tool_specified"; then
22672             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22673 $as_echo "not found" >&6; }
22674             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22675           fi
22676           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22677 $as_echo "$tool_specified" >&6; }
22678         fi
22679       fi
22680     fi
22681 
22682   fi
22683 
22684 
22685   # Check if it's GNU time
22686   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22687   if test "x$IS_GNU_TIME" != x; then
22688     IS_GNU_TIME=yes
22689   else
22690     IS_GNU_TIME=no
22691   fi
22692 
22693 
22694   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22695 
22696 
22697 
22698   # Publish this variable in the help.
22699 
22700 
22701   if [ -z "${DSYMUTIL+x}" ]; then
22702     # The variable is not set by user, try to locate tool using the code snippet
22703     for ac_prog in dsymutil
22704 do
22705   # Extract the first word of "$ac_prog", so it can be a program name with args.
22706 set dummy $ac_prog; ac_word=$2
22707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22708 $as_echo_n "checking for $ac_word... " >&6; }
22709 if ${ac_cv_path_DSYMUTIL+:} false; then :
22710   $as_echo_n "(cached) " >&6
22711 else
22712   case $DSYMUTIL in
22713   [\\/]* | ?:[\\/]*)
22714   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22715   ;;
22716   *)
22717   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22718 for as_dir in $PATH
22719 do
22720   IFS=$as_save_IFS
22721   test -z "$as_dir" && as_dir=.
22722     for ac_exec_ext in '' $ac_executable_extensions; do
22723   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22724     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22725     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22726     break 2
22727   fi
22728 done
22729   done
22730 IFS=$as_save_IFS
22731 
22732   ;;
22733 esac
22734 fi
22735 DSYMUTIL=$ac_cv_path_DSYMUTIL
22736 if test -n "$DSYMUTIL"; then
22737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22738 $as_echo "$DSYMUTIL" >&6; }
22739 else
22740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22741 $as_echo "no" >&6; }
22742 fi
22743 
22744 
22745   test -n "$DSYMUTIL" && break
22746 done
22747 
22748   else
22749     # The variable is set, but is it from the command line or the environment?
22750 
22751     # Try to remove the string !DSYMUTIL! from our list.
22752     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22753     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22754       # If it failed, the variable was not from the command line. Ignore it,
22755       # but warn the user (except for BASH, which is always set by the calling BASH).
22756       if test "xDSYMUTIL" != xBASH; then
22757         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22758 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22759       fi
22760       # Try to locate tool using the code snippet
22761       for ac_prog in dsymutil
22762 do
22763   # Extract the first word of "$ac_prog", so it can be a program name with args.
22764 set dummy $ac_prog; ac_word=$2
22765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22766 $as_echo_n "checking for $ac_word... " >&6; }
22767 if ${ac_cv_path_DSYMUTIL+:} false; then :
22768   $as_echo_n "(cached) " >&6
22769 else
22770   case $DSYMUTIL in
22771   [\\/]* | ?:[\\/]*)
22772   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22773   ;;
22774   *)
22775   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22776 for as_dir in $PATH
22777 do
22778   IFS=$as_save_IFS
22779   test -z "$as_dir" && as_dir=.
22780     for ac_exec_ext in '' $ac_executable_extensions; do
22781   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22782     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22784     break 2
22785   fi
22786 done
22787   done
22788 IFS=$as_save_IFS
22789 
22790   ;;
22791 esac
22792 fi
22793 DSYMUTIL=$ac_cv_path_DSYMUTIL
22794 if test -n "$DSYMUTIL"; then
22795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22796 $as_echo "$DSYMUTIL" >&6; }
22797 else
22798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22799 $as_echo "no" >&6; }
22800 fi
22801 
22802 
22803   test -n "$DSYMUTIL" && break
22804 done
22805 
22806     else
22807       # If it succeeded, then it was overridden by the user. We will use it
22808       # for the tool.
22809 
22810       # First remove it from the list of overridden variables, so we can test
22811       # for unknown variables in the end.
22812       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22813 
22814       # Check if we try to supply an empty value
22815       if test "x$DSYMUTIL" = x; then
22816         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22817 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22818         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22819 $as_echo_n "checking for DSYMUTIL... " >&6; }
22820         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22821 $as_echo "disabled" >&6; }
22822       else
22823         # Check if the provided tool contains a complete path.
22824         tool_specified="$DSYMUTIL"
22825         tool_basename="${tool_specified##*/}"
22826         if test "x$tool_basename" = "x$tool_specified"; then
22827           # A command without a complete path is provided, search $PATH.
22828           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22829 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22830           # Extract the first word of "$tool_basename", so it can be a program name with args.
22831 set dummy $tool_basename; ac_word=$2
22832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22833 $as_echo_n "checking for $ac_word... " >&6; }
22834 if ${ac_cv_path_DSYMUTIL+:} false; then :
22835   $as_echo_n "(cached) " >&6
22836 else
22837   case $DSYMUTIL in
22838   [\\/]* | ?:[\\/]*)
22839   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22840   ;;
22841   *)
22842   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22843 for as_dir in $PATH
22844 do
22845   IFS=$as_save_IFS
22846   test -z "$as_dir" && as_dir=.
22847     for ac_exec_ext in '' $ac_executable_extensions; do
22848   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22849     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22850     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22851     break 2
22852   fi
22853 done
22854   done
22855 IFS=$as_save_IFS
22856 
22857   ;;
22858 esac
22859 fi
22860 DSYMUTIL=$ac_cv_path_DSYMUTIL
22861 if test -n "$DSYMUTIL"; then
22862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22863 $as_echo "$DSYMUTIL" >&6; }
22864 else
22865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22866 $as_echo "no" >&6; }
22867 fi
22868 
22869 
22870           if test "x$DSYMUTIL" = x; then
22871             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22872           fi
22873         else
22874           # Otherwise we believe it is a complete path. Use it as it is.
22875           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22876 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22877           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22878 $as_echo_n "checking for DSYMUTIL... " >&6; }
22879           if test ! -x "$tool_specified"; then
22880             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22881 $as_echo "not found" >&6; }
22882             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22883           fi
22884           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22885 $as_echo "$tool_specified" >&6; }
22886         fi
22887       fi
22888     fi
22889 
22890   fi
22891 
22892 
22893 
22894   if test "x$DSYMUTIL" = x; then
22895     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22896   fi
22897 
22898 
22899 
22900 
22901 
22902   # Publish this variable in the help.
22903 
22904 
22905   if [ -z "${XATTR+x}" ]; then
22906     # The variable is not set by user, try to locate tool using the code snippet
22907     for ac_prog in xattr
22908 do
22909   # Extract the first word of "$ac_prog", so it can be a program name with args.
22910 set dummy $ac_prog; ac_word=$2
22911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22912 $as_echo_n "checking for $ac_word... " >&6; }
22913 if ${ac_cv_path_XATTR+:} false; then :
22914   $as_echo_n "(cached) " >&6
22915 else
22916   case $XATTR in
22917   [\\/]* | ?:[\\/]*)
22918   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22919   ;;
22920   *)
22921   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22922 for as_dir in $PATH
22923 do
22924   IFS=$as_save_IFS
22925   test -z "$as_dir" && as_dir=.
22926     for ac_exec_ext in '' $ac_executable_extensions; do
22927   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22928     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22929     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22930     break 2
22931   fi
22932 done
22933   done
22934 IFS=$as_save_IFS
22935 
22936   ;;
22937 esac
22938 fi
22939 XATTR=$ac_cv_path_XATTR
22940 if test -n "$XATTR"; then
22941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22942 $as_echo "$XATTR" >&6; }
22943 else
22944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22945 $as_echo "no" >&6; }
22946 fi
22947 
22948 
22949   test -n "$XATTR" && break
22950 done
22951 
22952   else
22953     # The variable is set, but is it from the command line or the environment?
22954 
22955     # Try to remove the string !XATTR! from our list.
22956     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22957     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22958       # If it failed, the variable was not from the command line. Ignore it,
22959       # but warn the user (except for BASH, which is always set by the calling BASH).
22960       if test "xXATTR" != xBASH; then
22961         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22962 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22963       fi
22964       # Try to locate tool using the code snippet
22965       for ac_prog in xattr
22966 do
22967   # Extract the first word of "$ac_prog", so it can be a program name with args.
22968 set dummy $ac_prog; ac_word=$2
22969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22970 $as_echo_n "checking for $ac_word... " >&6; }
22971 if ${ac_cv_path_XATTR+:} false; then :
22972   $as_echo_n "(cached) " >&6
22973 else
22974   case $XATTR in
22975   [\\/]* | ?:[\\/]*)
22976   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22977   ;;
22978   *)
22979   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22980 for as_dir in $PATH
22981 do
22982   IFS=$as_save_IFS
22983   test -z "$as_dir" && as_dir=.
22984     for ac_exec_ext in '' $ac_executable_extensions; do
22985   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22986     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22987     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22988     break 2
22989   fi
22990 done
22991   done
22992 IFS=$as_save_IFS
22993 
22994   ;;
22995 esac
22996 fi
22997 XATTR=$ac_cv_path_XATTR
22998 if test -n "$XATTR"; then
22999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23000 $as_echo "$XATTR" >&6; }
23001 else
23002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23003 $as_echo "no" >&6; }
23004 fi
23005 
23006 
23007   test -n "$XATTR" && break
23008 done
23009 
23010     else
23011       # If it succeeded, then it was overridden by the user. We will use it
23012       # for the tool.
23013 
23014       # First remove it from the list of overridden variables, so we can test
23015       # for unknown variables in the end.
23016       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23017 
23018       # Check if we try to supply an empty value
23019       if test "x$XATTR" = x; then
23020         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23021 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23022         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23023 $as_echo_n "checking for XATTR... " >&6; }
23024         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23025 $as_echo "disabled" >&6; }
23026       else
23027         # Check if the provided tool contains a complete path.
23028         tool_specified="$XATTR"
23029         tool_basename="${tool_specified##*/}"
23030         if test "x$tool_basename" = "x$tool_specified"; then
23031           # A command without a complete path is provided, search $PATH.
23032           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23033 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23034           # Extract the first word of "$tool_basename", so it can be a program name with args.
23035 set dummy $tool_basename; ac_word=$2
23036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23037 $as_echo_n "checking for $ac_word... " >&6; }
23038 if ${ac_cv_path_XATTR+:} false; then :
23039   $as_echo_n "(cached) " >&6
23040 else
23041   case $XATTR in
23042   [\\/]* | ?:[\\/]*)
23043   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23044   ;;
23045   *)
23046   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23047 for as_dir in $PATH
23048 do
23049   IFS=$as_save_IFS
23050   test -z "$as_dir" && as_dir=.
23051     for ac_exec_ext in '' $ac_executable_extensions; do
23052   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23053     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23054     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23055     break 2
23056   fi
23057 done
23058   done
23059 IFS=$as_save_IFS
23060 
23061   ;;
23062 esac
23063 fi
23064 XATTR=$ac_cv_path_XATTR
23065 if test -n "$XATTR"; then
23066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23067 $as_echo "$XATTR" >&6; }
23068 else
23069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23070 $as_echo "no" >&6; }
23071 fi
23072 
23073 
23074           if test "x$XATTR" = x; then
23075             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23076           fi
23077         else
23078           # Otherwise we believe it is a complete path. Use it as it is.
23079           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23080 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23081           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23082 $as_echo_n "checking for XATTR... " >&6; }
23083           if test ! -x "$tool_specified"; then
23084             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23085 $as_echo "not found" >&6; }
23086             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23087           fi
23088           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23089 $as_echo "$tool_specified" >&6; }
23090         fi
23091       fi
23092     fi
23093 
23094   fi
23095 
23096 
23097 
23098   if test "x$XATTR" = x; then
23099     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23100   fi
23101 
23102 
23103 
23104 
23105   # Publish this variable in the help.
23106 
23107 
23108   if [ -z "${CODESIGN+x}" ]; then
23109     # The variable is not set by user, try to locate tool using the code snippet
23110     for ac_prog in codesign
23111 do
23112   # Extract the first word of "$ac_prog", so it can be a program name with args.
23113 set dummy $ac_prog; ac_word=$2
23114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23115 $as_echo_n "checking for $ac_word... " >&6; }
23116 if ${ac_cv_path_CODESIGN+:} false; then :
23117   $as_echo_n "(cached) " >&6
23118 else
23119   case $CODESIGN in
23120   [\\/]* | ?:[\\/]*)
23121   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23122   ;;
23123   *)
23124   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23125 for as_dir in $PATH
23126 do
23127   IFS=$as_save_IFS
23128   test -z "$as_dir" && as_dir=.
23129     for ac_exec_ext in '' $ac_executable_extensions; do
23130   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23131     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23132     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23133     break 2
23134   fi
23135 done
23136   done
23137 IFS=$as_save_IFS
23138 
23139   ;;
23140 esac
23141 fi
23142 CODESIGN=$ac_cv_path_CODESIGN
23143 if test -n "$CODESIGN"; then
23144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23145 $as_echo "$CODESIGN" >&6; }
23146 else
23147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23148 $as_echo "no" >&6; }
23149 fi
23150 
23151 
23152   test -n "$CODESIGN" && break
23153 done
23154 
23155   else
23156     # The variable is set, but is it from the command line or the environment?
23157 
23158     # Try to remove the string !CODESIGN! from our list.
23159     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23160     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23161       # If it failed, the variable was not from the command line. Ignore it,
23162       # but warn the user (except for BASH, which is always set by the calling BASH).
23163       if test "xCODESIGN" != xBASH; then
23164         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23165 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23166       fi
23167       # Try to locate tool using the code snippet
23168       for ac_prog in codesign
23169 do
23170   # Extract the first word of "$ac_prog", so it can be a program name with args.
23171 set dummy $ac_prog; ac_word=$2
23172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23173 $as_echo_n "checking for $ac_word... " >&6; }
23174 if ${ac_cv_path_CODESIGN+:} false; then :
23175   $as_echo_n "(cached) " >&6
23176 else
23177   case $CODESIGN in
23178   [\\/]* | ?:[\\/]*)
23179   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23180   ;;
23181   *)
23182   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23183 for as_dir in $PATH
23184 do
23185   IFS=$as_save_IFS
23186   test -z "$as_dir" && as_dir=.
23187     for ac_exec_ext in '' $ac_executable_extensions; do
23188   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23189     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23190     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23191     break 2
23192   fi
23193 done
23194   done
23195 IFS=$as_save_IFS
23196 
23197   ;;
23198 esac
23199 fi
23200 CODESIGN=$ac_cv_path_CODESIGN
23201 if test -n "$CODESIGN"; then
23202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23203 $as_echo "$CODESIGN" >&6; }
23204 else
23205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23206 $as_echo "no" >&6; }
23207 fi
23208 
23209 
23210   test -n "$CODESIGN" && break
23211 done
23212 
23213     else
23214       # If it succeeded, then it was overridden by the user. We will use it
23215       # for the tool.
23216 
23217       # First remove it from the list of overridden variables, so we can test
23218       # for unknown variables in the end.
23219       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23220 
23221       # Check if we try to supply an empty value
23222       if test "x$CODESIGN" = x; then
23223         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23224 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23225         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23226 $as_echo_n "checking for CODESIGN... " >&6; }
23227         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23228 $as_echo "disabled" >&6; }
23229       else
23230         # Check if the provided tool contains a complete path.
23231         tool_specified="$CODESIGN"
23232         tool_basename="${tool_specified##*/}"
23233         if test "x$tool_basename" = "x$tool_specified"; then
23234           # A command without a complete path is provided, search $PATH.
23235           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23236 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23237           # Extract the first word of "$tool_basename", so it can be a program name with args.
23238 set dummy $tool_basename; ac_word=$2
23239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23240 $as_echo_n "checking for $ac_word... " >&6; }
23241 if ${ac_cv_path_CODESIGN+:} false; then :
23242   $as_echo_n "(cached) " >&6
23243 else
23244   case $CODESIGN in
23245   [\\/]* | ?:[\\/]*)
23246   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23247   ;;
23248   *)
23249   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23250 for as_dir in $PATH
23251 do
23252   IFS=$as_save_IFS
23253   test -z "$as_dir" && as_dir=.
23254     for ac_exec_ext in '' $ac_executable_extensions; do
23255   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23256     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23257     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23258     break 2
23259   fi
23260 done
23261   done
23262 IFS=$as_save_IFS
23263 
23264   ;;
23265 esac
23266 fi
23267 CODESIGN=$ac_cv_path_CODESIGN
23268 if test -n "$CODESIGN"; then
23269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23270 $as_echo "$CODESIGN" >&6; }
23271 else
23272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23273 $as_echo "no" >&6; }
23274 fi
23275 
23276 
23277           if test "x$CODESIGN" = x; then
23278             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23279           fi
23280         else
23281           # Otherwise we believe it is a complete path. Use it as it is.
23282           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23283 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23284           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23285 $as_echo_n "checking for CODESIGN... " >&6; }
23286           if test ! -x "$tool_specified"; then
23287             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23288 $as_echo "not found" >&6; }
23289             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23290           fi
23291           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23292 $as_echo "$tool_specified" >&6; }
23293         fi
23294       fi
23295     fi
23296 
23297   fi
23298 
23299 
23300     if test "x$CODESIGN" != "x"; then
23301       # Verify that the openjdk_codesign certificate is present
23302       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23303 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23304       rm -f codesign-testfile
23305       touch codesign-testfile
23306       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23307       rm -f codesign-testfile
23308       if test "x$CODESIGN" = x; then
23309         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23310 $as_echo "no" >&6; }
23311       else
23312         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23313 $as_echo "yes" >&6; }
23314       fi
23315     fi
23316 
23317 
23318 
23319   # Publish this variable in the help.
23320 
23321 
23322   if [ -z "${SETFILE+x}" ]; then
23323     # The variable is not set by user, try to locate tool using the code snippet
23324     for ac_prog in SetFile
23325 do
23326   # Extract the first word of "$ac_prog", so it can be a program name with args.
23327 set dummy $ac_prog; ac_word=$2
23328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23329 $as_echo_n "checking for $ac_word... " >&6; }
23330 if ${ac_cv_path_SETFILE+:} false; then :
23331   $as_echo_n "(cached) " >&6
23332 else
23333   case $SETFILE in
23334   [\\/]* | ?:[\\/]*)
23335   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23336   ;;
23337   *)
23338   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23339 for as_dir in $PATH
23340 do
23341   IFS=$as_save_IFS
23342   test -z "$as_dir" && as_dir=.
23343     for ac_exec_ext in '' $ac_executable_extensions; do
23344   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23345     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23346     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23347     break 2
23348   fi
23349 done
23350   done
23351 IFS=$as_save_IFS
23352 
23353   ;;
23354 esac
23355 fi
23356 SETFILE=$ac_cv_path_SETFILE
23357 if test -n "$SETFILE"; then
23358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23359 $as_echo "$SETFILE" >&6; }
23360 else
23361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23362 $as_echo "no" >&6; }
23363 fi
23364 
23365 
23366   test -n "$SETFILE" && break
23367 done
23368 
23369   else
23370     # The variable is set, but is it from the command line or the environment?
23371 
23372     # Try to remove the string !SETFILE! from our list.
23373     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23374     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23375       # If it failed, the variable was not from the command line. Ignore it,
23376       # but warn the user (except for BASH, which is always set by the calling BASH).
23377       if test "xSETFILE" != xBASH; then
23378         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23379 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23380       fi
23381       # Try to locate tool using the code snippet
23382       for ac_prog in SetFile
23383 do
23384   # Extract the first word of "$ac_prog", so it can be a program name with args.
23385 set dummy $ac_prog; ac_word=$2
23386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23387 $as_echo_n "checking for $ac_word... " >&6; }
23388 if ${ac_cv_path_SETFILE+:} false; then :
23389   $as_echo_n "(cached) " >&6
23390 else
23391   case $SETFILE in
23392   [\\/]* | ?:[\\/]*)
23393   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23394   ;;
23395   *)
23396   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23397 for as_dir in $PATH
23398 do
23399   IFS=$as_save_IFS
23400   test -z "$as_dir" && as_dir=.
23401     for ac_exec_ext in '' $ac_executable_extensions; do
23402   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23403     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23404     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23405     break 2
23406   fi
23407 done
23408   done
23409 IFS=$as_save_IFS
23410 
23411   ;;
23412 esac
23413 fi
23414 SETFILE=$ac_cv_path_SETFILE
23415 if test -n "$SETFILE"; then
23416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23417 $as_echo "$SETFILE" >&6; }
23418 else
23419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23420 $as_echo "no" >&6; }
23421 fi
23422 
23423 
23424   test -n "$SETFILE" && break
23425 done
23426 
23427     else
23428       # If it succeeded, then it was overridden by the user. We will use it
23429       # for the tool.
23430 
23431       # First remove it from the list of overridden variables, so we can test
23432       # for unknown variables in the end.
23433       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23434 
23435       # Check if we try to supply an empty value
23436       if test "x$SETFILE" = x; then
23437         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23438 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23439         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23440 $as_echo_n "checking for SETFILE... " >&6; }
23441         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23442 $as_echo "disabled" >&6; }
23443       else
23444         # Check if the provided tool contains a complete path.
23445         tool_specified="$SETFILE"
23446         tool_basename="${tool_specified##*/}"
23447         if test "x$tool_basename" = "x$tool_specified"; then
23448           # A command without a complete path is provided, search $PATH.
23449           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23450 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23451           # Extract the first word of "$tool_basename", so it can be a program name with args.
23452 set dummy $tool_basename; ac_word=$2
23453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23454 $as_echo_n "checking for $ac_word... " >&6; }
23455 if ${ac_cv_path_SETFILE+:} false; then :
23456   $as_echo_n "(cached) " >&6
23457 else
23458   case $SETFILE in
23459   [\\/]* | ?:[\\/]*)
23460   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23461   ;;
23462   *)
23463   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23464 for as_dir in $PATH
23465 do
23466   IFS=$as_save_IFS
23467   test -z "$as_dir" && as_dir=.
23468     for ac_exec_ext in '' $ac_executable_extensions; do
23469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23470     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23472     break 2
23473   fi
23474 done
23475   done
23476 IFS=$as_save_IFS
23477 
23478   ;;
23479 esac
23480 fi
23481 SETFILE=$ac_cv_path_SETFILE
23482 if test -n "$SETFILE"; then
23483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23484 $as_echo "$SETFILE" >&6; }
23485 else
23486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23487 $as_echo "no" >&6; }
23488 fi
23489 
23490 
23491           if test "x$SETFILE" = x; then
23492             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23493           fi
23494         else
23495           # Otherwise we believe it is a complete path. Use it as it is.
23496           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23497 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23498           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23499 $as_echo_n "checking for SETFILE... " >&6; }
23500           if test ! -x "$tool_specified"; then
23501             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23502 $as_echo "not found" >&6; }
23503             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23504           fi
23505           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23506 $as_echo "$tool_specified" >&6; }
23507         fi
23508       fi
23509     fi
23510 
23511   fi
23512 
23513 
23514 
23515   if test "x$SETFILE" = x; then
23516     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23517   fi
23518 
23519 
23520   fi
23521 
23522 
23523   # Test if bash supports pipefail.
23524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23525 $as_echo_n "checking if bash supports pipefail... " >&6; }
23526   if ${BASH} -c 'set -o pipefail'; then
23527     BASH_ARGS="$BASH_ARGS -o pipefail"
23528     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23529 $as_echo "yes" >&6; }
23530   else
23531     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23532 $as_echo "no" >&6; }
23533   fi
23534 
23535   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23536 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23537   if ${BASH} -e -c 'true'; then
23538     BASH_ARGS="$BASH_ARGS -e"
23539     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23540 $as_echo "yes" >&6; }
23541   else
23542     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23543 $as_echo "no" >&6; }
23544   fi
23545 
23546 
23547 
23548 
23549 # Check if pkg-config is available.
23550 
23551 
23552 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23553         if test -n "$ac_tool_prefix"; then
23554   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23555 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23557 $as_echo_n "checking for $ac_word... " >&6; }
23558 if ${ac_cv_path_PKG_CONFIG+:} false; then :
23559   $as_echo_n "(cached) " >&6
23560 else
23561   case $PKG_CONFIG in
23562   [\\/]* | ?:[\\/]*)
23563   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23564   ;;
23565   *)
23566   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23567 for as_dir in $PATH
23568 do
23569   IFS=$as_save_IFS
23570   test -z "$as_dir" && as_dir=.
23571     for ac_exec_ext in '' $ac_executable_extensions; do
23572   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23573     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23574     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23575     break 2
23576   fi
23577 done
23578   done
23579 IFS=$as_save_IFS
23580 
23581   ;;
23582 esac
23583 fi
23584 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23585 if test -n "$PKG_CONFIG"; then
23586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23587 $as_echo "$PKG_CONFIG" >&6; }
23588 else
23589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23590 $as_echo "no" >&6; }
23591 fi
23592 
23593 
23594 fi
23595 if test -z "$ac_cv_path_PKG_CONFIG"; then
23596   ac_pt_PKG_CONFIG=$PKG_CONFIG
23597   # Extract the first word of "pkg-config", so it can be a program name with args.
23598 set dummy pkg-config; ac_word=$2
23599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23600 $as_echo_n "checking for $ac_word... " >&6; }
23601 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23602   $as_echo_n "(cached) " >&6
23603 else
23604   case $ac_pt_PKG_CONFIG in
23605   [\\/]* | ?:[\\/]*)
23606   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23607   ;;
23608   *)
23609   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23610 for as_dir in $PATH
23611 do
23612   IFS=$as_save_IFS
23613   test -z "$as_dir" && as_dir=.
23614     for ac_exec_ext in '' $ac_executable_extensions; do
23615   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23616     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23618     break 2
23619   fi
23620 done
23621   done
23622 IFS=$as_save_IFS
23623 
23624   ;;
23625 esac
23626 fi
23627 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23628 if test -n "$ac_pt_PKG_CONFIG"; then
23629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23630 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
23631 else
23632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23633 $as_echo "no" >&6; }
23634 fi
23635 
23636   if test "x$ac_pt_PKG_CONFIG" = x; then
23637     PKG_CONFIG=""
23638   else
23639     case $cross_compiling:$ac_tool_warned in
23640 yes:)
23641 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23642 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23643 ac_tool_warned=yes ;;
23644 esac
23645     PKG_CONFIG=$ac_pt_PKG_CONFIG
23646   fi
23647 else
23648   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23649 fi
23650 
23651 fi
23652 if test -n "$PKG_CONFIG"; then
23653         _pkg_min_version=0.9.0
23654         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23655 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23656         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23657                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23658 $as_echo "yes" >&6; }
23659         else
23660                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23661 $as_echo "no" >&6; }
23662                 PKG_CONFIG=""
23663         fi
23664 
23665 fi
23666 
23667 # After basic tools have been setup, we can check build os specific details.
23668 
23669   ###############################################################################
23670 
23671   # Note that this is the build platform OS version!
23672 
23673   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23674   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23675   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23676   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23677 
23678 
23679 
23680 
23681 
23682 # Misc basic settings
23683 
23684 
23685 # Check whether --with-default-make-target was given.
23686 if test "${with_default_make_target+set}" = set; then :
23687   withval=$with_default_make_target;
23688 fi
23689 
23690   if test "x$with_default_make_target" = "x" \
23691       || test "x$with_default_make_target" = "xyes"; then
23692     DEFAULT_MAKE_TARGET="exploded-image"
23693   elif test "x$with_default_make_target" = "xno"; then
23694     as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23695   else
23696     DEFAULT_MAKE_TARGET="$with_default_make_target"
23697   fi
23698 
23699 
23700 
23701 
23702 ###############################################################################
23703 #
23704 # Determine OpenJDK variants, options and version numbers.
23705 #
23706 ###############################################################################
23707 
23708 # We need build & target for this.
23709 
23710   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23711   # We always build headless support.
23712   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23713 $as_echo_n "checking headful support... " >&6; }
23714   # Check whether --enable-headful was given.
23715 if test "${enable_headful+set}" = set; then :
23716   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23717 else
23718   SUPPORT_HEADFUL=yes
23719 fi
23720 
23721 
23722   SUPPORT_HEADLESS=yes
23723   BUILD_HEADLESS="BUILD_HEADLESS:=true"
23724 
23725   if test "x$SUPPORT_HEADFUL" = xyes; then
23726     # We are building both headful and headless.
23727     headful_msg="include support for both headful and headless"
23728   fi
23729 
23730   if test "x$SUPPORT_HEADFUL" = xno; then
23731     # Thus we are building headless only.
23732     BUILD_HEADLESS="BUILD_HEADLESS:=true"
23733     headful_msg="headless only"
23734   fi
23735 
23736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23737 $as_echo "$headful_msg" >&6; }
23738 
23739 
23740 
23741 
23742 
23743   # Choose cacerts source file
23744 
23745 # Check whether --with-cacerts-file was given.
23746 if test "${with_cacerts_file+set}" = set; then :
23747   withval=$with_cacerts_file;
23748 fi
23749 
23750   if test "x$with_cacerts_file" != x; then
23751     CACERTS_FILE=$with_cacerts_file
23752   fi
23753 
23754 
23755   # Enable or disable unlimited crypto
23756   # Check whether --enable-unlimited-crypto was given.
23757 if test "${enable_unlimited_crypto+set}" = set; then :
23758   enableval=$enable_unlimited_crypto;
23759 else
23760   enable_unlimited_crypto=no
23761 fi
23762 
23763   if test "x$enable_unlimited_crypto" = "xyes"; then
23764     UNLIMITED_CRYPTO=true
23765   else
23766     UNLIMITED_CRYPTO=false
23767   fi
23768 
23769 
23770   # Should we build the serviceability agent (SA)?
23771   INCLUDE_SA=true
23772   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
23773     INCLUDE_SA=false
23774   fi
23775   if test "x$OPENJDK_TARGET_OS" = xaix ; then
23776     INCLUDE_SA=false
23777   fi
23778   if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
23779     INCLUDE_SA=false
23780   fi
23781 
23782 
23783   # Compress jars
23784   COMPRESS_JARS=false
23785 
23786 
23787 
23788   # Setup default copyright year. Mostly overridden when building close to a new year.
23789 
23790 # Check whether --with-copyright-year was given.
23791 if test "${with_copyright_year+set}" = set; then :
23792   withval=$with_copyright_year;
23793 fi
23794 
23795   if test "x$with_copyright_year" = xyes; then
23796     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23797   elif test "x$with_copyright_year" != x; then
23798     COPYRIGHT_YEAR="$with_copyright_year"
23799   else
23800     COPYRIGHT_YEAR=`date +'%Y'`
23801   fi
23802 
23803 
23804 
23805   # Check whether --enable-keep-packaged-modules was given.
23806 if test "${enable_keep_packaged_modules+set}" = set; then :
23807   enableval=$enable_keep_packaged_modules;
23808 fi
23809 
23810 
23811   if test "x$enable_keep_packaged_modules" = "xyes"; then
23812     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23813 $as_echo_n "checking if packaged modules are kept... " >&6; }
23814     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23815 $as_echo "yes" >&6; }
23816     JLINK_KEEP_PACKAGED_MODULES=true
23817   elif test "x$enable_keep_packaged_modules" = "xno"; then
23818     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23819 $as_echo_n "checking if packaged modules are kept... " >&6; }
23820     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23821 $as_echo "no" >&6; }
23822     JLINK_KEEP_PACKAGED_MODULES=false
23823   elif test "x$enable_keep_packaged_modules" = "x"; then
23824     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
23825 $as_echo "yes (default)" >&6; }
23826     JLINK_KEEP_PACKAGED_MODULES=true
23827   else
23828     as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
23829   fi
23830 
23831 
23832 
23833 
23834   # Warn user that old version arguments are deprecated.
23835 
23836 
23837 # Check whether --with-milestone was given.
23838 if test "${with_milestone+set}" = set; then :
23839   withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23840 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23841 fi
23842 
23843 
23844 
23845 
23846 # Check whether --with-update-version was given.
23847 if test "${with_update_version+set}" = set; then :
23848   withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23849 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23850 fi
23851 
23852 
23853 
23854 
23855 # Check whether --with-user-release-suffix was given.
23856 if test "${with_user_release_suffix+set}" = set; then :
23857   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
23858 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23859 fi
23860 
23861 
23862 
23863 
23864 # Check whether --with-build-number was given.
23865 if test "${with_build_number+set}" = set; then :
23866   withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23867 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23868 fi
23869 
23870 
23871 
23872   # Source the version numbers file
23873   . $AUTOCONF_DIR/version-numbers
23874 
23875   # Some non-version number information is set in that file
23876 
23877 
23878 
23879 
23880 
23881 
23882 
23883 
23884 
23885   # Override version from arguments
23886 
23887   # If --with-version-string is set, process it first. It is possible to
23888   # override parts with more specific flags, since these are processed later.
23889 
23890 # Check whether --with-version-string was given.
23891 if test "${with_version_string+set}" = set; then :
23892   withval=$with_version_string;
23893 fi
23894 
23895   if test "x$with_version_string" = xyes; then
23896     as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23897   elif test "x$with_version_string" != x; then
23898     # Additional [] needed to keep m4 from mangling shell constructs.
23899     if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23900       VERSION_MAJOR=${BASH_REMATCH[1]}
23901       VERSION_MINOR=${BASH_REMATCH[3]}
23902       VERSION_SECURITY=${BASH_REMATCH[5]}
23903       VERSION_PATCH=${BASH_REMATCH[7]}
23904       VERSION_PRE=${BASH_REMATCH[9]}
23905       version_plus_separator=${BASH_REMATCH[11]}
23906       VERSION_BUILD=${BASH_REMATCH[12]}
23907       VERSION_OPT=${BASH_REMATCH[14]}
23908       # Unspecified numerical fields are interpreted as 0.
23909       if test "x$VERSION_MINOR" = x; then
23910         VERSION_MINOR=0
23911       fi
23912       if test "x$VERSION_SECURITY" = x; then
23913         VERSION_SECURITY=0
23914       fi
23915       if test "x$VERSION_PATCH" = x; then
23916         VERSION_PATCH=0
23917       fi
23918       if test "x$version_plus_separator" != x \
23919           && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23920         as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23921       fi
23922       # Stop the version part process from setting default values.
23923       # We still allow them to explicitely override though.
23924       NO_DEFAULT_VERSION_PARTS=true
23925     else
23926       as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23927     fi
23928   fi
23929 
23930 
23931 # Check whether --with-version-pre was given.
23932 if test "${with_version_pre+set}" = set; then :
23933   withval=$with_version_pre; with_version_pre_present=true
23934 else
23935   with_version_pre_present=false
23936 fi
23937 
23938 
23939   if test "x$with_version_pre_present" = xtrue; then
23940     if test "x$with_version_pre" = xyes; then
23941       as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23942     elif test "x$with_version_pre" = xno; then
23943       # Interpret --without-* as empty string instead of the literal "no"
23944       VERSION_PRE=
23945     else
23946       # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23947        VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23948       if test "x$VERSION_PRE" != "x$with_version_pre"; then
23949         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23950 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23951       fi
23952     fi
23953   else
23954     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23955       # Default is to use "internal" as pre
23956       VERSION_PRE="internal"
23957     fi
23958   fi
23959 
23960 
23961 # Check whether --with-version-opt was given.
23962 if test "${with_version_opt+set}" = set; then :
23963   withval=$with_version_opt; with_version_opt_present=true
23964 else
23965   with_version_opt_present=false
23966 fi
23967 
23968 
23969   if test "x$with_version_opt_present" = xtrue; then
23970     if test "x$with_version_opt" = xyes; then
23971       as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23972     elif test "x$with_version_opt" = xno; then
23973       # Interpret --without-* as empty string instead of the literal "no"
23974       VERSION_OPT=
23975     else
23976       # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23977        VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23978       if test "x$VERSION_OPT" != "x$with_version_opt"; then
23979         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23980 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23981       fi
23982     fi
23983   else
23984     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23985       # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23986       timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23987       # Outer [ ] to quote m4.
23988        basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23989       VERSION_OPT="$timestamp.$USERNAME.$basedirname"
23990     fi
23991   fi
23992 
23993 
23994 # Check whether --with-version-build was given.
23995 if test "${with_version_build+set}" = set; then :
23996   withval=$with_version_build; with_version_build_present=true
23997 else
23998   with_version_build_present=false
23999 fi
24000 
24001 
24002   if test "x$with_version_build_present" = xtrue; then
24003     if test "x$with_version_build" = xyes; then
24004       as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24005     elif test "x$with_version_build" = xno; then
24006       # Interpret --without-* as empty string instead of the literal "no"
24007       VERSION_BUILD=
24008     elif test "x$with_version_build" = x; then
24009       VERSION_BUILD=
24010     else
24011 
24012   # Additional [] needed to keep m4 from mangling shell constructs.
24013   if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24014     as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24015   fi
24016   # Extract the version number without leading zeros.
24017   cleaned_value=${BASH_REMATCH[1]}
24018   if test "x$cleaned_value" = x; then
24019     # Special case for zero
24020     cleaned_value=${BASH_REMATCH[2]}
24021   fi
24022 
24023   if test $cleaned_value -gt 255; then
24024     as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24025   fi
24026   if test "x$cleaned_value" != "x$with_version_build"; then
24027     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24028 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24029   fi
24030   VERSION_BUILD=$cleaned_value
24031 
24032     fi
24033   else
24034     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24035       # Default is to not have a build number.
24036       VERSION_BUILD=""
24037       # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24038       VERSION_BUILD=0
24039     fi
24040   fi
24041 
24042 
24043 # Check whether --with-version-major was given.
24044 if test "${with_version_major+set}" = set; then :
24045   withval=$with_version_major; with_version_major_present=true
24046 else
24047   with_version_major_present=false
24048 fi
24049 
24050 
24051   if test "x$with_version_major_present" = xtrue; then
24052     if test "x$with_version_major" = xyes; then
24053       as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24054     else
24055 
24056   # Additional [] needed to keep m4 from mangling shell constructs.
24057   if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24058     as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24059   fi
24060   # Extract the version number without leading zeros.
24061   cleaned_value=${BASH_REMATCH[1]}
24062   if test "x$cleaned_value" = x; then
24063     # Special case for zero
24064     cleaned_value=${BASH_REMATCH[2]}
24065   fi
24066 
24067   if test $cleaned_value -gt 255; then
24068     as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24069   fi
24070   if test "x$cleaned_value" != "x$with_version_major"; then
24071     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24072 $as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24073   fi
24074   VERSION_MAJOR=$cleaned_value
24075 
24076     fi
24077   else
24078     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24079       # Default is to get value from version-numbers
24080       VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24081     fi
24082   fi
24083 
24084 
24085 # Check whether --with-version-minor was given.
24086 if test "${with_version_minor+set}" = set; then :
24087   withval=$with_version_minor; with_version_minor_present=true
24088 else
24089   with_version_minor_present=false
24090 fi
24091 
24092 
24093   if test "x$with_version_minor_present" = xtrue; then
24094     if test "x$with_version_minor" = xyes; then
24095       as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24096     elif test "x$with_version_minor" = xno; then
24097       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24098       VERSION_MINOR=0
24099     elif test "x$with_version_minor" = x; then
24100       VERSION_MINOR=0
24101     else
24102 
24103   # Additional [] needed to keep m4 from mangling shell constructs.
24104   if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24105     as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24106   fi
24107   # Extract the version number without leading zeros.
24108   cleaned_value=${BASH_REMATCH[1]}
24109   if test "x$cleaned_value" = x; then
24110     # Special case for zero
24111     cleaned_value=${BASH_REMATCH[2]}
24112   fi
24113 
24114   if test $cleaned_value -gt 255; then
24115     as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24116   fi
24117   if test "x$cleaned_value" != "x$with_version_minor"; then
24118     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24119 $as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24120   fi
24121   VERSION_MINOR=$cleaned_value
24122 
24123     fi
24124   else
24125     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24126       # Default is 0, if unspecified
24127       VERSION_MINOR=0
24128     fi
24129   fi
24130 
24131 
24132 # Check whether --with-version-security was given.
24133 if test "${with_version_security+set}" = set; then :
24134   withval=$with_version_security; with_version_security_present=true
24135 else
24136   with_version_security_present=false
24137 fi
24138 
24139 
24140   if test "x$with_version_security_present" = xtrue; then
24141     if test "x$with_version_security" = xyes; then
24142       as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24143     elif test "x$with_version_security" = xno; then
24144       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24145       VERSION_SECURITY=0
24146     elif test "x$with_version_security" = x; then
24147       VERSION_SECURITY=0
24148     else
24149 
24150   # Additional [] needed to keep m4 from mangling shell constructs.
24151   if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24152     as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24153   fi
24154   # Extract the version number without leading zeros.
24155   cleaned_value=${BASH_REMATCH[1]}
24156   if test "x$cleaned_value" = x; then
24157     # Special case for zero
24158     cleaned_value=${BASH_REMATCH[2]}
24159   fi
24160 
24161   if test $cleaned_value -gt 255; then
24162     as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24163   fi
24164   if test "x$cleaned_value" != "x$with_version_security"; then
24165     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24166 $as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24167   fi
24168   VERSION_SECURITY=$cleaned_value
24169 
24170     fi
24171   else
24172     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24173       # Default is 0, if unspecified
24174       VERSION_SECURITY=0
24175     fi
24176   fi
24177 
24178 
24179 # Check whether --with-version-patch was given.
24180 if test "${with_version_patch+set}" = set; then :
24181   withval=$with_version_patch; with_version_patch_present=true
24182 else
24183   with_version_patch_present=false
24184 fi
24185 
24186 
24187   if test "x$with_version_patch_present" = xtrue; then
24188     if test "x$with_version_patch" = xyes; then
24189       as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24190     elif test "x$with_version_patch" = xno; then
24191       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24192       VERSION_PATCH=0
24193     elif test "x$with_version_patch" = x; then
24194       VERSION_PATCH=0
24195     else
24196 
24197   # Additional [] needed to keep m4 from mangling shell constructs.
24198   if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24199     as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24200   fi
24201   # Extract the version number without leading zeros.
24202   cleaned_value=${BASH_REMATCH[1]}
24203   if test "x$cleaned_value" = x; then
24204     # Special case for zero
24205     cleaned_value=${BASH_REMATCH[2]}
24206   fi
24207 
24208   if test $cleaned_value -gt 255; then
24209     as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24210   fi
24211   if test "x$cleaned_value" != "x$with_version_patch"; then
24212     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24213 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24214   fi
24215   VERSION_PATCH=$cleaned_value
24216 
24217     fi
24218   else
24219     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24220       # Default is 0, if unspecified
24221       VERSION_PATCH=0
24222     fi
24223   fi
24224 
24225   # Calculate derived version properties
24226 
24227   # Set VERSION_IS_GA based on if VERSION_PRE has a value
24228   if test "x$VERSION_PRE" = x; then
24229     VERSION_IS_GA=true
24230   else
24231     VERSION_IS_GA=false
24232   fi
24233 
24234   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24235   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24236 
24237   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24238   # Strip trailing zeroes from stripped_version_number
24239   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24240   VERSION_NUMBER=$stripped_version_number
24241 
24242   # The complete version string, with additional build information
24243   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24244     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24245   else
24246     # If either build or opt is set, we need a + separator
24247     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24248   fi
24249 
24250   # The short version string, just VERSION_NUMBER and PRE, if present.
24251   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24252 
24253   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24254 $as_echo_n "checking for version string... " >&6; }
24255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24256 $as_echo "$VERSION_STRING" >&6; }
24257 
24258 
24259 
24260 
24261 
24262 
24263 
24264 
24265 
24266 
24267 
24268 
24269 
24270 
24271 
24272 ###############################################################################
24273 #
24274 # Setup BootJDK, used to bootstrap the build.
24275 #
24276 ###############################################################################
24277 
24278 
24279   BOOT_JDK_FOUND=no
24280 
24281 # Check whether --with-boot-jdk was given.
24282 if test "${with_boot_jdk+set}" = set; then :
24283   withval=$with_boot_jdk;
24284 fi
24285 
24286 
24287   # We look for the Boot JDK through various means, going from more certain to
24288   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24289   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24290   # must check if this is indeed valid; otherwise we'll continue looking.
24291 
24292   # Test: Is bootjdk explicitely set by command line arguments?
24293 
24294   if test "x$BOOT_JDK_FOUND" = xno; then
24295     # Now execute the test
24296 
24297   if test "x$with_boot_jdk" != x; then
24298     BOOT_JDK=$with_boot_jdk
24299     BOOT_JDK_FOUND=maybe
24300     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24301 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24302   fi
24303 
24304 
24305     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24306     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24307       # Do we have a bin/java?
24308       if test ! -x "$BOOT_JDK/bin/java"; then
24309         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24310 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24311         BOOT_JDK_FOUND=no
24312       else
24313         # Do we have a bin/javac?
24314         if test ! -x "$BOOT_JDK/bin/javac"; then
24315           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24316 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24317           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24318 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24319           BOOT_JDK_FOUND=no
24320         else
24321           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24322           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24323 
24324           # Extra M4 quote needed to protect [] in grep expression.
24325           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24326           if test "x$FOUND_CORRECT_VERSION" = x; then
24327             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24328 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24329             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24330 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24331             BOOT_JDK_FOUND=no
24332           else
24333             # We're done! :-)
24334             BOOT_JDK_FOUND=yes
24335 
24336   # Only process if variable expands to non-empty
24337 
24338   if test "x$BOOT_JDK" != x; then
24339     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24340 
24341   # Input might be given as Windows format, start by converting to
24342   # unix format.
24343   path="$BOOT_JDK"
24344   new_path=`$CYGPATH -u "$path"`
24345 
24346   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24347   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24348   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24349   # "foo.exe" is OK but "foo" is an error.
24350   #
24351   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24352   # It is also a way to make sure we got the proper file name for the real test later on.
24353   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24354   if test "x$test_shortpath" = x; then
24355     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24356 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24357     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24358   fi
24359 
24360   # Call helper function which possibly converts this using DOS-style short mode.
24361   # If so, the updated path is stored in $new_path.
24362 
24363   input_path="$new_path"
24364   # Check if we need to convert this using DOS-style short mode. If the path
24365   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24366   # take no chances and rewrite it.
24367   # Note: m4 eats our [], so we need to use [ and ] instead.
24368   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24369   if test "x$has_forbidden_chars" != x; then
24370     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24371     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24372     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24373     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24374       # Going to short mode and back again did indeed matter. Since short mode is
24375       # case insensitive, let's make it lowercase to improve readability.
24376       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24377       # Now convert it back to Unix-style (cygpath)
24378       input_path=`$CYGPATH -u "$shortmode_path"`
24379       new_path="$input_path"
24380     fi
24381   fi
24382 
24383   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24384   if test "x$test_cygdrive_prefix" = x; then
24385     # As a simple fix, exclude /usr/bin since it's not a real path.
24386     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24387       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24388       # a path prefixed by /cygdrive for fixpath to work.
24389       new_path="$CYGWIN_ROOT_PATH$input_path"
24390     fi
24391   fi
24392 
24393 
24394   if test "x$path" != "x$new_path"; then
24395     BOOT_JDK="$new_path"
24396     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24397 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24398   fi
24399 
24400     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24401 
24402   path="$BOOT_JDK"
24403   has_colon=`$ECHO $path | $GREP ^.:`
24404   new_path="$path"
24405   if test "x$has_colon" = x; then
24406     # Not in mixed or Windows style, start by that.
24407     new_path=`cmd //c echo $path`
24408   fi
24409 
24410 
24411   input_path="$new_path"
24412   # Check if we need to convert this using DOS-style short mode. If the path
24413   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24414   # take no chances and rewrite it.
24415   # Note: m4 eats our [], so we need to use [ and ] instead.
24416   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24417   if test "x$has_forbidden_chars" != x; then
24418     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24419     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24420   fi
24421 
24422 
24423   windows_path="$new_path"
24424   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24425     unix_path=`$CYGPATH -u "$windows_path"`
24426     new_path="$unix_path"
24427   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24428     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24429     new_path="$unix_path"
24430   fi
24431 
24432   if test "x$path" != "x$new_path"; then
24433     BOOT_JDK="$new_path"
24434     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24435 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24436   fi
24437 
24438   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24439   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24440 
24441     else
24442       # We're on a unix platform. Hooray! :)
24443       path="$BOOT_JDK"
24444       has_space=`$ECHO "$path" | $GREP " "`
24445       if test "x$has_space" != x; then
24446         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24447 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24448         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24449       fi
24450 
24451       # Use eval to expand a potential ~
24452       eval path="$path"
24453       if test ! -f "$path" && test ! -d "$path"; then
24454         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24455       fi
24456 
24457       if test -d "$path"; then
24458         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24459       else
24460         dir="`$DIRNAME "$path"`"
24461         base="`$BASENAME "$path"`"
24462         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24463       fi
24464     fi
24465   fi
24466 
24467             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24468 $as_echo_n "checking for Boot JDK... " >&6; }
24469             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24470 $as_echo "$BOOT_JDK" >&6; }
24471             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24472 $as_echo_n "checking Boot JDK version... " >&6; }
24473             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24474             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24475 $as_echo "$BOOT_JDK_VERSION" >&6; }
24476           fi # end check jdk version
24477         fi # end check javac
24478       fi # end check java
24479     fi # end check boot jdk found
24480   fi
24481 
24482   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24483     # Having specified an argument which is incorrect will produce an instant failure;
24484     # we should not go on looking
24485     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24486   fi
24487 
24488   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24489 
24490   if test "x$BOOT_JDK_FOUND" = xno; then
24491     # Now execute the test
24492 
24493   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24494     # First check at user selected default
24495 
24496   if test "x$BOOT_JDK_FOUND" = xno; then
24497     # Now execute the test
24498 
24499   if test -x /usr/libexec/java_home; then
24500     BOOT_JDK=`/usr/libexec/java_home `
24501     BOOT_JDK_FOUND=maybe
24502     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24503 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24504   fi
24505 
24506 
24507     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24508     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24509       # Do we have a bin/java?
24510       if test ! -x "$BOOT_JDK/bin/java"; then
24511         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24512 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24513         BOOT_JDK_FOUND=no
24514       else
24515         # Do we have a bin/javac?
24516         if test ! -x "$BOOT_JDK/bin/javac"; then
24517           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24518 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24519           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24520 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24521           BOOT_JDK_FOUND=no
24522         else
24523           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24524           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24525 
24526           # Extra M4 quote needed to protect [] in grep expression.
24527           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24528           if test "x$FOUND_CORRECT_VERSION" = x; then
24529             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24530 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24531             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24532 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24533             BOOT_JDK_FOUND=no
24534           else
24535             # We're done! :-)
24536             BOOT_JDK_FOUND=yes
24537 
24538   # Only process if variable expands to non-empty
24539 
24540   if test "x$BOOT_JDK" != x; then
24541     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24542 
24543   # Input might be given as Windows format, start by converting to
24544   # unix format.
24545   path="$BOOT_JDK"
24546   new_path=`$CYGPATH -u "$path"`
24547 
24548   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24549   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24550   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24551   # "foo.exe" is OK but "foo" is an error.
24552   #
24553   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24554   # It is also a way to make sure we got the proper file name for the real test later on.
24555   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24556   if test "x$test_shortpath" = x; then
24557     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24558 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24559     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24560   fi
24561 
24562   # Call helper function which possibly converts this using DOS-style short mode.
24563   # If so, the updated path is stored in $new_path.
24564 
24565   input_path="$new_path"
24566   # Check if we need to convert this using DOS-style short mode. If the path
24567   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24568   # take no chances and rewrite it.
24569   # Note: m4 eats our [], so we need to use [ and ] instead.
24570   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24571   if test "x$has_forbidden_chars" != x; then
24572     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24573     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24574     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24575     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24576       # Going to short mode and back again did indeed matter. Since short mode is
24577       # case insensitive, let's make it lowercase to improve readability.
24578       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24579       # Now convert it back to Unix-style (cygpath)
24580       input_path=`$CYGPATH -u "$shortmode_path"`
24581       new_path="$input_path"
24582     fi
24583   fi
24584 
24585   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24586   if test "x$test_cygdrive_prefix" = x; then
24587     # As a simple fix, exclude /usr/bin since it's not a real path.
24588     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24589       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24590       # a path prefixed by /cygdrive for fixpath to work.
24591       new_path="$CYGWIN_ROOT_PATH$input_path"
24592     fi
24593   fi
24594 
24595 
24596   if test "x$path" != "x$new_path"; then
24597     BOOT_JDK="$new_path"
24598     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24599 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24600   fi
24601 
24602     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24603 
24604   path="$BOOT_JDK"
24605   has_colon=`$ECHO $path | $GREP ^.:`
24606   new_path="$path"
24607   if test "x$has_colon" = x; then
24608     # Not in mixed or Windows style, start by that.
24609     new_path=`cmd //c echo $path`
24610   fi
24611 
24612 
24613   input_path="$new_path"
24614   # Check if we need to convert this using DOS-style short mode. If the path
24615   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24616   # take no chances and rewrite it.
24617   # Note: m4 eats our [], so we need to use [ and ] instead.
24618   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24619   if test "x$has_forbidden_chars" != x; then
24620     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24621     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24622   fi
24623 
24624 
24625   windows_path="$new_path"
24626   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24627     unix_path=`$CYGPATH -u "$windows_path"`
24628     new_path="$unix_path"
24629   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24630     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24631     new_path="$unix_path"
24632   fi
24633 
24634   if test "x$path" != "x$new_path"; then
24635     BOOT_JDK="$new_path"
24636     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24637 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24638   fi
24639 
24640   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24641   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24642 
24643     else
24644       # We're on a unix platform. Hooray! :)
24645       path="$BOOT_JDK"
24646       has_space=`$ECHO "$path" | $GREP " "`
24647       if test "x$has_space" != x; then
24648         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24649 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24650         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24651       fi
24652 
24653       # Use eval to expand a potential ~
24654       eval path="$path"
24655       if test ! -f "$path" && test ! -d "$path"; then
24656         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24657       fi
24658 
24659       if test -d "$path"; then
24660         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24661       else
24662         dir="`$DIRNAME "$path"`"
24663         base="`$BASENAME "$path"`"
24664         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24665       fi
24666     fi
24667   fi
24668 
24669             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24670 $as_echo_n "checking for Boot JDK... " >&6; }
24671             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24672 $as_echo "$BOOT_JDK" >&6; }
24673             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24674 $as_echo_n "checking Boot JDK version... " >&6; }
24675             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24676             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24677 $as_echo "$BOOT_JDK_VERSION" >&6; }
24678           fi # end check jdk version
24679         fi # end check javac
24680       fi # end check java
24681     fi # end check boot jdk found
24682   fi
24683 
24684     # If that did not work out (e.g. too old), try explicit versions instead
24685 
24686   if test "x$BOOT_JDK_FOUND" = xno; then
24687     # Now execute the test
24688 
24689   if test -x /usr/libexec/java_home; then
24690     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24691     BOOT_JDK_FOUND=maybe
24692     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24693 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24694   fi
24695 
24696 
24697     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24698     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24699       # Do we have a bin/java?
24700       if test ! -x "$BOOT_JDK/bin/java"; then
24701         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24702 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24703         BOOT_JDK_FOUND=no
24704       else
24705         # Do we have a bin/javac?
24706         if test ! -x "$BOOT_JDK/bin/javac"; then
24707           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24708 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24709           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24710 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24711           BOOT_JDK_FOUND=no
24712         else
24713           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24714           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24715 
24716           # Extra M4 quote needed to protect [] in grep expression.
24717           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24718           if test "x$FOUND_CORRECT_VERSION" = x; then
24719             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24720 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24721             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24722 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24723             BOOT_JDK_FOUND=no
24724           else
24725             # We're done! :-)
24726             BOOT_JDK_FOUND=yes
24727 
24728   # Only process if variable expands to non-empty
24729 
24730   if test "x$BOOT_JDK" != x; then
24731     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24732 
24733   # Input might be given as Windows format, start by converting to
24734   # unix format.
24735   path="$BOOT_JDK"
24736   new_path=`$CYGPATH -u "$path"`
24737 
24738   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24739   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24740   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24741   # "foo.exe" is OK but "foo" is an error.
24742   #
24743   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24744   # It is also a way to make sure we got the proper file name for the real test later on.
24745   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24746   if test "x$test_shortpath" = x; then
24747     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24748 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24749     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24750   fi
24751 
24752   # Call helper function which possibly converts this using DOS-style short mode.
24753   # If so, the updated path is stored in $new_path.
24754 
24755   input_path="$new_path"
24756   # Check if we need to convert this using DOS-style short mode. If the path
24757   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24758   # take no chances and rewrite it.
24759   # Note: m4 eats our [], so we need to use [ and ] instead.
24760   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24761   if test "x$has_forbidden_chars" != x; then
24762     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24763     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24764     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24765     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24766       # Going to short mode and back again did indeed matter. Since short mode is
24767       # case insensitive, let's make it lowercase to improve readability.
24768       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24769       # Now convert it back to Unix-style (cygpath)
24770       input_path=`$CYGPATH -u "$shortmode_path"`
24771       new_path="$input_path"
24772     fi
24773   fi
24774 
24775   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24776   if test "x$test_cygdrive_prefix" = x; then
24777     # As a simple fix, exclude /usr/bin since it's not a real path.
24778     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24779       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24780       # a path prefixed by /cygdrive for fixpath to work.
24781       new_path="$CYGWIN_ROOT_PATH$input_path"
24782     fi
24783   fi
24784 
24785 
24786   if test "x$path" != "x$new_path"; then
24787     BOOT_JDK="$new_path"
24788     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24789 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24790   fi
24791 
24792     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24793 
24794   path="$BOOT_JDK"
24795   has_colon=`$ECHO $path | $GREP ^.:`
24796   new_path="$path"
24797   if test "x$has_colon" = x; then
24798     # Not in mixed or Windows style, start by that.
24799     new_path=`cmd //c echo $path`
24800   fi
24801 
24802 
24803   input_path="$new_path"
24804   # Check if we need to convert this using DOS-style short mode. If the path
24805   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24806   # take no chances and rewrite it.
24807   # Note: m4 eats our [], so we need to use [ and ] instead.
24808   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24809   if test "x$has_forbidden_chars" != x; then
24810     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24811     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24812   fi
24813 
24814 
24815   windows_path="$new_path"
24816   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24817     unix_path=`$CYGPATH -u "$windows_path"`
24818     new_path="$unix_path"
24819   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24820     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24821     new_path="$unix_path"
24822   fi
24823 
24824   if test "x$path" != "x$new_path"; then
24825     BOOT_JDK="$new_path"
24826     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24827 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24828   fi
24829 
24830   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24831   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24832 
24833     else
24834       # We're on a unix platform. Hooray! :)
24835       path="$BOOT_JDK"
24836       has_space=`$ECHO "$path" | $GREP " "`
24837       if test "x$has_space" != x; then
24838         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24839 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24840         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24841       fi
24842 
24843       # Use eval to expand a potential ~
24844       eval path="$path"
24845       if test ! -f "$path" && test ! -d "$path"; then
24846         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24847       fi
24848 
24849       if test -d "$path"; then
24850         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24851       else
24852         dir="`$DIRNAME "$path"`"
24853         base="`$BASENAME "$path"`"
24854         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24855       fi
24856     fi
24857   fi
24858 
24859             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24860 $as_echo_n "checking for Boot JDK... " >&6; }
24861             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24862 $as_echo "$BOOT_JDK" >&6; }
24863             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24864 $as_echo_n "checking Boot JDK version... " >&6; }
24865             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24866             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24867 $as_echo "$BOOT_JDK_VERSION" >&6; }
24868           fi # end check jdk version
24869         fi # end check javac
24870       fi # end check java
24871     fi # end check boot jdk found
24872   fi
24873 
24874 
24875   if test "x$BOOT_JDK_FOUND" = xno; then
24876     # Now execute the test
24877 
24878   if test -x /usr/libexec/java_home; then
24879     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24880     BOOT_JDK_FOUND=maybe
24881     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24882 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24883   fi
24884 
24885 
24886     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24887     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24888       # Do we have a bin/java?
24889       if test ! -x "$BOOT_JDK/bin/java"; then
24890         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24891 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24892         BOOT_JDK_FOUND=no
24893       else
24894         # Do we have a bin/javac?
24895         if test ! -x "$BOOT_JDK/bin/javac"; then
24896           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24897 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24898           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24899 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24900           BOOT_JDK_FOUND=no
24901         else
24902           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24903           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24904 
24905           # Extra M4 quote needed to protect [] in grep expression.
24906           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24907           if test "x$FOUND_CORRECT_VERSION" = x; then
24908             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24909 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24910             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24911 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24912             BOOT_JDK_FOUND=no
24913           else
24914             # We're done! :-)
24915             BOOT_JDK_FOUND=yes
24916 
24917   # Only process if variable expands to non-empty
24918 
24919   if test "x$BOOT_JDK" != x; then
24920     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24921 
24922   # Input might be given as Windows format, start by converting to
24923   # unix format.
24924   path="$BOOT_JDK"
24925   new_path=`$CYGPATH -u "$path"`
24926 
24927   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24928   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24929   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24930   # "foo.exe" is OK but "foo" is an error.
24931   #
24932   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24933   # It is also a way to make sure we got the proper file name for the real test later on.
24934   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24935   if test "x$test_shortpath" = x; then
24936     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24937 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24938     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24939   fi
24940 
24941   # Call helper function which possibly converts this using DOS-style short mode.
24942   # If so, the updated path is stored in $new_path.
24943 
24944   input_path="$new_path"
24945   # Check if we need to convert this using DOS-style short mode. If the path
24946   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24947   # take no chances and rewrite it.
24948   # Note: m4 eats our [], so we need to use [ and ] instead.
24949   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24950   if test "x$has_forbidden_chars" != x; then
24951     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24952     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24953     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24954     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24955       # Going to short mode and back again did indeed matter. Since short mode is
24956       # case insensitive, let's make it lowercase to improve readability.
24957       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24958       # Now convert it back to Unix-style (cygpath)
24959       input_path=`$CYGPATH -u "$shortmode_path"`
24960       new_path="$input_path"
24961     fi
24962   fi
24963 
24964   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24965   if test "x$test_cygdrive_prefix" = x; then
24966     # As a simple fix, exclude /usr/bin since it's not a real path.
24967     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24968       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24969       # a path prefixed by /cygdrive for fixpath to work.
24970       new_path="$CYGWIN_ROOT_PATH$input_path"
24971     fi
24972   fi
24973 
24974 
24975   if test "x$path" != "x$new_path"; then
24976     BOOT_JDK="$new_path"
24977     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24978 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24979   fi
24980 
24981     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24982 
24983   path="$BOOT_JDK"
24984   has_colon=`$ECHO $path | $GREP ^.:`
24985   new_path="$path"
24986   if test "x$has_colon" = x; then
24987     # Not in mixed or Windows style, start by that.
24988     new_path=`cmd //c echo $path`
24989   fi
24990 
24991 
24992   input_path="$new_path"
24993   # Check if we need to convert this using DOS-style short mode. If the path
24994   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24995   # take no chances and rewrite it.
24996   # Note: m4 eats our [], so we need to use [ and ] instead.
24997   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24998   if test "x$has_forbidden_chars" != x; then
24999     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25000     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25001   fi
25002 
25003 
25004   windows_path="$new_path"
25005   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25006     unix_path=`$CYGPATH -u "$windows_path"`
25007     new_path="$unix_path"
25008   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25009     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25010     new_path="$unix_path"
25011   fi
25012 
25013   if test "x$path" != "x$new_path"; then
25014     BOOT_JDK="$new_path"
25015     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25016 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25017   fi
25018 
25019   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25020   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25021 
25022     else
25023       # We're on a unix platform. Hooray! :)
25024       path="$BOOT_JDK"
25025       has_space=`$ECHO "$path" | $GREP " "`
25026       if test "x$has_space" != x; then
25027         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25028 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25029         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25030       fi
25031 
25032       # Use eval to expand a potential ~
25033       eval path="$path"
25034       if test ! -f "$path" && test ! -d "$path"; then
25035         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25036       fi
25037 
25038       if test -d "$path"; then
25039         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25040       else
25041         dir="`$DIRNAME "$path"`"
25042         base="`$BASENAME "$path"`"
25043         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25044       fi
25045     fi
25046   fi
25047 
25048             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25049 $as_echo_n "checking for Boot JDK... " >&6; }
25050             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25051 $as_echo "$BOOT_JDK" >&6; }
25052             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25053 $as_echo_n "checking Boot JDK version... " >&6; }
25054             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25055             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25056 $as_echo "$BOOT_JDK_VERSION" >&6; }
25057           fi # end check jdk version
25058         fi # end check javac
25059       fi # end check java
25060     fi # end check boot jdk found
25061   fi
25062 
25063 
25064   if test "x$BOOT_JDK_FOUND" = xno; then
25065     # Now execute the test
25066 
25067   if test -x /usr/libexec/java_home; then
25068     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25069     BOOT_JDK_FOUND=maybe
25070     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25071 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25072   fi
25073 
25074 
25075     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25076     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25077       # Do we have a bin/java?
25078       if test ! -x "$BOOT_JDK/bin/java"; then
25079         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25080 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25081         BOOT_JDK_FOUND=no
25082       else
25083         # Do we have a bin/javac?
25084         if test ! -x "$BOOT_JDK/bin/javac"; then
25085           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25086 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25087           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25088 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25089           BOOT_JDK_FOUND=no
25090         else
25091           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25092           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25093 
25094           # Extra M4 quote needed to protect [] in grep expression.
25095           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25096           if test "x$FOUND_CORRECT_VERSION" = x; then
25097             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25098 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25099             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25100 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25101             BOOT_JDK_FOUND=no
25102           else
25103             # We're done! :-)
25104             BOOT_JDK_FOUND=yes
25105 
25106   # Only process if variable expands to non-empty
25107 
25108   if test "x$BOOT_JDK" != x; then
25109     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25110 
25111   # Input might be given as Windows format, start by converting to
25112   # unix format.
25113   path="$BOOT_JDK"
25114   new_path=`$CYGPATH -u "$path"`
25115 
25116   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25117   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25118   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25119   # "foo.exe" is OK but "foo" is an error.
25120   #
25121   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25122   # It is also a way to make sure we got the proper file name for the real test later on.
25123   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25124   if test "x$test_shortpath" = x; then
25125     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25126 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25127     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25128   fi
25129 
25130   # Call helper function which possibly converts this using DOS-style short mode.
25131   # If so, the updated path is stored in $new_path.
25132 
25133   input_path="$new_path"
25134   # Check if we need to convert this using DOS-style short mode. If the path
25135   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25136   # take no chances and rewrite it.
25137   # Note: m4 eats our [], so we need to use [ and ] instead.
25138   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25139   if test "x$has_forbidden_chars" != x; then
25140     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25141     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25142     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25143     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25144       # Going to short mode and back again did indeed matter. Since short mode is
25145       # case insensitive, let's make it lowercase to improve readability.
25146       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25147       # Now convert it back to Unix-style (cygpath)
25148       input_path=`$CYGPATH -u "$shortmode_path"`
25149       new_path="$input_path"
25150     fi
25151   fi
25152 
25153   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25154   if test "x$test_cygdrive_prefix" = x; then
25155     # As a simple fix, exclude /usr/bin since it's not a real path.
25156     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25157       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25158       # a path prefixed by /cygdrive for fixpath to work.
25159       new_path="$CYGWIN_ROOT_PATH$input_path"
25160     fi
25161   fi
25162 
25163 
25164   if test "x$path" != "x$new_path"; then
25165     BOOT_JDK="$new_path"
25166     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25167 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25168   fi
25169 
25170     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25171 
25172   path="$BOOT_JDK"
25173   has_colon=`$ECHO $path | $GREP ^.:`
25174   new_path="$path"
25175   if test "x$has_colon" = x; then
25176     # Not in mixed or Windows style, start by that.
25177     new_path=`cmd //c echo $path`
25178   fi
25179 
25180 
25181   input_path="$new_path"
25182   # Check if we need to convert this using DOS-style short mode. If the path
25183   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25184   # take no chances and rewrite it.
25185   # Note: m4 eats our [], so we need to use [ and ] instead.
25186   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25187   if test "x$has_forbidden_chars" != x; then
25188     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25189     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25190   fi
25191 
25192 
25193   windows_path="$new_path"
25194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25195     unix_path=`$CYGPATH -u "$windows_path"`
25196     new_path="$unix_path"
25197   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25198     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25199     new_path="$unix_path"
25200   fi
25201 
25202   if test "x$path" != "x$new_path"; then
25203     BOOT_JDK="$new_path"
25204     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25205 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25206   fi
25207 
25208   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25209   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25210 
25211     else
25212       # We're on a unix platform. Hooray! :)
25213       path="$BOOT_JDK"
25214       has_space=`$ECHO "$path" | $GREP " "`
25215       if test "x$has_space" != x; then
25216         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25217 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25218         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25219       fi
25220 
25221       # Use eval to expand a potential ~
25222       eval path="$path"
25223       if test ! -f "$path" && test ! -d "$path"; then
25224         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25225       fi
25226 
25227       if test -d "$path"; then
25228         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25229       else
25230         dir="`$DIRNAME "$path"`"
25231         base="`$BASENAME "$path"`"
25232         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25233       fi
25234     fi
25235   fi
25236 
25237             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25238 $as_echo_n "checking for Boot JDK... " >&6; }
25239             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25240 $as_echo "$BOOT_JDK" >&6; }
25241             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25242 $as_echo_n "checking Boot JDK version... " >&6; }
25243             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25244             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25245 $as_echo "$BOOT_JDK_VERSION" >&6; }
25246           fi # end check jdk version
25247         fi # end check javac
25248       fi # end check java
25249     fi # end check boot jdk found
25250   fi
25251 
25252   fi
25253 
25254 
25255     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25256     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25257       # Do we have a bin/java?
25258       if test ! -x "$BOOT_JDK/bin/java"; then
25259         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25260 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25261         BOOT_JDK_FOUND=no
25262       else
25263         # Do we have a bin/javac?
25264         if test ! -x "$BOOT_JDK/bin/javac"; then
25265           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25266 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25267           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25268 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25269           BOOT_JDK_FOUND=no
25270         else
25271           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25272           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25273 
25274           # Extra M4 quote needed to protect [] in grep expression.
25275           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25276           if test "x$FOUND_CORRECT_VERSION" = x; then
25277             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25278 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25279             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25280 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25281             BOOT_JDK_FOUND=no
25282           else
25283             # We're done! :-)
25284             BOOT_JDK_FOUND=yes
25285 
25286   # Only process if variable expands to non-empty
25287 
25288   if test "x$BOOT_JDK" != x; then
25289     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25290 
25291   # Input might be given as Windows format, start by converting to
25292   # unix format.
25293   path="$BOOT_JDK"
25294   new_path=`$CYGPATH -u "$path"`
25295 
25296   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25297   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25298   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25299   # "foo.exe" is OK but "foo" is an error.
25300   #
25301   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25302   # It is also a way to make sure we got the proper file name for the real test later on.
25303   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25304   if test "x$test_shortpath" = x; then
25305     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25306 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25307     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25308   fi
25309 
25310   # Call helper function which possibly converts this using DOS-style short mode.
25311   # If so, the updated path is stored in $new_path.
25312 
25313   input_path="$new_path"
25314   # Check if we need to convert this using DOS-style short mode. If the path
25315   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25316   # take no chances and rewrite it.
25317   # Note: m4 eats our [], so we need to use [ and ] instead.
25318   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25319   if test "x$has_forbidden_chars" != x; then
25320     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25321     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25322     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25323     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25324       # Going to short mode and back again did indeed matter. Since short mode is
25325       # case insensitive, let's make it lowercase to improve readability.
25326       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25327       # Now convert it back to Unix-style (cygpath)
25328       input_path=`$CYGPATH -u "$shortmode_path"`
25329       new_path="$input_path"
25330     fi
25331   fi
25332 
25333   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25334   if test "x$test_cygdrive_prefix" = x; then
25335     # As a simple fix, exclude /usr/bin since it's not a real path.
25336     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25337       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25338       # a path prefixed by /cygdrive for fixpath to work.
25339       new_path="$CYGWIN_ROOT_PATH$input_path"
25340     fi
25341   fi
25342 
25343 
25344   if test "x$path" != "x$new_path"; then
25345     BOOT_JDK="$new_path"
25346     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25347 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25348   fi
25349 
25350     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25351 
25352   path="$BOOT_JDK"
25353   has_colon=`$ECHO $path | $GREP ^.:`
25354   new_path="$path"
25355   if test "x$has_colon" = x; then
25356     # Not in mixed or Windows style, start by that.
25357     new_path=`cmd //c echo $path`
25358   fi
25359 
25360 
25361   input_path="$new_path"
25362   # Check if we need to convert this using DOS-style short mode. If the path
25363   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25364   # take no chances and rewrite it.
25365   # Note: m4 eats our [], so we need to use [ and ] instead.
25366   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25367   if test "x$has_forbidden_chars" != x; then
25368     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25369     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25370   fi
25371 
25372 
25373   windows_path="$new_path"
25374   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25375     unix_path=`$CYGPATH -u "$windows_path"`
25376     new_path="$unix_path"
25377   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25378     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25379     new_path="$unix_path"
25380   fi
25381 
25382   if test "x$path" != "x$new_path"; then
25383     BOOT_JDK="$new_path"
25384     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25385 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25386   fi
25387 
25388   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25389   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25390 
25391     else
25392       # We're on a unix platform. Hooray! :)
25393       path="$BOOT_JDK"
25394       has_space=`$ECHO "$path" | $GREP " "`
25395       if test "x$has_space" != x; then
25396         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25397 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25398         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25399       fi
25400 
25401       # Use eval to expand a potential ~
25402       eval path="$path"
25403       if test ! -f "$path" && test ! -d "$path"; then
25404         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25405       fi
25406 
25407       if test -d "$path"; then
25408         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25409       else
25410         dir="`$DIRNAME "$path"`"
25411         base="`$BASENAME "$path"`"
25412         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25413       fi
25414     fi
25415   fi
25416 
25417             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25418 $as_echo_n "checking for Boot JDK... " >&6; }
25419             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25420 $as_echo "$BOOT_JDK" >&6; }
25421             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25422 $as_echo_n "checking Boot JDK version... " >&6; }
25423             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25424             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25425 $as_echo "$BOOT_JDK_VERSION" >&6; }
25426           fi # end check jdk version
25427         fi # end check javac
25428       fi # end check java
25429     fi # end check boot jdk found
25430   fi
25431 
25432 
25433   # Test: Is $JAVA_HOME set?
25434 
25435   if test "x$BOOT_JDK_FOUND" = xno; then
25436     # Now execute the test
25437 
25438   if test "x$JAVA_HOME" != x; then
25439     JAVA_HOME_PROCESSED="$JAVA_HOME"
25440 
25441   # Only process if variable expands to non-empty
25442 
25443   if test "x$JAVA_HOME_PROCESSED" != x; then
25444     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25445 
25446   # Input might be given as Windows format, start by converting to
25447   # unix format.
25448   path="$JAVA_HOME_PROCESSED"
25449   new_path=`$CYGPATH -u "$path"`
25450 
25451   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25452   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25453   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25454   # "foo.exe" is OK but "foo" is an error.
25455   #
25456   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25457   # It is also a way to make sure we got the proper file name for the real test later on.
25458   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25459   if test "x$test_shortpath" = x; then
25460     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25461 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25462     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25463   fi
25464 
25465   # Call helper function which possibly converts this using DOS-style short mode.
25466   # If so, the updated path is stored in $new_path.
25467 
25468   input_path="$new_path"
25469   # Check if we need to convert this using DOS-style short mode. If the path
25470   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25471   # take no chances and rewrite it.
25472   # Note: m4 eats our [], so we need to use [ and ] instead.
25473   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25474   if test "x$has_forbidden_chars" != x; then
25475     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25476     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25477     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25478     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25479       # Going to short mode and back again did indeed matter. Since short mode is
25480       # case insensitive, let's make it lowercase to improve readability.
25481       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25482       # Now convert it back to Unix-style (cygpath)
25483       input_path=`$CYGPATH -u "$shortmode_path"`
25484       new_path="$input_path"
25485     fi
25486   fi
25487 
25488   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25489   if test "x$test_cygdrive_prefix" = x; then
25490     # As a simple fix, exclude /usr/bin since it's not a real path.
25491     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25492       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25493       # a path prefixed by /cygdrive for fixpath to work.
25494       new_path="$CYGWIN_ROOT_PATH$input_path"
25495     fi
25496   fi
25497 
25498 
25499   if test "x$path" != "x$new_path"; then
25500     JAVA_HOME_PROCESSED="$new_path"
25501     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25502 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25503   fi
25504 
25505     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25506 
25507   path="$JAVA_HOME_PROCESSED"
25508   has_colon=`$ECHO $path | $GREP ^.:`
25509   new_path="$path"
25510   if test "x$has_colon" = x; then
25511     # Not in mixed or Windows style, start by that.
25512     new_path=`cmd //c echo $path`
25513   fi
25514 
25515 
25516   input_path="$new_path"
25517   # Check if we need to convert this using DOS-style short mode. If the path
25518   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25519   # take no chances and rewrite it.
25520   # Note: m4 eats our [], so we need to use [ and ] instead.
25521   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25522   if test "x$has_forbidden_chars" != x; then
25523     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25524     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25525   fi
25526 
25527 
25528   windows_path="$new_path"
25529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25530     unix_path=`$CYGPATH -u "$windows_path"`
25531     new_path="$unix_path"
25532   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25533     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25534     new_path="$unix_path"
25535   fi
25536 
25537   if test "x$path" != "x$new_path"; then
25538     JAVA_HOME_PROCESSED="$new_path"
25539     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25540 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25541   fi
25542 
25543   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25544   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25545 
25546     else
25547       # We're on a unix platform. Hooray! :)
25548       path="$JAVA_HOME_PROCESSED"
25549       has_space=`$ECHO "$path" | $GREP " "`
25550       if test "x$has_space" != x; then
25551         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25552 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25553         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25554       fi
25555 
25556       # Use eval to expand a potential ~
25557       eval path="$path"
25558       if test ! -f "$path" && test ! -d "$path"; then
25559         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25560       fi
25561 
25562       if test -d "$path"; then
25563         JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25564       else
25565         dir="`$DIRNAME "$path"`"
25566         base="`$BASENAME "$path"`"
25567         JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25568       fi
25569     fi
25570   fi
25571 
25572     if test ! -d "$JAVA_HOME_PROCESSED"; then
25573       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25574 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25575     else
25576       # Aha, the user has set a JAVA_HOME
25577       # let us use that as the Boot JDK.
25578       BOOT_JDK="$JAVA_HOME_PROCESSED"
25579       BOOT_JDK_FOUND=maybe
25580       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25581 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25582     fi
25583   fi
25584 
25585 
25586     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25587     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25588       # Do we have a bin/java?
25589       if test ! -x "$BOOT_JDK/bin/java"; then
25590         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25591 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25592         BOOT_JDK_FOUND=no
25593       else
25594         # Do we have a bin/javac?
25595         if test ! -x "$BOOT_JDK/bin/javac"; then
25596           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25597 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25598           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25599 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25600           BOOT_JDK_FOUND=no
25601         else
25602           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25603           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25604 
25605           # Extra M4 quote needed to protect [] in grep expression.
25606           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25607           if test "x$FOUND_CORRECT_VERSION" = x; then
25608             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25609 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25610             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25611 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25612             BOOT_JDK_FOUND=no
25613           else
25614             # We're done! :-)
25615             BOOT_JDK_FOUND=yes
25616 
25617   # Only process if variable expands to non-empty
25618 
25619   if test "x$BOOT_JDK" != x; then
25620     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25621 
25622   # Input might be given as Windows format, start by converting to
25623   # unix format.
25624   path="$BOOT_JDK"
25625   new_path=`$CYGPATH -u "$path"`
25626 
25627   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25628   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25629   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25630   # "foo.exe" is OK but "foo" is an error.
25631   #
25632   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25633   # It is also a way to make sure we got the proper file name for the real test later on.
25634   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25635   if test "x$test_shortpath" = x; then
25636     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25637 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25638     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25639   fi
25640 
25641   # Call helper function which possibly converts this using DOS-style short mode.
25642   # If so, the updated path is stored in $new_path.
25643 
25644   input_path="$new_path"
25645   # Check if we need to convert this using DOS-style short mode. If the path
25646   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25647   # take no chances and rewrite it.
25648   # Note: m4 eats our [], so we need to use [ and ] instead.
25649   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25650   if test "x$has_forbidden_chars" != x; then
25651     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25652     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25653     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25654     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25655       # Going to short mode and back again did indeed matter. Since short mode is
25656       # case insensitive, let's make it lowercase to improve readability.
25657       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25658       # Now convert it back to Unix-style (cygpath)
25659       input_path=`$CYGPATH -u "$shortmode_path"`
25660       new_path="$input_path"
25661     fi
25662   fi
25663 
25664   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25665   if test "x$test_cygdrive_prefix" = x; then
25666     # As a simple fix, exclude /usr/bin since it's not a real path.
25667     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25668       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25669       # a path prefixed by /cygdrive for fixpath to work.
25670       new_path="$CYGWIN_ROOT_PATH$input_path"
25671     fi
25672   fi
25673 
25674 
25675   if test "x$path" != "x$new_path"; then
25676     BOOT_JDK="$new_path"
25677     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25678 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25679   fi
25680 
25681     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25682 
25683   path="$BOOT_JDK"
25684   has_colon=`$ECHO $path | $GREP ^.:`
25685   new_path="$path"
25686   if test "x$has_colon" = x; then
25687     # Not in mixed or Windows style, start by that.
25688     new_path=`cmd //c echo $path`
25689   fi
25690 
25691 
25692   input_path="$new_path"
25693   # Check if we need to convert this using DOS-style short mode. If the path
25694   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25695   # take no chances and rewrite it.
25696   # Note: m4 eats our [], so we need to use [ and ] instead.
25697   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25698   if test "x$has_forbidden_chars" != x; then
25699     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25700     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25701   fi
25702 
25703 
25704   windows_path="$new_path"
25705   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25706     unix_path=`$CYGPATH -u "$windows_path"`
25707     new_path="$unix_path"
25708   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25709     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25710     new_path="$unix_path"
25711   fi
25712 
25713   if test "x$path" != "x$new_path"; then
25714     BOOT_JDK="$new_path"
25715     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25716 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25717   fi
25718 
25719   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25720   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25721 
25722     else
25723       # We're on a unix platform. Hooray! :)
25724       path="$BOOT_JDK"
25725       has_space=`$ECHO "$path" | $GREP " "`
25726       if test "x$has_space" != x; then
25727         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25728 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25729         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25730       fi
25731 
25732       # Use eval to expand a potential ~
25733       eval path="$path"
25734       if test ! -f "$path" && test ! -d "$path"; then
25735         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25736       fi
25737 
25738       if test -d "$path"; then
25739         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25740       else
25741         dir="`$DIRNAME "$path"`"
25742         base="`$BASENAME "$path"`"
25743         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25744       fi
25745     fi
25746   fi
25747 
25748             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25749 $as_echo_n "checking for Boot JDK... " >&6; }
25750             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25751 $as_echo "$BOOT_JDK" >&6; }
25752             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25753 $as_echo_n "checking Boot JDK version... " >&6; }
25754             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25755             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25756 $as_echo "$BOOT_JDK_VERSION" >&6; }
25757           fi # end check jdk version
25758         fi # end check javac
25759       fi # end check java
25760     fi # end check boot jdk found
25761   fi
25762 
25763 
25764   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25765 
25766   if test "x$BOOT_JDK_FOUND" = xno; then
25767     # Now execute the test
25768 
25769   # Extract the first word of "javac", so it can be a program name with args.
25770 set dummy javac; ac_word=$2
25771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25772 $as_echo_n "checking for $ac_word... " >&6; }
25773 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25774   $as_echo_n "(cached) " >&6
25775 else
25776   case $JAVAC_CHECK in
25777   [\\/]* | ?:[\\/]*)
25778   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25779   ;;
25780   *)
25781   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25782 for as_dir in $PATH
25783 do
25784   IFS=$as_save_IFS
25785   test -z "$as_dir" && as_dir=.
25786     for ac_exec_ext in '' $ac_executable_extensions; do
25787   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25788     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25789     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25790     break 2
25791   fi
25792 done
25793   done
25794 IFS=$as_save_IFS
25795 
25796   ;;
25797 esac
25798 fi
25799 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25800 if test -n "$JAVAC_CHECK"; then
25801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25802 $as_echo "$JAVAC_CHECK" >&6; }
25803 else
25804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25805 $as_echo "no" >&6; }
25806 fi
25807 
25808 
25809   # Extract the first word of "java", so it can be a program name with args.
25810 set dummy java; ac_word=$2
25811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25812 $as_echo_n "checking for $ac_word... " >&6; }
25813 if ${ac_cv_path_JAVA_CHECK+:} false; then :
25814   $as_echo_n "(cached) " >&6
25815 else
25816   case $JAVA_CHECK in
25817   [\\/]* | ?:[\\/]*)
25818   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25819   ;;
25820   *)
25821   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25822 for as_dir in $PATH
25823 do
25824   IFS=$as_save_IFS
25825   test -z "$as_dir" && as_dir=.
25826     for ac_exec_ext in '' $ac_executable_extensions; do
25827   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25828     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25829     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25830     break 2
25831   fi
25832 done
25833   done
25834 IFS=$as_save_IFS
25835 
25836   ;;
25837 esac
25838 fi
25839 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25840 if test -n "$JAVA_CHECK"; then
25841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25842 $as_echo "$JAVA_CHECK" >&6; }
25843 else
25844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25845 $as_echo "no" >&6; }
25846 fi
25847 
25848 
25849   BINARY="$JAVAC_CHECK"
25850   if test "x$JAVAC_CHECK" = x; then
25851     BINARY="$JAVA_CHECK"
25852   fi
25853   if test "x$BINARY" != x; then
25854     # So there is a java(c) binary, it might be part of a JDK.
25855     # Lets find the JDK/JRE directory by following symbolic links.
25856     # Linux/GNU systems often have links from /usr/bin/java to
25857     # /etc/alternatives/java to the real JDK binary.
25858 
25859   if test "x$OPENJDK_BUILD_OS" != xwindows; then
25860     # Follow a chain of symbolic links. Use readlink
25861     # where it exists, else fall back to horribly
25862     # complicated shell code.
25863     if test "x$READLINK_TESTED" != yes; then
25864       # On MacOSX there is a readlink tool with a different
25865       # purpose than the GNU readlink tool. Check the found readlink.
25866       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25867       if test "x$ISGNU" = x; then
25868         # A readlink that we do not know how to use.
25869         # Are there other non-GNU readlinks out there?
25870         READLINK_TESTED=yes
25871         READLINK=
25872       fi
25873     fi
25874 
25875     if test "x$READLINK" != x; then
25876       BINARY=`$READLINK -f $BINARY`
25877     else
25878       # Save the current directory for restoring afterwards
25879       STARTDIR=$PWD
25880       COUNTER=0
25881       sym_link_dir=`$DIRNAME $BINARY`
25882       sym_link_file=`$BASENAME $BINARY`
25883       cd $sym_link_dir
25884       # Use -P flag to resolve symlinks in directories.
25885       cd `$THEPWDCMD -P`
25886       sym_link_dir=`$THEPWDCMD -P`
25887       # Resolve file symlinks
25888       while test $COUNTER -lt 20; do
25889         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25890         if test "x$ISLINK" == x; then
25891           # This is not a symbolic link! We are done!
25892           break
25893         fi
25894         # Again resolve directory symlinks since the target of the just found
25895         # link could be in a different directory
25896         cd `$DIRNAME $ISLINK`
25897         sym_link_dir=`$THEPWDCMD -P`
25898         sym_link_file=`$BASENAME $ISLINK`
25899         let COUNTER=COUNTER+1
25900       done
25901       cd $STARTDIR
25902       BINARY=$sym_link_dir/$sym_link_file
25903     fi
25904   fi
25905 
25906     BOOT_JDK=`dirname "$BINARY"`
25907     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25908     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25909       # Looks like we found ourselves an JDK
25910       BOOT_JDK_FOUND=maybe
25911       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25912 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25913     fi
25914   fi
25915 
25916 
25917     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25918     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25919       # Do we have a bin/java?
25920       if test ! -x "$BOOT_JDK/bin/java"; then
25921         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25922 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25923         BOOT_JDK_FOUND=no
25924       else
25925         # Do we have a bin/javac?
25926         if test ! -x "$BOOT_JDK/bin/javac"; then
25927           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25928 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25929           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25930 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25931           BOOT_JDK_FOUND=no
25932         else
25933           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25934           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25935 
25936           # Extra M4 quote needed to protect [] in grep expression.
25937           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25938           if test "x$FOUND_CORRECT_VERSION" = x; then
25939             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25940 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25941             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25942 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25943             BOOT_JDK_FOUND=no
25944           else
25945             # We're done! :-)
25946             BOOT_JDK_FOUND=yes
25947 
25948   # Only process if variable expands to non-empty
25949 
25950   if test "x$BOOT_JDK" != x; then
25951     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25952 
25953   # Input might be given as Windows format, start by converting to
25954   # unix format.
25955   path="$BOOT_JDK"
25956   new_path=`$CYGPATH -u "$path"`
25957 
25958   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25959   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25960   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25961   # "foo.exe" is OK but "foo" is an error.
25962   #
25963   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25964   # It is also a way to make sure we got the proper file name for the real test later on.
25965   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25966   if test "x$test_shortpath" = x; then
25967     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25968 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25969     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25970   fi
25971 
25972   # Call helper function which possibly converts this using DOS-style short mode.
25973   # If so, the updated path is stored in $new_path.
25974 
25975   input_path="$new_path"
25976   # Check if we need to convert this using DOS-style short mode. If the path
25977   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25978   # take no chances and rewrite it.
25979   # Note: m4 eats our [], so we need to use [ and ] instead.
25980   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25981   if test "x$has_forbidden_chars" != x; then
25982     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25983     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25984     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25985     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25986       # Going to short mode and back again did indeed matter. Since short mode is
25987       # case insensitive, let's make it lowercase to improve readability.
25988       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25989       # Now convert it back to Unix-style (cygpath)
25990       input_path=`$CYGPATH -u "$shortmode_path"`
25991       new_path="$input_path"
25992     fi
25993   fi
25994 
25995   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25996   if test "x$test_cygdrive_prefix" = x; then
25997     # As a simple fix, exclude /usr/bin since it's not a real path.
25998     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25999       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26000       # a path prefixed by /cygdrive for fixpath to work.
26001       new_path="$CYGWIN_ROOT_PATH$input_path"
26002     fi
26003   fi
26004 
26005 
26006   if test "x$path" != "x$new_path"; then
26007     BOOT_JDK="$new_path"
26008     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26009 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26010   fi
26011 
26012     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26013 
26014   path="$BOOT_JDK"
26015   has_colon=`$ECHO $path | $GREP ^.:`
26016   new_path="$path"
26017   if test "x$has_colon" = x; then
26018     # Not in mixed or Windows style, start by that.
26019     new_path=`cmd //c echo $path`
26020   fi
26021 
26022 
26023   input_path="$new_path"
26024   # Check if we need to convert this using DOS-style short mode. If the path
26025   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26026   # take no chances and rewrite it.
26027   # Note: m4 eats our [], so we need to use [ and ] instead.
26028   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26029   if test "x$has_forbidden_chars" != x; then
26030     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26031     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26032   fi
26033 
26034 
26035   windows_path="$new_path"
26036   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26037     unix_path=`$CYGPATH -u "$windows_path"`
26038     new_path="$unix_path"
26039   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26040     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26041     new_path="$unix_path"
26042   fi
26043 
26044   if test "x$path" != "x$new_path"; then
26045     BOOT_JDK="$new_path"
26046     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26047 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26048   fi
26049 
26050   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26051   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26052 
26053     else
26054       # We're on a unix platform. Hooray! :)
26055       path="$BOOT_JDK"
26056       has_space=`$ECHO "$path" | $GREP " "`
26057       if test "x$has_space" != x; then
26058         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26059 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26060         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26061       fi
26062 
26063       # Use eval to expand a potential ~
26064       eval path="$path"
26065       if test ! -f "$path" && test ! -d "$path"; then
26066         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26067       fi
26068 
26069       if test -d "$path"; then
26070         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26071       else
26072         dir="`$DIRNAME "$path"`"
26073         base="`$BASENAME "$path"`"
26074         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26075       fi
26076     fi
26077   fi
26078 
26079             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26080 $as_echo_n "checking for Boot JDK... " >&6; }
26081             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26082 $as_echo "$BOOT_JDK" >&6; }
26083             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26084 $as_echo_n "checking Boot JDK version... " >&6; }
26085             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26086             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26087 $as_echo "$BOOT_JDK_VERSION" >&6; }
26088           fi # end check jdk version
26089         fi # end check javac
26090       fi # end check java
26091     fi # end check boot jdk found
26092   fi
26093 
26094 
26095   # Test: Is there a JDK installed in default, well-known locations?
26096 
26097   if test "x$BOOT_JDK_FOUND" = xno; then
26098     # Now execute the test
26099 
26100   if test "x$OPENJDK_TARGET_OS" = xwindows; then
26101 
26102   if test "x$BOOT_JDK_FOUND" = xno; then
26103     # Now execute the test
26104 
26105   if test "x$ProgramW6432" != x; then
26106     VIRTUAL_DIR="$ProgramW6432/Java"
26107 
26108   windows_path="$VIRTUAL_DIR"
26109   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26110     unix_path=`$CYGPATH -u "$windows_path"`
26111     VIRTUAL_DIR="$unix_path"
26112   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26113     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26114     VIRTUAL_DIR="$unix_path"
26115   fi
26116 
26117 
26118   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26119   BOOT_JDK_SUFFIX=""
26120   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26121   if test "x$ALL_JDKS_FOUND" != x; then
26122     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26123 
26124   if test "x$BOOT_JDK_FOUND" = xno; then
26125     # Now execute the test
26126 
26127         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26128         if test -d "$BOOT_JDK"; then
26129           BOOT_JDK_FOUND=maybe
26130           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26131 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26132         fi
26133 
26134 
26135     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26136     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26137       # Do we have a bin/java?
26138       if test ! -x "$BOOT_JDK/bin/java"; then
26139         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26140 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26141         BOOT_JDK_FOUND=no
26142       else
26143         # Do we have a bin/javac?
26144         if test ! -x "$BOOT_JDK/bin/javac"; then
26145           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26146 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26147           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26148 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26149           BOOT_JDK_FOUND=no
26150         else
26151           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26152           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26153 
26154           # Extra M4 quote needed to protect [] in grep expression.
26155           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26156           if test "x$FOUND_CORRECT_VERSION" = x; then
26157             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26158 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26159             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26160 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26161             BOOT_JDK_FOUND=no
26162           else
26163             # We're done! :-)
26164             BOOT_JDK_FOUND=yes
26165 
26166   # Only process if variable expands to non-empty
26167 
26168   if test "x$BOOT_JDK" != x; then
26169     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26170 
26171   # Input might be given as Windows format, start by converting to
26172   # unix format.
26173   path="$BOOT_JDK"
26174   new_path=`$CYGPATH -u "$path"`
26175 
26176   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26177   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26178   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26179   # "foo.exe" is OK but "foo" is an error.
26180   #
26181   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26182   # It is also a way to make sure we got the proper file name for the real test later on.
26183   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26184   if test "x$test_shortpath" = x; then
26185     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26186 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26187     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26188   fi
26189 
26190   # Call helper function which possibly converts this using DOS-style short mode.
26191   # If so, the updated path is stored in $new_path.
26192 
26193   input_path="$new_path"
26194   # Check if we need to convert this using DOS-style short mode. If the path
26195   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26196   # take no chances and rewrite it.
26197   # Note: m4 eats our [], so we need to use [ and ] instead.
26198   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26199   if test "x$has_forbidden_chars" != x; then
26200     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26201     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26202     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26203     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26204       # Going to short mode and back again did indeed matter. Since short mode is
26205       # case insensitive, let's make it lowercase to improve readability.
26206       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26207       # Now convert it back to Unix-style (cygpath)
26208       input_path=`$CYGPATH -u "$shortmode_path"`
26209       new_path="$input_path"
26210     fi
26211   fi
26212 
26213   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26214   if test "x$test_cygdrive_prefix" = x; then
26215     # As a simple fix, exclude /usr/bin since it's not a real path.
26216     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26217       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26218       # a path prefixed by /cygdrive for fixpath to work.
26219       new_path="$CYGWIN_ROOT_PATH$input_path"
26220     fi
26221   fi
26222 
26223 
26224   if test "x$path" != "x$new_path"; then
26225     BOOT_JDK="$new_path"
26226     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26227 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26228   fi
26229 
26230     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26231 
26232   path="$BOOT_JDK"
26233   has_colon=`$ECHO $path | $GREP ^.:`
26234   new_path="$path"
26235   if test "x$has_colon" = x; then
26236     # Not in mixed or Windows style, start by that.
26237     new_path=`cmd //c echo $path`
26238   fi
26239 
26240 
26241   input_path="$new_path"
26242   # Check if we need to convert this using DOS-style short mode. If the path
26243   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26244   # take no chances and rewrite it.
26245   # Note: m4 eats our [], so we need to use [ and ] instead.
26246   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26247   if test "x$has_forbidden_chars" != x; then
26248     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26249     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26250   fi
26251 
26252 
26253   windows_path="$new_path"
26254   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26255     unix_path=`$CYGPATH -u "$windows_path"`
26256     new_path="$unix_path"
26257   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26258     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26259     new_path="$unix_path"
26260   fi
26261 
26262   if test "x$path" != "x$new_path"; then
26263     BOOT_JDK="$new_path"
26264     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26265 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26266   fi
26267 
26268   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26269   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26270 
26271     else
26272       # We're on a unix platform. Hooray! :)
26273       path="$BOOT_JDK"
26274       has_space=`$ECHO "$path" | $GREP " "`
26275       if test "x$has_space" != x; then
26276         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26277 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26278         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26279       fi
26280 
26281       # Use eval to expand a potential ~
26282       eval path="$path"
26283       if test ! -f "$path" && test ! -d "$path"; then
26284         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26285       fi
26286 
26287       if test -d "$path"; then
26288         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26289       else
26290         dir="`$DIRNAME "$path"`"
26291         base="`$BASENAME "$path"`"
26292         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26293       fi
26294     fi
26295   fi
26296 
26297             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26298 $as_echo_n "checking for Boot JDK... " >&6; }
26299             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26300 $as_echo "$BOOT_JDK" >&6; }
26301             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26302 $as_echo_n "checking Boot JDK version... " >&6; }
26303             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26304             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26305 $as_echo "$BOOT_JDK_VERSION" >&6; }
26306           fi # end check jdk version
26307         fi # end check javac
26308       fi # end check java
26309     fi # end check boot jdk found
26310   fi
26311 
26312     done
26313   fi
26314 
26315   fi
26316 
26317 
26318     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26319     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26320       # Do we have a bin/java?
26321       if test ! -x "$BOOT_JDK/bin/java"; then
26322         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26323 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26324         BOOT_JDK_FOUND=no
26325       else
26326         # Do we have a bin/javac?
26327         if test ! -x "$BOOT_JDK/bin/javac"; then
26328           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26329 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26330           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26331 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26332           BOOT_JDK_FOUND=no
26333         else
26334           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26335           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26336 
26337           # Extra M4 quote needed to protect [] in grep expression.
26338           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26339           if test "x$FOUND_CORRECT_VERSION" = x; then
26340             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26341 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26342             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26343 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26344             BOOT_JDK_FOUND=no
26345           else
26346             # We're done! :-)
26347             BOOT_JDK_FOUND=yes
26348 
26349   # Only process if variable expands to non-empty
26350 
26351   if test "x$BOOT_JDK" != x; then
26352     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26353 
26354   # Input might be given as Windows format, start by converting to
26355   # unix format.
26356   path="$BOOT_JDK"
26357   new_path=`$CYGPATH -u "$path"`
26358 
26359   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26360   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26361   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26362   # "foo.exe" is OK but "foo" is an error.
26363   #
26364   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26365   # It is also a way to make sure we got the proper file name for the real test later on.
26366   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26367   if test "x$test_shortpath" = x; then
26368     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26369 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26370     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26371   fi
26372 
26373   # Call helper function which possibly converts this using DOS-style short mode.
26374   # If so, the updated path is stored in $new_path.
26375 
26376   input_path="$new_path"
26377   # Check if we need to convert this using DOS-style short mode. If the path
26378   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26379   # take no chances and rewrite it.
26380   # Note: m4 eats our [], so we need to use [ and ] instead.
26381   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26382   if test "x$has_forbidden_chars" != x; then
26383     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26384     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26385     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26386     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26387       # Going to short mode and back again did indeed matter. Since short mode is
26388       # case insensitive, let's make it lowercase to improve readability.
26389       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26390       # Now convert it back to Unix-style (cygpath)
26391       input_path=`$CYGPATH -u "$shortmode_path"`
26392       new_path="$input_path"
26393     fi
26394   fi
26395 
26396   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26397   if test "x$test_cygdrive_prefix" = x; then
26398     # As a simple fix, exclude /usr/bin since it's not a real path.
26399     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26400       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26401       # a path prefixed by /cygdrive for fixpath to work.
26402       new_path="$CYGWIN_ROOT_PATH$input_path"
26403     fi
26404   fi
26405 
26406 
26407   if test "x$path" != "x$new_path"; then
26408     BOOT_JDK="$new_path"
26409     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26410 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26411   fi
26412 
26413     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26414 
26415   path="$BOOT_JDK"
26416   has_colon=`$ECHO $path | $GREP ^.:`
26417   new_path="$path"
26418   if test "x$has_colon" = x; then
26419     # Not in mixed or Windows style, start by that.
26420     new_path=`cmd //c echo $path`
26421   fi
26422 
26423 
26424   input_path="$new_path"
26425   # Check if we need to convert this using DOS-style short mode. If the path
26426   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26427   # take no chances and rewrite it.
26428   # Note: m4 eats our [], so we need to use [ and ] instead.
26429   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26430   if test "x$has_forbidden_chars" != x; then
26431     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26432     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26433   fi
26434 
26435 
26436   windows_path="$new_path"
26437   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26438     unix_path=`$CYGPATH -u "$windows_path"`
26439     new_path="$unix_path"
26440   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26441     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26442     new_path="$unix_path"
26443   fi
26444 
26445   if test "x$path" != "x$new_path"; then
26446     BOOT_JDK="$new_path"
26447     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26448 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26449   fi
26450 
26451   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26452   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26453 
26454     else
26455       # We're on a unix platform. Hooray! :)
26456       path="$BOOT_JDK"
26457       has_space=`$ECHO "$path" | $GREP " "`
26458       if test "x$has_space" != x; then
26459         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26460 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26461         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26462       fi
26463 
26464       # Use eval to expand a potential ~
26465       eval path="$path"
26466       if test ! -f "$path" && test ! -d "$path"; then
26467         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26468       fi
26469 
26470       if test -d "$path"; then
26471         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26472       else
26473         dir="`$DIRNAME "$path"`"
26474         base="`$BASENAME "$path"`"
26475         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26476       fi
26477     fi
26478   fi
26479 
26480             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26481 $as_echo_n "checking for Boot JDK... " >&6; }
26482             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26483 $as_echo "$BOOT_JDK" >&6; }
26484             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26485 $as_echo_n "checking Boot JDK version... " >&6; }
26486             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26487             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26488 $as_echo "$BOOT_JDK_VERSION" >&6; }
26489           fi # end check jdk version
26490         fi # end check javac
26491       fi # end check java
26492     fi # end check boot jdk found
26493   fi
26494 
26495 
26496   if test "x$BOOT_JDK_FOUND" = xno; then
26497     # Now execute the test
26498 
26499   if test "x$PROGRAMW6432" != x; then
26500     VIRTUAL_DIR="$PROGRAMW6432/Java"
26501 
26502   windows_path="$VIRTUAL_DIR"
26503   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26504     unix_path=`$CYGPATH -u "$windows_path"`
26505     VIRTUAL_DIR="$unix_path"
26506   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26507     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26508     VIRTUAL_DIR="$unix_path"
26509   fi
26510 
26511 
26512   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26513   BOOT_JDK_SUFFIX=""
26514   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26515   if test "x$ALL_JDKS_FOUND" != x; then
26516     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26517 
26518   if test "x$BOOT_JDK_FOUND" = xno; then
26519     # Now execute the test
26520 
26521         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26522         if test -d "$BOOT_JDK"; then
26523           BOOT_JDK_FOUND=maybe
26524           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26525 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26526         fi
26527 
26528 
26529     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26530     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26531       # Do we have a bin/java?
26532       if test ! -x "$BOOT_JDK/bin/java"; then
26533         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26534 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26535         BOOT_JDK_FOUND=no
26536       else
26537         # Do we have a bin/javac?
26538         if test ! -x "$BOOT_JDK/bin/javac"; then
26539           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26540 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26541           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26542 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26543           BOOT_JDK_FOUND=no
26544         else
26545           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26546           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26547 
26548           # Extra M4 quote needed to protect [] in grep expression.
26549           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26550           if test "x$FOUND_CORRECT_VERSION" = x; then
26551             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26552 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26553             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26554 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26555             BOOT_JDK_FOUND=no
26556           else
26557             # We're done! :-)
26558             BOOT_JDK_FOUND=yes
26559 
26560   # Only process if variable expands to non-empty
26561 
26562   if test "x$BOOT_JDK" != x; then
26563     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26564 
26565   # Input might be given as Windows format, start by converting to
26566   # unix format.
26567   path="$BOOT_JDK"
26568   new_path=`$CYGPATH -u "$path"`
26569 
26570   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26571   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26572   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26573   # "foo.exe" is OK but "foo" is an error.
26574   #
26575   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26576   # It is also a way to make sure we got the proper file name for the real test later on.
26577   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26578   if test "x$test_shortpath" = x; then
26579     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26580 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26581     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26582   fi
26583 
26584   # Call helper function which possibly converts this using DOS-style short mode.
26585   # If so, the updated path is stored in $new_path.
26586 
26587   input_path="$new_path"
26588   # Check if we need to convert this using DOS-style short mode. If the path
26589   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26590   # take no chances and rewrite it.
26591   # Note: m4 eats our [], so we need to use [ and ] instead.
26592   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26593   if test "x$has_forbidden_chars" != x; then
26594     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26595     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26596     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26597     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26598       # Going to short mode and back again did indeed matter. Since short mode is
26599       # case insensitive, let's make it lowercase to improve readability.
26600       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26601       # Now convert it back to Unix-style (cygpath)
26602       input_path=`$CYGPATH -u "$shortmode_path"`
26603       new_path="$input_path"
26604     fi
26605   fi
26606 
26607   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26608   if test "x$test_cygdrive_prefix" = x; then
26609     # As a simple fix, exclude /usr/bin since it's not a real path.
26610     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26611       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26612       # a path prefixed by /cygdrive for fixpath to work.
26613       new_path="$CYGWIN_ROOT_PATH$input_path"
26614     fi
26615   fi
26616 
26617 
26618   if test "x$path" != "x$new_path"; then
26619     BOOT_JDK="$new_path"
26620     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26621 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26622   fi
26623 
26624     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26625 
26626   path="$BOOT_JDK"
26627   has_colon=`$ECHO $path | $GREP ^.:`
26628   new_path="$path"
26629   if test "x$has_colon" = x; then
26630     # Not in mixed or Windows style, start by that.
26631     new_path=`cmd //c echo $path`
26632   fi
26633 
26634 
26635   input_path="$new_path"
26636   # Check if we need to convert this using DOS-style short mode. If the path
26637   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26638   # take no chances and rewrite it.
26639   # Note: m4 eats our [], so we need to use [ and ] instead.
26640   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26641   if test "x$has_forbidden_chars" != x; then
26642     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26643     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26644   fi
26645 
26646 
26647   windows_path="$new_path"
26648   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26649     unix_path=`$CYGPATH -u "$windows_path"`
26650     new_path="$unix_path"
26651   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26652     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26653     new_path="$unix_path"
26654   fi
26655 
26656   if test "x$path" != "x$new_path"; then
26657     BOOT_JDK="$new_path"
26658     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26659 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26660   fi
26661 
26662   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26663   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26664 
26665     else
26666       # We're on a unix platform. Hooray! :)
26667       path="$BOOT_JDK"
26668       has_space=`$ECHO "$path" | $GREP " "`
26669       if test "x$has_space" != x; then
26670         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26671 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26672         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26673       fi
26674 
26675       # Use eval to expand a potential ~
26676       eval path="$path"
26677       if test ! -f "$path" && test ! -d "$path"; then
26678         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26679       fi
26680 
26681       if test -d "$path"; then
26682         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26683       else
26684         dir="`$DIRNAME "$path"`"
26685         base="`$BASENAME "$path"`"
26686         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26687       fi
26688     fi
26689   fi
26690 
26691             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26692 $as_echo_n "checking for Boot JDK... " >&6; }
26693             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26694 $as_echo "$BOOT_JDK" >&6; }
26695             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26696 $as_echo_n "checking Boot JDK version... " >&6; }
26697             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26698             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26699 $as_echo "$BOOT_JDK_VERSION" >&6; }
26700           fi # end check jdk version
26701         fi # end check javac
26702       fi # end check java
26703     fi # end check boot jdk found
26704   fi
26705 
26706     done
26707   fi
26708 
26709   fi
26710 
26711 
26712     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26713     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26714       # Do we have a bin/java?
26715       if test ! -x "$BOOT_JDK/bin/java"; then
26716         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26717 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26718         BOOT_JDK_FOUND=no
26719       else
26720         # Do we have a bin/javac?
26721         if test ! -x "$BOOT_JDK/bin/javac"; then
26722           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26723 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26724           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26725 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26726           BOOT_JDK_FOUND=no
26727         else
26728           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26729           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26730 
26731           # Extra M4 quote needed to protect [] in grep expression.
26732           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26733           if test "x$FOUND_CORRECT_VERSION" = x; then
26734             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26735 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26736             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26737 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26738             BOOT_JDK_FOUND=no
26739           else
26740             # We're done! :-)
26741             BOOT_JDK_FOUND=yes
26742 
26743   # Only process if variable expands to non-empty
26744 
26745   if test "x$BOOT_JDK" != x; then
26746     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26747 
26748   # Input might be given as Windows format, start by converting to
26749   # unix format.
26750   path="$BOOT_JDK"
26751   new_path=`$CYGPATH -u "$path"`
26752 
26753   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26754   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26755   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26756   # "foo.exe" is OK but "foo" is an error.
26757   #
26758   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26759   # It is also a way to make sure we got the proper file name for the real test later on.
26760   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26761   if test "x$test_shortpath" = x; then
26762     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26763 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26764     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26765   fi
26766 
26767   # Call helper function which possibly converts this using DOS-style short mode.
26768   # If so, the updated path is stored in $new_path.
26769 
26770   input_path="$new_path"
26771   # Check if we need to convert this using DOS-style short mode. If the path
26772   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26773   # take no chances and rewrite it.
26774   # Note: m4 eats our [], so we need to use [ and ] instead.
26775   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26776   if test "x$has_forbidden_chars" != x; then
26777     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26778     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26779     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26780     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26781       # Going to short mode and back again did indeed matter. Since short mode is
26782       # case insensitive, let's make it lowercase to improve readability.
26783       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26784       # Now convert it back to Unix-style (cygpath)
26785       input_path=`$CYGPATH -u "$shortmode_path"`
26786       new_path="$input_path"
26787     fi
26788   fi
26789 
26790   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26791   if test "x$test_cygdrive_prefix" = x; then
26792     # As a simple fix, exclude /usr/bin since it's not a real path.
26793     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26794       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26795       # a path prefixed by /cygdrive for fixpath to work.
26796       new_path="$CYGWIN_ROOT_PATH$input_path"
26797     fi
26798   fi
26799 
26800 
26801   if test "x$path" != "x$new_path"; then
26802     BOOT_JDK="$new_path"
26803     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26804 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26805   fi
26806 
26807     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26808 
26809   path="$BOOT_JDK"
26810   has_colon=`$ECHO $path | $GREP ^.:`
26811   new_path="$path"
26812   if test "x$has_colon" = x; then
26813     # Not in mixed or Windows style, start by that.
26814     new_path=`cmd //c echo $path`
26815   fi
26816 
26817 
26818   input_path="$new_path"
26819   # Check if we need to convert this using DOS-style short mode. If the path
26820   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26821   # take no chances and rewrite it.
26822   # Note: m4 eats our [], so we need to use [ and ] instead.
26823   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26824   if test "x$has_forbidden_chars" != x; then
26825     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26826     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26827   fi
26828 
26829 
26830   windows_path="$new_path"
26831   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26832     unix_path=`$CYGPATH -u "$windows_path"`
26833     new_path="$unix_path"
26834   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26835     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26836     new_path="$unix_path"
26837   fi
26838 
26839   if test "x$path" != "x$new_path"; then
26840     BOOT_JDK="$new_path"
26841     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26842 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26843   fi
26844 
26845   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26846   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26847 
26848     else
26849       # We're on a unix platform. Hooray! :)
26850       path="$BOOT_JDK"
26851       has_space=`$ECHO "$path" | $GREP " "`
26852       if test "x$has_space" != x; then
26853         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26854 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26855         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26856       fi
26857 
26858       # Use eval to expand a potential ~
26859       eval path="$path"
26860       if test ! -f "$path" && test ! -d "$path"; then
26861         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26862       fi
26863 
26864       if test -d "$path"; then
26865         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26866       else
26867         dir="`$DIRNAME "$path"`"
26868         base="`$BASENAME "$path"`"
26869         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26870       fi
26871     fi
26872   fi
26873 
26874             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26875 $as_echo_n "checking for Boot JDK... " >&6; }
26876             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26877 $as_echo "$BOOT_JDK" >&6; }
26878             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26879 $as_echo_n "checking Boot JDK version... " >&6; }
26880             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26881             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26882 $as_echo "$BOOT_JDK_VERSION" >&6; }
26883           fi # end check jdk version
26884         fi # end check javac
26885       fi # end check java
26886     fi # end check boot jdk found
26887   fi
26888 
26889 
26890   if test "x$BOOT_JDK_FOUND" = xno; then
26891     # Now execute the test
26892 
26893   if test "x$PROGRAMFILES" != x; then
26894     VIRTUAL_DIR="$PROGRAMFILES/Java"
26895 
26896   windows_path="$VIRTUAL_DIR"
26897   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26898     unix_path=`$CYGPATH -u "$windows_path"`
26899     VIRTUAL_DIR="$unix_path"
26900   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26901     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26902     VIRTUAL_DIR="$unix_path"
26903   fi
26904 
26905 
26906   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26907   BOOT_JDK_SUFFIX=""
26908   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26909   if test "x$ALL_JDKS_FOUND" != x; then
26910     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26911 
26912   if test "x$BOOT_JDK_FOUND" = xno; then
26913     # Now execute the test
26914 
26915         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26916         if test -d "$BOOT_JDK"; then
26917           BOOT_JDK_FOUND=maybe
26918           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26919 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26920         fi
26921 
26922 
26923     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26924     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26925       # Do we have a bin/java?
26926       if test ! -x "$BOOT_JDK/bin/java"; then
26927         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26928 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26929         BOOT_JDK_FOUND=no
26930       else
26931         # Do we have a bin/javac?
26932         if test ! -x "$BOOT_JDK/bin/javac"; then
26933           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26934 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26935           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26936 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26937           BOOT_JDK_FOUND=no
26938         else
26939           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26940           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26941 
26942           # Extra M4 quote needed to protect [] in grep expression.
26943           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26944           if test "x$FOUND_CORRECT_VERSION" = x; then
26945             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26946 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26947             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26948 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26949             BOOT_JDK_FOUND=no
26950           else
26951             # We're done! :-)
26952             BOOT_JDK_FOUND=yes
26953 
26954   # Only process if variable expands to non-empty
26955 
26956   if test "x$BOOT_JDK" != x; then
26957     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26958 
26959   # Input might be given as Windows format, start by converting to
26960   # unix format.
26961   path="$BOOT_JDK"
26962   new_path=`$CYGPATH -u "$path"`
26963 
26964   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26965   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26966   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26967   # "foo.exe" is OK but "foo" is an error.
26968   #
26969   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26970   # It is also a way to make sure we got the proper file name for the real test later on.
26971   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26972   if test "x$test_shortpath" = x; then
26973     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26974 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26975     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26976   fi
26977 
26978   # Call helper function which possibly converts this using DOS-style short mode.
26979   # If so, the updated path is stored in $new_path.
26980 
26981   input_path="$new_path"
26982   # Check if we need to convert this using DOS-style short mode. If the path
26983   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26984   # take no chances and rewrite it.
26985   # Note: m4 eats our [], so we need to use [ and ] instead.
26986   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26987   if test "x$has_forbidden_chars" != x; then
26988     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26989     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26990     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26991     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26992       # Going to short mode and back again did indeed matter. Since short mode is
26993       # case insensitive, let's make it lowercase to improve readability.
26994       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26995       # Now convert it back to Unix-style (cygpath)
26996       input_path=`$CYGPATH -u "$shortmode_path"`
26997       new_path="$input_path"
26998     fi
26999   fi
27000 
27001   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27002   if test "x$test_cygdrive_prefix" = x; then
27003     # As a simple fix, exclude /usr/bin since it's not a real path.
27004     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27005       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27006       # a path prefixed by /cygdrive for fixpath to work.
27007       new_path="$CYGWIN_ROOT_PATH$input_path"
27008     fi
27009   fi
27010 
27011 
27012   if test "x$path" != "x$new_path"; then
27013     BOOT_JDK="$new_path"
27014     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27015 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27016   fi
27017 
27018     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27019 
27020   path="$BOOT_JDK"
27021   has_colon=`$ECHO $path | $GREP ^.:`
27022   new_path="$path"
27023   if test "x$has_colon" = x; then
27024     # Not in mixed or Windows style, start by that.
27025     new_path=`cmd //c echo $path`
27026   fi
27027 
27028 
27029   input_path="$new_path"
27030   # Check if we need to convert this using DOS-style short mode. If the path
27031   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27032   # take no chances and rewrite it.
27033   # Note: m4 eats our [], so we need to use [ and ] instead.
27034   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27035   if test "x$has_forbidden_chars" != x; then
27036     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27037     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27038   fi
27039 
27040 
27041   windows_path="$new_path"
27042   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27043     unix_path=`$CYGPATH -u "$windows_path"`
27044     new_path="$unix_path"
27045   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27046     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27047     new_path="$unix_path"
27048   fi
27049 
27050   if test "x$path" != "x$new_path"; then
27051     BOOT_JDK="$new_path"
27052     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27053 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27054   fi
27055 
27056   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27057   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27058 
27059     else
27060       # We're on a unix platform. Hooray! :)
27061       path="$BOOT_JDK"
27062       has_space=`$ECHO "$path" | $GREP " "`
27063       if test "x$has_space" != x; then
27064         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27065 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27066         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27067       fi
27068 
27069       # Use eval to expand a potential ~
27070       eval path="$path"
27071       if test ! -f "$path" && test ! -d "$path"; then
27072         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27073       fi
27074 
27075       if test -d "$path"; then
27076         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27077       else
27078         dir="`$DIRNAME "$path"`"
27079         base="`$BASENAME "$path"`"
27080         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27081       fi
27082     fi
27083   fi
27084 
27085             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27086 $as_echo_n "checking for Boot JDK... " >&6; }
27087             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27088 $as_echo "$BOOT_JDK" >&6; }
27089             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27090 $as_echo_n "checking Boot JDK version... " >&6; }
27091             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27092             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27093 $as_echo "$BOOT_JDK_VERSION" >&6; }
27094           fi # end check jdk version
27095         fi # end check javac
27096       fi # end check java
27097     fi # end check boot jdk found
27098   fi
27099 
27100     done
27101   fi
27102 
27103   fi
27104 
27105 
27106     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27107     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27108       # Do we have a bin/java?
27109       if test ! -x "$BOOT_JDK/bin/java"; then
27110         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27111 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27112         BOOT_JDK_FOUND=no
27113       else
27114         # Do we have a bin/javac?
27115         if test ! -x "$BOOT_JDK/bin/javac"; then
27116           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27117 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27118           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27119 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27120           BOOT_JDK_FOUND=no
27121         else
27122           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27123           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27124 
27125           # Extra M4 quote needed to protect [] in grep expression.
27126           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27127           if test "x$FOUND_CORRECT_VERSION" = x; then
27128             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27129 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27130             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27131 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27132             BOOT_JDK_FOUND=no
27133           else
27134             # We're done! :-)
27135             BOOT_JDK_FOUND=yes
27136 
27137   # Only process if variable expands to non-empty
27138 
27139   if test "x$BOOT_JDK" != x; then
27140     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27141 
27142   # Input might be given as Windows format, start by converting to
27143   # unix format.
27144   path="$BOOT_JDK"
27145   new_path=`$CYGPATH -u "$path"`
27146 
27147   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27148   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27149   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27150   # "foo.exe" is OK but "foo" is an error.
27151   #
27152   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27153   # It is also a way to make sure we got the proper file name for the real test later on.
27154   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27155   if test "x$test_shortpath" = x; then
27156     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27157 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27158     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27159   fi
27160 
27161   # Call helper function which possibly converts this using DOS-style short mode.
27162   # If so, the updated path is stored in $new_path.
27163 
27164   input_path="$new_path"
27165   # Check if we need to convert this using DOS-style short mode. If the path
27166   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27167   # take no chances and rewrite it.
27168   # Note: m4 eats our [], so we need to use [ and ] instead.
27169   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27170   if test "x$has_forbidden_chars" != x; then
27171     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27172     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27173     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27174     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27175       # Going to short mode and back again did indeed matter. Since short mode is
27176       # case insensitive, let's make it lowercase to improve readability.
27177       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27178       # Now convert it back to Unix-style (cygpath)
27179       input_path=`$CYGPATH -u "$shortmode_path"`
27180       new_path="$input_path"
27181     fi
27182   fi
27183 
27184   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27185   if test "x$test_cygdrive_prefix" = x; then
27186     # As a simple fix, exclude /usr/bin since it's not a real path.
27187     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27188       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27189       # a path prefixed by /cygdrive for fixpath to work.
27190       new_path="$CYGWIN_ROOT_PATH$input_path"
27191     fi
27192   fi
27193 
27194 
27195   if test "x$path" != "x$new_path"; then
27196     BOOT_JDK="$new_path"
27197     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27198 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27199   fi
27200 
27201     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27202 
27203   path="$BOOT_JDK"
27204   has_colon=`$ECHO $path | $GREP ^.:`
27205   new_path="$path"
27206   if test "x$has_colon" = x; then
27207     # Not in mixed or Windows style, start by that.
27208     new_path=`cmd //c echo $path`
27209   fi
27210 
27211 
27212   input_path="$new_path"
27213   # Check if we need to convert this using DOS-style short mode. If the path
27214   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27215   # take no chances and rewrite it.
27216   # Note: m4 eats our [], so we need to use [ and ] instead.
27217   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27218   if test "x$has_forbidden_chars" != x; then
27219     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27220     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27221   fi
27222 
27223 
27224   windows_path="$new_path"
27225   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27226     unix_path=`$CYGPATH -u "$windows_path"`
27227     new_path="$unix_path"
27228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27229     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27230     new_path="$unix_path"
27231   fi
27232 
27233   if test "x$path" != "x$new_path"; then
27234     BOOT_JDK="$new_path"
27235     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27236 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27237   fi
27238 
27239   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27240   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27241 
27242     else
27243       # We're on a unix platform. Hooray! :)
27244       path="$BOOT_JDK"
27245       has_space=`$ECHO "$path" | $GREP " "`
27246       if test "x$has_space" != x; then
27247         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27248 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27249         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27250       fi
27251 
27252       # Use eval to expand a potential ~
27253       eval path="$path"
27254       if test ! -f "$path" && test ! -d "$path"; then
27255         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27256       fi
27257 
27258       if test -d "$path"; then
27259         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27260       else
27261         dir="`$DIRNAME "$path"`"
27262         base="`$BASENAME "$path"`"
27263         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27264       fi
27265     fi
27266   fi
27267 
27268             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27269 $as_echo_n "checking for Boot JDK... " >&6; }
27270             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27271 $as_echo "$BOOT_JDK" >&6; }
27272             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27273 $as_echo_n "checking Boot JDK version... " >&6; }
27274             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27275             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27276 $as_echo "$BOOT_JDK_VERSION" >&6; }
27277           fi # end check jdk version
27278         fi # end check javac
27279       fi # end check java
27280     fi # end check boot jdk found
27281   fi
27282 
27283 
27284   if test "x$BOOT_JDK_FOUND" = xno; then
27285     # Now execute the test
27286 
27287   if test "x$ProgramFiles" != x; then
27288     VIRTUAL_DIR="$ProgramFiles/Java"
27289 
27290   windows_path="$VIRTUAL_DIR"
27291   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27292     unix_path=`$CYGPATH -u "$windows_path"`
27293     VIRTUAL_DIR="$unix_path"
27294   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27295     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27296     VIRTUAL_DIR="$unix_path"
27297   fi
27298 
27299 
27300   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27301   BOOT_JDK_SUFFIX=""
27302   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27303   if test "x$ALL_JDKS_FOUND" != x; then
27304     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27305 
27306   if test "x$BOOT_JDK_FOUND" = xno; then
27307     # Now execute the test
27308 
27309         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27310         if test -d "$BOOT_JDK"; then
27311           BOOT_JDK_FOUND=maybe
27312           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27313 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27314         fi
27315 
27316 
27317     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27318     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27319       # Do we have a bin/java?
27320       if test ! -x "$BOOT_JDK/bin/java"; then
27321         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27322 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27323         BOOT_JDK_FOUND=no
27324       else
27325         # Do we have a bin/javac?
27326         if test ! -x "$BOOT_JDK/bin/javac"; then
27327           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27328 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27329           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27330 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27331           BOOT_JDK_FOUND=no
27332         else
27333           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27334           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27335 
27336           # Extra M4 quote needed to protect [] in grep expression.
27337           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27338           if test "x$FOUND_CORRECT_VERSION" = x; then
27339             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27340 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27341             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27342 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27343             BOOT_JDK_FOUND=no
27344           else
27345             # We're done! :-)
27346             BOOT_JDK_FOUND=yes
27347 
27348   # Only process if variable expands to non-empty
27349 
27350   if test "x$BOOT_JDK" != x; then
27351     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27352 
27353   # Input might be given as Windows format, start by converting to
27354   # unix format.
27355   path="$BOOT_JDK"
27356   new_path=`$CYGPATH -u "$path"`
27357 
27358   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27359   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27360   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27361   # "foo.exe" is OK but "foo" is an error.
27362   #
27363   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27364   # It is also a way to make sure we got the proper file name for the real test later on.
27365   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27366   if test "x$test_shortpath" = x; then
27367     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27368 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27369     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27370   fi
27371 
27372   # Call helper function which possibly converts this using DOS-style short mode.
27373   # If so, the updated path is stored in $new_path.
27374 
27375   input_path="$new_path"
27376   # Check if we need to convert this using DOS-style short mode. If the path
27377   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27378   # take no chances and rewrite it.
27379   # Note: m4 eats our [], so we need to use [ and ] instead.
27380   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27381   if test "x$has_forbidden_chars" != x; then
27382     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27383     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27384     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27385     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27386       # Going to short mode and back again did indeed matter. Since short mode is
27387       # case insensitive, let's make it lowercase to improve readability.
27388       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27389       # Now convert it back to Unix-style (cygpath)
27390       input_path=`$CYGPATH -u "$shortmode_path"`
27391       new_path="$input_path"
27392     fi
27393   fi
27394 
27395   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27396   if test "x$test_cygdrive_prefix" = x; then
27397     # As a simple fix, exclude /usr/bin since it's not a real path.
27398     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27399       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27400       # a path prefixed by /cygdrive for fixpath to work.
27401       new_path="$CYGWIN_ROOT_PATH$input_path"
27402     fi
27403   fi
27404 
27405 
27406   if test "x$path" != "x$new_path"; then
27407     BOOT_JDK="$new_path"
27408     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27409 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27410   fi
27411 
27412     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27413 
27414   path="$BOOT_JDK"
27415   has_colon=`$ECHO $path | $GREP ^.:`
27416   new_path="$path"
27417   if test "x$has_colon" = x; then
27418     # Not in mixed or Windows style, start by that.
27419     new_path=`cmd //c echo $path`
27420   fi
27421 
27422 
27423   input_path="$new_path"
27424   # Check if we need to convert this using DOS-style short mode. If the path
27425   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27426   # take no chances and rewrite it.
27427   # Note: m4 eats our [], so we need to use [ and ] instead.
27428   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27429   if test "x$has_forbidden_chars" != x; then
27430     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27431     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27432   fi
27433 
27434 
27435   windows_path="$new_path"
27436   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27437     unix_path=`$CYGPATH -u "$windows_path"`
27438     new_path="$unix_path"
27439   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27440     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27441     new_path="$unix_path"
27442   fi
27443 
27444   if test "x$path" != "x$new_path"; then
27445     BOOT_JDK="$new_path"
27446     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27447 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27448   fi
27449 
27450   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27451   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27452 
27453     else
27454       # We're on a unix platform. Hooray! :)
27455       path="$BOOT_JDK"
27456       has_space=`$ECHO "$path" | $GREP " "`
27457       if test "x$has_space" != x; then
27458         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27459 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27460         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27461       fi
27462 
27463       # Use eval to expand a potential ~
27464       eval path="$path"
27465       if test ! -f "$path" && test ! -d "$path"; then
27466         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27467       fi
27468 
27469       if test -d "$path"; then
27470         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27471       else
27472         dir="`$DIRNAME "$path"`"
27473         base="`$BASENAME "$path"`"
27474         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27475       fi
27476     fi
27477   fi
27478 
27479             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27480 $as_echo_n "checking for Boot JDK... " >&6; }
27481             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27482 $as_echo "$BOOT_JDK" >&6; }
27483             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27484 $as_echo_n "checking Boot JDK version... " >&6; }
27485             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27486             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27487 $as_echo "$BOOT_JDK_VERSION" >&6; }
27488           fi # end check jdk version
27489         fi # end check javac
27490       fi # end check java
27491     fi # end check boot jdk found
27492   fi
27493 
27494     done
27495   fi
27496 
27497   fi
27498 
27499 
27500     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27501     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27502       # Do we have a bin/java?
27503       if test ! -x "$BOOT_JDK/bin/java"; then
27504         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27505 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27506         BOOT_JDK_FOUND=no
27507       else
27508         # Do we have a bin/javac?
27509         if test ! -x "$BOOT_JDK/bin/javac"; then
27510           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27511 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27512           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27513 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27514           BOOT_JDK_FOUND=no
27515         else
27516           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27517           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27518 
27519           # Extra M4 quote needed to protect [] in grep expression.
27520           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27521           if test "x$FOUND_CORRECT_VERSION" = x; then
27522             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27523 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27524             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27525 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27526             BOOT_JDK_FOUND=no
27527           else
27528             # We're done! :-)
27529             BOOT_JDK_FOUND=yes
27530 
27531   # Only process if variable expands to non-empty
27532 
27533   if test "x$BOOT_JDK" != x; then
27534     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27535 
27536   # Input might be given as Windows format, start by converting to
27537   # unix format.
27538   path="$BOOT_JDK"
27539   new_path=`$CYGPATH -u "$path"`
27540 
27541   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27542   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27543   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27544   # "foo.exe" is OK but "foo" is an error.
27545   #
27546   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27547   # It is also a way to make sure we got the proper file name for the real test later on.
27548   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27549   if test "x$test_shortpath" = x; then
27550     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27551 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27552     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27553   fi
27554 
27555   # Call helper function which possibly converts this using DOS-style short mode.
27556   # If so, the updated path is stored in $new_path.
27557 
27558   input_path="$new_path"
27559   # Check if we need to convert this using DOS-style short mode. If the path
27560   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27561   # take no chances and rewrite it.
27562   # Note: m4 eats our [], so we need to use [ and ] instead.
27563   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27564   if test "x$has_forbidden_chars" != x; then
27565     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27566     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27567     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27568     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27569       # Going to short mode and back again did indeed matter. Since short mode is
27570       # case insensitive, let's make it lowercase to improve readability.
27571       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27572       # Now convert it back to Unix-style (cygpath)
27573       input_path=`$CYGPATH -u "$shortmode_path"`
27574       new_path="$input_path"
27575     fi
27576   fi
27577 
27578   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27579   if test "x$test_cygdrive_prefix" = x; then
27580     # As a simple fix, exclude /usr/bin since it's not a real path.
27581     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27582       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27583       # a path prefixed by /cygdrive for fixpath to work.
27584       new_path="$CYGWIN_ROOT_PATH$input_path"
27585     fi
27586   fi
27587 
27588 
27589   if test "x$path" != "x$new_path"; then
27590     BOOT_JDK="$new_path"
27591     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27592 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27593   fi
27594 
27595     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27596 
27597   path="$BOOT_JDK"
27598   has_colon=`$ECHO $path | $GREP ^.:`
27599   new_path="$path"
27600   if test "x$has_colon" = x; then
27601     # Not in mixed or Windows style, start by that.
27602     new_path=`cmd //c echo $path`
27603   fi
27604 
27605 
27606   input_path="$new_path"
27607   # Check if we need to convert this using DOS-style short mode. If the path
27608   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27609   # take no chances and rewrite it.
27610   # Note: m4 eats our [], so we need to use [ and ] instead.
27611   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27612   if test "x$has_forbidden_chars" != x; then
27613     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27614     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27615   fi
27616 
27617 
27618   windows_path="$new_path"
27619   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27620     unix_path=`$CYGPATH -u "$windows_path"`
27621     new_path="$unix_path"
27622   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27623     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27624     new_path="$unix_path"
27625   fi
27626 
27627   if test "x$path" != "x$new_path"; then
27628     BOOT_JDK="$new_path"
27629     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27630 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27631   fi
27632 
27633   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27634   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27635 
27636     else
27637       # We're on a unix platform. Hooray! :)
27638       path="$BOOT_JDK"
27639       has_space=`$ECHO "$path" | $GREP " "`
27640       if test "x$has_space" != x; then
27641         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27642 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27643         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27644       fi
27645 
27646       # Use eval to expand a potential ~
27647       eval path="$path"
27648       if test ! -f "$path" && test ! -d "$path"; then
27649         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27650       fi
27651 
27652       if test -d "$path"; then
27653         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27654       else
27655         dir="`$DIRNAME "$path"`"
27656         base="`$BASENAME "$path"`"
27657         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27658       fi
27659     fi
27660   fi
27661 
27662             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27663 $as_echo_n "checking for Boot JDK... " >&6; }
27664             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27665 $as_echo "$BOOT_JDK" >&6; }
27666             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27667 $as_echo_n "checking Boot JDK version... " >&6; }
27668             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27669             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27670 $as_echo "$BOOT_JDK_VERSION" >&6; }
27671           fi # end check jdk version
27672         fi # end check javac
27673       fi # end check java
27674     fi # end check boot jdk found
27675   fi
27676 
27677 
27678   if test "x$BOOT_JDK_FOUND" = xno; then
27679     # Now execute the test
27680 
27681   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27682   BOOT_JDK_SUFFIX=""
27683   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27684   if test "x$ALL_JDKS_FOUND" != x; then
27685     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27686 
27687   if test "x$BOOT_JDK_FOUND" = xno; then
27688     # Now execute the test
27689 
27690         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27691         if test -d "$BOOT_JDK"; then
27692           BOOT_JDK_FOUND=maybe
27693           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27694 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27695         fi
27696 
27697 
27698     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27699     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27700       # Do we have a bin/java?
27701       if test ! -x "$BOOT_JDK/bin/java"; then
27702         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27703 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27704         BOOT_JDK_FOUND=no
27705       else
27706         # Do we have a bin/javac?
27707         if test ! -x "$BOOT_JDK/bin/javac"; then
27708           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27709 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27710           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27711 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27712           BOOT_JDK_FOUND=no
27713         else
27714           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27715           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27716 
27717           # Extra M4 quote needed to protect [] in grep expression.
27718           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27719           if test "x$FOUND_CORRECT_VERSION" = x; then
27720             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27721 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27722             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27723 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27724             BOOT_JDK_FOUND=no
27725           else
27726             # We're done! :-)
27727             BOOT_JDK_FOUND=yes
27728 
27729   # Only process if variable expands to non-empty
27730 
27731   if test "x$BOOT_JDK" != x; then
27732     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27733 
27734   # Input might be given as Windows format, start by converting to
27735   # unix format.
27736   path="$BOOT_JDK"
27737   new_path=`$CYGPATH -u "$path"`
27738 
27739   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27740   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27741   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27742   # "foo.exe" is OK but "foo" is an error.
27743   #
27744   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27745   # It is also a way to make sure we got the proper file name for the real test later on.
27746   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27747   if test "x$test_shortpath" = x; then
27748     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27749 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27750     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27751   fi
27752 
27753   # Call helper function which possibly converts this using DOS-style short mode.
27754   # If so, the updated path is stored in $new_path.
27755 
27756   input_path="$new_path"
27757   # Check if we need to convert this using DOS-style short mode. If the path
27758   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27759   # take no chances and rewrite it.
27760   # Note: m4 eats our [], so we need to use [ and ] instead.
27761   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27762   if test "x$has_forbidden_chars" != x; then
27763     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27764     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27765     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27766     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27767       # Going to short mode and back again did indeed matter. Since short mode is
27768       # case insensitive, let's make it lowercase to improve readability.
27769       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27770       # Now convert it back to Unix-style (cygpath)
27771       input_path=`$CYGPATH -u "$shortmode_path"`
27772       new_path="$input_path"
27773     fi
27774   fi
27775 
27776   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27777   if test "x$test_cygdrive_prefix" = x; then
27778     # As a simple fix, exclude /usr/bin since it's not a real path.
27779     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27780       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27781       # a path prefixed by /cygdrive for fixpath to work.
27782       new_path="$CYGWIN_ROOT_PATH$input_path"
27783     fi
27784   fi
27785 
27786 
27787   if test "x$path" != "x$new_path"; then
27788     BOOT_JDK="$new_path"
27789     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27790 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27791   fi
27792 
27793     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27794 
27795   path="$BOOT_JDK"
27796   has_colon=`$ECHO $path | $GREP ^.:`
27797   new_path="$path"
27798   if test "x$has_colon" = x; then
27799     # Not in mixed or Windows style, start by that.
27800     new_path=`cmd //c echo $path`
27801   fi
27802 
27803 
27804   input_path="$new_path"
27805   # Check if we need to convert this using DOS-style short mode. If the path
27806   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27807   # take no chances and rewrite it.
27808   # Note: m4 eats our [], so we need to use [ and ] instead.
27809   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27810   if test "x$has_forbidden_chars" != x; then
27811     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27812     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27813   fi
27814 
27815 
27816   windows_path="$new_path"
27817   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27818     unix_path=`$CYGPATH -u "$windows_path"`
27819     new_path="$unix_path"
27820   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27821     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27822     new_path="$unix_path"
27823   fi
27824 
27825   if test "x$path" != "x$new_path"; then
27826     BOOT_JDK="$new_path"
27827     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27828 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27829   fi
27830 
27831   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27832   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27833 
27834     else
27835       # We're on a unix platform. Hooray! :)
27836       path="$BOOT_JDK"
27837       has_space=`$ECHO "$path" | $GREP " "`
27838       if test "x$has_space" != x; then
27839         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27840 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27841         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27842       fi
27843 
27844       # Use eval to expand a potential ~
27845       eval path="$path"
27846       if test ! -f "$path" && test ! -d "$path"; then
27847         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27848       fi
27849 
27850       if test -d "$path"; then
27851         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27852       else
27853         dir="`$DIRNAME "$path"`"
27854         base="`$BASENAME "$path"`"
27855         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27856       fi
27857     fi
27858   fi
27859 
27860             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27861 $as_echo_n "checking for Boot JDK... " >&6; }
27862             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27863 $as_echo "$BOOT_JDK" >&6; }
27864             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27865 $as_echo_n "checking Boot JDK version... " >&6; }
27866             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27867             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27868 $as_echo "$BOOT_JDK_VERSION" >&6; }
27869           fi # end check jdk version
27870         fi # end check javac
27871       fi # end check java
27872     fi # end check boot jdk found
27873   fi
27874 
27875     done
27876   fi
27877 
27878 
27879     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27880     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27881       # Do we have a bin/java?
27882       if test ! -x "$BOOT_JDK/bin/java"; then
27883         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27884 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27885         BOOT_JDK_FOUND=no
27886       else
27887         # Do we have a bin/javac?
27888         if test ! -x "$BOOT_JDK/bin/javac"; then
27889           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27890 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27891           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27892 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27893           BOOT_JDK_FOUND=no
27894         else
27895           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27896           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27897 
27898           # Extra M4 quote needed to protect [] in grep expression.
27899           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27900           if test "x$FOUND_CORRECT_VERSION" = x; then
27901             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27902 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27903             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27904 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27905             BOOT_JDK_FOUND=no
27906           else
27907             # We're done! :-)
27908             BOOT_JDK_FOUND=yes
27909 
27910   # Only process if variable expands to non-empty
27911 
27912   if test "x$BOOT_JDK" != x; then
27913     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27914 
27915   # Input might be given as Windows format, start by converting to
27916   # unix format.
27917   path="$BOOT_JDK"
27918   new_path=`$CYGPATH -u "$path"`
27919 
27920   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27921   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27922   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27923   # "foo.exe" is OK but "foo" is an error.
27924   #
27925   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27926   # It is also a way to make sure we got the proper file name for the real test later on.
27927   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27928   if test "x$test_shortpath" = x; then
27929     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27930 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27931     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27932   fi
27933 
27934   # Call helper function which possibly converts this using DOS-style short mode.
27935   # If so, the updated path is stored in $new_path.
27936 
27937   input_path="$new_path"
27938   # Check if we need to convert this using DOS-style short mode. If the path
27939   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27940   # take no chances and rewrite it.
27941   # Note: m4 eats our [], so we need to use [ and ] instead.
27942   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27943   if test "x$has_forbidden_chars" != x; then
27944     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27945     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27946     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27947     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27948       # Going to short mode and back again did indeed matter. Since short mode is
27949       # case insensitive, let's make it lowercase to improve readability.
27950       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27951       # Now convert it back to Unix-style (cygpath)
27952       input_path=`$CYGPATH -u "$shortmode_path"`
27953       new_path="$input_path"
27954     fi
27955   fi
27956 
27957   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27958   if test "x$test_cygdrive_prefix" = x; then
27959     # As a simple fix, exclude /usr/bin since it's not a real path.
27960     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27961       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27962       # a path prefixed by /cygdrive for fixpath to work.
27963       new_path="$CYGWIN_ROOT_PATH$input_path"
27964     fi
27965   fi
27966 
27967 
27968   if test "x$path" != "x$new_path"; then
27969     BOOT_JDK="$new_path"
27970     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27971 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27972   fi
27973 
27974     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27975 
27976   path="$BOOT_JDK"
27977   has_colon=`$ECHO $path | $GREP ^.:`
27978   new_path="$path"
27979   if test "x$has_colon" = x; then
27980     # Not in mixed or Windows style, start by that.
27981     new_path=`cmd //c echo $path`
27982   fi
27983 
27984 
27985   input_path="$new_path"
27986   # Check if we need to convert this using DOS-style short mode. If the path
27987   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27988   # take no chances and rewrite it.
27989   # Note: m4 eats our [], so we need to use [ and ] instead.
27990   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27991   if test "x$has_forbidden_chars" != x; then
27992     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27993     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27994   fi
27995 
27996 
27997   windows_path="$new_path"
27998   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27999     unix_path=`$CYGPATH -u "$windows_path"`
28000     new_path="$unix_path"
28001   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28002     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28003     new_path="$unix_path"
28004   fi
28005 
28006   if test "x$path" != "x$new_path"; then
28007     BOOT_JDK="$new_path"
28008     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28009 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28010   fi
28011 
28012   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28013   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28014 
28015     else
28016       # We're on a unix platform. Hooray! :)
28017       path="$BOOT_JDK"
28018       has_space=`$ECHO "$path" | $GREP " "`
28019       if test "x$has_space" != x; then
28020         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28021 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28022         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28023       fi
28024 
28025       # Use eval to expand a potential ~
28026       eval path="$path"
28027       if test ! -f "$path" && test ! -d "$path"; then
28028         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28029       fi
28030 
28031       if test -d "$path"; then
28032         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28033       else
28034         dir="`$DIRNAME "$path"`"
28035         base="`$BASENAME "$path"`"
28036         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28037       fi
28038     fi
28039   fi
28040 
28041             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28042 $as_echo_n "checking for Boot JDK... " >&6; }
28043             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28044 $as_echo "$BOOT_JDK" >&6; }
28045             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28046 $as_echo_n "checking Boot JDK version... " >&6; }
28047             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28048             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28049 $as_echo "$BOOT_JDK_VERSION" >&6; }
28050           fi # end check jdk version
28051         fi # end check javac
28052       fi # end check java
28053     fi # end check boot jdk found
28054   fi
28055 
28056   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28057 
28058   if test "x$BOOT_JDK_FOUND" = xno; then
28059     # Now execute the test
28060 
28061   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28062   BOOT_JDK_SUFFIX="/Contents/Home"
28063   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28064   if test "x$ALL_JDKS_FOUND" != x; then
28065     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28066 
28067   if test "x$BOOT_JDK_FOUND" = xno; then
28068     # Now execute the test
28069 
28070         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28071         if test -d "$BOOT_JDK"; then
28072           BOOT_JDK_FOUND=maybe
28073           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28074 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28075         fi
28076 
28077 
28078     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28079     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28080       # Do we have a bin/java?
28081       if test ! -x "$BOOT_JDK/bin/java"; then
28082         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28083 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28084         BOOT_JDK_FOUND=no
28085       else
28086         # Do we have a bin/javac?
28087         if test ! -x "$BOOT_JDK/bin/javac"; then
28088           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28089 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28090           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28091 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28092           BOOT_JDK_FOUND=no
28093         else
28094           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28095           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28096 
28097           # Extra M4 quote needed to protect [] in grep expression.
28098           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28099           if test "x$FOUND_CORRECT_VERSION" = x; then
28100             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28101 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28102             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28103 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28104             BOOT_JDK_FOUND=no
28105           else
28106             # We're done! :-)
28107             BOOT_JDK_FOUND=yes
28108 
28109   # Only process if variable expands to non-empty
28110 
28111   if test "x$BOOT_JDK" != x; then
28112     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28113 
28114   # Input might be given as Windows format, start by converting to
28115   # unix format.
28116   path="$BOOT_JDK"
28117   new_path=`$CYGPATH -u "$path"`
28118 
28119   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28120   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28121   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28122   # "foo.exe" is OK but "foo" is an error.
28123   #
28124   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28125   # It is also a way to make sure we got the proper file name for the real test later on.
28126   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28127   if test "x$test_shortpath" = x; then
28128     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28129 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28130     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28131   fi
28132 
28133   # Call helper function which possibly converts this using DOS-style short mode.
28134   # If so, the updated path is stored in $new_path.
28135 
28136   input_path="$new_path"
28137   # Check if we need to convert this using DOS-style short mode. If the path
28138   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28139   # take no chances and rewrite it.
28140   # Note: m4 eats our [], so we need to use [ and ] instead.
28141   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28142   if test "x$has_forbidden_chars" != x; then
28143     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28144     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28145     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28146     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28147       # Going to short mode and back again did indeed matter. Since short mode is
28148       # case insensitive, let's make it lowercase to improve readability.
28149       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28150       # Now convert it back to Unix-style (cygpath)
28151       input_path=`$CYGPATH -u "$shortmode_path"`
28152       new_path="$input_path"
28153     fi
28154   fi
28155 
28156   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28157   if test "x$test_cygdrive_prefix" = x; then
28158     # As a simple fix, exclude /usr/bin since it's not a real path.
28159     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28160       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28161       # a path prefixed by /cygdrive for fixpath to work.
28162       new_path="$CYGWIN_ROOT_PATH$input_path"
28163     fi
28164   fi
28165 
28166 
28167   if test "x$path" != "x$new_path"; then
28168     BOOT_JDK="$new_path"
28169     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28170 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28171   fi
28172 
28173     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28174 
28175   path="$BOOT_JDK"
28176   has_colon=`$ECHO $path | $GREP ^.:`
28177   new_path="$path"
28178   if test "x$has_colon" = x; then
28179     # Not in mixed or Windows style, start by that.
28180     new_path=`cmd //c echo $path`
28181   fi
28182 
28183 
28184   input_path="$new_path"
28185   # Check if we need to convert this using DOS-style short mode. If the path
28186   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28187   # take no chances and rewrite it.
28188   # Note: m4 eats our [], so we need to use [ and ] instead.
28189   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28190   if test "x$has_forbidden_chars" != x; then
28191     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28192     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28193   fi
28194 
28195 
28196   windows_path="$new_path"
28197   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28198     unix_path=`$CYGPATH -u "$windows_path"`
28199     new_path="$unix_path"
28200   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28201     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28202     new_path="$unix_path"
28203   fi
28204 
28205   if test "x$path" != "x$new_path"; then
28206     BOOT_JDK="$new_path"
28207     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28208 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28209   fi
28210 
28211   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28212   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28213 
28214     else
28215       # We're on a unix platform. Hooray! :)
28216       path="$BOOT_JDK"
28217       has_space=`$ECHO "$path" | $GREP " "`
28218       if test "x$has_space" != x; then
28219         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28220 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28221         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28222       fi
28223 
28224       # Use eval to expand a potential ~
28225       eval path="$path"
28226       if test ! -f "$path" && test ! -d "$path"; then
28227         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28228       fi
28229 
28230       if test -d "$path"; then
28231         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28232       else
28233         dir="`$DIRNAME "$path"`"
28234         base="`$BASENAME "$path"`"
28235         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28236       fi
28237     fi
28238   fi
28239 
28240             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28241 $as_echo_n "checking for Boot JDK... " >&6; }
28242             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28243 $as_echo "$BOOT_JDK" >&6; }
28244             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28245 $as_echo_n "checking Boot JDK version... " >&6; }
28246             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28247             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28248 $as_echo "$BOOT_JDK_VERSION" >&6; }
28249           fi # end check jdk version
28250         fi # end check javac
28251       fi # end check java
28252     fi # end check boot jdk found
28253   fi
28254 
28255     done
28256   fi
28257 
28258 
28259     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28260     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28261       # Do we have a bin/java?
28262       if test ! -x "$BOOT_JDK/bin/java"; then
28263         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28264 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28265         BOOT_JDK_FOUND=no
28266       else
28267         # Do we have a bin/javac?
28268         if test ! -x "$BOOT_JDK/bin/javac"; then
28269           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28270 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28271           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28272 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28273           BOOT_JDK_FOUND=no
28274         else
28275           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28276           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28277 
28278           # Extra M4 quote needed to protect [] in grep expression.
28279           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28280           if test "x$FOUND_CORRECT_VERSION" = x; then
28281             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28282 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28283             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28284 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28285             BOOT_JDK_FOUND=no
28286           else
28287             # We're done! :-)
28288             BOOT_JDK_FOUND=yes
28289 
28290   # Only process if variable expands to non-empty
28291 
28292   if test "x$BOOT_JDK" != x; then
28293     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28294 
28295   # Input might be given as Windows format, start by converting to
28296   # unix format.
28297   path="$BOOT_JDK"
28298   new_path=`$CYGPATH -u "$path"`
28299 
28300   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28301   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28302   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28303   # "foo.exe" is OK but "foo" is an error.
28304   #
28305   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28306   # It is also a way to make sure we got the proper file name for the real test later on.
28307   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28308   if test "x$test_shortpath" = x; then
28309     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28310 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28311     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28312   fi
28313 
28314   # Call helper function which possibly converts this using DOS-style short mode.
28315   # If so, the updated path is stored in $new_path.
28316 
28317   input_path="$new_path"
28318   # Check if we need to convert this using DOS-style short mode. If the path
28319   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28320   # take no chances and rewrite it.
28321   # Note: m4 eats our [], so we need to use [ and ] instead.
28322   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28323   if test "x$has_forbidden_chars" != x; then
28324     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28325     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28326     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28327     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28328       # Going to short mode and back again did indeed matter. Since short mode is
28329       # case insensitive, let's make it lowercase to improve readability.
28330       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28331       # Now convert it back to Unix-style (cygpath)
28332       input_path=`$CYGPATH -u "$shortmode_path"`
28333       new_path="$input_path"
28334     fi
28335   fi
28336 
28337   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28338   if test "x$test_cygdrive_prefix" = x; then
28339     # As a simple fix, exclude /usr/bin since it's not a real path.
28340     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28341       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28342       # a path prefixed by /cygdrive for fixpath to work.
28343       new_path="$CYGWIN_ROOT_PATH$input_path"
28344     fi
28345   fi
28346 
28347 
28348   if test "x$path" != "x$new_path"; then
28349     BOOT_JDK="$new_path"
28350     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28351 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28352   fi
28353 
28354     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28355 
28356   path="$BOOT_JDK"
28357   has_colon=`$ECHO $path | $GREP ^.:`
28358   new_path="$path"
28359   if test "x$has_colon" = x; then
28360     # Not in mixed or Windows style, start by that.
28361     new_path=`cmd //c echo $path`
28362   fi
28363 
28364 
28365   input_path="$new_path"
28366   # Check if we need to convert this using DOS-style short mode. If the path
28367   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28368   # take no chances and rewrite it.
28369   # Note: m4 eats our [], so we need to use [ and ] instead.
28370   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28371   if test "x$has_forbidden_chars" != x; then
28372     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28373     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28374   fi
28375 
28376 
28377   windows_path="$new_path"
28378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28379     unix_path=`$CYGPATH -u "$windows_path"`
28380     new_path="$unix_path"
28381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28382     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28383     new_path="$unix_path"
28384   fi
28385 
28386   if test "x$path" != "x$new_path"; then
28387     BOOT_JDK="$new_path"
28388     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28389 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28390   fi
28391 
28392   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28393   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28394 
28395     else
28396       # We're on a unix platform. Hooray! :)
28397       path="$BOOT_JDK"
28398       has_space=`$ECHO "$path" | $GREP " "`
28399       if test "x$has_space" != x; then
28400         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28401 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28402         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28403       fi
28404 
28405       # Use eval to expand a potential ~
28406       eval path="$path"
28407       if test ! -f "$path" && test ! -d "$path"; then
28408         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28409       fi
28410 
28411       if test -d "$path"; then
28412         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28413       else
28414         dir="`$DIRNAME "$path"`"
28415         base="`$BASENAME "$path"`"
28416         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28417       fi
28418     fi
28419   fi
28420 
28421             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28422 $as_echo_n "checking for Boot JDK... " >&6; }
28423             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28424 $as_echo "$BOOT_JDK" >&6; }
28425             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28426 $as_echo_n "checking Boot JDK version... " >&6; }
28427             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28428             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28429 $as_echo "$BOOT_JDK_VERSION" >&6; }
28430           fi # end check jdk version
28431         fi # end check javac
28432       fi # end check java
28433     fi # end check boot jdk found
28434   fi
28435 
28436 
28437   if test "x$BOOT_JDK_FOUND" = xno; then
28438     # Now execute the test
28439 
28440   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28441   BOOT_JDK_SUFFIX="/Contents/Home"
28442   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28443   if test "x$ALL_JDKS_FOUND" != x; then
28444     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28445 
28446   if test "x$BOOT_JDK_FOUND" = xno; then
28447     # Now execute the test
28448 
28449         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28450         if test -d "$BOOT_JDK"; then
28451           BOOT_JDK_FOUND=maybe
28452           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28453 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28454         fi
28455 
28456 
28457     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28458     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28459       # Do we have a bin/java?
28460       if test ! -x "$BOOT_JDK/bin/java"; then
28461         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28462 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28463         BOOT_JDK_FOUND=no
28464       else
28465         # Do we have a bin/javac?
28466         if test ! -x "$BOOT_JDK/bin/javac"; then
28467           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28468 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28469           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28470 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28471           BOOT_JDK_FOUND=no
28472         else
28473           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28474           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28475 
28476           # Extra M4 quote needed to protect [] in grep expression.
28477           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28478           if test "x$FOUND_CORRECT_VERSION" = x; then
28479             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28480 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28481             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28482 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28483             BOOT_JDK_FOUND=no
28484           else
28485             # We're done! :-)
28486             BOOT_JDK_FOUND=yes
28487 
28488   # Only process if variable expands to non-empty
28489 
28490   if test "x$BOOT_JDK" != x; then
28491     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28492 
28493   # Input might be given as Windows format, start by converting to
28494   # unix format.
28495   path="$BOOT_JDK"
28496   new_path=`$CYGPATH -u "$path"`
28497 
28498   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28499   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28500   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28501   # "foo.exe" is OK but "foo" is an error.
28502   #
28503   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28504   # It is also a way to make sure we got the proper file name for the real test later on.
28505   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28506   if test "x$test_shortpath" = x; then
28507     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28508 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28509     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28510   fi
28511 
28512   # Call helper function which possibly converts this using DOS-style short mode.
28513   # If so, the updated path is stored in $new_path.
28514 
28515   input_path="$new_path"
28516   # Check if we need to convert this using DOS-style short mode. If the path
28517   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28518   # take no chances and rewrite it.
28519   # Note: m4 eats our [], so we need to use [ and ] instead.
28520   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28521   if test "x$has_forbidden_chars" != x; then
28522     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28523     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28524     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28525     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28526       # Going to short mode and back again did indeed matter. Since short mode is
28527       # case insensitive, let's make it lowercase to improve readability.
28528       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28529       # Now convert it back to Unix-style (cygpath)
28530       input_path=`$CYGPATH -u "$shortmode_path"`
28531       new_path="$input_path"
28532     fi
28533   fi
28534 
28535   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28536   if test "x$test_cygdrive_prefix" = x; then
28537     # As a simple fix, exclude /usr/bin since it's not a real path.
28538     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28539       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28540       # a path prefixed by /cygdrive for fixpath to work.
28541       new_path="$CYGWIN_ROOT_PATH$input_path"
28542     fi
28543   fi
28544 
28545 
28546   if test "x$path" != "x$new_path"; then
28547     BOOT_JDK="$new_path"
28548     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28549 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28550   fi
28551 
28552     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28553 
28554   path="$BOOT_JDK"
28555   has_colon=`$ECHO $path | $GREP ^.:`
28556   new_path="$path"
28557   if test "x$has_colon" = x; then
28558     # Not in mixed or Windows style, start by that.
28559     new_path=`cmd //c echo $path`
28560   fi
28561 
28562 
28563   input_path="$new_path"
28564   # Check if we need to convert this using DOS-style short mode. If the path
28565   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28566   # take no chances and rewrite it.
28567   # Note: m4 eats our [], so we need to use [ and ] instead.
28568   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28569   if test "x$has_forbidden_chars" != x; then
28570     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28571     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28572   fi
28573 
28574 
28575   windows_path="$new_path"
28576   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28577     unix_path=`$CYGPATH -u "$windows_path"`
28578     new_path="$unix_path"
28579   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28580     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28581     new_path="$unix_path"
28582   fi
28583 
28584   if test "x$path" != "x$new_path"; then
28585     BOOT_JDK="$new_path"
28586     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28587 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28588   fi
28589 
28590   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28591   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28592 
28593     else
28594       # We're on a unix platform. Hooray! :)
28595       path="$BOOT_JDK"
28596       has_space=`$ECHO "$path" | $GREP " "`
28597       if test "x$has_space" != x; then
28598         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28599 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28600         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28601       fi
28602 
28603       # Use eval to expand a potential ~
28604       eval path="$path"
28605       if test ! -f "$path" && test ! -d "$path"; then
28606         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28607       fi
28608 
28609       if test -d "$path"; then
28610         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28611       else
28612         dir="`$DIRNAME "$path"`"
28613         base="`$BASENAME "$path"`"
28614         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28615       fi
28616     fi
28617   fi
28618 
28619             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28620 $as_echo_n "checking for Boot JDK... " >&6; }
28621             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28622 $as_echo "$BOOT_JDK" >&6; }
28623             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28624 $as_echo_n "checking Boot JDK version... " >&6; }
28625             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28626             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28627 $as_echo "$BOOT_JDK_VERSION" >&6; }
28628           fi # end check jdk version
28629         fi # end check javac
28630       fi # end check java
28631     fi # end check boot jdk found
28632   fi
28633 
28634     done
28635   fi
28636 
28637 
28638     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28639     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28640       # Do we have a bin/java?
28641       if test ! -x "$BOOT_JDK/bin/java"; then
28642         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28643 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28644         BOOT_JDK_FOUND=no
28645       else
28646         # Do we have a bin/javac?
28647         if test ! -x "$BOOT_JDK/bin/javac"; then
28648           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28649 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28650           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28651 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28652           BOOT_JDK_FOUND=no
28653         else
28654           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28655           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28656 
28657           # Extra M4 quote needed to protect [] in grep expression.
28658           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28659           if test "x$FOUND_CORRECT_VERSION" = x; then
28660             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28661 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28662             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28663 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28664             BOOT_JDK_FOUND=no
28665           else
28666             # We're done! :-)
28667             BOOT_JDK_FOUND=yes
28668 
28669   # Only process if variable expands to non-empty
28670 
28671   if test "x$BOOT_JDK" != x; then
28672     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28673 
28674   # Input might be given as Windows format, start by converting to
28675   # unix format.
28676   path="$BOOT_JDK"
28677   new_path=`$CYGPATH -u "$path"`
28678 
28679   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28680   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28681   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28682   # "foo.exe" is OK but "foo" is an error.
28683   #
28684   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28685   # It is also a way to make sure we got the proper file name for the real test later on.
28686   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28687   if test "x$test_shortpath" = x; then
28688     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28689 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28690     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28691   fi
28692 
28693   # Call helper function which possibly converts this using DOS-style short mode.
28694   # If so, the updated path is stored in $new_path.
28695 
28696   input_path="$new_path"
28697   # Check if we need to convert this using DOS-style short mode. If the path
28698   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28699   # take no chances and rewrite it.
28700   # Note: m4 eats our [], so we need to use [ and ] instead.
28701   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28702   if test "x$has_forbidden_chars" != x; then
28703     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28704     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28705     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28706     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28707       # Going to short mode and back again did indeed matter. Since short mode is
28708       # case insensitive, let's make it lowercase to improve readability.
28709       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28710       # Now convert it back to Unix-style (cygpath)
28711       input_path=`$CYGPATH -u "$shortmode_path"`
28712       new_path="$input_path"
28713     fi
28714   fi
28715 
28716   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28717   if test "x$test_cygdrive_prefix" = x; then
28718     # As a simple fix, exclude /usr/bin since it's not a real path.
28719     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28720       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28721       # a path prefixed by /cygdrive for fixpath to work.
28722       new_path="$CYGWIN_ROOT_PATH$input_path"
28723     fi
28724   fi
28725 
28726 
28727   if test "x$path" != "x$new_path"; then
28728     BOOT_JDK="$new_path"
28729     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28730 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28731   fi
28732 
28733     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28734 
28735   path="$BOOT_JDK"
28736   has_colon=`$ECHO $path | $GREP ^.:`
28737   new_path="$path"
28738   if test "x$has_colon" = x; then
28739     # Not in mixed or Windows style, start by that.
28740     new_path=`cmd //c echo $path`
28741   fi
28742 
28743 
28744   input_path="$new_path"
28745   # Check if we need to convert this using DOS-style short mode. If the path
28746   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28747   # take no chances and rewrite it.
28748   # Note: m4 eats our [], so we need to use [ and ] instead.
28749   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28750   if test "x$has_forbidden_chars" != x; then
28751     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28752     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28753   fi
28754 
28755 
28756   windows_path="$new_path"
28757   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28758     unix_path=`$CYGPATH -u "$windows_path"`
28759     new_path="$unix_path"
28760   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28761     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28762     new_path="$unix_path"
28763   fi
28764 
28765   if test "x$path" != "x$new_path"; then
28766     BOOT_JDK="$new_path"
28767     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28768 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28769   fi
28770 
28771   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28772   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28773 
28774     else
28775       # We're on a unix platform. Hooray! :)
28776       path="$BOOT_JDK"
28777       has_space=`$ECHO "$path" | $GREP " "`
28778       if test "x$has_space" != x; then
28779         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28780 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28781         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28782       fi
28783 
28784       # Use eval to expand a potential ~
28785       eval path="$path"
28786       if test ! -f "$path" && test ! -d "$path"; then
28787         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28788       fi
28789 
28790       if test -d "$path"; then
28791         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28792       else
28793         dir="`$DIRNAME "$path"`"
28794         base="`$BASENAME "$path"`"
28795         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28796       fi
28797     fi
28798   fi
28799 
28800             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28801 $as_echo_n "checking for Boot JDK... " >&6; }
28802             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28803 $as_echo "$BOOT_JDK" >&6; }
28804             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28805 $as_echo_n "checking Boot JDK version... " >&6; }
28806             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28807             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28808 $as_echo "$BOOT_JDK_VERSION" >&6; }
28809           fi # end check jdk version
28810         fi # end check javac
28811       fi # end check java
28812     fi # end check boot jdk found
28813   fi
28814 
28815   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28816 
28817   if test "x$BOOT_JDK_FOUND" = xno; then
28818     # Now execute the test
28819 
28820   BOOT_JDK_PREFIX="/usr/lib/jvm"
28821   BOOT_JDK_SUFFIX=""
28822   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28823   if test "x$ALL_JDKS_FOUND" != x; then
28824     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28825 
28826   if test "x$BOOT_JDK_FOUND" = xno; then
28827     # Now execute the test
28828 
28829         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28830         if test -d "$BOOT_JDK"; then
28831           BOOT_JDK_FOUND=maybe
28832           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28833 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28834         fi
28835 
28836 
28837     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28838     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28839       # Do we have a bin/java?
28840       if test ! -x "$BOOT_JDK/bin/java"; then
28841         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28842 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28843         BOOT_JDK_FOUND=no
28844       else
28845         # Do we have a bin/javac?
28846         if test ! -x "$BOOT_JDK/bin/javac"; then
28847           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28848 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28849           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28850 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28851           BOOT_JDK_FOUND=no
28852         else
28853           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28854           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28855 
28856           # Extra M4 quote needed to protect [] in grep expression.
28857           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28858           if test "x$FOUND_CORRECT_VERSION" = x; then
28859             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28860 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28861             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28862 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28863             BOOT_JDK_FOUND=no
28864           else
28865             # We're done! :-)
28866             BOOT_JDK_FOUND=yes
28867 
28868   # Only process if variable expands to non-empty
28869 
28870   if test "x$BOOT_JDK" != x; then
28871     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28872 
28873   # Input might be given as Windows format, start by converting to
28874   # unix format.
28875   path="$BOOT_JDK"
28876   new_path=`$CYGPATH -u "$path"`
28877 
28878   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28879   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28880   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28881   # "foo.exe" is OK but "foo" is an error.
28882   #
28883   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28884   # It is also a way to make sure we got the proper file name for the real test later on.
28885   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28886   if test "x$test_shortpath" = x; then
28887     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28888 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28889     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28890   fi
28891 
28892   # Call helper function which possibly converts this using DOS-style short mode.
28893   # If so, the updated path is stored in $new_path.
28894 
28895   input_path="$new_path"
28896   # Check if we need to convert this using DOS-style short mode. If the path
28897   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28898   # take no chances and rewrite it.
28899   # Note: m4 eats our [], so we need to use [ and ] instead.
28900   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28901   if test "x$has_forbidden_chars" != x; then
28902     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28903     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28904     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28905     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28906       # Going to short mode and back again did indeed matter. Since short mode is
28907       # case insensitive, let's make it lowercase to improve readability.
28908       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28909       # Now convert it back to Unix-style (cygpath)
28910       input_path=`$CYGPATH -u "$shortmode_path"`
28911       new_path="$input_path"
28912     fi
28913   fi
28914 
28915   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28916   if test "x$test_cygdrive_prefix" = x; then
28917     # As a simple fix, exclude /usr/bin since it's not a real path.
28918     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28919       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28920       # a path prefixed by /cygdrive for fixpath to work.
28921       new_path="$CYGWIN_ROOT_PATH$input_path"
28922     fi
28923   fi
28924 
28925 
28926   if test "x$path" != "x$new_path"; then
28927     BOOT_JDK="$new_path"
28928     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28929 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28930   fi
28931 
28932     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28933 
28934   path="$BOOT_JDK"
28935   has_colon=`$ECHO $path | $GREP ^.:`
28936   new_path="$path"
28937   if test "x$has_colon" = x; then
28938     # Not in mixed or Windows style, start by that.
28939     new_path=`cmd //c echo $path`
28940   fi
28941 
28942 
28943   input_path="$new_path"
28944   # Check if we need to convert this using DOS-style short mode. If the path
28945   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28946   # take no chances and rewrite it.
28947   # Note: m4 eats our [], so we need to use [ and ] instead.
28948   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28949   if test "x$has_forbidden_chars" != x; then
28950     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28951     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28952   fi
28953 
28954 
28955   windows_path="$new_path"
28956   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28957     unix_path=`$CYGPATH -u "$windows_path"`
28958     new_path="$unix_path"
28959   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28960     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28961     new_path="$unix_path"
28962   fi
28963 
28964   if test "x$path" != "x$new_path"; then
28965     BOOT_JDK="$new_path"
28966     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28967 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28968   fi
28969 
28970   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28971   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28972 
28973     else
28974       # We're on a unix platform. Hooray! :)
28975       path="$BOOT_JDK"
28976       has_space=`$ECHO "$path" | $GREP " "`
28977       if test "x$has_space" != x; then
28978         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28979 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28980         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28981       fi
28982 
28983       # Use eval to expand a potential ~
28984       eval path="$path"
28985       if test ! -f "$path" && test ! -d "$path"; then
28986         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28987       fi
28988 
28989       if test -d "$path"; then
28990         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28991       else
28992         dir="`$DIRNAME "$path"`"
28993         base="`$BASENAME "$path"`"
28994         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28995       fi
28996     fi
28997   fi
28998 
28999             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29000 $as_echo_n "checking for Boot JDK... " >&6; }
29001             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29002 $as_echo "$BOOT_JDK" >&6; }
29003             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29004 $as_echo_n "checking Boot JDK version... " >&6; }
29005             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29006             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29007 $as_echo "$BOOT_JDK_VERSION" >&6; }
29008           fi # end check jdk version
29009         fi # end check javac
29010       fi # end check java
29011     fi # end check boot jdk found
29012   fi
29013 
29014     done
29015   fi
29016 
29017 
29018     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29019     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29020       # Do we have a bin/java?
29021       if test ! -x "$BOOT_JDK/bin/java"; then
29022         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29023 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29024         BOOT_JDK_FOUND=no
29025       else
29026         # Do we have a bin/javac?
29027         if test ! -x "$BOOT_JDK/bin/javac"; then
29028           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29029 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29030           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29031 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29032           BOOT_JDK_FOUND=no
29033         else
29034           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29035           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29036 
29037           # Extra M4 quote needed to protect [] in grep expression.
29038           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29039           if test "x$FOUND_CORRECT_VERSION" = x; then
29040             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29041 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29042             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29043 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29044             BOOT_JDK_FOUND=no
29045           else
29046             # We're done! :-)
29047             BOOT_JDK_FOUND=yes
29048 
29049   # Only process if variable expands to non-empty
29050 
29051   if test "x$BOOT_JDK" != x; then
29052     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29053 
29054   # Input might be given as Windows format, start by converting to
29055   # unix format.
29056   path="$BOOT_JDK"
29057   new_path=`$CYGPATH -u "$path"`
29058 
29059   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29060   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29061   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29062   # "foo.exe" is OK but "foo" is an error.
29063   #
29064   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29065   # It is also a way to make sure we got the proper file name for the real test later on.
29066   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29067   if test "x$test_shortpath" = x; then
29068     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29069 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29070     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29071   fi
29072 
29073   # Call helper function which possibly converts this using DOS-style short mode.
29074   # If so, the updated path is stored in $new_path.
29075 
29076   input_path="$new_path"
29077   # Check if we need to convert this using DOS-style short mode. If the path
29078   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29079   # take no chances and rewrite it.
29080   # Note: m4 eats our [], so we need to use [ and ] instead.
29081   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29082   if test "x$has_forbidden_chars" != x; then
29083     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29084     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29085     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29086     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29087       # Going to short mode and back again did indeed matter. Since short mode is
29088       # case insensitive, let's make it lowercase to improve readability.
29089       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29090       # Now convert it back to Unix-style (cygpath)
29091       input_path=`$CYGPATH -u "$shortmode_path"`
29092       new_path="$input_path"
29093     fi
29094   fi
29095 
29096   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29097   if test "x$test_cygdrive_prefix" = x; then
29098     # As a simple fix, exclude /usr/bin since it's not a real path.
29099     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29100       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29101       # a path prefixed by /cygdrive for fixpath to work.
29102       new_path="$CYGWIN_ROOT_PATH$input_path"
29103     fi
29104   fi
29105 
29106 
29107   if test "x$path" != "x$new_path"; then
29108     BOOT_JDK="$new_path"
29109     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29110 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29111   fi
29112 
29113     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29114 
29115   path="$BOOT_JDK"
29116   has_colon=`$ECHO $path | $GREP ^.:`
29117   new_path="$path"
29118   if test "x$has_colon" = x; then
29119     # Not in mixed or Windows style, start by that.
29120     new_path=`cmd //c echo $path`
29121   fi
29122 
29123 
29124   input_path="$new_path"
29125   # Check if we need to convert this using DOS-style short mode. If the path
29126   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29127   # take no chances and rewrite it.
29128   # Note: m4 eats our [], so we need to use [ and ] instead.
29129   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29130   if test "x$has_forbidden_chars" != x; then
29131     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29132     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29133   fi
29134 
29135 
29136   windows_path="$new_path"
29137   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29138     unix_path=`$CYGPATH -u "$windows_path"`
29139     new_path="$unix_path"
29140   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29141     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29142     new_path="$unix_path"
29143   fi
29144 
29145   if test "x$path" != "x$new_path"; then
29146     BOOT_JDK="$new_path"
29147     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29148 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29149   fi
29150 
29151   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29152   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29153 
29154     else
29155       # We're on a unix platform. Hooray! :)
29156       path="$BOOT_JDK"
29157       has_space=`$ECHO "$path" | $GREP " "`
29158       if test "x$has_space" != x; then
29159         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29160 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29161         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29162       fi
29163 
29164       # Use eval to expand a potential ~
29165       eval path="$path"
29166       if test ! -f "$path" && test ! -d "$path"; then
29167         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29168       fi
29169 
29170       if test -d "$path"; then
29171         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29172       else
29173         dir="`$DIRNAME "$path"`"
29174         base="`$BASENAME "$path"`"
29175         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29176       fi
29177     fi
29178   fi
29179 
29180             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29181 $as_echo_n "checking for Boot JDK... " >&6; }
29182             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29183 $as_echo "$BOOT_JDK" >&6; }
29184             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29185 $as_echo_n "checking Boot JDK version... " >&6; }
29186             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29187             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29188 $as_echo "$BOOT_JDK_VERSION" >&6; }
29189           fi # end check jdk version
29190         fi # end check javac
29191       fi # end check java
29192     fi # end check boot jdk found
29193   fi
29194 
29195   fi
29196 
29197 
29198     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29199     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29200       # Do we have a bin/java?
29201       if test ! -x "$BOOT_JDK/bin/java"; then
29202         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29203 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29204         BOOT_JDK_FOUND=no
29205       else
29206         # Do we have a bin/javac?
29207         if test ! -x "$BOOT_JDK/bin/javac"; then
29208           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29209 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29210           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29211 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29212           BOOT_JDK_FOUND=no
29213         else
29214           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29215           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29216 
29217           # Extra M4 quote needed to protect [] in grep expression.
29218           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29219           if test "x$FOUND_CORRECT_VERSION" = x; then
29220             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29221 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29222             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29223 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29224             BOOT_JDK_FOUND=no
29225           else
29226             # We're done! :-)
29227             BOOT_JDK_FOUND=yes
29228 
29229   # Only process if variable expands to non-empty
29230 
29231   if test "x$BOOT_JDK" != x; then
29232     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29233 
29234   # Input might be given as Windows format, start by converting to
29235   # unix format.
29236   path="$BOOT_JDK"
29237   new_path=`$CYGPATH -u "$path"`
29238 
29239   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29240   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29241   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29242   # "foo.exe" is OK but "foo" is an error.
29243   #
29244   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29245   # It is also a way to make sure we got the proper file name for the real test later on.
29246   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29247   if test "x$test_shortpath" = x; then
29248     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29249 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29250     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29251   fi
29252 
29253   # Call helper function which possibly converts this using DOS-style short mode.
29254   # If so, the updated path is stored in $new_path.
29255 
29256   input_path="$new_path"
29257   # Check if we need to convert this using DOS-style short mode. If the path
29258   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29259   # take no chances and rewrite it.
29260   # Note: m4 eats our [], so we need to use [ and ] instead.
29261   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29262   if test "x$has_forbidden_chars" != x; then
29263     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29264     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29265     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29266     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29267       # Going to short mode and back again did indeed matter. Since short mode is
29268       # case insensitive, let's make it lowercase to improve readability.
29269       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29270       # Now convert it back to Unix-style (cygpath)
29271       input_path=`$CYGPATH -u "$shortmode_path"`
29272       new_path="$input_path"
29273     fi
29274   fi
29275 
29276   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29277   if test "x$test_cygdrive_prefix" = x; then
29278     # As a simple fix, exclude /usr/bin since it's not a real path.
29279     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29280       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29281       # a path prefixed by /cygdrive for fixpath to work.
29282       new_path="$CYGWIN_ROOT_PATH$input_path"
29283     fi
29284   fi
29285 
29286 
29287   if test "x$path" != "x$new_path"; then
29288     BOOT_JDK="$new_path"
29289     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29290 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29291   fi
29292 
29293     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29294 
29295   path="$BOOT_JDK"
29296   has_colon=`$ECHO $path | $GREP ^.:`
29297   new_path="$path"
29298   if test "x$has_colon" = x; then
29299     # Not in mixed or Windows style, start by that.
29300     new_path=`cmd //c echo $path`
29301   fi
29302 
29303 
29304   input_path="$new_path"
29305   # Check if we need to convert this using DOS-style short mode. If the path
29306   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29307   # take no chances and rewrite it.
29308   # Note: m4 eats our [], so we need to use [ and ] instead.
29309   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29310   if test "x$has_forbidden_chars" != x; then
29311     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29312     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29313   fi
29314 
29315 
29316   windows_path="$new_path"
29317   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29318     unix_path=`$CYGPATH -u "$windows_path"`
29319     new_path="$unix_path"
29320   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29321     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29322     new_path="$unix_path"
29323   fi
29324 
29325   if test "x$path" != "x$new_path"; then
29326     BOOT_JDK="$new_path"
29327     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29328 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29329   fi
29330 
29331   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29332   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29333 
29334     else
29335       # We're on a unix platform. Hooray! :)
29336       path="$BOOT_JDK"
29337       has_space=`$ECHO "$path" | $GREP " "`
29338       if test "x$has_space" != x; then
29339         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29340 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29341         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29342       fi
29343 
29344       # Use eval to expand a potential ~
29345       eval path="$path"
29346       if test ! -f "$path" && test ! -d "$path"; then
29347         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29348       fi
29349 
29350       if test -d "$path"; then
29351         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29352       else
29353         dir="`$DIRNAME "$path"`"
29354         base="`$BASENAME "$path"`"
29355         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29356       fi
29357     fi
29358   fi
29359 
29360             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29361 $as_echo_n "checking for Boot JDK... " >&6; }
29362             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29363 $as_echo "$BOOT_JDK" >&6; }
29364             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29365 $as_echo_n "checking Boot JDK version... " >&6; }
29366             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29367             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29368 $as_echo "$BOOT_JDK_VERSION" >&6; }
29369           fi # end check jdk version
29370         fi # end check javac
29371       fi # end check java
29372     fi # end check boot jdk found
29373   fi
29374 
29375 
29376   # If we haven't found anything yet, we've truly lost. Give up.
29377   if test "x$BOOT_JDK_FOUND" = xno; then
29378 
29379   # Print a helpful message on how to acquire the necessary build dependency.
29380   # openjdk is the help tag: freetype, cups, alsa etc
29381   MISSING_DEPENDENCY=openjdk
29382 
29383   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29384     cygwin_help $MISSING_DEPENDENCY
29385   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29386     msys_help $MISSING_DEPENDENCY
29387   else
29388     PKGHANDLER_COMMAND=
29389 
29390     case $PKGHANDLER in
29391       apt-get)
29392         apt_help     $MISSING_DEPENDENCY ;;
29393       yum)
29394         yum_help     $MISSING_DEPENDENCY ;;
29395       port)
29396         port_help    $MISSING_DEPENDENCY ;;
29397       pkgutil)
29398         pkgutil_help $MISSING_DEPENDENCY ;;
29399       pkgadd)
29400         pkgadd_help  $MISSING_DEPENDENCY ;;
29401     esac
29402 
29403     if test "x$PKGHANDLER_COMMAND" != x; then
29404       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29405     fi
29406   fi
29407 
29408     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29409 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29410     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29411 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29412     as_fn_error $? "Cannot continue" "$LINENO" 5
29413   fi
29414 
29415 
29416 
29417   # Setup tools from the Boot JDK.
29418 
29419   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29420 
29421   # Publish this variable in the help.
29422 
29423 
29424   if [ -z "${JAVA+x}" ]; then
29425     # The variable is not set by user, try to locate tool using the code snippet
29426 
29427       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29428 $as_echo_n "checking for java in Boot JDK... " >&6; }
29429       JAVA=$BOOT_JDK/bin/java
29430       if test ! -x $JAVA; then
29431         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29432 $as_echo "not found" >&6; }
29433         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29434 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29435         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29436       fi
29437       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29438 $as_echo "ok" >&6; }
29439 
29440 
29441   else
29442     # The variable is set, but is it from the command line or the environment?
29443 
29444     # Try to remove the string !JAVA! from our list.
29445     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29446     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29447       # If it failed, the variable was not from the command line. Ignore it,
29448       # but warn the user (except for BASH, which is always set by the calling BASH).
29449       if test "xJAVA" != xBASH; then
29450         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29451 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29452       fi
29453       # Try to locate tool using the code snippet
29454 
29455       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29456 $as_echo_n "checking for java in Boot JDK... " >&6; }
29457       JAVA=$BOOT_JDK/bin/java
29458       if test ! -x $JAVA; then
29459         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29460 $as_echo "not found" >&6; }
29461         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29462 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29463         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29464       fi
29465       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29466 $as_echo "ok" >&6; }
29467 
29468 
29469     else
29470       # If it succeeded, then it was overridden by the user. We will use it
29471       # for the tool.
29472 
29473       # First remove it from the list of overridden variables, so we can test
29474       # for unknown variables in the end.
29475       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29476 
29477       # Check if we try to supply an empty value
29478       if test "x$JAVA" = x; then
29479         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29480 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29481         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29482 $as_echo_n "checking for JAVA... " >&6; }
29483         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29484 $as_echo "disabled" >&6; }
29485       else
29486         # Check if the provided tool contains a complete path.
29487         tool_specified="$JAVA"
29488         tool_basename="${tool_specified##*/}"
29489         if test "x$tool_basename" = "x$tool_specified"; then
29490           # A command without a complete path is provided, search $PATH.
29491           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29492 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29493           # Extract the first word of "$tool_basename", so it can be a program name with args.
29494 set dummy $tool_basename; ac_word=$2
29495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29496 $as_echo_n "checking for $ac_word... " >&6; }
29497 if ${ac_cv_path_JAVA+:} false; then :
29498   $as_echo_n "(cached) " >&6
29499 else
29500   case $JAVA in
29501   [\\/]* | ?:[\\/]*)
29502   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29503   ;;
29504   *)
29505   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29506 for as_dir in $PATH
29507 do
29508   IFS=$as_save_IFS
29509   test -z "$as_dir" && as_dir=.
29510     for ac_exec_ext in '' $ac_executable_extensions; do
29511   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29512     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29513     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29514     break 2
29515   fi
29516 done
29517   done
29518 IFS=$as_save_IFS
29519 
29520   ;;
29521 esac
29522 fi
29523 JAVA=$ac_cv_path_JAVA
29524 if test -n "$JAVA"; then
29525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29526 $as_echo "$JAVA" >&6; }
29527 else
29528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29529 $as_echo "no" >&6; }
29530 fi
29531 
29532 
29533           if test "x$JAVA" = x; then
29534             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29535           fi
29536         else
29537           # Otherwise we believe it is a complete path. Use it as it is.
29538           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29539 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29540           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29541 $as_echo_n "checking for JAVA... " >&6; }
29542           if test ! -x "$tool_specified"; then
29543             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29544 $as_echo "not found" >&6; }
29545             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29546           fi
29547           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29548 $as_echo "$tool_specified" >&6; }
29549         fi
29550       fi
29551     fi
29552 
29553   fi
29554 
29555 
29556 
29557   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29558 
29559   # Publish this variable in the help.
29560 
29561 
29562   if [ -z "${JAVAC+x}" ]; then
29563     # The variable is not set by user, try to locate tool using the code snippet
29564 
29565       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29566 $as_echo_n "checking for javac in Boot JDK... " >&6; }
29567       JAVAC=$BOOT_JDK/bin/javac
29568       if test ! -x $JAVAC; then
29569         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29570 $as_echo "not found" >&6; }
29571         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29572 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29573         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29574       fi
29575       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29576 $as_echo "ok" >&6; }
29577 
29578 
29579   else
29580     # The variable is set, but is it from the command line or the environment?
29581 
29582     # Try to remove the string !JAVAC! from our list.
29583     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29584     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29585       # If it failed, the variable was not from the command line. Ignore it,
29586       # but warn the user (except for BASH, which is always set by the calling BASH).
29587       if test "xJAVAC" != xBASH; then
29588         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29589 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29590       fi
29591       # Try to locate tool using the code snippet
29592 
29593       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29594 $as_echo_n "checking for javac in Boot JDK... " >&6; }
29595       JAVAC=$BOOT_JDK/bin/javac
29596       if test ! -x $JAVAC; then
29597         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29598 $as_echo "not found" >&6; }
29599         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29600 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29601         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29602       fi
29603       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29604 $as_echo "ok" >&6; }
29605 
29606 
29607     else
29608       # If it succeeded, then it was overridden by the user. We will use it
29609       # for the tool.
29610 
29611       # First remove it from the list of overridden variables, so we can test
29612       # for unknown variables in the end.
29613       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29614 
29615       # Check if we try to supply an empty value
29616       if test "x$JAVAC" = x; then
29617         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29618 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29619         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29620 $as_echo_n "checking for JAVAC... " >&6; }
29621         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29622 $as_echo "disabled" >&6; }
29623       else
29624         # Check if the provided tool contains a complete path.
29625         tool_specified="$JAVAC"
29626         tool_basename="${tool_specified##*/}"
29627         if test "x$tool_basename" = "x$tool_specified"; then
29628           # A command without a complete path is provided, search $PATH.
29629           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29630 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29631           # Extract the first word of "$tool_basename", so it can be a program name with args.
29632 set dummy $tool_basename; ac_word=$2
29633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29634 $as_echo_n "checking for $ac_word... " >&6; }
29635 if ${ac_cv_path_JAVAC+:} false; then :
29636   $as_echo_n "(cached) " >&6
29637 else
29638   case $JAVAC in
29639   [\\/]* | ?:[\\/]*)
29640   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29641   ;;
29642   *)
29643   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29644 for as_dir in $PATH
29645 do
29646   IFS=$as_save_IFS
29647   test -z "$as_dir" && as_dir=.
29648     for ac_exec_ext in '' $ac_executable_extensions; do
29649   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29650     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29651     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29652     break 2
29653   fi
29654 done
29655   done
29656 IFS=$as_save_IFS
29657 
29658   ;;
29659 esac
29660 fi
29661 JAVAC=$ac_cv_path_JAVAC
29662 if test -n "$JAVAC"; then
29663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29664 $as_echo "$JAVAC" >&6; }
29665 else
29666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29667 $as_echo "no" >&6; }
29668 fi
29669 
29670 
29671           if test "x$JAVAC" = x; then
29672             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29673           fi
29674         else
29675           # Otherwise we believe it is a complete path. Use it as it is.
29676           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29677 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29678           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29679 $as_echo_n "checking for JAVAC... " >&6; }
29680           if test ! -x "$tool_specified"; then
29681             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29682 $as_echo "not found" >&6; }
29683             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29684           fi
29685           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29686 $as_echo "$tool_specified" >&6; }
29687         fi
29688       fi
29689     fi
29690 
29691   fi
29692 
29693 
29694 
29695   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29696 
29697   # Publish this variable in the help.
29698 
29699 
29700   if [ -z "${JAVAH+x}" ]; then
29701     # The variable is not set by user, try to locate tool using the code snippet
29702 
29703       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29704 $as_echo_n "checking for javah in Boot JDK... " >&6; }
29705       JAVAH=$BOOT_JDK/bin/javah
29706       if test ! -x $JAVAH; then
29707         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29708 $as_echo "not found" >&6; }
29709         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29710 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29711         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29712       fi
29713       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29714 $as_echo "ok" >&6; }
29715 
29716 
29717   else
29718     # The variable is set, but is it from the command line or the environment?
29719 
29720     # Try to remove the string !JAVAH! from our list.
29721     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29722     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29723       # If it failed, the variable was not from the command line. Ignore it,
29724       # but warn the user (except for BASH, which is always set by the calling BASH).
29725       if test "xJAVAH" != xBASH; then
29726         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29727 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29728       fi
29729       # Try to locate tool using the code snippet
29730 
29731       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29732 $as_echo_n "checking for javah in Boot JDK... " >&6; }
29733       JAVAH=$BOOT_JDK/bin/javah
29734       if test ! -x $JAVAH; then
29735         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29736 $as_echo "not found" >&6; }
29737         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29738 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29739         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29740       fi
29741       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29742 $as_echo "ok" >&6; }
29743 
29744 
29745     else
29746       # If it succeeded, then it was overridden by the user. We will use it
29747       # for the tool.
29748 
29749       # First remove it from the list of overridden variables, so we can test
29750       # for unknown variables in the end.
29751       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29752 
29753       # Check if we try to supply an empty value
29754       if test "x$JAVAH" = x; then
29755         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29756 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29757         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29758 $as_echo_n "checking for JAVAH... " >&6; }
29759         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29760 $as_echo "disabled" >&6; }
29761       else
29762         # Check if the provided tool contains a complete path.
29763         tool_specified="$JAVAH"
29764         tool_basename="${tool_specified##*/}"
29765         if test "x$tool_basename" = "x$tool_specified"; then
29766           # A command without a complete path is provided, search $PATH.
29767           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29768 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29769           # Extract the first word of "$tool_basename", so it can be a program name with args.
29770 set dummy $tool_basename; ac_word=$2
29771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29772 $as_echo_n "checking for $ac_word... " >&6; }
29773 if ${ac_cv_path_JAVAH+:} false; then :
29774   $as_echo_n "(cached) " >&6
29775 else
29776   case $JAVAH in
29777   [\\/]* | ?:[\\/]*)
29778   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29779   ;;
29780   *)
29781   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29782 for as_dir in $PATH
29783 do
29784   IFS=$as_save_IFS
29785   test -z "$as_dir" && as_dir=.
29786     for ac_exec_ext in '' $ac_executable_extensions; do
29787   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29788     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29789     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29790     break 2
29791   fi
29792 done
29793   done
29794 IFS=$as_save_IFS
29795 
29796   ;;
29797 esac
29798 fi
29799 JAVAH=$ac_cv_path_JAVAH
29800 if test -n "$JAVAH"; then
29801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29802 $as_echo "$JAVAH" >&6; }
29803 else
29804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29805 $as_echo "no" >&6; }
29806 fi
29807 
29808 
29809           if test "x$JAVAH" = x; then
29810             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29811           fi
29812         else
29813           # Otherwise we believe it is a complete path. Use it as it is.
29814           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29815 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29816           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29817 $as_echo_n "checking for JAVAH... " >&6; }
29818           if test ! -x "$tool_specified"; then
29819             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29820 $as_echo "not found" >&6; }
29821             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29822           fi
29823           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29824 $as_echo "$tool_specified" >&6; }
29825         fi
29826       fi
29827     fi
29828 
29829   fi
29830 
29831 
29832 
29833   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29834 
29835   # Publish this variable in the help.
29836 
29837 
29838   if [ -z "${JAR+x}" ]; then
29839     # The variable is not set by user, try to locate tool using the code snippet
29840 
29841       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29842 $as_echo_n "checking for jar in Boot JDK... " >&6; }
29843       JAR=$BOOT_JDK/bin/jar
29844       if test ! -x $JAR; then
29845         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29846 $as_echo "not found" >&6; }
29847         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29848 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29849         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29850       fi
29851       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29852 $as_echo "ok" >&6; }
29853 
29854 
29855   else
29856     # The variable is set, but is it from the command line or the environment?
29857 
29858     # Try to remove the string !JAR! from our list.
29859     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29860     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29861       # If it failed, the variable was not from the command line. Ignore it,
29862       # but warn the user (except for BASH, which is always set by the calling BASH).
29863       if test "xJAR" != xBASH; then
29864         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29865 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29866       fi
29867       # Try to locate tool using the code snippet
29868 
29869       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29870 $as_echo_n "checking for jar in Boot JDK... " >&6; }
29871       JAR=$BOOT_JDK/bin/jar
29872       if test ! -x $JAR; then
29873         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29874 $as_echo "not found" >&6; }
29875         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29876 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29877         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29878       fi
29879       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29880 $as_echo "ok" >&6; }
29881 
29882 
29883     else
29884       # If it succeeded, then it was overridden by the user. We will use it
29885       # for the tool.
29886 
29887       # First remove it from the list of overridden variables, so we can test
29888       # for unknown variables in the end.
29889       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29890 
29891       # Check if we try to supply an empty value
29892       if test "x$JAR" = x; then
29893         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29894 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29895         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29896 $as_echo_n "checking for JAR... " >&6; }
29897         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29898 $as_echo "disabled" >&6; }
29899       else
29900         # Check if the provided tool contains a complete path.
29901         tool_specified="$JAR"
29902         tool_basename="${tool_specified##*/}"
29903         if test "x$tool_basename" = "x$tool_specified"; then
29904           # A command without a complete path is provided, search $PATH.
29905           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29906 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29907           # Extract the first word of "$tool_basename", so it can be a program name with args.
29908 set dummy $tool_basename; ac_word=$2
29909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29910 $as_echo_n "checking for $ac_word... " >&6; }
29911 if ${ac_cv_path_JAR+:} false; then :
29912   $as_echo_n "(cached) " >&6
29913 else
29914   case $JAR in
29915   [\\/]* | ?:[\\/]*)
29916   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29917   ;;
29918   *)
29919   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29920 for as_dir in $PATH
29921 do
29922   IFS=$as_save_IFS
29923   test -z "$as_dir" && as_dir=.
29924     for ac_exec_ext in '' $ac_executable_extensions; do
29925   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29926     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29927     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29928     break 2
29929   fi
29930 done
29931   done
29932 IFS=$as_save_IFS
29933 
29934   ;;
29935 esac
29936 fi
29937 JAR=$ac_cv_path_JAR
29938 if test -n "$JAR"; then
29939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29940 $as_echo "$JAR" >&6; }
29941 else
29942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29943 $as_echo "no" >&6; }
29944 fi
29945 
29946 
29947           if test "x$JAR" = x; then
29948             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29949           fi
29950         else
29951           # Otherwise we believe it is a complete path. Use it as it is.
29952           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29953 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29954           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29955 $as_echo_n "checking for JAR... " >&6; }
29956           if test ! -x "$tool_specified"; then
29957             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29958 $as_echo "not found" >&6; }
29959             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29960           fi
29961           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29962 $as_echo "$tool_specified" >&6; }
29963         fi
29964       fi
29965     fi
29966 
29967   fi
29968 
29969 
29970 
29971   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29972 
29973   # Publish this variable in the help.
29974 
29975 
29976   if [ -z "${JARSIGNER+x}" ]; then
29977     # The variable is not set by user, try to locate tool using the code snippet
29978 
29979       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29980 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29981       JARSIGNER=$BOOT_JDK/bin/jarsigner
29982       if test ! -x $JARSIGNER; then
29983         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29984 $as_echo "not found" >&6; }
29985         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29986 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29987         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29988       fi
29989       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29990 $as_echo "ok" >&6; }
29991 
29992 
29993   else
29994     # The variable is set, but is it from the command line or the environment?
29995 
29996     # Try to remove the string !JARSIGNER! from our list.
29997     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29998     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29999       # If it failed, the variable was not from the command line. Ignore it,
30000       # but warn the user (except for BASH, which is always set by the calling BASH).
30001       if test "xJARSIGNER" != xBASH; then
30002         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30003 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30004       fi
30005       # Try to locate tool using the code snippet
30006 
30007       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30008 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30009       JARSIGNER=$BOOT_JDK/bin/jarsigner
30010       if test ! -x $JARSIGNER; then
30011         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30012 $as_echo "not found" >&6; }
30013         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30014 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30015         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30016       fi
30017       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30018 $as_echo "ok" >&6; }
30019 
30020 
30021     else
30022       # If it succeeded, then it was overridden by the user. We will use it
30023       # for the tool.
30024 
30025       # First remove it from the list of overridden variables, so we can test
30026       # for unknown variables in the end.
30027       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30028 
30029       # Check if we try to supply an empty value
30030       if test "x$JARSIGNER" = x; then
30031         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30032 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30033         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30034 $as_echo_n "checking for JARSIGNER... " >&6; }
30035         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30036 $as_echo "disabled" >&6; }
30037       else
30038         # Check if the provided tool contains a complete path.
30039         tool_specified="$JARSIGNER"
30040         tool_basename="${tool_specified##*/}"
30041         if test "x$tool_basename" = "x$tool_specified"; then
30042           # A command without a complete path is provided, search $PATH.
30043           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30044 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30045           # Extract the first word of "$tool_basename", so it can be a program name with args.
30046 set dummy $tool_basename; ac_word=$2
30047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30048 $as_echo_n "checking for $ac_word... " >&6; }
30049 if ${ac_cv_path_JARSIGNER+:} false; then :
30050   $as_echo_n "(cached) " >&6
30051 else
30052   case $JARSIGNER in
30053   [\\/]* | ?:[\\/]*)
30054   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30055   ;;
30056   *)
30057   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30058 for as_dir in $PATH
30059 do
30060   IFS=$as_save_IFS
30061   test -z "$as_dir" && as_dir=.
30062     for ac_exec_ext in '' $ac_executable_extensions; do
30063   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30064     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30065     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30066     break 2
30067   fi
30068 done
30069   done
30070 IFS=$as_save_IFS
30071 
30072   ;;
30073 esac
30074 fi
30075 JARSIGNER=$ac_cv_path_JARSIGNER
30076 if test -n "$JARSIGNER"; then
30077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30078 $as_echo "$JARSIGNER" >&6; }
30079 else
30080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30081 $as_echo "no" >&6; }
30082 fi
30083 
30084 
30085           if test "x$JARSIGNER" = x; then
30086             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30087           fi
30088         else
30089           # Otherwise we believe it is a complete path. Use it as it is.
30090           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30091 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30092           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30093 $as_echo_n "checking for JARSIGNER... " >&6; }
30094           if test ! -x "$tool_specified"; then
30095             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30096 $as_echo "not found" >&6; }
30097             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30098           fi
30099           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30100 $as_echo "$tool_specified" >&6; }
30101         fi
30102       fi
30103     fi
30104 
30105   fi
30106 
30107 
30108 
30109   # Finally, set some other options...
30110 
30111   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30112   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30113 
30114 
30115 
30116   $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
30117   $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
30118   OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
30119   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
30120   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
30121   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30122     dummy="$dummy -Xpatch:foo=bar"
30123     JVM_ARG_OK=true
30124   else
30125     $ECHO "Arg failed:" >&5
30126     $ECHO "$OUTPUT" >&5
30127     JVM_ARG_OK=false
30128   fi
30129 
30130   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30131 $as_echo_n "checking if Boot JDK supports modules... " >&6; }
30132   if test "x$JVM_ARG_OK" = "xtrue"; then
30133     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30134 $as_echo "yes" >&6; }
30135     BOOT_JDK_MODULAR="true"
30136   else
30137     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30138 $as_echo "no" >&6; }
30139     BOOT_JDK_MODULAR="false"
30140   fi
30141 
30142 
30143 
30144 
30145   # Check if the boot jdk is 32 or 64 bit
30146   if "$JAVA" -d64 -version > /dev/null 2>&1; then
30147     BOOT_JDK_BITS="64"
30148   else
30149     BOOT_JDK_BITS="32"
30150   fi
30151   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30152 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30154 $as_echo "$BOOT_JDK_BITS" >&6; }
30155 
30156 
30157 
30158 
30159 # Check whether --with-build-jdk was given.
30160 if test "${with_build_jdk+set}" = set; then :
30161   withval=$with_build_jdk;
30162 fi
30163 
30164 
30165   CREATE_BUILDJDK_FOR_HOST=false
30166   BUILD_JDK_FOUND="no"
30167   if test "x$with_build_jdk" != "x"; then
30168 
30169   if test "x$BUILD_JDK_FOUND" = xno; then
30170     # Execute the test
30171 
30172        if test "x$with_build_jdk" != x; then
30173          BUILD_JDK=$with_build_jdk
30174          BUILD_JDK_FOUND=maybe
30175          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30176 $as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30177        fi
30178 
30179     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30180     if test "x$BUILD_JDK_FOUND" = xmaybe; then
30181       # Do we have a bin/java?
30182       if test ! -x "$BUILD_JDK/bin/java"; then
30183         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30184 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30185         BUILD_JDK_FOUND=no
30186       elif test ! -x "$BUILD_JDK/bin/jlink"; then
30187         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30188 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30189         BUILD_JDK_FOUND=no
30190       elif test ! -x "$BUILD_JDK/bin/javac"; then
30191         # Do we have a bin/javac?
30192         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30193 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30194         { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30195 $as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30196         BUILD_JDK_FOUND=no
30197       else
30198         # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30199         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
30200 
30201         # Extra M4 quote needed to protect [] in grep expression.
30202         FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30203         if test "x$FOUND_CORRECT_VERSION" = x; then
30204           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30205 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30206           { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30207 $as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30208           BUILD_JDK_FOUND=no
30209         else
30210           # We're done!
30211           BUILD_JDK_FOUND=yes
30212 
30213   # Only process if variable expands to non-empty
30214 
30215   if test "x$BUILD_JDK" != x; then
30216     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30217 
30218   # Input might be given as Windows format, start by converting to
30219   # unix format.
30220   path="$BUILD_JDK"
30221   new_path=`$CYGPATH -u "$path"`
30222 
30223   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30224   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30225   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30226   # "foo.exe" is OK but "foo" is an error.
30227   #
30228   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30229   # It is also a way to make sure we got the proper file name for the real test later on.
30230   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30231   if test "x$test_shortpath" = x; then
30232     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30233 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30234     as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30235   fi
30236 
30237   # Call helper function which possibly converts this using DOS-style short mode.
30238   # If so, the updated path is stored in $new_path.
30239 
30240   input_path="$new_path"
30241   # Check if we need to convert this using DOS-style short mode. If the path
30242   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30243   # take no chances and rewrite it.
30244   # Note: m4 eats our [], so we need to use [ and ] instead.
30245   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30246   if test "x$has_forbidden_chars" != x; then
30247     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30248     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30249     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30250     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30251       # Going to short mode and back again did indeed matter. Since short mode is
30252       # case insensitive, let's make it lowercase to improve readability.
30253       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30254       # Now convert it back to Unix-style (cygpath)
30255       input_path=`$CYGPATH -u "$shortmode_path"`
30256       new_path="$input_path"
30257     fi
30258   fi
30259 
30260   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30261   if test "x$test_cygdrive_prefix" = x; then
30262     # As a simple fix, exclude /usr/bin since it's not a real path.
30263     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30264       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30265       # a path prefixed by /cygdrive for fixpath to work.
30266       new_path="$CYGWIN_ROOT_PATH$input_path"
30267     fi
30268   fi
30269 
30270 
30271   if test "x$path" != "x$new_path"; then
30272     BUILD_JDK="$new_path"
30273     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30274 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30275   fi
30276 
30277     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30278 
30279   path="$BUILD_JDK"
30280   has_colon=`$ECHO $path | $GREP ^.:`
30281   new_path="$path"
30282   if test "x$has_colon" = x; then
30283     # Not in mixed or Windows style, start by that.
30284     new_path=`cmd //c echo $path`
30285   fi
30286 
30287 
30288   input_path="$new_path"
30289   # Check if we need to convert this using DOS-style short mode. If the path
30290   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30291   # take no chances and rewrite it.
30292   # Note: m4 eats our [], so we need to use [ and ] instead.
30293   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30294   if test "x$has_forbidden_chars" != x; then
30295     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30296     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30297   fi
30298 
30299 
30300   windows_path="$new_path"
30301   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30302     unix_path=`$CYGPATH -u "$windows_path"`
30303     new_path="$unix_path"
30304   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30305     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30306     new_path="$unix_path"
30307   fi
30308 
30309   if test "x$path" != "x$new_path"; then
30310     BUILD_JDK="$new_path"
30311     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30312 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30313   fi
30314 
30315   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30316   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30317 
30318     else
30319       # We're on a unix platform. Hooray! :)
30320       path="$BUILD_JDK"
30321       has_space=`$ECHO "$path" | $GREP " "`
30322       if test "x$has_space" != x; then
30323         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30324 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30325         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30326       fi
30327 
30328       # Use eval to expand a potential ~
30329       eval path="$path"
30330       if test ! -f "$path" && test ! -d "$path"; then
30331         as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30332       fi
30333 
30334       if test -d "$path"; then
30335         BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30336       else
30337         dir="`$DIRNAME "$path"`"
30338         base="`$BASENAME "$path"`"
30339         BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30340       fi
30341     fi
30342   fi
30343 
30344           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30345 $as_echo_n "checking for Build JDK... " >&6; }
30346           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30347 $as_echo "$BUILD_JDK" >&6; }
30348           { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30349 $as_echo_n "checking Build JDK version... " >&6; }
30350           BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30351           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30352 $as_echo "$BUILD_JDK_VERSION" >&6; }
30353         fi # end check jdk version
30354       fi # end check java
30355     fi # end check build jdk found
30356   fi
30357 
30358   else
30359     if test "x$COMPILE_TYPE" = "xcross"; then
30360       BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30361       BUILD_JDK_FOUND=yes
30362       CREATE_BUILDJDK=true
30363       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30364 $as_echo_n "checking for Build JDK... " >&6; }
30365       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30366 $as_echo "yes, will build it for the host platform" >&6; }
30367     else
30368       BUILD_JDK="\$(JDK_OUTPUTDIR)"
30369       BUILD_JDK_FOUND=yes
30370       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30371 $as_echo_n "checking for Build JDK... " >&6; }
30372       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30373 $as_echo "yes, will use output dir" >&6; }
30374     fi
30375   fi
30376 
30377   if test "x$BUILD_JDK_FOUND" != "xyes"; then
30378     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30379 $as_echo_n "checking for Build JDK... " >&6; }
30380     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30381 $as_echo "no" >&6; }
30382     as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30383   fi
30384 
30385 
30386 
30387 
30388 
30389 ###############################################################################
30390 #
30391 # Configure the sources to use. We can add or override individual directories.
30392 #
30393 ###############################################################################
30394 
30395 
30396   # Where are the sources.
30397   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30398   CORBA_TOPDIR="$SRC_ROOT/corba"
30399   JAXP_TOPDIR="$SRC_ROOT/jaxp"
30400   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30401   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30402   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30403   JDK_TOPDIR="$SRC_ROOT/jdk"
30404 
30405 
30406 
30407 
30408 
30409 
30410 
30411 
30412 
30413   # This feature is no longer supported.
30414 
30415 
30416 
30417 # Check whether --with-add-source-root was given.
30418 if test "${with_add_source_root+set}" = set; then :
30419   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
30420 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30421 fi
30422 
30423 
30424 
30425 
30426 # Check whether --with-override-source-root was given.
30427 if test "${with_override_source_root+set}" = set; then :
30428   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
30429 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30430 fi
30431 
30432 
30433 
30434 
30435 # Check whether --with-adds-and-overrides was given.
30436 if test "${with_adds_and_overrides+set}" = set; then :
30437   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
30438 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30439 fi
30440 
30441 
30442 
30443 
30444 # Check whether --with-override-langtools was given.
30445 if test "${with_override_langtools+set}" = set; then :
30446   withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30447 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30448 fi
30449 
30450 
30451 
30452 
30453 # Check whether --with-override-corba was given.
30454 if test "${with_override_corba+set}" = set; then :
30455   withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30456 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30457 fi
30458 
30459 
30460 
30461 
30462 # Check whether --with-override-jaxp was given.
30463 if test "${with_override_jaxp+set}" = set; then :
30464   withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30465 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30466 fi
30467 
30468 
30469 
30470 
30471 # Check whether --with-override-jaxws was given.
30472 if test "${with_override_jaxws+set}" = set; then :
30473   withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30474 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30475 fi
30476 
30477 
30478 
30479 
30480 # Check whether --with-override-hotspot was given.
30481 if test "${with_override_hotspot+set}" = set; then :
30482   withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30483 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30484 fi
30485 
30486 
30487 
30488 
30489 # Check whether --with-override-nashorn was given.
30490 if test "${with_override_nashorn+set}" = set; then :
30491   withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30492 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30493 fi
30494 
30495 
30496 
30497 
30498 # Check whether --with-override-jdk was given.
30499 if test "${with_override_jdk+set}" = set; then :
30500   withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30501 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30502 fi
30503 
30504 
30505 
30506 
30507   BUILD_OUTPUT="$OUTPUT_ROOT"
30508 
30509 
30510   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30511   BUILD_HOTSPOT=true
30512 
30513 
30514 
30515 # Check whether --with-import-hotspot was given.
30516 if test "${with_import_hotspot+set}" = set; then :
30517   withval=$with_import_hotspot;
30518 fi
30519 
30520   if test "x$with_import_hotspot" != x; then
30521     CURDIR="$PWD"
30522     cd "$with_import_hotspot"
30523     HOTSPOT_DIST="`pwd`"
30524     cd "$CURDIR"
30525     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
30526       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
30527     fi
30528     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
30529 $as_echo_n "checking if hotspot should be imported... " >&6; }
30530     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
30531 $as_echo "yes from $HOTSPOT_DIST" >&6; }
30532     BUILD_HOTSPOT=false
30533   fi
30534 
30535   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
30536 
30537 
30538 
30539 
30540 # Check whether --with-import-modules was given.
30541 if test "${with_import_modules+set}" = set; then :
30542   withval=$with_import_modules;
30543 fi
30544 
30545 
30546   if test "x$with_import_modules" != x \
30547       && test "x$with_import_modules" != "xno"; then
30548     if test -d "$with_import_modules"; then
30549       IMPORT_MODULES_TOPDIR="$with_import_modules"
30550 
30551   # Only process if variable expands to non-empty
30552 
30553   if test "x$IMPORT_MODULES_TOPDIR" != x; then
30554     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30555 
30556   # Input might be given as Windows format, start by converting to
30557   # unix format.
30558   path="$IMPORT_MODULES_TOPDIR"
30559   new_path=`$CYGPATH -u "$path"`
30560 
30561   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30562   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30563   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30564   # "foo.exe" is OK but "foo" is an error.
30565   #
30566   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30567   # It is also a way to make sure we got the proper file name for the real test later on.
30568   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30569   if test "x$test_shortpath" = x; then
30570     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30571 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30572     as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
30573   fi
30574 
30575   # Call helper function which possibly converts this using DOS-style short mode.
30576   # If so, the updated path is stored in $new_path.
30577 
30578   input_path="$new_path"
30579   # Check if we need to convert this using DOS-style short mode. If the path
30580   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30581   # take no chances and rewrite it.
30582   # Note: m4 eats our [], so we need to use [ and ] instead.
30583   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30584   if test "x$has_forbidden_chars" != x; then
30585     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30586     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30587     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30588     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30589       # Going to short mode and back again did indeed matter. Since short mode is
30590       # case insensitive, let's make it lowercase to improve readability.
30591       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30592       # Now convert it back to Unix-style (cygpath)
30593       input_path=`$CYGPATH -u "$shortmode_path"`
30594       new_path="$input_path"
30595     fi
30596   fi
30597 
30598   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30599   if test "x$test_cygdrive_prefix" = x; then
30600     # As a simple fix, exclude /usr/bin since it's not a real path.
30601     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30602       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30603       # a path prefixed by /cygdrive for fixpath to work.
30604       new_path="$CYGWIN_ROOT_PATH$input_path"
30605     fi
30606   fi
30607 
30608 
30609   if test "x$path" != "x$new_path"; then
30610     IMPORT_MODULES_TOPDIR="$new_path"
30611     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30612 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30613   fi
30614 
30615     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30616 
30617   path="$IMPORT_MODULES_TOPDIR"
30618   has_colon=`$ECHO $path | $GREP ^.:`
30619   new_path="$path"
30620   if test "x$has_colon" = x; then
30621     # Not in mixed or Windows style, start by that.
30622     new_path=`cmd //c echo $path`
30623   fi
30624 
30625 
30626   input_path="$new_path"
30627   # Check if we need to convert this using DOS-style short mode. If the path
30628   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30629   # take no chances and rewrite it.
30630   # Note: m4 eats our [], so we need to use [ and ] instead.
30631   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30632   if test "x$has_forbidden_chars" != x; then
30633     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30634     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30635   fi
30636 
30637 
30638   windows_path="$new_path"
30639   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30640     unix_path=`$CYGPATH -u "$windows_path"`
30641     new_path="$unix_path"
30642   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30643     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30644     new_path="$unix_path"
30645   fi
30646 
30647   if test "x$path" != "x$new_path"; then
30648     IMPORT_MODULES_TOPDIR="$new_path"
30649     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30650 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30651   fi
30652 
30653   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30654   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30655 
30656     else
30657       # We're on a unix platform. Hooray! :)
30658       path="$IMPORT_MODULES_TOPDIR"
30659       has_space=`$ECHO "$path" | $GREP " "`
30660       if test "x$has_space" != x; then
30661         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30662 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30663         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30664       fi
30665 
30666       # Use eval to expand a potential ~
30667       eval path="$path"
30668       if test ! -f "$path" && test ! -d "$path"; then
30669         as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
30670       fi
30671 
30672       if test -d "$path"; then
30673         IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
30674       else
30675         dir="`$DIRNAME "$path"`"
30676         base="`$BASENAME "$path"`"
30677         IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
30678       fi
30679     fi
30680   fi
30681 
30682     elif test -e "$with_import_modules"; then
30683       IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
30684       $RM -rf "$IMPORT_MODULES_TOPDIR"
30685       $MKDIR -p "$IMPORT_MODULES_TOPDIR"
30686       if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
30687         as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30688       fi
30689     else
30690       as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30691     fi
30692   fi
30693 
30694   if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
30695     IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
30696   fi
30697   if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
30698     IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
30699   fi
30700   if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
30701     IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
30702   fi
30703   if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
30704     IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
30705   fi
30706   if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
30707     IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
30708   fi
30709   if test -d "$IMPORT_MODULES_TOPDIR/make"; then
30710     IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
30711   fi
30712 
30713 
30714 
30715 
30716 
30717 
30718 
30719 
30720 
30721 ###############################################################################
30722 #
30723 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
30724 # native code.
30725 #
30726 ###############################################################################
30727 
30728 # See if we are doing a complete static build or not
30729 
30730   # Check whether --enable-static-build was given.
30731 if test "${enable_static_build+set}" = set; then :
30732   enableval=$enable_static_build;
30733 fi
30734 
30735   STATIC_BUILD=false
30736   if test "x$enable_static_build" = "xyes"; then
30737     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30738 $as_echo_n "checking if static build is enabled... " >&6; }
30739     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30740 $as_echo "yes" >&6; }
30741     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
30742       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
30743     fi
30744     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
30745     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
30746     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
30747     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30748     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30749     STATIC_BUILD=true
30750   elif test "x$enable_static_build" = "xno"; then
30751     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30752 $as_echo_n "checking if static build is enabled... " >&6; }
30753     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30754 $as_echo "no" >&6; }
30755   elif test "x$enable_static_build" != "x"; then
30756     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
30757   fi
30758 
30759 
30760 
30761 
30762 # First determine the toolchain type (compiler family)
30763 
30764 
30765 # Check whether --with-toolchain-type was given.
30766 if test "${with_toolchain_type+set}" = set; then :
30767   withval=$with_toolchain_type;
30768 fi
30769 
30770 
30771   # Use indirect variable referencing
30772   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
30773   VALID_TOOLCHAINS=${!toolchain_var_name}
30774 
30775   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30776     if test -n "$XCODEBUILD"; then
30777       # On Mac OS X, default toolchain to clang after Xcode 5
30778       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
30779       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
30780       if test $? -ne 0; then
30781         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
30782       fi
30783       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
30784           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
30785           $CUT -f 1 -d .`
30786       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
30787 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
30788       if test $XCODE_MAJOR_VERSION -ge 5; then
30789           DEFAULT_TOOLCHAIN="clang"
30790       else
30791           DEFAULT_TOOLCHAIN="gcc"
30792       fi
30793     else
30794       # If Xcode is not installed, but the command line tools are
30795       # then we can't run xcodebuild. On these systems we should
30796       # default to clang
30797       DEFAULT_TOOLCHAIN="clang"
30798     fi
30799   else
30800     # First toolchain type in the list is the default
30801     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
30802   fi
30803 
30804   if test "x$with_toolchain_type" = xlist; then
30805     # List all toolchains
30806     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
30807 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
30808     for toolchain in $VALID_TOOLCHAINS; do
30809       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
30810       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30811       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
30812     done
30813 
30814     exit 0
30815   elif test "x$with_toolchain_type" != x; then
30816     # User override; check that it is valid
30817     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
30818       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
30819 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
30820       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
30821 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
30822       as_fn_error $? "Cannot continue." "$LINENO" 5
30823     fi
30824     TOOLCHAIN_TYPE=$with_toolchain_type
30825   else
30826     # No flag given, use default
30827     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
30828   fi
30829 
30830 
30831   TOOLCHAIN_CC_BINARY_clang="clang"
30832   TOOLCHAIN_CC_BINARY_gcc="gcc"
30833   TOOLCHAIN_CC_BINARY_microsoft="cl"
30834   TOOLCHAIN_CC_BINARY_solstudio="cc"
30835   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
30836 
30837   TOOLCHAIN_CXX_BINARY_clang="clang++"
30838   TOOLCHAIN_CXX_BINARY_gcc="g++"
30839   TOOLCHAIN_CXX_BINARY_microsoft="cl"
30840   TOOLCHAIN_CXX_BINARY_solstudio="CC"
30841   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
30842 
30843   # Use indirect variable referencing
30844   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
30845   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30846   toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
30847   TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
30848   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
30849   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
30850   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
30851   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
30852 
30853 
30854   # Define filename patterns
30855   if test "x$OPENJDK_TARGET_OS" = xwindows; then
30856     LIBRARY_PREFIX=
30857     SHARED_LIBRARY_SUFFIX='.dll'
30858     STATIC_LIBRARY_SUFFIX='.lib'
30859     SHARED_LIBRARY='$1.dll'
30860     STATIC_LIBRARY='$1.lib'
30861     OBJ_SUFFIX='.obj'
30862     EXE_SUFFIX='.exe'
30863   else
30864     LIBRARY_PREFIX=lib
30865     SHARED_LIBRARY_SUFFIX='.so'
30866     STATIC_LIBRARY_SUFFIX='.a'
30867     SHARED_LIBRARY='lib$1.so'
30868     STATIC_LIBRARY='lib$1.a'
30869     OBJ_SUFFIX='.o'
30870     EXE_SUFFIX=''
30871     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30872       # For full static builds, we're overloading the SHARED_LIBRARY
30873       # variables in order to limit the amount of changes required.
30874       # It would be better to remove SHARED and just use LIBRARY and
30875       # LIBRARY_SUFFIX for libraries that can be built either
30876       # shared or static and use STATIC_* for libraries that are
30877       # always built statically.
30878       if test "x$STATIC_BUILD" = xtrue; then
30879         SHARED_LIBRARY='lib$1.a'
30880         SHARED_LIBRARY_SUFFIX='.a'
30881       else
30882         SHARED_LIBRARY='lib$1.dylib'
30883         SHARED_LIBRARY_SUFFIX='.dylib'
30884       fi
30885     fi
30886   fi
30887 
30888 
30889 
30890 
30891 
30892 
30893 
30894 
30895 
30896 
30897   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
30898     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
30899 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
30900   else
30901     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
30902 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
30903   fi
30904 
30905 
30906 # User supplied flags should be used when configure detects compilers
30907 
30908   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
30909     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
30910 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
30911   fi
30912 
30913   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
30914     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
30915 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
30916   fi
30917 
30918   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
30919     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
30920 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
30921   fi
30922 
30923 
30924 # Check whether --with-extra-cflags was given.
30925 if test "${with_extra_cflags+set}" = set; then :
30926   withval=$with_extra_cflags;
30927 fi
30928 
30929 
30930 
30931 # Check whether --with-extra-cxxflags was given.
30932 if test "${with_extra_cxxflags+set}" = set; then :
30933   withval=$with_extra_cxxflags;
30934 fi
30935 
30936 
30937 
30938 # Check whether --with-extra-ldflags was given.
30939 if test "${with_extra_ldflags+set}" = set; then :
30940   withval=$with_extra_ldflags;
30941 fi
30942 
30943 
30944   EXTRA_CFLAGS="$with_extra_cflags"
30945   EXTRA_CXXFLAGS="$with_extra_cxxflags"
30946   EXTRA_LDFLAGS="$with_extra_ldflags"
30947 
30948   # Hotspot needs these set in their legacy form
30949   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
30950   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
30951   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
30952 
30953 
30954 
30955 
30956 
30957 
30958 
30959 
30960 
30961   # The global CFLAGS and LDLAGS variables are used by configure tests and
30962   # should include the extra parameters
30963   CFLAGS="$EXTRA_CFLAGS"
30964   CXXFLAGS="$EXTRA_CXXFLAGS"
30965   LDFLAGS="$EXTRA_LDFLAGS"
30966   CPPFLAGS=""
30967 
30968 # The sysroot cflags are needed for configure to be able to run the compilers
30969 
30970   if test "x$SYSROOT" != "x"; then
30971     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30972       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30973         # Solaris Studio does not have a concept of sysroot. Instead we must
30974         # make sure the default include and lib dirs are appended to each
30975         # compile and link command line. Must also add -I-xbuiltin to enable
30976         # inlining of system functions and intrinsics.
30977         SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
30978         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
30979             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
30980             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
30981       fi
30982     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
30983       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
30984       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
30985     elif test "x$TOOLCHAIN_TYPE" = xclang; then
30986       SYSROOT_CFLAGS="-isysroot $SYSROOT"
30987       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
30988     fi
30989     # Propagate the sysroot args to hotspot
30990     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
30991     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
30992     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
30993     # The global CFLAGS and LDFLAGS variables need these for configure to function
30994     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
30995     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
30996     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
30997     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
30998   fi
30999 
31000   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31001     # We also need -iframework<path>/System/Library/Frameworks
31002     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31003     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31004     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31005     # set this here so it doesn't have to be peppered throughout the forest
31006     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31007     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31008   fi
31009 
31010 
31011 
31012 
31013 
31014 # Then detect the actual binaries needed
31015 
31016   # FIXME: Is this needed?
31017   ac_ext=cpp
31018 ac_cpp='$CXXCPP $CPPFLAGS'
31019 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31020 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31021 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31022 
31023 
31024   # Store the CFLAGS etc passed to the configure script.
31025   ORG_CFLAGS="$CFLAGS"
31026   ORG_CXXFLAGS="$CXXFLAGS"
31027 
31028   # autoconf magic only relies on PATH, so update it if tools dir is specified
31029   OLD_PATH="$PATH"
31030 
31031   # On Windows, we need to detect the visual studio installation first.
31032   # This will change the PATH, but we need to keep that new PATH even
31033   # after toolchain detection is done, since the compiler (on x86) uses
31034   # it for DLL resolution in runtime.
31035   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31036       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31037 
31038   # Store path to cygwin link.exe to help excluding it when searching for
31039   # VS linker. This must be done before changing the PATH when looking for VS.
31040   # Extract the first word of "link", so it can be a program name with args.
31041 set dummy link; ac_word=$2
31042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31043 $as_echo_n "checking for $ac_word... " >&6; }
31044 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31045   $as_echo_n "(cached) " >&6
31046 else
31047   case $CYGWIN_LINK in
31048   [\\/]* | ?:[\\/]*)
31049   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31050   ;;
31051   *)
31052   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31053 for as_dir in $PATH
31054 do
31055   IFS=$as_save_IFS
31056   test -z "$as_dir" && as_dir=.
31057     for ac_exec_ext in '' $ac_executable_extensions; do
31058   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31059     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31060     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31061     break 2
31062   fi
31063 done
31064   done
31065 IFS=$as_save_IFS
31066 
31067   ;;
31068 esac
31069 fi
31070 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31071 if test -n "$CYGWIN_LINK"; then
31072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31073 $as_echo "$CYGWIN_LINK" >&6; }
31074 else
31075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31076 $as_echo "no" >&6; }
31077 fi
31078 
31079 
31080   if test "x$CYGWIN_LINK" != x; then
31081     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31082 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31083     "$CYGWIN_LINK" --version > /dev/null
31084     if test $? -eq 0 ; then
31085       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31086 $as_echo "yes" >&6; }
31087     else
31088       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31089 $as_echo "no" >&6; }
31090       # This might be the VS linker. Don't exclude it later on.
31091       CYGWIN_LINK=""
31092     fi
31093   fi
31094 
31095   # First-hand choice is to locate and run the vsvars bat file.
31096 
31097 
31098 # Check whether --with-toolchain-version was given.
31099 if test "${with_toolchain_version+set}" = set; then :
31100   withval=$with_toolchain_version;
31101 fi
31102 
31103 
31104   if test "x$with_toolchain_version" = xlist; then
31105     # List all toolchains
31106     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31107 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31108     for version in $VALID_VS_VERSIONS; do
31109       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31110       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31111     done
31112 
31113     exit 0
31114   elif test "x$DEVKIT_VS_VERSION" != x; then
31115     VS_VERSION=$DEVKIT_VS_VERSION
31116     TOOLCHAIN_VERSION=$VS_VERSION
31117     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31118     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31119     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31120     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31121     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31122     VS_PATH="$TOOLCHAIN_PATH:$PATH"
31123 
31124     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31125     # can still be exported as INCLUDE for compiler invocations without
31126     # SYSROOT_CFLAGS
31127     OLDIFS="$IFS"
31128     IFS=";"
31129     for i in $DEVKIT_VS_INCLUDE; do
31130       ipath=$i
31131 
31132   unix_path="$ipath"
31133   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31134     windows_path=`$CYGPATH -m "$unix_path"`
31135     ipath="$windows_path"
31136   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31137     windows_path=`cmd //c echo $unix_path`
31138     ipath="$windows_path"
31139   fi
31140 
31141       VS_INCLUDE="$VS_INCLUDE;$ipath"
31142     done
31143     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31144     # as LIB for compiler invocations without SYSROOT_LDFLAGS
31145     for i in $DEVKIT_VS_LIB; do
31146       libpath=$i
31147 
31148   unix_path="$libpath"
31149   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31150     windows_path=`$CYGPATH -m "$unix_path"`
31151     libpath="$windows_path"
31152   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31153     windows_path=`cmd //c echo $unix_path`
31154     libpath="$windows_path"
31155   fi
31156 
31157       VS_LIB="$VS_LIB;$libpath"
31158     done
31159     IFS="$OLDIFS"
31160 
31161     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31162 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31163 
31164   elif test "x$with_toolchain_version" != x; then
31165     # User override; check that it is valid
31166     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31167       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31168 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31169       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31170 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31171       as_fn_error $? "Cannot continue." "$LINENO" 5
31172     fi
31173     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31174   else
31175     # No flag given, use default
31176     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31177   fi
31178 
31179   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31180 
31181   VS_VERSION="$VS_VERSION"
31182   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31183   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31184   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31185   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31186 
31187   # When using --with-tools-dir, assume it points to the correct and default
31188   # version of Visual Studio or that --with-toolchain-version was also set.
31189   if test "x$with_tools_dir" != x; then
31190 
31191   if test "x$VS_ENV_CMD" = x; then
31192     VS_VERSION="${VS_VERSION}"
31193     VS_BASE="$with_tools_dir/../.."
31194     METHOD="--with-tools-dir"
31195 
31196     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31197       VCVARSFILE="vc/bin/vcvars32.bat"
31198     else
31199       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31200     fi
31201 
31202 
31203   windows_path="$VS_BASE"
31204   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31205     unix_path=`$CYGPATH -u "$windows_path"`
31206     VS_BASE="$unix_path"
31207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31208     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31209     VS_BASE="$unix_path"
31210   fi
31211 
31212     if test -d "$VS_BASE"; then
31213       if test -f "$VS_BASE/$VCVARSFILE"; then
31214         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31215 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31216         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31217         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31218         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31219         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31220       else
31221         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31222 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31223         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31224 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31225       fi
31226     fi
31227   fi
31228 
31229 
31230   if test "x$VS_ENV_CMD" = x; then
31231     VS_VERSION="${VS_VERSION}"
31232     VS_BASE="$with_tools_dir/../../.."
31233     METHOD="--with-tools-dir"
31234 
31235     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31236       VCVARSFILE="vc/bin/vcvars32.bat"
31237     else
31238       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31239     fi
31240 
31241 
31242   windows_path="$VS_BASE"
31243   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31244     unix_path=`$CYGPATH -u "$windows_path"`
31245     VS_BASE="$unix_path"
31246   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31247     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31248     VS_BASE="$unix_path"
31249   fi
31250 
31251     if test -d "$VS_BASE"; then
31252       if test -f "$VS_BASE/$VCVARSFILE"; then
31253         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31254 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31255         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31256         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31257         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31258         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31259       else
31260         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31261 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31262         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31263 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31264       fi
31265     fi
31266   fi
31267 
31268     if test "x$VS_ENV_CMD" = x; then
31269       # Having specified an argument which is incorrect will produce an instant failure;
31270       # we should not go on looking
31271       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31272 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31273       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31274 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31275       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31276 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31277       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31278     fi
31279   fi
31280 
31281   VS_ENV_CMD=""
31282   VS_ENV_ARGS=""
31283 
31284   if test "x$VS_COMNTOOLS" != x; then
31285 
31286   if test "x$VS_ENV_CMD" = x; then
31287     VS_VERSION="${VS_VERSION}"
31288     VS_BASE="$VS_COMNTOOLS/../.."
31289     METHOD="$VS_COMNTOOLS_VAR variable"
31290 
31291     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31292       VCVARSFILE="vc/bin/vcvars32.bat"
31293     else
31294       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31295     fi
31296 
31297 
31298   windows_path="$VS_BASE"
31299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31300     unix_path=`$CYGPATH -u "$windows_path"`
31301     VS_BASE="$unix_path"
31302   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31303     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31304     VS_BASE="$unix_path"
31305   fi
31306 
31307     if test -d "$VS_BASE"; then
31308       if test -f "$VS_BASE/$VCVARSFILE"; then
31309         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31310 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31311         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31312         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31313         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31314         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31315       else
31316         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31317 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31318         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31319 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31320       fi
31321     fi
31322   fi
31323 
31324   fi
31325   if test "x$PROGRAMFILES" != x; then
31326 
31327   if test "x$VS_ENV_CMD" = x; then
31328     VS_VERSION="${VS_VERSION}"
31329     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31330     METHOD="well-known name"
31331 
31332     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31333       VCVARSFILE="vc/bin/vcvars32.bat"
31334     else
31335       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31336     fi
31337 
31338 
31339   windows_path="$VS_BASE"
31340   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31341     unix_path=`$CYGPATH -u "$windows_path"`
31342     VS_BASE="$unix_path"
31343   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31344     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31345     VS_BASE="$unix_path"
31346   fi
31347 
31348     if test -d "$VS_BASE"; then
31349       if test -f "$VS_BASE/$VCVARSFILE"; then
31350         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31351 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31352         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31353         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31354         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31355         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31356       else
31357         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31358 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31359         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31360 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31361       fi
31362     fi
31363   fi
31364 
31365   fi
31366   # Work around the insanely named ProgramFiles(x86) env variable
31367   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31368   if test "x$PROGRAMFILES_X86" != x; then
31369 
31370   if test "x$VS_ENV_CMD" = x; then
31371     VS_VERSION="${VS_VERSION}"
31372     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31373     METHOD="well-known name"
31374 
31375     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31376       VCVARSFILE="vc/bin/vcvars32.bat"
31377     else
31378       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31379     fi
31380 
31381 
31382   windows_path="$VS_BASE"
31383   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31384     unix_path=`$CYGPATH -u "$windows_path"`
31385     VS_BASE="$unix_path"
31386   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31387     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31388     VS_BASE="$unix_path"
31389   fi
31390 
31391     if test -d "$VS_BASE"; then
31392       if test -f "$VS_BASE/$VCVARSFILE"; then
31393         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31394 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31395         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31396         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31397         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31398         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31399       else
31400         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31401 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31402         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31403 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31404       fi
31405     fi
31406   fi
31407 
31408   fi
31409 
31410   if test "x$VS_ENV_CMD" = x; then
31411     VS_VERSION="${VS_VERSION}"
31412     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31413     METHOD="well-known name"
31414 
31415     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31416       VCVARSFILE="vc/bin/vcvars32.bat"
31417     else
31418       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31419     fi
31420 
31421 
31422   windows_path="$VS_BASE"
31423   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31424     unix_path=`$CYGPATH -u "$windows_path"`
31425     VS_BASE="$unix_path"
31426   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31427     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31428     VS_BASE="$unix_path"
31429   fi
31430 
31431     if test -d "$VS_BASE"; then
31432       if test -f "$VS_BASE/$VCVARSFILE"; then
31433         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31434 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31435         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31436         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31437         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31438         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31439       else
31440         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31441 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31442         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31443 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31444       fi
31445     fi
31446   fi
31447 
31448 
31449   if test "x$VS_ENV_CMD" = x; then
31450     VS_VERSION="${VS_VERSION}"
31451     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31452     METHOD="well-known name"
31453 
31454     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31455       VCVARSFILE="vc/bin/vcvars32.bat"
31456     else
31457       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31458     fi
31459 
31460 
31461   windows_path="$VS_BASE"
31462   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31463     unix_path=`$CYGPATH -u "$windows_path"`
31464     VS_BASE="$unix_path"
31465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31466     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31467     VS_BASE="$unix_path"
31468   fi
31469 
31470     if test -d "$VS_BASE"; then
31471       if test -f "$VS_BASE/$VCVARSFILE"; then
31472         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31473 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31474         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31475         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31476         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31477         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31478       else
31479         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31480 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31481         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31482 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31483       fi
31484     fi
31485   fi
31486 
31487 
31488   if test "x$SDK_INSTALL_DIR" != x; then
31489     if test "x$ProgramW6432" != x; then
31490 
31491   if test "x$VS_ENV_CMD" = x; then
31492     VS_VERSION="${VS_VERSION}"
31493     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31494     METHOD="well-known name"
31495 
31496   windows_path="$WIN_SDK_BASE"
31497   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31498     unix_path=`$CYGPATH -u "$windows_path"`
31499     WIN_SDK_BASE="$unix_path"
31500   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31501     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31502     WIN_SDK_BASE="$unix_path"
31503   fi
31504 
31505     if test -d "$WIN_SDK_BASE"; then
31506       # There have been cases of partial or broken SDK installations. A missing
31507       # lib dir is not going to work.
31508       if test ! -d "$WIN_SDK_BASE/lib"; then
31509         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31510 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31511         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31512 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31513       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31514         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31515 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31516         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31517         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31518           VS_ENV_ARGS="/x86"
31519         else
31520           VS_ENV_ARGS="/x64"
31521         fi
31522         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31523         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31524         # TODO: improve detection for other versions of SDK
31525         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31526       else
31527         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31528 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31529         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31530 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31531       fi
31532     fi
31533   fi
31534 
31535     fi
31536     if test "x$PROGRAMW6432" != x; then
31537 
31538   if test "x$VS_ENV_CMD" = x; then
31539     VS_VERSION="${VS_VERSION}"
31540     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
31541     METHOD="well-known name"
31542 
31543   windows_path="$WIN_SDK_BASE"
31544   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31545     unix_path=`$CYGPATH -u "$windows_path"`
31546     WIN_SDK_BASE="$unix_path"
31547   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31548     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31549     WIN_SDK_BASE="$unix_path"
31550   fi
31551 
31552     if test -d "$WIN_SDK_BASE"; then
31553       # There have been cases of partial or broken SDK installations. A missing
31554       # lib dir is not going to work.
31555       if test ! -d "$WIN_SDK_BASE/lib"; then
31556         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31557 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31558         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31559 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31560       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31561         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31562 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31563         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31564         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31565           VS_ENV_ARGS="/x86"
31566         else
31567           VS_ENV_ARGS="/x64"
31568         fi
31569         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31570         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31571         # TODO: improve detection for other versions of SDK
31572         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31573       else
31574         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31575 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31576         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31577 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31578       fi
31579     fi
31580   fi
31581 
31582     fi
31583     if test "x$PROGRAMFILES" != x; then
31584 
31585   if test "x$VS_ENV_CMD" = x; then
31586     VS_VERSION="${VS_VERSION}"
31587     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
31588     METHOD="well-known name"
31589 
31590   windows_path="$WIN_SDK_BASE"
31591   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31592     unix_path=`$CYGPATH -u "$windows_path"`
31593     WIN_SDK_BASE="$unix_path"
31594   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31595     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31596     WIN_SDK_BASE="$unix_path"
31597   fi
31598 
31599     if test -d "$WIN_SDK_BASE"; then
31600       # There have been cases of partial or broken SDK installations. A missing
31601       # lib dir is not going to work.
31602       if test ! -d "$WIN_SDK_BASE/lib"; then
31603         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31604 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31605         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31606 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31607       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31608         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31609 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31610         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31611         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31612           VS_ENV_ARGS="/x86"
31613         else
31614           VS_ENV_ARGS="/x64"
31615         fi
31616         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31617         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31618         # TODO: improve detection for other versions of SDK
31619         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31620       else
31621         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31622 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31623         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31624 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31625       fi
31626     fi
31627   fi
31628 
31629     fi
31630 
31631   if test "x$VS_ENV_CMD" = x; then
31632     VS_VERSION="${VS_VERSION}"
31633     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
31634     METHOD="well-known name"
31635 
31636   windows_path="$WIN_SDK_BASE"
31637   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31638     unix_path=`$CYGPATH -u "$windows_path"`
31639     WIN_SDK_BASE="$unix_path"
31640   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31641     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31642     WIN_SDK_BASE="$unix_path"
31643   fi
31644 
31645     if test -d "$WIN_SDK_BASE"; then
31646       # There have been cases of partial or broken SDK installations. A missing
31647       # lib dir is not going to work.
31648       if test ! -d "$WIN_SDK_BASE/lib"; then
31649         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31650 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31651         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31652 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31653       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31654         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31655 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31656         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31657         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31658           VS_ENV_ARGS="/x86"
31659         else
31660           VS_ENV_ARGS="/x64"
31661         fi
31662         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31663         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31664         # TODO: improve detection for other versions of SDK
31665         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31666       else
31667         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31668 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31669         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31670 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31671       fi
31672     fi
31673   fi
31674 
31675 
31676   if test "x$VS_ENV_CMD" = x; then
31677     VS_VERSION="${VS_VERSION}"
31678     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
31679     METHOD="well-known name"
31680 
31681   windows_path="$WIN_SDK_BASE"
31682   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31683     unix_path=`$CYGPATH -u "$windows_path"`
31684     WIN_SDK_BASE="$unix_path"
31685   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31686     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31687     WIN_SDK_BASE="$unix_path"
31688   fi
31689 
31690     if test -d "$WIN_SDK_BASE"; then
31691       # There have been cases of partial or broken SDK installations. A missing
31692       # lib dir is not going to work.
31693       if test ! -d "$WIN_SDK_BASE/lib"; then
31694         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31695 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31696         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31697 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31698       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31699         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31700 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31701         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31702         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31703           VS_ENV_ARGS="/x86"
31704         else
31705           VS_ENV_ARGS="/x64"
31706         fi
31707         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31708         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31709         # TODO: improve detection for other versions of SDK
31710         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31711       else
31712         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31713 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31714         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31715 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31716       fi
31717     fi
31718   fi
31719 
31720   fi
31721 
31722     if test "x$VS_ENV_CMD" != x; then
31723       TOOLCHAIN_VERSION=$VS_VERSION
31724       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31725       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31726       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31727       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31728       # The rest of the variables are already evaled while probing
31729       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
31730 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
31731       break
31732     fi
31733   done
31734 
31735 
31736   # If we have a devkit, skip all of the below.
31737   if test "x$DEVKIT_VS_VERSION" = x; then
31738     if test "x$VS_ENV_CMD" != x; then
31739       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
31740 
31741   # Only process if variable expands to non-empty
31742 
31743   if test "x$VS_ENV_CMD" != x; then
31744     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31745 
31746   # First separate the path from the arguments. This will split at the first
31747   # space.
31748   complete="$VS_ENV_CMD"
31749   path="${complete%% *}"
31750   tmp="$complete EOL"
31751   arguments="${tmp#* }"
31752 
31753   # Input might be given as Windows format, start by converting to
31754   # unix format.
31755   new_path=`$CYGPATH -u "$path"`
31756 
31757   # Now try to locate executable using which
31758   new_path=`$WHICH "$new_path" 2> /dev/null`
31759   # bat and cmd files are not always considered executable in cygwin causing which
31760   # to not find them
31761   if test "x$new_path" = x \
31762       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31763       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31764     new_path=`$CYGPATH -u "$path"`
31765   fi
31766   if test "x$new_path" = x; then
31767     # Oops. Which didn't find the executable.
31768     # The splitting of arguments from the executable at a space might have been incorrect,
31769     # since paths with space are more likely in Windows. Give it another try with the whole
31770     # argument.
31771     path="$complete"
31772     arguments="EOL"
31773     new_path=`$CYGPATH -u "$path"`
31774     new_path=`$WHICH "$new_path" 2> /dev/null`
31775     # bat and cmd files are not always considered executable in cygwin causing which
31776     # to not find them
31777     if test "x$new_path" = x \
31778         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31779         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31780       new_path=`$CYGPATH -u "$path"`
31781     fi
31782     if test "x$new_path" = x; then
31783       # It's still not found. Now this is an unrecoverable error.
31784       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31785 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31786       has_space=`$ECHO "$complete" | $GREP " "`
31787       if test "x$has_space" != x; then
31788         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31789 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31790       fi
31791       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31792     fi
31793   fi
31794 
31795   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31796   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31797   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31798   # "foo.exe" is OK but "foo" is an error.
31799   #
31800   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31801   # It is also a way to make sure we got the proper file name for the real test later on.
31802   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31803   if test "x$test_shortpath" = x; then
31804     # Short path failed, file does not exist as specified.
31805     # Try adding .exe or .cmd
31806     if test -f "${new_path}.exe"; then
31807       input_to_shortpath="${new_path}.exe"
31808     elif test -f "${new_path}.cmd"; then
31809       input_to_shortpath="${new_path}.cmd"
31810     else
31811       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
31812 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
31813       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31814 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31815       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31816     fi
31817   else
31818     input_to_shortpath="$new_path"
31819   fi
31820 
31821   # Call helper function which possibly converts this using DOS-style short mode.
31822   # If so, the updated path is stored in $new_path.
31823   new_path="$input_to_shortpath"
31824 
31825   input_path="$input_to_shortpath"
31826   # Check if we need to convert this using DOS-style short mode. If the path
31827   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31828   # take no chances and rewrite it.
31829   # Note: m4 eats our [], so we need to use [ and ] instead.
31830   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31831   if test "x$has_forbidden_chars" != x; then
31832     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31833     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31834     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31835     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31836       # Going to short mode and back again did indeed matter. Since short mode is
31837       # case insensitive, let's make it lowercase to improve readability.
31838       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31839       # Now convert it back to Unix-style (cygpath)
31840       input_path=`$CYGPATH -u "$shortmode_path"`
31841       new_path="$input_path"
31842     fi
31843   fi
31844 
31845   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31846   if test "x$test_cygdrive_prefix" = x; then
31847     # As a simple fix, exclude /usr/bin since it's not a real path.
31848     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31849       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31850       # a path prefixed by /cygdrive for fixpath to work.
31851       new_path="$CYGWIN_ROOT_PATH$input_path"
31852     fi
31853   fi
31854 
31855   # remove trailing .exe if any
31856   new_path="${new_path/%.exe/}"
31857 
31858     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31859 
31860   # First separate the path from the arguments. This will split at the first
31861   # space.
31862   complete="$VS_ENV_CMD"
31863   path="${complete%% *}"
31864   tmp="$complete EOL"
31865   arguments="${tmp#* }"
31866 
31867   # Input might be given as Windows format, start by converting to
31868   # unix format.
31869   new_path="$path"
31870 
31871   windows_path="$new_path"
31872   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31873     unix_path=`$CYGPATH -u "$windows_path"`
31874     new_path="$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     new_path="$unix_path"
31878   fi
31879 
31880 
31881   # Now try to locate executable using which
31882   new_path=`$WHICH "$new_path" 2> /dev/null`
31883 
31884   if test "x$new_path" = x; then
31885     # Oops. Which didn't find the executable.
31886     # The splitting of arguments from the executable at a space might have been incorrect,
31887     # since paths with space are more likely in Windows. Give it another try with the whole
31888     # argument.
31889     path="$complete"
31890     arguments="EOL"
31891     new_path="$path"
31892 
31893   windows_path="$new_path"
31894   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31895     unix_path=`$CYGPATH -u "$windows_path"`
31896     new_path="$unix_path"
31897   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31898     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31899     new_path="$unix_path"
31900   fi
31901 
31902 
31903     new_path=`$WHICH "$new_path" 2> /dev/null`
31904     # bat and cmd files are not always considered executable in MSYS causing which
31905     # to not find them
31906     if test "x$new_path" = x \
31907         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31908         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31909       new_path="$path"
31910 
31911   windows_path="$new_path"
31912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31913     unix_path=`$CYGPATH -u "$windows_path"`
31914     new_path="$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     new_path="$unix_path"
31918   fi
31919 
31920     fi
31921 
31922     if test "x$new_path" = x; then
31923       # It's still not found. Now this is an unrecoverable error.
31924       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31925 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31926       has_space=`$ECHO "$complete" | $GREP " "`
31927       if test "x$has_space" != x; then
31928         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31929 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31930       fi
31931       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31932     fi
31933   fi
31934 
31935   # Now new_path has a complete unix path to the binary
31936   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31937     # Keep paths in /bin as-is, but remove trailing .exe if any
31938     new_path="${new_path/%.exe/}"
31939     # Do not save /bin paths to all_fixpath_prefixes!
31940   else
31941     # Not in mixed or Windows style, start by that.
31942     new_path=`cmd //c echo $new_path`
31943 
31944   input_path="$new_path"
31945   # Check if we need to convert this using DOS-style short mode. If the path
31946   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31947   # take no chances and rewrite it.
31948   # Note: m4 eats our [], so we need to use [ and ] instead.
31949   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31950   if test "x$has_forbidden_chars" != x; then
31951     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31952     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31953   fi
31954 
31955     # Output is in $new_path
31956 
31957   windows_path="$new_path"
31958   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31959     unix_path=`$CYGPATH -u "$windows_path"`
31960     new_path="$unix_path"
31961   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31962     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31963     new_path="$unix_path"
31964   fi
31965 
31966     # remove trailing .exe if any
31967     new_path="${new_path/%.exe/}"
31968 
31969     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31970     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31971   fi
31972 
31973     else
31974       # We're on a unix platform. Hooray! :)
31975       # First separate the path from the arguments. This will split at the first
31976       # space.
31977       complete="$VS_ENV_CMD"
31978       path="${complete%% *}"
31979       tmp="$complete EOL"
31980       arguments="${tmp#* }"
31981 
31982       # Cannot rely on the command "which" here since it doesn't always work.
31983       is_absolute_path=`$ECHO "$path" | $GREP ^/`
31984       if test -z "$is_absolute_path"; then
31985         # Path to executable is not absolute. Find it.
31986         IFS_save="$IFS"
31987         IFS=:
31988         for p in $PATH; do
31989           if test -f "$p/$path" && test -x "$p/$path"; then
31990             new_path="$p/$path"
31991             break
31992           fi
31993         done
31994         IFS="$IFS_save"
31995       else
31996         # This is an absolute path, we can use it without further modifications.
31997         new_path="$path"
31998       fi
31999 
32000       if test "x$new_path" = x; then
32001         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32002 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32003         has_space=`$ECHO "$complete" | $GREP " "`
32004         if test "x$has_space" != x; then
32005           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32006 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32007         fi
32008         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32009       fi
32010     fi
32011 
32012     # Now join together the path and the arguments once again
32013     if test "x$arguments" != xEOL; then
32014       new_complete="$new_path ${arguments% *}"
32015     else
32016       new_complete="$new_path"
32017     fi
32018 
32019     if test "x$complete" != "x$new_complete"; then
32020       VS_ENV_CMD="$new_complete"
32021       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32022 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32023     fi
32024   fi
32025 
32026 
32027       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32028       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32029 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32030 
32031       # We need to create a couple of temporary files.
32032       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32033       $MKDIR -p $VS_ENV_TMP_DIR
32034 
32035       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32036       # Instead create a shell script which will set the relevant variables when run.
32037       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32038 
32039   unix_path="$WINPATH_VS_ENV_CMD"
32040   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32041     windows_path=`$CYGPATH -m "$unix_path"`
32042     WINPATH_VS_ENV_CMD="$windows_path"
32043   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32044     windows_path=`cmd //c echo $unix_path`
32045     WINPATH_VS_ENV_CMD="$windows_path"
32046   fi
32047 
32048       WINPATH_BASH="$BASH"
32049 
32050   unix_path="$WINPATH_BASH"
32051   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32052     windows_path=`$CYGPATH -m "$unix_path"`
32053     WINPATH_BASH="$windows_path"
32054   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32055     windows_path=`cmd //c echo $unix_path`
32056     WINPATH_BASH="$windows_path"
32057   fi
32058 
32059 
32060       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32061       # script (executable by bash) that will setup the important variables.
32062       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32063       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32064       # This will end up something like:
32065       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32066       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32067       # These will end up something like:
32068       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32069       # The trailing space for everyone except PATH is no typo, but is needed due
32070       # to trailing \ in the Windows paths. These will be stripped later.
32071       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32072           >> $EXTRACT_VC_ENV_BAT_FILE
32073       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32074           >> $EXTRACT_VC_ENV_BAT_FILE
32075       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32076           >> $EXTRACT_VC_ENV_BAT_FILE
32077       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32078           >> $EXTRACT_VC_ENV_BAT_FILE
32079       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32080           >> $EXTRACT_VC_ENV_BAT_FILE
32081       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32082           >> $EXTRACT_VC_ENV_BAT_FILE
32083 
32084       # Now execute the newly created bat file.
32085       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32086       # Change directory so we don't need to mess with Windows paths in redirects.
32087       cd $VS_ENV_TMP_DIR
32088       cmd /c extract-vs-env.bat | $CAT
32089       cd $CURDIR
32090 
32091       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32092         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32093 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32094         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32095 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32096         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32097 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32098         as_fn_error $? "Cannot continue" "$LINENO" 5
32099       fi
32100 
32101       # Now set all paths and other env variables. This will allow the rest of
32102       # the configure script to find and run the compiler in the proper way.
32103       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32104 $as_echo "$as_me: Setting extracted environment variables" >&6;}
32105       . $VS_ENV_TMP_DIR/set-vs-env.sh
32106       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32107       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32108     else
32109       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32110       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32111 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32112     fi
32113   fi
32114 
32115   # At this point, we should have correct variables in the environment, or we can't continue.
32116   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32117 $as_echo_n "checking for Visual Studio variables... " >&6; }
32118 
32119   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32120       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32121     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32122       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32123 $as_echo "present but broken" >&6; }
32124       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32125     else
32126       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32127 $as_echo "ok" >&6; }
32128       # Remove any trailing "\" ";" and " " from the variables.
32129       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32130       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32131       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32132       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32133       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32134       # Remove any paths containing # (typically F#) as that messes up make. This
32135       # is needed if visual studio was installed with F# support.
32136       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32137 
32138 
32139 
32140 
32141 
32142       # Convert VS_INCLUDE into SYSROOT_CFLAGS
32143       OLDIFS="$IFS"
32144       IFS=";"
32145       for i in $VS_INCLUDE; do
32146         ipath=$i
32147         # Only process non-empty elements
32148         if test "x$ipath" != x; then
32149           IFS="$OLDIFS"
32150           # Check that directory exists before calling fixup_path
32151           testpath=$ipath
32152 
32153   windows_path="$testpath"
32154   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32155     unix_path=`$CYGPATH -u "$windows_path"`
32156     testpath="$unix_path"
32157   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32158     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32159     testpath="$unix_path"
32160   fi
32161 
32162           if test -d "$testpath"; then
32163 
32164   # Only process if variable expands to non-empty
32165 
32166   if test "x$ipath" != x; then
32167     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32168 
32169   # Input might be given as Windows format, start by converting to
32170   # unix format.
32171   path="$ipath"
32172   new_path=`$CYGPATH -u "$path"`
32173 
32174   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32175   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32176   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32177   # "foo.exe" is OK but "foo" is an error.
32178   #
32179   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32180   # It is also a way to make sure we got the proper file name for the real test later on.
32181   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32182   if test "x$test_shortpath" = x; then
32183     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32184 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32185     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32186   fi
32187 
32188   # Call helper function which possibly converts this using DOS-style short mode.
32189   # If so, the updated path is stored in $new_path.
32190 
32191   input_path="$new_path"
32192   # Check if we need to convert this using DOS-style short mode. If the path
32193   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32194   # take no chances and rewrite it.
32195   # Note: m4 eats our [], so we need to use [ and ] instead.
32196   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32197   if test "x$has_forbidden_chars" != x; then
32198     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32199     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32200     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32201     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32202       # Going to short mode and back again did indeed matter. Since short mode is
32203       # case insensitive, let's make it lowercase to improve readability.
32204       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32205       # Now convert it back to Unix-style (cygpath)
32206       input_path=`$CYGPATH -u "$shortmode_path"`
32207       new_path="$input_path"
32208     fi
32209   fi
32210 
32211   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32212   if test "x$test_cygdrive_prefix" = x; then
32213     # As a simple fix, exclude /usr/bin since it's not a real path.
32214     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32215       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32216       # a path prefixed by /cygdrive for fixpath to work.
32217       new_path="$CYGWIN_ROOT_PATH$input_path"
32218     fi
32219   fi
32220 
32221 
32222   if test "x$path" != "x$new_path"; then
32223     ipath="$new_path"
32224     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32225 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32226   fi
32227 
32228     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32229 
32230   path="$ipath"
32231   has_colon=`$ECHO $path | $GREP ^.:`
32232   new_path="$path"
32233   if test "x$has_colon" = x; then
32234     # Not in mixed or Windows style, start by that.
32235     new_path=`cmd //c echo $path`
32236   fi
32237 
32238 
32239   input_path="$new_path"
32240   # Check if we need to convert this using DOS-style short mode. If the path
32241   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32242   # take no chances and rewrite it.
32243   # Note: m4 eats our [], so we need to use [ and ] instead.
32244   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32245   if test "x$has_forbidden_chars" != x; then
32246     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32247     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32248   fi
32249 
32250 
32251   windows_path="$new_path"
32252   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32253     unix_path=`$CYGPATH -u "$windows_path"`
32254     new_path="$unix_path"
32255   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32256     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32257     new_path="$unix_path"
32258   fi
32259 
32260   if test "x$path" != "x$new_path"; then
32261     ipath="$new_path"
32262     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32263 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32264   fi
32265 
32266   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32267   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32268 
32269     else
32270       # We're on a unix platform. Hooray! :)
32271       path="$ipath"
32272       has_space=`$ECHO "$path" | $GREP " "`
32273       if test "x$has_space" != x; then
32274         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32275 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32276         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32277       fi
32278 
32279       # Use eval to expand a potential ~
32280       eval path="$path"
32281       if test ! -f "$path" && test ! -d "$path"; then
32282         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32283       fi
32284 
32285       if test -d "$path"; then
32286         ipath="`cd "$path"; $THEPWDCMD -L`"
32287       else
32288         dir="`$DIRNAME "$path"`"
32289         base="`$BASENAME "$path"`"
32290         ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32291       fi
32292     fi
32293   fi
32294 
32295             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32296           fi
32297           IFS=";"
32298         fi
32299       done
32300       # Convert VS_LIB into SYSROOT_LDFLAGS
32301       for i in $VS_LIB; do
32302         libpath=$i
32303         # Only process non-empty elements
32304         if test "x$libpath" != x; then
32305           IFS="$OLDIFS"
32306           # Check that directory exists before calling fixup_path
32307           testpath=$libpath
32308 
32309   windows_path="$testpath"
32310   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32311     unix_path=`$CYGPATH -u "$windows_path"`
32312     testpath="$unix_path"
32313   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32314     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32315     testpath="$unix_path"
32316   fi
32317 
32318           if test -d "$testpath"; then
32319 
32320   # Only process if variable expands to non-empty
32321 
32322   if test "x$libpath" != x; then
32323     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32324 
32325   # Input might be given as Windows format, start by converting to
32326   # unix format.
32327   path="$libpath"
32328   new_path=`$CYGPATH -u "$path"`
32329 
32330   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32331   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32332   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32333   # "foo.exe" is OK but "foo" is an error.
32334   #
32335   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32336   # It is also a way to make sure we got the proper file name for the real test later on.
32337   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32338   if test "x$test_shortpath" = x; then
32339     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32340 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32341     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32342   fi
32343 
32344   # Call helper function which possibly converts this using DOS-style short mode.
32345   # If so, the updated path is stored in $new_path.
32346 
32347   input_path="$new_path"
32348   # Check if we need to convert this using DOS-style short mode. If the path
32349   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32350   # take no chances and rewrite it.
32351   # Note: m4 eats our [], so we need to use [ and ] instead.
32352   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32353   if test "x$has_forbidden_chars" != x; then
32354     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32355     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32356     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32357     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32358       # Going to short mode and back again did indeed matter. Since short mode is
32359       # case insensitive, let's make it lowercase to improve readability.
32360       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32361       # Now convert it back to Unix-style (cygpath)
32362       input_path=`$CYGPATH -u "$shortmode_path"`
32363       new_path="$input_path"
32364     fi
32365   fi
32366 
32367   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32368   if test "x$test_cygdrive_prefix" = x; then
32369     # As a simple fix, exclude /usr/bin since it's not a real path.
32370     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32371       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32372       # a path prefixed by /cygdrive for fixpath to work.
32373       new_path="$CYGWIN_ROOT_PATH$input_path"
32374     fi
32375   fi
32376 
32377 
32378   if test "x$path" != "x$new_path"; then
32379     libpath="$new_path"
32380     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32381 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32382   fi
32383 
32384     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32385 
32386   path="$libpath"
32387   has_colon=`$ECHO $path | $GREP ^.:`
32388   new_path="$path"
32389   if test "x$has_colon" = x; then
32390     # Not in mixed or Windows style, start by that.
32391     new_path=`cmd //c echo $path`
32392   fi
32393 
32394 
32395   input_path="$new_path"
32396   # Check if we need to convert this using DOS-style short mode. If the path
32397   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32398   # take no chances and rewrite it.
32399   # Note: m4 eats our [], so we need to use [ and ] instead.
32400   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32401   if test "x$has_forbidden_chars" != x; then
32402     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32403     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32404   fi
32405 
32406 
32407   windows_path="$new_path"
32408   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32409     unix_path=`$CYGPATH -u "$windows_path"`
32410     new_path="$unix_path"
32411   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32412     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32413     new_path="$unix_path"
32414   fi
32415 
32416   if test "x$path" != "x$new_path"; then
32417     libpath="$new_path"
32418     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32419 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32420   fi
32421 
32422   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32423   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32424 
32425     else
32426       # We're on a unix platform. Hooray! :)
32427       path="$libpath"
32428       has_space=`$ECHO "$path" | $GREP " "`
32429       if test "x$has_space" != x; then
32430         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32431 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32432         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32433       fi
32434 
32435       # Use eval to expand a potential ~
32436       eval path="$path"
32437       if test ! -f "$path" && test ! -d "$path"; then
32438         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32439       fi
32440 
32441       if test -d "$path"; then
32442         libpath="`cd "$path"; $THEPWDCMD -L`"
32443       else
32444         dir="`$DIRNAME "$path"`"
32445         base="`$BASENAME "$path"`"
32446         libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32447       fi
32448     fi
32449   fi
32450 
32451             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32452           fi
32453           IFS=";"
32454         fi
32455       done
32456       IFS="$OLDIFS"
32457     fi
32458   else
32459     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32460 $as_echo "not found" >&6; }
32461 
32462     if test "x$VS_ENV_CMD" = x; then
32463       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32464 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32465       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32466 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32467     else
32468       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32469 $as_echo "$as_me: Running the extraction script failed." >&6;}
32470     fi
32471     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32472 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32473     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32474 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32475     as_fn_error $? "Cannot continue" "$LINENO" 5
32476   fi
32477 
32478     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32479     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32480     PATH="$VS_PATH"
32481     # The microsoft toolchain also requires INCLUDE and LIB to be set.
32482     export INCLUDE="$VS_INCLUDE"
32483     export LIB="$VS_LIB"
32484   else
32485     if test "x$XCODE_VERSION_OUTPUT" != x; then
32486       # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32487       TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32488       TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32489     else
32490       # Currently we do not define this for other toolchains. This might change as the need arise.
32491       TOOLCHAIN_VERSION=
32492     fi
32493   fi
32494 
32495 
32496   # For solaris we really need solaris tools, and not the GNU equivalent.
32497   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32498   # so add that to path before starting to probe.
32499   # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32500   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32501     PATH="/usr/ccs/bin:$PATH"
32502   fi
32503 
32504   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32505   # override all other locations.
32506   if test "x$TOOLCHAIN_PATH" != x; then
32507     PATH=$TOOLCHAIN_PATH:$PATH
32508   fi
32509 
32510 
32511   #
32512   # Setup the compilers (CC and CXX)
32513   #
32514 
32515   COMPILER_NAME=C
32516   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32517 
32518   if test "x$CC" != x; then
32519     # User has supplied compiler name already, always let that override.
32520     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32521 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32522     if test "x`basename $CC`" = "x$CC"; then
32523       # A command without a complete path is provided, search $PATH.
32524 
32525       for ac_prog in $CC
32526 do
32527   # Extract the first word of "$ac_prog", so it can be a program name with args.
32528 set dummy $ac_prog; ac_word=$2
32529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32530 $as_echo_n "checking for $ac_word... " >&6; }
32531 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32532   $as_echo_n "(cached) " >&6
32533 else
32534   case $POTENTIAL_CC in
32535   [\\/]* | ?:[\\/]*)
32536   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32537   ;;
32538   *)
32539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32540 for as_dir in $PATH
32541 do
32542   IFS=$as_save_IFS
32543   test -z "$as_dir" && as_dir=.
32544     for ac_exec_ext in '' $ac_executable_extensions; do
32545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32546     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32548     break 2
32549   fi
32550 done
32551   done
32552 IFS=$as_save_IFS
32553 
32554   ;;
32555 esac
32556 fi
32557 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32558 if test -n "$POTENTIAL_CC"; then
32559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32560 $as_echo "$POTENTIAL_CC" >&6; }
32561 else
32562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32563 $as_echo "no" >&6; }
32564 fi
32565 
32566 
32567   test -n "$POTENTIAL_CC" && break
32568 done
32569 
32570       if test "x$POTENTIAL_CC" != x; then
32571         CC=$POTENTIAL_CC
32572       else
32573         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
32574       fi
32575     else
32576       # Otherwise it might already be a complete path
32577       if test ! -x "$CC"; then
32578         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
32579       fi
32580     fi
32581   else
32582     # No user supplied value. Locate compiler ourselves.
32583 
32584     # If we are cross compiling, assume cross compilation tools follows the
32585     # cross compilation standard where they are prefixed with the autoconf
32586     # standard name for the target. For example the binary
32587     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32588     # If we are not cross compiling, then the default compiler name will be
32589     # used.
32590 
32591     CC=
32592     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32593     # before checking the rest of the PATH.
32594     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32595     # step, this should not be necessary.
32596     if test -n "$TOOLCHAIN_PATH"; then
32597       PATH_save="$PATH"
32598       PATH="$TOOLCHAIN_PATH"
32599       for ac_prog in $SEARCH_LIST
32600 do
32601   # Extract the first word of "$ac_prog", so it can be a program name with args.
32602 set dummy $ac_prog; ac_word=$2
32603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32604 $as_echo_n "checking for $ac_word... " >&6; }
32605 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
32606   $as_echo_n "(cached) " >&6
32607 else
32608   case $TOOLCHAIN_PATH_CC in
32609   [\\/]* | ?:[\\/]*)
32610   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
32611   ;;
32612   *)
32613   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32614 for as_dir in $PATH
32615 do
32616   IFS=$as_save_IFS
32617   test -z "$as_dir" && as_dir=.
32618     for ac_exec_ext in '' $ac_executable_extensions; do
32619   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32620     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
32621     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32622     break 2
32623   fi
32624 done
32625   done
32626 IFS=$as_save_IFS
32627 
32628   ;;
32629 esac
32630 fi
32631 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
32632 if test -n "$TOOLCHAIN_PATH_CC"; then
32633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
32634 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
32635 else
32636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32637 $as_echo "no" >&6; }
32638 fi
32639 
32640 
32641   test -n "$TOOLCHAIN_PATH_CC" && break
32642 done
32643 
32644       CC=$TOOLCHAIN_PATH_CC
32645       PATH="$PATH_save"
32646     fi
32647 
32648     # AC_PATH_PROGS can't be run multiple times with the same variable,
32649     # so create a new name for this run.
32650     if test "x$CC" = x; then
32651       for ac_prog in $SEARCH_LIST
32652 do
32653   # Extract the first word of "$ac_prog", so it can be a program name with args.
32654 set dummy $ac_prog; ac_word=$2
32655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32656 $as_echo_n "checking for $ac_word... " >&6; }
32657 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32658   $as_echo_n "(cached) " >&6
32659 else
32660   case $POTENTIAL_CC in
32661   [\\/]* | ?:[\\/]*)
32662   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32663   ;;
32664   *)
32665   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32666 for as_dir in $PATH
32667 do
32668   IFS=$as_save_IFS
32669   test -z "$as_dir" && as_dir=.
32670     for ac_exec_ext in '' $ac_executable_extensions; do
32671   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32672     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32673     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32674     break 2
32675   fi
32676 done
32677   done
32678 IFS=$as_save_IFS
32679 
32680   ;;
32681 esac
32682 fi
32683 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32684 if test -n "$POTENTIAL_CC"; then
32685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32686 $as_echo "$POTENTIAL_CC" >&6; }
32687 else
32688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32689 $as_echo "no" >&6; }
32690 fi
32691 
32692 
32693   test -n "$POTENTIAL_CC" && break
32694 done
32695 
32696       CC=$POTENTIAL_CC
32697     fi
32698 
32699     if test "x$CC" = x; then
32700 
32701   # Print a helpful message on how to acquire the necessary build dependency.
32702   # devkit is the help tag: freetype, cups, alsa etc
32703   MISSING_DEPENDENCY=devkit
32704 
32705   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32706     cygwin_help $MISSING_DEPENDENCY
32707   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32708     msys_help $MISSING_DEPENDENCY
32709   else
32710     PKGHANDLER_COMMAND=
32711 
32712     case $PKGHANDLER in
32713       apt-get)
32714         apt_help     $MISSING_DEPENDENCY ;;
32715       yum)
32716         yum_help     $MISSING_DEPENDENCY ;;
32717       port)
32718         port_help    $MISSING_DEPENDENCY ;;
32719       pkgutil)
32720         pkgutil_help $MISSING_DEPENDENCY ;;
32721       pkgadd)
32722         pkgadd_help  $MISSING_DEPENDENCY ;;
32723     esac
32724 
32725     if test "x$PKGHANDLER_COMMAND" != x; then
32726       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32727     fi
32728   fi
32729 
32730       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32731     fi
32732   fi
32733 
32734   # Now we have a compiler binary in CC. Make sure it's okay.
32735 
32736   # Only process if variable expands to non-empty
32737 
32738   if test "x$CC" != x; then
32739     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32740 
32741   # First separate the path from the arguments. This will split at the first
32742   # space.
32743   complete="$CC"
32744   path="${complete%% *}"
32745   tmp="$complete EOL"
32746   arguments="${tmp#* }"
32747 
32748   # Input might be given as Windows format, start by converting to
32749   # unix format.
32750   new_path=`$CYGPATH -u "$path"`
32751 
32752   # Now try to locate executable using which
32753   new_path=`$WHICH "$new_path" 2> /dev/null`
32754   # bat and cmd files are not always considered executable in cygwin causing which
32755   # to not find them
32756   if test "x$new_path" = x \
32757       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32758       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32759     new_path=`$CYGPATH -u "$path"`
32760   fi
32761   if test "x$new_path" = x; then
32762     # Oops. Which didn't find the executable.
32763     # The splitting of arguments from the executable at a space might have been incorrect,
32764     # since paths with space are more likely in Windows. Give it another try with the whole
32765     # argument.
32766     path="$complete"
32767     arguments="EOL"
32768     new_path=`$CYGPATH -u "$path"`
32769     new_path=`$WHICH "$new_path" 2> /dev/null`
32770     # bat and cmd files are not always considered executable in cygwin causing which
32771     # to not find them
32772     if test "x$new_path" = x \
32773         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32774         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32775       new_path=`$CYGPATH -u "$path"`
32776     fi
32777     if test "x$new_path" = x; then
32778       # It's still not found. Now this is an unrecoverable error.
32779       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32780 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32781       has_space=`$ECHO "$complete" | $GREP " "`
32782       if test "x$has_space" != x; then
32783         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32784 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32785       fi
32786       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32787     fi
32788   fi
32789 
32790   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32791   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32792   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32793   # "foo.exe" is OK but "foo" is an error.
32794   #
32795   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32796   # It is also a way to make sure we got the proper file name for the real test later on.
32797   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32798   if test "x$test_shortpath" = x; then
32799     # Short path failed, file does not exist as specified.
32800     # Try adding .exe or .cmd
32801     if test -f "${new_path}.exe"; then
32802       input_to_shortpath="${new_path}.exe"
32803     elif test -f "${new_path}.cmd"; then
32804       input_to_shortpath="${new_path}.cmd"
32805     else
32806       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
32807 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
32808       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32809 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32810       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32811     fi
32812   else
32813     input_to_shortpath="$new_path"
32814   fi
32815 
32816   # Call helper function which possibly converts this using DOS-style short mode.
32817   # If so, the updated path is stored in $new_path.
32818   new_path="$input_to_shortpath"
32819 
32820   input_path="$input_to_shortpath"
32821   # Check if we need to convert this using DOS-style short mode. If the path
32822   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32823   # take no chances and rewrite it.
32824   # Note: m4 eats our [], so we need to use [ and ] instead.
32825   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32826   if test "x$has_forbidden_chars" != x; then
32827     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32828     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32829     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32830     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32831       # Going to short mode and back again did indeed matter. Since short mode is
32832       # case insensitive, let's make it lowercase to improve readability.
32833       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32834       # Now convert it back to Unix-style (cygpath)
32835       input_path=`$CYGPATH -u "$shortmode_path"`
32836       new_path="$input_path"
32837     fi
32838   fi
32839 
32840   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32841   if test "x$test_cygdrive_prefix" = x; then
32842     # As a simple fix, exclude /usr/bin since it's not a real path.
32843     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32844       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32845       # a path prefixed by /cygdrive for fixpath to work.
32846       new_path="$CYGWIN_ROOT_PATH$input_path"
32847     fi
32848   fi
32849 
32850   # remove trailing .exe if any
32851   new_path="${new_path/%.exe/}"
32852 
32853     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32854 
32855   # First separate the path from the arguments. This will split at the first
32856   # space.
32857   complete="$CC"
32858   path="${complete%% *}"
32859   tmp="$complete EOL"
32860   arguments="${tmp#* }"
32861 
32862   # Input might be given as Windows format, start by converting to
32863   # unix format.
32864   new_path="$path"
32865 
32866   windows_path="$new_path"
32867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32868     unix_path=`$CYGPATH -u "$windows_path"`
32869     new_path="$unix_path"
32870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32872     new_path="$unix_path"
32873   fi
32874 
32875 
32876   # Now try to locate executable using which
32877   new_path=`$WHICH "$new_path" 2> /dev/null`
32878 
32879   if test "x$new_path" = x; then
32880     # Oops. Which didn't find the executable.
32881     # The splitting of arguments from the executable at a space might have been incorrect,
32882     # since paths with space are more likely in Windows. Give it another try with the whole
32883     # argument.
32884     path="$complete"
32885     arguments="EOL"
32886     new_path="$path"
32887 
32888   windows_path="$new_path"
32889   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32890     unix_path=`$CYGPATH -u "$windows_path"`
32891     new_path="$unix_path"
32892   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32893     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32894     new_path="$unix_path"
32895   fi
32896 
32897 
32898     new_path=`$WHICH "$new_path" 2> /dev/null`
32899     # bat and cmd files are not always considered executable in MSYS causing which
32900     # to not find them
32901     if test "x$new_path" = x \
32902         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32903         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32904       new_path="$path"
32905 
32906   windows_path="$new_path"
32907   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32908     unix_path=`$CYGPATH -u "$windows_path"`
32909     new_path="$unix_path"
32910   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32911     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32912     new_path="$unix_path"
32913   fi
32914 
32915     fi
32916 
32917     if test "x$new_path" = x; then
32918       # It's still not found. Now this is an unrecoverable error.
32919       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32920 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32921       has_space=`$ECHO "$complete" | $GREP " "`
32922       if test "x$has_space" != x; then
32923         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32924 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32925       fi
32926       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32927     fi
32928   fi
32929 
32930   # Now new_path has a complete unix path to the binary
32931   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32932     # Keep paths in /bin as-is, but remove trailing .exe if any
32933     new_path="${new_path/%.exe/}"
32934     # Do not save /bin paths to all_fixpath_prefixes!
32935   else
32936     # Not in mixed or Windows style, start by that.
32937     new_path=`cmd //c echo $new_path`
32938 
32939   input_path="$new_path"
32940   # Check if we need to convert this using DOS-style short mode. If the path
32941   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32942   # take no chances and rewrite it.
32943   # Note: m4 eats our [], so we need to use [ and ] instead.
32944   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32945   if test "x$has_forbidden_chars" != x; then
32946     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32947     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32948   fi
32949 
32950     # Output is in $new_path
32951 
32952   windows_path="$new_path"
32953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32954     unix_path=`$CYGPATH -u "$windows_path"`
32955     new_path="$unix_path"
32956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32957     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32958     new_path="$unix_path"
32959   fi
32960 
32961     # remove trailing .exe if any
32962     new_path="${new_path/%.exe/}"
32963 
32964     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32965     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32966   fi
32967 
32968     else
32969       # We're on a unix platform. Hooray! :)
32970       # First separate the path from the arguments. This will split at the first
32971       # space.
32972       complete="$CC"
32973       path="${complete%% *}"
32974       tmp="$complete EOL"
32975       arguments="${tmp#* }"
32976 
32977       # Cannot rely on the command "which" here since it doesn't always work.
32978       is_absolute_path=`$ECHO "$path" | $GREP ^/`
32979       if test -z "$is_absolute_path"; then
32980         # Path to executable is not absolute. Find it.
32981         IFS_save="$IFS"
32982         IFS=:
32983         for p in $PATH; do
32984           if test -f "$p/$path" && test -x "$p/$path"; then
32985             new_path="$p/$path"
32986             break
32987           fi
32988         done
32989         IFS="$IFS_save"
32990       else
32991         # This is an absolute path, we can use it without further modifications.
32992         new_path="$path"
32993       fi
32994 
32995       if test "x$new_path" = x; then
32996         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32997 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32998         has_space=`$ECHO "$complete" | $GREP " "`
32999         if test "x$has_space" != x; then
33000           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33001 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33002         fi
33003         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33004       fi
33005     fi
33006 
33007     # Now join together the path and the arguments once again
33008     if test "x$arguments" != xEOL; then
33009       new_complete="$new_path ${arguments% *}"
33010     else
33011       new_complete="$new_path"
33012     fi
33013 
33014     if test "x$complete" != "x$new_complete"; then
33015       CC="$new_complete"
33016       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33017 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33018     fi
33019   fi
33020 
33021   TEST_COMPILER="$CC"
33022 
33023   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33024 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
33025   SYMLINK_ORIGINAL="$TEST_COMPILER"
33026 
33027   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33028     # Follow a chain of symbolic links. Use readlink
33029     # where it exists, else fall back to horribly
33030     # complicated shell code.
33031     if test "x$READLINK_TESTED" != yes; then
33032       # On MacOSX there is a readlink tool with a different
33033       # purpose than the GNU readlink tool. Check the found readlink.
33034       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33035       if test "x$ISGNU" = x; then
33036         # A readlink that we do not know how to use.
33037         # Are there other non-GNU readlinks out there?
33038         READLINK_TESTED=yes
33039         READLINK=
33040       fi
33041     fi
33042 
33043     if test "x$READLINK" != x; then
33044       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33045     else
33046       # Save the current directory for restoring afterwards
33047       STARTDIR=$PWD
33048       COUNTER=0
33049       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33050       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33051       cd $sym_link_dir
33052       # Use -P flag to resolve symlinks in directories.
33053       cd `$THEPWDCMD -P`
33054       sym_link_dir=`$THEPWDCMD -P`
33055       # Resolve file symlinks
33056       while test $COUNTER -lt 20; do
33057         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33058         if test "x$ISLINK" == x; then
33059           # This is not a symbolic link! We are done!
33060           break
33061         fi
33062         # Again resolve directory symlinks since the target of the just found
33063         # link could be in a different directory
33064         cd `$DIRNAME $ISLINK`
33065         sym_link_dir=`$THEPWDCMD -P`
33066         sym_link_file=`$BASENAME $ISLINK`
33067         let COUNTER=COUNTER+1
33068       done
33069       cd $STARTDIR
33070       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33071     fi
33072   fi
33073 
33074   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33075     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33076 $as_echo "no symlink" >&6; }
33077   else
33078     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33079 $as_echo "$SYMLINK_ORIGINAL" >&6; }
33080 
33081     # We can't handle ccache by gcc wrappers, since we need to know if we're
33082     # using ccache. Instead ccache usage must be controlled by a configure option.
33083     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33084     if test "x$COMPILER_BASENAME" = "xccache"; then
33085       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33086 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33087       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33088     fi
33089   fi
33090 
33091 
33092   COMPILER=$CC
33093   COMPILER_NAME=$COMPILER_NAME
33094 
33095   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33096     # cc -V output typically looks like
33097     #     cc: Sun C 5.12 Linux_i386 2011/11/16
33098     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33099     # Check that this is likely to be the Solaris Studio cc.
33100     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33101     if test $? -ne 0; then
33102       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33103       { $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
33104 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33105       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33106 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33107       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33108 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33109       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33110     fi
33111     # Remove usage instructions (if present), and
33112     # collapse compiler output into a single line
33113     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33114         $SED -e 's/ *[Uu]sage:.*//'`
33115     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33116         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33117   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33118     # xlc -qversion output typically looks like
33119     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33120     #     Version: 11.01.0000.0015
33121     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33122     # Check that this is likely to be the IBM XL C compiler.
33123     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33124     if test $? -ne 0; then
33125       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33126       { $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
33127 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33128       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33129 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33130       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33131 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33132       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33133     fi
33134     # Collapse compiler output into a single line
33135     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33136     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33137         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33138   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33139     # There is no specific version flag, but all output starts with a version string.
33140     # First line typically looks something like:
33141     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33142     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33143     # Check that this is likely to be Microsoft CL.EXE.
33144     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33145     if test $? -ne 0; then
33146       { $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
33147 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33148       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33149 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33150       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33151     fi
33152     # Collapse compiler output into a single line
33153     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33154     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33155         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33156   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33157     # gcc --version output typically looks like
33158     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33159     #     Copyright (C) 2013 Free Software Foundation, Inc.
33160     #     This is free software; see the source for copying conditions.  There is NO
33161     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33162     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33163     # Check that this is likely to be GCC.
33164     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33165     if test $? -ne 0; then
33166       { $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
33167 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33168       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33169 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33170       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33171     fi
33172     # Remove Copyright and legalese from version string, and
33173     # collapse into a single line
33174     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33175         $SED -e 's/ *Copyright .*//'`
33176     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33177         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33178   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33179     # clang --version output typically looks like
33180     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33181     #    clang version 3.3 (tags/RELEASE_33/final)
33182     # or
33183     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33184     #    Target: x86_64-pc-linux-gnu
33185     #    Thread model: posix
33186     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33187     # Check that this is likely to be clang
33188     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33189     if test $? -ne 0; then
33190       { $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
33191 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33192       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33193 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33194       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33195     fi
33196     # Collapse compiler output into a single line
33197     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33198     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33199         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33200   else
33201       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33202   fi
33203   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33204   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33205   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33206   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33207 
33208   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33209 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33210 
33211 
33212   # Now that we have resolved CC ourself, let autoconf have its go at it
33213   ac_ext=c
33214 ac_cpp='$CPP $CPPFLAGS'
33215 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33216 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33217 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33218 if test -n "$ac_tool_prefix"; then
33219   for ac_prog in $CC
33220   do
33221     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33222 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33224 $as_echo_n "checking for $ac_word... " >&6; }
33225 if ${ac_cv_prog_CC+:} false; then :
33226   $as_echo_n "(cached) " >&6
33227 else
33228   if test -n "$CC"; then
33229   ac_cv_prog_CC="$CC" # Let the user override the test.
33230 else
33231 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33232 for as_dir in $PATH
33233 do
33234   IFS=$as_save_IFS
33235   test -z "$as_dir" && as_dir=.
33236     for ac_exec_ext in '' $ac_executable_extensions; do
33237   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33238     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33240     break 2
33241   fi
33242 done
33243   done
33244 IFS=$as_save_IFS
33245 
33246 fi
33247 fi
33248 CC=$ac_cv_prog_CC
33249 if test -n "$CC"; then
33250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33251 $as_echo "$CC" >&6; }
33252 else
33253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33254 $as_echo "no" >&6; }
33255 fi
33256 
33257 
33258     test -n "$CC" && break
33259   done
33260 fi
33261 if test -z "$CC"; then
33262   ac_ct_CC=$CC
33263   for ac_prog in $CC
33264 do
33265   # Extract the first word of "$ac_prog", so it can be a program name with args.
33266 set dummy $ac_prog; ac_word=$2
33267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33268 $as_echo_n "checking for $ac_word... " >&6; }
33269 if ${ac_cv_prog_ac_ct_CC+:} false; then :
33270   $as_echo_n "(cached) " >&6
33271 else
33272   if test -n "$ac_ct_CC"; then
33273   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33274 else
33275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33276 for as_dir in $PATH
33277 do
33278   IFS=$as_save_IFS
33279   test -z "$as_dir" && as_dir=.
33280     for ac_exec_ext in '' $ac_executable_extensions; do
33281   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33282     ac_cv_prog_ac_ct_CC="$ac_prog"
33283     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33284     break 2
33285   fi
33286 done
33287   done
33288 IFS=$as_save_IFS
33289 
33290 fi
33291 fi
33292 ac_ct_CC=$ac_cv_prog_ac_ct_CC
33293 if test -n "$ac_ct_CC"; then
33294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33295 $as_echo "$ac_ct_CC" >&6; }
33296 else
33297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33298 $as_echo "no" >&6; }
33299 fi
33300 
33301 
33302   test -n "$ac_ct_CC" && break
33303 done
33304 
33305   if test "x$ac_ct_CC" = x; then
33306     CC=""
33307   else
33308     case $cross_compiling:$ac_tool_warned in
33309 yes:)
33310 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33311 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33312 ac_tool_warned=yes ;;
33313 esac
33314     CC=$ac_ct_CC
33315   fi
33316 fi
33317 
33318 
33319 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33320 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33321 as_fn_error $? "no acceptable C compiler found in \$PATH
33322 See \`config.log' for more details" "$LINENO" 5; }
33323 
33324 # Provide some information about the compiler.
33325 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33326 set X $ac_compile
33327 ac_compiler=$2
33328 for ac_option in --version -v -V -qversion; do
33329   { { ac_try="$ac_compiler $ac_option >&5"
33330 case "(($ac_try" in
33331   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33332   *) ac_try_echo=$ac_try;;
33333 esac
33334 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33335 $as_echo "$ac_try_echo"; } >&5
33336   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33337   ac_status=$?
33338   if test -s conftest.err; then
33339     sed '10a\
33340 ... rest of stderr output deleted ...
33341          10q' conftest.err >conftest.er1
33342     cat conftest.er1 >&5
33343   fi
33344   rm -f conftest.er1 conftest.err
33345   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33346   test $ac_status = 0; }
33347 done
33348 
33349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33350 /* end confdefs.h.  */
33351 
33352 int
33353 main ()
33354 {
33355 
33356   ;
33357   return 0;
33358 }
33359 _ACEOF
33360 ac_clean_files_save=$ac_clean_files
33361 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33362 # Try to create an executable without -o first, disregard a.out.
33363 # It will help us diagnose broken compilers, and finding out an intuition
33364 # of exeext.
33365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33366 $as_echo_n "checking whether the C compiler works... " >&6; }
33367 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33368 
33369 # The possible output files:
33370 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33371 
33372 ac_rmfiles=
33373 for ac_file in $ac_files
33374 do
33375   case $ac_file in
33376     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33377     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33378   esac
33379 done
33380 rm -f $ac_rmfiles
33381 
33382 if { { ac_try="$ac_link_default"
33383 case "(($ac_try" in
33384   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33385   *) ac_try_echo=$ac_try;;
33386 esac
33387 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33388 $as_echo "$ac_try_echo"; } >&5
33389   (eval "$ac_link_default") 2>&5
33390   ac_status=$?
33391   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33392   test $ac_status = 0; }; then :
33393   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33394 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33395 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
33396 # so that the user can short-circuit this test for compilers unknown to
33397 # Autoconf.
33398 for ac_file in $ac_files ''
33399 do
33400   test -f "$ac_file" || continue
33401   case $ac_file in
33402     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33403         ;;
33404     [ab].out )
33405         # We found the default executable, but exeext='' is most
33406         # certainly right.
33407         break;;
33408     *.* )
33409         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33410         then :; else
33411            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33412         fi
33413         # We set ac_cv_exeext here because the later test for it is not
33414         # safe: cross compilers may not add the suffix if given an `-o'
33415         # argument, so we may need to know it at that point already.
33416         # Even if this section looks crufty: it has the advantage of
33417         # actually working.
33418         break;;
33419     * )
33420         break;;
33421   esac
33422 done
33423 test "$ac_cv_exeext" = no && ac_cv_exeext=
33424 
33425 else
33426   ac_file=''
33427 fi
33428 if test -z "$ac_file"; then :
33429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33430 $as_echo "no" >&6; }
33431 $as_echo "$as_me: failed program was:" >&5
33432 sed 's/^/| /' conftest.$ac_ext >&5
33433 
33434 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33435 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33436 as_fn_error 77 "C compiler cannot create executables
33437 See \`config.log' for more details" "$LINENO" 5; }
33438 else
33439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33440 $as_echo "yes" >&6; }
33441 fi
33442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33443 $as_echo_n "checking for C compiler default output file name... " >&6; }
33444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33445 $as_echo "$ac_file" >&6; }
33446 ac_exeext=$ac_cv_exeext
33447 
33448 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33449 ac_clean_files=$ac_clean_files_save
33450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33451 $as_echo_n "checking for suffix of executables... " >&6; }
33452 if { { ac_try="$ac_link"
33453 case "(($ac_try" in
33454   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33455   *) ac_try_echo=$ac_try;;
33456 esac
33457 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33458 $as_echo "$ac_try_echo"; } >&5
33459   (eval "$ac_link") 2>&5
33460   ac_status=$?
33461   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33462   test $ac_status = 0; }; then :
33463   # If both `conftest.exe' and `conftest' are `present' (well, observable)
33464 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33465 # work properly (i.e., refer to `conftest.exe'), while it won't with
33466 # `rm'.
33467 for ac_file in conftest.exe conftest conftest.*; do
33468   test -f "$ac_file" || continue
33469   case $ac_file in
33470     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33471     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33472           break;;
33473     * ) break;;
33474   esac
33475 done
33476 else
33477   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33478 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33479 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33480 See \`config.log' for more details" "$LINENO" 5; }
33481 fi
33482 rm -f conftest conftest$ac_cv_exeext
33483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33484 $as_echo "$ac_cv_exeext" >&6; }
33485 
33486 rm -f conftest.$ac_ext
33487 EXEEXT=$ac_cv_exeext
33488 ac_exeext=$EXEEXT
33489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33490 /* end confdefs.h.  */
33491 #include <stdio.h>
33492 int
33493 main ()
33494 {
33495 FILE *f = fopen ("conftest.out", "w");
33496  return ferror (f) || fclose (f) != 0;
33497 
33498   ;
33499   return 0;
33500 }
33501 _ACEOF
33502 ac_clean_files="$ac_clean_files conftest.out"
33503 # Check that the compiler produces executables we can run.  If not, either
33504 # the compiler is broken, or we cross compile.
33505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33506 $as_echo_n "checking whether we are cross compiling... " >&6; }
33507 if test "$cross_compiling" != yes; then
33508   { { ac_try="$ac_link"
33509 case "(($ac_try" in
33510   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33511   *) ac_try_echo=$ac_try;;
33512 esac
33513 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33514 $as_echo "$ac_try_echo"; } >&5
33515   (eval "$ac_link") 2>&5
33516   ac_status=$?
33517   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33518   test $ac_status = 0; }
33519   if { ac_try='./conftest$ac_cv_exeext'
33520   { { case "(($ac_try" in
33521   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33522   *) ac_try_echo=$ac_try;;
33523 esac
33524 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33525 $as_echo "$ac_try_echo"; } >&5
33526   (eval "$ac_try") 2>&5
33527   ac_status=$?
33528   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33529   test $ac_status = 0; }; }; then
33530     cross_compiling=no
33531   else
33532     if test "$cross_compiling" = maybe; then
33533         cross_compiling=yes
33534     else
33535         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33536 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33537 as_fn_error $? "cannot run C compiled programs.
33538 If you meant to cross compile, use \`--host'.
33539 See \`config.log' for more details" "$LINENO" 5; }
33540     fi
33541   fi
33542 fi
33543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
33544 $as_echo "$cross_compiling" >&6; }
33545 
33546 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
33547 ac_clean_files=$ac_clean_files_save
33548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
33549 $as_echo_n "checking for suffix of object files... " >&6; }
33550 if ${ac_cv_objext+:} false; then :
33551   $as_echo_n "(cached) " >&6
33552 else
33553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33554 /* end confdefs.h.  */
33555 
33556 int
33557 main ()
33558 {
33559 
33560   ;
33561   return 0;
33562 }
33563 _ACEOF
33564 rm -f conftest.o conftest.obj
33565 if { { ac_try="$ac_compile"
33566 case "(($ac_try" in
33567   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33568   *) ac_try_echo=$ac_try;;
33569 esac
33570 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33571 $as_echo "$ac_try_echo"; } >&5
33572   (eval "$ac_compile") 2>&5
33573   ac_status=$?
33574   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33575   test $ac_status = 0; }; then :
33576   for ac_file in conftest.o conftest.obj conftest.*; do
33577   test -f "$ac_file" || continue;
33578   case $ac_file in
33579     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
33580     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
33581        break;;
33582   esac
33583 done
33584 else
33585   $as_echo "$as_me: failed program was:" >&5
33586 sed 's/^/| /' conftest.$ac_ext >&5
33587 
33588 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33589 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33590 as_fn_error $? "cannot compute suffix of object files: cannot compile
33591 See \`config.log' for more details" "$LINENO" 5; }
33592 fi
33593 rm -f conftest.$ac_cv_objext conftest.$ac_ext
33594 fi
33595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33596 $as_echo "$ac_cv_objext" >&6; }
33597 OBJEXT=$ac_cv_objext
33598 ac_objext=$OBJEXT
33599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33600 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33601 if ${ac_cv_c_compiler_gnu+:} false; then :
33602   $as_echo_n "(cached) " >&6
33603 else
33604   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33605 /* end confdefs.h.  */
33606 
33607 int
33608 main ()
33609 {
33610 #ifndef __GNUC__
33611        choke me
33612 #endif
33613 
33614   ;
33615   return 0;
33616 }
33617 _ACEOF
33618 if ac_fn_c_try_compile "$LINENO"; then :
33619   ac_compiler_gnu=yes
33620 else
33621   ac_compiler_gnu=no
33622 fi
33623 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33624 ac_cv_c_compiler_gnu=$ac_compiler_gnu
33625 
33626 fi
33627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33628 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
33629 if test $ac_compiler_gnu = yes; then
33630   GCC=yes
33631 else
33632   GCC=
33633 fi
33634 ac_test_CFLAGS=${CFLAGS+set}
33635 ac_save_CFLAGS=$CFLAGS
33636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33637 $as_echo_n "checking whether $CC accepts -g... " >&6; }
33638 if ${ac_cv_prog_cc_g+:} false; then :
33639   $as_echo_n "(cached) " >&6
33640 else
33641   ac_save_c_werror_flag=$ac_c_werror_flag
33642    ac_c_werror_flag=yes
33643    ac_cv_prog_cc_g=no
33644    CFLAGS="-g"
33645    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33646 /* end confdefs.h.  */
33647 
33648 int
33649 main ()
33650 {
33651 
33652   ;
33653   return 0;
33654 }
33655 _ACEOF
33656 if ac_fn_c_try_compile "$LINENO"; then :
33657   ac_cv_prog_cc_g=yes
33658 else
33659   CFLAGS=""
33660       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33661 /* end confdefs.h.  */
33662 
33663 int
33664 main ()
33665 {
33666 
33667   ;
33668   return 0;
33669 }
33670 _ACEOF
33671 if ac_fn_c_try_compile "$LINENO"; then :
33672 
33673 else
33674   ac_c_werror_flag=$ac_save_c_werror_flag
33675          CFLAGS="-g"
33676          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33677 /* end confdefs.h.  */
33678 
33679 int
33680 main ()
33681 {
33682 
33683   ;
33684   return 0;
33685 }
33686 _ACEOF
33687 if ac_fn_c_try_compile "$LINENO"; then :
33688   ac_cv_prog_cc_g=yes
33689 fi
33690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33691 fi
33692 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33693 fi
33694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33695    ac_c_werror_flag=$ac_save_c_werror_flag
33696 fi
33697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33698 $as_echo "$ac_cv_prog_cc_g" >&6; }
33699 if test "$ac_test_CFLAGS" = set; then
33700   CFLAGS=$ac_save_CFLAGS
33701 elif test $ac_cv_prog_cc_g = yes; then
33702   if test "$GCC" = yes; then
33703     CFLAGS="-g -O2"
33704   else
33705     CFLAGS="-g"
33706   fi
33707 else
33708   if test "$GCC" = yes; then
33709     CFLAGS="-O2"
33710   else
33711     CFLAGS=
33712   fi
33713 fi
33714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33715 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33716 if ${ac_cv_prog_cc_c89+:} false; then :
33717   $as_echo_n "(cached) " >&6
33718 else
33719   ac_cv_prog_cc_c89=no
33720 ac_save_CC=$CC
33721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33722 /* end confdefs.h.  */
33723 #include <stdarg.h>
33724 #include <stdio.h>
33725 struct stat;
33726 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33727 struct buf { int x; };
33728 FILE * (*rcsopen) (struct buf *, struct stat *, int);
33729 static char *e (p, i)
33730      char **p;
33731      int i;
33732 {
33733   return p[i];
33734 }
33735 static char *f (char * (*g) (char **, int), char **p, ...)
33736 {
33737   char *s;
33738   va_list v;
33739   va_start (v,p);
33740   s = g (p, va_arg (v,int));
33741   va_end (v);
33742   return s;
33743 }
33744 
33745 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33746    function prototypes and stuff, but not '\xHH' hex character constants.
33747    These don't provoke an error unfortunately, instead are silently treated
33748    as 'x'.  The following induces an error, until -std is added to get
33749    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33750    array size at least.  It's necessary to write '\x00'==0 to get something
33751    that's true only with -std.  */
33752 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33753 
33754 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33755    inside strings and character constants.  */
33756 #define FOO(x) 'x'
33757 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33758 
33759 int test (int i, double x);
33760 struct s1 {int (*f) (int a);};
33761 struct s2 {int (*f) (double a);};
33762 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33763 int argc;
33764 char **argv;
33765 int
33766 main ()
33767 {
33768 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33769   ;
33770   return 0;
33771 }
33772 _ACEOF
33773 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33774         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33775 do
33776   CC="$ac_save_CC $ac_arg"
33777   if ac_fn_c_try_compile "$LINENO"; then :
33778   ac_cv_prog_cc_c89=$ac_arg
33779 fi
33780 rm -f core conftest.err conftest.$ac_objext
33781   test "x$ac_cv_prog_cc_c89" != "xno" && break
33782 done
33783 rm -f conftest.$ac_ext
33784 CC=$ac_save_CC
33785 
33786 fi
33787 # AC_CACHE_VAL
33788 case "x$ac_cv_prog_cc_c89" in
33789   x)
33790     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33791 $as_echo "none needed" >&6; } ;;
33792   xno)
33793     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33794 $as_echo "unsupported" >&6; } ;;
33795   *)
33796     CC="$CC $ac_cv_prog_cc_c89"
33797     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33798 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33799 esac
33800 if test "x$ac_cv_prog_cc_c89" != xno; then :
33801 
33802 fi
33803 
33804 ac_ext=cpp
33805 ac_cpp='$CXXCPP $CPPFLAGS'
33806 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33807 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33808 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33809 
33810 
33811 
33812   COMPILER_NAME=C++
33813   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33814 
33815   if test "x$CXX" != x; then
33816     # User has supplied compiler name already, always let that override.
33817     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33818 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33819     if test "x`basename $CXX`" = "x$CXX"; then
33820       # A command without a complete path is provided, search $PATH.
33821 
33822       for ac_prog in $CXX
33823 do
33824   # Extract the first word of "$ac_prog", so it can be a program name with args.
33825 set dummy $ac_prog; ac_word=$2
33826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33827 $as_echo_n "checking for $ac_word... " >&6; }
33828 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33829   $as_echo_n "(cached) " >&6
33830 else
33831   case $POTENTIAL_CXX in
33832   [\\/]* | ?:[\\/]*)
33833   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33834   ;;
33835   *)
33836   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33837 for as_dir in $PATH
33838 do
33839   IFS=$as_save_IFS
33840   test -z "$as_dir" && as_dir=.
33841     for ac_exec_ext in '' $ac_executable_extensions; do
33842   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33843     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33844     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33845     break 2
33846   fi
33847 done
33848   done
33849 IFS=$as_save_IFS
33850 
33851   ;;
33852 esac
33853 fi
33854 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33855 if test -n "$POTENTIAL_CXX"; then
33856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33857 $as_echo "$POTENTIAL_CXX" >&6; }
33858 else
33859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33860 $as_echo "no" >&6; }
33861 fi
33862 
33863 
33864   test -n "$POTENTIAL_CXX" && break
33865 done
33866 
33867       if test "x$POTENTIAL_CXX" != x; then
33868         CXX=$POTENTIAL_CXX
33869       else
33870         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33871       fi
33872     else
33873       # Otherwise it might already be a complete path
33874       if test ! -x "$CXX"; then
33875         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33876       fi
33877     fi
33878   else
33879     # No user supplied value. Locate compiler ourselves.
33880 
33881     # If we are cross compiling, assume cross compilation tools follows the
33882     # cross compilation standard where they are prefixed with the autoconf
33883     # standard name for the target. For example the binary
33884     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33885     # If we are not cross compiling, then the default compiler name will be
33886     # used.
33887 
33888     CXX=
33889     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33890     # before checking the rest of the PATH.
33891     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33892     # step, this should not be necessary.
33893     if test -n "$TOOLCHAIN_PATH"; then
33894       PATH_save="$PATH"
33895       PATH="$TOOLCHAIN_PATH"
33896       for ac_prog in $SEARCH_LIST
33897 do
33898   # Extract the first word of "$ac_prog", so it can be a program name with args.
33899 set dummy $ac_prog; ac_word=$2
33900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33901 $as_echo_n "checking for $ac_word... " >&6; }
33902 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33903   $as_echo_n "(cached) " >&6
33904 else
33905   case $TOOLCHAIN_PATH_CXX in
33906   [\\/]* | ?:[\\/]*)
33907   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33908   ;;
33909   *)
33910   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33911 for as_dir in $PATH
33912 do
33913   IFS=$as_save_IFS
33914   test -z "$as_dir" && as_dir=.
33915     for ac_exec_ext in '' $ac_executable_extensions; do
33916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33917     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33919     break 2
33920   fi
33921 done
33922   done
33923 IFS=$as_save_IFS
33924 
33925   ;;
33926 esac
33927 fi
33928 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33929 if test -n "$TOOLCHAIN_PATH_CXX"; then
33930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33931 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33932 else
33933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33934 $as_echo "no" >&6; }
33935 fi
33936 
33937 
33938   test -n "$TOOLCHAIN_PATH_CXX" && break
33939 done
33940 
33941       CXX=$TOOLCHAIN_PATH_CXX
33942       PATH="$PATH_save"
33943     fi
33944 
33945     # AC_PATH_PROGS can't be run multiple times with the same variable,
33946     # so create a new name for this run.
33947     if test "x$CXX" = x; then
33948       for ac_prog in $SEARCH_LIST
33949 do
33950   # Extract the first word of "$ac_prog", so it can be a program name with args.
33951 set dummy $ac_prog; ac_word=$2
33952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33953 $as_echo_n "checking for $ac_word... " >&6; }
33954 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33955   $as_echo_n "(cached) " >&6
33956 else
33957   case $POTENTIAL_CXX in
33958   [\\/]* | ?:[\\/]*)
33959   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33960   ;;
33961   *)
33962   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33963 for as_dir in $PATH
33964 do
33965   IFS=$as_save_IFS
33966   test -z "$as_dir" && as_dir=.
33967     for ac_exec_ext in '' $ac_executable_extensions; do
33968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33969     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33971     break 2
33972   fi
33973 done
33974   done
33975 IFS=$as_save_IFS
33976 
33977   ;;
33978 esac
33979 fi
33980 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33981 if test -n "$POTENTIAL_CXX"; then
33982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33983 $as_echo "$POTENTIAL_CXX" >&6; }
33984 else
33985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33986 $as_echo "no" >&6; }
33987 fi
33988 
33989 
33990   test -n "$POTENTIAL_CXX" && break
33991 done
33992 
33993       CXX=$POTENTIAL_CXX
33994     fi
33995 
33996     if test "x$CXX" = x; then
33997 
33998   # Print a helpful message on how to acquire the necessary build dependency.
33999   # devkit is the help tag: freetype, cups, alsa etc
34000   MISSING_DEPENDENCY=devkit
34001 
34002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34003     cygwin_help $MISSING_DEPENDENCY
34004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34005     msys_help $MISSING_DEPENDENCY
34006   else
34007     PKGHANDLER_COMMAND=
34008 
34009     case $PKGHANDLER in
34010       apt-get)
34011         apt_help     $MISSING_DEPENDENCY ;;
34012       yum)
34013         yum_help     $MISSING_DEPENDENCY ;;
34014       port)
34015         port_help    $MISSING_DEPENDENCY ;;
34016       pkgutil)
34017         pkgutil_help $MISSING_DEPENDENCY ;;
34018       pkgadd)
34019         pkgadd_help  $MISSING_DEPENDENCY ;;
34020     esac
34021 
34022     if test "x$PKGHANDLER_COMMAND" != x; then
34023       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34024     fi
34025   fi
34026 
34027       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34028     fi
34029   fi
34030 
34031   # Now we have a compiler binary in CXX. Make sure it's okay.
34032 
34033   # Only process if variable expands to non-empty
34034 
34035   if test "x$CXX" != x; then
34036     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34037 
34038   # First separate the path from the arguments. This will split at the first
34039   # space.
34040   complete="$CXX"
34041   path="${complete%% *}"
34042   tmp="$complete EOL"
34043   arguments="${tmp#* }"
34044 
34045   # Input might be given as Windows format, start by converting to
34046   # unix format.
34047   new_path=`$CYGPATH -u "$path"`
34048 
34049   # Now try to locate executable using which
34050   new_path=`$WHICH "$new_path" 2> /dev/null`
34051   # bat and cmd files are not always considered executable in cygwin causing which
34052   # to not find them
34053   if test "x$new_path" = x \
34054       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34055       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34056     new_path=`$CYGPATH -u "$path"`
34057   fi
34058   if test "x$new_path" = x; then
34059     # Oops. Which didn't find the executable.
34060     # The splitting of arguments from the executable at a space might have been incorrect,
34061     # since paths with space are more likely in Windows. Give it another try with the whole
34062     # argument.
34063     path="$complete"
34064     arguments="EOL"
34065     new_path=`$CYGPATH -u "$path"`
34066     new_path=`$WHICH "$new_path" 2> /dev/null`
34067     # bat and cmd files are not always considered executable in cygwin causing which
34068     # to not find them
34069     if test "x$new_path" = x \
34070         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34071         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34072       new_path=`$CYGPATH -u "$path"`
34073     fi
34074     if test "x$new_path" = x; then
34075       # It's still not found. Now this is an unrecoverable error.
34076       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34077 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34078       has_space=`$ECHO "$complete" | $GREP " "`
34079       if test "x$has_space" != x; then
34080         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34081 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34082       fi
34083       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34084     fi
34085   fi
34086 
34087   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34088   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34089   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34090   # "foo.exe" is OK but "foo" is an error.
34091   #
34092   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34093   # It is also a way to make sure we got the proper file name for the real test later on.
34094   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34095   if test "x$test_shortpath" = x; then
34096     # Short path failed, file does not exist as specified.
34097     # Try adding .exe or .cmd
34098     if test -f "${new_path}.exe"; then
34099       input_to_shortpath="${new_path}.exe"
34100     elif test -f "${new_path}.cmd"; then
34101       input_to_shortpath="${new_path}.cmd"
34102     else
34103       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34104 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34105       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34106 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34107       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34108     fi
34109   else
34110     input_to_shortpath="$new_path"
34111   fi
34112 
34113   # Call helper function which possibly converts this using DOS-style short mode.
34114   # If so, the updated path is stored in $new_path.
34115   new_path="$input_to_shortpath"
34116 
34117   input_path="$input_to_shortpath"
34118   # Check if we need to convert this using DOS-style short mode. If the path
34119   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34120   # take no chances and rewrite it.
34121   # Note: m4 eats our [], so we need to use [ and ] instead.
34122   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34123   if test "x$has_forbidden_chars" != x; then
34124     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34125     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34126     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34127     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34128       # Going to short mode and back again did indeed matter. Since short mode is
34129       # case insensitive, let's make it lowercase to improve readability.
34130       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34131       # Now convert it back to Unix-style (cygpath)
34132       input_path=`$CYGPATH -u "$shortmode_path"`
34133       new_path="$input_path"
34134     fi
34135   fi
34136 
34137   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34138   if test "x$test_cygdrive_prefix" = x; then
34139     # As a simple fix, exclude /usr/bin since it's not a real path.
34140     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34141       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34142       # a path prefixed by /cygdrive for fixpath to work.
34143       new_path="$CYGWIN_ROOT_PATH$input_path"
34144     fi
34145   fi
34146 
34147   # remove trailing .exe if any
34148   new_path="${new_path/%.exe/}"
34149 
34150     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34151 
34152   # First separate the path from the arguments. This will split at the first
34153   # space.
34154   complete="$CXX"
34155   path="${complete%% *}"
34156   tmp="$complete EOL"
34157   arguments="${tmp#* }"
34158 
34159   # Input might be given as Windows format, start by converting to
34160   # unix format.
34161   new_path="$path"
34162 
34163   windows_path="$new_path"
34164   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34165     unix_path=`$CYGPATH -u "$windows_path"`
34166     new_path="$unix_path"
34167   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34168     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34169     new_path="$unix_path"
34170   fi
34171 
34172 
34173   # Now try to locate executable using which
34174   new_path=`$WHICH "$new_path" 2> /dev/null`
34175 
34176   if test "x$new_path" = x; then
34177     # Oops. Which didn't find the executable.
34178     # The splitting of arguments from the executable at a space might have been incorrect,
34179     # since paths with space are more likely in Windows. Give it another try with the whole
34180     # argument.
34181     path="$complete"
34182     arguments="EOL"
34183     new_path="$path"
34184 
34185   windows_path="$new_path"
34186   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34187     unix_path=`$CYGPATH -u "$windows_path"`
34188     new_path="$unix_path"
34189   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34190     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34191     new_path="$unix_path"
34192   fi
34193 
34194 
34195     new_path=`$WHICH "$new_path" 2> /dev/null`
34196     # bat and cmd files are not always considered executable in MSYS causing which
34197     # to not find them
34198     if test "x$new_path" = x \
34199         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34200         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34201       new_path="$path"
34202 
34203   windows_path="$new_path"
34204   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34205     unix_path=`$CYGPATH -u "$windows_path"`
34206     new_path="$unix_path"
34207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34208     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34209     new_path="$unix_path"
34210   fi
34211 
34212     fi
34213 
34214     if test "x$new_path" = x; then
34215       # It's still not found. Now this is an unrecoverable error.
34216       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34217 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34218       has_space=`$ECHO "$complete" | $GREP " "`
34219       if test "x$has_space" != x; then
34220         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34221 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34222       fi
34223       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34224     fi
34225   fi
34226 
34227   # Now new_path has a complete unix path to the binary
34228   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34229     # Keep paths in /bin as-is, but remove trailing .exe if any
34230     new_path="${new_path/%.exe/}"
34231     # Do not save /bin paths to all_fixpath_prefixes!
34232   else
34233     # Not in mixed or Windows style, start by that.
34234     new_path=`cmd //c echo $new_path`
34235 
34236   input_path="$new_path"
34237   # Check if we need to convert this using DOS-style short mode. If the path
34238   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34239   # take no chances and rewrite it.
34240   # Note: m4 eats our [], so we need to use [ and ] instead.
34241   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34242   if test "x$has_forbidden_chars" != x; then
34243     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34244     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34245   fi
34246 
34247     # Output is in $new_path
34248 
34249   windows_path="$new_path"
34250   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34251     unix_path=`$CYGPATH -u "$windows_path"`
34252     new_path="$unix_path"
34253   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34254     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34255     new_path="$unix_path"
34256   fi
34257 
34258     # remove trailing .exe if any
34259     new_path="${new_path/%.exe/}"
34260 
34261     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34262     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34263   fi
34264 
34265     else
34266       # We're on a unix platform. Hooray! :)
34267       # First separate the path from the arguments. This will split at the first
34268       # space.
34269       complete="$CXX"
34270       path="${complete%% *}"
34271       tmp="$complete EOL"
34272       arguments="${tmp#* }"
34273 
34274       # Cannot rely on the command "which" here since it doesn't always work.
34275       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34276       if test -z "$is_absolute_path"; then
34277         # Path to executable is not absolute. Find it.
34278         IFS_save="$IFS"
34279         IFS=:
34280         for p in $PATH; do
34281           if test -f "$p/$path" && test -x "$p/$path"; then
34282             new_path="$p/$path"
34283             break
34284           fi
34285         done
34286         IFS="$IFS_save"
34287       else
34288         # This is an absolute path, we can use it without further modifications.
34289         new_path="$path"
34290       fi
34291 
34292       if test "x$new_path" = x; then
34293         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34294 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34295         has_space=`$ECHO "$complete" | $GREP " "`
34296         if test "x$has_space" != x; then
34297           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34298 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34299         fi
34300         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34301       fi
34302     fi
34303 
34304     # Now join together the path and the arguments once again
34305     if test "x$arguments" != xEOL; then
34306       new_complete="$new_path ${arguments% *}"
34307     else
34308       new_complete="$new_path"
34309     fi
34310 
34311     if test "x$complete" != "x$new_complete"; then
34312       CXX="$new_complete"
34313       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34314 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34315     fi
34316   fi
34317 
34318   TEST_COMPILER="$CXX"
34319 
34320   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34321 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34322   SYMLINK_ORIGINAL="$TEST_COMPILER"
34323 
34324   if test "x$OPENJDK_BUILD_OS" != xwindows; then
34325     # Follow a chain of symbolic links. Use readlink
34326     # where it exists, else fall back to horribly
34327     # complicated shell code.
34328     if test "x$READLINK_TESTED" != yes; then
34329       # On MacOSX there is a readlink tool with a different
34330       # purpose than the GNU readlink tool. Check the found readlink.
34331       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34332       if test "x$ISGNU" = x; then
34333         # A readlink that we do not know how to use.
34334         # Are there other non-GNU readlinks out there?
34335         READLINK_TESTED=yes
34336         READLINK=
34337       fi
34338     fi
34339 
34340     if test "x$READLINK" != x; then
34341       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34342     else
34343       # Save the current directory for restoring afterwards
34344       STARTDIR=$PWD
34345       COUNTER=0
34346       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34347       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34348       cd $sym_link_dir
34349       # Use -P flag to resolve symlinks in directories.
34350       cd `$THEPWDCMD -P`
34351       sym_link_dir=`$THEPWDCMD -P`
34352       # Resolve file symlinks
34353       while test $COUNTER -lt 20; do
34354         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34355         if test "x$ISLINK" == x; then
34356           # This is not a symbolic link! We are done!
34357           break
34358         fi
34359         # Again resolve directory symlinks since the target of the just found
34360         # link could be in a different directory
34361         cd `$DIRNAME $ISLINK`
34362         sym_link_dir=`$THEPWDCMD -P`
34363         sym_link_file=`$BASENAME $ISLINK`
34364         let COUNTER=COUNTER+1
34365       done
34366       cd $STARTDIR
34367       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34368     fi
34369   fi
34370 
34371   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34372     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34373 $as_echo "no symlink" >&6; }
34374   else
34375     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34376 $as_echo "$SYMLINK_ORIGINAL" >&6; }
34377 
34378     # We can't handle ccache by gcc wrappers, since we need to know if we're
34379     # using ccache. Instead ccache usage must be controlled by a configure option.
34380     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34381     if test "x$COMPILER_BASENAME" = "xccache"; then
34382       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34383 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34384       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34385     fi
34386   fi
34387 
34388 
34389   COMPILER=$CXX
34390   COMPILER_NAME=$COMPILER_NAME
34391 
34392   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34393     # cc -V output typically looks like
34394     #     cc: Sun C 5.12 Linux_i386 2011/11/16
34395     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34396     # Check that this is likely to be the Solaris Studio cc.
34397     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34398     if test $? -ne 0; then
34399       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34400       { $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
34401 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34402       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34403 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34404       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34405 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34406       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34407     fi
34408     # Remove usage instructions (if present), and
34409     # collapse compiler output into a single line
34410     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34411         $SED -e 's/ *[Uu]sage:.*//'`
34412     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34413         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34414   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34415     # xlc -qversion output typically looks like
34416     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34417     #     Version: 11.01.0000.0015
34418     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34419     # Check that this is likely to be the IBM XL C compiler.
34420     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34421     if test $? -ne 0; then
34422       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34423       { $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
34424 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34425       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34426 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34427       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34428 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34429       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34430     fi
34431     # Collapse compiler output into a single line
34432     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34433     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34434         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34435   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34436     # There is no specific version flag, but all output starts with a version string.
34437     # First line typically looks something like:
34438     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34439     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34440     # Check that this is likely to be Microsoft CL.EXE.
34441     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34442     if test $? -ne 0; then
34443       { $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
34444 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34445       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34446 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34447       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34448     fi
34449     # Collapse compiler output into a single line
34450     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34451     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34452         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34453   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34454     # gcc --version output typically looks like
34455     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34456     #     Copyright (C) 2013 Free Software Foundation, Inc.
34457     #     This is free software; see the source for copying conditions.  There is NO
34458     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34459     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34460     # Check that this is likely to be GCC.
34461     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34462     if test $? -ne 0; then
34463       { $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
34464 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34465       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34466 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34467       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34468     fi
34469     # Remove Copyright and legalese from version string, and
34470     # collapse into a single line
34471     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34472         $SED -e 's/ *Copyright .*//'`
34473     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34474         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34475   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34476     # clang --version output typically looks like
34477     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34478     #    clang version 3.3 (tags/RELEASE_33/final)
34479     # or
34480     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34481     #    Target: x86_64-pc-linux-gnu
34482     #    Thread model: posix
34483     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34484     # Check that this is likely to be clang
34485     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34486     if test $? -ne 0; then
34487       { $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
34488 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34489       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34490 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34491       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34492     fi
34493     # Collapse compiler output into a single line
34494     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34495     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34496         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34497   else
34498       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34499   fi
34500   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34501   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34502   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34503   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34504 
34505   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34506 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34507 
34508 
34509   # Now that we have resolved CXX ourself, let autoconf have its go at it
34510   ac_ext=cpp
34511 ac_cpp='$CXXCPP $CPPFLAGS'
34512 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34513 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34514 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34515 if test -z "$CXX"; then
34516   if test -n "$CCC"; then
34517     CXX=$CCC
34518   else
34519     if test -n "$ac_tool_prefix"; then
34520   for ac_prog in $CXX
34521   do
34522     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34523 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34525 $as_echo_n "checking for $ac_word... " >&6; }
34526 if ${ac_cv_prog_CXX+:} false; then :
34527   $as_echo_n "(cached) " >&6
34528 else
34529   if test -n "$CXX"; then
34530   ac_cv_prog_CXX="$CXX" # Let the user override the test.
34531 else
34532 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34533 for as_dir in $PATH
34534 do
34535   IFS=$as_save_IFS
34536   test -z "$as_dir" && as_dir=.
34537     for ac_exec_ext in '' $ac_executable_extensions; do
34538   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34539     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34541     break 2
34542   fi
34543 done
34544   done
34545 IFS=$as_save_IFS
34546 
34547 fi
34548 fi
34549 CXX=$ac_cv_prog_CXX
34550 if test -n "$CXX"; then
34551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34552 $as_echo "$CXX" >&6; }
34553 else
34554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34555 $as_echo "no" >&6; }
34556 fi
34557 
34558 
34559     test -n "$CXX" && break
34560   done
34561 fi
34562 if test -z "$CXX"; then
34563   ac_ct_CXX=$CXX
34564   for ac_prog in $CXX
34565 do
34566   # Extract the first word of "$ac_prog", so it can be a program name with args.
34567 set dummy $ac_prog; ac_word=$2
34568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34569 $as_echo_n "checking for $ac_word... " >&6; }
34570 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34571   $as_echo_n "(cached) " >&6
34572 else
34573   if test -n "$ac_ct_CXX"; then
34574   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34575 else
34576 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34577 for as_dir in $PATH
34578 do
34579   IFS=$as_save_IFS
34580   test -z "$as_dir" && as_dir=.
34581     for ac_exec_ext in '' $ac_executable_extensions; do
34582   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34583     ac_cv_prog_ac_ct_CXX="$ac_prog"
34584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34585     break 2
34586   fi
34587 done
34588   done
34589 IFS=$as_save_IFS
34590 
34591 fi
34592 fi
34593 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34594 if test -n "$ac_ct_CXX"; then
34595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34596 $as_echo "$ac_ct_CXX" >&6; }
34597 else
34598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34599 $as_echo "no" >&6; }
34600 fi
34601 
34602 
34603   test -n "$ac_ct_CXX" && break
34604 done
34605 
34606   if test "x$ac_ct_CXX" = x; then
34607     CXX="g++"
34608   else
34609     case $cross_compiling:$ac_tool_warned in
34610 yes:)
34611 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34612 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34613 ac_tool_warned=yes ;;
34614 esac
34615     CXX=$ac_ct_CXX
34616   fi
34617 fi
34618 
34619   fi
34620 fi
34621 # Provide some information about the compiler.
34622 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34623 set X $ac_compile
34624 ac_compiler=$2
34625 for ac_option in --version -v -V -qversion; do
34626   { { ac_try="$ac_compiler $ac_option >&5"
34627 case "(($ac_try" in
34628   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34629   *) ac_try_echo=$ac_try;;
34630 esac
34631 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34632 $as_echo "$ac_try_echo"; } >&5
34633   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34634   ac_status=$?
34635   if test -s conftest.err; then
34636     sed '10a\
34637 ... rest of stderr output deleted ...
34638          10q' conftest.err >conftest.er1
34639     cat conftest.er1 >&5
34640   fi
34641   rm -f conftest.er1 conftest.err
34642   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34643   test $ac_status = 0; }
34644 done
34645 
34646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34647 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34648 if ${ac_cv_cxx_compiler_gnu+:} false; then :
34649   $as_echo_n "(cached) " >&6
34650 else
34651   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34652 /* end confdefs.h.  */
34653 
34654 int
34655 main ()
34656 {
34657 #ifndef __GNUC__
34658        choke me
34659 #endif
34660 
34661   ;
34662   return 0;
34663 }
34664 _ACEOF
34665 if ac_fn_cxx_try_compile "$LINENO"; then :
34666   ac_compiler_gnu=yes
34667 else
34668   ac_compiler_gnu=no
34669 fi
34670 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34671 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34672 
34673 fi
34674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34675 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34676 if test $ac_compiler_gnu = yes; then
34677   GXX=yes
34678 else
34679   GXX=
34680 fi
34681 ac_test_CXXFLAGS=${CXXFLAGS+set}
34682 ac_save_CXXFLAGS=$CXXFLAGS
34683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34684 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
34685 if ${ac_cv_prog_cxx_g+:} false; then :
34686   $as_echo_n "(cached) " >&6
34687 else
34688   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34689    ac_cxx_werror_flag=yes
34690    ac_cv_prog_cxx_g=no
34691    CXXFLAGS="-g"
34692    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34693 /* end confdefs.h.  */
34694 
34695 int
34696 main ()
34697 {
34698 
34699   ;
34700   return 0;
34701 }
34702 _ACEOF
34703 if ac_fn_cxx_try_compile "$LINENO"; then :
34704   ac_cv_prog_cxx_g=yes
34705 else
34706   CXXFLAGS=""
34707       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34708 /* end confdefs.h.  */
34709 
34710 int
34711 main ()
34712 {
34713 
34714   ;
34715   return 0;
34716 }
34717 _ACEOF
34718 if ac_fn_cxx_try_compile "$LINENO"; then :
34719 
34720 else
34721   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34722          CXXFLAGS="-g"
34723          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34724 /* end confdefs.h.  */
34725 
34726 int
34727 main ()
34728 {
34729 
34730   ;
34731   return 0;
34732 }
34733 _ACEOF
34734 if ac_fn_cxx_try_compile "$LINENO"; then :
34735   ac_cv_prog_cxx_g=yes
34736 fi
34737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34738 fi
34739 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34740 fi
34741 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34742    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34743 fi
34744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34745 $as_echo "$ac_cv_prog_cxx_g" >&6; }
34746 if test "$ac_test_CXXFLAGS" = set; then
34747   CXXFLAGS=$ac_save_CXXFLAGS
34748 elif test $ac_cv_prog_cxx_g = yes; then
34749   if test "$GXX" = yes; then
34750     CXXFLAGS="-g -O2"
34751   else
34752     CXXFLAGS="-g"
34753   fi
34754 else
34755   if test "$GXX" = yes; then
34756     CXXFLAGS="-O2"
34757   else
34758     CXXFLAGS=
34759   fi
34760 fi
34761 ac_ext=cpp
34762 ac_cpp='$CXXCPP $CPPFLAGS'
34763 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34764 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34765 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34766 
34767 
34768   # This is the compiler version number on the form X.Y[.Z]
34769 
34770 
34771 
34772 
34773   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
34774     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
34775 $as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
34776     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
34777 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
34778   fi
34779 
34780   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
34781   if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
34782     { $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
34783 $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;}
34784   fi
34785 
34786   if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
34787     { $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
34788 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34789   fi
34790 
34791   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
34792 
34793 
34794   if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
34795 
34796 
34797 
34798 
34799 
34800 
34801 
34802 
34803 
34804 
34805 
34806 
34807 
34808 
34809 
34810 
34811 
34812 
34813 
34814 
34815 
34816 
34817 
34818 
34819 
34820 
34821 
34822 
34823 
34824 
34825 
34826 
34827 
34828 
34829 
34830 
34831 
34832 
34833 
34834 
34835 
34836 
34837     # Execute function body
34838 
34839   # Need to assign to a variable since m4 is blocked from modifying parts in [].
34840   REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
34841 
34842   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
34843     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
34844   fi
34845 
34846   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
34847     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
34848   fi
34849 
34850   # Version comparison method inspired by http://stackoverflow.com/a/24067243
34851   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
34852 
34853   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
34854     :
34855 
34856   else
34857     :
34858 
34859           { $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
34860 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
34861 
34862 
34863   fi
34864 
34865 
34866 
34867 
34868 
34869 
34870 
34871 
34872 
34873 
34874 
34875 
34876   fi
34877 
34878   #
34879   # Setup the preprocessor (CPP and CXXCPP)
34880   #
34881   ac_ext=c
34882 ac_cpp='$CPP $CPPFLAGS'
34883 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34884 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34885 ac_compiler_gnu=$ac_cv_c_compiler_gnu
34886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34887 $as_echo_n "checking how to run the C preprocessor... " >&6; }
34888 # On Suns, sometimes $CPP names a directory.
34889 if test -n "$CPP" && test -d "$CPP"; then
34890   CPP=
34891 fi
34892 if test -z "$CPP"; then
34893   if ${ac_cv_prog_CPP+:} false; then :
34894   $as_echo_n "(cached) " >&6
34895 else
34896       # Double quotes because CPP needs to be expanded
34897     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34898     do
34899       ac_preproc_ok=false
34900 for ac_c_preproc_warn_flag in '' yes
34901 do
34902   # Use a header file that comes with gcc, so configuring glibc
34903   # with a fresh cross-compiler works.
34904   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34905   # <limits.h> exists even on freestanding compilers.
34906   # On the NeXT, cc -E runs the code through the compiler's parser,
34907   # not just through cpp. "Syntax error" is here to catch this case.
34908   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34909 /* end confdefs.h.  */
34910 #ifdef __STDC__
34911 # include <limits.h>
34912 #else
34913 # include <assert.h>
34914 #endif
34915                      Syntax error
34916 _ACEOF
34917 if ac_fn_c_try_cpp "$LINENO"; then :
34918 
34919 else
34920   # Broken: fails on valid input.
34921 continue
34922 fi
34923 rm -f conftest.err conftest.i conftest.$ac_ext
34924 
34925   # OK, works on sane cases.  Now check whether nonexistent headers
34926   # can be detected and how.
34927   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34928 /* end confdefs.h.  */
34929 #include <ac_nonexistent.h>
34930 _ACEOF
34931 if ac_fn_c_try_cpp "$LINENO"; then :
34932   # Broken: success on invalid input.
34933 continue
34934 else
34935   # Passes both tests.
34936 ac_preproc_ok=:
34937 break
34938 fi
34939 rm -f conftest.err conftest.i conftest.$ac_ext
34940 
34941 done
34942 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34943 rm -f conftest.i conftest.err conftest.$ac_ext
34944 if $ac_preproc_ok; then :
34945   break
34946 fi
34947 
34948     done
34949     ac_cv_prog_CPP=$CPP
34950 
34951 fi
34952   CPP=$ac_cv_prog_CPP
34953 else
34954   ac_cv_prog_CPP=$CPP
34955 fi
34956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34957 $as_echo "$CPP" >&6; }
34958 ac_preproc_ok=false
34959 for ac_c_preproc_warn_flag in '' yes
34960 do
34961   # Use a header file that comes with gcc, so configuring glibc
34962   # with a fresh cross-compiler works.
34963   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34964   # <limits.h> exists even on freestanding compilers.
34965   # On the NeXT, cc -E runs the code through the compiler's parser,
34966   # not just through cpp. "Syntax error" is here to catch this case.
34967   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34968 /* end confdefs.h.  */
34969 #ifdef __STDC__
34970 # include <limits.h>
34971 #else
34972 # include <assert.h>
34973 #endif
34974                      Syntax error
34975 _ACEOF
34976 if ac_fn_c_try_cpp "$LINENO"; then :
34977 
34978 else
34979   # Broken: fails on valid input.
34980 continue
34981 fi
34982 rm -f conftest.err conftest.i conftest.$ac_ext
34983 
34984   # OK, works on sane cases.  Now check whether nonexistent headers
34985   # can be detected and how.
34986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34987 /* end confdefs.h.  */
34988 #include <ac_nonexistent.h>
34989 _ACEOF
34990 if ac_fn_c_try_cpp "$LINENO"; then :
34991   # Broken: success on invalid input.
34992 continue
34993 else
34994   # Passes both tests.
34995 ac_preproc_ok=:
34996 break
34997 fi
34998 rm -f conftest.err conftest.i conftest.$ac_ext
34999 
35000 done
35001 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35002 rm -f conftest.i conftest.err conftest.$ac_ext
35003 if $ac_preproc_ok; then :
35004 
35005 else
35006   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35007 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35008 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35009 See \`config.log' for more details" "$LINENO" 5; }
35010 fi
35011 
35012 ac_ext=cpp
35013 ac_cpp='$CXXCPP $CPPFLAGS'
35014 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35015 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35016 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35017 
35018 
35019   # Only process if variable expands to non-empty
35020 
35021   if test "x$CPP" != x; then
35022     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35023 
35024   # First separate the path from the arguments. This will split at the first
35025   # space.
35026   complete="$CPP"
35027   path="${complete%% *}"
35028   tmp="$complete EOL"
35029   arguments="${tmp#* }"
35030 
35031   # Input might be given as Windows format, start by converting to
35032   # unix format.
35033   new_path=`$CYGPATH -u "$path"`
35034 
35035   # Now try to locate executable using which
35036   new_path=`$WHICH "$new_path" 2> /dev/null`
35037   # bat and cmd files are not always considered executable in cygwin causing which
35038   # to not find them
35039   if test "x$new_path" = x \
35040       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35041       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35042     new_path=`$CYGPATH -u "$path"`
35043   fi
35044   if test "x$new_path" = x; then
35045     # Oops. Which didn't find the executable.
35046     # The splitting of arguments from the executable at a space might have been incorrect,
35047     # since paths with space are more likely in Windows. Give it another try with the whole
35048     # argument.
35049     path="$complete"
35050     arguments="EOL"
35051     new_path=`$CYGPATH -u "$path"`
35052     new_path=`$WHICH "$new_path" 2> /dev/null`
35053     # bat and cmd files are not always considered executable in cygwin causing which
35054     # to not find them
35055     if test "x$new_path" = x \
35056         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35057         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35058       new_path=`$CYGPATH -u "$path"`
35059     fi
35060     if test "x$new_path" = x; then
35061       # It's still not found. Now this is an unrecoverable error.
35062       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35063 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35064       has_space=`$ECHO "$complete" | $GREP " "`
35065       if test "x$has_space" != x; then
35066         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35067 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35068       fi
35069       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35070     fi
35071   fi
35072 
35073   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35074   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35075   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35076   # "foo.exe" is OK but "foo" is an error.
35077   #
35078   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35079   # It is also a way to make sure we got the proper file name for the real test later on.
35080   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35081   if test "x$test_shortpath" = x; then
35082     # Short path failed, file does not exist as specified.
35083     # Try adding .exe or .cmd
35084     if test -f "${new_path}.exe"; then
35085       input_to_shortpath="${new_path}.exe"
35086     elif test -f "${new_path}.cmd"; then
35087       input_to_shortpath="${new_path}.cmd"
35088     else
35089       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35090 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35091       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35092 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35093       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35094     fi
35095   else
35096     input_to_shortpath="$new_path"
35097   fi
35098 
35099   # Call helper function which possibly converts this using DOS-style short mode.
35100   # If so, the updated path is stored in $new_path.
35101   new_path="$input_to_shortpath"
35102 
35103   input_path="$input_to_shortpath"
35104   # Check if we need to convert this using DOS-style short mode. If the path
35105   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35106   # take no chances and rewrite it.
35107   # Note: m4 eats our [], so we need to use [ and ] instead.
35108   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35109   if test "x$has_forbidden_chars" != x; then
35110     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35111     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35112     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35113     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35114       # Going to short mode and back again did indeed matter. Since short mode is
35115       # case insensitive, let's make it lowercase to improve readability.
35116       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35117       # Now convert it back to Unix-style (cygpath)
35118       input_path=`$CYGPATH -u "$shortmode_path"`
35119       new_path="$input_path"
35120     fi
35121   fi
35122 
35123   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35124   if test "x$test_cygdrive_prefix" = x; then
35125     # As a simple fix, exclude /usr/bin since it's not a real path.
35126     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35127       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35128       # a path prefixed by /cygdrive for fixpath to work.
35129       new_path="$CYGWIN_ROOT_PATH$input_path"
35130     fi
35131   fi
35132 
35133   # remove trailing .exe if any
35134   new_path="${new_path/%.exe/}"
35135 
35136     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35137 
35138   # First separate the path from the arguments. This will split at the first
35139   # space.
35140   complete="$CPP"
35141   path="${complete%% *}"
35142   tmp="$complete EOL"
35143   arguments="${tmp#* }"
35144 
35145   # Input might be given as Windows format, start by converting to
35146   # unix format.
35147   new_path="$path"
35148 
35149   windows_path="$new_path"
35150   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35151     unix_path=`$CYGPATH -u "$windows_path"`
35152     new_path="$unix_path"
35153   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35154     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35155     new_path="$unix_path"
35156   fi
35157 
35158 
35159   # Now try to locate executable using which
35160   new_path=`$WHICH "$new_path" 2> /dev/null`
35161 
35162   if test "x$new_path" = x; then
35163     # Oops. Which didn't find the executable.
35164     # The splitting of arguments from the executable at a space might have been incorrect,
35165     # since paths with space are more likely in Windows. Give it another try with the whole
35166     # argument.
35167     path="$complete"
35168     arguments="EOL"
35169     new_path="$path"
35170 
35171   windows_path="$new_path"
35172   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35173     unix_path=`$CYGPATH -u "$windows_path"`
35174     new_path="$unix_path"
35175   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35176     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35177     new_path="$unix_path"
35178   fi
35179 
35180 
35181     new_path=`$WHICH "$new_path" 2> /dev/null`
35182     # bat and cmd files are not always considered executable in MSYS causing which
35183     # to not find them
35184     if test "x$new_path" = x \
35185         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35186         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35187       new_path="$path"
35188 
35189   windows_path="$new_path"
35190   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35191     unix_path=`$CYGPATH -u "$windows_path"`
35192     new_path="$unix_path"
35193   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35194     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35195     new_path="$unix_path"
35196   fi
35197 
35198     fi
35199 
35200     if test "x$new_path" = x; then
35201       # It's still not found. Now this is an unrecoverable error.
35202       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35203 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35204       has_space=`$ECHO "$complete" | $GREP " "`
35205       if test "x$has_space" != x; then
35206         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35207 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35208       fi
35209       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35210     fi
35211   fi
35212 
35213   # Now new_path has a complete unix path to the binary
35214   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35215     # Keep paths in /bin as-is, but remove trailing .exe if any
35216     new_path="${new_path/%.exe/}"
35217     # Do not save /bin paths to all_fixpath_prefixes!
35218   else
35219     # Not in mixed or Windows style, start by that.
35220     new_path=`cmd //c echo $new_path`
35221 
35222   input_path="$new_path"
35223   # Check if we need to convert this using DOS-style short mode. If the path
35224   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35225   # take no chances and rewrite it.
35226   # Note: m4 eats our [], so we need to use [ and ] instead.
35227   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35228   if test "x$has_forbidden_chars" != x; then
35229     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35230     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35231   fi
35232 
35233     # Output is in $new_path
35234 
35235   windows_path="$new_path"
35236   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35237     unix_path=`$CYGPATH -u "$windows_path"`
35238     new_path="$unix_path"
35239   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35240     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35241     new_path="$unix_path"
35242   fi
35243 
35244     # remove trailing .exe if any
35245     new_path="${new_path/%.exe/}"
35246 
35247     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35248     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35249   fi
35250 
35251     else
35252       # We're on a unix platform. Hooray! :)
35253       # First separate the path from the arguments. This will split at the first
35254       # space.
35255       complete="$CPP"
35256       path="${complete%% *}"
35257       tmp="$complete EOL"
35258       arguments="${tmp#* }"
35259 
35260       # Cannot rely on the command "which" here since it doesn't always work.
35261       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35262       if test -z "$is_absolute_path"; then
35263         # Path to executable is not absolute. Find it.
35264         IFS_save="$IFS"
35265         IFS=:
35266         for p in $PATH; do
35267           if test -f "$p/$path" && test -x "$p/$path"; then
35268             new_path="$p/$path"
35269             break
35270           fi
35271         done
35272         IFS="$IFS_save"
35273       else
35274         # This is an absolute path, we can use it without further modifications.
35275         new_path="$path"
35276       fi
35277 
35278       if test "x$new_path" = x; then
35279         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35280 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35281         has_space=`$ECHO "$complete" | $GREP " "`
35282         if test "x$has_space" != x; then
35283           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35284 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35285         fi
35286         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35287       fi
35288     fi
35289 
35290     # Now join together the path and the arguments once again
35291     if test "x$arguments" != xEOL; then
35292       new_complete="$new_path ${arguments% *}"
35293     else
35294       new_complete="$new_path"
35295     fi
35296 
35297     if test "x$complete" != "x$new_complete"; then
35298       CPP="$new_complete"
35299       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35300 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35301     fi
35302   fi
35303 
35304   ac_ext=cpp
35305 ac_cpp='$CXXCPP $CPPFLAGS'
35306 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35307 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35308 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35310 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35311 if test -z "$CXXCPP"; then
35312   if ${ac_cv_prog_CXXCPP+:} false; then :
35313   $as_echo_n "(cached) " >&6
35314 else
35315       # Double quotes because CXXCPP needs to be expanded
35316     for CXXCPP in "$CXX -E" "/lib/cpp"
35317     do
35318       ac_preproc_ok=false
35319 for ac_cxx_preproc_warn_flag in '' yes
35320 do
35321   # Use a header file that comes with gcc, so configuring glibc
35322   # with a fresh cross-compiler works.
35323   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35324   # <limits.h> exists even on freestanding compilers.
35325   # On the NeXT, cc -E runs the code through the compiler's parser,
35326   # not just through cpp. "Syntax error" is here to catch this case.
35327   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35328 /* end confdefs.h.  */
35329 #ifdef __STDC__
35330 # include <limits.h>
35331 #else
35332 # include <assert.h>
35333 #endif
35334                      Syntax error
35335 _ACEOF
35336 if ac_fn_cxx_try_cpp "$LINENO"; then :
35337 
35338 else
35339   # Broken: fails on valid input.
35340 continue
35341 fi
35342 rm -f conftest.err conftest.i conftest.$ac_ext
35343 
35344   # OK, works on sane cases.  Now check whether nonexistent headers
35345   # can be detected and how.
35346   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35347 /* end confdefs.h.  */
35348 #include <ac_nonexistent.h>
35349 _ACEOF
35350 if ac_fn_cxx_try_cpp "$LINENO"; then :
35351   # Broken: success on invalid input.
35352 continue
35353 else
35354   # Passes both tests.
35355 ac_preproc_ok=:
35356 break
35357 fi
35358 rm -f conftest.err conftest.i conftest.$ac_ext
35359 
35360 done
35361 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35362 rm -f conftest.i conftest.err conftest.$ac_ext
35363 if $ac_preproc_ok; then :
35364   break
35365 fi
35366 
35367     done
35368     ac_cv_prog_CXXCPP=$CXXCPP
35369 
35370 fi
35371   CXXCPP=$ac_cv_prog_CXXCPP
35372 else
35373   ac_cv_prog_CXXCPP=$CXXCPP
35374 fi
35375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35376 $as_echo "$CXXCPP" >&6; }
35377 ac_preproc_ok=false
35378 for ac_cxx_preproc_warn_flag in '' yes
35379 do
35380   # Use a header file that comes with gcc, so configuring glibc
35381   # with a fresh cross-compiler works.
35382   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35383   # <limits.h> exists even on freestanding compilers.
35384   # On the NeXT, cc -E runs the code through the compiler's parser,
35385   # not just through cpp. "Syntax error" is here to catch this case.
35386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35387 /* end confdefs.h.  */
35388 #ifdef __STDC__
35389 # include <limits.h>
35390 #else
35391 # include <assert.h>
35392 #endif
35393                      Syntax error
35394 _ACEOF
35395 if ac_fn_cxx_try_cpp "$LINENO"; then :
35396 
35397 else
35398   # Broken: fails on valid input.
35399 continue
35400 fi
35401 rm -f conftest.err conftest.i conftest.$ac_ext
35402 
35403   # OK, works on sane cases.  Now check whether nonexistent headers
35404   # can be detected and how.
35405   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35406 /* end confdefs.h.  */
35407 #include <ac_nonexistent.h>
35408 _ACEOF
35409 if ac_fn_cxx_try_cpp "$LINENO"; then :
35410   # Broken: success on invalid input.
35411 continue
35412 else
35413   # Passes both tests.
35414 ac_preproc_ok=:
35415 break
35416 fi
35417 rm -f conftest.err conftest.i conftest.$ac_ext
35418 
35419 done
35420 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35421 rm -f conftest.i conftest.err conftest.$ac_ext
35422 if $ac_preproc_ok; then :
35423 
35424 else
35425   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35426 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35427 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35428 See \`config.log' for more details" "$LINENO" 5; }
35429 fi
35430 
35431 ac_ext=cpp
35432 ac_cpp='$CXXCPP $CPPFLAGS'
35433 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35434 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35435 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35436 
35437 
35438   # Only process if variable expands to non-empty
35439 
35440   if test "x$CXXCPP" != x; then
35441     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35442 
35443   # First separate the path from the arguments. This will split at the first
35444   # space.
35445   complete="$CXXCPP"
35446   path="${complete%% *}"
35447   tmp="$complete EOL"
35448   arguments="${tmp#* }"
35449 
35450   # Input might be given as Windows format, start by converting to
35451   # unix format.
35452   new_path=`$CYGPATH -u "$path"`
35453 
35454   # Now try to locate executable using which
35455   new_path=`$WHICH "$new_path" 2> /dev/null`
35456   # bat and cmd files are not always considered executable in cygwin causing which
35457   # to not find them
35458   if test "x$new_path" = x \
35459       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35460       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35461     new_path=`$CYGPATH -u "$path"`
35462   fi
35463   if test "x$new_path" = x; then
35464     # Oops. Which didn't find the executable.
35465     # The splitting of arguments from the executable at a space might have been incorrect,
35466     # since paths with space are more likely in Windows. Give it another try with the whole
35467     # argument.
35468     path="$complete"
35469     arguments="EOL"
35470     new_path=`$CYGPATH -u "$path"`
35471     new_path=`$WHICH "$new_path" 2> /dev/null`
35472     # bat and cmd files are not always considered executable in cygwin causing which
35473     # to not find them
35474     if test "x$new_path" = x \
35475         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35476         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35477       new_path=`$CYGPATH -u "$path"`
35478     fi
35479     if test "x$new_path" = x; then
35480       # It's still not found. Now this is an unrecoverable error.
35481       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35482 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35483       has_space=`$ECHO "$complete" | $GREP " "`
35484       if test "x$has_space" != x; then
35485         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35486 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35487       fi
35488       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35489     fi
35490   fi
35491 
35492   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35493   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35494   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35495   # "foo.exe" is OK but "foo" is an error.
35496   #
35497   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35498   # It is also a way to make sure we got the proper file name for the real test later on.
35499   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35500   if test "x$test_shortpath" = x; then
35501     # Short path failed, file does not exist as specified.
35502     # Try adding .exe or .cmd
35503     if test -f "${new_path}.exe"; then
35504       input_to_shortpath="${new_path}.exe"
35505     elif test -f "${new_path}.cmd"; then
35506       input_to_shortpath="${new_path}.cmd"
35507     else
35508       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35509 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35510       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35511 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35512       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35513     fi
35514   else
35515     input_to_shortpath="$new_path"
35516   fi
35517 
35518   # Call helper function which possibly converts this using DOS-style short mode.
35519   # If so, the updated path is stored in $new_path.
35520   new_path="$input_to_shortpath"
35521 
35522   input_path="$input_to_shortpath"
35523   # Check if we need to convert this using DOS-style short mode. If the path
35524   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35525   # take no chances and rewrite it.
35526   # Note: m4 eats our [], so we need to use [ and ] instead.
35527   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35528   if test "x$has_forbidden_chars" != x; then
35529     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35530     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35531     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35532     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35533       # Going to short mode and back again did indeed matter. Since short mode is
35534       # case insensitive, let's make it lowercase to improve readability.
35535       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35536       # Now convert it back to Unix-style (cygpath)
35537       input_path=`$CYGPATH -u "$shortmode_path"`
35538       new_path="$input_path"
35539     fi
35540   fi
35541 
35542   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35543   if test "x$test_cygdrive_prefix" = x; then
35544     # As a simple fix, exclude /usr/bin since it's not a real path.
35545     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35546       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35547       # a path prefixed by /cygdrive for fixpath to work.
35548       new_path="$CYGWIN_ROOT_PATH$input_path"
35549     fi
35550   fi
35551 
35552   # remove trailing .exe if any
35553   new_path="${new_path/%.exe/}"
35554 
35555     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35556 
35557   # First separate the path from the arguments. This will split at the first
35558   # space.
35559   complete="$CXXCPP"
35560   path="${complete%% *}"
35561   tmp="$complete EOL"
35562   arguments="${tmp#* }"
35563 
35564   # Input might be given as Windows format, start by converting to
35565   # unix format.
35566   new_path="$path"
35567 
35568   windows_path="$new_path"
35569   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35570     unix_path=`$CYGPATH -u "$windows_path"`
35571     new_path="$unix_path"
35572   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35573     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35574     new_path="$unix_path"
35575   fi
35576 
35577 
35578   # Now try to locate executable using which
35579   new_path=`$WHICH "$new_path" 2> /dev/null`
35580 
35581   if test "x$new_path" = x; then
35582     # Oops. Which didn't find the executable.
35583     # The splitting of arguments from the executable at a space might have been incorrect,
35584     # since paths with space are more likely in Windows. Give it another try with the whole
35585     # argument.
35586     path="$complete"
35587     arguments="EOL"
35588     new_path="$path"
35589 
35590   windows_path="$new_path"
35591   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35592     unix_path=`$CYGPATH -u "$windows_path"`
35593     new_path="$unix_path"
35594   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35595     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35596     new_path="$unix_path"
35597   fi
35598 
35599 
35600     new_path=`$WHICH "$new_path" 2> /dev/null`
35601     # bat and cmd files are not always considered executable in MSYS causing which
35602     # to not find them
35603     if test "x$new_path" = x \
35604         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35605         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35606       new_path="$path"
35607 
35608   windows_path="$new_path"
35609   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35610     unix_path=`$CYGPATH -u "$windows_path"`
35611     new_path="$unix_path"
35612   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35613     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35614     new_path="$unix_path"
35615   fi
35616 
35617     fi
35618 
35619     if test "x$new_path" = x; then
35620       # It's still not found. Now this is an unrecoverable error.
35621       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35622 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35623       has_space=`$ECHO "$complete" | $GREP " "`
35624       if test "x$has_space" != x; then
35625         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35626 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35627       fi
35628       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35629     fi
35630   fi
35631 
35632   # Now new_path has a complete unix path to the binary
35633   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35634     # Keep paths in /bin as-is, but remove trailing .exe if any
35635     new_path="${new_path/%.exe/}"
35636     # Do not save /bin paths to all_fixpath_prefixes!
35637   else
35638     # Not in mixed or Windows style, start by that.
35639     new_path=`cmd //c echo $new_path`
35640 
35641   input_path="$new_path"
35642   # Check if we need to convert this using DOS-style short mode. If the path
35643   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35644   # take no chances and rewrite it.
35645   # Note: m4 eats our [], so we need to use [ and ] instead.
35646   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35647   if test "x$has_forbidden_chars" != x; then
35648     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35649     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35650   fi
35651 
35652     # Output is in $new_path
35653 
35654   windows_path="$new_path"
35655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35656     unix_path=`$CYGPATH -u "$windows_path"`
35657     new_path="$unix_path"
35658   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35659     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35660     new_path="$unix_path"
35661   fi
35662 
35663     # remove trailing .exe if any
35664     new_path="${new_path/%.exe/}"
35665 
35666     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35667     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35668   fi
35669 
35670     else
35671       # We're on a unix platform. Hooray! :)
35672       # First separate the path from the arguments. This will split at the first
35673       # space.
35674       complete="$CXXCPP"
35675       path="${complete%% *}"
35676       tmp="$complete EOL"
35677       arguments="${tmp#* }"
35678 
35679       # Cannot rely on the command "which" here since it doesn't always work.
35680       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35681       if test -z "$is_absolute_path"; then
35682         # Path to executable is not absolute. Find it.
35683         IFS_save="$IFS"
35684         IFS=:
35685         for p in $PATH; do
35686           if test -f "$p/$path" && test -x "$p/$path"; then
35687             new_path="$p/$path"
35688             break
35689           fi
35690         done
35691         IFS="$IFS_save"
35692       else
35693         # This is an absolute path, we can use it without further modifications.
35694         new_path="$path"
35695       fi
35696 
35697       if test "x$new_path" = x; then
35698         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35699 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35700         has_space=`$ECHO "$complete" | $GREP " "`
35701         if test "x$has_space" != x; then
35702           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35703 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35704         fi
35705         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35706       fi
35707     fi
35708 
35709     # Now join together the path and the arguments once again
35710     if test "x$arguments" != xEOL; then
35711       new_complete="$new_path ${arguments% *}"
35712     else
35713       new_complete="$new_path"
35714     fi
35715 
35716     if test "x$complete" != "x$new_complete"; then
35717       CXXCPP="$new_complete"
35718       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35719 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35720     fi
35721   fi
35722 
35723 
35724   #
35725   # Setup the linker (LD)
35726   #
35727   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35728     # In the Microsoft toolchain we have a separate LD command "link".
35729     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35730     # a cygwin program for something completely different.
35731     # Extract the first word of "link", so it can be a program name with args.
35732 set dummy link; ac_word=$2
35733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35734 $as_echo_n "checking for $ac_word... " >&6; }
35735 if ${ac_cv_prog_LD+:} false; then :
35736   $as_echo_n "(cached) " >&6
35737 else
35738   if test -n "$LD"; then
35739   ac_cv_prog_LD="$LD" # Let the user override the test.
35740 else
35741   ac_prog_rejected=no
35742 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35743 for as_dir in $PATH
35744 do
35745   IFS=$as_save_IFS
35746   test -z "$as_dir" && as_dir=.
35747     for ac_exec_ext in '' $ac_executable_extensions; do
35748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35749     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35750        ac_prog_rejected=yes
35751        continue
35752      fi
35753     ac_cv_prog_LD="link"
35754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35755     break 2
35756   fi
35757 done
35758   done
35759 IFS=$as_save_IFS
35760 
35761 if test $ac_prog_rejected = yes; then
35762   # We found a bogon in the path, so make sure we never use it.
35763   set dummy $ac_cv_prog_LD
35764   shift
35765   if test $# != 0; then
35766     # We chose a different compiler from the bogus one.
35767     # However, it has the same basename, so the bogon will be chosen
35768     # first if we set LD to just the basename; use the full file name.
35769     shift
35770     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35771   fi
35772 fi
35773 fi
35774 fi
35775 LD=$ac_cv_prog_LD
35776 if test -n "$LD"; then
35777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35778 $as_echo "$LD" >&6; }
35779 else
35780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35781 $as_echo "no" >&6; }
35782 fi
35783 
35784 
35785 
35786   # Only process if variable expands to non-empty
35787 
35788   if test "x$LD" != x; then
35789     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35790 
35791   # First separate the path from the arguments. This will split at the first
35792   # space.
35793   complete="$LD"
35794   path="${complete%% *}"
35795   tmp="$complete EOL"
35796   arguments="${tmp#* }"
35797 
35798   # Input might be given as Windows format, start by converting to
35799   # unix format.
35800   new_path=`$CYGPATH -u "$path"`
35801 
35802   # Now try to locate executable using which
35803   new_path=`$WHICH "$new_path" 2> /dev/null`
35804   # bat and cmd files are not always considered executable in cygwin causing which
35805   # to not find them
35806   if test "x$new_path" = x \
35807       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35808       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35809     new_path=`$CYGPATH -u "$path"`
35810   fi
35811   if test "x$new_path" = x; then
35812     # Oops. Which didn't find the executable.
35813     # The splitting of arguments from the executable at a space might have been incorrect,
35814     # since paths with space are more likely in Windows. Give it another try with the whole
35815     # argument.
35816     path="$complete"
35817     arguments="EOL"
35818     new_path=`$CYGPATH -u "$path"`
35819     new_path=`$WHICH "$new_path" 2> /dev/null`
35820     # bat and cmd files are not always considered executable in cygwin causing which
35821     # to not find them
35822     if test "x$new_path" = x \
35823         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35824         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35825       new_path=`$CYGPATH -u "$path"`
35826     fi
35827     if test "x$new_path" = x; then
35828       # It's still not found. Now this is an unrecoverable error.
35829       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35830 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35831       has_space=`$ECHO "$complete" | $GREP " "`
35832       if test "x$has_space" != x; then
35833         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35834 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35835       fi
35836       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35837     fi
35838   fi
35839 
35840   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35841   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35842   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35843   # "foo.exe" is OK but "foo" is an error.
35844   #
35845   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35846   # It is also a way to make sure we got the proper file name for the real test later on.
35847   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35848   if test "x$test_shortpath" = x; then
35849     # Short path failed, file does not exist as specified.
35850     # Try adding .exe or .cmd
35851     if test -f "${new_path}.exe"; then
35852       input_to_shortpath="${new_path}.exe"
35853     elif test -f "${new_path}.cmd"; then
35854       input_to_shortpath="${new_path}.cmd"
35855     else
35856       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35857 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35858       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35859 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35860       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35861     fi
35862   else
35863     input_to_shortpath="$new_path"
35864   fi
35865 
35866   # Call helper function which possibly converts this using DOS-style short mode.
35867   # If so, the updated path is stored in $new_path.
35868   new_path="$input_to_shortpath"
35869 
35870   input_path="$input_to_shortpath"
35871   # Check if we need to convert this using DOS-style short mode. If the path
35872   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35873   # take no chances and rewrite it.
35874   # Note: m4 eats our [], so we need to use [ and ] instead.
35875   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35876   if test "x$has_forbidden_chars" != x; then
35877     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35878     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35879     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35880     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35881       # Going to short mode and back again did indeed matter. Since short mode is
35882       # case insensitive, let's make it lowercase to improve readability.
35883       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35884       # Now convert it back to Unix-style (cygpath)
35885       input_path=`$CYGPATH -u "$shortmode_path"`
35886       new_path="$input_path"
35887     fi
35888   fi
35889 
35890   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35891   if test "x$test_cygdrive_prefix" = x; then
35892     # As a simple fix, exclude /usr/bin since it's not a real path.
35893     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35894       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35895       # a path prefixed by /cygdrive for fixpath to work.
35896       new_path="$CYGWIN_ROOT_PATH$input_path"
35897     fi
35898   fi
35899 
35900   # remove trailing .exe if any
35901   new_path="${new_path/%.exe/}"
35902 
35903     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35904 
35905   # First separate the path from the arguments. This will split at the first
35906   # space.
35907   complete="$LD"
35908   path="${complete%% *}"
35909   tmp="$complete EOL"
35910   arguments="${tmp#* }"
35911 
35912   # Input might be given as Windows format, start by converting to
35913   # unix format.
35914   new_path="$path"
35915 
35916   windows_path="$new_path"
35917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35918     unix_path=`$CYGPATH -u "$windows_path"`
35919     new_path="$unix_path"
35920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35921     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35922     new_path="$unix_path"
35923   fi
35924 
35925 
35926   # Now try to locate executable using which
35927   new_path=`$WHICH "$new_path" 2> /dev/null`
35928 
35929   if test "x$new_path" = x; then
35930     # Oops. Which didn't find the executable.
35931     # The splitting of arguments from the executable at a space might have been incorrect,
35932     # since paths with space are more likely in Windows. Give it another try with the whole
35933     # argument.
35934     path="$complete"
35935     arguments="EOL"
35936     new_path="$path"
35937 
35938   windows_path="$new_path"
35939   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35940     unix_path=`$CYGPATH -u "$windows_path"`
35941     new_path="$unix_path"
35942   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35943     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35944     new_path="$unix_path"
35945   fi
35946 
35947 
35948     new_path=`$WHICH "$new_path" 2> /dev/null`
35949     # bat and cmd files are not always considered executable in MSYS causing which
35950     # to not find them
35951     if test "x$new_path" = x \
35952         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35953         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35954       new_path="$path"
35955 
35956   windows_path="$new_path"
35957   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35958     unix_path=`$CYGPATH -u "$windows_path"`
35959     new_path="$unix_path"
35960   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35961     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35962     new_path="$unix_path"
35963   fi
35964 
35965     fi
35966 
35967     if test "x$new_path" = x; then
35968       # It's still not found. Now this is an unrecoverable error.
35969       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35970 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35971       has_space=`$ECHO "$complete" | $GREP " "`
35972       if test "x$has_space" != x; then
35973         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35974 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35975       fi
35976       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35977     fi
35978   fi
35979 
35980   # Now new_path has a complete unix path to the binary
35981   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35982     # Keep paths in /bin as-is, but remove trailing .exe if any
35983     new_path="${new_path/%.exe/}"
35984     # Do not save /bin paths to all_fixpath_prefixes!
35985   else
35986     # Not in mixed or Windows style, start by that.
35987     new_path=`cmd //c echo $new_path`
35988 
35989   input_path="$new_path"
35990   # Check if we need to convert this using DOS-style short mode. If the path
35991   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35992   # take no chances and rewrite it.
35993   # Note: m4 eats our [], so we need to use [ and ] instead.
35994   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35995   if test "x$has_forbidden_chars" != x; then
35996     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35997     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35998   fi
35999 
36000     # Output is in $new_path
36001 
36002   windows_path="$new_path"
36003   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36004     unix_path=`$CYGPATH -u "$windows_path"`
36005     new_path="$unix_path"
36006   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36007     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36008     new_path="$unix_path"
36009   fi
36010 
36011     # remove trailing .exe if any
36012     new_path="${new_path/%.exe/}"
36013 
36014     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36015     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36016   fi
36017 
36018     else
36019       # We're on a unix platform. Hooray! :)
36020       # First separate the path from the arguments. This will split at the first
36021       # space.
36022       complete="$LD"
36023       path="${complete%% *}"
36024       tmp="$complete EOL"
36025       arguments="${tmp#* }"
36026 
36027       # Cannot rely on the command "which" here since it doesn't always work.
36028       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36029       if test -z "$is_absolute_path"; then
36030         # Path to executable is not absolute. Find it.
36031         IFS_save="$IFS"
36032         IFS=:
36033         for p in $PATH; do
36034           if test -f "$p/$path" && test -x "$p/$path"; then
36035             new_path="$p/$path"
36036             break
36037           fi
36038         done
36039         IFS="$IFS_save"
36040       else
36041         # This is an absolute path, we can use it without further modifications.
36042         new_path="$path"
36043       fi
36044 
36045       if test "x$new_path" = x; then
36046         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36047 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36048         has_space=`$ECHO "$complete" | $GREP " "`
36049         if test "x$has_space" != x; then
36050           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36051 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36052         fi
36053         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36054       fi
36055     fi
36056 
36057     # Now join together the path and the arguments once again
36058     if test "x$arguments" != xEOL; then
36059       new_complete="$new_path ${arguments% *}"
36060     else
36061       new_complete="$new_path"
36062     fi
36063 
36064     if test "x$complete" != "x$new_complete"; then
36065       LD="$new_complete"
36066       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36067 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36068     fi
36069   fi
36070 
36071     # Verify that we indeed succeeded with this trick.
36072     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36073 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36074     "$LD" --version > /dev/null
36075     if test $? -eq 0 ; then
36076       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36077 $as_echo "no" >&6; }
36078       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36079     else
36080       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36081 $as_echo "yes" >&6; }
36082     fi
36083     LDCXX="$LD"
36084   else
36085     # All other toolchains use the compiler to link.
36086     LD="$CC"
36087     LDCXX="$CXX"
36088   fi
36089 
36090   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36091 
36092 
36093   #
36094   # Setup the assembler (AS)
36095   #
36096   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36097     # FIXME: should this really be solaris, or solstudio?
36098 
36099 
36100   # Publish this variable in the help.
36101 
36102 
36103   if [ -z "${AS+x}" ]; then
36104     # The variable is not set by user, try to locate tool using the code snippet
36105     for ac_prog in as
36106 do
36107   # Extract the first word of "$ac_prog", so it can be a program name with args.
36108 set dummy $ac_prog; ac_word=$2
36109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36110 $as_echo_n "checking for $ac_word... " >&6; }
36111 if ${ac_cv_path_AS+:} false; then :
36112   $as_echo_n "(cached) " >&6
36113 else
36114   case $AS in
36115   [\\/]* | ?:[\\/]*)
36116   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36117   ;;
36118   *)
36119   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36120 for as_dir in $PATH
36121 do
36122   IFS=$as_save_IFS
36123   test -z "$as_dir" && as_dir=.
36124     for ac_exec_ext in '' $ac_executable_extensions; do
36125   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36126     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36128     break 2
36129   fi
36130 done
36131   done
36132 IFS=$as_save_IFS
36133 
36134   ;;
36135 esac
36136 fi
36137 AS=$ac_cv_path_AS
36138 if test -n "$AS"; then
36139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36140 $as_echo "$AS" >&6; }
36141 else
36142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36143 $as_echo "no" >&6; }
36144 fi
36145 
36146 
36147   test -n "$AS" && break
36148 done
36149 
36150   else
36151     # The variable is set, but is it from the command line or the environment?
36152 
36153     # Try to remove the string !AS! from our list.
36154     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36155     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36156       # If it failed, the variable was not from the command line. Ignore it,
36157       # but warn the user (except for BASH, which is always set by the calling BASH).
36158       if test "xAS" != xBASH; then
36159         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36160 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36161       fi
36162       # Try to locate tool using the code snippet
36163       for ac_prog in as
36164 do
36165   # Extract the first word of "$ac_prog", so it can be a program name with args.
36166 set dummy $ac_prog; ac_word=$2
36167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36168 $as_echo_n "checking for $ac_word... " >&6; }
36169 if ${ac_cv_path_AS+:} false; then :
36170   $as_echo_n "(cached) " >&6
36171 else
36172   case $AS in
36173   [\\/]* | ?:[\\/]*)
36174   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36175   ;;
36176   *)
36177   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36178 for as_dir in $PATH
36179 do
36180   IFS=$as_save_IFS
36181   test -z "$as_dir" && as_dir=.
36182     for ac_exec_ext in '' $ac_executable_extensions; do
36183   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36184     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36186     break 2
36187   fi
36188 done
36189   done
36190 IFS=$as_save_IFS
36191 
36192   ;;
36193 esac
36194 fi
36195 AS=$ac_cv_path_AS
36196 if test -n "$AS"; then
36197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36198 $as_echo "$AS" >&6; }
36199 else
36200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36201 $as_echo "no" >&6; }
36202 fi
36203 
36204 
36205   test -n "$AS" && break
36206 done
36207 
36208     else
36209       # If it succeeded, then it was overridden by the user. We will use it
36210       # for the tool.
36211 
36212       # First remove it from the list of overridden variables, so we can test
36213       # for unknown variables in the end.
36214       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36215 
36216       # Check if we try to supply an empty value
36217       if test "x$AS" = x; then
36218         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36219 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36220         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36221 $as_echo_n "checking for AS... " >&6; }
36222         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36223 $as_echo "disabled" >&6; }
36224       else
36225         # Check if the provided tool contains a complete path.
36226         tool_specified="$AS"
36227         tool_basename="${tool_specified##*/}"
36228         if test "x$tool_basename" = "x$tool_specified"; then
36229           # A command without a complete path is provided, search $PATH.
36230           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36231 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36232           # Extract the first word of "$tool_basename", so it can be a program name with args.
36233 set dummy $tool_basename; ac_word=$2
36234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36235 $as_echo_n "checking for $ac_word... " >&6; }
36236 if ${ac_cv_path_AS+:} false; then :
36237   $as_echo_n "(cached) " >&6
36238 else
36239   case $AS in
36240   [\\/]* | ?:[\\/]*)
36241   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36242   ;;
36243   *)
36244   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36245 for as_dir in $PATH
36246 do
36247   IFS=$as_save_IFS
36248   test -z "$as_dir" && as_dir=.
36249     for ac_exec_ext in '' $ac_executable_extensions; do
36250   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36251     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36252     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36253     break 2
36254   fi
36255 done
36256   done
36257 IFS=$as_save_IFS
36258 
36259   ;;
36260 esac
36261 fi
36262 AS=$ac_cv_path_AS
36263 if test -n "$AS"; then
36264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36265 $as_echo "$AS" >&6; }
36266 else
36267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36268 $as_echo "no" >&6; }
36269 fi
36270 
36271 
36272           if test "x$AS" = x; then
36273             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36274           fi
36275         else
36276           # Otherwise we believe it is a complete path. Use it as it is.
36277           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36278 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36279           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36280 $as_echo_n "checking for AS... " >&6; }
36281           if test ! -x "$tool_specified"; then
36282             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36283 $as_echo "not found" >&6; }
36284             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36285           fi
36286           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36287 $as_echo "$tool_specified" >&6; }
36288         fi
36289       fi
36290     fi
36291 
36292   fi
36293 
36294 
36295 
36296   # Only process if variable expands to non-empty
36297 
36298   if test "x$AS" != x; then
36299     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36300 
36301   # First separate the path from the arguments. This will split at the first
36302   # space.
36303   complete="$AS"
36304   path="${complete%% *}"
36305   tmp="$complete EOL"
36306   arguments="${tmp#* }"
36307 
36308   # Input might be given as Windows format, start by converting to
36309   # unix format.
36310   new_path=`$CYGPATH -u "$path"`
36311 
36312   # Now try to locate executable using which
36313   new_path=`$WHICH "$new_path" 2> /dev/null`
36314   # bat and cmd files are not always considered executable in cygwin causing which
36315   # to not find them
36316   if test "x$new_path" = x \
36317       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36318       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36319     new_path=`$CYGPATH -u "$path"`
36320   fi
36321   if test "x$new_path" = x; then
36322     # Oops. Which didn't find the executable.
36323     # The splitting of arguments from the executable at a space might have been incorrect,
36324     # since paths with space are more likely in Windows. Give it another try with the whole
36325     # argument.
36326     path="$complete"
36327     arguments="EOL"
36328     new_path=`$CYGPATH -u "$path"`
36329     new_path=`$WHICH "$new_path" 2> /dev/null`
36330     # bat and cmd files are not always considered executable in cygwin causing which
36331     # to not find them
36332     if test "x$new_path" = x \
36333         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36334         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36335       new_path=`$CYGPATH -u "$path"`
36336     fi
36337     if test "x$new_path" = x; then
36338       # It's still not found. Now this is an unrecoverable error.
36339       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36340 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36341       has_space=`$ECHO "$complete" | $GREP " "`
36342       if test "x$has_space" != x; then
36343         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36344 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36345       fi
36346       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36347     fi
36348   fi
36349 
36350   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36351   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36352   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36353   # "foo.exe" is OK but "foo" is an error.
36354   #
36355   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36356   # It is also a way to make sure we got the proper file name for the real test later on.
36357   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36358   if test "x$test_shortpath" = x; then
36359     # Short path failed, file does not exist as specified.
36360     # Try adding .exe or .cmd
36361     if test -f "${new_path}.exe"; then
36362       input_to_shortpath="${new_path}.exe"
36363     elif test -f "${new_path}.cmd"; then
36364       input_to_shortpath="${new_path}.cmd"
36365     else
36366       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36367 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36368       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36369 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36370       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36371     fi
36372   else
36373     input_to_shortpath="$new_path"
36374   fi
36375 
36376   # Call helper function which possibly converts this using DOS-style short mode.
36377   # If so, the updated path is stored in $new_path.
36378   new_path="$input_to_shortpath"
36379 
36380   input_path="$input_to_shortpath"
36381   # Check if we need to convert this using DOS-style short mode. If the path
36382   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36383   # take no chances and rewrite it.
36384   # Note: m4 eats our [], so we need to use [ and ] instead.
36385   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36386   if test "x$has_forbidden_chars" != x; then
36387     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36388     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36389     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36390     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36391       # Going to short mode and back again did indeed matter. Since short mode is
36392       # case insensitive, let's make it lowercase to improve readability.
36393       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36394       # Now convert it back to Unix-style (cygpath)
36395       input_path=`$CYGPATH -u "$shortmode_path"`
36396       new_path="$input_path"
36397     fi
36398   fi
36399 
36400   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36401   if test "x$test_cygdrive_prefix" = x; then
36402     # As a simple fix, exclude /usr/bin since it's not a real path.
36403     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36404       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36405       # a path prefixed by /cygdrive for fixpath to work.
36406       new_path="$CYGWIN_ROOT_PATH$input_path"
36407     fi
36408   fi
36409 
36410   # remove trailing .exe if any
36411   new_path="${new_path/%.exe/}"
36412 
36413     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36414 
36415   # First separate the path from the arguments. This will split at the first
36416   # space.
36417   complete="$AS"
36418   path="${complete%% *}"
36419   tmp="$complete EOL"
36420   arguments="${tmp#* }"
36421 
36422   # Input might be given as Windows format, start by converting to
36423   # unix format.
36424   new_path="$path"
36425 
36426   windows_path="$new_path"
36427   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36428     unix_path=`$CYGPATH -u "$windows_path"`
36429     new_path="$unix_path"
36430   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36431     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36432     new_path="$unix_path"
36433   fi
36434 
36435 
36436   # Now try to locate executable using which
36437   new_path=`$WHICH "$new_path" 2> /dev/null`
36438 
36439   if test "x$new_path" = x; then
36440     # Oops. Which didn't find the executable.
36441     # The splitting of arguments from the executable at a space might have been incorrect,
36442     # since paths with space are more likely in Windows. Give it another try with the whole
36443     # argument.
36444     path="$complete"
36445     arguments="EOL"
36446     new_path="$path"
36447 
36448   windows_path="$new_path"
36449   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36450     unix_path=`$CYGPATH -u "$windows_path"`
36451     new_path="$unix_path"
36452   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36453     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36454     new_path="$unix_path"
36455   fi
36456 
36457 
36458     new_path=`$WHICH "$new_path" 2> /dev/null`
36459     # bat and cmd files are not always considered executable in MSYS causing which
36460     # to not find them
36461     if test "x$new_path" = x \
36462         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36463         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36464       new_path="$path"
36465 
36466   windows_path="$new_path"
36467   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36468     unix_path=`$CYGPATH -u "$windows_path"`
36469     new_path="$unix_path"
36470   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36471     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36472     new_path="$unix_path"
36473   fi
36474 
36475     fi
36476 
36477     if test "x$new_path" = x; then
36478       # It's still not found. Now this is an unrecoverable error.
36479       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36480 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36481       has_space=`$ECHO "$complete" | $GREP " "`
36482       if test "x$has_space" != x; then
36483         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36484 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36485       fi
36486       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36487     fi
36488   fi
36489 
36490   # Now new_path has a complete unix path to the binary
36491   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36492     # Keep paths in /bin as-is, but remove trailing .exe if any
36493     new_path="${new_path/%.exe/}"
36494     # Do not save /bin paths to all_fixpath_prefixes!
36495   else
36496     # Not in mixed or Windows style, start by that.
36497     new_path=`cmd //c echo $new_path`
36498 
36499   input_path="$new_path"
36500   # Check if we need to convert this using DOS-style short mode. If the path
36501   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36502   # take no chances and rewrite it.
36503   # Note: m4 eats our [], so we need to use [ and ] instead.
36504   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36505   if test "x$has_forbidden_chars" != x; then
36506     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36507     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36508   fi
36509 
36510     # Output is in $new_path
36511 
36512   windows_path="$new_path"
36513   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36514     unix_path=`$CYGPATH -u "$windows_path"`
36515     new_path="$unix_path"
36516   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36517     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36518     new_path="$unix_path"
36519   fi
36520 
36521     # remove trailing .exe if any
36522     new_path="${new_path/%.exe/}"
36523 
36524     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36525     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36526   fi
36527 
36528     else
36529       # We're on a unix platform. Hooray! :)
36530       # First separate the path from the arguments. This will split at the first
36531       # space.
36532       complete="$AS"
36533       path="${complete%% *}"
36534       tmp="$complete EOL"
36535       arguments="${tmp#* }"
36536 
36537       # Cannot rely on the command "which" here since it doesn't always work.
36538       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36539       if test -z "$is_absolute_path"; then
36540         # Path to executable is not absolute. Find it.
36541         IFS_save="$IFS"
36542         IFS=:
36543         for p in $PATH; do
36544           if test -f "$p/$path" && test -x "$p/$path"; then
36545             new_path="$p/$path"
36546             break
36547           fi
36548         done
36549         IFS="$IFS_save"
36550       else
36551         # This is an absolute path, we can use it without further modifications.
36552         new_path="$path"
36553       fi
36554 
36555       if test "x$new_path" = x; then
36556         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36557 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36558         has_space=`$ECHO "$complete" | $GREP " "`
36559         if test "x$has_space" != x; then
36560           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36561 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36562         fi
36563         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36564       fi
36565     fi
36566 
36567     # Now join together the path and the arguments once again
36568     if test "x$arguments" != xEOL; then
36569       new_complete="$new_path ${arguments% *}"
36570     else
36571       new_complete="$new_path"
36572     fi
36573 
36574     if test "x$complete" != "x$new_complete"; then
36575       AS="$new_complete"
36576       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36577 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36578     fi
36579   fi
36580 
36581   else
36582     # FIXME: is this correct for microsoft?
36583     AS="$CC -c"
36584   fi
36585 
36586 
36587   #
36588   # Setup the archiver (AR)
36589   #
36590   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36591     # The corresponding ar tool is lib.exe (used to create static libraries)
36592     # Extract the first word of "lib", so it can be a program name with args.
36593 set dummy lib; ac_word=$2
36594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36595 $as_echo_n "checking for $ac_word... " >&6; }
36596 if ${ac_cv_prog_AR+:} false; then :
36597   $as_echo_n "(cached) " >&6
36598 else
36599   if test -n "$AR"; then
36600   ac_cv_prog_AR="$AR" # Let the user override the test.
36601 else
36602 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36603 for as_dir in $PATH
36604 do
36605   IFS=$as_save_IFS
36606   test -z "$as_dir" && as_dir=.
36607     for ac_exec_ext in '' $ac_executable_extensions; do
36608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36609     ac_cv_prog_AR="lib"
36610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36611     break 2
36612   fi
36613 done
36614   done
36615 IFS=$as_save_IFS
36616 
36617 fi
36618 fi
36619 AR=$ac_cv_prog_AR
36620 if test -n "$AR"; then
36621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36622 $as_echo "$AR" >&6; }
36623 else
36624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36625 $as_echo "no" >&6; }
36626 fi
36627 
36628 
36629   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36630 
36631 
36632   # Publish this variable in the help.
36633 
36634 
36635   if [ -z "${AR+x}" ]; then
36636     # The variable is not set by user, try to locate tool using the code snippet
36637     if test -n "$ac_tool_prefix"; then
36638   for ac_prog in ar gcc-ar
36639   do
36640     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36641 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36643 $as_echo_n "checking for $ac_word... " >&6; }
36644 if ${ac_cv_prog_AR+:} false; then :
36645   $as_echo_n "(cached) " >&6
36646 else
36647   if test -n "$AR"; then
36648   ac_cv_prog_AR="$AR" # Let the user override the test.
36649 else
36650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36651 for as_dir in $PATH
36652 do
36653   IFS=$as_save_IFS
36654   test -z "$as_dir" && as_dir=.
36655     for ac_exec_ext in '' $ac_executable_extensions; do
36656   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36657     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36658     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36659     break 2
36660   fi
36661 done
36662   done
36663 IFS=$as_save_IFS
36664 
36665 fi
36666 fi
36667 AR=$ac_cv_prog_AR
36668 if test -n "$AR"; then
36669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36670 $as_echo "$AR" >&6; }
36671 else
36672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36673 $as_echo "no" >&6; }
36674 fi
36675 
36676 
36677     test -n "$AR" && break
36678   done
36679 fi
36680 if test -z "$AR"; then
36681   ac_ct_AR=$AR
36682   for ac_prog in ar gcc-ar
36683 do
36684   # Extract the first word of "$ac_prog", so it can be a program name with args.
36685 set dummy $ac_prog; ac_word=$2
36686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36687 $as_echo_n "checking for $ac_word... " >&6; }
36688 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36689   $as_echo_n "(cached) " >&6
36690 else
36691   if test -n "$ac_ct_AR"; then
36692   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36693 else
36694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36695 for as_dir in $PATH
36696 do
36697   IFS=$as_save_IFS
36698   test -z "$as_dir" && as_dir=.
36699     for ac_exec_ext in '' $ac_executable_extensions; do
36700   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36701     ac_cv_prog_ac_ct_AR="$ac_prog"
36702     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36703     break 2
36704   fi
36705 done
36706   done
36707 IFS=$as_save_IFS
36708 
36709 fi
36710 fi
36711 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36712 if test -n "$ac_ct_AR"; then
36713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36714 $as_echo "$ac_ct_AR" >&6; }
36715 else
36716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36717 $as_echo "no" >&6; }
36718 fi
36719 
36720 
36721   test -n "$ac_ct_AR" && break
36722 done
36723 
36724   if test "x$ac_ct_AR" = x; then
36725     AR=""
36726   else
36727     case $cross_compiling:$ac_tool_warned in
36728 yes:)
36729 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36730 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36731 ac_tool_warned=yes ;;
36732 esac
36733     AR=$ac_ct_AR
36734   fi
36735 fi
36736 
36737   else
36738     # The variable is set, but is it from the command line or the environment?
36739 
36740     # Try to remove the string !AR! from our list.
36741     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36742     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36743       # If it failed, the variable was not from the command line. Ignore it,
36744       # but warn the user (except for BASH, which is always set by the calling BASH).
36745       if test "xAR" != xBASH; then
36746         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36747 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36748       fi
36749       # Try to locate tool using the code snippet
36750       if test -n "$ac_tool_prefix"; then
36751   for ac_prog in ar gcc-ar
36752   do
36753     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36754 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36756 $as_echo_n "checking for $ac_word... " >&6; }
36757 if ${ac_cv_prog_AR+:} false; then :
36758   $as_echo_n "(cached) " >&6
36759 else
36760   if test -n "$AR"; then
36761   ac_cv_prog_AR="$AR" # Let the user override the test.
36762 else
36763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36764 for as_dir in $PATH
36765 do
36766   IFS=$as_save_IFS
36767   test -z "$as_dir" && as_dir=.
36768     for ac_exec_ext in '' $ac_executable_extensions; do
36769   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36770     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36771     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36772     break 2
36773   fi
36774 done
36775   done
36776 IFS=$as_save_IFS
36777 
36778 fi
36779 fi
36780 AR=$ac_cv_prog_AR
36781 if test -n "$AR"; then
36782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36783 $as_echo "$AR" >&6; }
36784 else
36785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36786 $as_echo "no" >&6; }
36787 fi
36788 
36789 
36790     test -n "$AR" && break
36791   done
36792 fi
36793 if test -z "$AR"; then
36794   ac_ct_AR=$AR
36795   for ac_prog in ar gcc-ar
36796 do
36797   # Extract the first word of "$ac_prog", so it can be a program name with args.
36798 set dummy $ac_prog; ac_word=$2
36799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36800 $as_echo_n "checking for $ac_word... " >&6; }
36801 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36802   $as_echo_n "(cached) " >&6
36803 else
36804   if test -n "$ac_ct_AR"; then
36805   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36806 else
36807 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36808 for as_dir in $PATH
36809 do
36810   IFS=$as_save_IFS
36811   test -z "$as_dir" && as_dir=.
36812     for ac_exec_ext in '' $ac_executable_extensions; do
36813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36814     ac_cv_prog_ac_ct_AR="$ac_prog"
36815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36816     break 2
36817   fi
36818 done
36819   done
36820 IFS=$as_save_IFS
36821 
36822 fi
36823 fi
36824 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36825 if test -n "$ac_ct_AR"; then
36826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36827 $as_echo "$ac_ct_AR" >&6; }
36828 else
36829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36830 $as_echo "no" >&6; }
36831 fi
36832 
36833 
36834   test -n "$ac_ct_AR" && break
36835 done
36836 
36837   if test "x$ac_ct_AR" = x; then
36838     AR=""
36839   else
36840     case $cross_compiling:$ac_tool_warned in
36841 yes:)
36842 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36843 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36844 ac_tool_warned=yes ;;
36845 esac
36846     AR=$ac_ct_AR
36847   fi
36848 fi
36849 
36850     else
36851       # If it succeeded, then it was overridden by the user. We will use it
36852       # for the tool.
36853 
36854       # First remove it from the list of overridden variables, so we can test
36855       # for unknown variables in the end.
36856       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36857 
36858       # Check if we try to supply an empty value
36859       if test "x$AR" = x; then
36860         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36861 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36862         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36863 $as_echo_n "checking for AR... " >&6; }
36864         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36865 $as_echo "disabled" >&6; }
36866       else
36867         # Check if the provided tool contains a complete path.
36868         tool_specified="$AR"
36869         tool_basename="${tool_specified##*/}"
36870         if test "x$tool_basename" = "x$tool_specified"; then
36871           # A command without a complete path is provided, search $PATH.
36872           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36873 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36874           # Extract the first word of "$tool_basename", so it can be a program name with args.
36875 set dummy $tool_basename; ac_word=$2
36876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36877 $as_echo_n "checking for $ac_word... " >&6; }
36878 if ${ac_cv_path_AR+:} false; then :
36879   $as_echo_n "(cached) " >&6
36880 else
36881   case $AR in
36882   [\\/]* | ?:[\\/]*)
36883   ac_cv_path_AR="$AR" # Let the user override the test with a path.
36884   ;;
36885   *)
36886   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36887 for as_dir in $PATH
36888 do
36889   IFS=$as_save_IFS
36890   test -z "$as_dir" && as_dir=.
36891     for ac_exec_ext in '' $ac_executable_extensions; do
36892   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36893     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36894     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36895     break 2
36896   fi
36897 done
36898   done
36899 IFS=$as_save_IFS
36900 
36901   ;;
36902 esac
36903 fi
36904 AR=$ac_cv_path_AR
36905 if test -n "$AR"; then
36906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36907 $as_echo "$AR" >&6; }
36908 else
36909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36910 $as_echo "no" >&6; }
36911 fi
36912 
36913 
36914           if test "x$AR" = x; then
36915             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36916           fi
36917         else
36918           # Otherwise we believe it is a complete path. Use it as it is.
36919           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36920 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36921           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36922 $as_echo_n "checking for AR... " >&6; }
36923           if test ! -x "$tool_specified"; then
36924             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36925 $as_echo "not found" >&6; }
36926             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36927           fi
36928           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36929 $as_echo "$tool_specified" >&6; }
36930         fi
36931       fi
36932     fi
36933 
36934   fi
36935 
36936 
36937   else
36938 
36939 
36940   # Publish this variable in the help.
36941 
36942 
36943   if [ -z "${AR+x}" ]; then
36944     # The variable is not set by user, try to locate tool using the code snippet
36945     if test -n "$ac_tool_prefix"; then
36946   for ac_prog in ar
36947   do
36948     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36949 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36951 $as_echo_n "checking for $ac_word... " >&6; }
36952 if ${ac_cv_prog_AR+:} false; then :
36953   $as_echo_n "(cached) " >&6
36954 else
36955   if test -n "$AR"; then
36956   ac_cv_prog_AR="$AR" # Let the user override the test.
36957 else
36958 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36959 for as_dir in $PATH
36960 do
36961   IFS=$as_save_IFS
36962   test -z "$as_dir" && as_dir=.
36963     for ac_exec_ext in '' $ac_executable_extensions; do
36964   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36965     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36966     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36967     break 2
36968   fi
36969 done
36970   done
36971 IFS=$as_save_IFS
36972 
36973 fi
36974 fi
36975 AR=$ac_cv_prog_AR
36976 if test -n "$AR"; then
36977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36978 $as_echo "$AR" >&6; }
36979 else
36980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36981 $as_echo "no" >&6; }
36982 fi
36983 
36984 
36985     test -n "$AR" && break
36986   done
36987 fi
36988 if test -z "$AR"; then
36989   ac_ct_AR=$AR
36990   for ac_prog in ar
36991 do
36992   # Extract the first word of "$ac_prog", so it can be a program name with args.
36993 set dummy $ac_prog; ac_word=$2
36994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36995 $as_echo_n "checking for $ac_word... " >&6; }
36996 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36997   $as_echo_n "(cached) " >&6
36998 else
36999   if test -n "$ac_ct_AR"; then
37000   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37001 else
37002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37003 for as_dir in $PATH
37004 do
37005   IFS=$as_save_IFS
37006   test -z "$as_dir" && as_dir=.
37007     for ac_exec_ext in '' $ac_executable_extensions; do
37008   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37009     ac_cv_prog_ac_ct_AR="$ac_prog"
37010     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37011     break 2
37012   fi
37013 done
37014   done
37015 IFS=$as_save_IFS
37016 
37017 fi
37018 fi
37019 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37020 if test -n "$ac_ct_AR"; then
37021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37022 $as_echo "$ac_ct_AR" >&6; }
37023 else
37024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37025 $as_echo "no" >&6; }
37026 fi
37027 
37028 
37029   test -n "$ac_ct_AR" && break
37030 done
37031 
37032   if test "x$ac_ct_AR" = x; then
37033     AR=""
37034   else
37035     case $cross_compiling:$ac_tool_warned in
37036 yes:)
37037 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37038 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37039 ac_tool_warned=yes ;;
37040 esac
37041     AR=$ac_ct_AR
37042   fi
37043 fi
37044 
37045   else
37046     # The variable is set, but is it from the command line or the environment?
37047 
37048     # Try to remove the string !AR! from our list.
37049     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37050     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37051       # If it failed, the variable was not from the command line. Ignore it,
37052       # but warn the user (except for BASH, which is always set by the calling BASH).
37053       if test "xAR" != xBASH; then
37054         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37055 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37056       fi
37057       # Try to locate tool using the code snippet
37058       if test -n "$ac_tool_prefix"; then
37059   for ac_prog in ar
37060   do
37061     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37062 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37064 $as_echo_n "checking for $ac_word... " >&6; }
37065 if ${ac_cv_prog_AR+:} false; then :
37066   $as_echo_n "(cached) " >&6
37067 else
37068   if test -n "$AR"; then
37069   ac_cv_prog_AR="$AR" # Let the user override the test.
37070 else
37071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37072 for as_dir in $PATH
37073 do
37074   IFS=$as_save_IFS
37075   test -z "$as_dir" && as_dir=.
37076     for ac_exec_ext in '' $ac_executable_extensions; do
37077   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37078     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37080     break 2
37081   fi
37082 done
37083   done
37084 IFS=$as_save_IFS
37085 
37086 fi
37087 fi
37088 AR=$ac_cv_prog_AR
37089 if test -n "$AR"; then
37090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37091 $as_echo "$AR" >&6; }
37092 else
37093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37094 $as_echo "no" >&6; }
37095 fi
37096 
37097 
37098     test -n "$AR" && break
37099   done
37100 fi
37101 if test -z "$AR"; then
37102   ac_ct_AR=$AR
37103   for ac_prog in ar
37104 do
37105   # Extract the first word of "$ac_prog", so it can be a program name with args.
37106 set dummy $ac_prog; ac_word=$2
37107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37108 $as_echo_n "checking for $ac_word... " >&6; }
37109 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37110   $as_echo_n "(cached) " >&6
37111 else
37112   if test -n "$ac_ct_AR"; then
37113   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37114 else
37115 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37116 for as_dir in $PATH
37117 do
37118   IFS=$as_save_IFS
37119   test -z "$as_dir" && as_dir=.
37120     for ac_exec_ext in '' $ac_executable_extensions; do
37121   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37122     ac_cv_prog_ac_ct_AR="$ac_prog"
37123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37124     break 2
37125   fi
37126 done
37127   done
37128 IFS=$as_save_IFS
37129 
37130 fi
37131 fi
37132 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37133 if test -n "$ac_ct_AR"; then
37134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37135 $as_echo "$ac_ct_AR" >&6; }
37136 else
37137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37138 $as_echo "no" >&6; }
37139 fi
37140 
37141 
37142   test -n "$ac_ct_AR" && break
37143 done
37144 
37145   if test "x$ac_ct_AR" = x; then
37146     AR=""
37147   else
37148     case $cross_compiling:$ac_tool_warned in
37149 yes:)
37150 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37151 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37152 ac_tool_warned=yes ;;
37153 esac
37154     AR=$ac_ct_AR
37155   fi
37156 fi
37157 
37158     else
37159       # If it succeeded, then it was overridden by the user. We will use it
37160       # for the tool.
37161 
37162       # First remove it from the list of overridden variables, so we can test
37163       # for unknown variables in the end.
37164       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37165 
37166       # Check if we try to supply an empty value
37167       if test "x$AR" = x; then
37168         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37169 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37170         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37171 $as_echo_n "checking for AR... " >&6; }
37172         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37173 $as_echo "disabled" >&6; }
37174       else
37175         # Check if the provided tool contains a complete path.
37176         tool_specified="$AR"
37177         tool_basename="${tool_specified##*/}"
37178         if test "x$tool_basename" = "x$tool_specified"; then
37179           # A command without a complete path is provided, search $PATH.
37180           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37181 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37182           # Extract the first word of "$tool_basename", so it can be a program name with args.
37183 set dummy $tool_basename; ac_word=$2
37184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37185 $as_echo_n "checking for $ac_word... " >&6; }
37186 if ${ac_cv_path_AR+:} false; then :
37187   $as_echo_n "(cached) " >&6
37188 else
37189   case $AR in
37190   [\\/]* | ?:[\\/]*)
37191   ac_cv_path_AR="$AR" # Let the user override the test with a path.
37192   ;;
37193   *)
37194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37195 for as_dir in $PATH
37196 do
37197   IFS=$as_save_IFS
37198   test -z "$as_dir" && as_dir=.
37199     for ac_exec_ext in '' $ac_executable_extensions; do
37200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37201     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37203     break 2
37204   fi
37205 done
37206   done
37207 IFS=$as_save_IFS
37208 
37209   ;;
37210 esac
37211 fi
37212 AR=$ac_cv_path_AR
37213 if test -n "$AR"; then
37214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37215 $as_echo "$AR" >&6; }
37216 else
37217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37218 $as_echo "no" >&6; }
37219 fi
37220 
37221 
37222           if test "x$AR" = x; then
37223             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37224           fi
37225         else
37226           # Otherwise we believe it is a complete path. Use it as it is.
37227           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37228 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37229           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37230 $as_echo_n "checking for AR... " >&6; }
37231           if test ! -x "$tool_specified"; then
37232             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37233 $as_echo "not found" >&6; }
37234             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37235           fi
37236           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37237 $as_echo "$tool_specified" >&6; }
37238         fi
37239       fi
37240     fi
37241 
37242   fi
37243 
37244 
37245   fi
37246 
37247   # Only process if variable expands to non-empty
37248 
37249   if test "x$AR" != x; then
37250     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37251 
37252   # First separate the path from the arguments. This will split at the first
37253   # space.
37254   complete="$AR"
37255   path="${complete%% *}"
37256   tmp="$complete EOL"
37257   arguments="${tmp#* }"
37258 
37259   # Input might be given as Windows format, start by converting to
37260   # unix format.
37261   new_path=`$CYGPATH -u "$path"`
37262 
37263   # Now try to locate executable using which
37264   new_path=`$WHICH "$new_path" 2> /dev/null`
37265   # bat and cmd files are not always considered executable in cygwin causing which
37266   # to not find them
37267   if test "x$new_path" = x \
37268       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37269       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37270     new_path=`$CYGPATH -u "$path"`
37271   fi
37272   if test "x$new_path" = x; then
37273     # Oops. Which didn't find the executable.
37274     # The splitting of arguments from the executable at a space might have been incorrect,
37275     # since paths with space are more likely in Windows. Give it another try with the whole
37276     # argument.
37277     path="$complete"
37278     arguments="EOL"
37279     new_path=`$CYGPATH -u "$path"`
37280     new_path=`$WHICH "$new_path" 2> /dev/null`
37281     # bat and cmd files are not always considered executable in cygwin causing which
37282     # to not find them
37283     if test "x$new_path" = x \
37284         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37285         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37286       new_path=`$CYGPATH -u "$path"`
37287     fi
37288     if test "x$new_path" = x; then
37289       # It's still not found. Now this is an unrecoverable error.
37290       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37291 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37292       has_space=`$ECHO "$complete" | $GREP " "`
37293       if test "x$has_space" != x; then
37294         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37295 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37296       fi
37297       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37298     fi
37299   fi
37300 
37301   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37302   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37303   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37304   # "foo.exe" is OK but "foo" is an error.
37305   #
37306   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37307   # It is also a way to make sure we got the proper file name for the real test later on.
37308   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37309   if test "x$test_shortpath" = x; then
37310     # Short path failed, file does not exist as specified.
37311     # Try adding .exe or .cmd
37312     if test -f "${new_path}.exe"; then
37313       input_to_shortpath="${new_path}.exe"
37314     elif test -f "${new_path}.cmd"; then
37315       input_to_shortpath="${new_path}.cmd"
37316     else
37317       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37318 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37319       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37320 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37321       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37322     fi
37323   else
37324     input_to_shortpath="$new_path"
37325   fi
37326 
37327   # Call helper function which possibly converts this using DOS-style short mode.
37328   # If so, the updated path is stored in $new_path.
37329   new_path="$input_to_shortpath"
37330 
37331   input_path="$input_to_shortpath"
37332   # Check if we need to convert this using DOS-style short mode. If the path
37333   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37334   # take no chances and rewrite it.
37335   # Note: m4 eats our [], so we need to use [ and ] instead.
37336   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37337   if test "x$has_forbidden_chars" != x; then
37338     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37339     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37340     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37341     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37342       # Going to short mode and back again did indeed matter. Since short mode is
37343       # case insensitive, let's make it lowercase to improve readability.
37344       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37345       # Now convert it back to Unix-style (cygpath)
37346       input_path=`$CYGPATH -u "$shortmode_path"`
37347       new_path="$input_path"
37348     fi
37349   fi
37350 
37351   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37352   if test "x$test_cygdrive_prefix" = x; then
37353     # As a simple fix, exclude /usr/bin since it's not a real path.
37354     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37355       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37356       # a path prefixed by /cygdrive for fixpath to work.
37357       new_path="$CYGWIN_ROOT_PATH$input_path"
37358     fi
37359   fi
37360 
37361   # remove trailing .exe if any
37362   new_path="${new_path/%.exe/}"
37363 
37364     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37365 
37366   # First separate the path from the arguments. This will split at the first
37367   # space.
37368   complete="$AR"
37369   path="${complete%% *}"
37370   tmp="$complete EOL"
37371   arguments="${tmp#* }"
37372 
37373   # Input might be given as Windows format, start by converting to
37374   # unix format.
37375   new_path="$path"
37376 
37377   windows_path="$new_path"
37378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37379     unix_path=`$CYGPATH -u "$windows_path"`
37380     new_path="$unix_path"
37381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37382     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37383     new_path="$unix_path"
37384   fi
37385 
37386 
37387   # Now try to locate executable using which
37388   new_path=`$WHICH "$new_path" 2> /dev/null`
37389 
37390   if test "x$new_path" = x; then
37391     # Oops. Which didn't find the executable.
37392     # The splitting of arguments from the executable at a space might have been incorrect,
37393     # since paths with space are more likely in Windows. Give it another try with the whole
37394     # argument.
37395     path="$complete"
37396     arguments="EOL"
37397     new_path="$path"
37398 
37399   windows_path="$new_path"
37400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37401     unix_path=`$CYGPATH -u "$windows_path"`
37402     new_path="$unix_path"
37403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37405     new_path="$unix_path"
37406   fi
37407 
37408 
37409     new_path=`$WHICH "$new_path" 2> /dev/null`
37410     # bat and cmd files are not always considered executable in MSYS causing which
37411     # to not find them
37412     if test "x$new_path" = x \
37413         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37414         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37415       new_path="$path"
37416 
37417   windows_path="$new_path"
37418   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37419     unix_path=`$CYGPATH -u "$windows_path"`
37420     new_path="$unix_path"
37421   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37422     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37423     new_path="$unix_path"
37424   fi
37425 
37426     fi
37427 
37428     if test "x$new_path" = x; then
37429       # It's still not found. Now this is an unrecoverable error.
37430       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37431 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37432       has_space=`$ECHO "$complete" | $GREP " "`
37433       if test "x$has_space" != x; then
37434         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37435 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37436       fi
37437       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37438     fi
37439   fi
37440 
37441   # Now new_path has a complete unix path to the binary
37442   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37443     # Keep paths in /bin as-is, but remove trailing .exe if any
37444     new_path="${new_path/%.exe/}"
37445     # Do not save /bin paths to all_fixpath_prefixes!
37446   else
37447     # Not in mixed or Windows style, start by that.
37448     new_path=`cmd //c echo $new_path`
37449 
37450   input_path="$new_path"
37451   # Check if we need to convert this using DOS-style short mode. If the path
37452   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37453   # take no chances and rewrite it.
37454   # Note: m4 eats our [], so we need to use [ and ] instead.
37455   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37456   if test "x$has_forbidden_chars" != x; then
37457     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37458     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37459   fi
37460 
37461     # Output is in $new_path
37462 
37463   windows_path="$new_path"
37464   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37465     unix_path=`$CYGPATH -u "$windows_path"`
37466     new_path="$unix_path"
37467   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37468     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37469     new_path="$unix_path"
37470   fi
37471 
37472     # remove trailing .exe if any
37473     new_path="${new_path/%.exe/}"
37474 
37475     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37476     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37477   fi
37478 
37479     else
37480       # We're on a unix platform. Hooray! :)
37481       # First separate the path from the arguments. This will split at the first
37482       # space.
37483       complete="$AR"
37484       path="${complete%% *}"
37485       tmp="$complete EOL"
37486       arguments="${tmp#* }"
37487 
37488       # Cannot rely on the command "which" here since it doesn't always work.
37489       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37490       if test -z "$is_absolute_path"; then
37491         # Path to executable is not absolute. Find it.
37492         IFS_save="$IFS"
37493         IFS=:
37494         for p in $PATH; do
37495           if test -f "$p/$path" && test -x "$p/$path"; then
37496             new_path="$p/$path"
37497             break
37498           fi
37499         done
37500         IFS="$IFS_save"
37501       else
37502         # This is an absolute path, we can use it without further modifications.
37503         new_path="$path"
37504       fi
37505 
37506       if test "x$new_path" = x; then
37507         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37508 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37509         has_space=`$ECHO "$complete" | $GREP " "`
37510         if test "x$has_space" != x; then
37511           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37512 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37513         fi
37514         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37515       fi
37516     fi
37517 
37518     # Now join together the path and the arguments once again
37519     if test "x$arguments" != xEOL; then
37520       new_complete="$new_path ${arguments% *}"
37521     else
37522       new_complete="$new_path"
37523     fi
37524 
37525     if test "x$complete" != "x$new_complete"; then
37526       AR="$new_complete"
37527       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37528 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37529     fi
37530   fi
37531 
37532 
37533 
37534   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37535 
37536 
37537   # Publish this variable in the help.
37538 
37539 
37540   if [ -z "${LIPO+x}" ]; then
37541     # The variable is not set by user, try to locate tool using the code snippet
37542     for ac_prog in lipo
37543 do
37544   # Extract the first word of "$ac_prog", so it can be a program name with args.
37545 set dummy $ac_prog; ac_word=$2
37546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37547 $as_echo_n "checking for $ac_word... " >&6; }
37548 if ${ac_cv_path_LIPO+:} false; then :
37549   $as_echo_n "(cached) " >&6
37550 else
37551   case $LIPO in
37552   [\\/]* | ?:[\\/]*)
37553   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37554   ;;
37555   *)
37556   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37557 for as_dir in $PATH
37558 do
37559   IFS=$as_save_IFS
37560   test -z "$as_dir" && as_dir=.
37561     for ac_exec_ext in '' $ac_executable_extensions; do
37562   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37563     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37564     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37565     break 2
37566   fi
37567 done
37568   done
37569 IFS=$as_save_IFS
37570 
37571   ;;
37572 esac
37573 fi
37574 LIPO=$ac_cv_path_LIPO
37575 if test -n "$LIPO"; then
37576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37577 $as_echo "$LIPO" >&6; }
37578 else
37579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37580 $as_echo "no" >&6; }
37581 fi
37582 
37583 
37584   test -n "$LIPO" && break
37585 done
37586 
37587   else
37588     # The variable is set, but is it from the command line or the environment?
37589 
37590     # Try to remove the string !LIPO! from our list.
37591     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37592     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37593       # If it failed, the variable was not from the command line. Ignore it,
37594       # but warn the user (except for BASH, which is always set by the calling BASH).
37595       if test "xLIPO" != xBASH; then
37596         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37597 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37598       fi
37599       # Try to locate tool using the code snippet
37600       for ac_prog in lipo
37601 do
37602   # Extract the first word of "$ac_prog", so it can be a program name with args.
37603 set dummy $ac_prog; ac_word=$2
37604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37605 $as_echo_n "checking for $ac_word... " >&6; }
37606 if ${ac_cv_path_LIPO+:} false; then :
37607   $as_echo_n "(cached) " >&6
37608 else
37609   case $LIPO in
37610   [\\/]* | ?:[\\/]*)
37611   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37612   ;;
37613   *)
37614   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37615 for as_dir in $PATH
37616 do
37617   IFS=$as_save_IFS
37618   test -z "$as_dir" && as_dir=.
37619     for ac_exec_ext in '' $ac_executable_extensions; do
37620   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37621     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37622     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37623     break 2
37624   fi
37625 done
37626   done
37627 IFS=$as_save_IFS
37628 
37629   ;;
37630 esac
37631 fi
37632 LIPO=$ac_cv_path_LIPO
37633 if test -n "$LIPO"; then
37634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37635 $as_echo "$LIPO" >&6; }
37636 else
37637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37638 $as_echo "no" >&6; }
37639 fi
37640 
37641 
37642   test -n "$LIPO" && break
37643 done
37644 
37645     else
37646       # If it succeeded, then it was overridden by the user. We will use it
37647       # for the tool.
37648 
37649       # First remove it from the list of overridden variables, so we can test
37650       # for unknown variables in the end.
37651       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37652 
37653       # Check if we try to supply an empty value
37654       if test "x$LIPO" = x; then
37655         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37656 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37657         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37658 $as_echo_n "checking for LIPO... " >&6; }
37659         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37660 $as_echo "disabled" >&6; }
37661       else
37662         # Check if the provided tool contains a complete path.
37663         tool_specified="$LIPO"
37664         tool_basename="${tool_specified##*/}"
37665         if test "x$tool_basename" = "x$tool_specified"; then
37666           # A command without a complete path is provided, search $PATH.
37667           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37668 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37669           # Extract the first word of "$tool_basename", so it can be a program name with args.
37670 set dummy $tool_basename; ac_word=$2
37671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37672 $as_echo_n "checking for $ac_word... " >&6; }
37673 if ${ac_cv_path_LIPO+:} false; then :
37674   $as_echo_n "(cached) " >&6
37675 else
37676   case $LIPO in
37677   [\\/]* | ?:[\\/]*)
37678   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37679   ;;
37680   *)
37681   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37682 for as_dir in $PATH
37683 do
37684   IFS=$as_save_IFS
37685   test -z "$as_dir" && as_dir=.
37686     for ac_exec_ext in '' $ac_executable_extensions; do
37687   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37688     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37689     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37690     break 2
37691   fi
37692 done
37693   done
37694 IFS=$as_save_IFS
37695 
37696   ;;
37697 esac
37698 fi
37699 LIPO=$ac_cv_path_LIPO
37700 if test -n "$LIPO"; then
37701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37702 $as_echo "$LIPO" >&6; }
37703 else
37704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37705 $as_echo "no" >&6; }
37706 fi
37707 
37708 
37709           if test "x$LIPO" = x; then
37710             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37711           fi
37712         else
37713           # Otherwise we believe it is a complete path. Use it as it is.
37714           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37715 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37716           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37717 $as_echo_n "checking for LIPO... " >&6; }
37718           if test ! -x "$tool_specified"; then
37719             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37720 $as_echo "not found" >&6; }
37721             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37722           fi
37723           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37724 $as_echo "$tool_specified" >&6; }
37725         fi
37726       fi
37727     fi
37728 
37729   fi
37730 
37731 
37732 
37733   # Only process if variable expands to non-empty
37734 
37735   if test "x$LIPO" != x; then
37736     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37737 
37738   # First separate the path from the arguments. This will split at the first
37739   # space.
37740   complete="$LIPO"
37741   path="${complete%% *}"
37742   tmp="$complete EOL"
37743   arguments="${tmp#* }"
37744 
37745   # Input might be given as Windows format, start by converting to
37746   # unix format.
37747   new_path=`$CYGPATH -u "$path"`
37748 
37749   # Now try to locate executable using which
37750   new_path=`$WHICH "$new_path" 2> /dev/null`
37751   # bat and cmd files are not always considered executable in cygwin causing which
37752   # to not find them
37753   if test "x$new_path" = x \
37754       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37755       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37756     new_path=`$CYGPATH -u "$path"`
37757   fi
37758   if test "x$new_path" = x; then
37759     # Oops. Which didn't find the executable.
37760     # The splitting of arguments from the executable at a space might have been incorrect,
37761     # since paths with space are more likely in Windows. Give it another try with the whole
37762     # argument.
37763     path="$complete"
37764     arguments="EOL"
37765     new_path=`$CYGPATH -u "$path"`
37766     new_path=`$WHICH "$new_path" 2> /dev/null`
37767     # bat and cmd files are not always considered executable in cygwin causing which
37768     # to not find them
37769     if test "x$new_path" = x \
37770         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37771         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37772       new_path=`$CYGPATH -u "$path"`
37773     fi
37774     if test "x$new_path" = x; then
37775       # It's still not found. Now this is an unrecoverable error.
37776       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37777 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37778       has_space=`$ECHO "$complete" | $GREP " "`
37779       if test "x$has_space" != x; then
37780         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37781 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37782       fi
37783       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37784     fi
37785   fi
37786 
37787   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37788   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37789   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37790   # "foo.exe" is OK but "foo" is an error.
37791   #
37792   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37793   # It is also a way to make sure we got the proper file name for the real test later on.
37794   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37795   if test "x$test_shortpath" = x; then
37796     # Short path failed, file does not exist as specified.
37797     # Try adding .exe or .cmd
37798     if test -f "${new_path}.exe"; then
37799       input_to_shortpath="${new_path}.exe"
37800     elif test -f "${new_path}.cmd"; then
37801       input_to_shortpath="${new_path}.cmd"
37802     else
37803       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37804 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37805       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37806 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37807       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37808     fi
37809   else
37810     input_to_shortpath="$new_path"
37811   fi
37812 
37813   # Call helper function which possibly converts this using DOS-style short mode.
37814   # If so, the updated path is stored in $new_path.
37815   new_path="$input_to_shortpath"
37816 
37817   input_path="$input_to_shortpath"
37818   # Check if we need to convert this using DOS-style short mode. If the path
37819   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37820   # take no chances and rewrite it.
37821   # Note: m4 eats our [], so we need to use [ and ] instead.
37822   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37823   if test "x$has_forbidden_chars" != x; then
37824     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37825     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37826     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37827     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37828       # Going to short mode and back again did indeed matter. Since short mode is
37829       # case insensitive, let's make it lowercase to improve readability.
37830       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37831       # Now convert it back to Unix-style (cygpath)
37832       input_path=`$CYGPATH -u "$shortmode_path"`
37833       new_path="$input_path"
37834     fi
37835   fi
37836 
37837   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37838   if test "x$test_cygdrive_prefix" = x; then
37839     # As a simple fix, exclude /usr/bin since it's not a real path.
37840     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37841       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37842       # a path prefixed by /cygdrive for fixpath to work.
37843       new_path="$CYGWIN_ROOT_PATH$input_path"
37844     fi
37845   fi
37846 
37847   # remove trailing .exe if any
37848   new_path="${new_path/%.exe/}"
37849 
37850     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37851 
37852   # First separate the path from the arguments. This will split at the first
37853   # space.
37854   complete="$LIPO"
37855   path="${complete%% *}"
37856   tmp="$complete EOL"
37857   arguments="${tmp#* }"
37858 
37859   # Input might be given as Windows format, start by converting to
37860   # unix format.
37861   new_path="$path"
37862 
37863   windows_path="$new_path"
37864   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37865     unix_path=`$CYGPATH -u "$windows_path"`
37866     new_path="$unix_path"
37867   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37868     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37869     new_path="$unix_path"
37870   fi
37871 
37872 
37873   # Now try to locate executable using which
37874   new_path=`$WHICH "$new_path" 2> /dev/null`
37875 
37876   if test "x$new_path" = x; then
37877     # Oops. Which didn't find the executable.
37878     # The splitting of arguments from the executable at a space might have been incorrect,
37879     # since paths with space are more likely in Windows. Give it another try with the whole
37880     # argument.
37881     path="$complete"
37882     arguments="EOL"
37883     new_path="$path"
37884 
37885   windows_path="$new_path"
37886   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37887     unix_path=`$CYGPATH -u "$windows_path"`
37888     new_path="$unix_path"
37889   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37890     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37891     new_path="$unix_path"
37892   fi
37893 
37894 
37895     new_path=`$WHICH "$new_path" 2> /dev/null`
37896     # bat and cmd files are not always considered executable in MSYS causing which
37897     # to not find them
37898     if test "x$new_path" = x \
37899         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37900         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37901       new_path="$path"
37902 
37903   windows_path="$new_path"
37904   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37905     unix_path=`$CYGPATH -u "$windows_path"`
37906     new_path="$unix_path"
37907   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37908     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37909     new_path="$unix_path"
37910   fi
37911 
37912     fi
37913 
37914     if test "x$new_path" = x; then
37915       # It's still not found. Now this is an unrecoverable error.
37916       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37917 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37918       has_space=`$ECHO "$complete" | $GREP " "`
37919       if test "x$has_space" != x; then
37920         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37921 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37922       fi
37923       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37924     fi
37925   fi
37926 
37927   # Now new_path has a complete unix path to the binary
37928   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37929     # Keep paths in /bin as-is, but remove trailing .exe if any
37930     new_path="${new_path/%.exe/}"
37931     # Do not save /bin paths to all_fixpath_prefixes!
37932   else
37933     # Not in mixed or Windows style, start by that.
37934     new_path=`cmd //c echo $new_path`
37935 
37936   input_path="$new_path"
37937   # Check if we need to convert this using DOS-style short mode. If the path
37938   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37939   # take no chances and rewrite it.
37940   # Note: m4 eats our [], so we need to use [ and ] instead.
37941   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37942   if test "x$has_forbidden_chars" != x; then
37943     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37944     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37945   fi
37946 
37947     # Output is in $new_path
37948 
37949   windows_path="$new_path"
37950   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37951     unix_path=`$CYGPATH -u "$windows_path"`
37952     new_path="$unix_path"
37953   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37954     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37955     new_path="$unix_path"
37956   fi
37957 
37958     # remove trailing .exe if any
37959     new_path="${new_path/%.exe/}"
37960 
37961     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37962     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37963   fi
37964 
37965     else
37966       # We're on a unix platform. Hooray! :)
37967       # First separate the path from the arguments. This will split at the first
37968       # space.
37969       complete="$LIPO"
37970       path="${complete%% *}"
37971       tmp="$complete EOL"
37972       arguments="${tmp#* }"
37973 
37974       # Cannot rely on the command "which" here since it doesn't always work.
37975       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37976       if test -z "$is_absolute_path"; then
37977         # Path to executable is not absolute. Find it.
37978         IFS_save="$IFS"
37979         IFS=:
37980         for p in $PATH; do
37981           if test -f "$p/$path" && test -x "$p/$path"; then
37982             new_path="$p/$path"
37983             break
37984           fi
37985         done
37986         IFS="$IFS_save"
37987       else
37988         # This is an absolute path, we can use it without further modifications.
37989         new_path="$path"
37990       fi
37991 
37992       if test "x$new_path" = x; then
37993         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37994 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37995         has_space=`$ECHO "$complete" | $GREP " "`
37996         if test "x$has_space" != x; then
37997           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37998 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37999         fi
38000         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38001       fi
38002     fi
38003 
38004     # Now join together the path and the arguments once again
38005     if test "x$arguments" != xEOL; then
38006       new_complete="$new_path ${arguments% *}"
38007     else
38008       new_complete="$new_path"
38009     fi
38010 
38011     if test "x$complete" != "x$new_complete"; then
38012       LIPO="$new_complete"
38013       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38014 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38015     fi
38016   fi
38017 
38018   fi
38019 
38020   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38021     # Extract the first word of "mt", so it can be a program name with args.
38022 set dummy mt; ac_word=$2
38023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38024 $as_echo_n "checking for $ac_word... " >&6; }
38025 if ${ac_cv_prog_MT+:} false; then :
38026   $as_echo_n "(cached) " >&6
38027 else
38028   if test -n "$MT"; then
38029   ac_cv_prog_MT="$MT" # Let the user override the test.
38030 else
38031   ac_prog_rejected=no
38032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38033 for as_dir in $PATH
38034 do
38035   IFS=$as_save_IFS
38036   test -z "$as_dir" && as_dir=.
38037     for ac_exec_ext in '' $ac_executable_extensions; do
38038   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38039     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38040        ac_prog_rejected=yes
38041        continue
38042      fi
38043     ac_cv_prog_MT="mt"
38044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38045     break 2
38046   fi
38047 done
38048   done
38049 IFS=$as_save_IFS
38050 
38051 if test $ac_prog_rejected = yes; then
38052   # We found a bogon in the path, so make sure we never use it.
38053   set dummy $ac_cv_prog_MT
38054   shift
38055   if test $# != 0; then
38056     # We chose a different compiler from the bogus one.
38057     # However, it has the same basename, so the bogon will be chosen
38058     # first if we set MT to just the basename; use the full file name.
38059     shift
38060     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38061   fi
38062 fi
38063 fi
38064 fi
38065 MT=$ac_cv_prog_MT
38066 if test -n "$MT"; then
38067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38068 $as_echo "$MT" >&6; }
38069 else
38070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38071 $as_echo "no" >&6; }
38072 fi
38073 
38074 
38075 
38076   # Only process if variable expands to non-empty
38077 
38078   if test "x$MT" != x; then
38079     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38080 
38081   # First separate the path from the arguments. This will split at the first
38082   # space.
38083   complete="$MT"
38084   path="${complete%% *}"
38085   tmp="$complete EOL"
38086   arguments="${tmp#* }"
38087 
38088   # Input might be given as Windows format, start by converting to
38089   # unix format.
38090   new_path=`$CYGPATH -u "$path"`
38091 
38092   # Now try to locate executable using which
38093   new_path=`$WHICH "$new_path" 2> /dev/null`
38094   # bat and cmd files are not always considered executable in cygwin causing which
38095   # to not find them
38096   if test "x$new_path" = x \
38097       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38098       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38099     new_path=`$CYGPATH -u "$path"`
38100   fi
38101   if test "x$new_path" = x; then
38102     # Oops. Which didn't find the executable.
38103     # The splitting of arguments from the executable at a space might have been incorrect,
38104     # since paths with space are more likely in Windows. Give it another try with the whole
38105     # argument.
38106     path="$complete"
38107     arguments="EOL"
38108     new_path=`$CYGPATH -u "$path"`
38109     new_path=`$WHICH "$new_path" 2> /dev/null`
38110     # bat and cmd files are not always considered executable in cygwin causing which
38111     # to not find them
38112     if test "x$new_path" = x \
38113         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38114         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38115       new_path=`$CYGPATH -u "$path"`
38116     fi
38117     if test "x$new_path" = x; then
38118       # It's still not found. Now this is an unrecoverable error.
38119       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38120 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38121       has_space=`$ECHO "$complete" | $GREP " "`
38122       if test "x$has_space" != x; then
38123         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38124 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38125       fi
38126       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38127     fi
38128   fi
38129 
38130   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38131   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38132   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38133   # "foo.exe" is OK but "foo" is an error.
38134   #
38135   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38136   # It is also a way to make sure we got the proper file name for the real test later on.
38137   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38138   if test "x$test_shortpath" = x; then
38139     # Short path failed, file does not exist as specified.
38140     # Try adding .exe or .cmd
38141     if test -f "${new_path}.exe"; then
38142       input_to_shortpath="${new_path}.exe"
38143     elif test -f "${new_path}.cmd"; then
38144       input_to_shortpath="${new_path}.cmd"
38145     else
38146       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38147 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38148       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38149 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38150       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38151     fi
38152   else
38153     input_to_shortpath="$new_path"
38154   fi
38155 
38156   # Call helper function which possibly converts this using DOS-style short mode.
38157   # If so, the updated path is stored in $new_path.
38158   new_path="$input_to_shortpath"
38159 
38160   input_path="$input_to_shortpath"
38161   # Check if we need to convert this using DOS-style short mode. If the path
38162   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38163   # take no chances and rewrite it.
38164   # Note: m4 eats our [], so we need to use [ and ] instead.
38165   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38166   if test "x$has_forbidden_chars" != x; then
38167     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38168     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38169     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38170     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38171       # Going to short mode and back again did indeed matter. Since short mode is
38172       # case insensitive, let's make it lowercase to improve readability.
38173       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38174       # Now convert it back to Unix-style (cygpath)
38175       input_path=`$CYGPATH -u "$shortmode_path"`
38176       new_path="$input_path"
38177     fi
38178   fi
38179 
38180   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38181   if test "x$test_cygdrive_prefix" = x; then
38182     # As a simple fix, exclude /usr/bin since it's not a real path.
38183     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38184       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38185       # a path prefixed by /cygdrive for fixpath to work.
38186       new_path="$CYGWIN_ROOT_PATH$input_path"
38187     fi
38188   fi
38189 
38190   # remove trailing .exe if any
38191   new_path="${new_path/%.exe/}"
38192 
38193     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38194 
38195   # First separate the path from the arguments. This will split at the first
38196   # space.
38197   complete="$MT"
38198   path="${complete%% *}"
38199   tmp="$complete EOL"
38200   arguments="${tmp#* }"
38201 
38202   # Input might be given as Windows format, start by converting to
38203   # unix format.
38204   new_path="$path"
38205 
38206   windows_path="$new_path"
38207   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38208     unix_path=`$CYGPATH -u "$windows_path"`
38209     new_path="$unix_path"
38210   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38211     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38212     new_path="$unix_path"
38213   fi
38214 
38215 
38216   # Now try to locate executable using which
38217   new_path=`$WHICH "$new_path" 2> /dev/null`
38218 
38219   if test "x$new_path" = x; then
38220     # Oops. Which didn't find the executable.
38221     # The splitting of arguments from the executable at a space might have been incorrect,
38222     # since paths with space are more likely in Windows. Give it another try with the whole
38223     # argument.
38224     path="$complete"
38225     arguments="EOL"
38226     new_path="$path"
38227 
38228   windows_path="$new_path"
38229   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38230     unix_path=`$CYGPATH -u "$windows_path"`
38231     new_path="$unix_path"
38232   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38233     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38234     new_path="$unix_path"
38235   fi
38236 
38237 
38238     new_path=`$WHICH "$new_path" 2> /dev/null`
38239     # bat and cmd files are not always considered executable in MSYS causing which
38240     # to not find them
38241     if test "x$new_path" = x \
38242         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38243         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38244       new_path="$path"
38245 
38246   windows_path="$new_path"
38247   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38248     unix_path=`$CYGPATH -u "$windows_path"`
38249     new_path="$unix_path"
38250   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38251     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38252     new_path="$unix_path"
38253   fi
38254 
38255     fi
38256 
38257     if test "x$new_path" = x; then
38258       # It's still not found. Now this is an unrecoverable error.
38259       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38260 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38261       has_space=`$ECHO "$complete" | $GREP " "`
38262       if test "x$has_space" != x; then
38263         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38264 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38265       fi
38266       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38267     fi
38268   fi
38269 
38270   # Now new_path has a complete unix path to the binary
38271   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38272     # Keep paths in /bin as-is, but remove trailing .exe if any
38273     new_path="${new_path/%.exe/}"
38274     # Do not save /bin paths to all_fixpath_prefixes!
38275   else
38276     # Not in mixed or Windows style, start by that.
38277     new_path=`cmd //c echo $new_path`
38278 
38279   input_path="$new_path"
38280   # Check if we need to convert this using DOS-style short mode. If the path
38281   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38282   # take no chances and rewrite it.
38283   # Note: m4 eats our [], so we need to use [ and ] instead.
38284   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38285   if test "x$has_forbidden_chars" != x; then
38286     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38287     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38288   fi
38289 
38290     # Output is in $new_path
38291 
38292   windows_path="$new_path"
38293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38294     unix_path=`$CYGPATH -u "$windows_path"`
38295     new_path="$unix_path"
38296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38298     new_path="$unix_path"
38299   fi
38300 
38301     # remove trailing .exe if any
38302     new_path="${new_path/%.exe/}"
38303 
38304     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38305     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38306   fi
38307 
38308     else
38309       # We're on a unix platform. Hooray! :)
38310       # First separate the path from the arguments. This will split at the first
38311       # space.
38312       complete="$MT"
38313       path="${complete%% *}"
38314       tmp="$complete EOL"
38315       arguments="${tmp#* }"
38316 
38317       # Cannot rely on the command "which" here since it doesn't always work.
38318       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38319       if test -z "$is_absolute_path"; then
38320         # Path to executable is not absolute. Find it.
38321         IFS_save="$IFS"
38322         IFS=:
38323         for p in $PATH; do
38324           if test -f "$p/$path" && test -x "$p/$path"; then
38325             new_path="$p/$path"
38326             break
38327           fi
38328         done
38329         IFS="$IFS_save"
38330       else
38331         # This is an absolute path, we can use it without further modifications.
38332         new_path="$path"
38333       fi
38334 
38335       if test "x$new_path" = x; then
38336         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38337 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38338         has_space=`$ECHO "$complete" | $GREP " "`
38339         if test "x$has_space" != x; then
38340           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38341 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38342         fi
38343         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38344       fi
38345     fi
38346 
38347     # Now join together the path and the arguments once again
38348     if test "x$arguments" != xEOL; then
38349       new_complete="$new_path ${arguments% *}"
38350     else
38351       new_complete="$new_path"
38352     fi
38353 
38354     if test "x$complete" != "x$new_complete"; then
38355       MT="$new_complete"
38356       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38357 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38358     fi
38359   fi
38360 
38361     # Setup the resource compiler (RC)
38362     # Extract the first word of "rc", so it can be a program name with args.
38363 set dummy rc; ac_word=$2
38364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38365 $as_echo_n "checking for $ac_word... " >&6; }
38366 if ${ac_cv_prog_RC+:} false; then :
38367   $as_echo_n "(cached) " >&6
38368 else
38369   if test -n "$RC"; then
38370   ac_cv_prog_RC="$RC" # Let the user override the test.
38371 else
38372   ac_prog_rejected=no
38373 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38374 for as_dir in $PATH
38375 do
38376   IFS=$as_save_IFS
38377   test -z "$as_dir" && as_dir=.
38378     for ac_exec_ext in '' $ac_executable_extensions; do
38379   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38380     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38381        ac_prog_rejected=yes
38382        continue
38383      fi
38384     ac_cv_prog_RC="rc"
38385     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38386     break 2
38387   fi
38388 done
38389   done
38390 IFS=$as_save_IFS
38391 
38392 if test $ac_prog_rejected = yes; then
38393   # We found a bogon in the path, so make sure we never use it.
38394   set dummy $ac_cv_prog_RC
38395   shift
38396   if test $# != 0; then
38397     # We chose a different compiler from the bogus one.
38398     # However, it has the same basename, so the bogon will be chosen
38399     # first if we set RC to just the basename; use the full file name.
38400     shift
38401     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38402   fi
38403 fi
38404 fi
38405 fi
38406 RC=$ac_cv_prog_RC
38407 if test -n "$RC"; then
38408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38409 $as_echo "$RC" >&6; }
38410 else
38411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38412 $as_echo "no" >&6; }
38413 fi
38414 
38415 
38416 
38417   # Only process if variable expands to non-empty
38418 
38419   if test "x$RC" != x; then
38420     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38421 
38422   # First separate the path from the arguments. This will split at the first
38423   # space.
38424   complete="$RC"
38425   path="${complete%% *}"
38426   tmp="$complete EOL"
38427   arguments="${tmp#* }"
38428 
38429   # Input might be given as Windows format, start by converting to
38430   # unix format.
38431   new_path=`$CYGPATH -u "$path"`
38432 
38433   # Now try to locate executable using which
38434   new_path=`$WHICH "$new_path" 2> /dev/null`
38435   # bat and cmd files are not always considered executable in cygwin causing which
38436   # to not find them
38437   if test "x$new_path" = x \
38438       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38439       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38440     new_path=`$CYGPATH -u "$path"`
38441   fi
38442   if test "x$new_path" = x; then
38443     # Oops. Which didn't find the executable.
38444     # The splitting of arguments from the executable at a space might have been incorrect,
38445     # since paths with space are more likely in Windows. Give it another try with the whole
38446     # argument.
38447     path="$complete"
38448     arguments="EOL"
38449     new_path=`$CYGPATH -u "$path"`
38450     new_path=`$WHICH "$new_path" 2> /dev/null`
38451     # bat and cmd files are not always considered executable in cygwin causing which
38452     # to not find them
38453     if test "x$new_path" = x \
38454         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38455         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38456       new_path=`$CYGPATH -u "$path"`
38457     fi
38458     if test "x$new_path" = x; then
38459       # It's still not found. Now this is an unrecoverable error.
38460       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38461 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38462       has_space=`$ECHO "$complete" | $GREP " "`
38463       if test "x$has_space" != x; then
38464         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38465 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38466       fi
38467       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38468     fi
38469   fi
38470 
38471   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38472   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38473   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38474   # "foo.exe" is OK but "foo" is an error.
38475   #
38476   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38477   # It is also a way to make sure we got the proper file name for the real test later on.
38478   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38479   if test "x$test_shortpath" = x; then
38480     # Short path failed, file does not exist as specified.
38481     # Try adding .exe or .cmd
38482     if test -f "${new_path}.exe"; then
38483       input_to_shortpath="${new_path}.exe"
38484     elif test -f "${new_path}.cmd"; then
38485       input_to_shortpath="${new_path}.cmd"
38486     else
38487       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38488 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38489       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38490 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38491       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38492     fi
38493   else
38494     input_to_shortpath="$new_path"
38495   fi
38496 
38497   # Call helper function which possibly converts this using DOS-style short mode.
38498   # If so, the updated path is stored in $new_path.
38499   new_path="$input_to_shortpath"
38500 
38501   input_path="$input_to_shortpath"
38502   # Check if we need to convert this using DOS-style short mode. If the path
38503   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38504   # take no chances and rewrite it.
38505   # Note: m4 eats our [], so we need to use [ and ] instead.
38506   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38507   if test "x$has_forbidden_chars" != x; then
38508     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38509     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38510     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38511     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38512       # Going to short mode and back again did indeed matter. Since short mode is
38513       # case insensitive, let's make it lowercase to improve readability.
38514       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38515       # Now convert it back to Unix-style (cygpath)
38516       input_path=`$CYGPATH -u "$shortmode_path"`
38517       new_path="$input_path"
38518     fi
38519   fi
38520 
38521   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38522   if test "x$test_cygdrive_prefix" = x; then
38523     # As a simple fix, exclude /usr/bin since it's not a real path.
38524     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38525       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38526       # a path prefixed by /cygdrive for fixpath to work.
38527       new_path="$CYGWIN_ROOT_PATH$input_path"
38528     fi
38529   fi
38530 
38531   # remove trailing .exe if any
38532   new_path="${new_path/%.exe/}"
38533 
38534     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38535 
38536   # First separate the path from the arguments. This will split at the first
38537   # space.
38538   complete="$RC"
38539   path="${complete%% *}"
38540   tmp="$complete EOL"
38541   arguments="${tmp#* }"
38542 
38543   # Input might be given as Windows format, start by converting to
38544   # unix format.
38545   new_path="$path"
38546 
38547   windows_path="$new_path"
38548   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38549     unix_path=`$CYGPATH -u "$windows_path"`
38550     new_path="$unix_path"
38551   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38552     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38553     new_path="$unix_path"
38554   fi
38555 
38556 
38557   # Now try to locate executable using which
38558   new_path=`$WHICH "$new_path" 2> /dev/null`
38559 
38560   if test "x$new_path" = x; then
38561     # Oops. Which didn't find the executable.
38562     # The splitting of arguments from the executable at a space might have been incorrect,
38563     # since paths with space are more likely in Windows. Give it another try with the whole
38564     # argument.
38565     path="$complete"
38566     arguments="EOL"
38567     new_path="$path"
38568 
38569   windows_path="$new_path"
38570   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38571     unix_path=`$CYGPATH -u "$windows_path"`
38572     new_path="$unix_path"
38573   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38574     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38575     new_path="$unix_path"
38576   fi
38577 
38578 
38579     new_path=`$WHICH "$new_path" 2> /dev/null`
38580     # bat and cmd files are not always considered executable in MSYS causing which
38581     # to not find them
38582     if test "x$new_path" = x \
38583         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38584         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38585       new_path="$path"
38586 
38587   windows_path="$new_path"
38588   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38589     unix_path=`$CYGPATH -u "$windows_path"`
38590     new_path="$unix_path"
38591   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38592     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38593     new_path="$unix_path"
38594   fi
38595 
38596     fi
38597 
38598     if test "x$new_path" = x; then
38599       # It's still not found. Now this is an unrecoverable error.
38600       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38601 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38602       has_space=`$ECHO "$complete" | $GREP " "`
38603       if test "x$has_space" != x; then
38604         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38605 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38606       fi
38607       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38608     fi
38609   fi
38610 
38611   # Now new_path has a complete unix path to the binary
38612   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38613     # Keep paths in /bin as-is, but remove trailing .exe if any
38614     new_path="${new_path/%.exe/}"
38615     # Do not save /bin paths to all_fixpath_prefixes!
38616   else
38617     # Not in mixed or Windows style, start by that.
38618     new_path=`cmd //c echo $new_path`
38619 
38620   input_path="$new_path"
38621   # Check if we need to convert this using DOS-style short mode. If the path
38622   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38623   # take no chances and rewrite it.
38624   # Note: m4 eats our [], so we need to use [ and ] instead.
38625   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38626   if test "x$has_forbidden_chars" != x; then
38627     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38628     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38629   fi
38630 
38631     # Output is in $new_path
38632 
38633   windows_path="$new_path"
38634   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38635     unix_path=`$CYGPATH -u "$windows_path"`
38636     new_path="$unix_path"
38637   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38638     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38639     new_path="$unix_path"
38640   fi
38641 
38642     # remove trailing .exe if any
38643     new_path="${new_path/%.exe/}"
38644 
38645     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38646     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38647   fi
38648 
38649     else
38650       # We're on a unix platform. Hooray! :)
38651       # First separate the path from the arguments. This will split at the first
38652       # space.
38653       complete="$RC"
38654       path="${complete%% *}"
38655       tmp="$complete EOL"
38656       arguments="${tmp#* }"
38657 
38658       # Cannot rely on the command "which" here since it doesn't always work.
38659       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38660       if test -z "$is_absolute_path"; then
38661         # Path to executable is not absolute. Find it.
38662         IFS_save="$IFS"
38663         IFS=:
38664         for p in $PATH; do
38665           if test -f "$p/$path" && test -x "$p/$path"; then
38666             new_path="$p/$path"
38667             break
38668           fi
38669         done
38670         IFS="$IFS_save"
38671       else
38672         # This is an absolute path, we can use it without further modifications.
38673         new_path="$path"
38674       fi
38675 
38676       if test "x$new_path" = x; then
38677         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38678 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38679         has_space=`$ECHO "$complete" | $GREP " "`
38680         if test "x$has_space" != x; then
38681           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38682 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38683         fi
38684         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38685       fi
38686     fi
38687 
38688     # Now join together the path and the arguments once again
38689     if test "x$arguments" != xEOL; then
38690       new_complete="$new_path ${arguments% *}"
38691     else
38692       new_complete="$new_path"
38693     fi
38694 
38695     if test "x$complete" != "x$new_complete"; then
38696       RC="$new_complete"
38697       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38698 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38699     fi
38700   fi
38701 
38702     # Extract the first word of "dumpbin", so it can be a program name with args.
38703 set dummy dumpbin; ac_word=$2
38704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38705 $as_echo_n "checking for $ac_word... " >&6; }
38706 if ${ac_cv_prog_DUMPBIN+:} false; then :
38707   $as_echo_n "(cached) " >&6
38708 else
38709   if test -n "$DUMPBIN"; then
38710   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38711 else
38712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38713 for as_dir in $PATH
38714 do
38715   IFS=$as_save_IFS
38716   test -z "$as_dir" && as_dir=.
38717     for ac_exec_ext in '' $ac_executable_extensions; do
38718   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38719     ac_cv_prog_DUMPBIN="dumpbin"
38720     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38721     break 2
38722   fi
38723 done
38724   done
38725 IFS=$as_save_IFS
38726 
38727 fi
38728 fi
38729 DUMPBIN=$ac_cv_prog_DUMPBIN
38730 if test -n "$DUMPBIN"; then
38731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38732 $as_echo "$DUMPBIN" >&6; }
38733 else
38734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38735 $as_echo "no" >&6; }
38736 fi
38737 
38738 
38739 
38740   # Only process if variable expands to non-empty
38741 
38742   if test "x$DUMPBIN" != x; then
38743     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38744 
38745   # First separate the path from the arguments. This will split at the first
38746   # space.
38747   complete="$DUMPBIN"
38748   path="${complete%% *}"
38749   tmp="$complete EOL"
38750   arguments="${tmp#* }"
38751 
38752   # Input might be given as Windows format, start by converting to
38753   # unix format.
38754   new_path=`$CYGPATH -u "$path"`
38755 
38756   # Now try to locate executable using which
38757   new_path=`$WHICH "$new_path" 2> /dev/null`
38758   # bat and cmd files are not always considered executable in cygwin causing which
38759   # to not find them
38760   if test "x$new_path" = x \
38761       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38762       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38763     new_path=`$CYGPATH -u "$path"`
38764   fi
38765   if test "x$new_path" = x; then
38766     # Oops. Which didn't find the executable.
38767     # The splitting of arguments from the executable at a space might have been incorrect,
38768     # since paths with space are more likely in Windows. Give it another try with the whole
38769     # argument.
38770     path="$complete"
38771     arguments="EOL"
38772     new_path=`$CYGPATH -u "$path"`
38773     new_path=`$WHICH "$new_path" 2> /dev/null`
38774     # bat and cmd files are not always considered executable in cygwin causing which
38775     # to not find them
38776     if test "x$new_path" = x \
38777         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38778         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38779       new_path=`$CYGPATH -u "$path"`
38780     fi
38781     if test "x$new_path" = x; then
38782       # It's still not found. Now this is an unrecoverable error.
38783       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38784 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38785       has_space=`$ECHO "$complete" | $GREP " "`
38786       if test "x$has_space" != x; then
38787         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38788 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38789       fi
38790       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38791     fi
38792   fi
38793 
38794   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38795   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38796   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38797   # "foo.exe" is OK but "foo" is an error.
38798   #
38799   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38800   # It is also a way to make sure we got the proper file name for the real test later on.
38801   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38802   if test "x$test_shortpath" = x; then
38803     # Short path failed, file does not exist as specified.
38804     # Try adding .exe or .cmd
38805     if test -f "${new_path}.exe"; then
38806       input_to_shortpath="${new_path}.exe"
38807     elif test -f "${new_path}.cmd"; then
38808       input_to_shortpath="${new_path}.cmd"
38809     else
38810       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38811 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38812       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38813 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38814       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38815     fi
38816   else
38817     input_to_shortpath="$new_path"
38818   fi
38819 
38820   # Call helper function which possibly converts this using DOS-style short mode.
38821   # If so, the updated path is stored in $new_path.
38822   new_path="$input_to_shortpath"
38823 
38824   input_path="$input_to_shortpath"
38825   # Check if we need to convert this using DOS-style short mode. If the path
38826   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38827   # take no chances and rewrite it.
38828   # Note: m4 eats our [], so we need to use [ and ] instead.
38829   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38830   if test "x$has_forbidden_chars" != x; then
38831     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38832     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38833     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38834     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38835       # Going to short mode and back again did indeed matter. Since short mode is
38836       # case insensitive, let's make it lowercase to improve readability.
38837       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38838       # Now convert it back to Unix-style (cygpath)
38839       input_path=`$CYGPATH -u "$shortmode_path"`
38840       new_path="$input_path"
38841     fi
38842   fi
38843 
38844   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38845   if test "x$test_cygdrive_prefix" = x; then
38846     # As a simple fix, exclude /usr/bin since it's not a real path.
38847     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38848       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38849       # a path prefixed by /cygdrive for fixpath to work.
38850       new_path="$CYGWIN_ROOT_PATH$input_path"
38851     fi
38852   fi
38853 
38854   # remove trailing .exe if any
38855   new_path="${new_path/%.exe/}"
38856 
38857     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38858 
38859   # First separate the path from the arguments. This will split at the first
38860   # space.
38861   complete="$DUMPBIN"
38862   path="${complete%% *}"
38863   tmp="$complete EOL"
38864   arguments="${tmp#* }"
38865 
38866   # Input might be given as Windows format, start by converting to
38867   # unix format.
38868   new_path="$path"
38869 
38870   windows_path="$new_path"
38871   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38872     unix_path=`$CYGPATH -u "$windows_path"`
38873     new_path="$unix_path"
38874   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38875     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38876     new_path="$unix_path"
38877   fi
38878 
38879 
38880   # Now try to locate executable using which
38881   new_path=`$WHICH "$new_path" 2> /dev/null`
38882 
38883   if test "x$new_path" = x; then
38884     # Oops. Which didn't find the executable.
38885     # The splitting of arguments from the executable at a space might have been incorrect,
38886     # since paths with space are more likely in Windows. Give it another try with the whole
38887     # argument.
38888     path="$complete"
38889     arguments="EOL"
38890     new_path="$path"
38891 
38892   windows_path="$new_path"
38893   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38894     unix_path=`$CYGPATH -u "$windows_path"`
38895     new_path="$unix_path"
38896   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38897     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38898     new_path="$unix_path"
38899   fi
38900 
38901 
38902     new_path=`$WHICH "$new_path" 2> /dev/null`
38903     # bat and cmd files are not always considered executable in MSYS causing which
38904     # to not find them
38905     if test "x$new_path" = x \
38906         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38907         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38908       new_path="$path"
38909 
38910   windows_path="$new_path"
38911   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38912     unix_path=`$CYGPATH -u "$windows_path"`
38913     new_path="$unix_path"
38914   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38915     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38916     new_path="$unix_path"
38917   fi
38918 
38919     fi
38920 
38921     if test "x$new_path" = x; then
38922       # It's still not found. Now this is an unrecoverable error.
38923       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38924 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38925       has_space=`$ECHO "$complete" | $GREP " "`
38926       if test "x$has_space" != x; then
38927         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38928 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38929       fi
38930       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38931     fi
38932   fi
38933 
38934   # Now new_path has a complete unix path to the binary
38935   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38936     # Keep paths in /bin as-is, but remove trailing .exe if any
38937     new_path="${new_path/%.exe/}"
38938     # Do not save /bin paths to all_fixpath_prefixes!
38939   else
38940     # Not in mixed or Windows style, start by that.
38941     new_path=`cmd //c echo $new_path`
38942 
38943   input_path="$new_path"
38944   # Check if we need to convert this using DOS-style short mode. If the path
38945   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38946   # take no chances and rewrite it.
38947   # Note: m4 eats our [], so we need to use [ and ] instead.
38948   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38949   if test "x$has_forbidden_chars" != x; then
38950     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38951     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38952   fi
38953 
38954     # Output is in $new_path
38955 
38956   windows_path="$new_path"
38957   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38958     unix_path=`$CYGPATH -u "$windows_path"`
38959     new_path="$unix_path"
38960   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38961     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38962     new_path="$unix_path"
38963   fi
38964 
38965     # remove trailing .exe if any
38966     new_path="${new_path/%.exe/}"
38967 
38968     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38969     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38970   fi
38971 
38972     else
38973       # We're on a unix platform. Hooray! :)
38974       # First separate the path from the arguments. This will split at the first
38975       # space.
38976       complete="$DUMPBIN"
38977       path="${complete%% *}"
38978       tmp="$complete EOL"
38979       arguments="${tmp#* }"
38980 
38981       # Cannot rely on the command "which" here since it doesn't always work.
38982       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38983       if test -z "$is_absolute_path"; then
38984         # Path to executable is not absolute. Find it.
38985         IFS_save="$IFS"
38986         IFS=:
38987         for p in $PATH; do
38988           if test -f "$p/$path" && test -x "$p/$path"; then
38989             new_path="$p/$path"
38990             break
38991           fi
38992         done
38993         IFS="$IFS_save"
38994       else
38995         # This is an absolute path, we can use it without further modifications.
38996         new_path="$path"
38997       fi
38998 
38999       if test "x$new_path" = x; then
39000         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39001 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39002         has_space=`$ECHO "$complete" | $GREP " "`
39003         if test "x$has_space" != x; then
39004           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39005 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39006         fi
39007         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39008       fi
39009     fi
39010 
39011     # Now join together the path and the arguments once again
39012     if test "x$arguments" != xEOL; then
39013       new_complete="$new_path ${arguments% *}"
39014     else
39015       new_complete="$new_path"
39016     fi
39017 
39018     if test "x$complete" != "x$new_complete"; then
39019       DUMPBIN="$new_complete"
39020       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39021 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39022     fi
39023   fi
39024 
39025     # We need to check for 'msbuild.exe' because at the place where we expect to
39026     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39027     # won't find the 'msbuild.exe' executable in that case (and the
39028     # 'ac_executable_extensions' is unusable due to performance reasons).
39029     # Notice that we intentionally don't fix up the path to MSBUILD because we
39030     # will call it in a DOS shell during freetype detection on Windows (see
39031     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39032     # Extract the first word of "msbuild.exe", so it can be a program name with args.
39033 set dummy msbuild.exe; ac_word=$2
39034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39035 $as_echo_n "checking for $ac_word... " >&6; }
39036 if ${ac_cv_prog_MSBUILD+:} false; then :
39037   $as_echo_n "(cached) " >&6
39038 else
39039   if test -n "$MSBUILD"; then
39040   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39041 else
39042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39043 for as_dir in $PATH
39044 do
39045   IFS=$as_save_IFS
39046   test -z "$as_dir" && as_dir=.
39047     for ac_exec_ext in '' $ac_executable_extensions; do
39048   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39049     ac_cv_prog_MSBUILD="msbuild.exe"
39050     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39051     break 2
39052   fi
39053 done
39054   done
39055 IFS=$as_save_IFS
39056 
39057 fi
39058 fi
39059 MSBUILD=$ac_cv_prog_MSBUILD
39060 if test -n "$MSBUILD"; then
39061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39062 $as_echo "$MSBUILD" >&6; }
39063 else
39064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39065 $as_echo "no" >&6; }
39066 fi
39067 
39068 
39069   fi
39070 
39071   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39072 
39073 
39074   # Publish this variable in the help.
39075 
39076 
39077   if [ -z "${STRIP+x}" ]; then
39078     # The variable is not set by user, try to locate tool using the code snippet
39079     for ac_prog in strip
39080 do
39081   # Extract the first word of "$ac_prog", so it can be a program name with args.
39082 set dummy $ac_prog; ac_word=$2
39083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39084 $as_echo_n "checking for $ac_word... " >&6; }
39085 if ${ac_cv_path_STRIP+:} false; then :
39086   $as_echo_n "(cached) " >&6
39087 else
39088   case $STRIP in
39089   [\\/]* | ?:[\\/]*)
39090   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39091   ;;
39092   *)
39093   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39094 for as_dir in $PATH
39095 do
39096   IFS=$as_save_IFS
39097   test -z "$as_dir" && as_dir=.
39098     for ac_exec_ext in '' $ac_executable_extensions; do
39099   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39100     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39101     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39102     break 2
39103   fi
39104 done
39105   done
39106 IFS=$as_save_IFS
39107 
39108   ;;
39109 esac
39110 fi
39111 STRIP=$ac_cv_path_STRIP
39112 if test -n "$STRIP"; then
39113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39114 $as_echo "$STRIP" >&6; }
39115 else
39116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39117 $as_echo "no" >&6; }
39118 fi
39119 
39120 
39121   test -n "$STRIP" && break
39122 done
39123 
39124   else
39125     # The variable is set, but is it from the command line or the environment?
39126 
39127     # Try to remove the string !STRIP! from our list.
39128     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39129     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39130       # If it failed, the variable was not from the command line. Ignore it,
39131       # but warn the user (except for BASH, which is always set by the calling BASH).
39132       if test "xSTRIP" != xBASH; then
39133         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39134 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39135       fi
39136       # Try to locate tool using the code snippet
39137       for ac_prog in strip
39138 do
39139   # Extract the first word of "$ac_prog", so it can be a program name with args.
39140 set dummy $ac_prog; ac_word=$2
39141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39142 $as_echo_n "checking for $ac_word... " >&6; }
39143 if ${ac_cv_path_STRIP+:} false; then :
39144   $as_echo_n "(cached) " >&6
39145 else
39146   case $STRIP in
39147   [\\/]* | ?:[\\/]*)
39148   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39149   ;;
39150   *)
39151   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39152 for as_dir in $PATH
39153 do
39154   IFS=$as_save_IFS
39155   test -z "$as_dir" && as_dir=.
39156     for ac_exec_ext in '' $ac_executable_extensions; do
39157   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39158     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39160     break 2
39161   fi
39162 done
39163   done
39164 IFS=$as_save_IFS
39165 
39166   ;;
39167 esac
39168 fi
39169 STRIP=$ac_cv_path_STRIP
39170 if test -n "$STRIP"; then
39171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39172 $as_echo "$STRIP" >&6; }
39173 else
39174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39175 $as_echo "no" >&6; }
39176 fi
39177 
39178 
39179   test -n "$STRIP" && break
39180 done
39181 
39182     else
39183       # If it succeeded, then it was overridden by the user. We will use it
39184       # for the tool.
39185 
39186       # First remove it from the list of overridden variables, so we can test
39187       # for unknown variables in the end.
39188       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39189 
39190       # Check if we try to supply an empty value
39191       if test "x$STRIP" = x; then
39192         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39193 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39194         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39195 $as_echo_n "checking for STRIP... " >&6; }
39196         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39197 $as_echo "disabled" >&6; }
39198       else
39199         # Check if the provided tool contains a complete path.
39200         tool_specified="$STRIP"
39201         tool_basename="${tool_specified##*/}"
39202         if test "x$tool_basename" = "x$tool_specified"; then
39203           # A command without a complete path is provided, search $PATH.
39204           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39205 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39206           # Extract the first word of "$tool_basename", so it can be a program name with args.
39207 set dummy $tool_basename; ac_word=$2
39208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39209 $as_echo_n "checking for $ac_word... " >&6; }
39210 if ${ac_cv_path_STRIP+:} false; then :
39211   $as_echo_n "(cached) " >&6
39212 else
39213   case $STRIP in
39214   [\\/]* | ?:[\\/]*)
39215   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39216   ;;
39217   *)
39218   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39219 for as_dir in $PATH
39220 do
39221   IFS=$as_save_IFS
39222   test -z "$as_dir" && as_dir=.
39223     for ac_exec_ext in '' $ac_executable_extensions; do
39224   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39225     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39226     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39227     break 2
39228   fi
39229 done
39230   done
39231 IFS=$as_save_IFS
39232 
39233   ;;
39234 esac
39235 fi
39236 STRIP=$ac_cv_path_STRIP
39237 if test -n "$STRIP"; then
39238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39239 $as_echo "$STRIP" >&6; }
39240 else
39241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39242 $as_echo "no" >&6; }
39243 fi
39244 
39245 
39246           if test "x$STRIP" = x; then
39247             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39248           fi
39249         else
39250           # Otherwise we believe it is a complete path. Use it as it is.
39251           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39252 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39253           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39254 $as_echo_n "checking for STRIP... " >&6; }
39255           if test ! -x "$tool_specified"; then
39256             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39257 $as_echo "not found" >&6; }
39258             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39259           fi
39260           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39261 $as_echo "$tool_specified" >&6; }
39262         fi
39263       fi
39264     fi
39265 
39266   fi
39267 
39268 
39269 
39270   # Only process if variable expands to non-empty
39271 
39272   if test "x$STRIP" != x; then
39273     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39274 
39275   # First separate the path from the arguments. This will split at the first
39276   # space.
39277   complete="$STRIP"
39278   path="${complete%% *}"
39279   tmp="$complete EOL"
39280   arguments="${tmp#* }"
39281 
39282   # Input might be given as Windows format, start by converting to
39283   # unix format.
39284   new_path=`$CYGPATH -u "$path"`
39285 
39286   # Now try to locate executable using which
39287   new_path=`$WHICH "$new_path" 2> /dev/null`
39288   # bat and cmd files are not always considered executable in cygwin causing which
39289   # to not find them
39290   if test "x$new_path" = x \
39291       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39292       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39293     new_path=`$CYGPATH -u "$path"`
39294   fi
39295   if test "x$new_path" = x; then
39296     # Oops. Which didn't find the executable.
39297     # The splitting of arguments from the executable at a space might have been incorrect,
39298     # since paths with space are more likely in Windows. Give it another try with the whole
39299     # argument.
39300     path="$complete"
39301     arguments="EOL"
39302     new_path=`$CYGPATH -u "$path"`
39303     new_path=`$WHICH "$new_path" 2> /dev/null`
39304     # bat and cmd files are not always considered executable in cygwin causing which
39305     # to not find them
39306     if test "x$new_path" = x \
39307         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39308         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39309       new_path=`$CYGPATH -u "$path"`
39310     fi
39311     if test "x$new_path" = x; then
39312       # It's still not found. Now this is an unrecoverable error.
39313       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39314 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39315       has_space=`$ECHO "$complete" | $GREP " "`
39316       if test "x$has_space" != x; then
39317         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39318 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39319       fi
39320       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39321     fi
39322   fi
39323 
39324   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39325   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39326   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39327   # "foo.exe" is OK but "foo" is an error.
39328   #
39329   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39330   # It is also a way to make sure we got the proper file name for the real test later on.
39331   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39332   if test "x$test_shortpath" = x; then
39333     # Short path failed, file does not exist as specified.
39334     # Try adding .exe or .cmd
39335     if test -f "${new_path}.exe"; then
39336       input_to_shortpath="${new_path}.exe"
39337     elif test -f "${new_path}.cmd"; then
39338       input_to_shortpath="${new_path}.cmd"
39339     else
39340       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39341 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39342       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39343 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39344       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39345     fi
39346   else
39347     input_to_shortpath="$new_path"
39348   fi
39349 
39350   # Call helper function which possibly converts this using DOS-style short mode.
39351   # If so, the updated path is stored in $new_path.
39352   new_path="$input_to_shortpath"
39353 
39354   input_path="$input_to_shortpath"
39355   # Check if we need to convert this using DOS-style short mode. If the path
39356   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39357   # take no chances and rewrite it.
39358   # Note: m4 eats our [], so we need to use [ and ] instead.
39359   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39360   if test "x$has_forbidden_chars" != x; then
39361     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39362     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39363     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39364     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39365       # Going to short mode and back again did indeed matter. Since short mode is
39366       # case insensitive, let's make it lowercase to improve readability.
39367       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39368       # Now convert it back to Unix-style (cygpath)
39369       input_path=`$CYGPATH -u "$shortmode_path"`
39370       new_path="$input_path"
39371     fi
39372   fi
39373 
39374   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39375   if test "x$test_cygdrive_prefix" = x; then
39376     # As a simple fix, exclude /usr/bin since it's not a real path.
39377     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39378       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39379       # a path prefixed by /cygdrive for fixpath to work.
39380       new_path="$CYGWIN_ROOT_PATH$input_path"
39381     fi
39382   fi
39383 
39384   # remove trailing .exe if any
39385   new_path="${new_path/%.exe/}"
39386 
39387     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39388 
39389   # First separate the path from the arguments. This will split at the first
39390   # space.
39391   complete="$STRIP"
39392   path="${complete%% *}"
39393   tmp="$complete EOL"
39394   arguments="${tmp#* }"
39395 
39396   # Input might be given as Windows format, start by converting to
39397   # unix format.
39398   new_path="$path"
39399 
39400   windows_path="$new_path"
39401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39402     unix_path=`$CYGPATH -u "$windows_path"`
39403     new_path="$unix_path"
39404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39406     new_path="$unix_path"
39407   fi
39408 
39409 
39410   # Now try to locate executable using which
39411   new_path=`$WHICH "$new_path" 2> /dev/null`
39412 
39413   if test "x$new_path" = x; then
39414     # Oops. Which didn't find the executable.
39415     # The splitting of arguments from the executable at a space might have been incorrect,
39416     # since paths with space are more likely in Windows. Give it another try with the whole
39417     # argument.
39418     path="$complete"
39419     arguments="EOL"
39420     new_path="$path"
39421 
39422   windows_path="$new_path"
39423   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39424     unix_path=`$CYGPATH -u "$windows_path"`
39425     new_path="$unix_path"
39426   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39427     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39428     new_path="$unix_path"
39429   fi
39430 
39431 
39432     new_path=`$WHICH "$new_path" 2> /dev/null`
39433     # bat and cmd files are not always considered executable in MSYS causing which
39434     # to not find them
39435     if test "x$new_path" = x \
39436         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39437         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39438       new_path="$path"
39439 
39440   windows_path="$new_path"
39441   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39442     unix_path=`$CYGPATH -u "$windows_path"`
39443     new_path="$unix_path"
39444   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39445     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39446     new_path="$unix_path"
39447   fi
39448 
39449     fi
39450 
39451     if test "x$new_path" = x; then
39452       # It's still not found. Now this is an unrecoverable error.
39453       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39454 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39455       has_space=`$ECHO "$complete" | $GREP " "`
39456       if test "x$has_space" != x; then
39457         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39458 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39459       fi
39460       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39461     fi
39462   fi
39463 
39464   # Now new_path has a complete unix path to the binary
39465   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39466     # Keep paths in /bin as-is, but remove trailing .exe if any
39467     new_path="${new_path/%.exe/}"
39468     # Do not save /bin paths to all_fixpath_prefixes!
39469   else
39470     # Not in mixed or Windows style, start by that.
39471     new_path=`cmd //c echo $new_path`
39472 
39473   input_path="$new_path"
39474   # Check if we need to convert this using DOS-style short mode. If the path
39475   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39476   # take no chances and rewrite it.
39477   # Note: m4 eats our [], so we need to use [ and ] instead.
39478   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39479   if test "x$has_forbidden_chars" != x; then
39480     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39481     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39482   fi
39483 
39484     # Output is in $new_path
39485 
39486   windows_path="$new_path"
39487   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39488     unix_path=`$CYGPATH -u "$windows_path"`
39489     new_path="$unix_path"
39490   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39491     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39492     new_path="$unix_path"
39493   fi
39494 
39495     # remove trailing .exe if any
39496     new_path="${new_path/%.exe/}"
39497 
39498     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39499     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39500   fi
39501 
39502     else
39503       # We're on a unix platform. Hooray! :)
39504       # First separate the path from the arguments. This will split at the first
39505       # space.
39506       complete="$STRIP"
39507       path="${complete%% *}"
39508       tmp="$complete EOL"
39509       arguments="${tmp#* }"
39510 
39511       # Cannot rely on the command "which" here since it doesn't always work.
39512       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39513       if test -z "$is_absolute_path"; then
39514         # Path to executable is not absolute. Find it.
39515         IFS_save="$IFS"
39516         IFS=:
39517         for p in $PATH; do
39518           if test -f "$p/$path" && test -x "$p/$path"; then
39519             new_path="$p/$path"
39520             break
39521           fi
39522         done
39523         IFS="$IFS_save"
39524       else
39525         # This is an absolute path, we can use it without further modifications.
39526         new_path="$path"
39527       fi
39528 
39529       if test "x$new_path" = x; then
39530         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39531 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39532         has_space=`$ECHO "$complete" | $GREP " "`
39533         if test "x$has_space" != x; then
39534           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39535 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39536         fi
39537         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39538       fi
39539     fi
39540 
39541     # Now join together the path and the arguments once again
39542     if test "x$arguments" != xEOL; then
39543       new_complete="$new_path ${arguments% *}"
39544     else
39545       new_complete="$new_path"
39546     fi
39547 
39548     if test "x$complete" != "x$new_complete"; then
39549       STRIP="$new_complete"
39550       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39551 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39552     fi
39553   fi
39554 
39555 
39556 
39557   # Publish this variable in the help.
39558 
39559 
39560   if [ -z "${NM+x}" ]; then
39561     # The variable is not set by user, try to locate tool using the code snippet
39562     for ac_prog in nm
39563 do
39564   # Extract the first word of "$ac_prog", so it can be a program name with args.
39565 set dummy $ac_prog; ac_word=$2
39566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39567 $as_echo_n "checking for $ac_word... " >&6; }
39568 if ${ac_cv_path_NM+:} false; then :
39569   $as_echo_n "(cached) " >&6
39570 else
39571   case $NM in
39572   [\\/]* | ?:[\\/]*)
39573   ac_cv_path_NM="$NM" # Let the user override the test with a path.
39574   ;;
39575   *)
39576   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39577 for as_dir in $PATH
39578 do
39579   IFS=$as_save_IFS
39580   test -z "$as_dir" && as_dir=.
39581     for ac_exec_ext in '' $ac_executable_extensions; do
39582   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39583     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39585     break 2
39586   fi
39587 done
39588   done
39589 IFS=$as_save_IFS
39590 
39591   ;;
39592 esac
39593 fi
39594 NM=$ac_cv_path_NM
39595 if test -n "$NM"; then
39596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39597 $as_echo "$NM" >&6; }
39598 else
39599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39600 $as_echo "no" >&6; }
39601 fi
39602 
39603 
39604   test -n "$NM" && break
39605 done
39606 
39607   else
39608     # The variable is set, but is it from the command line or the environment?
39609 
39610     # Try to remove the string !NM! from our list.
39611     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39612     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39613       # If it failed, the variable was not from the command line. Ignore it,
39614       # but warn the user (except for BASH, which is always set by the calling BASH).
39615       if test "xNM" != xBASH; then
39616         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39617 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39618       fi
39619       # Try to locate tool using the code snippet
39620       for ac_prog in nm
39621 do
39622   # Extract the first word of "$ac_prog", so it can be a program name with args.
39623 set dummy $ac_prog; ac_word=$2
39624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39625 $as_echo_n "checking for $ac_word... " >&6; }
39626 if ${ac_cv_path_NM+:} false; then :
39627   $as_echo_n "(cached) " >&6
39628 else
39629   case $NM in
39630   [\\/]* | ?:[\\/]*)
39631   ac_cv_path_NM="$NM" # Let the user override the test with a path.
39632   ;;
39633   *)
39634   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39635 for as_dir in $PATH
39636 do
39637   IFS=$as_save_IFS
39638   test -z "$as_dir" && as_dir=.
39639     for ac_exec_ext in '' $ac_executable_extensions; do
39640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39641     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39643     break 2
39644   fi
39645 done
39646   done
39647 IFS=$as_save_IFS
39648 
39649   ;;
39650 esac
39651 fi
39652 NM=$ac_cv_path_NM
39653 if test -n "$NM"; then
39654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39655 $as_echo "$NM" >&6; }
39656 else
39657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39658 $as_echo "no" >&6; }
39659 fi
39660 
39661 
39662   test -n "$NM" && break
39663 done
39664 
39665     else
39666       # If it succeeded, then it was overridden by the user. We will use it
39667       # for the tool.
39668 
39669       # First remove it from the list of overridden variables, so we can test
39670       # for unknown variables in the end.
39671       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39672 
39673       # Check if we try to supply an empty value
39674       if test "x$NM" = x; then
39675         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39676 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39677         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39678 $as_echo_n "checking for NM... " >&6; }
39679         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39680 $as_echo "disabled" >&6; }
39681       else
39682         # Check if the provided tool contains a complete path.
39683         tool_specified="$NM"
39684         tool_basename="${tool_specified##*/}"
39685         if test "x$tool_basename" = "x$tool_specified"; then
39686           # A command without a complete path is provided, search $PATH.
39687           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39688 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39689           # Extract the first word of "$tool_basename", so it can be a program name with args.
39690 set dummy $tool_basename; ac_word=$2
39691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39692 $as_echo_n "checking for $ac_word... " >&6; }
39693 if ${ac_cv_path_NM+:} false; then :
39694   $as_echo_n "(cached) " >&6
39695 else
39696   case $NM in
39697   [\\/]* | ?:[\\/]*)
39698   ac_cv_path_NM="$NM" # Let the user override the test with a path.
39699   ;;
39700   *)
39701   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39702 for as_dir in $PATH
39703 do
39704   IFS=$as_save_IFS
39705   test -z "$as_dir" && as_dir=.
39706     for ac_exec_ext in '' $ac_executable_extensions; do
39707   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39708     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39709     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39710     break 2
39711   fi
39712 done
39713   done
39714 IFS=$as_save_IFS
39715 
39716   ;;
39717 esac
39718 fi
39719 NM=$ac_cv_path_NM
39720 if test -n "$NM"; then
39721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39722 $as_echo "$NM" >&6; }
39723 else
39724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39725 $as_echo "no" >&6; }
39726 fi
39727 
39728 
39729           if test "x$NM" = x; then
39730             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39731           fi
39732         else
39733           # Otherwise we believe it is a complete path. Use it as it is.
39734           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39735 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39736           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39737 $as_echo_n "checking for NM... " >&6; }
39738           if test ! -x "$tool_specified"; then
39739             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39740 $as_echo "not found" >&6; }
39741             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39742           fi
39743           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39744 $as_echo "$tool_specified" >&6; }
39745         fi
39746       fi
39747     fi
39748 
39749   fi
39750 
39751 
39752 
39753   # Only process if variable expands to non-empty
39754 
39755   if test "x$NM" != x; then
39756     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39757 
39758   # First separate the path from the arguments. This will split at the first
39759   # space.
39760   complete="$NM"
39761   path="${complete%% *}"
39762   tmp="$complete EOL"
39763   arguments="${tmp#* }"
39764 
39765   # Input might be given as Windows format, start by converting to
39766   # unix format.
39767   new_path=`$CYGPATH -u "$path"`
39768 
39769   # Now try to locate executable using which
39770   new_path=`$WHICH "$new_path" 2> /dev/null`
39771   # bat and cmd files are not always considered executable in cygwin causing which
39772   # to not find them
39773   if test "x$new_path" = x \
39774       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39775       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39776     new_path=`$CYGPATH -u "$path"`
39777   fi
39778   if test "x$new_path" = x; then
39779     # Oops. Which didn't find the executable.
39780     # The splitting of arguments from the executable at a space might have been incorrect,
39781     # since paths with space are more likely in Windows. Give it another try with the whole
39782     # argument.
39783     path="$complete"
39784     arguments="EOL"
39785     new_path=`$CYGPATH -u "$path"`
39786     new_path=`$WHICH "$new_path" 2> /dev/null`
39787     # bat and cmd files are not always considered executable in cygwin causing which
39788     # to not find them
39789     if test "x$new_path" = x \
39790         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39791         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39792       new_path=`$CYGPATH -u "$path"`
39793     fi
39794     if test "x$new_path" = x; then
39795       # It's still not found. Now this is an unrecoverable error.
39796       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39797 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39798       has_space=`$ECHO "$complete" | $GREP " "`
39799       if test "x$has_space" != x; then
39800         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39801 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39802       fi
39803       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39804     fi
39805   fi
39806 
39807   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39808   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39809   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39810   # "foo.exe" is OK but "foo" is an error.
39811   #
39812   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39813   # It is also a way to make sure we got the proper file name for the real test later on.
39814   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39815   if test "x$test_shortpath" = x; then
39816     # Short path failed, file does not exist as specified.
39817     # Try adding .exe or .cmd
39818     if test -f "${new_path}.exe"; then
39819       input_to_shortpath="${new_path}.exe"
39820     elif test -f "${new_path}.cmd"; then
39821       input_to_shortpath="${new_path}.cmd"
39822     else
39823       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39824 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39825       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39826 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39827       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39828     fi
39829   else
39830     input_to_shortpath="$new_path"
39831   fi
39832 
39833   # Call helper function which possibly converts this using DOS-style short mode.
39834   # If so, the updated path is stored in $new_path.
39835   new_path="$input_to_shortpath"
39836 
39837   input_path="$input_to_shortpath"
39838   # Check if we need to convert this using DOS-style short mode. If the path
39839   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39840   # take no chances and rewrite it.
39841   # Note: m4 eats our [], so we need to use [ and ] instead.
39842   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39843   if test "x$has_forbidden_chars" != x; then
39844     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39845     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39846     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39847     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39848       # Going to short mode and back again did indeed matter. Since short mode is
39849       # case insensitive, let's make it lowercase to improve readability.
39850       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39851       # Now convert it back to Unix-style (cygpath)
39852       input_path=`$CYGPATH -u "$shortmode_path"`
39853       new_path="$input_path"
39854     fi
39855   fi
39856 
39857   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39858   if test "x$test_cygdrive_prefix" = x; then
39859     # As a simple fix, exclude /usr/bin since it's not a real path.
39860     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39861       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39862       # a path prefixed by /cygdrive for fixpath to work.
39863       new_path="$CYGWIN_ROOT_PATH$input_path"
39864     fi
39865   fi
39866 
39867   # remove trailing .exe if any
39868   new_path="${new_path/%.exe/}"
39869 
39870     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39871 
39872   # First separate the path from the arguments. This will split at the first
39873   # space.
39874   complete="$NM"
39875   path="${complete%% *}"
39876   tmp="$complete EOL"
39877   arguments="${tmp#* }"
39878 
39879   # Input might be given as Windows format, start by converting to
39880   # unix format.
39881   new_path="$path"
39882 
39883   windows_path="$new_path"
39884   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39885     unix_path=`$CYGPATH -u "$windows_path"`
39886     new_path="$unix_path"
39887   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39888     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39889     new_path="$unix_path"
39890   fi
39891 
39892 
39893   # Now try to locate executable using which
39894   new_path=`$WHICH "$new_path" 2> /dev/null`
39895 
39896   if test "x$new_path" = x; then
39897     # Oops. Which didn't find the executable.
39898     # The splitting of arguments from the executable at a space might have been incorrect,
39899     # since paths with space are more likely in Windows. Give it another try with the whole
39900     # argument.
39901     path="$complete"
39902     arguments="EOL"
39903     new_path="$path"
39904 
39905   windows_path="$new_path"
39906   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39907     unix_path=`$CYGPATH -u "$windows_path"`
39908     new_path="$unix_path"
39909   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39910     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39911     new_path="$unix_path"
39912   fi
39913 
39914 
39915     new_path=`$WHICH "$new_path" 2> /dev/null`
39916     # bat and cmd files are not always considered executable in MSYS causing which
39917     # to not find them
39918     if test "x$new_path" = x \
39919         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39920         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39921       new_path="$path"
39922 
39923   windows_path="$new_path"
39924   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39925     unix_path=`$CYGPATH -u "$windows_path"`
39926     new_path="$unix_path"
39927   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39928     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39929     new_path="$unix_path"
39930   fi
39931 
39932     fi
39933 
39934     if test "x$new_path" = x; then
39935       # It's still not found. Now this is an unrecoverable error.
39936       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39937 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39938       has_space=`$ECHO "$complete" | $GREP " "`
39939       if test "x$has_space" != x; then
39940         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39941 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39942       fi
39943       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39944     fi
39945   fi
39946 
39947   # Now new_path has a complete unix path to the binary
39948   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39949     # Keep paths in /bin as-is, but remove trailing .exe if any
39950     new_path="${new_path/%.exe/}"
39951     # Do not save /bin paths to all_fixpath_prefixes!
39952   else
39953     # Not in mixed or Windows style, start by that.
39954     new_path=`cmd //c echo $new_path`
39955 
39956   input_path="$new_path"
39957   # Check if we need to convert this using DOS-style short mode. If the path
39958   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39959   # take no chances and rewrite it.
39960   # Note: m4 eats our [], so we need to use [ and ] instead.
39961   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39962   if test "x$has_forbidden_chars" != x; then
39963     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39964     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39965   fi
39966 
39967     # Output is in $new_path
39968 
39969   windows_path="$new_path"
39970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39971     unix_path=`$CYGPATH -u "$windows_path"`
39972     new_path="$unix_path"
39973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39974     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39975     new_path="$unix_path"
39976   fi
39977 
39978     # remove trailing .exe if any
39979     new_path="${new_path/%.exe/}"
39980 
39981     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39982     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39983   fi
39984 
39985     else
39986       # We're on a unix platform. Hooray! :)
39987       # First separate the path from the arguments. This will split at the first
39988       # space.
39989       complete="$NM"
39990       path="${complete%% *}"
39991       tmp="$complete EOL"
39992       arguments="${tmp#* }"
39993 
39994       # Cannot rely on the command "which" here since it doesn't always work.
39995       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39996       if test -z "$is_absolute_path"; then
39997         # Path to executable is not absolute. Find it.
39998         IFS_save="$IFS"
39999         IFS=:
40000         for p in $PATH; do
40001           if test -f "$p/$path" && test -x "$p/$path"; then
40002             new_path="$p/$path"
40003             break
40004           fi
40005         done
40006         IFS="$IFS_save"
40007       else
40008         # This is an absolute path, we can use it without further modifications.
40009         new_path="$path"
40010       fi
40011 
40012       if test "x$new_path" = x; then
40013         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40014 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40015         has_space=`$ECHO "$complete" | $GREP " "`
40016         if test "x$has_space" != x; then
40017           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40018 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40019         fi
40020         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40021       fi
40022     fi
40023 
40024     # Now join together the path and the arguments once again
40025     if test "x$arguments" != xEOL; then
40026       new_complete="$new_path ${arguments% *}"
40027     else
40028       new_complete="$new_path"
40029     fi
40030 
40031     if test "x$complete" != "x$new_complete"; then
40032       NM="$new_complete"
40033       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40034 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40035     fi
40036   fi
40037 
40038 
40039 
40040   # Publish this variable in the help.
40041 
40042 
40043   if [ -z "${GNM+x}" ]; then
40044     # The variable is not set by user, try to locate tool using the code snippet
40045     for ac_prog in gnm
40046 do
40047   # Extract the first word of "$ac_prog", so it can be a program name with args.
40048 set dummy $ac_prog; ac_word=$2
40049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40050 $as_echo_n "checking for $ac_word... " >&6; }
40051 if ${ac_cv_path_GNM+:} false; then :
40052   $as_echo_n "(cached) " >&6
40053 else
40054   case $GNM in
40055   [\\/]* | ?:[\\/]*)
40056   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40057   ;;
40058   *)
40059   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40060 for as_dir in $PATH
40061 do
40062   IFS=$as_save_IFS
40063   test -z "$as_dir" && as_dir=.
40064     for ac_exec_ext in '' $ac_executable_extensions; do
40065   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40066     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40067     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40068     break 2
40069   fi
40070 done
40071   done
40072 IFS=$as_save_IFS
40073 
40074   ;;
40075 esac
40076 fi
40077 GNM=$ac_cv_path_GNM
40078 if test -n "$GNM"; then
40079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40080 $as_echo "$GNM" >&6; }
40081 else
40082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40083 $as_echo "no" >&6; }
40084 fi
40085 
40086 
40087   test -n "$GNM" && break
40088 done
40089 
40090   else
40091     # The variable is set, but is it from the command line or the environment?
40092 
40093     # Try to remove the string !GNM! from our list.
40094     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40095     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40096       # If it failed, the variable was not from the command line. Ignore it,
40097       # but warn the user (except for BASH, which is always set by the calling BASH).
40098       if test "xGNM" != xBASH; then
40099         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40100 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40101       fi
40102       # Try to locate tool using the code snippet
40103       for ac_prog in gnm
40104 do
40105   # Extract the first word of "$ac_prog", so it can be a program name with args.
40106 set dummy $ac_prog; ac_word=$2
40107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40108 $as_echo_n "checking for $ac_word... " >&6; }
40109 if ${ac_cv_path_GNM+:} false; then :
40110   $as_echo_n "(cached) " >&6
40111 else
40112   case $GNM in
40113   [\\/]* | ?:[\\/]*)
40114   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40115   ;;
40116   *)
40117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40118 for as_dir in $PATH
40119 do
40120   IFS=$as_save_IFS
40121   test -z "$as_dir" && as_dir=.
40122     for ac_exec_ext in '' $ac_executable_extensions; do
40123   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40124     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40126     break 2
40127   fi
40128 done
40129   done
40130 IFS=$as_save_IFS
40131 
40132   ;;
40133 esac
40134 fi
40135 GNM=$ac_cv_path_GNM
40136 if test -n "$GNM"; then
40137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40138 $as_echo "$GNM" >&6; }
40139 else
40140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40141 $as_echo "no" >&6; }
40142 fi
40143 
40144 
40145   test -n "$GNM" && break
40146 done
40147 
40148     else
40149       # If it succeeded, then it was overridden by the user. We will use it
40150       # for the tool.
40151 
40152       # First remove it from the list of overridden variables, so we can test
40153       # for unknown variables in the end.
40154       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40155 
40156       # Check if we try to supply an empty value
40157       if test "x$GNM" = x; then
40158         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40159 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40160         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40161 $as_echo_n "checking for GNM... " >&6; }
40162         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40163 $as_echo "disabled" >&6; }
40164       else
40165         # Check if the provided tool contains a complete path.
40166         tool_specified="$GNM"
40167         tool_basename="${tool_specified##*/}"
40168         if test "x$tool_basename" = "x$tool_specified"; then
40169           # A command without a complete path is provided, search $PATH.
40170           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40171 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40172           # Extract the first word of "$tool_basename", so it can be a program name with args.
40173 set dummy $tool_basename; ac_word=$2
40174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40175 $as_echo_n "checking for $ac_word... " >&6; }
40176 if ${ac_cv_path_GNM+:} false; then :
40177   $as_echo_n "(cached) " >&6
40178 else
40179   case $GNM in
40180   [\\/]* | ?:[\\/]*)
40181   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40182   ;;
40183   *)
40184   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40185 for as_dir in $PATH
40186 do
40187   IFS=$as_save_IFS
40188   test -z "$as_dir" && as_dir=.
40189     for ac_exec_ext in '' $ac_executable_extensions; do
40190   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40191     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40192     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40193     break 2
40194   fi
40195 done
40196   done
40197 IFS=$as_save_IFS
40198 
40199   ;;
40200 esac
40201 fi
40202 GNM=$ac_cv_path_GNM
40203 if test -n "$GNM"; then
40204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40205 $as_echo "$GNM" >&6; }
40206 else
40207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40208 $as_echo "no" >&6; }
40209 fi
40210 
40211 
40212           if test "x$GNM" = x; then
40213             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40214           fi
40215         else
40216           # Otherwise we believe it is a complete path. Use it as it is.
40217           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40218 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40219           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40220 $as_echo_n "checking for GNM... " >&6; }
40221           if test ! -x "$tool_specified"; then
40222             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40223 $as_echo "not found" >&6; }
40224             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40225           fi
40226           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40227 $as_echo "$tool_specified" >&6; }
40228         fi
40229       fi
40230     fi
40231 
40232   fi
40233 
40234 
40235 
40236   # Only process if variable expands to non-empty
40237 
40238   if test "x$GNM" != x; then
40239     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40240 
40241   # First separate the path from the arguments. This will split at the first
40242   # space.
40243   complete="$GNM"
40244   path="${complete%% *}"
40245   tmp="$complete EOL"
40246   arguments="${tmp#* }"
40247 
40248   # Input might be given as Windows format, start by converting to
40249   # unix format.
40250   new_path=`$CYGPATH -u "$path"`
40251 
40252   # Now try to locate executable using which
40253   new_path=`$WHICH "$new_path" 2> /dev/null`
40254   # bat and cmd files are not always considered executable in cygwin causing which
40255   # to not find them
40256   if test "x$new_path" = x \
40257       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40258       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40259     new_path=`$CYGPATH -u "$path"`
40260   fi
40261   if test "x$new_path" = x; then
40262     # Oops. Which didn't find the executable.
40263     # The splitting of arguments from the executable at a space might have been incorrect,
40264     # since paths with space are more likely in Windows. Give it another try with the whole
40265     # argument.
40266     path="$complete"
40267     arguments="EOL"
40268     new_path=`$CYGPATH -u "$path"`
40269     new_path=`$WHICH "$new_path" 2> /dev/null`
40270     # bat and cmd files are not always considered executable in cygwin causing which
40271     # to not find them
40272     if test "x$new_path" = x \
40273         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40274         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40275       new_path=`$CYGPATH -u "$path"`
40276     fi
40277     if test "x$new_path" = x; then
40278       # It's still not found. Now this is an unrecoverable error.
40279       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40280 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40281       has_space=`$ECHO "$complete" | $GREP " "`
40282       if test "x$has_space" != x; then
40283         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40284 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40285       fi
40286       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40287     fi
40288   fi
40289 
40290   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40291   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40292   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40293   # "foo.exe" is OK but "foo" is an error.
40294   #
40295   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40296   # It is also a way to make sure we got the proper file name for the real test later on.
40297   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40298   if test "x$test_shortpath" = x; then
40299     # Short path failed, file does not exist as specified.
40300     # Try adding .exe or .cmd
40301     if test -f "${new_path}.exe"; then
40302       input_to_shortpath="${new_path}.exe"
40303     elif test -f "${new_path}.cmd"; then
40304       input_to_shortpath="${new_path}.cmd"
40305     else
40306       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40307 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40308       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40309 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40310       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40311     fi
40312   else
40313     input_to_shortpath="$new_path"
40314   fi
40315 
40316   # Call helper function which possibly converts this using DOS-style short mode.
40317   # If so, the updated path is stored in $new_path.
40318   new_path="$input_to_shortpath"
40319 
40320   input_path="$input_to_shortpath"
40321   # Check if we need to convert this using DOS-style short mode. If the path
40322   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40323   # take no chances and rewrite it.
40324   # Note: m4 eats our [], so we need to use [ and ] instead.
40325   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40326   if test "x$has_forbidden_chars" != x; then
40327     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40328     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40329     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40330     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40331       # Going to short mode and back again did indeed matter. Since short mode is
40332       # case insensitive, let's make it lowercase to improve readability.
40333       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40334       # Now convert it back to Unix-style (cygpath)
40335       input_path=`$CYGPATH -u "$shortmode_path"`
40336       new_path="$input_path"
40337     fi
40338   fi
40339 
40340   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40341   if test "x$test_cygdrive_prefix" = x; then
40342     # As a simple fix, exclude /usr/bin since it's not a real path.
40343     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40344       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40345       # a path prefixed by /cygdrive for fixpath to work.
40346       new_path="$CYGWIN_ROOT_PATH$input_path"
40347     fi
40348   fi
40349 
40350   # remove trailing .exe if any
40351   new_path="${new_path/%.exe/}"
40352 
40353     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40354 
40355   # First separate the path from the arguments. This will split at the first
40356   # space.
40357   complete="$GNM"
40358   path="${complete%% *}"
40359   tmp="$complete EOL"
40360   arguments="${tmp#* }"
40361 
40362   # Input might be given as Windows format, start by converting to
40363   # unix format.
40364   new_path="$path"
40365 
40366   windows_path="$new_path"
40367   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40368     unix_path=`$CYGPATH -u "$windows_path"`
40369     new_path="$unix_path"
40370   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40371     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40372     new_path="$unix_path"
40373   fi
40374 
40375 
40376   # Now try to locate executable using which
40377   new_path=`$WHICH "$new_path" 2> /dev/null`
40378 
40379   if test "x$new_path" = x; then
40380     # Oops. Which didn't find the executable.
40381     # The splitting of arguments from the executable at a space might have been incorrect,
40382     # since paths with space are more likely in Windows. Give it another try with the whole
40383     # argument.
40384     path="$complete"
40385     arguments="EOL"
40386     new_path="$path"
40387 
40388   windows_path="$new_path"
40389   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40390     unix_path=`$CYGPATH -u "$windows_path"`
40391     new_path="$unix_path"
40392   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40393     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40394     new_path="$unix_path"
40395   fi
40396 
40397 
40398     new_path=`$WHICH "$new_path" 2> /dev/null`
40399     # bat and cmd files are not always considered executable in MSYS causing which
40400     # to not find them
40401     if test "x$new_path" = x \
40402         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40403         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40404       new_path="$path"
40405 
40406   windows_path="$new_path"
40407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40408     unix_path=`$CYGPATH -u "$windows_path"`
40409     new_path="$unix_path"
40410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40411     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40412     new_path="$unix_path"
40413   fi
40414 
40415     fi
40416 
40417     if test "x$new_path" = x; then
40418       # It's still not found. Now this is an unrecoverable error.
40419       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40420 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40421       has_space=`$ECHO "$complete" | $GREP " "`
40422       if test "x$has_space" != x; then
40423         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40424 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40425       fi
40426       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40427     fi
40428   fi
40429 
40430   # Now new_path has a complete unix path to the binary
40431   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40432     # Keep paths in /bin as-is, but remove trailing .exe if any
40433     new_path="${new_path/%.exe/}"
40434     # Do not save /bin paths to all_fixpath_prefixes!
40435   else
40436     # Not in mixed or Windows style, start by that.
40437     new_path=`cmd //c echo $new_path`
40438 
40439   input_path="$new_path"
40440   # Check if we need to convert this using DOS-style short mode. If the path
40441   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40442   # take no chances and rewrite it.
40443   # Note: m4 eats our [], so we need to use [ and ] instead.
40444   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40445   if test "x$has_forbidden_chars" != x; then
40446     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40447     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40448   fi
40449 
40450     # Output is in $new_path
40451 
40452   windows_path="$new_path"
40453   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40454     unix_path=`$CYGPATH -u "$windows_path"`
40455     new_path="$unix_path"
40456   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40457     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40458     new_path="$unix_path"
40459   fi
40460 
40461     # remove trailing .exe if any
40462     new_path="${new_path/%.exe/}"
40463 
40464     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40465     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40466   fi
40467 
40468     else
40469       # We're on a unix platform. Hooray! :)
40470       # First separate the path from the arguments. This will split at the first
40471       # space.
40472       complete="$GNM"
40473       path="${complete%% *}"
40474       tmp="$complete EOL"
40475       arguments="${tmp#* }"
40476 
40477       # Cannot rely on the command "which" here since it doesn't always work.
40478       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40479       if test -z "$is_absolute_path"; then
40480         # Path to executable is not absolute. Find it.
40481         IFS_save="$IFS"
40482         IFS=:
40483         for p in $PATH; do
40484           if test -f "$p/$path" && test -x "$p/$path"; then
40485             new_path="$p/$path"
40486             break
40487           fi
40488         done
40489         IFS="$IFS_save"
40490       else
40491         # This is an absolute path, we can use it without further modifications.
40492         new_path="$path"
40493       fi
40494 
40495       if test "x$new_path" = x; then
40496         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40497 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40498         has_space=`$ECHO "$complete" | $GREP " "`
40499         if test "x$has_space" != x; then
40500           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40501 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40502         fi
40503         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40504       fi
40505     fi
40506 
40507     # Now join together the path and the arguments once again
40508     if test "x$arguments" != xEOL; then
40509       new_complete="$new_path ${arguments% *}"
40510     else
40511       new_complete="$new_path"
40512     fi
40513 
40514     if test "x$complete" != "x$new_complete"; then
40515       GNM="$new_complete"
40516       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40517 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40518     fi
40519   fi
40520 
40521   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40522     # FIXME: we should unify this with the solaris case above.
40523 
40524 
40525   # Publish this variable in the help.
40526 
40527 
40528   if [ -z "${STRIP+x}" ]; then
40529     # The variable is not set by user, try to locate tool using the code snippet
40530     if test -n "$ac_tool_prefix"; then
40531   for ac_prog in strip
40532   do
40533     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40534 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40536 $as_echo_n "checking for $ac_word... " >&6; }
40537 if ${ac_cv_prog_STRIP+:} false; then :
40538   $as_echo_n "(cached) " >&6
40539 else
40540   if test -n "$STRIP"; then
40541   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40542 else
40543 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40544 for as_dir in $PATH
40545 do
40546   IFS=$as_save_IFS
40547   test -z "$as_dir" && as_dir=.
40548     for ac_exec_ext in '' $ac_executable_extensions; do
40549   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40550     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40551     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40552     break 2
40553   fi
40554 done
40555   done
40556 IFS=$as_save_IFS
40557 
40558 fi
40559 fi
40560 STRIP=$ac_cv_prog_STRIP
40561 if test -n "$STRIP"; then
40562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40563 $as_echo "$STRIP" >&6; }
40564 else
40565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40566 $as_echo "no" >&6; }
40567 fi
40568 
40569 
40570     test -n "$STRIP" && break
40571   done
40572 fi
40573 if test -z "$STRIP"; then
40574   ac_ct_STRIP=$STRIP
40575   for ac_prog in strip
40576 do
40577   # Extract the first word of "$ac_prog", so it can be a program name with args.
40578 set dummy $ac_prog; ac_word=$2
40579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40580 $as_echo_n "checking for $ac_word... " >&6; }
40581 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40582   $as_echo_n "(cached) " >&6
40583 else
40584   if test -n "$ac_ct_STRIP"; then
40585   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40586 else
40587 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40588 for as_dir in $PATH
40589 do
40590   IFS=$as_save_IFS
40591   test -z "$as_dir" && as_dir=.
40592     for ac_exec_ext in '' $ac_executable_extensions; do
40593   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40594     ac_cv_prog_ac_ct_STRIP="$ac_prog"
40595     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40596     break 2
40597   fi
40598 done
40599   done
40600 IFS=$as_save_IFS
40601 
40602 fi
40603 fi
40604 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40605 if test -n "$ac_ct_STRIP"; then
40606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40607 $as_echo "$ac_ct_STRIP" >&6; }
40608 else
40609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40610 $as_echo "no" >&6; }
40611 fi
40612 
40613 
40614   test -n "$ac_ct_STRIP" && break
40615 done
40616 
40617   if test "x$ac_ct_STRIP" = x; then
40618     STRIP=""
40619   else
40620     case $cross_compiling:$ac_tool_warned in
40621 yes:)
40622 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40623 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40624 ac_tool_warned=yes ;;
40625 esac
40626     STRIP=$ac_ct_STRIP
40627   fi
40628 fi
40629 
40630   else
40631     # The variable is set, but is it from the command line or the environment?
40632 
40633     # Try to remove the string !STRIP! from our list.
40634     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40635     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40636       # If it failed, the variable was not from the command line. Ignore it,
40637       # but warn the user (except for BASH, which is always set by the calling BASH).
40638       if test "xSTRIP" != xBASH; then
40639         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40640 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40641       fi
40642       # Try to locate tool using the code snippet
40643       if test -n "$ac_tool_prefix"; then
40644   for ac_prog in strip
40645   do
40646     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40647 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40649 $as_echo_n "checking for $ac_word... " >&6; }
40650 if ${ac_cv_prog_STRIP+:} false; then :
40651   $as_echo_n "(cached) " >&6
40652 else
40653   if test -n "$STRIP"; then
40654   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40655 else
40656 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40657 for as_dir in $PATH
40658 do
40659   IFS=$as_save_IFS
40660   test -z "$as_dir" && as_dir=.
40661     for ac_exec_ext in '' $ac_executable_extensions; do
40662   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40663     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40664     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40665     break 2
40666   fi
40667 done
40668   done
40669 IFS=$as_save_IFS
40670 
40671 fi
40672 fi
40673 STRIP=$ac_cv_prog_STRIP
40674 if test -n "$STRIP"; then
40675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40676 $as_echo "$STRIP" >&6; }
40677 else
40678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40679 $as_echo "no" >&6; }
40680 fi
40681 
40682 
40683     test -n "$STRIP" && break
40684   done
40685 fi
40686 if test -z "$STRIP"; then
40687   ac_ct_STRIP=$STRIP
40688   for ac_prog in strip
40689 do
40690   # Extract the first word of "$ac_prog", so it can be a program name with args.
40691 set dummy $ac_prog; ac_word=$2
40692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40693 $as_echo_n "checking for $ac_word... " >&6; }
40694 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40695   $as_echo_n "(cached) " >&6
40696 else
40697   if test -n "$ac_ct_STRIP"; then
40698   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40699 else
40700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40701 for as_dir in $PATH
40702 do
40703   IFS=$as_save_IFS
40704   test -z "$as_dir" && as_dir=.
40705     for ac_exec_ext in '' $ac_executable_extensions; do
40706   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40707     ac_cv_prog_ac_ct_STRIP="$ac_prog"
40708     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40709     break 2
40710   fi
40711 done
40712   done
40713 IFS=$as_save_IFS
40714 
40715 fi
40716 fi
40717 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40718 if test -n "$ac_ct_STRIP"; then
40719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40720 $as_echo "$ac_ct_STRIP" >&6; }
40721 else
40722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40723 $as_echo "no" >&6; }
40724 fi
40725 
40726 
40727   test -n "$ac_ct_STRIP" && break
40728 done
40729 
40730   if test "x$ac_ct_STRIP" = x; then
40731     STRIP=""
40732   else
40733     case $cross_compiling:$ac_tool_warned in
40734 yes:)
40735 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40736 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40737 ac_tool_warned=yes ;;
40738 esac
40739     STRIP=$ac_ct_STRIP
40740   fi
40741 fi
40742 
40743     else
40744       # If it succeeded, then it was overridden by the user. We will use it
40745       # for the tool.
40746 
40747       # First remove it from the list of overridden variables, so we can test
40748       # for unknown variables in the end.
40749       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40750 
40751       # Check if we try to supply an empty value
40752       if test "x$STRIP" = x; then
40753         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40754 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40755         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40756 $as_echo_n "checking for STRIP... " >&6; }
40757         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40758 $as_echo "disabled" >&6; }
40759       else
40760         # Check if the provided tool contains a complete path.
40761         tool_specified="$STRIP"
40762         tool_basename="${tool_specified##*/}"
40763         if test "x$tool_basename" = "x$tool_specified"; then
40764           # A command without a complete path is provided, search $PATH.
40765           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40766 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40767           # Extract the first word of "$tool_basename", so it can be a program name with args.
40768 set dummy $tool_basename; ac_word=$2
40769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40770 $as_echo_n "checking for $ac_word... " >&6; }
40771 if ${ac_cv_path_STRIP+:} false; then :
40772   $as_echo_n "(cached) " >&6
40773 else
40774   case $STRIP in
40775   [\\/]* | ?:[\\/]*)
40776   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40777   ;;
40778   *)
40779   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40780 for as_dir in $PATH
40781 do
40782   IFS=$as_save_IFS
40783   test -z "$as_dir" && as_dir=.
40784     for ac_exec_ext in '' $ac_executable_extensions; do
40785   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40786     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40787     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40788     break 2
40789   fi
40790 done
40791   done
40792 IFS=$as_save_IFS
40793 
40794   ;;
40795 esac
40796 fi
40797 STRIP=$ac_cv_path_STRIP
40798 if test -n "$STRIP"; then
40799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40800 $as_echo "$STRIP" >&6; }
40801 else
40802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40803 $as_echo "no" >&6; }
40804 fi
40805 
40806 
40807           if test "x$STRIP" = x; then
40808             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40809           fi
40810         else
40811           # Otherwise we believe it is a complete path. Use it as it is.
40812           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40813 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40814           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40815 $as_echo_n "checking for STRIP... " >&6; }
40816           if test ! -x "$tool_specified"; then
40817             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40818 $as_echo "not found" >&6; }
40819             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40820           fi
40821           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40822 $as_echo "$tool_specified" >&6; }
40823         fi
40824       fi
40825     fi
40826 
40827   fi
40828 
40829 
40830 
40831   # Only process if variable expands to non-empty
40832 
40833   if test "x$STRIP" != x; then
40834     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40835 
40836   # First separate the path from the arguments. This will split at the first
40837   # space.
40838   complete="$STRIP"
40839   path="${complete%% *}"
40840   tmp="$complete EOL"
40841   arguments="${tmp#* }"
40842 
40843   # Input might be given as Windows format, start by converting to
40844   # unix format.
40845   new_path=`$CYGPATH -u "$path"`
40846 
40847   # Now try to locate executable using which
40848   new_path=`$WHICH "$new_path" 2> /dev/null`
40849   # bat and cmd files are not always considered executable in cygwin causing which
40850   # to not find them
40851   if test "x$new_path" = x \
40852       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40853       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40854     new_path=`$CYGPATH -u "$path"`
40855   fi
40856   if test "x$new_path" = x; then
40857     # Oops. Which didn't find the executable.
40858     # The splitting of arguments from the executable at a space might have been incorrect,
40859     # since paths with space are more likely in Windows. Give it another try with the whole
40860     # argument.
40861     path="$complete"
40862     arguments="EOL"
40863     new_path=`$CYGPATH -u "$path"`
40864     new_path=`$WHICH "$new_path" 2> /dev/null`
40865     # bat and cmd files are not always considered executable in cygwin causing which
40866     # to not find them
40867     if test "x$new_path" = x \
40868         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40869         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40870       new_path=`$CYGPATH -u "$path"`
40871     fi
40872     if test "x$new_path" = x; then
40873       # It's still not found. Now this is an unrecoverable error.
40874       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40875 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40876       has_space=`$ECHO "$complete" | $GREP " "`
40877       if test "x$has_space" != x; then
40878         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40879 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40880       fi
40881       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40882     fi
40883   fi
40884 
40885   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40886   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40887   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40888   # "foo.exe" is OK but "foo" is an error.
40889   #
40890   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40891   # It is also a way to make sure we got the proper file name for the real test later on.
40892   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40893   if test "x$test_shortpath" = x; then
40894     # Short path failed, file does not exist as specified.
40895     # Try adding .exe or .cmd
40896     if test -f "${new_path}.exe"; then
40897       input_to_shortpath="${new_path}.exe"
40898     elif test -f "${new_path}.cmd"; then
40899       input_to_shortpath="${new_path}.cmd"
40900     else
40901       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40902 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40903       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40904 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40905       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40906     fi
40907   else
40908     input_to_shortpath="$new_path"
40909   fi
40910 
40911   # Call helper function which possibly converts this using DOS-style short mode.
40912   # If so, the updated path is stored in $new_path.
40913   new_path="$input_to_shortpath"
40914 
40915   input_path="$input_to_shortpath"
40916   # Check if we need to convert this using DOS-style short mode. If the path
40917   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40918   # take no chances and rewrite it.
40919   # Note: m4 eats our [], so we need to use [ and ] instead.
40920   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40921   if test "x$has_forbidden_chars" != x; then
40922     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40923     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40924     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40925     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40926       # Going to short mode and back again did indeed matter. Since short mode is
40927       # case insensitive, let's make it lowercase to improve readability.
40928       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40929       # Now convert it back to Unix-style (cygpath)
40930       input_path=`$CYGPATH -u "$shortmode_path"`
40931       new_path="$input_path"
40932     fi
40933   fi
40934 
40935   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40936   if test "x$test_cygdrive_prefix" = x; then
40937     # As a simple fix, exclude /usr/bin since it's not a real path.
40938     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40939       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40940       # a path prefixed by /cygdrive for fixpath to work.
40941       new_path="$CYGWIN_ROOT_PATH$input_path"
40942     fi
40943   fi
40944 
40945   # remove trailing .exe if any
40946   new_path="${new_path/%.exe/}"
40947 
40948     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40949 
40950   # First separate the path from the arguments. This will split at the first
40951   # space.
40952   complete="$STRIP"
40953   path="${complete%% *}"
40954   tmp="$complete EOL"
40955   arguments="${tmp#* }"
40956 
40957   # Input might be given as Windows format, start by converting to
40958   # unix format.
40959   new_path="$path"
40960 
40961   windows_path="$new_path"
40962   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40963     unix_path=`$CYGPATH -u "$windows_path"`
40964     new_path="$unix_path"
40965   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40966     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40967     new_path="$unix_path"
40968   fi
40969 
40970 
40971   # Now try to locate executable using which
40972   new_path=`$WHICH "$new_path" 2> /dev/null`
40973 
40974   if test "x$new_path" = x; then
40975     # Oops. Which didn't find the executable.
40976     # The splitting of arguments from the executable at a space might have been incorrect,
40977     # since paths with space are more likely in Windows. Give it another try with the whole
40978     # argument.
40979     path="$complete"
40980     arguments="EOL"
40981     new_path="$path"
40982 
40983   windows_path="$new_path"
40984   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40985     unix_path=`$CYGPATH -u "$windows_path"`
40986     new_path="$unix_path"
40987   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40988     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40989     new_path="$unix_path"
40990   fi
40991 
40992 
40993     new_path=`$WHICH "$new_path" 2> /dev/null`
40994     # bat and cmd files are not always considered executable in MSYS causing which
40995     # to not find them
40996     if test "x$new_path" = x \
40997         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40998         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40999       new_path="$path"
41000 
41001   windows_path="$new_path"
41002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41003     unix_path=`$CYGPATH -u "$windows_path"`
41004     new_path="$unix_path"
41005   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41006     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41007     new_path="$unix_path"
41008   fi
41009 
41010     fi
41011 
41012     if test "x$new_path" = x; then
41013       # It's still not found. Now this is an unrecoverable error.
41014       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41015 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41016       has_space=`$ECHO "$complete" | $GREP " "`
41017       if test "x$has_space" != x; then
41018         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41019 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41020       fi
41021       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41022     fi
41023   fi
41024 
41025   # Now new_path has a complete unix path to the binary
41026   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41027     # Keep paths in /bin as-is, but remove trailing .exe if any
41028     new_path="${new_path/%.exe/}"
41029     # Do not save /bin paths to all_fixpath_prefixes!
41030   else
41031     # Not in mixed or Windows style, start by that.
41032     new_path=`cmd //c echo $new_path`
41033 
41034   input_path="$new_path"
41035   # Check if we need to convert this using DOS-style short mode. If the path
41036   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41037   # take no chances and rewrite it.
41038   # Note: m4 eats our [], so we need to use [ and ] instead.
41039   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41040   if test "x$has_forbidden_chars" != x; then
41041     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41042     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41043   fi
41044 
41045     # Output is in $new_path
41046 
41047   windows_path="$new_path"
41048   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41049     unix_path=`$CYGPATH -u "$windows_path"`
41050     new_path="$unix_path"
41051   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41052     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41053     new_path="$unix_path"
41054   fi
41055 
41056     # remove trailing .exe if any
41057     new_path="${new_path/%.exe/}"
41058 
41059     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41060     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41061   fi
41062 
41063     else
41064       # We're on a unix platform. Hooray! :)
41065       # First separate the path from the arguments. This will split at the first
41066       # space.
41067       complete="$STRIP"
41068       path="${complete%% *}"
41069       tmp="$complete EOL"
41070       arguments="${tmp#* }"
41071 
41072       # Cannot rely on the command "which" here since it doesn't always work.
41073       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41074       if test -z "$is_absolute_path"; then
41075         # Path to executable is not absolute. Find it.
41076         IFS_save="$IFS"
41077         IFS=:
41078         for p in $PATH; do
41079           if test -f "$p/$path" && test -x "$p/$path"; then
41080             new_path="$p/$path"
41081             break
41082           fi
41083         done
41084         IFS="$IFS_save"
41085       else
41086         # This is an absolute path, we can use it without further modifications.
41087         new_path="$path"
41088       fi
41089 
41090       if test "x$new_path" = x; then
41091         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41092 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41093         has_space=`$ECHO "$complete" | $GREP " "`
41094         if test "x$has_space" != x; then
41095           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41096 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41097         fi
41098         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41099       fi
41100     fi
41101 
41102     # Now join together the path and the arguments once again
41103     if test "x$arguments" != xEOL; then
41104       new_complete="$new_path ${arguments% *}"
41105     else
41106       new_complete="$new_path"
41107     fi
41108 
41109     if test "x$complete" != "x$new_complete"; then
41110       STRIP="$new_complete"
41111       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41112 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41113     fi
41114   fi
41115 
41116     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41117 
41118 
41119   # Publish this variable in the help.
41120 
41121 
41122   if [ -z "${NM+x}" ]; then
41123     # The variable is not set by user, try to locate tool using the code snippet
41124     if test -n "$ac_tool_prefix"; then
41125   for ac_prog in nm gcc-nm
41126   do
41127     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41128 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41130 $as_echo_n "checking for $ac_word... " >&6; }
41131 if ${ac_cv_prog_NM+:} false; then :
41132   $as_echo_n "(cached) " >&6
41133 else
41134   if test -n "$NM"; then
41135   ac_cv_prog_NM="$NM" # Let the user override the test.
41136 else
41137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41138 for as_dir in $PATH
41139 do
41140   IFS=$as_save_IFS
41141   test -z "$as_dir" && as_dir=.
41142     for ac_exec_ext in '' $ac_executable_extensions; do
41143   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41144     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41145     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41146     break 2
41147   fi
41148 done
41149   done
41150 IFS=$as_save_IFS
41151 
41152 fi
41153 fi
41154 NM=$ac_cv_prog_NM
41155 if test -n "$NM"; then
41156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41157 $as_echo "$NM" >&6; }
41158 else
41159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41160 $as_echo "no" >&6; }
41161 fi
41162 
41163 
41164     test -n "$NM" && break
41165   done
41166 fi
41167 if test -z "$NM"; then
41168   ac_ct_NM=$NM
41169   for ac_prog in nm gcc-nm
41170 do
41171   # Extract the first word of "$ac_prog", so it can be a program name with args.
41172 set dummy $ac_prog; ac_word=$2
41173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41174 $as_echo_n "checking for $ac_word... " >&6; }
41175 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41176   $as_echo_n "(cached) " >&6
41177 else
41178   if test -n "$ac_ct_NM"; then
41179   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41180 else
41181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41182 for as_dir in $PATH
41183 do
41184   IFS=$as_save_IFS
41185   test -z "$as_dir" && as_dir=.
41186     for ac_exec_ext in '' $ac_executable_extensions; do
41187   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41188     ac_cv_prog_ac_ct_NM="$ac_prog"
41189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41190     break 2
41191   fi
41192 done
41193   done
41194 IFS=$as_save_IFS
41195 
41196 fi
41197 fi
41198 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41199 if test -n "$ac_ct_NM"; then
41200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41201 $as_echo "$ac_ct_NM" >&6; }
41202 else
41203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41204 $as_echo "no" >&6; }
41205 fi
41206 
41207 
41208   test -n "$ac_ct_NM" && break
41209 done
41210 
41211   if test "x$ac_ct_NM" = x; then
41212     NM=""
41213   else
41214     case $cross_compiling:$ac_tool_warned in
41215 yes:)
41216 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41217 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41218 ac_tool_warned=yes ;;
41219 esac
41220     NM=$ac_ct_NM
41221   fi
41222 fi
41223 
41224   else
41225     # The variable is set, but is it from the command line or the environment?
41226 
41227     # Try to remove the string !NM! from our list.
41228     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41229     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41230       # If it failed, the variable was not from the command line. Ignore it,
41231       # but warn the user (except for BASH, which is always set by the calling BASH).
41232       if test "xNM" != xBASH; then
41233         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41234 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41235       fi
41236       # Try to locate tool using the code snippet
41237       if test -n "$ac_tool_prefix"; then
41238   for ac_prog in nm gcc-nm
41239   do
41240     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41241 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41243 $as_echo_n "checking for $ac_word... " >&6; }
41244 if ${ac_cv_prog_NM+:} false; then :
41245   $as_echo_n "(cached) " >&6
41246 else
41247   if test -n "$NM"; then
41248   ac_cv_prog_NM="$NM" # Let the user override the test.
41249 else
41250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41251 for as_dir in $PATH
41252 do
41253   IFS=$as_save_IFS
41254   test -z "$as_dir" && as_dir=.
41255     for ac_exec_ext in '' $ac_executable_extensions; do
41256   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41257     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41258     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41259     break 2
41260   fi
41261 done
41262   done
41263 IFS=$as_save_IFS
41264 
41265 fi
41266 fi
41267 NM=$ac_cv_prog_NM
41268 if test -n "$NM"; then
41269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41270 $as_echo "$NM" >&6; }
41271 else
41272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41273 $as_echo "no" >&6; }
41274 fi
41275 
41276 
41277     test -n "$NM" && break
41278   done
41279 fi
41280 if test -z "$NM"; then
41281   ac_ct_NM=$NM
41282   for ac_prog in nm gcc-nm
41283 do
41284   # Extract the first word of "$ac_prog", so it can be a program name with args.
41285 set dummy $ac_prog; ac_word=$2
41286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41287 $as_echo_n "checking for $ac_word... " >&6; }
41288 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41289   $as_echo_n "(cached) " >&6
41290 else
41291   if test -n "$ac_ct_NM"; then
41292   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41293 else
41294 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41295 for as_dir in $PATH
41296 do
41297   IFS=$as_save_IFS
41298   test -z "$as_dir" && as_dir=.
41299     for ac_exec_ext in '' $ac_executable_extensions; do
41300   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41301     ac_cv_prog_ac_ct_NM="$ac_prog"
41302     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41303     break 2
41304   fi
41305 done
41306   done
41307 IFS=$as_save_IFS
41308 
41309 fi
41310 fi
41311 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41312 if test -n "$ac_ct_NM"; then
41313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41314 $as_echo "$ac_ct_NM" >&6; }
41315 else
41316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41317 $as_echo "no" >&6; }
41318 fi
41319 
41320 
41321   test -n "$ac_ct_NM" && break
41322 done
41323 
41324   if test "x$ac_ct_NM" = x; then
41325     NM=""
41326   else
41327     case $cross_compiling:$ac_tool_warned in
41328 yes:)
41329 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41330 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41331 ac_tool_warned=yes ;;
41332 esac
41333     NM=$ac_ct_NM
41334   fi
41335 fi
41336 
41337     else
41338       # If it succeeded, then it was overridden by the user. We will use it
41339       # for the tool.
41340 
41341       # First remove it from the list of overridden variables, so we can test
41342       # for unknown variables in the end.
41343       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41344 
41345       # Check if we try to supply an empty value
41346       if test "x$NM" = x; then
41347         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41348 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41349         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41350 $as_echo_n "checking for NM... " >&6; }
41351         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41352 $as_echo "disabled" >&6; }
41353       else
41354         # Check if the provided tool contains a complete path.
41355         tool_specified="$NM"
41356         tool_basename="${tool_specified##*/}"
41357         if test "x$tool_basename" = "x$tool_specified"; then
41358           # A command without a complete path is provided, search $PATH.
41359           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41360 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41361           # Extract the first word of "$tool_basename", so it can be a program name with args.
41362 set dummy $tool_basename; ac_word=$2
41363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41364 $as_echo_n "checking for $ac_word... " >&6; }
41365 if ${ac_cv_path_NM+:} false; then :
41366   $as_echo_n "(cached) " >&6
41367 else
41368   case $NM in
41369   [\\/]* | ?:[\\/]*)
41370   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41371   ;;
41372   *)
41373   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41374 for as_dir in $PATH
41375 do
41376   IFS=$as_save_IFS
41377   test -z "$as_dir" && as_dir=.
41378     for ac_exec_ext in '' $ac_executable_extensions; do
41379   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41380     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41381     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41382     break 2
41383   fi
41384 done
41385   done
41386 IFS=$as_save_IFS
41387 
41388   ;;
41389 esac
41390 fi
41391 NM=$ac_cv_path_NM
41392 if test -n "$NM"; then
41393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41394 $as_echo "$NM" >&6; }
41395 else
41396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41397 $as_echo "no" >&6; }
41398 fi
41399 
41400 
41401           if test "x$NM" = x; then
41402             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41403           fi
41404         else
41405           # Otherwise we believe it is a complete path. Use it as it is.
41406           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41407 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41408           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41409 $as_echo_n "checking for NM... " >&6; }
41410           if test ! -x "$tool_specified"; then
41411             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41412 $as_echo "not found" >&6; }
41413             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41414           fi
41415           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41416 $as_echo "$tool_specified" >&6; }
41417         fi
41418       fi
41419     fi
41420 
41421   fi
41422 
41423 
41424     else
41425 
41426 
41427   # Publish this variable in the help.
41428 
41429 
41430   if [ -z "${NM+x}" ]; then
41431     # The variable is not set by user, try to locate tool using the code snippet
41432     if test -n "$ac_tool_prefix"; then
41433   for ac_prog in nm
41434   do
41435     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41436 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41438 $as_echo_n "checking for $ac_word... " >&6; }
41439 if ${ac_cv_prog_NM+:} false; then :
41440   $as_echo_n "(cached) " >&6
41441 else
41442   if test -n "$NM"; then
41443   ac_cv_prog_NM="$NM" # Let the user override the test.
41444 else
41445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41446 for as_dir in $PATH
41447 do
41448   IFS=$as_save_IFS
41449   test -z "$as_dir" && as_dir=.
41450     for ac_exec_ext in '' $ac_executable_extensions; do
41451   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41452     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41454     break 2
41455   fi
41456 done
41457   done
41458 IFS=$as_save_IFS
41459 
41460 fi
41461 fi
41462 NM=$ac_cv_prog_NM
41463 if test -n "$NM"; then
41464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41465 $as_echo "$NM" >&6; }
41466 else
41467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41468 $as_echo "no" >&6; }
41469 fi
41470 
41471 
41472     test -n "$NM" && break
41473   done
41474 fi
41475 if test -z "$NM"; then
41476   ac_ct_NM=$NM
41477   for ac_prog in nm
41478 do
41479   # Extract the first word of "$ac_prog", so it can be a program name with args.
41480 set dummy $ac_prog; ac_word=$2
41481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41482 $as_echo_n "checking for $ac_word... " >&6; }
41483 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41484   $as_echo_n "(cached) " >&6
41485 else
41486   if test -n "$ac_ct_NM"; then
41487   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41488 else
41489 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41490 for as_dir in $PATH
41491 do
41492   IFS=$as_save_IFS
41493   test -z "$as_dir" && as_dir=.
41494     for ac_exec_ext in '' $ac_executable_extensions; do
41495   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41496     ac_cv_prog_ac_ct_NM="$ac_prog"
41497     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41498     break 2
41499   fi
41500 done
41501   done
41502 IFS=$as_save_IFS
41503 
41504 fi
41505 fi
41506 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41507 if test -n "$ac_ct_NM"; then
41508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41509 $as_echo "$ac_ct_NM" >&6; }
41510 else
41511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41512 $as_echo "no" >&6; }
41513 fi
41514 
41515 
41516   test -n "$ac_ct_NM" && break
41517 done
41518 
41519   if test "x$ac_ct_NM" = x; then
41520     NM=""
41521   else
41522     case $cross_compiling:$ac_tool_warned in
41523 yes:)
41524 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41525 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41526 ac_tool_warned=yes ;;
41527 esac
41528     NM=$ac_ct_NM
41529   fi
41530 fi
41531 
41532   else
41533     # The variable is set, but is it from the command line or the environment?
41534 
41535     # Try to remove the string !NM! from our list.
41536     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41537     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41538       # If it failed, the variable was not from the command line. Ignore it,
41539       # but warn the user (except for BASH, which is always set by the calling BASH).
41540       if test "xNM" != xBASH; then
41541         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41542 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41543       fi
41544       # Try to locate tool using the code snippet
41545       if test -n "$ac_tool_prefix"; then
41546   for ac_prog in nm
41547   do
41548     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41549 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41551 $as_echo_n "checking for $ac_word... " >&6; }
41552 if ${ac_cv_prog_NM+:} false; then :
41553   $as_echo_n "(cached) " >&6
41554 else
41555   if test -n "$NM"; then
41556   ac_cv_prog_NM="$NM" # Let the user override the test.
41557 else
41558 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41559 for as_dir in $PATH
41560 do
41561   IFS=$as_save_IFS
41562   test -z "$as_dir" && as_dir=.
41563     for ac_exec_ext in '' $ac_executable_extensions; do
41564   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41565     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41566     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41567     break 2
41568   fi
41569 done
41570   done
41571 IFS=$as_save_IFS
41572 
41573 fi
41574 fi
41575 NM=$ac_cv_prog_NM
41576 if test -n "$NM"; then
41577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41578 $as_echo "$NM" >&6; }
41579 else
41580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41581 $as_echo "no" >&6; }
41582 fi
41583 
41584 
41585     test -n "$NM" && break
41586   done
41587 fi
41588 if test -z "$NM"; then
41589   ac_ct_NM=$NM
41590   for ac_prog in nm
41591 do
41592   # Extract the first word of "$ac_prog", so it can be a program name with args.
41593 set dummy $ac_prog; ac_word=$2
41594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41595 $as_echo_n "checking for $ac_word... " >&6; }
41596 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41597   $as_echo_n "(cached) " >&6
41598 else
41599   if test -n "$ac_ct_NM"; then
41600   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41601 else
41602 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41603 for as_dir in $PATH
41604 do
41605   IFS=$as_save_IFS
41606   test -z "$as_dir" && as_dir=.
41607     for ac_exec_ext in '' $ac_executable_extensions; do
41608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41609     ac_cv_prog_ac_ct_NM="$ac_prog"
41610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41611     break 2
41612   fi
41613 done
41614   done
41615 IFS=$as_save_IFS
41616 
41617 fi
41618 fi
41619 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41620 if test -n "$ac_ct_NM"; then
41621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41622 $as_echo "$ac_ct_NM" >&6; }
41623 else
41624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41625 $as_echo "no" >&6; }
41626 fi
41627 
41628 
41629   test -n "$ac_ct_NM" && break
41630 done
41631 
41632   if test "x$ac_ct_NM" = x; then
41633     NM=""
41634   else
41635     case $cross_compiling:$ac_tool_warned in
41636 yes:)
41637 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41638 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41639 ac_tool_warned=yes ;;
41640 esac
41641     NM=$ac_ct_NM
41642   fi
41643 fi
41644 
41645     else
41646       # If it succeeded, then it was overridden by the user. We will use it
41647       # for the tool.
41648 
41649       # First remove it from the list of overridden variables, so we can test
41650       # for unknown variables in the end.
41651       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41652 
41653       # Check if we try to supply an empty value
41654       if test "x$NM" = x; then
41655         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41656 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41657         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41658 $as_echo_n "checking for NM... " >&6; }
41659         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41660 $as_echo "disabled" >&6; }
41661       else
41662         # Check if the provided tool contains a complete path.
41663         tool_specified="$NM"
41664         tool_basename="${tool_specified##*/}"
41665         if test "x$tool_basename" = "x$tool_specified"; then
41666           # A command without a complete path is provided, search $PATH.
41667           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41668 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41669           # Extract the first word of "$tool_basename", so it can be a program name with args.
41670 set dummy $tool_basename; ac_word=$2
41671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41672 $as_echo_n "checking for $ac_word... " >&6; }
41673 if ${ac_cv_path_NM+:} false; then :
41674   $as_echo_n "(cached) " >&6
41675 else
41676   case $NM in
41677   [\\/]* | ?:[\\/]*)
41678   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41679   ;;
41680   *)
41681   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41682 for as_dir in $PATH
41683 do
41684   IFS=$as_save_IFS
41685   test -z "$as_dir" && as_dir=.
41686     for ac_exec_ext in '' $ac_executable_extensions; do
41687   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41688     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41689     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41690     break 2
41691   fi
41692 done
41693   done
41694 IFS=$as_save_IFS
41695 
41696   ;;
41697 esac
41698 fi
41699 NM=$ac_cv_path_NM
41700 if test -n "$NM"; then
41701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41702 $as_echo "$NM" >&6; }
41703 else
41704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41705 $as_echo "no" >&6; }
41706 fi
41707 
41708 
41709           if test "x$NM" = x; then
41710             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41711           fi
41712         else
41713           # Otherwise we believe it is a complete path. Use it as it is.
41714           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41715 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41716           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41717 $as_echo_n "checking for NM... " >&6; }
41718           if test ! -x "$tool_specified"; then
41719             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41720 $as_echo "not found" >&6; }
41721             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41722           fi
41723           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41724 $as_echo "$tool_specified" >&6; }
41725         fi
41726       fi
41727     fi
41728 
41729   fi
41730 
41731 
41732     fi
41733 
41734   # Only process if variable expands to non-empty
41735 
41736   if test "x$NM" != x; then
41737     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41738 
41739   # First separate the path from the arguments. This will split at the first
41740   # space.
41741   complete="$NM"
41742   path="${complete%% *}"
41743   tmp="$complete EOL"
41744   arguments="${tmp#* }"
41745 
41746   # Input might be given as Windows format, start by converting to
41747   # unix format.
41748   new_path=`$CYGPATH -u "$path"`
41749 
41750   # Now try to locate executable using which
41751   new_path=`$WHICH "$new_path" 2> /dev/null`
41752   # bat and cmd files are not always considered executable in cygwin causing which
41753   # to not find them
41754   if test "x$new_path" = x \
41755       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41756       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41757     new_path=`$CYGPATH -u "$path"`
41758   fi
41759   if test "x$new_path" = x; then
41760     # Oops. Which didn't find the executable.
41761     # The splitting of arguments from the executable at a space might have been incorrect,
41762     # since paths with space are more likely in Windows. Give it another try with the whole
41763     # argument.
41764     path="$complete"
41765     arguments="EOL"
41766     new_path=`$CYGPATH -u "$path"`
41767     new_path=`$WHICH "$new_path" 2> /dev/null`
41768     # bat and cmd files are not always considered executable in cygwin causing which
41769     # to not find them
41770     if test "x$new_path" = x \
41771         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41772         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41773       new_path=`$CYGPATH -u "$path"`
41774     fi
41775     if test "x$new_path" = x; then
41776       # It's still not found. Now this is an unrecoverable error.
41777       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41778 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41779       has_space=`$ECHO "$complete" | $GREP " "`
41780       if test "x$has_space" != x; then
41781         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41782 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41783       fi
41784       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41785     fi
41786   fi
41787 
41788   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41789   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41790   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41791   # "foo.exe" is OK but "foo" is an error.
41792   #
41793   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41794   # It is also a way to make sure we got the proper file name for the real test later on.
41795   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41796   if test "x$test_shortpath" = x; then
41797     # Short path failed, file does not exist as specified.
41798     # Try adding .exe or .cmd
41799     if test -f "${new_path}.exe"; then
41800       input_to_shortpath="${new_path}.exe"
41801     elif test -f "${new_path}.cmd"; then
41802       input_to_shortpath="${new_path}.cmd"
41803     else
41804       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41805 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41806       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41807 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41808       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41809     fi
41810   else
41811     input_to_shortpath="$new_path"
41812   fi
41813 
41814   # Call helper function which possibly converts this using DOS-style short mode.
41815   # If so, the updated path is stored in $new_path.
41816   new_path="$input_to_shortpath"
41817 
41818   input_path="$input_to_shortpath"
41819   # Check if we need to convert this using DOS-style short mode. If the path
41820   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41821   # take no chances and rewrite it.
41822   # Note: m4 eats our [], so we need to use [ and ] instead.
41823   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41824   if test "x$has_forbidden_chars" != x; then
41825     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41826     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41827     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41828     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41829       # Going to short mode and back again did indeed matter. Since short mode is
41830       # case insensitive, let's make it lowercase to improve readability.
41831       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41832       # Now convert it back to Unix-style (cygpath)
41833       input_path=`$CYGPATH -u "$shortmode_path"`
41834       new_path="$input_path"
41835     fi
41836   fi
41837 
41838   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41839   if test "x$test_cygdrive_prefix" = x; then
41840     # As a simple fix, exclude /usr/bin since it's not a real path.
41841     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41842       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41843       # a path prefixed by /cygdrive for fixpath to work.
41844       new_path="$CYGWIN_ROOT_PATH$input_path"
41845     fi
41846   fi
41847 
41848   # remove trailing .exe if any
41849   new_path="${new_path/%.exe/}"
41850 
41851     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41852 
41853   # First separate the path from the arguments. This will split at the first
41854   # space.
41855   complete="$NM"
41856   path="${complete%% *}"
41857   tmp="$complete EOL"
41858   arguments="${tmp#* }"
41859 
41860   # Input might be given as Windows format, start by converting to
41861   # unix format.
41862   new_path="$path"
41863 
41864   windows_path="$new_path"
41865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41866     unix_path=`$CYGPATH -u "$windows_path"`
41867     new_path="$unix_path"
41868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41869     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41870     new_path="$unix_path"
41871   fi
41872 
41873 
41874   # Now try to locate executable using which
41875   new_path=`$WHICH "$new_path" 2> /dev/null`
41876 
41877   if test "x$new_path" = x; then
41878     # Oops. Which didn't find the executable.
41879     # The splitting of arguments from the executable at a space might have been incorrect,
41880     # since paths with space are more likely in Windows. Give it another try with the whole
41881     # argument.
41882     path="$complete"
41883     arguments="EOL"
41884     new_path="$path"
41885 
41886   windows_path="$new_path"
41887   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41888     unix_path=`$CYGPATH -u "$windows_path"`
41889     new_path="$unix_path"
41890   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41891     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41892     new_path="$unix_path"
41893   fi
41894 
41895 
41896     new_path=`$WHICH "$new_path" 2> /dev/null`
41897     # bat and cmd files are not always considered executable in MSYS causing which
41898     # to not find them
41899     if test "x$new_path" = x \
41900         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41901         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41902       new_path="$path"
41903 
41904   windows_path="$new_path"
41905   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41906     unix_path=`$CYGPATH -u "$windows_path"`
41907     new_path="$unix_path"
41908   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41909     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41910     new_path="$unix_path"
41911   fi
41912 
41913     fi
41914 
41915     if test "x$new_path" = x; then
41916       # It's still not found. Now this is an unrecoverable error.
41917       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41918 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41919       has_space=`$ECHO "$complete" | $GREP " "`
41920       if test "x$has_space" != x; then
41921         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41922 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41923       fi
41924       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41925     fi
41926   fi
41927 
41928   # Now new_path has a complete unix path to the binary
41929   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41930     # Keep paths in /bin as-is, but remove trailing .exe if any
41931     new_path="${new_path/%.exe/}"
41932     # Do not save /bin paths to all_fixpath_prefixes!
41933   else
41934     # Not in mixed or Windows style, start by that.
41935     new_path=`cmd //c echo $new_path`
41936 
41937   input_path="$new_path"
41938   # Check if we need to convert this using DOS-style short mode. If the path
41939   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41940   # take no chances and rewrite it.
41941   # Note: m4 eats our [], so we need to use [ and ] instead.
41942   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41943   if test "x$has_forbidden_chars" != x; then
41944     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41945     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41946   fi
41947 
41948     # Output is in $new_path
41949 
41950   windows_path="$new_path"
41951   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41952     unix_path=`$CYGPATH -u "$windows_path"`
41953     new_path="$unix_path"
41954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41955     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41956     new_path="$unix_path"
41957   fi
41958 
41959     # remove trailing .exe if any
41960     new_path="${new_path/%.exe/}"
41961 
41962     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41963     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41964   fi
41965 
41966     else
41967       # We're on a unix platform. Hooray! :)
41968       # First separate the path from the arguments. This will split at the first
41969       # space.
41970       complete="$NM"
41971       path="${complete%% *}"
41972       tmp="$complete EOL"
41973       arguments="${tmp#* }"
41974 
41975       # Cannot rely on the command "which" here since it doesn't always work.
41976       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41977       if test -z "$is_absolute_path"; then
41978         # Path to executable is not absolute. Find it.
41979         IFS_save="$IFS"
41980         IFS=:
41981         for p in $PATH; do
41982           if test -f "$p/$path" && test -x "$p/$path"; then
41983             new_path="$p/$path"
41984             break
41985           fi
41986         done
41987         IFS="$IFS_save"
41988       else
41989         # This is an absolute path, we can use it without further modifications.
41990         new_path="$path"
41991       fi
41992 
41993       if test "x$new_path" = x; then
41994         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41995 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41996         has_space=`$ECHO "$complete" | $GREP " "`
41997         if test "x$has_space" != x; then
41998           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41999 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42000         fi
42001         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42002       fi
42003     fi
42004 
42005     # Now join together the path and the arguments once again
42006     if test "x$arguments" != xEOL; then
42007       new_complete="$new_path ${arguments% *}"
42008     else
42009       new_complete="$new_path"
42010     fi
42011 
42012     if test "x$complete" != "x$new_complete"; then
42013       NM="$new_complete"
42014       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42015 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42016     fi
42017   fi
42018 
42019     GNM="$NM"
42020 
42021   fi
42022 
42023   # objcopy is used for moving debug symbols to separate files when
42024   # full debug symbols are enabled.
42025   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42026 
42027 
42028   # Publish this variable in the help.
42029 
42030 
42031   if [ -z "${OBJCOPY+x}" ]; then
42032     # The variable is not set by user, try to locate tool using the code snippet
42033     if test -n "$ac_tool_prefix"; then
42034   for ac_prog in gobjcopy objcopy
42035   do
42036     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42037 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42039 $as_echo_n "checking for $ac_word... " >&6; }
42040 if ${ac_cv_prog_OBJCOPY+:} false; then :
42041   $as_echo_n "(cached) " >&6
42042 else
42043   if test -n "$OBJCOPY"; then
42044   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42045 else
42046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42047 for as_dir in $PATH
42048 do
42049   IFS=$as_save_IFS
42050   test -z "$as_dir" && as_dir=.
42051     for ac_exec_ext in '' $ac_executable_extensions; do
42052   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42053     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42054     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42055     break 2
42056   fi
42057 done
42058   done
42059 IFS=$as_save_IFS
42060 
42061 fi
42062 fi
42063 OBJCOPY=$ac_cv_prog_OBJCOPY
42064 if test -n "$OBJCOPY"; then
42065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42066 $as_echo "$OBJCOPY" >&6; }
42067 else
42068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42069 $as_echo "no" >&6; }
42070 fi
42071 
42072 
42073     test -n "$OBJCOPY" && break
42074   done
42075 fi
42076 if test -z "$OBJCOPY"; then
42077   ac_ct_OBJCOPY=$OBJCOPY
42078   for ac_prog in gobjcopy objcopy
42079 do
42080   # Extract the first word of "$ac_prog", so it can be a program name with args.
42081 set dummy $ac_prog; ac_word=$2
42082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42083 $as_echo_n "checking for $ac_word... " >&6; }
42084 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42085   $as_echo_n "(cached) " >&6
42086 else
42087   if test -n "$ac_ct_OBJCOPY"; then
42088   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42089 else
42090 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42091 for as_dir in $PATH
42092 do
42093   IFS=$as_save_IFS
42094   test -z "$as_dir" && as_dir=.
42095     for ac_exec_ext in '' $ac_executable_extensions; do
42096   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42097     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42098     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42099     break 2
42100   fi
42101 done
42102   done
42103 IFS=$as_save_IFS
42104 
42105 fi
42106 fi
42107 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42108 if test -n "$ac_ct_OBJCOPY"; then
42109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42110 $as_echo "$ac_ct_OBJCOPY" >&6; }
42111 else
42112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42113 $as_echo "no" >&6; }
42114 fi
42115 
42116 
42117   test -n "$ac_ct_OBJCOPY" && break
42118 done
42119 
42120   if test "x$ac_ct_OBJCOPY" = x; then
42121     OBJCOPY=""
42122   else
42123     case $cross_compiling:$ac_tool_warned in
42124 yes:)
42125 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42126 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42127 ac_tool_warned=yes ;;
42128 esac
42129     OBJCOPY=$ac_ct_OBJCOPY
42130   fi
42131 fi
42132 
42133   else
42134     # The variable is set, but is it from the command line or the environment?
42135 
42136     # Try to remove the string !OBJCOPY! from our list.
42137     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42138     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42139       # If it failed, the variable was not from the command line. Ignore it,
42140       # but warn the user (except for BASH, which is always set by the calling BASH).
42141       if test "xOBJCOPY" != xBASH; then
42142         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42143 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42144       fi
42145       # Try to locate tool using the code snippet
42146       if test -n "$ac_tool_prefix"; then
42147   for ac_prog in gobjcopy objcopy
42148   do
42149     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42150 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42152 $as_echo_n "checking for $ac_word... " >&6; }
42153 if ${ac_cv_prog_OBJCOPY+:} false; then :
42154   $as_echo_n "(cached) " >&6
42155 else
42156   if test -n "$OBJCOPY"; then
42157   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42158 else
42159 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42160 for as_dir in $PATH
42161 do
42162   IFS=$as_save_IFS
42163   test -z "$as_dir" && as_dir=.
42164     for ac_exec_ext in '' $ac_executable_extensions; do
42165   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42166     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42167     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42168     break 2
42169   fi
42170 done
42171   done
42172 IFS=$as_save_IFS
42173 
42174 fi
42175 fi
42176 OBJCOPY=$ac_cv_prog_OBJCOPY
42177 if test -n "$OBJCOPY"; then
42178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42179 $as_echo "$OBJCOPY" >&6; }
42180 else
42181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42182 $as_echo "no" >&6; }
42183 fi
42184 
42185 
42186     test -n "$OBJCOPY" && break
42187   done
42188 fi
42189 if test -z "$OBJCOPY"; then
42190   ac_ct_OBJCOPY=$OBJCOPY
42191   for ac_prog in gobjcopy objcopy
42192 do
42193   # Extract the first word of "$ac_prog", so it can be a program name with args.
42194 set dummy $ac_prog; ac_word=$2
42195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42196 $as_echo_n "checking for $ac_word... " >&6; }
42197 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42198   $as_echo_n "(cached) " >&6
42199 else
42200   if test -n "$ac_ct_OBJCOPY"; then
42201   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42202 else
42203 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42204 for as_dir in $PATH
42205 do
42206   IFS=$as_save_IFS
42207   test -z "$as_dir" && as_dir=.
42208     for ac_exec_ext in '' $ac_executable_extensions; do
42209   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42210     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42211     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42212     break 2
42213   fi
42214 done
42215   done
42216 IFS=$as_save_IFS
42217 
42218 fi
42219 fi
42220 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42221 if test -n "$ac_ct_OBJCOPY"; then
42222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42223 $as_echo "$ac_ct_OBJCOPY" >&6; }
42224 else
42225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42226 $as_echo "no" >&6; }
42227 fi
42228 
42229 
42230   test -n "$ac_ct_OBJCOPY" && break
42231 done
42232 
42233   if test "x$ac_ct_OBJCOPY" = x; then
42234     OBJCOPY=""
42235   else
42236     case $cross_compiling:$ac_tool_warned in
42237 yes:)
42238 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42239 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42240 ac_tool_warned=yes ;;
42241 esac
42242     OBJCOPY=$ac_ct_OBJCOPY
42243   fi
42244 fi
42245 
42246     else
42247       # If it succeeded, then it was overridden by the user. We will use it
42248       # for the tool.
42249 
42250       # First remove it from the list of overridden variables, so we can test
42251       # for unknown variables in the end.
42252       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42253 
42254       # Check if we try to supply an empty value
42255       if test "x$OBJCOPY" = x; then
42256         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42257 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42258         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42259 $as_echo_n "checking for OBJCOPY... " >&6; }
42260         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42261 $as_echo "disabled" >&6; }
42262       else
42263         # Check if the provided tool contains a complete path.
42264         tool_specified="$OBJCOPY"
42265         tool_basename="${tool_specified##*/}"
42266         if test "x$tool_basename" = "x$tool_specified"; then
42267           # A command without a complete path is provided, search $PATH.
42268           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42269 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42270           # Extract the first word of "$tool_basename", so it can be a program name with args.
42271 set dummy $tool_basename; ac_word=$2
42272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42273 $as_echo_n "checking for $ac_word... " >&6; }
42274 if ${ac_cv_path_OBJCOPY+:} false; then :
42275   $as_echo_n "(cached) " >&6
42276 else
42277   case $OBJCOPY in
42278   [\\/]* | ?:[\\/]*)
42279   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42280   ;;
42281   *)
42282   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42283 for as_dir in $PATH
42284 do
42285   IFS=$as_save_IFS
42286   test -z "$as_dir" && as_dir=.
42287     for ac_exec_ext in '' $ac_executable_extensions; do
42288   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42289     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42290     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42291     break 2
42292   fi
42293 done
42294   done
42295 IFS=$as_save_IFS
42296 
42297   ;;
42298 esac
42299 fi
42300 OBJCOPY=$ac_cv_path_OBJCOPY
42301 if test -n "$OBJCOPY"; then
42302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42303 $as_echo "$OBJCOPY" >&6; }
42304 else
42305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42306 $as_echo "no" >&6; }
42307 fi
42308 
42309 
42310           if test "x$OBJCOPY" = x; then
42311             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42312           fi
42313         else
42314           # Otherwise we believe it is a complete path. Use it as it is.
42315           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42316 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42317           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42318 $as_echo_n "checking for OBJCOPY... " >&6; }
42319           if test ! -x "$tool_specified"; then
42320             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42321 $as_echo "not found" >&6; }
42322             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42323           fi
42324           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42325 $as_echo "$tool_specified" >&6; }
42326         fi
42327       fi
42328     fi
42329 
42330   fi
42331 
42332 
42333     # Only call fixup if objcopy was found.
42334     if test -n "$OBJCOPY"; then
42335 
42336   # Only process if variable expands to non-empty
42337 
42338   if test "x$OBJCOPY" != x; then
42339     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42340 
42341   # First separate the path from the arguments. This will split at the first
42342   # space.
42343   complete="$OBJCOPY"
42344   path="${complete%% *}"
42345   tmp="$complete EOL"
42346   arguments="${tmp#* }"
42347 
42348   # Input might be given as Windows format, start by converting to
42349   # unix format.
42350   new_path=`$CYGPATH -u "$path"`
42351 
42352   # Now try to locate executable using which
42353   new_path=`$WHICH "$new_path" 2> /dev/null`
42354   # bat and cmd files are not always considered executable in cygwin causing which
42355   # to not find them
42356   if test "x$new_path" = x \
42357       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42358       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42359     new_path=`$CYGPATH -u "$path"`
42360   fi
42361   if test "x$new_path" = x; then
42362     # Oops. Which didn't find the executable.
42363     # The splitting of arguments from the executable at a space might have been incorrect,
42364     # since paths with space are more likely in Windows. Give it another try with the whole
42365     # argument.
42366     path="$complete"
42367     arguments="EOL"
42368     new_path=`$CYGPATH -u "$path"`
42369     new_path=`$WHICH "$new_path" 2> /dev/null`
42370     # bat and cmd files are not always considered executable in cygwin causing which
42371     # to not find them
42372     if test "x$new_path" = x \
42373         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42374         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42375       new_path=`$CYGPATH -u "$path"`
42376     fi
42377     if test "x$new_path" = x; then
42378       # It's still not found. Now this is an unrecoverable error.
42379       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42380 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42381       has_space=`$ECHO "$complete" | $GREP " "`
42382       if test "x$has_space" != x; then
42383         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42384 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42385       fi
42386       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42387     fi
42388   fi
42389 
42390   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42391   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42392   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42393   # "foo.exe" is OK but "foo" is an error.
42394   #
42395   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42396   # It is also a way to make sure we got the proper file name for the real test later on.
42397   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42398   if test "x$test_shortpath" = x; then
42399     # Short path failed, file does not exist as specified.
42400     # Try adding .exe or .cmd
42401     if test -f "${new_path}.exe"; then
42402       input_to_shortpath="${new_path}.exe"
42403     elif test -f "${new_path}.cmd"; then
42404       input_to_shortpath="${new_path}.cmd"
42405     else
42406       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42407 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42408       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42409 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42410       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42411     fi
42412   else
42413     input_to_shortpath="$new_path"
42414   fi
42415 
42416   # Call helper function which possibly converts this using DOS-style short mode.
42417   # If so, the updated path is stored in $new_path.
42418   new_path="$input_to_shortpath"
42419 
42420   input_path="$input_to_shortpath"
42421   # Check if we need to convert this using DOS-style short mode. If the path
42422   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42423   # take no chances and rewrite it.
42424   # Note: m4 eats our [], so we need to use [ and ] instead.
42425   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42426   if test "x$has_forbidden_chars" != x; then
42427     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42428     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42429     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42430     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42431       # Going to short mode and back again did indeed matter. Since short mode is
42432       # case insensitive, let's make it lowercase to improve readability.
42433       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42434       # Now convert it back to Unix-style (cygpath)
42435       input_path=`$CYGPATH -u "$shortmode_path"`
42436       new_path="$input_path"
42437     fi
42438   fi
42439 
42440   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42441   if test "x$test_cygdrive_prefix" = x; then
42442     # As a simple fix, exclude /usr/bin since it's not a real path.
42443     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42444       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42445       # a path prefixed by /cygdrive for fixpath to work.
42446       new_path="$CYGWIN_ROOT_PATH$input_path"
42447     fi
42448   fi
42449 
42450   # remove trailing .exe if any
42451   new_path="${new_path/%.exe/}"
42452 
42453     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42454 
42455   # First separate the path from the arguments. This will split at the first
42456   # space.
42457   complete="$OBJCOPY"
42458   path="${complete%% *}"
42459   tmp="$complete EOL"
42460   arguments="${tmp#* }"
42461 
42462   # Input might be given as Windows format, start by converting to
42463   # unix format.
42464   new_path="$path"
42465 
42466   windows_path="$new_path"
42467   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42468     unix_path=`$CYGPATH -u "$windows_path"`
42469     new_path="$unix_path"
42470   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42471     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42472     new_path="$unix_path"
42473   fi
42474 
42475 
42476   # Now try to locate executable using which
42477   new_path=`$WHICH "$new_path" 2> /dev/null`
42478 
42479   if test "x$new_path" = x; then
42480     # Oops. Which didn't find the executable.
42481     # The splitting of arguments from the executable at a space might have been incorrect,
42482     # since paths with space are more likely in Windows. Give it another try with the whole
42483     # argument.
42484     path="$complete"
42485     arguments="EOL"
42486     new_path="$path"
42487 
42488   windows_path="$new_path"
42489   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42490     unix_path=`$CYGPATH -u "$windows_path"`
42491     new_path="$unix_path"
42492   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42493     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42494     new_path="$unix_path"
42495   fi
42496 
42497 
42498     new_path=`$WHICH "$new_path" 2> /dev/null`
42499     # bat and cmd files are not always considered executable in MSYS causing which
42500     # to not find them
42501     if test "x$new_path" = x \
42502         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42503         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42504       new_path="$path"
42505 
42506   windows_path="$new_path"
42507   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42508     unix_path=`$CYGPATH -u "$windows_path"`
42509     new_path="$unix_path"
42510   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42511     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42512     new_path="$unix_path"
42513   fi
42514 
42515     fi
42516 
42517     if test "x$new_path" = x; then
42518       # It's still not found. Now this is an unrecoverable error.
42519       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42520 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42521       has_space=`$ECHO "$complete" | $GREP " "`
42522       if test "x$has_space" != x; then
42523         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42524 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42525       fi
42526       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42527     fi
42528   fi
42529 
42530   # Now new_path has a complete unix path to the binary
42531   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42532     # Keep paths in /bin as-is, but remove trailing .exe if any
42533     new_path="${new_path/%.exe/}"
42534     # Do not save /bin paths to all_fixpath_prefixes!
42535   else
42536     # Not in mixed or Windows style, start by that.
42537     new_path=`cmd //c echo $new_path`
42538 
42539   input_path="$new_path"
42540   # Check if we need to convert this using DOS-style short mode. If the path
42541   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42542   # take no chances and rewrite it.
42543   # Note: m4 eats our [], so we need to use [ and ] instead.
42544   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42545   if test "x$has_forbidden_chars" != x; then
42546     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42547     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42548   fi
42549 
42550     # Output is in $new_path
42551 
42552   windows_path="$new_path"
42553   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42554     unix_path=`$CYGPATH -u "$windows_path"`
42555     new_path="$unix_path"
42556   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42557     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42558     new_path="$unix_path"
42559   fi
42560 
42561     # remove trailing .exe if any
42562     new_path="${new_path/%.exe/}"
42563 
42564     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42565     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42566   fi
42567 
42568     else
42569       # We're on a unix platform. Hooray! :)
42570       # First separate the path from the arguments. This will split at the first
42571       # space.
42572       complete="$OBJCOPY"
42573       path="${complete%% *}"
42574       tmp="$complete EOL"
42575       arguments="${tmp#* }"
42576 
42577       # Cannot rely on the command "which" here since it doesn't always work.
42578       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42579       if test -z "$is_absolute_path"; then
42580         # Path to executable is not absolute. Find it.
42581         IFS_save="$IFS"
42582         IFS=:
42583         for p in $PATH; do
42584           if test -f "$p/$path" && test -x "$p/$path"; then
42585             new_path="$p/$path"
42586             break
42587           fi
42588         done
42589         IFS="$IFS_save"
42590       else
42591         # This is an absolute path, we can use it without further modifications.
42592         new_path="$path"
42593       fi
42594 
42595       if test "x$new_path" = x; then
42596         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42597 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42598         has_space=`$ECHO "$complete" | $GREP " "`
42599         if test "x$has_space" != x; then
42600           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42601 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42602         fi
42603         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42604       fi
42605     fi
42606 
42607     # Now join together the path and the arguments once again
42608     if test "x$arguments" != xEOL; then
42609       new_complete="$new_path ${arguments% *}"
42610     else
42611       new_complete="$new_path"
42612     fi
42613 
42614     if test "x$complete" != "x$new_complete"; then
42615       OBJCOPY="$new_complete"
42616       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42617 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42618     fi
42619   fi
42620 
42621       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42622         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42623         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42624         # - version number is last blank separate word on first line
42625         # - version number formats that have been seen:
42626         #   - <major>.<minor>
42627         #   - <major>.<minor>.<micro>
42628         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42629         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42630          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42631               -e 's/.* //' \
42632               -e '/^[01]\./b bad' \
42633               -e '/^2\./{' \
42634               -e '  s/^2\.//' \
42635               -e '  /^[0-9]$/b bad' \
42636               -e '  /^[0-9]\./b bad' \
42637               -e '  /^1[0-9]$/b bad' \
42638               -e '  /^1[0-9]\./b bad' \
42639               -e '  /^20\./b bad' \
42640               -e '  /^21\.0$/b bad' \
42641               -e '  /^21\.0\./b bad' \
42642               -e '}' \
42643               -e ':good' \
42644               -e 's/.*/VALID_VERSION/p' \
42645               -e 'q' \
42646               -e ':bad' \
42647               -e 's/.*/BAD_VERSION/p' \
42648               -e 'q'`
42649         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42650           OBJCOPY=
42651           { $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
42652 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42653           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42654 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42655           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42656 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42657           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42658 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42659           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42660 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42661         fi
42662       fi
42663     fi
42664   fi
42665 
42666 
42667 
42668   # Publish this variable in the help.
42669 
42670 
42671   if [ -z "${OBJDUMP+x}" ]; then
42672     # The variable is not set by user, try to locate tool using the code snippet
42673     if test -n "$ac_tool_prefix"; then
42674   for ac_prog in gobjdump objdump
42675   do
42676     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42677 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42679 $as_echo_n "checking for $ac_word... " >&6; }
42680 if ${ac_cv_prog_OBJDUMP+:} false; then :
42681   $as_echo_n "(cached) " >&6
42682 else
42683   if test -n "$OBJDUMP"; then
42684   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42685 else
42686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42687 for as_dir in $PATH
42688 do
42689   IFS=$as_save_IFS
42690   test -z "$as_dir" && as_dir=.
42691     for ac_exec_ext in '' $ac_executable_extensions; do
42692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42693     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42695     break 2
42696   fi
42697 done
42698   done
42699 IFS=$as_save_IFS
42700 
42701 fi
42702 fi
42703 OBJDUMP=$ac_cv_prog_OBJDUMP
42704 if test -n "$OBJDUMP"; then
42705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42706 $as_echo "$OBJDUMP" >&6; }
42707 else
42708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42709 $as_echo "no" >&6; }
42710 fi
42711 
42712 
42713     test -n "$OBJDUMP" && break
42714   done
42715 fi
42716 if test -z "$OBJDUMP"; then
42717   ac_ct_OBJDUMP=$OBJDUMP
42718   for ac_prog in gobjdump objdump
42719 do
42720   # Extract the first word of "$ac_prog", so it can be a program name with args.
42721 set dummy $ac_prog; ac_word=$2
42722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42723 $as_echo_n "checking for $ac_word... " >&6; }
42724 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42725   $as_echo_n "(cached) " >&6
42726 else
42727   if test -n "$ac_ct_OBJDUMP"; then
42728   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42729 else
42730 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42731 for as_dir in $PATH
42732 do
42733   IFS=$as_save_IFS
42734   test -z "$as_dir" && as_dir=.
42735     for ac_exec_ext in '' $ac_executable_extensions; do
42736   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42737     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42738     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42739     break 2
42740   fi
42741 done
42742   done
42743 IFS=$as_save_IFS
42744 
42745 fi
42746 fi
42747 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42748 if test -n "$ac_ct_OBJDUMP"; then
42749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42750 $as_echo "$ac_ct_OBJDUMP" >&6; }
42751 else
42752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42753 $as_echo "no" >&6; }
42754 fi
42755 
42756 
42757   test -n "$ac_ct_OBJDUMP" && break
42758 done
42759 
42760   if test "x$ac_ct_OBJDUMP" = x; then
42761     OBJDUMP=""
42762   else
42763     case $cross_compiling:$ac_tool_warned in
42764 yes:)
42765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42766 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42767 ac_tool_warned=yes ;;
42768 esac
42769     OBJDUMP=$ac_ct_OBJDUMP
42770   fi
42771 fi
42772 
42773   else
42774     # The variable is set, but is it from the command line or the environment?
42775 
42776     # Try to remove the string !OBJDUMP! from our list.
42777     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42778     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42779       # If it failed, the variable was not from the command line. Ignore it,
42780       # but warn the user (except for BASH, which is always set by the calling BASH).
42781       if test "xOBJDUMP" != xBASH; then
42782         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42783 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42784       fi
42785       # Try to locate tool using the code snippet
42786       if test -n "$ac_tool_prefix"; then
42787   for ac_prog in gobjdump objdump
42788   do
42789     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42790 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42792 $as_echo_n "checking for $ac_word... " >&6; }
42793 if ${ac_cv_prog_OBJDUMP+:} false; then :
42794   $as_echo_n "(cached) " >&6
42795 else
42796   if test -n "$OBJDUMP"; then
42797   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42798 else
42799 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42800 for as_dir in $PATH
42801 do
42802   IFS=$as_save_IFS
42803   test -z "$as_dir" && as_dir=.
42804     for ac_exec_ext in '' $ac_executable_extensions; do
42805   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42806     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42807     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42808     break 2
42809   fi
42810 done
42811   done
42812 IFS=$as_save_IFS
42813 
42814 fi
42815 fi
42816 OBJDUMP=$ac_cv_prog_OBJDUMP
42817 if test -n "$OBJDUMP"; then
42818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42819 $as_echo "$OBJDUMP" >&6; }
42820 else
42821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42822 $as_echo "no" >&6; }
42823 fi
42824 
42825 
42826     test -n "$OBJDUMP" && break
42827   done
42828 fi
42829 if test -z "$OBJDUMP"; then
42830   ac_ct_OBJDUMP=$OBJDUMP
42831   for ac_prog in gobjdump objdump
42832 do
42833   # Extract the first word of "$ac_prog", so it can be a program name with args.
42834 set dummy $ac_prog; ac_word=$2
42835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42836 $as_echo_n "checking for $ac_word... " >&6; }
42837 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42838   $as_echo_n "(cached) " >&6
42839 else
42840   if test -n "$ac_ct_OBJDUMP"; then
42841   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42842 else
42843 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42844 for as_dir in $PATH
42845 do
42846   IFS=$as_save_IFS
42847   test -z "$as_dir" && as_dir=.
42848     for ac_exec_ext in '' $ac_executable_extensions; do
42849   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42850     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42851     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42852     break 2
42853   fi
42854 done
42855   done
42856 IFS=$as_save_IFS
42857 
42858 fi
42859 fi
42860 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42861 if test -n "$ac_ct_OBJDUMP"; then
42862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42863 $as_echo "$ac_ct_OBJDUMP" >&6; }
42864 else
42865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42866 $as_echo "no" >&6; }
42867 fi
42868 
42869 
42870   test -n "$ac_ct_OBJDUMP" && break
42871 done
42872 
42873   if test "x$ac_ct_OBJDUMP" = x; then
42874     OBJDUMP=""
42875   else
42876     case $cross_compiling:$ac_tool_warned in
42877 yes:)
42878 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42879 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42880 ac_tool_warned=yes ;;
42881 esac
42882     OBJDUMP=$ac_ct_OBJDUMP
42883   fi
42884 fi
42885 
42886     else
42887       # If it succeeded, then it was overridden by the user. We will use it
42888       # for the tool.
42889 
42890       # First remove it from the list of overridden variables, so we can test
42891       # for unknown variables in the end.
42892       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42893 
42894       # Check if we try to supply an empty value
42895       if test "x$OBJDUMP" = x; then
42896         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42897 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42898         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42899 $as_echo_n "checking for OBJDUMP... " >&6; }
42900         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42901 $as_echo "disabled" >&6; }
42902       else
42903         # Check if the provided tool contains a complete path.
42904         tool_specified="$OBJDUMP"
42905         tool_basename="${tool_specified##*/}"
42906         if test "x$tool_basename" = "x$tool_specified"; then
42907           # A command without a complete path is provided, search $PATH.
42908           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42909 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42910           # Extract the first word of "$tool_basename", so it can be a program name with args.
42911 set dummy $tool_basename; ac_word=$2
42912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42913 $as_echo_n "checking for $ac_word... " >&6; }
42914 if ${ac_cv_path_OBJDUMP+:} false; then :
42915   $as_echo_n "(cached) " >&6
42916 else
42917   case $OBJDUMP in
42918   [\\/]* | ?:[\\/]*)
42919   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42920   ;;
42921   *)
42922   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42923 for as_dir in $PATH
42924 do
42925   IFS=$as_save_IFS
42926   test -z "$as_dir" && as_dir=.
42927     for ac_exec_ext in '' $ac_executable_extensions; do
42928   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42929     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42930     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42931     break 2
42932   fi
42933 done
42934   done
42935 IFS=$as_save_IFS
42936 
42937   ;;
42938 esac
42939 fi
42940 OBJDUMP=$ac_cv_path_OBJDUMP
42941 if test -n "$OBJDUMP"; then
42942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42943 $as_echo "$OBJDUMP" >&6; }
42944 else
42945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42946 $as_echo "no" >&6; }
42947 fi
42948 
42949 
42950           if test "x$OBJDUMP" = x; then
42951             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42952           fi
42953         else
42954           # Otherwise we believe it is a complete path. Use it as it is.
42955           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42956 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42957           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42958 $as_echo_n "checking for OBJDUMP... " >&6; }
42959           if test ! -x "$tool_specified"; then
42960             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42961 $as_echo "not found" >&6; }
42962             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42963           fi
42964           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42965 $as_echo "$tool_specified" >&6; }
42966         fi
42967       fi
42968     fi
42969 
42970   fi
42971 
42972 
42973   if test "x$OBJDUMP" != x; then
42974     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42975     # bails if argument is missing.
42976 
42977   # Only process if variable expands to non-empty
42978 
42979   if test "x$OBJDUMP" != x; then
42980     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42981 
42982   # First separate the path from the arguments. This will split at the first
42983   # space.
42984   complete="$OBJDUMP"
42985   path="${complete%% *}"
42986   tmp="$complete EOL"
42987   arguments="${tmp#* }"
42988 
42989   # Input might be given as Windows format, start by converting to
42990   # unix format.
42991   new_path=`$CYGPATH -u "$path"`
42992 
42993   # Now try to locate executable using which
42994   new_path=`$WHICH "$new_path" 2> /dev/null`
42995   # bat and cmd files are not always considered executable in cygwin causing which
42996   # to not find them
42997   if test "x$new_path" = x \
42998       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42999       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43000     new_path=`$CYGPATH -u "$path"`
43001   fi
43002   if test "x$new_path" = x; then
43003     # Oops. Which didn't find the executable.
43004     # The splitting of arguments from the executable at a space might have been incorrect,
43005     # since paths with space are more likely in Windows. Give it another try with the whole
43006     # argument.
43007     path="$complete"
43008     arguments="EOL"
43009     new_path=`$CYGPATH -u "$path"`
43010     new_path=`$WHICH "$new_path" 2> /dev/null`
43011     # bat and cmd files are not always considered executable in cygwin causing which
43012     # to not find them
43013     if test "x$new_path" = x \
43014         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43015         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43016       new_path=`$CYGPATH -u "$path"`
43017     fi
43018     if test "x$new_path" = x; then
43019       # It's still not found. Now this is an unrecoverable error.
43020       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43021 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43022       has_space=`$ECHO "$complete" | $GREP " "`
43023       if test "x$has_space" != x; then
43024         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43025 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43026       fi
43027       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43028     fi
43029   fi
43030 
43031   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43032   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43033   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43034   # "foo.exe" is OK but "foo" is an error.
43035   #
43036   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43037   # It is also a way to make sure we got the proper file name for the real test later on.
43038   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43039   if test "x$test_shortpath" = x; then
43040     # Short path failed, file does not exist as specified.
43041     # Try adding .exe or .cmd
43042     if test -f "${new_path}.exe"; then
43043       input_to_shortpath="${new_path}.exe"
43044     elif test -f "${new_path}.cmd"; then
43045       input_to_shortpath="${new_path}.cmd"
43046     else
43047       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43048 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43049       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43050 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43051       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43052     fi
43053   else
43054     input_to_shortpath="$new_path"
43055   fi
43056 
43057   # Call helper function which possibly converts this using DOS-style short mode.
43058   # If so, the updated path is stored in $new_path.
43059   new_path="$input_to_shortpath"
43060 
43061   input_path="$input_to_shortpath"
43062   # Check if we need to convert this using DOS-style short mode. If the path
43063   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43064   # take no chances and rewrite it.
43065   # Note: m4 eats our [], so we need to use [ and ] instead.
43066   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43067   if test "x$has_forbidden_chars" != x; then
43068     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43069     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43070     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43071     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43072       # Going to short mode and back again did indeed matter. Since short mode is
43073       # case insensitive, let's make it lowercase to improve readability.
43074       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43075       # Now convert it back to Unix-style (cygpath)
43076       input_path=`$CYGPATH -u "$shortmode_path"`
43077       new_path="$input_path"
43078     fi
43079   fi
43080 
43081   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43082   if test "x$test_cygdrive_prefix" = x; then
43083     # As a simple fix, exclude /usr/bin since it's not a real path.
43084     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43085       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43086       # a path prefixed by /cygdrive for fixpath to work.
43087       new_path="$CYGWIN_ROOT_PATH$input_path"
43088     fi
43089   fi
43090 
43091   # remove trailing .exe if any
43092   new_path="${new_path/%.exe/}"
43093 
43094     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43095 
43096   # First separate the path from the arguments. This will split at the first
43097   # space.
43098   complete="$OBJDUMP"
43099   path="${complete%% *}"
43100   tmp="$complete EOL"
43101   arguments="${tmp#* }"
43102 
43103   # Input might be given as Windows format, start by converting to
43104   # unix format.
43105   new_path="$path"
43106 
43107   windows_path="$new_path"
43108   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43109     unix_path=`$CYGPATH -u "$windows_path"`
43110     new_path="$unix_path"
43111   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43112     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43113     new_path="$unix_path"
43114   fi
43115 
43116 
43117   # Now try to locate executable using which
43118   new_path=`$WHICH "$new_path" 2> /dev/null`
43119 
43120   if test "x$new_path" = x; then
43121     # Oops. Which didn't find the executable.
43122     # The splitting of arguments from the executable at a space might have been incorrect,
43123     # since paths with space are more likely in Windows. Give it another try with the whole
43124     # argument.
43125     path="$complete"
43126     arguments="EOL"
43127     new_path="$path"
43128 
43129   windows_path="$new_path"
43130   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43131     unix_path=`$CYGPATH -u "$windows_path"`
43132     new_path="$unix_path"
43133   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43134     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43135     new_path="$unix_path"
43136   fi
43137 
43138 
43139     new_path=`$WHICH "$new_path" 2> /dev/null`
43140     # bat and cmd files are not always considered executable in MSYS causing which
43141     # to not find them
43142     if test "x$new_path" = x \
43143         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43144         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43145       new_path="$path"
43146 
43147   windows_path="$new_path"
43148   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43149     unix_path=`$CYGPATH -u "$windows_path"`
43150     new_path="$unix_path"
43151   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43152     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43153     new_path="$unix_path"
43154   fi
43155 
43156     fi
43157 
43158     if test "x$new_path" = x; then
43159       # It's still not found. Now this is an unrecoverable error.
43160       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43161 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43162       has_space=`$ECHO "$complete" | $GREP " "`
43163       if test "x$has_space" != x; then
43164         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43165 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43166       fi
43167       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43168     fi
43169   fi
43170 
43171   # Now new_path has a complete unix path to the binary
43172   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43173     # Keep paths in /bin as-is, but remove trailing .exe if any
43174     new_path="${new_path/%.exe/}"
43175     # Do not save /bin paths to all_fixpath_prefixes!
43176   else
43177     # Not in mixed or Windows style, start by that.
43178     new_path=`cmd //c echo $new_path`
43179 
43180   input_path="$new_path"
43181   # Check if we need to convert this using DOS-style short mode. If the path
43182   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43183   # take no chances and rewrite it.
43184   # Note: m4 eats our [], so we need to use [ and ] instead.
43185   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43186   if test "x$has_forbidden_chars" != x; then
43187     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43188     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43189   fi
43190 
43191     # Output is in $new_path
43192 
43193   windows_path="$new_path"
43194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43195     unix_path=`$CYGPATH -u "$windows_path"`
43196     new_path="$unix_path"
43197   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43198     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43199     new_path="$unix_path"
43200   fi
43201 
43202     # remove trailing .exe if any
43203     new_path="${new_path/%.exe/}"
43204 
43205     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43206     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43207   fi
43208 
43209     else
43210       # We're on a unix platform. Hooray! :)
43211       # First separate the path from the arguments. This will split at the first
43212       # space.
43213       complete="$OBJDUMP"
43214       path="${complete%% *}"
43215       tmp="$complete EOL"
43216       arguments="${tmp#* }"
43217 
43218       # Cannot rely on the command "which" here since it doesn't always work.
43219       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43220       if test -z "$is_absolute_path"; then
43221         # Path to executable is not absolute. Find it.
43222         IFS_save="$IFS"
43223         IFS=:
43224         for p in $PATH; do
43225           if test -f "$p/$path" && test -x "$p/$path"; then
43226             new_path="$p/$path"
43227             break
43228           fi
43229         done
43230         IFS="$IFS_save"
43231       else
43232         # This is an absolute path, we can use it without further modifications.
43233         new_path="$path"
43234       fi
43235 
43236       if test "x$new_path" = x; then
43237         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43238 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43239         has_space=`$ECHO "$complete" | $GREP " "`
43240         if test "x$has_space" != x; then
43241           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43242 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43243         fi
43244         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43245       fi
43246     fi
43247 
43248     # Now join together the path and the arguments once again
43249     if test "x$arguments" != xEOL; then
43250       new_complete="$new_path ${arguments% *}"
43251     else
43252       new_complete="$new_path"
43253     fi
43254 
43255     if test "x$complete" != "x$new_complete"; then
43256       OBJDUMP="$new_complete"
43257       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43258 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43259     fi
43260   fi
43261 
43262   fi
43263 
43264 
43265   # Restore old path.
43266   PATH="$OLD_PATH"
43267 
43268   # Restore the flags to the user specified values.
43269   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43270   CFLAGS="$ORG_CFLAGS"
43271   CXXFLAGS="$ORG_CXXFLAGS"
43272 
43273 
43274 # Finally do some processing after the detection phase
43275 
43276   if test "x$COMPILE_TYPE" = "xcross"; then
43277     # Now we need to find a C/C++ compiler that can build executables for the
43278     # build platform. We can't use the AC_PROG_CC macro, since it can only be
43279     # used once. Also, we need to do this without adding a tools dir to the
43280     # path, otherwise we might pick up cross-compilers which don't use standard
43281     # naming.
43282 
43283     OLDPATH="$PATH"
43284 
43285 
43286 # Check whether --with-build-devkit was given.
43287 if test "${with_build_devkit+set}" = set; then :
43288   withval=$with_build_devkit;
43289 fi
43290 
43291     if test "x$with_build_devkit" = "xyes"; then
43292       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43293     elif test -n "$with_build_devkit"; then
43294       if test ! -d "$with_build_devkit"; then
43295         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43296       else
43297 
43298   # Only process if variable expands to non-empty
43299 
43300   if test "x$with_build_devkit" != x; then
43301     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43302 
43303   # Input might be given as Windows format, start by converting to
43304   # unix format.
43305   path="$with_build_devkit"
43306   new_path=`$CYGPATH -u "$path"`
43307 
43308   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43309   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43310   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43311   # "foo.exe" is OK but "foo" is an error.
43312   #
43313   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43314   # It is also a way to make sure we got the proper file name for the real test later on.
43315   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43316   if test "x$test_shortpath" = x; then
43317     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43318 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43319     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43320   fi
43321 
43322   # Call helper function which possibly converts this using DOS-style short mode.
43323   # If so, the updated path is stored in $new_path.
43324 
43325   input_path="$new_path"
43326   # Check if we need to convert this using DOS-style short mode. If the path
43327   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43328   # take no chances and rewrite it.
43329   # Note: m4 eats our [], so we need to use [ and ] instead.
43330   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43331   if test "x$has_forbidden_chars" != x; then
43332     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43333     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43334     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43335     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43336       # Going to short mode and back again did indeed matter. Since short mode is
43337       # case insensitive, let's make it lowercase to improve readability.
43338       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43339       # Now convert it back to Unix-style (cygpath)
43340       input_path=`$CYGPATH -u "$shortmode_path"`
43341       new_path="$input_path"
43342     fi
43343   fi
43344 
43345   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43346   if test "x$test_cygdrive_prefix" = x; then
43347     # As a simple fix, exclude /usr/bin since it's not a real path.
43348     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43349       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43350       # a path prefixed by /cygdrive for fixpath to work.
43351       new_path="$CYGWIN_ROOT_PATH$input_path"
43352     fi
43353   fi
43354 
43355 
43356   if test "x$path" != "x$new_path"; then
43357     with_build_devkit="$new_path"
43358     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43359 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43360   fi
43361 
43362     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43363 
43364   path="$with_build_devkit"
43365   has_colon=`$ECHO $path | $GREP ^.:`
43366   new_path="$path"
43367   if test "x$has_colon" = x; then
43368     # Not in mixed or Windows style, start by that.
43369     new_path=`cmd //c echo $path`
43370   fi
43371 
43372 
43373   input_path="$new_path"
43374   # Check if we need to convert this using DOS-style short mode. If the path
43375   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43376   # take no chances and rewrite it.
43377   # Note: m4 eats our [], so we need to use [ and ] instead.
43378   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43379   if test "x$has_forbidden_chars" != x; then
43380     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43381     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43382   fi
43383 
43384 
43385   windows_path="$new_path"
43386   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43387     unix_path=`$CYGPATH -u "$windows_path"`
43388     new_path="$unix_path"
43389   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43390     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43391     new_path="$unix_path"
43392   fi
43393 
43394   if test "x$path" != "x$new_path"; then
43395     with_build_devkit="$new_path"
43396     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43397 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43398   fi
43399 
43400   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43401   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43402 
43403     else
43404       # We're on a unix platform. Hooray! :)
43405       path="$with_build_devkit"
43406       has_space=`$ECHO "$path" | $GREP " "`
43407       if test "x$has_space" != x; then
43408         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43409 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43410         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43411       fi
43412 
43413       # Use eval to expand a potential ~
43414       eval path="$path"
43415       if test ! -f "$path" && test ! -d "$path"; then
43416         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43417       fi
43418 
43419       if test -d "$path"; then
43420         with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43421       else
43422         dir="`$DIRNAME "$path"`"
43423         base="`$BASENAME "$path"`"
43424         with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43425       fi
43426     fi
43427   fi
43428 
43429         BUILD_DEVKIT_ROOT="$with_build_devkit"
43430         # Check for a meta data info file in the root of the devkit
43431         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43432           # Process devkit.info so that existing devkit variables are not
43433           # modified by this
43434           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43435               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43436               -e "s/\$host/\$build/g" \
43437               $BUILD_DEVKIT_ROOT/devkit.info \
43438               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43439           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43440           # This potentially sets the following:
43441           # A descriptive name of the devkit
43442 
43443   if test "x$BUILD_DEVKIT_NAME" = x; then
43444     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43445   fi
43446 
43447           # Corresponds to --with-extra-path
43448 
43449   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43450     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43451   fi
43452 
43453           # Corresponds to --with-toolchain-path
43454 
43455   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43456     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43457   fi
43458 
43459           # Corresponds to --with-sysroot
43460 
43461   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43462     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43463   fi
43464 
43465           # Skip the Window specific parts
43466         fi
43467 
43468         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43469 $as_echo_n "checking for build platform devkit... " >&6; }
43470         if test "x$BUILD_DEVKIT_NAME" != x; then
43471           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43472 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43473         else
43474           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43475 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43476         fi
43477 
43478         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43479 
43480   if test "x$BUILD_SYSROOT" != "x"; then
43481     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43482       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43483         # Solaris Studio does not have a concept of sysroot. Instead we must
43484         # make sure the default include and lib dirs are appended to each
43485         # compile and link command line. Must also add -I-xbuiltin to enable
43486         # inlining of system functions and intrinsics.
43487         BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43488         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43489             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43490             -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43491       fi
43492     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43493       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43494       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43495     elif test "x$TOOLCHAIN_TYPE" = xclang; then
43496       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43497       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43498     fi
43499     # Propagate the sysroot args to hotspot
43500     BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43501     BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43502     BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43503     # The global CFLAGS and LDFLAGS variables need these for configure to function
43504     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43505     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43506     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43507     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43508   fi
43509 
43510   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43511     # We also need -iframework<path>/System/Library/Frameworks
43512     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43513     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43514     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43515     # set this here so it doesn't have to be peppered throughout the forest
43516     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43517     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43518   fi
43519 
43520 
43521 
43522 
43523 
43524          # Fallback default of just /bin if DEVKIT_PATH is not defined
43525         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43526           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43527         fi
43528         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43529       fi
43530     fi
43531 
43532     # FIXME: we should list the discovered compilers as an exclude pattern!
43533     # If we do that, we can do this detection before POST_DETECTION, and still
43534     # find the build compilers in the tools dir, if needed.
43535 
43536 
43537 
43538   # Publish this variable in the help.
43539 
43540 
43541   if [ -z "${BUILD_CC+x}" ]; then
43542     # The variable is not set by user, try to locate tool using the code snippet
43543     for ac_prog in cl cc gcc
43544 do
43545   # Extract the first word of "$ac_prog", so it can be a program name with args.
43546 set dummy $ac_prog; ac_word=$2
43547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43548 $as_echo_n "checking for $ac_word... " >&6; }
43549 if ${ac_cv_path_BUILD_CC+:} false; then :
43550   $as_echo_n "(cached) " >&6
43551 else
43552   case $BUILD_CC in
43553   [\\/]* | ?:[\\/]*)
43554   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43555   ;;
43556   *)
43557   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43558 for as_dir in $PATH
43559 do
43560   IFS=$as_save_IFS
43561   test -z "$as_dir" && as_dir=.
43562     for ac_exec_ext in '' $ac_executable_extensions; do
43563   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43564     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43565     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43566     break 2
43567   fi
43568 done
43569   done
43570 IFS=$as_save_IFS
43571 
43572   ;;
43573 esac
43574 fi
43575 BUILD_CC=$ac_cv_path_BUILD_CC
43576 if test -n "$BUILD_CC"; then
43577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43578 $as_echo "$BUILD_CC" >&6; }
43579 else
43580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43581 $as_echo "no" >&6; }
43582 fi
43583 
43584 
43585   test -n "$BUILD_CC" && break
43586 done
43587 
43588   else
43589     # The variable is set, but is it from the command line or the environment?
43590 
43591     # Try to remove the string !BUILD_CC! from our list.
43592     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43593     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43594       # If it failed, the variable was not from the command line. Ignore it,
43595       # but warn the user (except for BASH, which is always set by the calling BASH).
43596       if test "xBUILD_CC" != xBASH; then
43597         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43598 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43599       fi
43600       # Try to locate tool using the code snippet
43601       for ac_prog in cl cc gcc
43602 do
43603   # Extract the first word of "$ac_prog", so it can be a program name with args.
43604 set dummy $ac_prog; ac_word=$2
43605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43606 $as_echo_n "checking for $ac_word... " >&6; }
43607 if ${ac_cv_path_BUILD_CC+:} false; then :
43608   $as_echo_n "(cached) " >&6
43609 else
43610   case $BUILD_CC in
43611   [\\/]* | ?:[\\/]*)
43612   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43613   ;;
43614   *)
43615   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43616 for as_dir in $PATH
43617 do
43618   IFS=$as_save_IFS
43619   test -z "$as_dir" && as_dir=.
43620     for ac_exec_ext in '' $ac_executable_extensions; do
43621   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43622     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43623     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43624     break 2
43625   fi
43626 done
43627   done
43628 IFS=$as_save_IFS
43629 
43630   ;;
43631 esac
43632 fi
43633 BUILD_CC=$ac_cv_path_BUILD_CC
43634 if test -n "$BUILD_CC"; then
43635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43636 $as_echo "$BUILD_CC" >&6; }
43637 else
43638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43639 $as_echo "no" >&6; }
43640 fi
43641 
43642 
43643   test -n "$BUILD_CC" && break
43644 done
43645 
43646     else
43647       # If it succeeded, then it was overridden by the user. We will use it
43648       # for the tool.
43649 
43650       # First remove it from the list of overridden variables, so we can test
43651       # for unknown variables in the end.
43652       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43653 
43654       # Check if we try to supply an empty value
43655       if test "x$BUILD_CC" = x; then
43656         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43657 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43658         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43659 $as_echo_n "checking for BUILD_CC... " >&6; }
43660         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43661 $as_echo "disabled" >&6; }
43662       else
43663         # Check if the provided tool contains a complete path.
43664         tool_specified="$BUILD_CC"
43665         tool_basename="${tool_specified##*/}"
43666         if test "x$tool_basename" = "x$tool_specified"; then
43667           # A command without a complete path is provided, search $PATH.
43668           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43669 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43670           # Extract the first word of "$tool_basename", so it can be a program name with args.
43671 set dummy $tool_basename; ac_word=$2
43672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43673 $as_echo_n "checking for $ac_word... " >&6; }
43674 if ${ac_cv_path_BUILD_CC+:} false; then :
43675   $as_echo_n "(cached) " >&6
43676 else
43677   case $BUILD_CC in
43678   [\\/]* | ?:[\\/]*)
43679   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43680   ;;
43681   *)
43682   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43683 for as_dir in $PATH
43684 do
43685   IFS=$as_save_IFS
43686   test -z "$as_dir" && as_dir=.
43687     for ac_exec_ext in '' $ac_executable_extensions; do
43688   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43689     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43690     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43691     break 2
43692   fi
43693 done
43694   done
43695 IFS=$as_save_IFS
43696 
43697   ;;
43698 esac
43699 fi
43700 BUILD_CC=$ac_cv_path_BUILD_CC
43701 if test -n "$BUILD_CC"; then
43702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43703 $as_echo "$BUILD_CC" >&6; }
43704 else
43705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43706 $as_echo "no" >&6; }
43707 fi
43708 
43709 
43710           if test "x$BUILD_CC" = x; then
43711             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43712           fi
43713         else
43714           # Otherwise we believe it is a complete path. Use it as it is.
43715           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43716 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43717           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43718 $as_echo_n "checking for BUILD_CC... " >&6; }
43719           if test ! -x "$tool_specified"; then
43720             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43721 $as_echo "not found" >&6; }
43722             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43723           fi
43724           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43725 $as_echo "$tool_specified" >&6; }
43726         fi
43727       fi
43728     fi
43729 
43730   fi
43731 
43732 
43733 
43734   if test "x$BUILD_CC" = x; then
43735     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43736   fi
43737 
43738 
43739 
43740   # Only process if variable expands to non-empty
43741 
43742   if test "x$BUILD_CC" != x; then
43743     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43744 
43745   # First separate the path from the arguments. This will split at the first
43746   # space.
43747   complete="$BUILD_CC"
43748   path="${complete%% *}"
43749   tmp="$complete EOL"
43750   arguments="${tmp#* }"
43751 
43752   # Input might be given as Windows format, start by converting to
43753   # unix format.
43754   new_path=`$CYGPATH -u "$path"`
43755 
43756   # Now try to locate executable using which
43757   new_path=`$WHICH "$new_path" 2> /dev/null`
43758   # bat and cmd files are not always considered executable in cygwin causing which
43759   # to not find them
43760   if test "x$new_path" = x \
43761       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43762       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43763     new_path=`$CYGPATH -u "$path"`
43764   fi
43765   if test "x$new_path" = x; then
43766     # Oops. Which didn't find the executable.
43767     # The splitting of arguments from the executable at a space might have been incorrect,
43768     # since paths with space are more likely in Windows. Give it another try with the whole
43769     # argument.
43770     path="$complete"
43771     arguments="EOL"
43772     new_path=`$CYGPATH -u "$path"`
43773     new_path=`$WHICH "$new_path" 2> /dev/null`
43774     # bat and cmd files are not always considered executable in cygwin causing which
43775     # to not find them
43776     if test "x$new_path" = x \
43777         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43778         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43779       new_path=`$CYGPATH -u "$path"`
43780     fi
43781     if test "x$new_path" = x; then
43782       # It's still not found. Now this is an unrecoverable error.
43783       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43784 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43785       has_space=`$ECHO "$complete" | $GREP " "`
43786       if test "x$has_space" != x; then
43787         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43788 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43789       fi
43790       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43791     fi
43792   fi
43793 
43794   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43795   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43796   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43797   # "foo.exe" is OK but "foo" is an error.
43798   #
43799   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43800   # It is also a way to make sure we got the proper file name for the real test later on.
43801   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43802   if test "x$test_shortpath" = x; then
43803     # Short path failed, file does not exist as specified.
43804     # Try adding .exe or .cmd
43805     if test -f "${new_path}.exe"; then
43806       input_to_shortpath="${new_path}.exe"
43807     elif test -f "${new_path}.cmd"; then
43808       input_to_shortpath="${new_path}.cmd"
43809     else
43810       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43811 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43812       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43813 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43814       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43815     fi
43816   else
43817     input_to_shortpath="$new_path"
43818   fi
43819 
43820   # Call helper function which possibly converts this using DOS-style short mode.
43821   # If so, the updated path is stored in $new_path.
43822   new_path="$input_to_shortpath"
43823 
43824   input_path="$input_to_shortpath"
43825   # Check if we need to convert this using DOS-style short mode. If the path
43826   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43827   # take no chances and rewrite it.
43828   # Note: m4 eats our [], so we need to use [ and ] instead.
43829   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43830   if test "x$has_forbidden_chars" != x; then
43831     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43832     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43833     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43834     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43835       # Going to short mode and back again did indeed matter. Since short mode is
43836       # case insensitive, let's make it lowercase to improve readability.
43837       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43838       # Now convert it back to Unix-style (cygpath)
43839       input_path=`$CYGPATH -u "$shortmode_path"`
43840       new_path="$input_path"
43841     fi
43842   fi
43843 
43844   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43845   if test "x$test_cygdrive_prefix" = x; then
43846     # As a simple fix, exclude /usr/bin since it's not a real path.
43847     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43848       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43849       # a path prefixed by /cygdrive for fixpath to work.
43850       new_path="$CYGWIN_ROOT_PATH$input_path"
43851     fi
43852   fi
43853 
43854   # remove trailing .exe if any
43855   new_path="${new_path/%.exe/}"
43856 
43857     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43858 
43859   # First separate the path from the arguments. This will split at the first
43860   # space.
43861   complete="$BUILD_CC"
43862   path="${complete%% *}"
43863   tmp="$complete EOL"
43864   arguments="${tmp#* }"
43865 
43866   # Input might be given as Windows format, start by converting to
43867   # unix format.
43868   new_path="$path"
43869 
43870   windows_path="$new_path"
43871   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43872     unix_path=`$CYGPATH -u "$windows_path"`
43873     new_path="$unix_path"
43874   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43875     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43876     new_path="$unix_path"
43877   fi
43878 
43879 
43880   # Now try to locate executable using which
43881   new_path=`$WHICH "$new_path" 2> /dev/null`
43882 
43883   if test "x$new_path" = x; then
43884     # Oops. Which didn't find the executable.
43885     # The splitting of arguments from the executable at a space might have been incorrect,
43886     # since paths with space are more likely in Windows. Give it another try with the whole
43887     # argument.
43888     path="$complete"
43889     arguments="EOL"
43890     new_path="$path"
43891 
43892   windows_path="$new_path"
43893   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43894     unix_path=`$CYGPATH -u "$windows_path"`
43895     new_path="$unix_path"
43896   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43897     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43898     new_path="$unix_path"
43899   fi
43900 
43901 
43902     new_path=`$WHICH "$new_path" 2> /dev/null`
43903     # bat and cmd files are not always considered executable in MSYS causing which
43904     # to not find them
43905     if test "x$new_path" = x \
43906         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43907         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43908       new_path="$path"
43909 
43910   windows_path="$new_path"
43911   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43912     unix_path=`$CYGPATH -u "$windows_path"`
43913     new_path="$unix_path"
43914   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43915     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43916     new_path="$unix_path"
43917   fi
43918 
43919     fi
43920 
43921     if test "x$new_path" = x; then
43922       # It's still not found. Now this is an unrecoverable error.
43923       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43924 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43925       has_space=`$ECHO "$complete" | $GREP " "`
43926       if test "x$has_space" != x; then
43927         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43928 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43929       fi
43930       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43931     fi
43932   fi
43933 
43934   # Now new_path has a complete unix path to the binary
43935   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43936     # Keep paths in /bin as-is, but remove trailing .exe if any
43937     new_path="${new_path/%.exe/}"
43938     # Do not save /bin paths to all_fixpath_prefixes!
43939   else
43940     # Not in mixed or Windows style, start by that.
43941     new_path=`cmd //c echo $new_path`
43942 
43943   input_path="$new_path"
43944   # Check if we need to convert this using DOS-style short mode. If the path
43945   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43946   # take no chances and rewrite it.
43947   # Note: m4 eats our [], so we need to use [ and ] instead.
43948   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43949   if test "x$has_forbidden_chars" != x; then
43950     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43951     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43952   fi
43953 
43954     # Output is in $new_path
43955 
43956   windows_path="$new_path"
43957   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43958     unix_path=`$CYGPATH -u "$windows_path"`
43959     new_path="$unix_path"
43960   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43961     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43962     new_path="$unix_path"
43963   fi
43964 
43965     # remove trailing .exe if any
43966     new_path="${new_path/%.exe/}"
43967 
43968     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43969     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43970   fi
43971 
43972     else
43973       # We're on a unix platform. Hooray! :)
43974       # First separate the path from the arguments. This will split at the first
43975       # space.
43976       complete="$BUILD_CC"
43977       path="${complete%% *}"
43978       tmp="$complete EOL"
43979       arguments="${tmp#* }"
43980 
43981       # Cannot rely on the command "which" here since it doesn't always work.
43982       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43983       if test -z "$is_absolute_path"; then
43984         # Path to executable is not absolute. Find it.
43985         IFS_save="$IFS"
43986         IFS=:
43987         for p in $PATH; do
43988           if test -f "$p/$path" && test -x "$p/$path"; then
43989             new_path="$p/$path"
43990             break
43991           fi
43992         done
43993         IFS="$IFS_save"
43994       else
43995         # This is an absolute path, we can use it without further modifications.
43996         new_path="$path"
43997       fi
43998 
43999       if test "x$new_path" = x; then
44000         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44001 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44002         has_space=`$ECHO "$complete" | $GREP " "`
44003         if test "x$has_space" != x; then
44004           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44005 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44006         fi
44007         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44008       fi
44009     fi
44010 
44011     # Now join together the path and the arguments once again
44012     if test "x$arguments" != xEOL; then
44013       new_complete="$new_path ${arguments% *}"
44014     else
44015       new_complete="$new_path"
44016     fi
44017 
44018     if test "x$complete" != "x$new_complete"; then
44019       BUILD_CC="$new_complete"
44020       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44021 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44022     fi
44023   fi
44024 
44025 
44026 
44027 
44028   # Publish this variable in the help.
44029 
44030 
44031   if [ -z "${BUILD_CXX+x}" ]; then
44032     # The variable is not set by user, try to locate tool using the code snippet
44033     for ac_prog in cl CC g++
44034 do
44035   # Extract the first word of "$ac_prog", so it can be a program name with args.
44036 set dummy $ac_prog; ac_word=$2
44037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44038 $as_echo_n "checking for $ac_word... " >&6; }
44039 if ${ac_cv_path_BUILD_CXX+:} false; then :
44040   $as_echo_n "(cached) " >&6
44041 else
44042   case $BUILD_CXX in
44043   [\\/]* | ?:[\\/]*)
44044   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44045   ;;
44046   *)
44047   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44048 for as_dir in $PATH
44049 do
44050   IFS=$as_save_IFS
44051   test -z "$as_dir" && as_dir=.
44052     for ac_exec_ext in '' $ac_executable_extensions; do
44053   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44054     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44055     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44056     break 2
44057   fi
44058 done
44059   done
44060 IFS=$as_save_IFS
44061 
44062   ;;
44063 esac
44064 fi
44065 BUILD_CXX=$ac_cv_path_BUILD_CXX
44066 if test -n "$BUILD_CXX"; then
44067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44068 $as_echo "$BUILD_CXX" >&6; }
44069 else
44070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44071 $as_echo "no" >&6; }
44072 fi
44073 
44074 
44075   test -n "$BUILD_CXX" && break
44076 done
44077 
44078   else
44079     # The variable is set, but is it from the command line or the environment?
44080 
44081     # Try to remove the string !BUILD_CXX! from our list.
44082     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44083     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44084       # If it failed, the variable was not from the command line. Ignore it,
44085       # but warn the user (except for BASH, which is always set by the calling BASH).
44086       if test "xBUILD_CXX" != xBASH; then
44087         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44088 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44089       fi
44090       # Try to locate tool using the code snippet
44091       for ac_prog in cl CC g++
44092 do
44093   # Extract the first word of "$ac_prog", so it can be a program name with args.
44094 set dummy $ac_prog; ac_word=$2
44095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44096 $as_echo_n "checking for $ac_word... " >&6; }
44097 if ${ac_cv_path_BUILD_CXX+:} false; then :
44098   $as_echo_n "(cached) " >&6
44099 else
44100   case $BUILD_CXX in
44101   [\\/]* | ?:[\\/]*)
44102   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44103   ;;
44104   *)
44105   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44106 for as_dir in $PATH
44107 do
44108   IFS=$as_save_IFS
44109   test -z "$as_dir" && as_dir=.
44110     for ac_exec_ext in '' $ac_executable_extensions; do
44111   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44112     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44113     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44114     break 2
44115   fi
44116 done
44117   done
44118 IFS=$as_save_IFS
44119 
44120   ;;
44121 esac
44122 fi
44123 BUILD_CXX=$ac_cv_path_BUILD_CXX
44124 if test -n "$BUILD_CXX"; then
44125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44126 $as_echo "$BUILD_CXX" >&6; }
44127 else
44128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44129 $as_echo "no" >&6; }
44130 fi
44131 
44132 
44133   test -n "$BUILD_CXX" && break
44134 done
44135 
44136     else
44137       # If it succeeded, then it was overridden by the user. We will use it
44138       # for the tool.
44139 
44140       # First remove it from the list of overridden variables, so we can test
44141       # for unknown variables in the end.
44142       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44143 
44144       # Check if we try to supply an empty value
44145       if test "x$BUILD_CXX" = x; then
44146         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44147 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44148         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44149 $as_echo_n "checking for BUILD_CXX... " >&6; }
44150         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44151 $as_echo "disabled" >&6; }
44152       else
44153         # Check if the provided tool contains a complete path.
44154         tool_specified="$BUILD_CXX"
44155         tool_basename="${tool_specified##*/}"
44156         if test "x$tool_basename" = "x$tool_specified"; then
44157           # A command without a complete path is provided, search $PATH.
44158           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44159 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44160           # Extract the first word of "$tool_basename", so it can be a program name with args.
44161 set dummy $tool_basename; ac_word=$2
44162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44163 $as_echo_n "checking for $ac_word... " >&6; }
44164 if ${ac_cv_path_BUILD_CXX+:} false; then :
44165   $as_echo_n "(cached) " >&6
44166 else
44167   case $BUILD_CXX in
44168   [\\/]* | ?:[\\/]*)
44169   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44170   ;;
44171   *)
44172   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44173 for as_dir in $PATH
44174 do
44175   IFS=$as_save_IFS
44176   test -z "$as_dir" && as_dir=.
44177     for ac_exec_ext in '' $ac_executable_extensions; do
44178   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44179     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44180     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44181     break 2
44182   fi
44183 done
44184   done
44185 IFS=$as_save_IFS
44186 
44187   ;;
44188 esac
44189 fi
44190 BUILD_CXX=$ac_cv_path_BUILD_CXX
44191 if test -n "$BUILD_CXX"; then
44192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44193 $as_echo "$BUILD_CXX" >&6; }
44194 else
44195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44196 $as_echo "no" >&6; }
44197 fi
44198 
44199 
44200           if test "x$BUILD_CXX" = x; then
44201             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44202           fi
44203         else
44204           # Otherwise we believe it is a complete path. Use it as it is.
44205           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44206 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44207           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44208 $as_echo_n "checking for BUILD_CXX... " >&6; }
44209           if test ! -x "$tool_specified"; then
44210             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44211 $as_echo "not found" >&6; }
44212             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44213           fi
44214           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44215 $as_echo "$tool_specified" >&6; }
44216         fi
44217       fi
44218     fi
44219 
44220   fi
44221 
44222 
44223 
44224   if test "x$BUILD_CXX" = x; then
44225     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44226   fi
44227 
44228 
44229 
44230   # Only process if variable expands to non-empty
44231 
44232   if test "x$BUILD_CXX" != x; then
44233     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44234 
44235   # First separate the path from the arguments. This will split at the first
44236   # space.
44237   complete="$BUILD_CXX"
44238   path="${complete%% *}"
44239   tmp="$complete EOL"
44240   arguments="${tmp#* }"
44241 
44242   # Input might be given as Windows format, start by converting to
44243   # unix format.
44244   new_path=`$CYGPATH -u "$path"`
44245 
44246   # Now try to locate executable using which
44247   new_path=`$WHICH "$new_path" 2> /dev/null`
44248   # bat and cmd files are not always considered executable in cygwin causing which
44249   # to not find them
44250   if test "x$new_path" = x \
44251       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44252       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44253     new_path=`$CYGPATH -u "$path"`
44254   fi
44255   if test "x$new_path" = x; then
44256     # Oops. Which didn't find the executable.
44257     # The splitting of arguments from the executable at a space might have been incorrect,
44258     # since paths with space are more likely in Windows. Give it another try with the whole
44259     # argument.
44260     path="$complete"
44261     arguments="EOL"
44262     new_path=`$CYGPATH -u "$path"`
44263     new_path=`$WHICH "$new_path" 2> /dev/null`
44264     # bat and cmd files are not always considered executable in cygwin causing which
44265     # to not find them
44266     if test "x$new_path" = x \
44267         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44268         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44269       new_path=`$CYGPATH -u "$path"`
44270     fi
44271     if test "x$new_path" = x; then
44272       # It's still not found. Now this is an unrecoverable error.
44273       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44274 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44275       has_space=`$ECHO "$complete" | $GREP " "`
44276       if test "x$has_space" != x; then
44277         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44278 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44279       fi
44280       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44281     fi
44282   fi
44283 
44284   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44285   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44286   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44287   # "foo.exe" is OK but "foo" is an error.
44288   #
44289   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44290   # It is also a way to make sure we got the proper file name for the real test later on.
44291   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44292   if test "x$test_shortpath" = x; then
44293     # Short path failed, file does not exist as specified.
44294     # Try adding .exe or .cmd
44295     if test -f "${new_path}.exe"; then
44296       input_to_shortpath="${new_path}.exe"
44297     elif test -f "${new_path}.cmd"; then
44298       input_to_shortpath="${new_path}.cmd"
44299     else
44300       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44301 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44302       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44303 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44304       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44305     fi
44306   else
44307     input_to_shortpath="$new_path"
44308   fi
44309 
44310   # Call helper function which possibly converts this using DOS-style short mode.
44311   # If so, the updated path is stored in $new_path.
44312   new_path="$input_to_shortpath"
44313 
44314   input_path="$input_to_shortpath"
44315   # Check if we need to convert this using DOS-style short mode. If the path
44316   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44317   # take no chances and rewrite it.
44318   # Note: m4 eats our [], so we need to use [ and ] instead.
44319   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44320   if test "x$has_forbidden_chars" != x; then
44321     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44322     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44323     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44324     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44325       # Going to short mode and back again did indeed matter. Since short mode is
44326       # case insensitive, let's make it lowercase to improve readability.
44327       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44328       # Now convert it back to Unix-style (cygpath)
44329       input_path=`$CYGPATH -u "$shortmode_path"`
44330       new_path="$input_path"
44331     fi
44332   fi
44333 
44334   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44335   if test "x$test_cygdrive_prefix" = x; then
44336     # As a simple fix, exclude /usr/bin since it's not a real path.
44337     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44338       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44339       # a path prefixed by /cygdrive for fixpath to work.
44340       new_path="$CYGWIN_ROOT_PATH$input_path"
44341     fi
44342   fi
44343 
44344   # remove trailing .exe if any
44345   new_path="${new_path/%.exe/}"
44346 
44347     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44348 
44349   # First separate the path from the arguments. This will split at the first
44350   # space.
44351   complete="$BUILD_CXX"
44352   path="${complete%% *}"
44353   tmp="$complete EOL"
44354   arguments="${tmp#* }"
44355 
44356   # Input might be given as Windows format, start by converting to
44357   # unix format.
44358   new_path="$path"
44359 
44360   windows_path="$new_path"
44361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44362     unix_path=`$CYGPATH -u "$windows_path"`
44363     new_path="$unix_path"
44364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44365     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44366     new_path="$unix_path"
44367   fi
44368 
44369 
44370   # Now try to locate executable using which
44371   new_path=`$WHICH "$new_path" 2> /dev/null`
44372 
44373   if test "x$new_path" = x; then
44374     # Oops. Which didn't find the executable.
44375     # The splitting of arguments from the executable at a space might have been incorrect,
44376     # since paths with space are more likely in Windows. Give it another try with the whole
44377     # argument.
44378     path="$complete"
44379     arguments="EOL"
44380     new_path="$path"
44381 
44382   windows_path="$new_path"
44383   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44384     unix_path=`$CYGPATH -u "$windows_path"`
44385     new_path="$unix_path"
44386   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44387     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44388     new_path="$unix_path"
44389   fi
44390 
44391 
44392     new_path=`$WHICH "$new_path" 2> /dev/null`
44393     # bat and cmd files are not always considered executable in MSYS causing which
44394     # to not find them
44395     if test "x$new_path" = x \
44396         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44397         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44398       new_path="$path"
44399 
44400   windows_path="$new_path"
44401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44402     unix_path=`$CYGPATH -u "$windows_path"`
44403     new_path="$unix_path"
44404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44406     new_path="$unix_path"
44407   fi
44408 
44409     fi
44410 
44411     if test "x$new_path" = x; then
44412       # It's still not found. Now this is an unrecoverable error.
44413       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44414 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44415       has_space=`$ECHO "$complete" | $GREP " "`
44416       if test "x$has_space" != x; then
44417         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44418 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44419       fi
44420       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44421     fi
44422   fi
44423 
44424   # Now new_path has a complete unix path to the binary
44425   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44426     # Keep paths in /bin as-is, but remove trailing .exe if any
44427     new_path="${new_path/%.exe/}"
44428     # Do not save /bin paths to all_fixpath_prefixes!
44429   else
44430     # Not in mixed or Windows style, start by that.
44431     new_path=`cmd //c echo $new_path`
44432 
44433   input_path="$new_path"
44434   # Check if we need to convert this using DOS-style short mode. If the path
44435   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44436   # take no chances and rewrite it.
44437   # Note: m4 eats our [], so we need to use [ and ] instead.
44438   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44439   if test "x$has_forbidden_chars" != x; then
44440     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44441     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44442   fi
44443 
44444     # Output is in $new_path
44445 
44446   windows_path="$new_path"
44447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44448     unix_path=`$CYGPATH -u "$windows_path"`
44449     new_path="$unix_path"
44450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44451     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44452     new_path="$unix_path"
44453   fi
44454 
44455     # remove trailing .exe if any
44456     new_path="${new_path/%.exe/}"
44457 
44458     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44459     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44460   fi
44461 
44462     else
44463       # We're on a unix platform. Hooray! :)
44464       # First separate the path from the arguments. This will split at the first
44465       # space.
44466       complete="$BUILD_CXX"
44467       path="${complete%% *}"
44468       tmp="$complete EOL"
44469       arguments="${tmp#* }"
44470 
44471       # Cannot rely on the command "which" here since it doesn't always work.
44472       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44473       if test -z "$is_absolute_path"; then
44474         # Path to executable is not absolute. Find it.
44475         IFS_save="$IFS"
44476         IFS=:
44477         for p in $PATH; do
44478           if test -f "$p/$path" && test -x "$p/$path"; then
44479             new_path="$p/$path"
44480             break
44481           fi
44482         done
44483         IFS="$IFS_save"
44484       else
44485         # This is an absolute path, we can use it without further modifications.
44486         new_path="$path"
44487       fi
44488 
44489       if test "x$new_path" = x; then
44490         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44491 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44492         has_space=`$ECHO "$complete" | $GREP " "`
44493         if test "x$has_space" != x; then
44494           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44495 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44496         fi
44497         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44498       fi
44499     fi
44500 
44501     # Now join together the path and the arguments once again
44502     if test "x$arguments" != xEOL; then
44503       new_complete="$new_path ${arguments% *}"
44504     else
44505       new_complete="$new_path"
44506     fi
44507 
44508     if test "x$complete" != "x$new_complete"; then
44509       BUILD_CXX="$new_complete"
44510       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44511 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44512     fi
44513   fi
44514 
44515 
44516 
44517   # Publish this variable in the help.
44518 
44519 
44520   if [ -z "${BUILD_NM+x}" ]; then
44521     # The variable is not set by user, try to locate tool using the code snippet
44522     for ac_prog in nm gcc-nm
44523 do
44524   # Extract the first word of "$ac_prog", so it can be a program name with args.
44525 set dummy $ac_prog; ac_word=$2
44526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44527 $as_echo_n "checking for $ac_word... " >&6; }
44528 if ${ac_cv_path_BUILD_NM+:} false; then :
44529   $as_echo_n "(cached) " >&6
44530 else
44531   case $BUILD_NM in
44532   [\\/]* | ?:[\\/]*)
44533   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44534   ;;
44535   *)
44536   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44537 for as_dir in $PATH
44538 do
44539   IFS=$as_save_IFS
44540   test -z "$as_dir" && as_dir=.
44541     for ac_exec_ext in '' $ac_executable_extensions; do
44542   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44543     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44544     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44545     break 2
44546   fi
44547 done
44548   done
44549 IFS=$as_save_IFS
44550 
44551   ;;
44552 esac
44553 fi
44554 BUILD_NM=$ac_cv_path_BUILD_NM
44555 if test -n "$BUILD_NM"; then
44556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44557 $as_echo "$BUILD_NM" >&6; }
44558 else
44559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44560 $as_echo "no" >&6; }
44561 fi
44562 
44563 
44564   test -n "$BUILD_NM" && break
44565 done
44566 
44567   else
44568     # The variable is set, but is it from the command line or the environment?
44569 
44570     # Try to remove the string !BUILD_NM! from our list.
44571     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44572     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44573       # If it failed, the variable was not from the command line. Ignore it,
44574       # but warn the user (except for BASH, which is always set by the calling BASH).
44575       if test "xBUILD_NM" != xBASH; then
44576         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44577 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44578       fi
44579       # Try to locate tool using the code snippet
44580       for ac_prog in nm gcc-nm
44581 do
44582   # Extract the first word of "$ac_prog", so it can be a program name with args.
44583 set dummy $ac_prog; ac_word=$2
44584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44585 $as_echo_n "checking for $ac_word... " >&6; }
44586 if ${ac_cv_path_BUILD_NM+:} false; then :
44587   $as_echo_n "(cached) " >&6
44588 else
44589   case $BUILD_NM in
44590   [\\/]* | ?:[\\/]*)
44591   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44592   ;;
44593   *)
44594   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44595 for as_dir in $PATH
44596 do
44597   IFS=$as_save_IFS
44598   test -z "$as_dir" && as_dir=.
44599     for ac_exec_ext in '' $ac_executable_extensions; do
44600   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44601     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44603     break 2
44604   fi
44605 done
44606   done
44607 IFS=$as_save_IFS
44608 
44609   ;;
44610 esac
44611 fi
44612 BUILD_NM=$ac_cv_path_BUILD_NM
44613 if test -n "$BUILD_NM"; then
44614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44615 $as_echo "$BUILD_NM" >&6; }
44616 else
44617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44618 $as_echo "no" >&6; }
44619 fi
44620 
44621 
44622   test -n "$BUILD_NM" && break
44623 done
44624 
44625     else
44626       # If it succeeded, then it was overridden by the user. We will use it
44627       # for the tool.
44628 
44629       # First remove it from the list of overridden variables, so we can test
44630       # for unknown variables in the end.
44631       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44632 
44633       # Check if we try to supply an empty value
44634       if test "x$BUILD_NM" = x; then
44635         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44636 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44637         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44638 $as_echo_n "checking for BUILD_NM... " >&6; }
44639         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44640 $as_echo "disabled" >&6; }
44641       else
44642         # Check if the provided tool contains a complete path.
44643         tool_specified="$BUILD_NM"
44644         tool_basename="${tool_specified##*/}"
44645         if test "x$tool_basename" = "x$tool_specified"; then
44646           # A command without a complete path is provided, search $PATH.
44647           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44648 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44649           # Extract the first word of "$tool_basename", so it can be a program name with args.
44650 set dummy $tool_basename; ac_word=$2
44651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44652 $as_echo_n "checking for $ac_word... " >&6; }
44653 if ${ac_cv_path_BUILD_NM+:} false; then :
44654   $as_echo_n "(cached) " >&6
44655 else
44656   case $BUILD_NM in
44657   [\\/]* | ?:[\\/]*)
44658   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44659   ;;
44660   *)
44661   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44662 for as_dir in $PATH
44663 do
44664   IFS=$as_save_IFS
44665   test -z "$as_dir" && as_dir=.
44666     for ac_exec_ext in '' $ac_executable_extensions; do
44667   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44668     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44669     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44670     break 2
44671   fi
44672 done
44673   done
44674 IFS=$as_save_IFS
44675 
44676   ;;
44677 esac
44678 fi
44679 BUILD_NM=$ac_cv_path_BUILD_NM
44680 if test -n "$BUILD_NM"; then
44681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44682 $as_echo "$BUILD_NM" >&6; }
44683 else
44684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44685 $as_echo "no" >&6; }
44686 fi
44687 
44688 
44689           if test "x$BUILD_NM" = x; then
44690             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44691           fi
44692         else
44693           # Otherwise we believe it is a complete path. Use it as it is.
44694           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44695 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44696           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44697 $as_echo_n "checking for BUILD_NM... " >&6; }
44698           if test ! -x "$tool_specified"; then
44699             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44700 $as_echo "not found" >&6; }
44701             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44702           fi
44703           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44704 $as_echo "$tool_specified" >&6; }
44705         fi
44706       fi
44707     fi
44708 
44709   fi
44710 
44711 
44712 
44713   # Only process if variable expands to non-empty
44714 
44715   if test "x$BUILD_NM" != x; then
44716     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44717 
44718   # First separate the path from the arguments. This will split at the first
44719   # space.
44720   complete="$BUILD_NM"
44721   path="${complete%% *}"
44722   tmp="$complete EOL"
44723   arguments="${tmp#* }"
44724 
44725   # Input might be given as Windows format, start by converting to
44726   # unix format.
44727   new_path=`$CYGPATH -u "$path"`
44728 
44729   # Now try to locate executable using which
44730   new_path=`$WHICH "$new_path" 2> /dev/null`
44731   # bat and cmd files are not always considered executable in cygwin causing which
44732   # to not find them
44733   if test "x$new_path" = x \
44734       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44735       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44736     new_path=`$CYGPATH -u "$path"`
44737   fi
44738   if test "x$new_path" = x; then
44739     # Oops. Which didn't find the executable.
44740     # The splitting of arguments from the executable at a space might have been incorrect,
44741     # since paths with space are more likely in Windows. Give it another try with the whole
44742     # argument.
44743     path="$complete"
44744     arguments="EOL"
44745     new_path=`$CYGPATH -u "$path"`
44746     new_path=`$WHICH "$new_path" 2> /dev/null`
44747     # bat and cmd files are not always considered executable in cygwin causing which
44748     # to not find them
44749     if test "x$new_path" = x \
44750         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44751         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44752       new_path=`$CYGPATH -u "$path"`
44753     fi
44754     if test "x$new_path" = x; then
44755       # It's still not found. Now this is an unrecoverable error.
44756       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44757 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44758       has_space=`$ECHO "$complete" | $GREP " "`
44759       if test "x$has_space" != x; then
44760         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44761 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44762       fi
44763       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44764     fi
44765   fi
44766 
44767   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44768   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44769   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44770   # "foo.exe" is OK but "foo" is an error.
44771   #
44772   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44773   # It is also a way to make sure we got the proper file name for the real test later on.
44774   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44775   if test "x$test_shortpath" = x; then
44776     # Short path failed, file does not exist as specified.
44777     # Try adding .exe or .cmd
44778     if test -f "${new_path}.exe"; then
44779       input_to_shortpath="${new_path}.exe"
44780     elif test -f "${new_path}.cmd"; then
44781       input_to_shortpath="${new_path}.cmd"
44782     else
44783       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44784 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44785       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44786 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44787       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44788     fi
44789   else
44790     input_to_shortpath="$new_path"
44791   fi
44792 
44793   # Call helper function which possibly converts this using DOS-style short mode.
44794   # If so, the updated path is stored in $new_path.
44795   new_path="$input_to_shortpath"
44796 
44797   input_path="$input_to_shortpath"
44798   # Check if we need to convert this using DOS-style short mode. If the path
44799   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44800   # take no chances and rewrite it.
44801   # Note: m4 eats our [], so we need to use [ and ] instead.
44802   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44803   if test "x$has_forbidden_chars" != x; then
44804     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44805     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44806     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44807     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44808       # Going to short mode and back again did indeed matter. Since short mode is
44809       # case insensitive, let's make it lowercase to improve readability.
44810       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44811       # Now convert it back to Unix-style (cygpath)
44812       input_path=`$CYGPATH -u "$shortmode_path"`
44813       new_path="$input_path"
44814     fi
44815   fi
44816 
44817   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44818   if test "x$test_cygdrive_prefix" = x; then
44819     # As a simple fix, exclude /usr/bin since it's not a real path.
44820     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44821       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44822       # a path prefixed by /cygdrive for fixpath to work.
44823       new_path="$CYGWIN_ROOT_PATH$input_path"
44824     fi
44825   fi
44826 
44827   # remove trailing .exe if any
44828   new_path="${new_path/%.exe/}"
44829 
44830     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44831 
44832   # First separate the path from the arguments. This will split at the first
44833   # space.
44834   complete="$BUILD_NM"
44835   path="${complete%% *}"
44836   tmp="$complete EOL"
44837   arguments="${tmp#* }"
44838 
44839   # Input might be given as Windows format, start by converting to
44840   # unix format.
44841   new_path="$path"
44842 
44843   windows_path="$new_path"
44844   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44845     unix_path=`$CYGPATH -u "$windows_path"`
44846     new_path="$unix_path"
44847   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44848     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44849     new_path="$unix_path"
44850   fi
44851 
44852 
44853   # Now try to locate executable using which
44854   new_path=`$WHICH "$new_path" 2> /dev/null`
44855 
44856   if test "x$new_path" = x; then
44857     # Oops. Which didn't find the executable.
44858     # The splitting of arguments from the executable at a space might have been incorrect,
44859     # since paths with space are more likely in Windows. Give it another try with the whole
44860     # argument.
44861     path="$complete"
44862     arguments="EOL"
44863     new_path="$path"
44864 
44865   windows_path="$new_path"
44866   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44867     unix_path=`$CYGPATH -u "$windows_path"`
44868     new_path="$unix_path"
44869   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44870     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44871     new_path="$unix_path"
44872   fi
44873 
44874 
44875     new_path=`$WHICH "$new_path" 2> /dev/null`
44876     # bat and cmd files are not always considered executable in MSYS causing which
44877     # to not find them
44878     if test "x$new_path" = x \
44879         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44880         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44881       new_path="$path"
44882 
44883   windows_path="$new_path"
44884   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44885     unix_path=`$CYGPATH -u "$windows_path"`
44886     new_path="$unix_path"
44887   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44888     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44889     new_path="$unix_path"
44890   fi
44891 
44892     fi
44893 
44894     if test "x$new_path" = x; then
44895       # It's still not found. Now this is an unrecoverable error.
44896       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44897 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44898       has_space=`$ECHO "$complete" | $GREP " "`
44899       if test "x$has_space" != x; then
44900         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44901 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44902       fi
44903       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44904     fi
44905   fi
44906 
44907   # Now new_path has a complete unix path to the binary
44908   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44909     # Keep paths in /bin as-is, but remove trailing .exe if any
44910     new_path="${new_path/%.exe/}"
44911     # Do not save /bin paths to all_fixpath_prefixes!
44912   else
44913     # Not in mixed or Windows style, start by that.
44914     new_path=`cmd //c echo $new_path`
44915 
44916   input_path="$new_path"
44917   # Check if we need to convert this using DOS-style short mode. If the path
44918   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44919   # take no chances and rewrite it.
44920   # Note: m4 eats our [], so we need to use [ and ] instead.
44921   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44922   if test "x$has_forbidden_chars" != x; then
44923     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44924     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44925   fi
44926 
44927     # Output is in $new_path
44928 
44929   windows_path="$new_path"
44930   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44931     unix_path=`$CYGPATH -u "$windows_path"`
44932     new_path="$unix_path"
44933   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44934     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44935     new_path="$unix_path"
44936   fi
44937 
44938     # remove trailing .exe if any
44939     new_path="${new_path/%.exe/}"
44940 
44941     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44942     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44943   fi
44944 
44945     else
44946       # We're on a unix platform. Hooray! :)
44947       # First separate the path from the arguments. This will split at the first
44948       # space.
44949       complete="$BUILD_NM"
44950       path="${complete%% *}"
44951       tmp="$complete EOL"
44952       arguments="${tmp#* }"
44953 
44954       # Cannot rely on the command "which" here since it doesn't always work.
44955       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44956       if test -z "$is_absolute_path"; then
44957         # Path to executable is not absolute. Find it.
44958         IFS_save="$IFS"
44959         IFS=:
44960         for p in $PATH; do
44961           if test -f "$p/$path" && test -x "$p/$path"; then
44962             new_path="$p/$path"
44963             break
44964           fi
44965         done
44966         IFS="$IFS_save"
44967       else
44968         # This is an absolute path, we can use it without further modifications.
44969         new_path="$path"
44970       fi
44971 
44972       if test "x$new_path" = x; then
44973         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44974 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44975         has_space=`$ECHO "$complete" | $GREP " "`
44976         if test "x$has_space" != x; then
44977           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44978 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44979         fi
44980         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44981       fi
44982     fi
44983 
44984     # Now join together the path and the arguments once again
44985     if test "x$arguments" != xEOL; then
44986       new_complete="$new_path ${arguments% *}"
44987     else
44988       new_complete="$new_path"
44989     fi
44990 
44991     if test "x$complete" != "x$new_complete"; then
44992       BUILD_NM="$new_complete"
44993       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44994 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44995     fi
44996   fi
44997 
44998 
44999 
45000   # Publish this variable in the help.
45001 
45002 
45003   if [ -z "${BUILD_AR+x}" ]; then
45004     # The variable is not set by user, try to locate tool using the code snippet
45005     for ac_prog in ar gcc-ar
45006 do
45007   # Extract the first word of "$ac_prog", so it can be a program name with args.
45008 set dummy $ac_prog; ac_word=$2
45009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45010 $as_echo_n "checking for $ac_word... " >&6; }
45011 if ${ac_cv_path_BUILD_AR+:} false; then :
45012   $as_echo_n "(cached) " >&6
45013 else
45014   case $BUILD_AR in
45015   [\\/]* | ?:[\\/]*)
45016   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45017   ;;
45018   *)
45019   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45020 for as_dir in $PATH
45021 do
45022   IFS=$as_save_IFS
45023   test -z "$as_dir" && as_dir=.
45024     for ac_exec_ext in '' $ac_executable_extensions; do
45025   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45026     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45027     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45028     break 2
45029   fi
45030 done
45031   done
45032 IFS=$as_save_IFS
45033 
45034   ;;
45035 esac
45036 fi
45037 BUILD_AR=$ac_cv_path_BUILD_AR
45038 if test -n "$BUILD_AR"; then
45039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45040 $as_echo "$BUILD_AR" >&6; }
45041 else
45042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45043 $as_echo "no" >&6; }
45044 fi
45045 
45046 
45047   test -n "$BUILD_AR" && break
45048 done
45049 
45050   else
45051     # The variable is set, but is it from the command line or the environment?
45052 
45053     # Try to remove the string !BUILD_AR! from our list.
45054     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45055     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45056       # If it failed, the variable was not from the command line. Ignore it,
45057       # but warn the user (except for BASH, which is always set by the calling BASH).
45058       if test "xBUILD_AR" != xBASH; then
45059         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45060 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45061       fi
45062       # Try to locate tool using the code snippet
45063       for ac_prog in ar gcc-ar
45064 do
45065   # Extract the first word of "$ac_prog", so it can be a program name with args.
45066 set dummy $ac_prog; ac_word=$2
45067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45068 $as_echo_n "checking for $ac_word... " >&6; }
45069 if ${ac_cv_path_BUILD_AR+:} false; then :
45070   $as_echo_n "(cached) " >&6
45071 else
45072   case $BUILD_AR in
45073   [\\/]* | ?:[\\/]*)
45074   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45075   ;;
45076   *)
45077   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45078 for as_dir in $PATH
45079 do
45080   IFS=$as_save_IFS
45081   test -z "$as_dir" && as_dir=.
45082     for ac_exec_ext in '' $ac_executable_extensions; do
45083   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45084     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45085     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45086     break 2
45087   fi
45088 done
45089   done
45090 IFS=$as_save_IFS
45091 
45092   ;;
45093 esac
45094 fi
45095 BUILD_AR=$ac_cv_path_BUILD_AR
45096 if test -n "$BUILD_AR"; then
45097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45098 $as_echo "$BUILD_AR" >&6; }
45099 else
45100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45101 $as_echo "no" >&6; }
45102 fi
45103 
45104 
45105   test -n "$BUILD_AR" && break
45106 done
45107 
45108     else
45109       # If it succeeded, then it was overridden by the user. We will use it
45110       # for the tool.
45111 
45112       # First remove it from the list of overridden variables, so we can test
45113       # for unknown variables in the end.
45114       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45115 
45116       # Check if we try to supply an empty value
45117       if test "x$BUILD_AR" = x; then
45118         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45119 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45120         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45121 $as_echo_n "checking for BUILD_AR... " >&6; }
45122         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45123 $as_echo "disabled" >&6; }
45124       else
45125         # Check if the provided tool contains a complete path.
45126         tool_specified="$BUILD_AR"
45127         tool_basename="${tool_specified##*/}"
45128         if test "x$tool_basename" = "x$tool_specified"; then
45129           # A command without a complete path is provided, search $PATH.
45130           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45131 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45132           # Extract the first word of "$tool_basename", so it can be a program name with args.
45133 set dummy $tool_basename; ac_word=$2
45134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45135 $as_echo_n "checking for $ac_word... " >&6; }
45136 if ${ac_cv_path_BUILD_AR+:} false; then :
45137   $as_echo_n "(cached) " >&6
45138 else
45139   case $BUILD_AR in
45140   [\\/]* | ?:[\\/]*)
45141   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45142   ;;
45143   *)
45144   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45145 for as_dir in $PATH
45146 do
45147   IFS=$as_save_IFS
45148   test -z "$as_dir" && as_dir=.
45149     for ac_exec_ext in '' $ac_executable_extensions; do
45150   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45151     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45152     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45153     break 2
45154   fi
45155 done
45156   done
45157 IFS=$as_save_IFS
45158 
45159   ;;
45160 esac
45161 fi
45162 BUILD_AR=$ac_cv_path_BUILD_AR
45163 if test -n "$BUILD_AR"; then
45164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45165 $as_echo "$BUILD_AR" >&6; }
45166 else
45167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45168 $as_echo "no" >&6; }
45169 fi
45170 
45171 
45172           if test "x$BUILD_AR" = x; then
45173             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45174           fi
45175         else
45176           # Otherwise we believe it is a complete path. Use it as it is.
45177           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45178 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45179           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45180 $as_echo_n "checking for BUILD_AR... " >&6; }
45181           if test ! -x "$tool_specified"; then
45182             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45183 $as_echo "not found" >&6; }
45184             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45185           fi
45186           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45187 $as_echo "$tool_specified" >&6; }
45188         fi
45189       fi
45190     fi
45191 
45192   fi
45193 
45194 
45195 
45196   # Only process if variable expands to non-empty
45197 
45198   if test "x$BUILD_AR" != x; then
45199     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45200 
45201   # First separate the path from the arguments. This will split at the first
45202   # space.
45203   complete="$BUILD_AR"
45204   path="${complete%% *}"
45205   tmp="$complete EOL"
45206   arguments="${tmp#* }"
45207 
45208   # Input might be given as Windows format, start by converting to
45209   # unix format.
45210   new_path=`$CYGPATH -u "$path"`
45211 
45212   # Now try to locate executable using which
45213   new_path=`$WHICH "$new_path" 2> /dev/null`
45214   # bat and cmd files are not always considered executable in cygwin causing which
45215   # to not find them
45216   if test "x$new_path" = x \
45217       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45218       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45219     new_path=`$CYGPATH -u "$path"`
45220   fi
45221   if test "x$new_path" = x; then
45222     # Oops. Which didn't find the executable.
45223     # The splitting of arguments from the executable at a space might have been incorrect,
45224     # since paths with space are more likely in Windows. Give it another try with the whole
45225     # argument.
45226     path="$complete"
45227     arguments="EOL"
45228     new_path=`$CYGPATH -u "$path"`
45229     new_path=`$WHICH "$new_path" 2> /dev/null`
45230     # bat and cmd files are not always considered executable in cygwin causing which
45231     # to not find them
45232     if test "x$new_path" = x \
45233         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45234         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45235       new_path=`$CYGPATH -u "$path"`
45236     fi
45237     if test "x$new_path" = x; then
45238       # It's still not found. Now this is an unrecoverable error.
45239       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45240 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45241       has_space=`$ECHO "$complete" | $GREP " "`
45242       if test "x$has_space" != x; then
45243         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45244 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45245       fi
45246       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45247     fi
45248   fi
45249 
45250   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45251   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45252   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45253   # "foo.exe" is OK but "foo" is an error.
45254   #
45255   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45256   # It is also a way to make sure we got the proper file name for the real test later on.
45257   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45258   if test "x$test_shortpath" = x; then
45259     # Short path failed, file does not exist as specified.
45260     # Try adding .exe or .cmd
45261     if test -f "${new_path}.exe"; then
45262       input_to_shortpath="${new_path}.exe"
45263     elif test -f "${new_path}.cmd"; then
45264       input_to_shortpath="${new_path}.cmd"
45265     else
45266       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45267 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45268       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45269 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45270       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45271     fi
45272   else
45273     input_to_shortpath="$new_path"
45274   fi
45275 
45276   # Call helper function which possibly converts this using DOS-style short mode.
45277   # If so, the updated path is stored in $new_path.
45278   new_path="$input_to_shortpath"
45279 
45280   input_path="$input_to_shortpath"
45281   # Check if we need to convert this using DOS-style short mode. If the path
45282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45283   # take no chances and rewrite it.
45284   # Note: m4 eats our [], so we need to use [ and ] instead.
45285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45286   if test "x$has_forbidden_chars" != x; then
45287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45288     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45289     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45290     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45291       # Going to short mode and back again did indeed matter. Since short mode is
45292       # case insensitive, let's make it lowercase to improve readability.
45293       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45294       # Now convert it back to Unix-style (cygpath)
45295       input_path=`$CYGPATH -u "$shortmode_path"`
45296       new_path="$input_path"
45297     fi
45298   fi
45299 
45300   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45301   if test "x$test_cygdrive_prefix" = x; then
45302     # As a simple fix, exclude /usr/bin since it's not a real path.
45303     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45304       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45305       # a path prefixed by /cygdrive for fixpath to work.
45306       new_path="$CYGWIN_ROOT_PATH$input_path"
45307     fi
45308   fi
45309 
45310   # remove trailing .exe if any
45311   new_path="${new_path/%.exe/}"
45312 
45313     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45314 
45315   # First separate the path from the arguments. This will split at the first
45316   # space.
45317   complete="$BUILD_AR"
45318   path="${complete%% *}"
45319   tmp="$complete EOL"
45320   arguments="${tmp#* }"
45321 
45322   # Input might be given as Windows format, start by converting to
45323   # unix format.
45324   new_path="$path"
45325 
45326   windows_path="$new_path"
45327   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45328     unix_path=`$CYGPATH -u "$windows_path"`
45329     new_path="$unix_path"
45330   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45331     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45332     new_path="$unix_path"
45333   fi
45334 
45335 
45336   # Now try to locate executable using which
45337   new_path=`$WHICH "$new_path" 2> /dev/null`
45338 
45339   if test "x$new_path" = x; then
45340     # Oops. Which didn't find the executable.
45341     # The splitting of arguments from the executable at a space might have been incorrect,
45342     # since paths with space are more likely in Windows. Give it another try with the whole
45343     # argument.
45344     path="$complete"
45345     arguments="EOL"
45346     new_path="$path"
45347 
45348   windows_path="$new_path"
45349   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45350     unix_path=`$CYGPATH -u "$windows_path"`
45351     new_path="$unix_path"
45352   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45353     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45354     new_path="$unix_path"
45355   fi
45356 
45357 
45358     new_path=`$WHICH "$new_path" 2> /dev/null`
45359     # bat and cmd files are not always considered executable in MSYS causing which
45360     # to not find them
45361     if test "x$new_path" = x \
45362         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45363         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45364       new_path="$path"
45365 
45366   windows_path="$new_path"
45367   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45368     unix_path=`$CYGPATH -u "$windows_path"`
45369     new_path="$unix_path"
45370   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45371     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45372     new_path="$unix_path"
45373   fi
45374 
45375     fi
45376 
45377     if test "x$new_path" = x; then
45378       # It's still not found. Now this is an unrecoverable error.
45379       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45380 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45381       has_space=`$ECHO "$complete" | $GREP " "`
45382       if test "x$has_space" != x; then
45383         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45384 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45385       fi
45386       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45387     fi
45388   fi
45389 
45390   # Now new_path has a complete unix path to the binary
45391   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45392     # Keep paths in /bin as-is, but remove trailing .exe if any
45393     new_path="${new_path/%.exe/}"
45394     # Do not save /bin paths to all_fixpath_prefixes!
45395   else
45396     # Not in mixed or Windows style, start by that.
45397     new_path=`cmd //c echo $new_path`
45398 
45399   input_path="$new_path"
45400   # Check if we need to convert this using DOS-style short mode. If the path
45401   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45402   # take no chances and rewrite it.
45403   # Note: m4 eats our [], so we need to use [ and ] instead.
45404   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45405   if test "x$has_forbidden_chars" != x; then
45406     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45407     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45408   fi
45409 
45410     # Output is in $new_path
45411 
45412   windows_path="$new_path"
45413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45414     unix_path=`$CYGPATH -u "$windows_path"`
45415     new_path="$unix_path"
45416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45417     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45418     new_path="$unix_path"
45419   fi
45420 
45421     # remove trailing .exe if any
45422     new_path="${new_path/%.exe/}"
45423 
45424     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45425     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45426   fi
45427 
45428     else
45429       # We're on a unix platform. Hooray! :)
45430       # First separate the path from the arguments. This will split at the first
45431       # space.
45432       complete="$BUILD_AR"
45433       path="${complete%% *}"
45434       tmp="$complete EOL"
45435       arguments="${tmp#* }"
45436 
45437       # Cannot rely on the command "which" here since it doesn't always work.
45438       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45439       if test -z "$is_absolute_path"; then
45440         # Path to executable is not absolute. Find it.
45441         IFS_save="$IFS"
45442         IFS=:
45443         for p in $PATH; do
45444           if test -f "$p/$path" && test -x "$p/$path"; then
45445             new_path="$p/$path"
45446             break
45447           fi
45448         done
45449         IFS="$IFS_save"
45450       else
45451         # This is an absolute path, we can use it without further modifications.
45452         new_path="$path"
45453       fi
45454 
45455       if test "x$new_path" = x; then
45456         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45457 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45458         has_space=`$ECHO "$complete" | $GREP " "`
45459         if test "x$has_space" != x; then
45460           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45461 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45462         fi
45463         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45464       fi
45465     fi
45466 
45467     # Now join together the path and the arguments once again
45468     if test "x$arguments" != xEOL; then
45469       new_complete="$new_path ${arguments% *}"
45470     else
45471       new_complete="$new_path"
45472     fi
45473 
45474     if test "x$complete" != "x$new_complete"; then
45475       BUILD_AR="$new_complete"
45476       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45477 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45478     fi
45479   fi
45480 
45481 
45482 
45483   # Publish this variable in the help.
45484 
45485 
45486   if [ -z "${BUILD_OBJCOPY+x}" ]; then
45487     # The variable is not set by user, try to locate tool using the code snippet
45488     for ac_prog in objcopy
45489 do
45490   # Extract the first word of "$ac_prog", so it can be a program name with args.
45491 set dummy $ac_prog; ac_word=$2
45492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45493 $as_echo_n "checking for $ac_word... " >&6; }
45494 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45495   $as_echo_n "(cached) " >&6
45496 else
45497   case $BUILD_OBJCOPY in
45498   [\\/]* | ?:[\\/]*)
45499   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45500   ;;
45501   *)
45502   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45503 for as_dir in $PATH
45504 do
45505   IFS=$as_save_IFS
45506   test -z "$as_dir" && as_dir=.
45507     for ac_exec_ext in '' $ac_executable_extensions; do
45508   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45509     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45510     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45511     break 2
45512   fi
45513 done
45514   done
45515 IFS=$as_save_IFS
45516 
45517   ;;
45518 esac
45519 fi
45520 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45521 if test -n "$BUILD_OBJCOPY"; then
45522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45523 $as_echo "$BUILD_OBJCOPY" >&6; }
45524 else
45525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45526 $as_echo "no" >&6; }
45527 fi
45528 
45529 
45530   test -n "$BUILD_OBJCOPY" && break
45531 done
45532 
45533   else
45534     # The variable is set, but is it from the command line or the environment?
45535 
45536     # Try to remove the string !BUILD_OBJCOPY! from our list.
45537     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
45538     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45539       # If it failed, the variable was not from the command line. Ignore it,
45540       # but warn the user (except for BASH, which is always set by the calling BASH).
45541       if test "xBUILD_OBJCOPY" != xBASH; then
45542         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
45543 $as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
45544       fi
45545       # Try to locate tool using the code snippet
45546       for ac_prog in objcopy
45547 do
45548   # Extract the first word of "$ac_prog", so it can be a program name with args.
45549 set dummy $ac_prog; ac_word=$2
45550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45551 $as_echo_n "checking for $ac_word... " >&6; }
45552 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45553   $as_echo_n "(cached) " >&6
45554 else
45555   case $BUILD_OBJCOPY in
45556   [\\/]* | ?:[\\/]*)
45557   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45558   ;;
45559   *)
45560   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45561 for as_dir in $PATH
45562 do
45563   IFS=$as_save_IFS
45564   test -z "$as_dir" && as_dir=.
45565     for ac_exec_ext in '' $ac_executable_extensions; do
45566   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45567     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45569     break 2
45570   fi
45571 done
45572   done
45573 IFS=$as_save_IFS
45574 
45575   ;;
45576 esac
45577 fi
45578 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45579 if test -n "$BUILD_OBJCOPY"; then
45580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45581 $as_echo "$BUILD_OBJCOPY" >&6; }
45582 else
45583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45584 $as_echo "no" >&6; }
45585 fi
45586 
45587 
45588   test -n "$BUILD_OBJCOPY" && break
45589 done
45590 
45591     else
45592       # If it succeeded, then it was overridden by the user. We will use it
45593       # for the tool.
45594 
45595       # First remove it from the list of overridden variables, so we can test
45596       # for unknown variables in the end.
45597       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45598 
45599       # Check if we try to supply an empty value
45600       if test "x$BUILD_OBJCOPY" = x; then
45601         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
45602 $as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
45603         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45604 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45605         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45606 $as_echo "disabled" >&6; }
45607       else
45608         # Check if the provided tool contains a complete path.
45609         tool_specified="$BUILD_OBJCOPY"
45610         tool_basename="${tool_specified##*/}"
45611         if test "x$tool_basename" = "x$tool_specified"; then
45612           # A command without a complete path is provided, search $PATH.
45613           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
45614 $as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
45615           # Extract the first word of "$tool_basename", so it can be a program name with args.
45616 set dummy $tool_basename; ac_word=$2
45617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45618 $as_echo_n "checking for $ac_word... " >&6; }
45619 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45620   $as_echo_n "(cached) " >&6
45621 else
45622   case $BUILD_OBJCOPY in
45623   [\\/]* | ?:[\\/]*)
45624   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45625   ;;
45626   *)
45627   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45628 for as_dir in $PATH
45629 do
45630   IFS=$as_save_IFS
45631   test -z "$as_dir" && as_dir=.
45632     for ac_exec_ext in '' $ac_executable_extensions; do
45633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45634     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45636     break 2
45637   fi
45638 done
45639   done
45640 IFS=$as_save_IFS
45641 
45642   ;;
45643 esac
45644 fi
45645 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45646 if test -n "$BUILD_OBJCOPY"; then
45647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45648 $as_echo "$BUILD_OBJCOPY" >&6; }
45649 else
45650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45651 $as_echo "no" >&6; }
45652 fi
45653 
45654 
45655           if test "x$BUILD_OBJCOPY" = x; then
45656             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45657           fi
45658         else
45659           # Otherwise we believe it is a complete path. Use it as it is.
45660           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
45661 $as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
45662           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45663 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45664           if test ! -x "$tool_specified"; then
45665             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45666 $as_echo "not found" >&6; }
45667             as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
45668           fi
45669           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45670 $as_echo "$tool_specified" >&6; }
45671         fi
45672       fi
45673     fi
45674 
45675   fi
45676 
45677 
45678 
45679   # Only process if variable expands to non-empty
45680 
45681   if test "x$BUILD_OBJCOPY" != x; then
45682     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45683 
45684   # First separate the path from the arguments. This will split at the first
45685   # space.
45686   complete="$BUILD_OBJCOPY"
45687   path="${complete%% *}"
45688   tmp="$complete EOL"
45689   arguments="${tmp#* }"
45690 
45691   # Input might be given as Windows format, start by converting to
45692   # unix format.
45693   new_path=`$CYGPATH -u "$path"`
45694 
45695   # Now try to locate executable using which
45696   new_path=`$WHICH "$new_path" 2> /dev/null`
45697   # bat and cmd files are not always considered executable in cygwin causing which
45698   # to not find them
45699   if test "x$new_path" = x \
45700       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45701       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45702     new_path=`$CYGPATH -u "$path"`
45703   fi
45704   if test "x$new_path" = x; then
45705     # Oops. Which didn't find the executable.
45706     # The splitting of arguments from the executable at a space might have been incorrect,
45707     # since paths with space are more likely in Windows. Give it another try with the whole
45708     # argument.
45709     path="$complete"
45710     arguments="EOL"
45711     new_path=`$CYGPATH -u "$path"`
45712     new_path=`$WHICH "$new_path" 2> /dev/null`
45713     # bat and cmd files are not always considered executable in cygwin causing which
45714     # to not find them
45715     if test "x$new_path" = x \
45716         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45717         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45718       new_path=`$CYGPATH -u "$path"`
45719     fi
45720     if test "x$new_path" = x; then
45721       # It's still not found. Now this is an unrecoverable error.
45722       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45723 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45724       has_space=`$ECHO "$complete" | $GREP " "`
45725       if test "x$has_space" != x; then
45726         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45727 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45728       fi
45729       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45730     fi
45731   fi
45732 
45733   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45734   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45735   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45736   # "foo.exe" is OK but "foo" is an error.
45737   #
45738   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45739   # It is also a way to make sure we got the proper file name for the real test later on.
45740   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45741   if test "x$test_shortpath" = x; then
45742     # Short path failed, file does not exist as specified.
45743     # Try adding .exe or .cmd
45744     if test -f "${new_path}.exe"; then
45745       input_to_shortpath="${new_path}.exe"
45746     elif test -f "${new_path}.cmd"; then
45747       input_to_shortpath="${new_path}.cmd"
45748     else
45749       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
45750 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
45751       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45752 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45753       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45754     fi
45755   else
45756     input_to_shortpath="$new_path"
45757   fi
45758 
45759   # Call helper function which possibly converts this using DOS-style short mode.
45760   # If so, the updated path is stored in $new_path.
45761   new_path="$input_to_shortpath"
45762 
45763   input_path="$input_to_shortpath"
45764   # Check if we need to convert this using DOS-style short mode. If the path
45765   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45766   # take no chances and rewrite it.
45767   # Note: m4 eats our [], so we need to use [ and ] instead.
45768   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45769   if test "x$has_forbidden_chars" != x; then
45770     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45771     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45772     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45773     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45774       # Going to short mode and back again did indeed matter. Since short mode is
45775       # case insensitive, let's make it lowercase to improve readability.
45776       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45777       # Now convert it back to Unix-style (cygpath)
45778       input_path=`$CYGPATH -u "$shortmode_path"`
45779       new_path="$input_path"
45780     fi
45781   fi
45782 
45783   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45784   if test "x$test_cygdrive_prefix" = x; then
45785     # As a simple fix, exclude /usr/bin since it's not a real path.
45786     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45787       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45788       # a path prefixed by /cygdrive for fixpath to work.
45789       new_path="$CYGWIN_ROOT_PATH$input_path"
45790     fi
45791   fi
45792 
45793   # remove trailing .exe if any
45794   new_path="${new_path/%.exe/}"
45795 
45796     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45797 
45798   # First separate the path from the arguments. This will split at the first
45799   # space.
45800   complete="$BUILD_OBJCOPY"
45801   path="${complete%% *}"
45802   tmp="$complete EOL"
45803   arguments="${tmp#* }"
45804 
45805   # Input might be given as Windows format, start by converting to
45806   # unix format.
45807   new_path="$path"
45808 
45809   windows_path="$new_path"
45810   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45811     unix_path=`$CYGPATH -u "$windows_path"`
45812     new_path="$unix_path"
45813   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45814     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45815     new_path="$unix_path"
45816   fi
45817 
45818 
45819   # Now try to locate executable using which
45820   new_path=`$WHICH "$new_path" 2> /dev/null`
45821 
45822   if test "x$new_path" = x; then
45823     # Oops. Which didn't find the executable.
45824     # The splitting of arguments from the executable at a space might have been incorrect,
45825     # since paths with space are more likely in Windows. Give it another try with the whole
45826     # argument.
45827     path="$complete"
45828     arguments="EOL"
45829     new_path="$path"
45830 
45831   windows_path="$new_path"
45832   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45833     unix_path=`$CYGPATH -u "$windows_path"`
45834     new_path="$unix_path"
45835   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45836     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45837     new_path="$unix_path"
45838   fi
45839 
45840 
45841     new_path=`$WHICH "$new_path" 2> /dev/null`
45842     # bat and cmd files are not always considered executable in MSYS causing which
45843     # to not find them
45844     if test "x$new_path" = x \
45845         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45846         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45847       new_path="$path"
45848 
45849   windows_path="$new_path"
45850   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45851     unix_path=`$CYGPATH -u "$windows_path"`
45852     new_path="$unix_path"
45853   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45854     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45855     new_path="$unix_path"
45856   fi
45857 
45858     fi
45859 
45860     if test "x$new_path" = x; then
45861       # It's still not found. Now this is an unrecoverable error.
45862       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45863 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45864       has_space=`$ECHO "$complete" | $GREP " "`
45865       if test "x$has_space" != x; then
45866         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45867 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45868       fi
45869       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45870     fi
45871   fi
45872 
45873   # Now new_path has a complete unix path to the binary
45874   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45875     # Keep paths in /bin as-is, but remove trailing .exe if any
45876     new_path="${new_path/%.exe/}"
45877     # Do not save /bin paths to all_fixpath_prefixes!
45878   else
45879     # Not in mixed or Windows style, start by that.
45880     new_path=`cmd //c echo $new_path`
45881 
45882   input_path="$new_path"
45883   # Check if we need to convert this using DOS-style short mode. If the path
45884   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45885   # take no chances and rewrite it.
45886   # Note: m4 eats our [], so we need to use [ and ] instead.
45887   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45888   if test "x$has_forbidden_chars" != x; then
45889     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45890     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45891   fi
45892 
45893     # Output is in $new_path
45894 
45895   windows_path="$new_path"
45896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45897     unix_path=`$CYGPATH -u "$windows_path"`
45898     new_path="$unix_path"
45899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45900     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45901     new_path="$unix_path"
45902   fi
45903 
45904     # remove trailing .exe if any
45905     new_path="${new_path/%.exe/}"
45906 
45907     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45908     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45909   fi
45910 
45911     else
45912       # We're on a unix platform. Hooray! :)
45913       # First separate the path from the arguments. This will split at the first
45914       # space.
45915       complete="$BUILD_OBJCOPY"
45916       path="${complete%% *}"
45917       tmp="$complete EOL"
45918       arguments="${tmp#* }"
45919 
45920       # Cannot rely on the command "which" here since it doesn't always work.
45921       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45922       if test -z "$is_absolute_path"; then
45923         # Path to executable is not absolute. Find it.
45924         IFS_save="$IFS"
45925         IFS=:
45926         for p in $PATH; do
45927           if test -f "$p/$path" && test -x "$p/$path"; then
45928             new_path="$p/$path"
45929             break
45930           fi
45931         done
45932         IFS="$IFS_save"
45933       else
45934         # This is an absolute path, we can use it without further modifications.
45935         new_path="$path"
45936       fi
45937 
45938       if test "x$new_path" = x; then
45939         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45940 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45941         has_space=`$ECHO "$complete" | $GREP " "`
45942         if test "x$has_space" != x; then
45943           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45944 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45945         fi
45946         as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45947       fi
45948     fi
45949 
45950     # Now join together the path and the arguments once again
45951     if test "x$arguments" != xEOL; then
45952       new_complete="$new_path ${arguments% *}"
45953     else
45954       new_complete="$new_path"
45955     fi
45956 
45957     if test "x$complete" != "x$new_complete"; then
45958       BUILD_OBJCOPY="$new_complete"
45959       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
45960 $as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
45961     fi
45962   fi
45963 
45964 
45965 
45966   # Publish this variable in the help.
45967 
45968 
45969   if [ -z "${BUILD_STRIP+x}" ]; then
45970     # The variable is not set by user, try to locate tool using the code snippet
45971     for ac_prog in strip
45972 do
45973   # Extract the first word of "$ac_prog", so it can be a program name with args.
45974 set dummy $ac_prog; ac_word=$2
45975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45976 $as_echo_n "checking for $ac_word... " >&6; }
45977 if ${ac_cv_path_BUILD_STRIP+:} false; then :
45978   $as_echo_n "(cached) " >&6
45979 else
45980   case $BUILD_STRIP in
45981   [\\/]* | ?:[\\/]*)
45982   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
45983   ;;
45984   *)
45985   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45986 for as_dir in $PATH
45987 do
45988   IFS=$as_save_IFS
45989   test -z "$as_dir" && as_dir=.
45990     for ac_exec_ext in '' $ac_executable_extensions; do
45991   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45992     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
45993     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45994     break 2
45995   fi
45996 done
45997   done
45998 IFS=$as_save_IFS
45999 
46000   ;;
46001 esac
46002 fi
46003 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46004 if test -n "$BUILD_STRIP"; then
46005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46006 $as_echo "$BUILD_STRIP" >&6; }
46007 else
46008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46009 $as_echo "no" >&6; }
46010 fi
46011 
46012 
46013   test -n "$BUILD_STRIP" && break
46014 done
46015 
46016   else
46017     # The variable is set, but is it from the command line or the environment?
46018 
46019     # Try to remove the string !BUILD_STRIP! from our list.
46020     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46021     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46022       # If it failed, the variable was not from the command line. Ignore it,
46023       # but warn the user (except for BASH, which is always set by the calling BASH).
46024       if test "xBUILD_STRIP" != xBASH; then
46025         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46026 $as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46027       fi
46028       # Try to locate tool using the code snippet
46029       for ac_prog in strip
46030 do
46031   # Extract the first word of "$ac_prog", so it can be a program name with args.
46032 set dummy $ac_prog; ac_word=$2
46033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46034 $as_echo_n "checking for $ac_word... " >&6; }
46035 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46036   $as_echo_n "(cached) " >&6
46037 else
46038   case $BUILD_STRIP in
46039   [\\/]* | ?:[\\/]*)
46040   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46041   ;;
46042   *)
46043   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46044 for as_dir in $PATH
46045 do
46046   IFS=$as_save_IFS
46047   test -z "$as_dir" && as_dir=.
46048     for ac_exec_ext in '' $ac_executable_extensions; do
46049   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46050     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46051     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46052     break 2
46053   fi
46054 done
46055   done
46056 IFS=$as_save_IFS
46057 
46058   ;;
46059 esac
46060 fi
46061 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46062 if test -n "$BUILD_STRIP"; then
46063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46064 $as_echo "$BUILD_STRIP" >&6; }
46065 else
46066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46067 $as_echo "no" >&6; }
46068 fi
46069 
46070 
46071   test -n "$BUILD_STRIP" && break
46072 done
46073 
46074     else
46075       # If it succeeded, then it was overridden by the user. We will use it
46076       # for the tool.
46077 
46078       # First remove it from the list of overridden variables, so we can test
46079       # for unknown variables in the end.
46080       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46081 
46082       # Check if we try to supply an empty value
46083       if test "x$BUILD_STRIP" = x; then
46084         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46085 $as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46086         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46087 $as_echo_n "checking for BUILD_STRIP... " >&6; }
46088         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46089 $as_echo "disabled" >&6; }
46090       else
46091         # Check if the provided tool contains a complete path.
46092         tool_specified="$BUILD_STRIP"
46093         tool_basename="${tool_specified##*/}"
46094         if test "x$tool_basename" = "x$tool_specified"; then
46095           # A command without a complete path is provided, search $PATH.
46096           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46097 $as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46098           # Extract the first word of "$tool_basename", so it can be a program name with args.
46099 set dummy $tool_basename; ac_word=$2
46100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46101 $as_echo_n "checking for $ac_word... " >&6; }
46102 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46103   $as_echo_n "(cached) " >&6
46104 else
46105   case $BUILD_STRIP in
46106   [\\/]* | ?:[\\/]*)
46107   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46108   ;;
46109   *)
46110   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46111 for as_dir in $PATH
46112 do
46113   IFS=$as_save_IFS
46114   test -z "$as_dir" && as_dir=.
46115     for ac_exec_ext in '' $ac_executable_extensions; do
46116   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46117     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46118     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46119     break 2
46120   fi
46121 done
46122   done
46123 IFS=$as_save_IFS
46124 
46125   ;;
46126 esac
46127 fi
46128 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46129 if test -n "$BUILD_STRIP"; then
46130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46131 $as_echo "$BUILD_STRIP" >&6; }
46132 else
46133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46134 $as_echo "no" >&6; }
46135 fi
46136 
46137 
46138           if test "x$BUILD_STRIP" = x; then
46139             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46140           fi
46141         else
46142           # Otherwise we believe it is a complete path. Use it as it is.
46143           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46144 $as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46145           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46146 $as_echo_n "checking for BUILD_STRIP... " >&6; }
46147           if test ! -x "$tool_specified"; then
46148             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46149 $as_echo "not found" >&6; }
46150             as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46151           fi
46152           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46153 $as_echo "$tool_specified" >&6; }
46154         fi
46155       fi
46156     fi
46157 
46158   fi
46159 
46160 
46161 
46162   # Only process if variable expands to non-empty
46163 
46164   if test "x$BUILD_STRIP" != x; then
46165     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46166 
46167   # First separate the path from the arguments. This will split at the first
46168   # space.
46169   complete="$BUILD_STRIP"
46170   path="${complete%% *}"
46171   tmp="$complete EOL"
46172   arguments="${tmp#* }"
46173 
46174   # Input might be given as Windows format, start by converting to
46175   # unix format.
46176   new_path=`$CYGPATH -u "$path"`
46177 
46178   # Now try to locate executable using which
46179   new_path=`$WHICH "$new_path" 2> /dev/null`
46180   # bat and cmd files are not always considered executable in cygwin causing which
46181   # to not find them
46182   if test "x$new_path" = x \
46183       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46184       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46185     new_path=`$CYGPATH -u "$path"`
46186   fi
46187   if test "x$new_path" = x; then
46188     # Oops. Which didn't find the executable.
46189     # The splitting of arguments from the executable at a space might have been incorrect,
46190     # since paths with space are more likely in Windows. Give it another try with the whole
46191     # argument.
46192     path="$complete"
46193     arguments="EOL"
46194     new_path=`$CYGPATH -u "$path"`
46195     new_path=`$WHICH "$new_path" 2> /dev/null`
46196     # bat and cmd files are not always considered executable in cygwin causing which
46197     # to not find them
46198     if test "x$new_path" = x \
46199         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46200         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46201       new_path=`$CYGPATH -u "$path"`
46202     fi
46203     if test "x$new_path" = x; then
46204       # It's still not found. Now this is an unrecoverable error.
46205       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46206 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46207       has_space=`$ECHO "$complete" | $GREP " "`
46208       if test "x$has_space" != x; then
46209         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46210 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46211       fi
46212       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46213     fi
46214   fi
46215 
46216   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46217   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46218   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46219   # "foo.exe" is OK but "foo" is an error.
46220   #
46221   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46222   # It is also a way to make sure we got the proper file name for the real test later on.
46223   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46224   if test "x$test_shortpath" = x; then
46225     # Short path failed, file does not exist as specified.
46226     # Try adding .exe or .cmd
46227     if test -f "${new_path}.exe"; then
46228       input_to_shortpath="${new_path}.exe"
46229     elif test -f "${new_path}.cmd"; then
46230       input_to_shortpath="${new_path}.cmd"
46231     else
46232       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46233 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46234       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46235 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46236       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46237     fi
46238   else
46239     input_to_shortpath="$new_path"
46240   fi
46241 
46242   # Call helper function which possibly converts this using DOS-style short mode.
46243   # If so, the updated path is stored in $new_path.
46244   new_path="$input_to_shortpath"
46245 
46246   input_path="$input_to_shortpath"
46247   # Check if we need to convert this using DOS-style short mode. If the path
46248   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46249   # take no chances and rewrite it.
46250   # Note: m4 eats our [], so we need to use [ and ] instead.
46251   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46252   if test "x$has_forbidden_chars" != x; then
46253     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46254     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46255     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46256     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46257       # Going to short mode and back again did indeed matter. Since short mode is
46258       # case insensitive, let's make it lowercase to improve readability.
46259       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46260       # Now convert it back to Unix-style (cygpath)
46261       input_path=`$CYGPATH -u "$shortmode_path"`
46262       new_path="$input_path"
46263     fi
46264   fi
46265 
46266   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46267   if test "x$test_cygdrive_prefix" = x; then
46268     # As a simple fix, exclude /usr/bin since it's not a real path.
46269     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46270       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46271       # a path prefixed by /cygdrive for fixpath to work.
46272       new_path="$CYGWIN_ROOT_PATH$input_path"
46273     fi
46274   fi
46275 
46276   # remove trailing .exe if any
46277   new_path="${new_path/%.exe/}"
46278 
46279     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46280 
46281   # First separate the path from the arguments. This will split at the first
46282   # space.
46283   complete="$BUILD_STRIP"
46284   path="${complete%% *}"
46285   tmp="$complete EOL"
46286   arguments="${tmp#* }"
46287 
46288   # Input might be given as Windows format, start by converting to
46289   # unix format.
46290   new_path="$path"
46291 
46292   windows_path="$new_path"
46293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46294     unix_path=`$CYGPATH -u "$windows_path"`
46295     new_path="$unix_path"
46296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46298     new_path="$unix_path"
46299   fi
46300 
46301 
46302   # Now try to locate executable using which
46303   new_path=`$WHICH "$new_path" 2> /dev/null`
46304 
46305   if test "x$new_path" = x; then
46306     # Oops. Which didn't find the executable.
46307     # The splitting of arguments from the executable at a space might have been incorrect,
46308     # since paths with space are more likely in Windows. Give it another try with the whole
46309     # argument.
46310     path="$complete"
46311     arguments="EOL"
46312     new_path="$path"
46313 
46314   windows_path="$new_path"
46315   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46316     unix_path=`$CYGPATH -u "$windows_path"`
46317     new_path="$unix_path"
46318   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46319     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46320     new_path="$unix_path"
46321   fi
46322 
46323 
46324     new_path=`$WHICH "$new_path" 2> /dev/null`
46325     # bat and cmd files are not always considered executable in MSYS causing which
46326     # to not find them
46327     if test "x$new_path" = x \
46328         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46329         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46330       new_path="$path"
46331 
46332   windows_path="$new_path"
46333   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46334     unix_path=`$CYGPATH -u "$windows_path"`
46335     new_path="$unix_path"
46336   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46337     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46338     new_path="$unix_path"
46339   fi
46340 
46341     fi
46342 
46343     if test "x$new_path" = x; then
46344       # It's still not found. Now this is an unrecoverable error.
46345       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46346 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46347       has_space=`$ECHO "$complete" | $GREP " "`
46348       if test "x$has_space" != x; then
46349         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46350 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46351       fi
46352       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46353     fi
46354   fi
46355 
46356   # Now new_path has a complete unix path to the binary
46357   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46358     # Keep paths in /bin as-is, but remove trailing .exe if any
46359     new_path="${new_path/%.exe/}"
46360     # Do not save /bin paths to all_fixpath_prefixes!
46361   else
46362     # Not in mixed or Windows style, start by that.
46363     new_path=`cmd //c echo $new_path`
46364 
46365   input_path="$new_path"
46366   # Check if we need to convert this using DOS-style short mode. If the path
46367   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46368   # take no chances and rewrite it.
46369   # Note: m4 eats our [], so we need to use [ and ] instead.
46370   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46371   if test "x$has_forbidden_chars" != x; then
46372     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46373     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46374   fi
46375 
46376     # Output is in $new_path
46377 
46378   windows_path="$new_path"
46379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46380     unix_path=`$CYGPATH -u "$windows_path"`
46381     new_path="$unix_path"
46382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46383     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46384     new_path="$unix_path"
46385   fi
46386 
46387     # remove trailing .exe if any
46388     new_path="${new_path/%.exe/}"
46389 
46390     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46391     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46392   fi
46393 
46394     else
46395       # We're on a unix platform. Hooray! :)
46396       # First separate the path from the arguments. This will split at the first
46397       # space.
46398       complete="$BUILD_STRIP"
46399       path="${complete%% *}"
46400       tmp="$complete EOL"
46401       arguments="${tmp#* }"
46402 
46403       # Cannot rely on the command "which" here since it doesn't always work.
46404       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46405       if test -z "$is_absolute_path"; then
46406         # Path to executable is not absolute. Find it.
46407         IFS_save="$IFS"
46408         IFS=:
46409         for p in $PATH; do
46410           if test -f "$p/$path" && test -x "$p/$path"; then
46411             new_path="$p/$path"
46412             break
46413           fi
46414         done
46415         IFS="$IFS_save"
46416       else
46417         # This is an absolute path, we can use it without further modifications.
46418         new_path="$path"
46419       fi
46420 
46421       if test "x$new_path" = x; then
46422         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46423 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46424         has_space=`$ECHO "$complete" | $GREP " "`
46425         if test "x$has_space" != x; then
46426           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46427 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46428         fi
46429         as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46430       fi
46431     fi
46432 
46433     # Now join together the path and the arguments once again
46434     if test "x$arguments" != xEOL; then
46435       new_complete="$new_path ${arguments% *}"
46436     else
46437       new_complete="$new_path"
46438     fi
46439 
46440     if test "x$complete" != "x$new_complete"; then
46441       BUILD_STRIP="$new_complete"
46442       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46443 $as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46444     fi
46445   fi
46446 
46447     # Assume the C compiler is the assembler
46448     BUILD_AS="$BUILD_CC -c"
46449     # Just like for the target compiler, use the compiler as linker
46450     BUILD_LD="$BUILD_CC"
46451     BUILD_LDCXX="$BUILD_CXX"
46452 
46453     PATH="$OLDPATH"
46454   else
46455     # If we are not cross compiling, use the normal target compilers for
46456     # building the build platform executables.
46457     BUILD_CC="$CC"
46458     BUILD_CXX="$CXX"
46459     BUILD_LD="$LD"
46460     BUILD_LDCXX="$LDCXX"
46461     BUILD_NM="$NM"
46462     BUILD_AS="$AS"
46463     BUILD_OBJCOPY="$OBJCOPY"
46464     BUILD_STRIP="$STRIP"
46465     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
46466     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
46467     BUILD_AR="$AR"
46468   fi
46469 
46470 
46471 
46472 
46473 
46474 
46475 
46476 
46477 
46478 
46479 
46480 
46481   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46482     # For hotspot, we need these in Windows mixed path,
46483     # so rewrite them all. Need added .exe suffix.
46484     HOTSPOT_CXX="$CXX.exe"
46485     HOTSPOT_LD="$LD.exe"
46486     HOTSPOT_MT="$MT.exe"
46487     HOTSPOT_RC="$RC.exe"
46488 
46489   unix_path="$HOTSPOT_CXX"
46490   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46491     windows_path=`$CYGPATH -m "$unix_path"`
46492     HOTSPOT_CXX="$windows_path"
46493   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46494     windows_path=`cmd //c echo $unix_path`
46495     HOTSPOT_CXX="$windows_path"
46496   fi
46497 
46498 
46499   unix_path="$HOTSPOT_LD"
46500   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46501     windows_path=`$CYGPATH -m "$unix_path"`
46502     HOTSPOT_LD="$windows_path"
46503   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46504     windows_path=`cmd //c echo $unix_path`
46505     HOTSPOT_LD="$windows_path"
46506   fi
46507 
46508 
46509   unix_path="$HOTSPOT_MT"
46510   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46511     windows_path=`$CYGPATH -m "$unix_path"`
46512     HOTSPOT_MT="$windows_path"
46513   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46514     windows_path=`cmd //c echo $unix_path`
46515     HOTSPOT_MT="$windows_path"
46516   fi
46517 
46518 
46519   unix_path="$HOTSPOT_RC"
46520   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46521     windows_path=`$CYGPATH -m "$unix_path"`
46522     HOTSPOT_RC="$windows_path"
46523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46524     windows_path=`cmd //c echo $unix_path`
46525     HOTSPOT_RC="$windows_path"
46526   fi
46527 
46528 
46529 
46530   else
46531     HOTSPOT_CXX="$CXX"
46532     HOTSPOT_LD="$LD"
46533   fi
46534 
46535 
46536 
46537   if test  "x$TOOLCHAIN_TYPE" = xclang; then
46538     USE_CLANG=true
46539   fi
46540 
46541 
46542 
46543 
46544 
46545   # The package path is used only on macosx?
46546   # FIXME: clean this up, and/or move it elsewhere.
46547   PACKAGE_PATH=/opt/local
46548 
46549 
46550   # Check for extra potential brokenness.
46551   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46552     # On Windows, double-check that we got the right compiler.
46553     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46554     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
46555     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
46556       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
46557         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
46558       fi
46559     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
46560       if test "x$COMPILER_CPU_TEST" != "xx64"; then
46561         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
46562       fi
46563     fi
46564   fi
46565 
46566   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46567     # If this is a --hash-style=gnu system, use --hash-style=both, why?
46568     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
46569     # This is later checked when setting flags.
46570 
46571     # "-Og" suppported for GCC 4.8 and later
46572     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
46573 
46574 
46575 
46576 
46577 
46578 
46579 
46580 
46581 
46582 
46583 
46584 
46585 
46586 
46587 
46588 
46589 
46590 
46591 
46592 
46593 
46594 
46595 
46596 
46597 
46598 
46599 
46600 
46601 
46602 
46603 
46604 
46605 
46606 
46607 
46608 
46609 
46610 
46611 
46612 
46613 
46614 
46615 
46616 
46617 
46618 
46619 
46620     # Execute function body
46621 
46622 
46623 
46624 
46625 
46626 
46627 
46628 
46629 
46630 
46631 
46632 
46633 
46634 
46635 
46636 
46637 
46638 
46639 
46640 
46641 
46642 
46643 
46644 
46645 
46646 
46647 
46648 
46649 
46650 
46651 
46652 
46653 
46654 
46655 
46656 
46657 
46658 
46659 
46660 
46661 
46662 
46663 
46664 
46665 
46666 
46667 
46668 
46669     # Execute function body
46670 
46671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46672 $as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46673   supports=yes
46674 
46675   saved_cflags="$CFLAGS"
46676   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
46677   ac_ext=c
46678 ac_cpp='$CPP $CPPFLAGS'
46679 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46680 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46681 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46682 
46683   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46684 /* end confdefs.h.  */
46685 int i;
46686 _ACEOF
46687 if ac_fn_c_try_compile "$LINENO"; then :
46688 
46689 else
46690   supports=no
46691 fi
46692 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46693   ac_ext=cpp
46694 ac_cpp='$CXXCPP $CPPFLAGS'
46695 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46696 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46697 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46698 
46699   CFLAGS="$saved_cflags"
46700 
46701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46702 $as_echo "$supports" >&6; }
46703   if test "x$supports" = "xyes" ; then
46704     :
46705     C_COMP_SUPPORTS="yes"
46706   else
46707     :
46708     C_COMP_SUPPORTS="no"
46709   fi
46710 
46711 
46712 
46713 
46714 
46715 
46716 
46717 
46718 
46719 
46720 
46721 
46722 
46723 
46724 
46725 
46726 
46727 
46728 
46729 
46730 
46731 
46732 
46733 
46734 
46735 
46736 
46737 
46738 
46739 
46740 
46741 
46742 
46743 
46744 
46745 
46746 
46747 
46748 
46749 
46750 
46751 
46752 
46753 
46754 
46755 
46756 
46757 
46758 
46759 
46760 
46761 
46762 
46763 
46764 
46765 
46766 
46767 
46768 
46769     # Execute function body
46770 
46771   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46772 $as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46773   supports=yes
46774 
46775   saved_cxxflags="$CXXFLAGS"
46776   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
46777   ac_ext=cpp
46778 ac_cpp='$CXXCPP $CPPFLAGS'
46779 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46780 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46781 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46782 
46783   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46784 /* end confdefs.h.  */
46785 int i;
46786 _ACEOF
46787 if ac_fn_cxx_try_compile "$LINENO"; then :
46788 
46789 else
46790   supports=no
46791 fi
46792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46793   ac_ext=cpp
46794 ac_cpp='$CXXCPP $CPPFLAGS'
46795 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46796 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46797 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46798 
46799   CXXFLAGS="$saved_cxxflags"
46800 
46801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46802 $as_echo "$supports" >&6; }
46803   if test "x$supports" = "xyes" ; then
46804     :
46805     CXX_COMP_SUPPORTS="yes"
46806   else
46807     :
46808     CXX_COMP_SUPPORTS="no"
46809   fi
46810 
46811 
46812 
46813 
46814 
46815 
46816 
46817 
46818 
46819 
46820 
46821 
46822 
46823   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46824 $as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46825   supports=no
46826   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
46827 
46828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46829 $as_echo "$supports" >&6; }
46830   if test "x$supports" = "xyes" ; then
46831     :
46832     HAS_CFLAG_OPTIMIZE_DEBUG=true
46833   else
46834     :
46835     HAS_CFLAG_OPTIMIZE_DEBUG=false
46836   fi
46837 
46838 
46839 
46840 
46841 
46842 
46843 
46844     # "-z relro" supported in GNU binutils 2.17 and later
46845     LINKER_RELRO_FLAG="-Wl,-z,relro"
46846 
46847 
46848 
46849 
46850 
46851 
46852 
46853 
46854 
46855 
46856 
46857 
46858 
46859 
46860 
46861 
46862 
46863 
46864 
46865 
46866 
46867 
46868 
46869 
46870 
46871 
46872 
46873 
46874 
46875 
46876 
46877 
46878 
46879 
46880 
46881 
46882 
46883 
46884 
46885 
46886 
46887 
46888 
46889 
46890 
46891 
46892 
46893     # Execute function body
46894 
46895   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
46896 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
46897   supports=yes
46898 
46899   saved_ldflags="$LDFLAGS"
46900   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
46901   ac_ext=c
46902 ac_cpp='$CPP $CPPFLAGS'
46903 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46904 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46905 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46906 
46907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46908 /* end confdefs.h.  */
46909 
46910 int
46911 main ()
46912 {
46913 
46914   ;
46915   return 0;
46916 }
46917 _ACEOF
46918 if ac_fn_c_try_link "$LINENO"; then :
46919 
46920 else
46921   supports=no
46922 fi
46923 rm -f core conftest.err conftest.$ac_objext \
46924     conftest$ac_exeext conftest.$ac_ext
46925   ac_ext=cpp
46926 ac_cpp='$CXXCPP $CPPFLAGS'
46927 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46928 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46929 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46930 
46931   LDFLAGS="$saved_ldflags"
46932 
46933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46934 $as_echo "$supports" >&6; }
46935   if test "x$supports" = "xyes" ; then
46936     :
46937     HAS_LINKER_RELRO=true
46938   else
46939     :
46940     HAS_LINKER_RELRO=false
46941   fi
46942 
46943 
46944 
46945 
46946 
46947 
46948 
46949 
46950 
46951 
46952 
46953 
46954 
46955     # "-z now" supported in GNU binutils 2.11 and later
46956     LINKER_NOW_FLAG="-Wl,-z,now"
46957 
46958 
46959 
46960 
46961 
46962 
46963 
46964 
46965 
46966 
46967 
46968 
46969 
46970 
46971 
46972 
46973 
46974 
46975 
46976 
46977 
46978 
46979 
46980 
46981 
46982 
46983 
46984 
46985 
46986 
46987 
46988 
46989 
46990 
46991 
46992 
46993 
46994 
46995 
46996 
46997 
46998 
46999 
47000 
47001 
47002 
47003 
47004     # Execute function body
47005 
47006   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47007 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47008   supports=yes
47009 
47010   saved_ldflags="$LDFLAGS"
47011   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47012   ac_ext=c
47013 ac_cpp='$CPP $CPPFLAGS'
47014 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47015 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47016 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47017 
47018   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47019 /* end confdefs.h.  */
47020 
47021 int
47022 main ()
47023 {
47024 
47025   ;
47026   return 0;
47027 }
47028 _ACEOF
47029 if ac_fn_c_try_link "$LINENO"; then :
47030 
47031 else
47032   supports=no
47033 fi
47034 rm -f core conftest.err conftest.$ac_objext \
47035     conftest$ac_exeext conftest.$ac_ext
47036   ac_ext=cpp
47037 ac_cpp='$CXXCPP $CPPFLAGS'
47038 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47039 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47040 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47041 
47042   LDFLAGS="$saved_ldflags"
47043 
47044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47045 $as_echo "$supports" >&6; }
47046   if test "x$supports" = "xyes" ; then
47047     :
47048     HAS_LINKER_NOW=true
47049   else
47050     :
47051     HAS_LINKER_NOW=false
47052   fi
47053 
47054 
47055 
47056 
47057 
47058 
47059 
47060 
47061 
47062 
47063 
47064 
47065   fi
47066 
47067   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47068   # in executable.'
47069   USING_BROKEN_SUSE_LD=no
47070   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47071     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47072 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47073     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47074     $ECHO "int main() { }" > main.c
47075     if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47076       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47077 $as_echo "no" >&6; }
47078       USING_BROKEN_SUSE_LD=no
47079     else
47080       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47081 $as_echo "yes" >&6; }
47082       USING_BROKEN_SUSE_LD=yes
47083     fi
47084     rm -rf version-script.map main.c a.out
47085   fi
47086 
47087 
47088   # Setup hotspot lecagy names for toolchains
47089   HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47090   if test "x$TOOLCHAIN_TYPE" = xclang; then
47091     HOTSPOT_TOOLCHAIN_TYPE=gcc
47092   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47093     HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47094   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47095     HOTSPOT_TOOLCHAIN_TYPE=visCPP
47096   fi
47097 
47098 
47099 
47100 # Setup the JTReg Regression Test Harness.
47101 
47102 
47103 # Check whether --with-jtreg was given.
47104 if test "${with_jtreg+set}" = set; then :
47105   withval=$with_jtreg;
47106 else
47107   with_jtreg=no
47108 fi
47109 
47110 
47111   if test "x$with_jtreg" = xno; then
47112     # jtreg disabled
47113     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47114 $as_echo_n "checking for jtreg... " >&6; }
47115     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47116 $as_echo "no" >&6; }
47117   else
47118     if test "x$with_jtreg" != xyes; then
47119       # with path specified.
47120       JT_HOME="$with_jtreg"
47121     fi
47122 
47123     if test "x$JT_HOME" != x; then
47124       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47125 $as_echo_n "checking for jtreg... " >&6; }
47126 
47127       # use JT_HOME enviroment var.
47128 
47129   # Only process if variable expands to non-empty
47130 
47131   if test "x$JT_HOME" != x; then
47132     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47133 
47134   # Input might be given as Windows format, start by converting to
47135   # unix format.
47136   path="$JT_HOME"
47137   new_path=`$CYGPATH -u "$path"`
47138 
47139   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47140   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47141   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47142   # "foo.exe" is OK but "foo" is an error.
47143   #
47144   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47145   # It is also a way to make sure we got the proper file name for the real test later on.
47146   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47147   if test "x$test_shortpath" = x; then
47148     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47149 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47150     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47151   fi
47152 
47153   # Call helper function which possibly converts this using DOS-style short mode.
47154   # If so, the updated path is stored in $new_path.
47155 
47156   input_path="$new_path"
47157   # Check if we need to convert this using DOS-style short mode. If the path
47158   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47159   # take no chances and rewrite it.
47160   # Note: m4 eats our [], so we need to use [ and ] instead.
47161   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47162   if test "x$has_forbidden_chars" != x; then
47163     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47164     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47165     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47166     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47167       # Going to short mode and back again did indeed matter. Since short mode is
47168       # case insensitive, let's make it lowercase to improve readability.
47169       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47170       # Now convert it back to Unix-style (cygpath)
47171       input_path=`$CYGPATH -u "$shortmode_path"`
47172       new_path="$input_path"
47173     fi
47174   fi
47175 
47176   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47177   if test "x$test_cygdrive_prefix" = x; then
47178     # As a simple fix, exclude /usr/bin since it's not a real path.
47179     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47180       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47181       # a path prefixed by /cygdrive for fixpath to work.
47182       new_path="$CYGWIN_ROOT_PATH$input_path"
47183     fi
47184   fi
47185 
47186 
47187   if test "x$path" != "x$new_path"; then
47188     JT_HOME="$new_path"
47189     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47190 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47191   fi
47192 
47193     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47194 
47195   path="$JT_HOME"
47196   has_colon=`$ECHO $path | $GREP ^.:`
47197   new_path="$path"
47198   if test "x$has_colon" = x; then
47199     # Not in mixed or Windows style, start by that.
47200     new_path=`cmd //c echo $path`
47201   fi
47202 
47203 
47204   input_path="$new_path"
47205   # Check if we need to convert this using DOS-style short mode. If the path
47206   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47207   # take no chances and rewrite it.
47208   # Note: m4 eats our [], so we need to use [ and ] instead.
47209   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47210   if test "x$has_forbidden_chars" != x; then
47211     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47212     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47213   fi
47214 
47215 
47216   windows_path="$new_path"
47217   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47218     unix_path=`$CYGPATH -u "$windows_path"`
47219     new_path="$unix_path"
47220   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47221     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47222     new_path="$unix_path"
47223   fi
47224 
47225   if test "x$path" != "x$new_path"; then
47226     JT_HOME="$new_path"
47227     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47228 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47229   fi
47230 
47231   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47232   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47233 
47234     else
47235       # We're on a unix platform. Hooray! :)
47236       path="$JT_HOME"
47237       has_space=`$ECHO "$path" | $GREP " "`
47238       if test "x$has_space" != x; then
47239         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47240 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47241         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47242       fi
47243 
47244       # Use eval to expand a potential ~
47245       eval path="$path"
47246       if test ! -f "$path" && test ! -d "$path"; then
47247         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47248       fi
47249 
47250       if test -d "$path"; then
47251         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47252       else
47253         dir="`$DIRNAME "$path"`"
47254         base="`$BASENAME "$path"`"
47255         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47256       fi
47257     fi
47258   fi
47259 
47260 
47261       # jtreg win32 script works for everybody
47262       JTREGEXE="$JT_HOME/bin/jtreg"
47263 
47264       if test ! -f "$JTREGEXE"; then
47265         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
47266       fi
47267 
47268       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47269 $as_echo "$JTREGEXE" >&6; }
47270     else
47271       # try to find jtreg on path
47272 
47273 
47274 
47275   # Publish this variable in the help.
47276 
47277 
47278   if [ -z "${JTREGEXE+x}" ]; then
47279     # The variable is not set by user, try to locate tool using the code snippet
47280     for ac_prog in jtreg
47281 do
47282   # Extract the first word of "$ac_prog", so it can be a program name with args.
47283 set dummy $ac_prog; ac_word=$2
47284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47285 $as_echo_n "checking for $ac_word... " >&6; }
47286 if ${ac_cv_path_JTREGEXE+:} false; then :
47287   $as_echo_n "(cached) " >&6
47288 else
47289   case $JTREGEXE in
47290   [\\/]* | ?:[\\/]*)
47291   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47292   ;;
47293   *)
47294   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47295 for as_dir in $PATH
47296 do
47297   IFS=$as_save_IFS
47298   test -z "$as_dir" && as_dir=.
47299     for ac_exec_ext in '' $ac_executable_extensions; do
47300   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47301     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47302     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47303     break 2
47304   fi
47305 done
47306   done
47307 IFS=$as_save_IFS
47308 
47309   ;;
47310 esac
47311 fi
47312 JTREGEXE=$ac_cv_path_JTREGEXE
47313 if test -n "$JTREGEXE"; then
47314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47315 $as_echo "$JTREGEXE" >&6; }
47316 else
47317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47318 $as_echo "no" >&6; }
47319 fi
47320 
47321 
47322   test -n "$JTREGEXE" && break
47323 done
47324 
47325   else
47326     # The variable is set, but is it from the command line or the environment?
47327 
47328     # Try to remove the string !JTREGEXE! from our list.
47329     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
47330     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47331       # If it failed, the variable was not from the command line. Ignore it,
47332       # but warn the user (except for BASH, which is always set by the calling BASH).
47333       if test "xJTREGEXE" != xBASH; then
47334         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
47335 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
47336       fi
47337       # Try to locate tool using the code snippet
47338       for ac_prog in jtreg
47339 do
47340   # Extract the first word of "$ac_prog", so it can be a program name with args.
47341 set dummy $ac_prog; ac_word=$2
47342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47343 $as_echo_n "checking for $ac_word... " >&6; }
47344 if ${ac_cv_path_JTREGEXE+:} false; then :
47345   $as_echo_n "(cached) " >&6
47346 else
47347   case $JTREGEXE in
47348   [\\/]* | ?:[\\/]*)
47349   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47350   ;;
47351   *)
47352   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47353 for as_dir in $PATH
47354 do
47355   IFS=$as_save_IFS
47356   test -z "$as_dir" && as_dir=.
47357     for ac_exec_ext in '' $ac_executable_extensions; do
47358   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47359     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47360     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47361     break 2
47362   fi
47363 done
47364   done
47365 IFS=$as_save_IFS
47366 
47367   ;;
47368 esac
47369 fi
47370 JTREGEXE=$ac_cv_path_JTREGEXE
47371 if test -n "$JTREGEXE"; then
47372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47373 $as_echo "$JTREGEXE" >&6; }
47374 else
47375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47376 $as_echo "no" >&6; }
47377 fi
47378 
47379 
47380   test -n "$JTREGEXE" && break
47381 done
47382 
47383     else
47384       # If it succeeded, then it was overridden by the user. We will use it
47385       # for the tool.
47386 
47387       # First remove it from the list of overridden variables, so we can test
47388       # for unknown variables in the end.
47389       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47390 
47391       # Check if we try to supply an empty value
47392       if test "x$JTREGEXE" = x; then
47393         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
47394 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
47395         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47396 $as_echo_n "checking for JTREGEXE... " >&6; }
47397         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47398 $as_echo "disabled" >&6; }
47399       else
47400         # Check if the provided tool contains a complete path.
47401         tool_specified="$JTREGEXE"
47402         tool_basename="${tool_specified##*/}"
47403         if test "x$tool_basename" = "x$tool_specified"; then
47404           # A command without a complete path is provided, search $PATH.
47405           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
47406 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
47407           # Extract the first word of "$tool_basename", so it can be a program name with args.
47408 set dummy $tool_basename; ac_word=$2
47409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47410 $as_echo_n "checking for $ac_word... " >&6; }
47411 if ${ac_cv_path_JTREGEXE+:} false; then :
47412   $as_echo_n "(cached) " >&6
47413 else
47414   case $JTREGEXE in
47415   [\\/]* | ?:[\\/]*)
47416   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47417   ;;
47418   *)
47419   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47420 for as_dir in $PATH
47421 do
47422   IFS=$as_save_IFS
47423   test -z "$as_dir" && as_dir=.
47424     for ac_exec_ext in '' $ac_executable_extensions; do
47425   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47426     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47427     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47428     break 2
47429   fi
47430 done
47431   done
47432 IFS=$as_save_IFS
47433 
47434   ;;
47435 esac
47436 fi
47437 JTREGEXE=$ac_cv_path_JTREGEXE
47438 if test -n "$JTREGEXE"; then
47439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47440 $as_echo "$JTREGEXE" >&6; }
47441 else
47442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47443 $as_echo "no" >&6; }
47444 fi
47445 
47446 
47447           if test "x$JTREGEXE" = x; then
47448             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47449           fi
47450         else
47451           # Otherwise we believe it is a complete path. Use it as it is.
47452           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
47453 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
47454           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47455 $as_echo_n "checking for JTREGEXE... " >&6; }
47456           if test ! -x "$tool_specified"; then
47457             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47458 $as_echo "not found" >&6; }
47459             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
47460           fi
47461           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47462 $as_echo "$tool_specified" >&6; }
47463         fi
47464       fi
47465     fi
47466 
47467   fi
47468 
47469 
47470 
47471   if test "x$JTREGEXE" = x; then
47472     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
47473   fi
47474 
47475 
47476       JT_HOME="`$DIRNAME $JTREGEXE`"
47477     fi
47478   fi
47479 
47480 
47481 
47482 
47483 
47484 
47485   # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
47486   # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
47487   # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
47488   #                              commands produced by the link step (currently AIX only)
47489   if test "x$TOOLCHAIN_TYPE" = xxlc; then
47490     COMPILER_TARGET_BITS_FLAG="-q"
47491     COMPILER_COMMAND_FILE_FLAG="-f"
47492     COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
47493   else
47494     COMPILER_TARGET_BITS_FLAG="-m"
47495     COMPILER_COMMAND_FILE_FLAG="@"
47496     COMPILER_BINDCMD_FILE_FLAG=""
47497 
47498     # The solstudio linker does not support @-files.
47499     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47500       COMPILER_COMMAND_FILE_FLAG=
47501     fi
47502 
47503     # Check if @file is supported by gcc
47504     if test "x$TOOLCHAIN_TYPE" = xgcc; then
47505       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
47506 $as_echo_n "checking if @file is supported by gcc... " >&6; }
47507       # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
47508       $ECHO "" "--version" > command.file
47509       if $CXX @command.file 2>&5 >&5; then
47510         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47511 $as_echo "yes" >&6; }
47512         COMPILER_COMMAND_FILE_FLAG="@"
47513       else
47514         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47515 $as_echo "no" >&6; }
47516         COMPILER_COMMAND_FILE_FLAG=
47517       fi
47518       rm -rf command.file
47519     fi
47520   fi
47521 
47522 
47523 
47524 
47525   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
47526   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47527     ARFLAGS="-r"
47528   elif test "x$OPENJDK_TARGET_OS" = xaix; then
47529     ARFLAGS="-X64"
47530   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
47531     # lib.exe is used as AR to create static libraries.
47532     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
47533   else
47534     ARFLAGS=""
47535   fi
47536 
47537 
47538   ## Setup strip.
47539   # FIXME: should this really be per platform, or should it be per toolchain type?
47540   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
47541   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
47542   if test "x$OPENJDK_TARGET_OS" = xlinux; then
47543     STRIPFLAGS="-g"
47544   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
47545     STRIPFLAGS="-x"
47546   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
47547     STRIPFLAGS="-S"
47548   elif test "x$OPENJDK_TARGET_OS" = xaix; then
47549     STRIPFLAGS="-X32_64"
47550   fi
47551 
47552 
47553 
47554   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47555     CC_OUT_OPTION=-Fo
47556     EXE_OUT_OPTION=-out:
47557     LD_OUT_OPTION=-out:
47558     AR_OUT_OPTION=-out:
47559   else
47560     # The option used to specify the target .o,.a or .so file.
47561     # When compiling, how to specify the to be created object file.
47562     CC_OUT_OPTION='-o$(SPACE)'
47563     # When linking, how to specify the to be created executable.
47564     EXE_OUT_OPTION='-o$(SPACE)'
47565     # When linking, how to specify the to be created dynamically linkable library.
47566     LD_OUT_OPTION='-o$(SPACE)'
47567     # When archiving, how to specify the to be create static archive for object files.
47568     AR_OUT_OPTION='rcs$(SPACE)'
47569   fi
47570 
47571 
47572 
47573 
47574 
47575   # On Windows, we need to set RC flags.
47576   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47577     RC_FLAGS="-nologo -l0x409"
47578     JVM_RCFLAGS="-nologo"
47579     if test "x$DEBUG_LEVEL" = xrelease; then
47580       RC_FLAGS="$RC_FLAGS -DNDEBUG"
47581       JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
47582     fi
47583 
47584     # The version variables used to create RC_FLAGS may be overridden
47585     # in a custom configure script, or possibly the command line.
47586     # Let those variables be expanded at make time in spec.gmk.
47587     # The \$ are escaped to the shell, and the $(...) variables
47588     # are evaluated by make.
47589     RC_FLAGS="$RC_FLAGS \
47590         -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
47591         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
47592         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
47593         -D\"JDK_VER=\$(VERSION_NUMBER)\" \
47594         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
47595         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
47596         -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
47597 
47598     JVM_RCFLAGS="$JVM_RCFLAGS \
47599         -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
47600         -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
47601         -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
47602         -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
47603         -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
47604         -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
47605         -D\"HS_FNAME=jvm.dll\" \
47606         -D\"HS_INTERNAL_NAME=jvm\""
47607   fi
47608 
47609 
47610 
47611   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47612     # silence copyright notice and other headers.
47613     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
47614   fi
47615 
47616 
47617 # Now we can test some aspects on the target using configure macros.
47618 
47619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
47620 $as_echo_n "checking for ANSI C header files... " >&6; }
47621 if ${ac_cv_header_stdc+:} false; then :
47622   $as_echo_n "(cached) " >&6
47623 else
47624   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47625 /* end confdefs.h.  */
47626 #include <stdlib.h>
47627 #include <stdarg.h>
47628 #include <string.h>
47629 #include <float.h>
47630 
47631 int
47632 main ()
47633 {
47634 
47635   ;
47636   return 0;
47637 }
47638 _ACEOF
47639 if ac_fn_cxx_try_compile "$LINENO"; then :
47640   ac_cv_header_stdc=yes
47641 else
47642   ac_cv_header_stdc=no
47643 fi
47644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47645 
47646 if test $ac_cv_header_stdc = yes; then
47647   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
47648   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47649 /* end confdefs.h.  */
47650 #include <string.h>
47651 
47652 _ACEOF
47653 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47654   $EGREP "memchr" >/dev/null 2>&1; then :
47655 
47656 else
47657   ac_cv_header_stdc=no
47658 fi
47659 rm -f conftest*
47660 
47661 fi
47662 
47663 if test $ac_cv_header_stdc = yes; then
47664   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
47665   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47666 /* end confdefs.h.  */
47667 #include <stdlib.h>
47668 
47669 _ACEOF
47670 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47671   $EGREP "free" >/dev/null 2>&1; then :
47672 
47673 else
47674   ac_cv_header_stdc=no
47675 fi
47676 rm -f conftest*
47677 
47678 fi
47679 
47680 if test $ac_cv_header_stdc = yes; then
47681   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
47682   if test "$cross_compiling" = yes; then :
47683   :
47684 else
47685   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47686 /* end confdefs.h.  */
47687 #include <ctype.h>
47688 #include <stdlib.h>
47689 #if ((' ' & 0x0FF) == 0x020)
47690 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
47691 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
47692 #else
47693 # define ISLOWER(c) \
47694                    (('a' <= (c) && (c) <= 'i') \
47695                      || ('j' <= (c) && (c) <= 'r') \
47696                      || ('s' <= (c) && (c) <= 'z'))
47697 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
47698 #endif
47699 
47700 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
47701 int
47702 main ()
47703 {
47704   int i;
47705   for (i = 0; i < 256; i++)
47706     if (XOR (islower (i), ISLOWER (i))
47707         || toupper (i) != TOUPPER (i))
47708       return 2;
47709   return 0;
47710 }
47711 _ACEOF
47712 if ac_fn_cxx_try_run "$LINENO"; then :
47713 
47714 else
47715   ac_cv_header_stdc=no
47716 fi
47717 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47718   conftest.$ac_objext conftest.beam conftest.$ac_ext
47719 fi
47720 
47721 fi
47722 fi
47723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
47724 $as_echo "$ac_cv_header_stdc" >&6; }
47725 if test $ac_cv_header_stdc = yes; then
47726 
47727 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
47728 
47729 fi
47730 
47731 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
47732 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
47733                   inttypes.h stdint.h unistd.h
47734 do :
47735   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47736 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
47737 "
47738 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47739   cat >>confdefs.h <<_ACEOF
47740 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47741 _ACEOF
47742 
47743 fi
47744 
47745 done
47746 
47747 
47748 
47749   ###############################################################################
47750   #
47751   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
47752   # (The JVM can use 32 or 64 bit Java pointers but that decision
47753   # is made at runtime.)
47754   #
47755 
47756   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
47757     # Always specify -m flag on Solaris
47758     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
47759 
47760   # When we add flags to the "official" CFLAGS etc, we need to
47761   # keep track of these additions in ADDED_CFLAGS etc. These
47762   # will later be checked to make sure only controlled additions
47763   # have been made to CFLAGS etc.
47764   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47765   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47766   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47767 
47768   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47769   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47770   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47771 
47772   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47773   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47774   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47775 
47776   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47777   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47778   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47779 
47780   elif test "x$COMPILE_TYPE" = xreduced; then
47781     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
47782       # Specify -m if running reduced on unix platforms
47783 
47784   # When we add flags to the "official" CFLAGS etc, we need to
47785   # keep track of these additions in ADDED_CFLAGS etc. These
47786   # will later be checked to make sure only controlled additions
47787   # have been made to CFLAGS etc.
47788   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47789   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47790   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47791 
47792   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47793   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47794   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47795 
47796   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47797   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47798   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47799 
47800   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47801   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47802   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47803 
47804     fi
47805   fi
47806   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47807     JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47808     JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47809     JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47810   fi
47811 
47812   # Make compilation sanity check
47813   for ac_header in stdio.h
47814 do :
47815   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
47816 if test "x$ac_cv_header_stdio_h" = xyes; then :
47817   cat >>confdefs.h <<_ACEOF
47818 #define HAVE_STDIO_H 1
47819 _ACEOF
47820 
47821 else
47822 
47823     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
47824 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
47825     if test "x$COMPILE_TYPE" = xreduced; then
47826 
47827   # Print a helpful message on how to acquire the necessary build dependency.
47828   # reduced is the help tag: freetype, cups, alsa etc
47829   MISSING_DEPENDENCY=reduced
47830 
47831   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47832     cygwin_help $MISSING_DEPENDENCY
47833   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47834     msys_help $MISSING_DEPENDENCY
47835   else
47836     PKGHANDLER_COMMAND=
47837 
47838     case $PKGHANDLER in
47839       apt-get)
47840         apt_help     $MISSING_DEPENDENCY ;;
47841       yum)
47842         yum_help     $MISSING_DEPENDENCY ;;
47843       port)
47844         port_help    $MISSING_DEPENDENCY ;;
47845       pkgutil)
47846         pkgutil_help $MISSING_DEPENDENCY ;;
47847       pkgadd)
47848         pkgadd_help  $MISSING_DEPENDENCY ;;
47849     esac
47850 
47851     if test "x$PKGHANDLER_COMMAND" != x; then
47852       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47853     fi
47854   fi
47855 
47856       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
47857 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
47858     elif test "x$COMPILE_TYPE" = xcross; then
47859       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
47860 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
47861     fi
47862     as_fn_error $? "Cannot continue." "$LINENO" 5
47863 
47864 fi
47865 
47866 done
47867 
47868 
47869   # The cast to long int works around a bug in the HP C Compiler
47870 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47871 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47872 # This bug is HP SR number 8606223364.
47873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47874 $as_echo_n "checking size of int *... " >&6; }
47875 if ${ac_cv_sizeof_int_p+:} false; then :
47876   $as_echo_n "(cached) " >&6
47877 else
47878   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47879 
47880 else
47881   if test "$ac_cv_type_int_p" = yes; then
47882      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47883 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47884 as_fn_error 77 "cannot compute sizeof (int *)
47885 See \`config.log' for more details" "$LINENO" 5; }
47886    else
47887      ac_cv_sizeof_int_p=0
47888    fi
47889 fi
47890 
47891 fi
47892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47893 $as_echo "$ac_cv_sizeof_int_p" >&6; }
47894 
47895 
47896 
47897 cat >>confdefs.h <<_ACEOF
47898 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
47899 _ACEOF
47900 
47901 
47902 
47903   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
47904   if test "x$ac_cv_sizeof_int_p" = x; then
47905     # The test failed, lets stick to the assumed value.
47906     { $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
47907 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
47908   else
47909     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47910 
47911     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47912       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
47913       # Let's try to implicitely set the compilers target architecture and retry the test
47914       { $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
47915 $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;}
47916       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
47917 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
47918 
47919   # When we add flags to the "official" CFLAGS etc, we need to
47920   # keep track of these additions in ADDED_CFLAGS etc. These
47921   # will later be checked to make sure only controlled additions
47922   # have been made to CFLAGS etc.
47923   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47924   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47925   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47926 
47927   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47928   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47929   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47930 
47931   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47932   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47933   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47934 
47935   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47936   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47937   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47938 
47939 
47940       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
47941       unset ac_cv_sizeof_int_p
47942       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
47943       cat >>confdefs.h <<_ACEOF
47944 #undef SIZEOF_INT_P
47945 _ACEOF
47946 
47947       # The cast to long int works around a bug in the HP C Compiler
47948 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47949 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47950 # This bug is HP SR number 8606223364.
47951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47952 $as_echo_n "checking size of int *... " >&6; }
47953 if ${ac_cv_sizeof_int_p+:} false; then :
47954   $as_echo_n "(cached) " >&6
47955 else
47956   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47957 
47958 else
47959   if test "$ac_cv_type_int_p" = yes; then
47960      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47961 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47962 as_fn_error 77 "cannot compute sizeof (int *)
47963 See \`config.log' for more details" "$LINENO" 5; }
47964    else
47965      ac_cv_sizeof_int_p=0
47966    fi
47967 fi
47968 
47969 fi
47970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47971 $as_echo "$ac_cv_sizeof_int_p" >&6; }
47972 
47973 
47974 
47975 cat >>confdefs.h <<_ACEOF
47976 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
47977 _ACEOF
47978 
47979 
47980 
47981       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47982 
47983       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47984         { $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
47985 $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;}
47986         if test "x$COMPILE_TYPE" = xreduced; then
47987 
47988   # Print a helpful message on how to acquire the necessary build dependency.
47989   # reduced is the help tag: freetype, cups, alsa etc
47990   MISSING_DEPENDENCY=reduced
47991 
47992   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47993     cygwin_help $MISSING_DEPENDENCY
47994   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47995     msys_help $MISSING_DEPENDENCY
47996   else
47997     PKGHANDLER_COMMAND=
47998 
47999     case $PKGHANDLER in
48000       apt-get)
48001         apt_help     $MISSING_DEPENDENCY ;;
48002       yum)
48003         yum_help     $MISSING_DEPENDENCY ;;
48004       port)
48005         port_help    $MISSING_DEPENDENCY ;;
48006       pkgutil)
48007         pkgutil_help $MISSING_DEPENDENCY ;;
48008       pkgadd)
48009         pkgadd_help  $MISSING_DEPENDENCY ;;
48010     esac
48011 
48012     if test "x$PKGHANDLER_COMMAND" != x; then
48013       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48014     fi
48015   fi
48016 
48017           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48018 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48019         elif test "x$COMPILE_TYPE" = xcross; then
48020           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48021 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48022         fi
48023         as_fn_error $? "Cannot continue." "$LINENO" 5
48024       fi
48025     fi
48026   fi
48027 
48028   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48029 $as_echo_n "checking for target address size... " >&6; }
48030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48031 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48032 
48033 
48034   ###############################################################################
48035   #
48036   # Is the target little of big endian?
48037   #
48038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48039 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48040 if ${ac_cv_c_bigendian+:} false; then :
48041   $as_echo_n "(cached) " >&6
48042 else
48043   ac_cv_c_bigendian=unknown
48044     # See if we're dealing with a universal compiler.
48045     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48046 /* end confdefs.h.  */
48047 #ifndef __APPLE_CC__
48048                not a universal capable compiler
48049              #endif
48050              typedef int dummy;
48051 
48052 _ACEOF
48053 if ac_fn_cxx_try_compile "$LINENO"; then :
48054 
48055         # Check for potential -arch flags.  It is not universal unless
48056         # there are at least two -arch flags with different values.
48057         ac_arch=
48058         ac_prev=
48059         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48060          if test -n "$ac_prev"; then
48061            case $ac_word in
48062              i?86 | x86_64 | ppc | ppc64)
48063                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48064                  ac_arch=$ac_word
48065                else
48066                  ac_cv_c_bigendian=universal
48067                  break
48068                fi
48069                ;;
48070            esac
48071            ac_prev=
48072          elif test "x$ac_word" = "x-arch"; then
48073            ac_prev=arch
48074          fi
48075        done
48076 fi
48077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48078     if test $ac_cv_c_bigendian = unknown; then
48079       # See if sys/param.h defines the BYTE_ORDER macro.
48080       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48081 /* end confdefs.h.  */
48082 #include <sys/types.h>
48083              #include <sys/param.h>
48084 
48085 int
48086 main ()
48087 {
48088 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48089                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48090                      && LITTLE_ENDIAN)
48091               bogus endian macros
48092              #endif
48093 
48094   ;
48095   return 0;
48096 }
48097 _ACEOF
48098 if ac_fn_cxx_try_compile "$LINENO"; then :
48099   # It does; now see whether it defined to BIG_ENDIAN or not.
48100          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48101 /* end confdefs.h.  */
48102 #include <sys/types.h>
48103                 #include <sys/param.h>
48104 
48105 int
48106 main ()
48107 {
48108 #if BYTE_ORDER != BIG_ENDIAN
48109                  not big endian
48110                 #endif
48111 
48112   ;
48113   return 0;
48114 }
48115 _ACEOF
48116 if ac_fn_cxx_try_compile "$LINENO"; then :
48117   ac_cv_c_bigendian=yes
48118 else
48119   ac_cv_c_bigendian=no
48120 fi
48121 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48122 fi
48123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48124     fi
48125     if test $ac_cv_c_bigendian = unknown; then
48126       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48127       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48128 /* end confdefs.h.  */
48129 #include <limits.h>
48130 
48131 int
48132 main ()
48133 {
48134 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48135               bogus endian macros
48136              #endif
48137 
48138   ;
48139   return 0;
48140 }
48141 _ACEOF
48142 if ac_fn_cxx_try_compile "$LINENO"; then :
48143   # It does; now see whether it defined to _BIG_ENDIAN or not.
48144          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48145 /* end confdefs.h.  */
48146 #include <limits.h>
48147 
48148 int
48149 main ()
48150 {
48151 #ifndef _BIG_ENDIAN
48152                  not big endian
48153                 #endif
48154 
48155   ;
48156   return 0;
48157 }
48158 _ACEOF
48159 if ac_fn_cxx_try_compile "$LINENO"; then :
48160   ac_cv_c_bigendian=yes
48161 else
48162   ac_cv_c_bigendian=no
48163 fi
48164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48165 fi
48166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48167     fi
48168     if test $ac_cv_c_bigendian = unknown; then
48169       # Compile a test program.
48170       if test "$cross_compiling" = yes; then :
48171   # Try to guess by grepping values from an object file.
48172          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48173 /* end confdefs.h.  */
48174 short int ascii_mm[] =
48175                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48176                 short int ascii_ii[] =
48177                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48178                 int use_ascii (int i) {
48179                   return ascii_mm[i] + ascii_ii[i];
48180                 }
48181                 short int ebcdic_ii[] =
48182                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48183                 short int ebcdic_mm[] =
48184                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48185                 int use_ebcdic (int i) {
48186                   return ebcdic_mm[i] + ebcdic_ii[i];
48187                 }
48188                 extern int foo;
48189 
48190 int
48191 main ()
48192 {
48193 return use_ascii (foo) == use_ebcdic (foo);
48194   ;
48195   return 0;
48196 }
48197 _ACEOF
48198 if ac_fn_cxx_try_compile "$LINENO"; then :
48199   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48200               ac_cv_c_bigendian=yes
48201             fi
48202             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48203               if test "$ac_cv_c_bigendian" = unknown; then
48204                 ac_cv_c_bigendian=no
48205               else
48206                 # finding both strings is unlikely to happen, but who knows?
48207                 ac_cv_c_bigendian=unknown
48208               fi
48209             fi
48210 fi
48211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48212 else
48213   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48214 /* end confdefs.h.  */
48215 $ac_includes_default
48216 int
48217 main ()
48218 {
48219 
48220              /* Are we little or big endian?  From Harbison&Steele.  */
48221              union
48222              {
48223                long int l;
48224                char c[sizeof (long int)];
48225              } u;
48226              u.l = 1;
48227              return u.c[sizeof (long int) - 1] == 1;
48228 
48229   ;
48230   return 0;
48231 }
48232 _ACEOF
48233 if ac_fn_cxx_try_run "$LINENO"; then :
48234   ac_cv_c_bigendian=no
48235 else
48236   ac_cv_c_bigendian=yes
48237 fi
48238 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48239   conftest.$ac_objext conftest.beam conftest.$ac_ext
48240 fi
48241 
48242     fi
48243 fi
48244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48245 $as_echo "$ac_cv_c_bigendian" >&6; }
48246  case $ac_cv_c_bigendian in #(
48247    yes)
48248      ENDIAN="big";; #(
48249    no)
48250      ENDIAN="little" ;; #(
48251    universal)
48252      ENDIAN="universal_endianness"
48253      ;; #(
48254    *)
48255      ENDIAN="unknown" ;;
48256  esac
48257 
48258 
48259   if test "x$ENDIAN" = xuniversal_endianness; then
48260     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48261   fi
48262   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48263     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
48264   fi
48265 
48266 
48267 # Configure flags for the tools
48268 
48269   ###############################################################################
48270   #
48271   # How to compile shared libraries.
48272   #
48273 
48274   if test "x$TOOLCHAIN_TYPE" = xgcc; then
48275     PICFLAG="-fPIC"
48276     C_FLAG_REORDER=''
48277     CXX_FLAG_REORDER=''
48278 
48279     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48280       # Linking is different on MacOSX
48281       if test "x$STATIC_BUILD" = xtrue; then
48282         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
48283       else
48284         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48285         JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48286       fi
48287       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48288       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48289       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48290       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48291     else
48292       # Default works for linux, might work on other platforms as well.
48293       SHARED_LIBRARY_FLAGS='-shared'
48294       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48295       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48296       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48297       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48298     fi
48299   elif test "x$TOOLCHAIN_TYPE" = xclang; then
48300     C_FLAG_REORDER=''
48301     CXX_FLAG_REORDER=''
48302 
48303     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48304       # Linking is different on MacOSX
48305       PICFLAG=''
48306       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48307       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48308       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48309       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48310       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48311 
48312       if test "x$STATIC_BUILD" = xfalse; then
48313         JVM_CFLAGS="$JVM_CFLAGS -fPIC"
48314       fi
48315     else
48316       # Default works for linux, might work on other platforms as well.
48317       PICFLAG='-fPIC'
48318       SHARED_LIBRARY_FLAGS='-shared'
48319       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48320       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48321       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48322       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48323     fi
48324   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48325     PICFLAG="-KPIC"
48326     C_FLAG_REORDER='-xF'
48327     CXX_FLAG_REORDER='-xF'
48328     SHARED_LIBRARY_FLAGS="-G"
48329     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
48330     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48331     SET_SHARED_LIBRARY_NAME='-h $1'
48332     SET_SHARED_LIBRARY_MAPFILE='-M$1'
48333   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48334     # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
48335     # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
48336     # will have to patch this single instruction with a call to some out-of-order code which
48337     # does the load from the TOC. This is of course slow. But in that case we also would have
48338     # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
48339     # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
48340     # can be patched directly by the linker and does not require a jump to out-of-order code.
48341     # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
48342     # instead. This creates a distinct TOC for every compilation unit (and thus requires two
48343     # loads for accessing a global variable). But there are rumors that this may be seen as a
48344     # 'performance feature' because of improved code locality of the symbols used in a
48345     # compilation unit.
48346     PICFLAG="-qpic"
48347     JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48348     C_FLAG_REORDER=''
48349     CXX_FLAG_REORDER=''
48350     SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
48351     SET_EXECUTABLE_ORIGIN=""
48352     SET_SHARED_LIBRARY_ORIGIN=''
48353     SET_SHARED_LIBRARY_NAME=''
48354     SET_SHARED_LIBRARY_MAPFILE=''
48355   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48356     PICFLAG=""
48357     C_FLAG_REORDER=''
48358     CXX_FLAG_REORDER=''
48359     SHARED_LIBRARY_FLAGS="-dll"
48360     SET_EXECUTABLE_ORIGIN=''
48361     SET_SHARED_LIBRARY_ORIGIN=''
48362     SET_SHARED_LIBRARY_NAME=''
48363     SET_SHARED_LIBRARY_MAPFILE='-def:$1'
48364   fi
48365 
48366 
48367 
48368 
48369 
48370 
48371 
48372 
48373 
48374   # The (cross) compiler is now configured, we can now test capabilities
48375   # of the target platform.
48376 
48377 
48378 
48379   ###############################################################################
48380   #
48381   # Setup the opt flags for different compilers
48382   # and different operating systems.
48383   #
48384 
48385   # FIXME: this was indirectly the old default, but just inherited.
48386   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48387   #   C_FLAG_DEPS="-MMD -MF"
48388   # fi
48389 
48390   # Generate make dependency files
48391   if test "x$TOOLCHAIN_TYPE" = xgcc; then
48392     C_FLAG_DEPS="-MMD -MF"
48393   elif test "x$TOOLCHAIN_TYPE" = xclang; then
48394     C_FLAG_DEPS="-MMD -MF"
48395   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48396     C_FLAG_DEPS="-xMMD -xMF"
48397   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48398     C_FLAG_DEPS="-qmakedep=gcc -MF"
48399   fi
48400   CXX_FLAG_DEPS="$C_FLAG_DEPS"
48401 
48402 
48403 
48404   # Debug symbols
48405   if test "x$TOOLCHAIN_TYPE" = xgcc; then
48406     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
48407       # reduce from default "-g2" option to save space
48408       CFLAGS_DEBUG_SYMBOLS="-g1"
48409       CXXFLAGS_DEBUG_SYMBOLS="-g1"
48410     else
48411       CFLAGS_DEBUG_SYMBOLS="-g"
48412       CXXFLAGS_DEBUG_SYMBOLS="-g"
48413     fi
48414   elif test "x$TOOLCHAIN_TYPE" = xclang; then
48415     CFLAGS_DEBUG_SYMBOLS="-g"
48416     CXXFLAGS_DEBUG_SYMBOLS="-g"
48417   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48418     CFLAGS_DEBUG_SYMBOLS="-g -xs"
48419     # -g0 enables debug symbols without disabling inlining.
48420     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
48421   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48422     CFLAGS_DEBUG_SYMBOLS="-g"
48423     CXXFLAGS_DEBUG_SYMBOLS="-g"
48424   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48425     CFLAGS_DEBUG_SYMBOLS="-Zi"
48426     CXXFLAGS_DEBUG_SYMBOLS="-Zi"
48427   fi
48428 
48429 
48430 
48431   # Debug symbols for JVM_CFLAGS
48432   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48433     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
48434     if test "x$DEBUG_LEVEL" = xslowdebug; then
48435       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48436     else
48437       # -g0 does not disable inlining, which -g does.
48438       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
48439     fi
48440   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48441     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
48442   else
48443     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48444   fi
48445 
48446 
48447   # bounds, memory and behavior checking options
48448   if test "x$TOOLCHAIN_TYPE" = xgcc; then
48449     case $DEBUG_LEVEL in
48450     release )
48451       # no adjustment
48452       ;;
48453     fastdebug )
48454       # no adjustment
48455       ;;
48456     slowdebug )
48457       # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
48458       # get's added conditionally on whether we produce debug symbols or not.
48459       # This is most likely not really correct.
48460 
48461       # Add runtime stack smashing and undefined behavior checks.
48462       # Not all versions of gcc support -fstack-protector
48463       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
48464 
48465 
48466 
48467 
48468 
48469 
48470 
48471 
48472 
48473 
48474 
48475 
48476 
48477 
48478 
48479 
48480 
48481 
48482 
48483 
48484 
48485 
48486 
48487 
48488 
48489 
48490 
48491 
48492 
48493 
48494 
48495 
48496 
48497 
48498 
48499 
48500 
48501 
48502 
48503 
48504 
48505 
48506     # Execute function body
48507 
48508 
48509 
48510 
48511 
48512 
48513 
48514 
48515 
48516 
48517 
48518 
48519 
48520 
48521 
48522 
48523 
48524 
48525 
48526 
48527 
48528 
48529 
48530 
48531 
48532 
48533 
48534 
48535 
48536 
48537 
48538 
48539 
48540 
48541 
48542 
48543 
48544 
48545 
48546 
48547 
48548 
48549 
48550 
48551 
48552 
48553 
48554 
48555     # Execute function body
48556 
48557   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48558 $as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48559   supports=yes
48560 
48561   saved_cflags="$CFLAGS"
48562   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
48563   ac_ext=c
48564 ac_cpp='$CPP $CPPFLAGS'
48565 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48566 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48567 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48568 
48569   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48570 /* end confdefs.h.  */
48571 int i;
48572 _ACEOF
48573 if ac_fn_c_try_compile "$LINENO"; then :
48574 
48575 else
48576   supports=no
48577 fi
48578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48579   ac_ext=cpp
48580 ac_cpp='$CXXCPP $CPPFLAGS'
48581 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48582 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48583 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48584 
48585   CFLAGS="$saved_cflags"
48586 
48587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48588 $as_echo "$supports" >&6; }
48589   if test "x$supports" = "xyes" ; then
48590     :
48591     C_COMP_SUPPORTS="yes"
48592   else
48593     :
48594     C_COMP_SUPPORTS="no"
48595   fi
48596 
48597 
48598 
48599 
48600 
48601 
48602 
48603 
48604 
48605 
48606 
48607 
48608 
48609 
48610 
48611 
48612 
48613 
48614 
48615 
48616 
48617 
48618 
48619 
48620 
48621 
48622 
48623 
48624 
48625 
48626 
48627 
48628 
48629 
48630 
48631 
48632 
48633 
48634 
48635 
48636 
48637 
48638 
48639 
48640 
48641 
48642 
48643 
48644 
48645 
48646 
48647 
48648 
48649 
48650 
48651 
48652 
48653 
48654 
48655     # Execute function body
48656 
48657   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48658 $as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48659   supports=yes
48660 
48661   saved_cxxflags="$CXXFLAGS"
48662   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
48663   ac_ext=cpp
48664 ac_cpp='$CXXCPP $CPPFLAGS'
48665 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48666 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48667 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48668 
48669   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48670 /* end confdefs.h.  */
48671 int i;
48672 _ACEOF
48673 if ac_fn_cxx_try_compile "$LINENO"; then :
48674 
48675 else
48676   supports=no
48677 fi
48678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48679   ac_ext=cpp
48680 ac_cpp='$CXXCPP $CPPFLAGS'
48681 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48682 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48683 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48684 
48685   CXXFLAGS="$saved_cxxflags"
48686 
48687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48688 $as_echo "$supports" >&6; }
48689   if test "x$supports" = "xyes" ; then
48690     :
48691     CXX_COMP_SUPPORTS="yes"
48692   else
48693     :
48694     CXX_COMP_SUPPORTS="no"
48695   fi
48696 
48697 
48698 
48699 
48700 
48701 
48702 
48703 
48704 
48705 
48706 
48707 
48708 
48709   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48710 $as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48711   supports=no
48712   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48713 
48714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48715 $as_echo "$supports" >&6; }
48716   if test "x$supports" = "xyes" ; then
48717     :
48718 
48719   else
48720     :
48721     STACK_PROTECTOR_CFLAG=""
48722   fi
48723 
48724 
48725 
48726 
48727 
48728 
48729 
48730       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48731       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48732       if test "x$STACK_PROTECTOR_CFLAG" != x; then
48733         JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48734       fi
48735       ;;
48736     esac
48737   fi
48738 
48739   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48740     if test "x$DEBUG_LEVEL" != xrelease; then
48741       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
48742         JVM_CFLAGS="$JVM_CFLAGS -homeparams"
48743       fi
48744     fi
48745   fi
48746 
48747   # Optimization levels
48748   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48749     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
48750 
48751     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
48752       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
48753       C_O_FLAG_HIGHEST_JVM="-xO4"
48754       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
48755       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
48756       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
48757       C_O_FLAG_DEBUG="-xregs=no%frameptr"
48758       C_O_FLAG_DEBUG_JVM=""
48759       C_O_FLAG_NONE="-xregs=no%frameptr"
48760       CXX_O_FLAG_HIGHEST_JVM="-xO4"
48761       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
48762       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
48763       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
48764       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
48765       CXX_O_FLAG_DEBUG_JVM=""
48766       CXX_O_FLAG_NONE="-xregs=no%frameptr"
48767       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
48768         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
48769         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
48770       fi
48771     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48772       C_O_FLAG_HIGHEST_JVM="-xO4"
48773       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
48774       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48775       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48776       C_O_FLAG_DEBUG=""
48777       C_O_FLAG_DEBUG_JVM=""
48778       C_O_FLAG_NONE=""
48779       CXX_O_FLAG_HIGHEST_JVM="-xO4"
48780       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
48781       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48782       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48783       CXX_O_FLAG_DEBUG=""
48784       CXX_O_FLAG_DEBUG_JVM=""
48785       CXX_O_FLAG_NONE=""
48786     fi
48787   else
48788     # The remaining toolchains share opt flags between CC and CXX;
48789     # setup for C and duplicate afterwards.
48790     if test "x$TOOLCHAIN_TYPE" = xgcc; then
48791       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48792         # On MacOSX we optimize for size, something
48793         # we should do for all platforms?
48794         C_O_FLAG_HIGHEST_JVM="-Os"
48795         C_O_FLAG_HIGHEST="-Os"
48796         C_O_FLAG_HI="-Os"
48797         C_O_FLAG_NORM="-Os"
48798         C_O_FLAG_SIZE="-Os"
48799       else
48800         C_O_FLAG_HIGHEST_JVM="-O3"
48801         C_O_FLAG_HIGHEST="-O3"
48802         C_O_FLAG_HI="-O3"
48803         C_O_FLAG_NORM="-O2"
48804         C_O_FLAG_SIZE="-Os"
48805       fi
48806       C_O_FLAG_DEBUG="-O0"
48807       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48808         C_O_FLAG_DEBUG_JVM=""
48809       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48810         C_O_FLAG_DEBUG_JVM="-O0"
48811       fi
48812       C_O_FLAG_NONE="-O0"
48813     elif test "x$TOOLCHAIN_TYPE" = xclang; then
48814       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48815         # On MacOSX we optimize for size, something
48816         # we should do for all platforms?
48817         C_O_FLAG_HIGHEST_JVM="-Os"
48818         C_O_FLAG_HIGHEST="-Os"
48819         C_O_FLAG_HI="-Os"
48820         C_O_FLAG_NORM="-Os"
48821         C_O_FLAG_SIZE="-Os"
48822       else
48823         C_O_FLAG_HIGHEST_JVM="-O3"
48824         C_O_FLAG_HIGHEST="-O3"
48825         C_O_FLAG_HI="-O3"
48826         C_O_FLAG_NORM="-O2"
48827         C_O_FLAG_SIZE="-Os"
48828       fi
48829       C_O_FLAG_DEBUG="-O0"
48830       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48831         C_O_FLAG_DEBUG_JVM=""
48832       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48833         C_O_FLAG_DEBUG_JVM="-O0"
48834       fi
48835       C_O_FLAG_NONE="-O0"
48836     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48837       C_O_FLAG_HIGHEST_JVM="-O3"
48838       C_O_FLAG_HIGHEST="-O3"
48839       C_O_FLAG_HI="-O3 -qstrict"
48840       C_O_FLAG_NORM="-O2"
48841       C_O_FLAG_DEBUG="-qnoopt"
48842       # FIXME: Value below not verified.
48843       C_O_FLAG_DEBUG_JVM=""
48844       C_O_FLAG_NONE="-qnoopt"
48845     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48846       C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
48847       C_O_FLAG_HIGHEST="-O2"
48848       C_O_FLAG_HI="-O1"
48849       C_O_FLAG_NORM="-O1"
48850       C_O_FLAG_DEBUG="-Od"
48851       C_O_FLAG_DEBUG_JVM=""
48852       C_O_FLAG_NONE="-Od"
48853       C_O_FLAG_SIZE="-Os"
48854     fi
48855     CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
48856     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
48857     CXX_O_FLAG_HI="$C_O_FLAG_HI"
48858     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
48859     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
48860     CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
48861     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
48862     CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
48863   fi
48864 
48865   # Adjust optimization flags according to debug level.
48866   case $DEBUG_LEVEL in
48867     release )
48868       # no adjustment
48869       ;;
48870     fastdebug )
48871       # Not quite so much optimization
48872       C_O_FLAG_HI="$C_O_FLAG_NORM"
48873       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
48874       ;;
48875     slowdebug )
48876       # Disable optimization
48877       C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
48878       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
48879       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
48880       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
48881       C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
48882       CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
48883       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
48884       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
48885       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
48886       CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
48887       ;;
48888   esac
48889 
48890 
48891 
48892 
48893 
48894 
48895 
48896 
48897 
48898 
48899 
48900 
48901 
48902 
48903 
48904 
48905 
48906 
48907 
48908   # Special extras...
48909   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48910     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48911       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48912       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48913     fi
48914     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48915     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48916   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48917     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48918     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48919   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
48920     CXXSTD_CXXFLAG="-std=gnu++98"
48921 
48922 
48923 
48924 
48925 
48926 
48927 
48928 
48929 
48930 
48931 
48932 
48933 
48934 
48935 
48936 
48937 
48938 
48939 
48940 
48941 
48942 
48943 
48944 
48945 
48946 
48947 
48948 
48949 
48950 
48951 
48952 
48953 
48954 
48955 
48956 
48957 
48958 
48959 
48960 
48961 
48962 
48963     # Execute function body
48964 
48965   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
48966 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
48967   supports=yes
48968 
48969   saved_cxxflags="$CXXFLAGS"
48970   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
48971   ac_ext=cpp
48972 ac_cpp='$CXXCPP $CPPFLAGS'
48973 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48974 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48975 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48976 
48977   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48978 /* end confdefs.h.  */
48979 int i;
48980 _ACEOF
48981 if ac_fn_cxx_try_compile "$LINENO"; then :
48982 
48983 else
48984   supports=no
48985 fi
48986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48987   ac_ext=cpp
48988 ac_cpp='$CXXCPP $CPPFLAGS'
48989 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48990 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48991 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48992 
48993   CXXFLAGS="$saved_cxxflags"
48994 
48995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48996 $as_echo "$supports" >&6; }
48997   if test "x$supports" = "xyes" ; then
48998     :
48999 
49000   else
49001     :
49002     CXXSTD_CXXFLAG=""
49003   fi
49004 
49005 
49006 
49007 
49008 
49009 
49010 
49011 
49012 
49013 
49014 
49015 
49016     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49017 
49018   fi
49019   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49020     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49021     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49022     CFLAGS_JDKLIB_EXTRA='-xstrconst'
49023     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49024     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49025   fi
49026 
49027   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49028     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49029     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49030     CFLAGS_JDKLIB_EXTRA='-xstrconst'
49031   fi
49032 
49033   CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49034   CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49035   LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49036 
49037   ###############################################################################
49038   #
49039   # Now setup the CFLAGS and LDFLAGS for the JDK build.
49040   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49041   #
49042 
49043   # Setup compiler/platform specific flags into
49044   #    CFLAGS_JDK    - C Compiler flags
49045   #    CXXFLAGS_JDK  - C++ Compiler flags
49046   #    COMMON_CCXXFLAGS_JDK - common to C and C++
49047   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49048     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49049     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49050     JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49051     if test "x$OPENJDK_TARGET_CPU" = xx86; then
49052       # Force compatibility with i586 on 32 bit intel platforms.
49053       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49054       JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49055     fi
49056     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49057         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49058     case $OPENJDK_TARGET_CPU_ARCH in
49059       arm )
49060         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49061         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49062         ;;
49063       ppc )
49064         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49065         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49066         ;;
49067       * )
49068         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49069         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49070         ;;
49071     esac
49072 
49073 
49074 
49075 
49076 
49077 
49078 
49079 
49080 
49081 
49082 
49083 
49084 
49085 
49086 
49087 
49088 
49089 
49090 
49091 
49092 
49093 
49094 
49095 
49096 
49097 
49098 
49099 
49100 
49101 
49102 
49103 
49104 
49105 
49106 
49107 
49108 
49109 
49110 
49111 
49112 
49113 
49114     # Execute function body
49115 
49116   # Need to assign to a variable since m4 is blocked from modifying parts in [].
49117   REFERENCE_VERSION=6
49118 
49119   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49120     as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49121   fi
49122 
49123   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49124     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49125   fi
49126 
49127   # Version comparison method inspired by http://stackoverflow.com/a/24067243
49128   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49129 
49130   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49131     :
49132 
49133   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49134   # runs afoul of the more aggressive versions of these optimisations.
49135   # Notably, value range propagation now assumes that the this pointer of C++
49136   # member functions is non-null.
49137   NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
49138 
49139 
49140 
49141 
49142 
49143 
49144 
49145 
49146 
49147 
49148 
49149 
49150 
49151 
49152 
49153 
49154 
49155 
49156 
49157 
49158 
49159 
49160 
49161 
49162 
49163 
49164 
49165 
49166 
49167 
49168 
49169 
49170 
49171 
49172 
49173 
49174 
49175 
49176 
49177 
49178 
49179 
49180     # Execute function body
49181 
49182 
49183 
49184 
49185 
49186 
49187 
49188 
49189 
49190 
49191 
49192 
49193 
49194 
49195 
49196 
49197 
49198 
49199 
49200 
49201 
49202 
49203 
49204 
49205 
49206 
49207 
49208 
49209 
49210 
49211 
49212 
49213 
49214 
49215 
49216 
49217 
49218 
49219 
49220 
49221 
49222 
49223 
49224 
49225 
49226 
49227 
49228 
49229     # Execute function body
49230 
49231   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49232 $as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49233   supports=yes
49234 
49235   saved_cflags="$CFLAGS"
49236   CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49237   ac_ext=c
49238 ac_cpp='$CPP $CPPFLAGS'
49239 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49240 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49241 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49242 
49243   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49244 /* end confdefs.h.  */
49245 int i;
49246 _ACEOF
49247 if ac_fn_c_try_compile "$LINENO"; then :
49248 
49249 else
49250   supports=no
49251 fi
49252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49253   ac_ext=cpp
49254 ac_cpp='$CXXCPP $CPPFLAGS'
49255 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49256 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49257 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49258 
49259   CFLAGS="$saved_cflags"
49260 
49261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49262 $as_echo "$supports" >&6; }
49263   if test "x$supports" = "xyes" ; then
49264     :
49265     C_COMP_SUPPORTS="yes"
49266   else
49267     :
49268     C_COMP_SUPPORTS="no"
49269   fi
49270 
49271 
49272 
49273 
49274 
49275 
49276 
49277 
49278 
49279 
49280 
49281 
49282 
49283 
49284 
49285 
49286 
49287 
49288 
49289 
49290 
49291 
49292 
49293 
49294 
49295 
49296 
49297 
49298 
49299 
49300 
49301 
49302 
49303 
49304 
49305 
49306 
49307 
49308 
49309 
49310 
49311 
49312 
49313 
49314 
49315 
49316 
49317 
49318 
49319 
49320 
49321 
49322 
49323 
49324 
49325 
49326 
49327 
49328 
49329     # Execute function body
49330 
49331   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49332 $as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49333   supports=yes
49334 
49335   saved_cxxflags="$CXXFLAGS"
49336   CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49337   ac_ext=cpp
49338 ac_cpp='$CXXCPP $CPPFLAGS'
49339 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49340 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49341 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49342 
49343   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49344 /* end confdefs.h.  */
49345 int i;
49346 _ACEOF
49347 if ac_fn_cxx_try_compile "$LINENO"; then :
49348 
49349 else
49350   supports=no
49351 fi
49352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49353   ac_ext=cpp
49354 ac_cpp='$CXXCPP $CPPFLAGS'
49355 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49356 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49357 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49358 
49359   CXXFLAGS="$saved_cxxflags"
49360 
49361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49362 $as_echo "$supports" >&6; }
49363   if test "x$supports" = "xyes" ; then
49364     :
49365     CXX_COMP_SUPPORTS="yes"
49366   else
49367     :
49368     CXX_COMP_SUPPORTS="no"
49369   fi
49370 
49371 
49372 
49373 
49374 
49375 
49376 
49377 
49378 
49379 
49380 
49381 
49382 
49383   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49384 $as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49385   supports=no
49386   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49387 
49388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49389 $as_echo "$supports" >&6; }
49390   if test "x$supports" = "xyes" ; then
49391     :
49392 
49393   else
49394     :
49395     NO_NULL_POINTER_CHECK_CFLAG=""
49396   fi
49397 
49398 
49399 
49400 
49401 
49402 
49403 
49404   NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
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 
49435 
49436 
49437 
49438 
49439 
49440 
49441 
49442 
49443 
49444 
49445 
49446 
49447     # Execute function body
49448 
49449 
49450 
49451 
49452 
49453 
49454 
49455 
49456 
49457 
49458 
49459 
49460 
49461 
49462 
49463 
49464 
49465 
49466 
49467 
49468 
49469 
49470 
49471 
49472 
49473 
49474 
49475 
49476 
49477 
49478 
49479 
49480 
49481 
49482 
49483 
49484 
49485 
49486 
49487 
49488 
49489 
49490 
49491 
49492 
49493 
49494 
49495 
49496     # Execute function body
49497 
49498   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49499 $as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49500   supports=yes
49501 
49502   saved_cflags="$CFLAGS"
49503   CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
49504   ac_ext=c
49505 ac_cpp='$CPP $CPPFLAGS'
49506 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49507 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49508 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49509 
49510   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49511 /* end confdefs.h.  */
49512 int i;
49513 _ACEOF
49514 if ac_fn_c_try_compile "$LINENO"; then :
49515 
49516 else
49517   supports=no
49518 fi
49519 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49520   ac_ext=cpp
49521 ac_cpp='$CXXCPP $CPPFLAGS'
49522 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49523 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49524 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49525 
49526   CFLAGS="$saved_cflags"
49527 
49528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49529 $as_echo "$supports" >&6; }
49530   if test "x$supports" = "xyes" ; then
49531     :
49532     C_COMP_SUPPORTS="yes"
49533   else
49534     :
49535     C_COMP_SUPPORTS="no"
49536   fi
49537 
49538 
49539 
49540 
49541 
49542 
49543 
49544 
49545 
49546 
49547 
49548 
49549 
49550 
49551 
49552 
49553 
49554 
49555 
49556 
49557 
49558 
49559 
49560 
49561 
49562 
49563 
49564 
49565 
49566 
49567 
49568 
49569 
49570 
49571 
49572 
49573 
49574 
49575 
49576 
49577 
49578 
49579 
49580 
49581 
49582 
49583 
49584 
49585 
49586 
49587 
49588 
49589 
49590 
49591 
49592 
49593 
49594 
49595 
49596     # Execute function body
49597 
49598   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49599 $as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49600   supports=yes
49601 
49602   saved_cxxflags="$CXXFLAGS"
49603   CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
49604   ac_ext=cpp
49605 ac_cpp='$CXXCPP $CPPFLAGS'
49606 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49607 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49608 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49609 
49610   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49611 /* end confdefs.h.  */
49612 int i;
49613 _ACEOF
49614 if ac_fn_cxx_try_compile "$LINENO"; then :
49615 
49616 else
49617   supports=no
49618 fi
49619 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49620   ac_ext=cpp
49621 ac_cpp='$CXXCPP $CPPFLAGS'
49622 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49623 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49624 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49625 
49626   CXXFLAGS="$saved_cxxflags"
49627 
49628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49629 $as_echo "$supports" >&6; }
49630   if test "x$supports" = "xyes" ; then
49631     :
49632     CXX_COMP_SUPPORTS="yes"
49633   else
49634     :
49635     CXX_COMP_SUPPORTS="no"
49636   fi
49637 
49638 
49639 
49640 
49641 
49642 
49643 
49644 
49645 
49646 
49647 
49648 
49649 
49650   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49651 $as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49652   supports=no
49653   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49654 
49655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49656 $as_echo "$supports" >&6; }
49657   if test "x$supports" = "xyes" ; then
49658     :
49659 
49660   else
49661     :
49662     NO_LIFETIME_DSE_CFLAG=""
49663   fi
49664 
49665 
49666 
49667 
49668 
49669 
49670   CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49671 
49672 
49673 
49674   else
49675     :
49676 
49677   fi
49678 
49679 
49680 
49681 
49682 
49683 
49684 
49685 
49686 
49687 
49688 
49689 
49690   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49691     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49692 
49693     # Restrict the debug information created by Clang to avoid
49694     # too big object files and speed the build up a little bit
49695     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49696     JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49697     if test "x$OPENJDK_TARGET_OS" = xlinux; then
49698       if test "x$OPENJDK_TARGET_CPU" = xx86; then
49699         # Force compatibility with i586 on 32 bit intel platforms.
49700         COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49701         JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49702       fi
49703       JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49704       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49705           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49706       case $OPENJDK_TARGET_CPU_ARCH in
49707         ppc )
49708           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49709           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49710           ;;
49711         * )
49712           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49713           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49714           ;;
49715       esac
49716     fi
49717   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49718     JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49719     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49720     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49721       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49722     fi
49723 
49724     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49725     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49726   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49727     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49728     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49729     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49730   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49731     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49732         -MD -Zc:wchar_t- -W3 -wd4800 \
49733         -DWIN32_LEAN_AND_MEAN \
49734         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49735         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49736         -DWIN32 -DIAL"
49737     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49738       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49739     else
49740       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49741     fi
49742     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49743     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49744     # studio.
49745     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49746       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49747       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49748       JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
49749     fi
49750   fi
49751 
49752   ###############################################################################
49753 
49754   # Adjust flags according to debug level.
49755   case $DEBUG_LEVEL in
49756     fastdebug | slowdebug )
49757       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49758       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49759       JAVAC_FLAGS="$JAVAC_FLAGS -g"
49760       ;;
49761     release )
49762       ;;
49763     * )
49764       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49765       ;;
49766   esac
49767 
49768   # Set some common defines. These works for all compilers, but assume
49769   # -D is universally accepted.
49770 
49771   # Setup endianness
49772   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49773     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49774     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49775     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49776     #   Note: -Dmacro         is the same as    #define macro 1
49777     #         -Dmacro=        is the same as    #define macro
49778     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49779       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
49780     else
49781       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
49782     fi
49783   else
49784     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
49785     # are defined in the system?
49786     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49787       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
49788     else
49789       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
49790     fi
49791   fi
49792 
49793   # Setup target OS define. Use OS target name but in upper case.
49794   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
49795   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
49796 
49797   # Setup target CPU
49798   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
49799       $OPENJDK_TARGET_ADD_LP64 \
49800       -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
49801 
49802   # Setup debug/release defines
49803   if test "x$DEBUG_LEVEL" = xrelease; then
49804     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
49805     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49806       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
49807     fi
49808   else
49809     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
49810   fi
49811 
49812   # Set some additional per-OS defines.
49813   if test "x$OPENJDK_TARGET_OS" = xlinux; then
49814     JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
49815     JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
49816         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
49817   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49818     JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
49819     JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
49820         -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
49821   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49822     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
49823     JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
49824     JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
49825     JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
49826         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
49827         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
49828         -fno-omit-frame-pointer"
49829   elif test "x$OPENJDK_TARGET_OS" = xaix; then
49830     JVM_CFLAGS="$JVM_CFLAGS -DAIX"
49831     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
49832     JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
49833         -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
49834         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
49835   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
49836     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
49837   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49838     JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
49839     JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
49840   fi
49841 
49842   # Set some additional per-CPU defines.
49843   if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
49844     JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
49845   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49846     JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
49847   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
49848     if test "x$OPENJDK_TARGET_OS" = xlinux; then
49849       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
49850       # fixes `relocation truncated to fit' error for gcc 4.1.
49851       JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
49852       # Use ppc64 instructions, but schedule for power5
49853       JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
49854     elif test "x$OPENJDK_TARGET_OS" = xaix; then
49855       JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
49856     fi
49857   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
49858     if test "x$OPENJDK_TARGET_OS" = xlinux; then
49859       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
49860       # Little endian machine uses ELFv2 ABI.
49861       JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
49862       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
49863       JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
49864     fi
49865   fi
49866 
49867   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49868     JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
49869   fi
49870 
49871   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49872     if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
49873       # Solaris does not have _LP64=1 in the old build.
49874       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
49875       JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
49876     fi
49877   fi
49878 
49879   # Set JVM_CFLAGS warning handling
49880   if test "x$OPENJDK_TARGET_OS" = xlinux; then
49881     JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
49882         -Wunused-value -Woverloaded-virtual"
49883 
49884     if test "x$TOOLCHAIN_TYPE" = xgcc; then
49885 
49886 
49887 
49888 
49889 
49890 
49891 
49892 
49893 
49894 
49895 
49896 
49897 
49898 
49899 
49900 
49901 
49902 
49903 
49904 
49905 
49906 
49907 
49908 
49909 
49910 
49911 
49912 
49913 
49914 
49915 
49916 
49917 
49918 
49919 
49920 
49921 
49922 
49923 
49924 
49925 
49926 
49927     # Execute function body
49928 
49929   # Need to assign to a variable since m4 is blocked from modifying parts in [].
49930   REFERENCE_VERSION=4.8
49931 
49932   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49933     as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
49934   fi
49935 
49936   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49937     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
49938   fi
49939 
49940   # Version comparison method inspired by http://stackoverflow.com/a/24067243
49941   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49942 
49943   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49944     :
49945 
49946             # These flags either do not work or give spurious warnings prior to gcc 4.8.
49947             JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
49948 
49949 
49950   else
49951     :
49952 
49953   fi
49954 
49955 
49956 
49957 
49958 
49959 
49960 
49961 
49962 
49963 
49964 
49965 
49966     fi
49967     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
49968       # Non-zero builds have stricter warnings
49969       JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
49970     else
49971       if test "x$TOOLCHAIN_TYPE" = xclang; then
49972         # Some versions of llvm do not like -Wundef
49973         JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
49974       fi
49975     fi
49976   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49977     JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
49978         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
49979   fi
49980 
49981   # Additional macosx handling
49982   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49983     # Setting these parameters makes it an error to link to macosx APIs that are
49984     # newer than the given OS version and makes the linked binaries compatible
49985     # even if built on a newer version of the OS.
49986     # The expected format is X.Y.Z
49987     MACOSX_VERSION_MIN=10.7.0
49988 
49989 
49990     # The macro takes the version with no dots, ex: 1070
49991     # Let the flags variables get resolved in make for easier override on make
49992     # command line.
49993     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
49994     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
49995   fi
49996 
49997   # Setup some hard coded includes
49998   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
49999       -I${JDK_TOPDIR}/src/java.base/share/native/include \
50000       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50001       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50002       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50003       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50004 
50005   # The shared libraries are compiled using the picflag.
50006   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50007       $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50008   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50009       $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50010 
50011   # Executable flags
50012   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50013   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50014 
50015 
50016 
50017 
50018 
50019 
50020   # Setup LDFLAGS et al.
50021   #
50022 
50023   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50024     LDFLAGS_MICROSOFT="-nologo -opt:ref"
50025     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50026     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50027     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50028       LDFLAGS_SAFESH="-safeseh"
50029       LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50030       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50031       # NOTE: Old build added -machine. Probably not needed.
50032       JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50033     else
50034       JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50035     fi
50036   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50037       JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50038       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50039         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50040         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50041     fi
50042   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50043     # If this is a --hash-style=gnu system, use --hash-style=both, why?
50044     # We have previously set HAS_GNU_HASH if this is the case
50045     if test -n "$HAS_GNU_HASH"; then
50046       LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50047       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50048       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50049     fi
50050       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50051         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50052     fi
50053     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50054       # And since we now know that the linker is gnu, then add -z defs, to forbid
50055       # undefined symbols in object files.
50056       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50057       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50058       JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50059       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50060       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50061       if test "x$OPENJDK_TARGET_CPU" = xx86; then
50062         JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50063       fi
50064       case $DEBUG_LEVEL in
50065         release )
50066           # tell linker to optimize libraries.
50067           # Should this be supplied to the OSS linker as well?
50068           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50069           LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50070           JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50071           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50072             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50073           fi
50074           ;;
50075         slowdebug )
50076           # Hotspot always let the linker optimize
50077           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50078           if test "x$HAS_LINKER_NOW" = "xtrue"; then
50079             # do relocations at load
50080             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50081             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50082             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50083           fi
50084           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50085             # mark relocations read only
50086             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50087             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50088             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50089           fi
50090           ;;
50091         fastdebug )
50092           # Hotspot always let the linker optimize
50093           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50094           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50095             # mark relocations read only
50096             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50097             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50098             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50099           fi
50100           ;;
50101         * )
50102           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50103           ;;
50104         esac
50105     fi
50106   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50107     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50108     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50109     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50110     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50111     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50112     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50113       JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50114     fi
50115   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50116     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50117     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50118     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50119   fi
50120 
50121   # Customize LDFLAGS for executables
50122 
50123   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50124 
50125   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50126     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50127       LDFLAGS_STACK_SIZE=1048576
50128     else
50129       LDFLAGS_STACK_SIZE=327680
50130     fi
50131     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50132   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50133     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50134   fi
50135 
50136   LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50137 
50138   # Customize LDFLAGS for libs
50139   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50140 
50141   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50142   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50143     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50144         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50145     JDKLIB_LIBS=""
50146   else
50147     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50148         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50149 
50150     if test "xTARGET" = "xTARGET"; then
50151     # On some platforms (mac) the linker warns about non existing -L dirs.
50152     # Add server first if available. Linking aginst client does not always produce the same results.
50153       # Only add client/minimal dir if client/minimal is being built.
50154     # Default to server for other variants.
50155       if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50156         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50157       elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50158         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50159       elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50160         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50161     else
50162         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50163     fi
50164     elif test "xTARGET" = "xBUILD"; then
50165       # When building a buildjdk, it's always only the server variant
50166       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50167           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50168     fi
50169 
50170     JDKLIB_LIBS="-ljava -ljvm"
50171     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50172       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50173     fi
50174 
50175   fi
50176 
50177   # Set JVM_LIBS (per os)
50178   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50179     JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50180   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50181     # FIXME: This hard-coded path is not really proper.
50182     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50183       SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50184     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50185       SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50186     fi
50187     JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50188         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50189   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50190     JVM_LIBS="$JVM_LIBS -lm"
50191   elif test "x$OPENJDK_TARGET_OS" = xaix; then
50192     JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50193   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50194     JVM_LIBS="$JVM_LIBS -lm"
50195   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50196     JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50197         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50198         wsock32.lib winmm.lib version.lib psapi.lib"
50199     fi
50200 
50201   # Set JVM_ASFLAGS
50202   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50203     if test "x$OPENJDK_TARGET_CPU" = xx86; then
50204       JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50205     fi
50206   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50207     JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50208   fi
50209 
50210   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50211 
50212 
50213 
50214 
50215 
50216 
50217 
50218 
50219 
50220 
50221 
50222 
50223 
50224 
50225 
50226   # Special extras...
50227   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50228     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50229       OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50230       OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50231     fi
50232     OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50233     OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50234   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50235     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50236     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50237   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50238     OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50239 
50240 
50241 
50242 
50243 
50244 
50245 
50246 
50247 
50248 
50249 
50250 
50251 
50252 
50253 
50254 
50255 
50256 
50257 
50258 
50259 
50260 
50261 
50262 
50263 
50264 
50265 
50266 
50267 
50268 
50269 
50270 
50271 
50272 
50273 
50274 
50275 
50276 
50277 
50278 
50279 
50280 
50281     # Execute function body
50282 
50283   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50284 $as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50285   supports=yes
50286 
50287   saved_cxxflags="$CXXFLAGS"
50288   CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50289   ac_ext=cpp
50290 ac_cpp='$CXXCPP $CPPFLAGS'
50291 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50292 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50293 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50294 
50295   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50296 /* end confdefs.h.  */
50297 int i;
50298 _ACEOF
50299 if ac_fn_cxx_try_compile "$LINENO"; then :
50300 
50301 else
50302   supports=no
50303 fi
50304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50305   ac_ext=cpp
50306 ac_cpp='$CXXCPP $CPPFLAGS'
50307 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50308 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50309 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50310 
50311   CXXFLAGS="$saved_cxxflags"
50312 
50313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50314 $as_echo "$supports" >&6; }
50315   if test "x$supports" = "xyes" ; then
50316     :
50317 
50318   else
50319     :
50320     OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50321   fi
50322 
50323 
50324 
50325 
50326 
50327 
50328 
50329 
50330 
50331 
50332 
50333 
50334     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50335 
50336   fi
50337   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50338     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50339     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50340     OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50341     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50342     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50343   fi
50344 
50345   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50346     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50347     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50348     OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50349   fi
50350 
50351   OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50352   OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50353   OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50354 
50355   ###############################################################################
50356   #
50357   # Now setup the CFLAGS and LDFLAGS for the JDK build.
50358   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50359   #
50360 
50361   # Setup compiler/platform specific flags into
50362   #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50363   #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50364   #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50365   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50366     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50367     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50368     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50369     if test "x$OPENJDK_BUILD_CPU" = xx86; then
50370       # Force compatibility with i586 on 32 bit intel platforms.
50371       OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50372       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50373     fi
50374     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50375         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50376     case $OPENJDK_BUILD_CPU_ARCH in
50377       arm )
50378         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50379         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50380         ;;
50381       ppc )
50382         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50383         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50384         ;;
50385       * )
50386         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50387         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50388         ;;
50389     esac
50390 
50391 
50392 
50393 
50394 
50395 
50396 
50397 
50398 
50399 
50400 
50401 
50402 
50403 
50404 
50405 
50406 
50407 
50408 
50409 
50410 
50411 
50412 
50413 
50414 
50415 
50416 
50417 
50418 
50419 
50420 
50421 
50422 
50423 
50424 
50425 
50426 
50427 
50428 
50429 
50430 
50431 
50432     # Execute function body
50433 
50434   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50435   REFERENCE_VERSION=6
50436 
50437   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50438     as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50439   fi
50440 
50441   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50442     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50443   fi
50444 
50445   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50446   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50447 
50448   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50449     :
50450 
50451   else
50452     :
50453 
50454   fi
50455 
50456 
50457 
50458 
50459 
50460 
50461 
50462 
50463 
50464 
50465 
50466 
50467   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50468     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50469 
50470     # Restrict the debug information created by Clang to avoid
50471     # too big object files and speed the build up a little bit
50472     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50473     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50474     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50475       if test "x$OPENJDK_BUILD_CPU" = xx86; then
50476         # Force compatibility with i586 on 32 bit intel platforms.
50477         OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50478         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50479       fi
50480       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50481       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50482           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50483       case $OPENJDK_BUILD_CPU_ARCH in
50484         ppc )
50485           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50486           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50487           ;;
50488         * )
50489           OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50490           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50491           ;;
50492       esac
50493     fi
50494   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50495     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50496     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50497     if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50498       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50499     fi
50500 
50501     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50502     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50503   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50504     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50505     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50506     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50507   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50508     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50509         -MD -Zc:wchar_t- -W3 -wd4800 \
50510         -DWIN32_LEAN_AND_MEAN \
50511         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50512         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50513         -DWIN32 -DIAL"
50514     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50515       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50516     else
50517       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50518     fi
50519     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50520     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50521     # studio.
50522     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50523       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50524       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50525       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50526     fi
50527   fi
50528 
50529   ###############################################################################
50530 
50531   # Adjust flags according to debug level.
50532   case $DEBUG_LEVEL in
50533     fastdebug | slowdebug )
50534       OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50535       OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50536       JAVAC_FLAGS="$JAVAC_FLAGS -g"
50537       ;;
50538     release )
50539       ;;
50540     * )
50541       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50542       ;;
50543   esac
50544 
50545   # Set some common defines. These works for all compilers, but assume
50546   # -D is universally accepted.
50547 
50548   # Setup endianness
50549   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50550     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50551     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50552     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50553     #   Note: -Dmacro         is the same as    #define macro 1
50554     #         -Dmacro=        is the same as    #define macro
50555     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50556       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50557     else
50558       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50559     fi
50560   else
50561     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50562     # are defined in the system?
50563     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50564       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50565     else
50566       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50567     fi
50568   fi
50569 
50570   # Setup target OS define. Use OS target name but in upper case.
50571   OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50572   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50573 
50574   # Setup target CPU
50575   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50576       $OPENJDK_BUILD_ADD_LP64 \
50577       -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50578 
50579   # Setup debug/release defines
50580   if test "x$DEBUG_LEVEL" = xrelease; then
50581     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50582     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50583       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50584     fi
50585   else
50586     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50587   fi
50588 
50589   # Set some additional per-OS defines.
50590   if test "x$OPENJDK_BUILD_OS" = xlinux; then
50591     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50592     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50593         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50594   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50595     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50596     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50597         -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50598   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50599     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50600     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50601     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50602     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50603         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50604         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50605         -fno-omit-frame-pointer"
50606   elif test "x$OPENJDK_BUILD_OS" = xaix; then
50607     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50608     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50609     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
50610         -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50611         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50612   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50613     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50614   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50615     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50616     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50617   fi
50618 
50619   # Set some additional per-CPU defines.
50620   if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50621     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50622   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50623     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50624   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50625     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50626       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50627       # fixes `relocation truncated to fit' error for gcc 4.1.
50628       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50629       # Use ppc64 instructions, but schedule for power5
50630       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50631     elif test "x$OPENJDK_BUILD_OS" = xaix; then
50632       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50633     fi
50634   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50635     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50636       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50637       # Little endian machine uses ELFv2 ABI.
50638       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50639       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50640       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50641     fi
50642   fi
50643 
50644   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50645     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50646   fi
50647 
50648   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50649     if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50650       # Solaris does not have _LP64=1 in the old build.
50651       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50652       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50653     fi
50654   fi
50655 
50656   # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50657   if test "x$OPENJDK_BUILD_OS" = xlinux; then
50658     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50659         -Wunused-value -Woverloaded-virtual"
50660 
50661     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50662 
50663 
50664 
50665 
50666 
50667 
50668 
50669 
50670 
50671 
50672 
50673 
50674 
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     # Execute function body
50705 
50706   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50707   REFERENCE_VERSION=4.8
50708 
50709   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50710     as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50711   fi
50712 
50713   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50714     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50715   fi
50716 
50717   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50718   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50719 
50720   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50721     :
50722 
50723             # These flags either do not work or give spurious warnings prior to gcc 4.8.
50724             OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50725 
50726 
50727   else
50728     :
50729 
50730   fi
50731 
50732 
50733 
50734 
50735 
50736 
50737 
50738 
50739 
50740 
50741 
50742 
50743     fi
50744     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50745       # Non-zero builds have stricter warnings
50746       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50747     else
50748       if test "x$TOOLCHAIN_TYPE" = xclang; then
50749         # Some versions of llvm do not like -Wundef
50750         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
50751       fi
50752     fi
50753   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50754     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50755         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50756   fi
50757 
50758   # Additional macosx handling
50759   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50760     # Setting these parameters makes it an error to link to macosx APIs that are
50761     # newer than the given OS version and makes the linked binaries compatible
50762     # even if built on a newer version of the OS.
50763     # The expected format is X.Y.Z
50764     MACOSX_VERSION_MIN=10.7.0
50765 
50766 
50767     # The macro takes the version with no dots, ex: 1070
50768     # Let the flags variables get resolved in make for easier override on make
50769     # command line.
50770     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)"
50771     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50772   fi
50773 
50774   # Setup some hard coded includes
50775   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50776       -I${JDK_TOPDIR}/src/java.base/share/native/include \
50777       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
50778       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
50779       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50780       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
50781 
50782   # The shared libraries are compiled using the picflag.
50783   OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50784       $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
50785   OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50786       $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
50787 
50788   # Executable flags
50789   OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
50790   OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
50791 
50792 
50793 
50794 
50795 
50796 
50797   # Setup LDFLAGS et al.
50798   #
50799 
50800   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50801     LDFLAGS_MICROSOFT="-nologo -opt:ref"
50802     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50803     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50804     if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
50805       LDFLAGS_SAFESH="-safeseh"
50806       OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
50807       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
50808       # NOTE: Old build added -machine. Probably not needed.
50809       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
50810     else
50811       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
50812     fi
50813   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50814       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50815       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50816         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50817         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50818     fi
50819   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50820     # If this is a --hash-style=gnu system, use --hash-style=both, why?
50821     # We have previously set HAS_GNU_HASH if this is the case
50822     if test -n "$HAS_GNU_HASH"; then
50823       OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50824       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50825       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50826     fi
50827       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50828         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50829     fi
50830     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50831       # And since we now know that the linker is gnu, then add -z defs, to forbid
50832       # undefined symbols in object files.
50833       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50834       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50835       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50836       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50837       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50838       if test "x$OPENJDK_BUILD_CPU" = xx86; then
50839         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
50840       fi
50841       case $DEBUG_LEVEL in
50842         release )
50843           # tell linker to optimize libraries.
50844           # Should this be supplied to the OSS linker as well?
50845           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50846           OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50847           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50848           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50849             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50850           fi
50851           ;;
50852         slowdebug )
50853           # Hotspot always let the linker optimize
50854           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50855           if test "x$HAS_LINKER_NOW" = "xtrue"; then
50856             # do relocations at load
50857             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
50858             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50859             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
50860           fi
50861           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50862             # mark relocations read only
50863             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50864             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50865             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50866           fi
50867           ;;
50868         fastdebug )
50869           # Hotspot always let the linker optimize
50870           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50871           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50872             # mark relocations read only
50873             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50874             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50875             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50876           fi
50877           ;;
50878         * )
50879           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50880           ;;
50881         esac
50882     fi
50883   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50884     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50885     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50886     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50887     OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50888     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50889     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50890       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
50891     fi
50892   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50893     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50894     OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
50895     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
50896   fi
50897 
50898   # Customize LDFLAGS for executables
50899 
50900   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
50901 
50902   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50903     if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
50904       LDFLAGS_STACK_SIZE=1048576
50905     else
50906       LDFLAGS_STACK_SIZE=327680
50907     fi
50908     OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50909   elif test "x$OPENJDK_BUILD_OS" = xlinux; then
50910     OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50911   fi
50912 
50913   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
50914 
50915   # Customize LDFLAGS for libs
50916   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
50917 
50918   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50919   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50920     OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50921         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50922     OPENJDK_BUILD_JDKLIB_LIBS=""
50923   else
50924     OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50925         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
50926 
50927     if test "xBUILD" = "xTARGET"; then
50928     # On some platforms (mac) the linker warns about non existing -L dirs.
50929     # Add server first if available. Linking aginst client does not always produce the same results.
50930       # Only add client/minimal dir if client/minimal is being built.
50931     # Default to server for other variants.
50932       if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50933         OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50934       elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50935         OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
50936       elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50937         OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
50938     else
50939         OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50940     fi
50941     elif test "xBUILD" = "xBUILD"; then
50942       # When building a buildjdk, it's always only the server variant
50943       OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50944           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50945     fi
50946 
50947     OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
50948     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50949       OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
50950     fi
50951 
50952   fi
50953 
50954   # Set OPENJDK_BUILD_JVM_LIBS (per os)
50955   if test "x$OPENJDK_BUILD_OS" = xlinux; then
50956     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
50957   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50958     # FIXME: This hard-coded path is not really proper.
50959     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50960       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50961     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50962       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50963     fi
50964     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50965         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50966   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50967     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50968   elif test "x$OPENJDK_BUILD_OS" = xaix; then
50969     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50970   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50971     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50972   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50973     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50974         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50975         wsock32.lib winmm.lib version.lib psapi.lib"
50976     fi
50977 
50978   # Set OPENJDK_BUILD_JVM_ASFLAGS
50979   if test "x$OPENJDK_BUILD_OS" = xlinux; then
50980     if test "x$OPENJDK_BUILD_CPU" = xx86; then
50981       OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
50982     fi
50983   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50984     OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50985   fi
50986 
50987   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
50988 
50989 
50990 
50991 
50992 
50993 
50994 
50995 
50996 
50997 
50998 
50999 
51000 
51001 
51002 
51003   # Tests are only ever compiled for TARGET
51004   # Flags for compiling test libraries
51005   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51006   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51007 
51008   # Flags for compiling test executables
51009   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51010   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51011 
51012 
51013 
51014 
51015 
51016 
51017   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51018   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
51019 
51020 
51021 
51022 
51023 
51024 
51025   # Some Zero and Shark settings.
51026   # ZERO_ARCHFLAG tells the compiler which mode to build for
51027   case "${OPENJDK_TARGET_CPU}" in
51028     s390)
51029       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51030       ;;
51031     *)
51032       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51033   esac
51034 
51035 
51036 
51037 
51038 
51039 
51040 
51041 
51042 
51043 
51044 
51045 
51046 
51047 
51048 
51049 
51050 
51051 
51052 
51053 
51054 
51055 
51056 
51057 
51058 
51059 
51060 
51061 
51062 
51063 
51064 
51065 
51066 
51067 
51068 
51069 
51070 
51071 
51072 
51073 
51074 
51075 
51076     # Execute function body
51077 
51078 
51079 
51080 
51081 
51082 
51083 
51084 
51085 
51086 
51087 
51088 
51089 
51090 
51091 
51092 
51093 
51094 
51095 
51096 
51097 
51098 
51099 
51100 
51101 
51102 
51103 
51104 
51105 
51106 
51107 
51108 
51109 
51110 
51111 
51112 
51113 
51114 
51115 
51116 
51117 
51118 
51119 
51120 
51121 
51122 
51123 
51124 
51125     # Execute function body
51126 
51127   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51128 $as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51129   supports=yes
51130 
51131   saved_cflags="$CFLAGS"
51132   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51133   ac_ext=c
51134 ac_cpp='$CPP $CPPFLAGS'
51135 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51136 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51137 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51138 
51139   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51140 /* end confdefs.h.  */
51141 int i;
51142 _ACEOF
51143 if ac_fn_c_try_compile "$LINENO"; then :
51144 
51145 else
51146   supports=no
51147 fi
51148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51149   ac_ext=cpp
51150 ac_cpp='$CXXCPP $CPPFLAGS'
51151 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51152 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51153 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51154 
51155   CFLAGS="$saved_cflags"
51156 
51157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51158 $as_echo "$supports" >&6; }
51159   if test "x$supports" = "xyes" ; then
51160     :
51161     C_COMP_SUPPORTS="yes"
51162   else
51163     :
51164     C_COMP_SUPPORTS="no"
51165   fi
51166 
51167 
51168 
51169 
51170 
51171 
51172 
51173 
51174 
51175 
51176 
51177 
51178 
51179 
51180 
51181 
51182 
51183 
51184 
51185 
51186 
51187 
51188 
51189 
51190 
51191 
51192 
51193 
51194 
51195 
51196 
51197 
51198 
51199 
51200 
51201 
51202 
51203 
51204 
51205 
51206 
51207 
51208 
51209 
51210 
51211 
51212 
51213 
51214 
51215 
51216 
51217 
51218 
51219 
51220 
51221 
51222 
51223 
51224 
51225     # Execute function body
51226 
51227   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51228 $as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51229   supports=yes
51230 
51231   saved_cxxflags="$CXXFLAGS"
51232   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51233   ac_ext=cpp
51234 ac_cpp='$CXXCPP $CPPFLAGS'
51235 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51236 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51237 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51238 
51239   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51240 /* end confdefs.h.  */
51241 int i;
51242 _ACEOF
51243 if ac_fn_cxx_try_compile "$LINENO"; then :
51244 
51245 else
51246   supports=no
51247 fi
51248 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51249   ac_ext=cpp
51250 ac_cpp='$CXXCPP $CPPFLAGS'
51251 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51252 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51253 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51254 
51255   CXXFLAGS="$saved_cxxflags"
51256 
51257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51258 $as_echo "$supports" >&6; }
51259   if test "x$supports" = "xyes" ; then
51260     :
51261     CXX_COMP_SUPPORTS="yes"
51262   else
51263     :
51264     CXX_COMP_SUPPORTS="no"
51265   fi
51266 
51267 
51268 
51269 
51270 
51271 
51272 
51273 
51274 
51275 
51276 
51277 
51278 
51279   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51280 $as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51281   supports=no
51282   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51283 
51284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51285 $as_echo "$supports" >&6; }
51286   if test "x$supports" = "xyes" ; then
51287     :
51288 
51289   else
51290     :
51291     ZERO_ARCHFLAG=""
51292   fi
51293 
51294 
51295 
51296 
51297 
51298 
51299 
51300 
51301   # Check that the compiler supports -mX (or -qX on AIX) flags
51302   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51303 
51304 
51305 
51306 
51307 
51308 
51309 
51310 
51311 
51312 
51313 
51314 
51315 
51316 
51317 
51318 
51319 
51320 
51321 
51322 
51323 
51324 
51325 
51326 
51327 
51328 
51329 
51330 
51331 
51332 
51333 
51334 
51335 
51336 
51337 
51338 
51339 
51340 
51341 
51342 
51343 
51344 
51345 
51346 
51347 
51348 
51349 
51350     # Execute function body
51351 
51352 
51353 
51354 
51355 
51356 
51357 
51358 
51359 
51360 
51361 
51362 
51363 
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     # Execute function body
51400 
51401   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51402 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51403   supports=yes
51404 
51405   saved_cflags="$CFLAGS"
51406   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51407   ac_ext=c
51408 ac_cpp='$CPP $CPPFLAGS'
51409 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51410 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51411 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51412 
51413   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51414 /* end confdefs.h.  */
51415 int i;
51416 _ACEOF
51417 if ac_fn_c_try_compile "$LINENO"; then :
51418 
51419 else
51420   supports=no
51421 fi
51422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51423   ac_ext=cpp
51424 ac_cpp='$CXXCPP $CPPFLAGS'
51425 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51426 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51427 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51428 
51429   CFLAGS="$saved_cflags"
51430 
51431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51432 $as_echo "$supports" >&6; }
51433   if test "x$supports" = "xyes" ; then
51434     :
51435     C_COMP_SUPPORTS="yes"
51436   else
51437     :
51438     C_COMP_SUPPORTS="no"
51439   fi
51440 
51441 
51442 
51443 
51444 
51445 
51446 
51447 
51448 
51449 
51450 
51451 
51452 
51453 
51454 
51455 
51456 
51457 
51458 
51459 
51460 
51461 
51462 
51463 
51464 
51465 
51466 
51467 
51468 
51469 
51470 
51471 
51472 
51473 
51474 
51475 
51476 
51477 
51478 
51479 
51480 
51481 
51482 
51483 
51484 
51485 
51486 
51487 
51488 
51489 
51490 
51491 
51492 
51493 
51494 
51495 
51496 
51497 
51498 
51499     # Execute function body
51500 
51501   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51502 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51503   supports=yes
51504 
51505   saved_cxxflags="$CXXFLAGS"
51506   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51507   ac_ext=cpp
51508 ac_cpp='$CXXCPP $CPPFLAGS'
51509 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51510 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51511 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51512 
51513   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51514 /* end confdefs.h.  */
51515 int i;
51516 _ACEOF
51517 if ac_fn_cxx_try_compile "$LINENO"; then :
51518 
51519 else
51520   supports=no
51521 fi
51522 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51523   ac_ext=cpp
51524 ac_cpp='$CXXCPP $CPPFLAGS'
51525 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51526 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51527 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51528 
51529   CXXFLAGS="$saved_cxxflags"
51530 
51531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51532 $as_echo "$supports" >&6; }
51533   if test "x$supports" = "xyes" ; then
51534     :
51535     CXX_COMP_SUPPORTS="yes"
51536   else
51537     :
51538     CXX_COMP_SUPPORTS="no"
51539   fi
51540 
51541 
51542 
51543 
51544 
51545 
51546 
51547 
51548 
51549 
51550 
51551 
51552 
51553   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51554 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51555   supports=no
51556   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51557 
51558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51559 $as_echo "$supports" >&6; }
51560   if test "x$supports" = "xyes" ; then
51561     :
51562     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51563   else
51564     :
51565     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51566   fi
51567 
51568 
51569 
51570 
51571 
51572 
51573 
51574 
51575   # Check whether --enable-warnings-as-errors was given.
51576 if test "${enable_warnings_as_errors+set}" = set; then :
51577   enableval=$enable_warnings_as_errors;
51578 fi
51579 
51580 
51581   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51582 $as_echo_n "checking if native warnings are errors... " >&6; }
51583   if test "x$enable_warnings_as_errors" = "xyes"; then
51584     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51585 $as_echo "yes (explicitely set)" >&6; }
51586     WARNINGS_AS_ERRORS=true
51587   elif test "x$enable_warnings_as_errors" = "xno"; then
51588     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51589 $as_echo "no" >&6; }
51590     WARNINGS_AS_ERRORS=false
51591   elif test "x$enable_warnings_as_errors" = "x"; then
51592     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51593 $as_echo "yes (default)" >&6; }
51594     WARNINGS_AS_ERRORS=true
51595   else
51596     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51597   fi
51598 
51599   if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51600     # Set legacy hotspot variable
51601     HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51602   else
51603     HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51604   fi
51605 
51606 
51607 
51608 
51609   case "${TOOLCHAIN_TYPE}" in
51610     microsoft)
51611       DISABLE_WARNING_PREFIX="-wd"
51612       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51613       ;;
51614     solstudio)
51615       DISABLE_WARNING_PREFIX="-erroff="
51616       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51617       ;;
51618     gcc)
51619       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51620 
51621 
51622 
51623 
51624 
51625 
51626 
51627 
51628 
51629 
51630 
51631 
51632 
51633 
51634 
51635 
51636 
51637 
51638 
51639 
51640 
51641 
51642 
51643 
51644 
51645 
51646 
51647 
51648 
51649 
51650 
51651 
51652 
51653 
51654 
51655 
51656 
51657 
51658 
51659 
51660 
51661 
51662 
51663 
51664 
51665 
51666 
51667     # Execute function body
51668 
51669 
51670 
51671 
51672 
51673 
51674 
51675 
51676 
51677 
51678 
51679 
51680 
51681 
51682 
51683 
51684 
51685 
51686 
51687 
51688 
51689 
51690 
51691 
51692 
51693 
51694 
51695 
51696 
51697 
51698 
51699 
51700 
51701 
51702 
51703 
51704 
51705 
51706 
51707 
51708 
51709 
51710 
51711 
51712 
51713 
51714 
51715 
51716     # Execute function body
51717 
51718   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51719 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51720   supports=yes
51721 
51722   saved_cflags="$CFLAGS"
51723   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
51724   ac_ext=c
51725 ac_cpp='$CPP $CPPFLAGS'
51726 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51727 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51728 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51729 
51730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51731 /* end confdefs.h.  */
51732 int i;
51733 _ACEOF
51734 if ac_fn_c_try_compile "$LINENO"; then :
51735 
51736 else
51737   supports=no
51738 fi
51739 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51740   ac_ext=cpp
51741 ac_cpp='$CXXCPP $CPPFLAGS'
51742 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51743 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51744 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51745 
51746   CFLAGS="$saved_cflags"
51747 
51748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51749 $as_echo "$supports" >&6; }
51750   if test "x$supports" = "xyes" ; then
51751     :
51752     C_COMP_SUPPORTS="yes"
51753   else
51754     :
51755     C_COMP_SUPPORTS="no"
51756   fi
51757 
51758 
51759 
51760 
51761 
51762 
51763 
51764 
51765 
51766 
51767 
51768 
51769 
51770 
51771 
51772 
51773 
51774 
51775 
51776 
51777 
51778 
51779 
51780 
51781 
51782 
51783 
51784 
51785 
51786 
51787 
51788 
51789 
51790 
51791 
51792 
51793 
51794 
51795 
51796 
51797 
51798 
51799 
51800 
51801 
51802 
51803 
51804 
51805 
51806 
51807 
51808 
51809 
51810 
51811 
51812 
51813 
51814 
51815 
51816     # Execute function body
51817 
51818   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51819 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51820   supports=yes
51821 
51822   saved_cxxflags="$CXXFLAGS"
51823   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
51824   ac_ext=cpp
51825 ac_cpp='$CXXCPP $CPPFLAGS'
51826 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51827 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51828 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51829 
51830   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51831 /* end confdefs.h.  */
51832 int i;
51833 _ACEOF
51834 if ac_fn_cxx_try_compile "$LINENO"; then :
51835 
51836 else
51837   supports=no
51838 fi
51839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51840   ac_ext=cpp
51841 ac_cpp='$CXXCPP $CPPFLAGS'
51842 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51843 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51844 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51845 
51846   CXXFLAGS="$saved_cxxflags"
51847 
51848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51849 $as_echo "$supports" >&6; }
51850   if test "x$supports" = "xyes" ; then
51851     :
51852     CXX_COMP_SUPPORTS="yes"
51853   else
51854     :
51855     CXX_COMP_SUPPORTS="no"
51856   fi
51857 
51858 
51859 
51860 
51861 
51862 
51863 
51864 
51865 
51866 
51867 
51868 
51869 
51870   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51871 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51872   supports=no
51873   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51874 
51875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51876 $as_echo "$supports" >&6; }
51877   if test "x$supports" = "xyes" ; then
51878     :
51879     GCC_CAN_DISABLE_WARNINGS=true
51880   else
51881     :
51882     GCC_CAN_DISABLE_WARNINGS=false
51883 
51884   fi
51885 
51886 
51887 
51888 
51889 
51890 
51891       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
51892         DISABLE_WARNING_PREFIX="-Wno-"
51893       else
51894         DISABLE_WARNING_PREFIX=
51895       fi
51896       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
51897       # Repeate the check for the BUILD_CC
51898       CC_OLD="$CC"
51899       CC="$BUILD_CC"
51900 
51901 
51902 
51903 
51904 
51905 
51906 
51907 
51908 
51909 
51910 
51911 
51912 
51913 
51914 
51915 
51916 
51917 
51918 
51919 
51920 
51921 
51922 
51923 
51924 
51925 
51926 
51927 
51928 
51929 
51930 
51931 
51932 
51933 
51934 
51935 
51936 
51937 
51938 
51939 
51940 
51941 
51942 
51943 
51944 
51945 
51946 
51947     # Execute function body
51948 
51949 
51950 
51951 
51952 
51953 
51954 
51955 
51956 
51957 
51958 
51959 
51960 
51961 
51962 
51963 
51964 
51965 
51966 
51967 
51968 
51969 
51970 
51971 
51972 
51973 
51974 
51975 
51976 
51977 
51978 
51979 
51980 
51981 
51982 
51983 
51984 
51985 
51986 
51987 
51988 
51989 
51990 
51991 
51992 
51993 
51994 
51995 
51996     # Execute function body
51997 
51998   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51999 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52000   supports=yes
52001 
52002   saved_cflags="$CFLAGS"
52003   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52004   ac_ext=c
52005 ac_cpp='$CPP $CPPFLAGS'
52006 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52007 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52008 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52009 
52010   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52011 /* end confdefs.h.  */
52012 int i;
52013 _ACEOF
52014 if ac_fn_c_try_compile "$LINENO"; then :
52015 
52016 else
52017   supports=no
52018 fi
52019 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52020   ac_ext=cpp
52021 ac_cpp='$CXXCPP $CPPFLAGS'
52022 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52023 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52024 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52025 
52026   CFLAGS="$saved_cflags"
52027 
52028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52029 $as_echo "$supports" >&6; }
52030   if test "x$supports" = "xyes" ; then
52031     :
52032     C_COMP_SUPPORTS="yes"
52033   else
52034     :
52035     C_COMP_SUPPORTS="no"
52036   fi
52037 
52038 
52039 
52040 
52041 
52042 
52043 
52044 
52045 
52046 
52047 
52048 
52049 
52050 
52051 
52052 
52053 
52054 
52055 
52056 
52057 
52058 
52059 
52060 
52061 
52062 
52063 
52064 
52065 
52066 
52067 
52068 
52069 
52070 
52071 
52072 
52073 
52074 
52075 
52076 
52077 
52078 
52079 
52080 
52081 
52082 
52083 
52084 
52085 
52086 
52087 
52088 
52089 
52090 
52091 
52092 
52093 
52094 
52095 
52096     # Execute function body
52097 
52098   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52099 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52100   supports=yes
52101 
52102   saved_cxxflags="$CXXFLAGS"
52103   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52104   ac_ext=cpp
52105 ac_cpp='$CXXCPP $CPPFLAGS'
52106 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52107 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52108 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52109 
52110   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52111 /* end confdefs.h.  */
52112 int i;
52113 _ACEOF
52114 if ac_fn_cxx_try_compile "$LINENO"; then :
52115 
52116 else
52117   supports=no
52118 fi
52119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52120   ac_ext=cpp
52121 ac_cpp='$CXXCPP $CPPFLAGS'
52122 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52123 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52124 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52125 
52126   CXXFLAGS="$saved_cxxflags"
52127 
52128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52129 $as_echo "$supports" >&6; }
52130   if test "x$supports" = "xyes" ; then
52131     :
52132     CXX_COMP_SUPPORTS="yes"
52133   else
52134     :
52135     CXX_COMP_SUPPORTS="no"
52136   fi
52137 
52138 
52139 
52140 
52141 
52142 
52143 
52144 
52145 
52146 
52147 
52148 
52149 
52150   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52151 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52152   supports=no
52153   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52154 
52155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52156 $as_echo "$supports" >&6; }
52157   if test "x$supports" = "xyes" ; then
52158     :
52159     BUILD_CC_CAN_DISABLE_WARNINGS=true
52160   else
52161     :
52162     BUILD_CC_CAN_DISABLE_WARNINGS=false
52163 
52164   fi
52165 
52166 
52167 
52168 
52169 
52170 
52171       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52172         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52173       else
52174         BUILD_CC_DISABLE_WARNING_PREFIX=
52175       fi
52176       CC="$CC_OLD"
52177       ;;
52178     clang)
52179       DISABLE_WARNING_PREFIX="-Wno-"
52180       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52181       ;;
52182     xlc)
52183       DISABLE_WARNING_PREFIX="-qsuppress="
52184       CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52185       ;;
52186   esac
52187 
52188 
52189 
52190 
52191 
52192 # Setup debug symbols (need objcopy from the toolchain for that)
52193 
52194   #
52195   # NATIVE_DEBUG_SYMBOLS
52196   # This must be done after the toolchain is setup, since we're looking at objcopy.
52197   #
52198   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52199 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
52200 
52201 # Check whether --with-native-debug-symbols was given.
52202 if test "${with_native_debug_symbols+set}" = set; then :
52203   withval=$with_native_debug_symbols;
52204         if test "x$OPENJDK_TARGET_OS" = xaix; then
52205           if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52206             as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52207           fi
52208         fi
52209 
52210 else
52211 
52212         if test "x$OPENJDK_TARGET_OS" = xaix; then
52213           # AIX doesn't support 'zipped' so use 'internal' as default
52214           with_native_debug_symbols="internal"
52215         else
52216           if test "x$STATIC_BUILD" = xtrue; then
52217             with_native_debug_symbols="none"
52218           else
52219             with_native_debug_symbols="zipped"
52220           fi
52221         fi
52222 
52223 fi
52224 
52225   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52227 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52228 
52229   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52230 
52231     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52232       if test "x$OBJCOPY" = x; then
52233         # enabling of enable-debug-symbols and can't find objcopy
52234         # this is an error
52235         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52236       fi
52237     fi
52238 
52239     COMPILE_WITH_DEBUG_SYMBOLS=true
52240     COPY_DEBUG_SYMBOLS=true
52241     ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52242 
52243     # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52244     DEBUG_BINARIES=false
52245     STRIP_POLICY=min_strip
52246 
52247   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52248     COMPILE_WITH_DEBUG_SYMBOLS=false
52249     COPY_DEBUG_SYMBOLS=false
52250     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52251 
52252     DEBUG_BINARIES=false
52253     STRIP_POLICY=no_strip
52254   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52255     COMPILE_WITH_DEBUG_SYMBOLS=true
52256     COPY_DEBUG_SYMBOLS=false
52257     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52258 
52259     # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52260     DEBUG_BINARIES=true
52261     STRIP_POLICY=no_strip
52262     STRIP=""
52263 
52264   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52265 
52266     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52267       if test "x$OBJCOPY" = x; then
52268         # enabling of enable-debug-symbols and can't find objcopy
52269         # this is an error
52270         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52271       fi
52272     fi
52273 
52274     COMPILE_WITH_DEBUG_SYMBOLS=true
52275     COPY_DEBUG_SYMBOLS=true
52276     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52277 
52278     # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52279     DEBUG_BINARIES=false
52280     STRIP_POLICY=min_strip
52281   else
52282     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52283   fi
52284 
52285   # --enable-debug-symbols is deprecated.
52286   # Please use --with-native-debug-symbols=[internal,external,zipped] .
52287 
52288   # Check whether --enable-debug-symbols was given.
52289 if test "${enable_debug_symbols+set}" = set; then :
52290   enableval=$enable_debug_symbols;
52291 fi
52292 
52293   if test "x$enable_debug_symbols" != x; then
52294     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52295 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52296 
52297     if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52298       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52299 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52300     fi
52301 
52302   fi
52303 
52304 
52305   # --enable-zip-debug-info is deprecated.
52306   # Please use --with-native-debug-symbols=zipped .
52307 
52308   # Check whether --enable-zip-debug-info was given.
52309 if test "${enable_zip_debug_info+set}" = set; then :
52310   enableval=$enable_zip_debug_info;
52311 fi
52312 
52313   if test "x$enable_zip_debug_info" != x; then
52314     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52315 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52316 
52317     if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52318       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52319 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52320     fi
52321 
52322   fi
52323 
52324 
52325 
52326 
52327 
52328 
52329   # Legacy values
52330 
52331 
52332 
52333 
52334   # Check whether --enable-native-coverage was given.
52335 if test "${enable_native_coverage+set}" = set; then :
52336   enableval=$enable_native_coverage;
52337 fi
52338 
52339   GCOV_ENABLED="false"
52340   if test "x$enable_native_coverage" = "xyes"; then
52341     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52342       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52343 $as_echo_n "checking if native coverage is enabled... " >&6; }
52344       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52345 $as_echo "yes" >&6; }
52346       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52347       GCOV_LDFLAGS="-fprofile-arcs"
52348       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52349       LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52350       LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52351       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52352       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52353       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52354       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52355       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52356       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52357       GCOV_ENABLED="true"
52358     else
52359       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52360     fi
52361   elif test "x$enable_native_coverage" = "xno"; then
52362     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52363 $as_echo_n "checking if native coverage is enabled... " >&6; }
52364     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52365 $as_echo "no" >&6; }
52366   elif test "x$enable_native_coverage" != "x"; then
52367     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52368   fi
52369 
52370 
52371 
52372 
52373 # Need toolchain to setup dtrace
52374 
52375   # Test for dtrace dependencies
52376   # Check whether --enable-dtrace was given.
52377 if test "${enable_dtrace+set}" = set; then :
52378   enableval=$enable_dtrace;
52379 fi
52380 
52381 
52382   DTRACE_DEP_MISSING=false
52383 
52384   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52385 $as_echo_n "checking for dtrace tool... " >&6; }
52386   if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52387     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52388 $as_echo "$DTRACE" >&6; }
52389   else
52390     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52391 $as_echo "not found, cannot build dtrace" >&6; }
52392     DTRACE_DEP_MISSING=true
52393   fi
52394 
52395   for ac_header in sys/sdt.h
52396 do :
52397   ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52398 if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52399   cat >>confdefs.h <<_ACEOF
52400 #define HAVE_SYS_SDT_H 1
52401 _ACEOF
52402  DTRACE_HEADERS_OK=yes
52403 else
52404   DTRACE_HEADERS_OK=no
52405 fi
52406 
52407 done
52408 
52409   if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52410     DTRACE_DEP_MISSING=true
52411   fi
52412 
52413   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52414 $as_echo_n "checking if dtrace should be built... " >&6; }
52415   if test "x$enable_dtrace" = "xyes"; then
52416     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52417       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52418 $as_echo "no, missing dependencies" >&6; }
52419 
52420   # Print a helpful message on how to acquire the necessary build dependency.
52421   # dtrace is the help tag: freetype, cups, alsa etc
52422   MISSING_DEPENDENCY=dtrace
52423 
52424   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52425     cygwin_help $MISSING_DEPENDENCY
52426   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52427     msys_help $MISSING_DEPENDENCY
52428   else
52429     PKGHANDLER_COMMAND=
52430 
52431     case $PKGHANDLER in
52432       apt-get)
52433         apt_help     $MISSING_DEPENDENCY ;;
52434       yum)
52435         yum_help     $MISSING_DEPENDENCY ;;
52436       port)
52437         port_help    $MISSING_DEPENDENCY ;;
52438       pkgutil)
52439         pkgutil_help $MISSING_DEPENDENCY ;;
52440       pkgadd)
52441         pkgadd_help  $MISSING_DEPENDENCY ;;
52442     esac
52443 
52444     if test "x$PKGHANDLER_COMMAND" != x; then
52445       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52446     fi
52447   fi
52448 
52449       as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52450     else
52451       INCLUDE_DTRACE=true
52452       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52453 $as_echo "yes, forced" >&6; }
52454     fi
52455   elif test "x$enable_dtrace" = "xno"; then
52456     INCLUDE_DTRACE=false
52457     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52458 $as_echo "no, forced" >&6; }
52459   elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52460     if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then
52461       INCLUDE_DTRACE=false
52462       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, non-open linux build" >&5
52463 $as_echo "no, non-open linux build" >&6; }
52464     elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52465       INCLUDE_DTRACE=false
52466       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52467 $as_echo "no, missing dependencies" >&6; }
52468     else
52469       INCLUDE_DTRACE=true
52470       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52471 $as_echo "yes, dependencies present" >&6; }
52472     fi
52473   else
52474     as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52475   fi
52476 
52477 
52478 
52479   # The user can in some cases supply additional jvm features. For the custom
52480   # variant, this defines the entire variant.
52481 
52482 # Check whether --with-jvm-features was given.
52483 if test "${with_jvm_features+set}" = set; then :
52484   withval=$with_jvm_features;
52485 fi
52486 
52487   if test "x$with_jvm_features" != x; then
52488     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52489 $as_echo_n "checking additional JVM features... " >&6; }
52490     JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52491     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52492 $as_echo "$JVM_FEATURES" >&6; }
52493   fi
52494 
52495   # Verify that dependencies are met for explicitly set features.
52496   if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52497     as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52498   fi
52499 
52500   if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52501     as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52502   fi
52503 
52504   if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && !   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ; then
52505     as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2'" "$LINENO" 5
52506   fi
52507 
52508   if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52509     as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52510   fi
52511 
52512   if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52513     as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52514   fi
52515 
52516   # Turn on additional features based on other parts of configure
52517   if test "x$INCLUDE_DTRACE" = "xtrue"; then
52518     JVM_FEATURES="$JVM_FEATURES dtrace"
52519   else
52520     if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52521       as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52522     fi
52523   fi
52524 
52525   if test "x$STATIC_BUILD" = "xtrue"; then
52526     JVM_FEATURES="$JVM_FEATURES static-build"
52527   else
52528     if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52529       as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52530     fi
52531   fi
52532 
52533   if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52534     if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52535       as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52536     fi
52537   fi
52538 
52539   if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52540     if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52541       as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52542     fi
52543   fi
52544 
52545   # Only enable jvmci on x86_64, sparcv9 and aarch64, and only on server.
52546   if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52547       test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52548       test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52549     JVM_FEATURES_jvmci="jvmci"
52550   else
52551     JVM_FEATURES_jvmci=""
52552   fi
52553 
52554   # All variants but minimal (and custom) get these features
52555   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52556 
52557   # Enable features depending on variant.
52558   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52559   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
52560   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52561   JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52562   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52563   JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52564   JVM_FEATURES_custom="$JVM_FEATURES"
52565 
52566 
52567 
52568 
52569 
52570 
52571 
52572 
52573 
52574   # Used for verification of Makefiles by check-jvm-feature
52575 
52576 
52577   # We don't support --with-jvm-interpreter anymore, use zero instead.
52578 
52579 
52580 # Check whether --with-jvm-interpreter was given.
52581 if test "${with_jvm_interpreter+set}" = set; then :
52582   withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52583 $as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52584 fi
52585 
52586 
52587 
52588 
52589 ###############################################################################
52590 #
52591 # Check dependencies for external and internal libraries.
52592 #
52593 ###############################################################################
52594 
52595 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52596 
52597   # When using cygwin or msys, we need a wrapper binary that renames
52598   # /cygdrive/c/ arguments into c:/ arguments and peeks into
52599   # @files and rewrites these too! This wrapper binary is
52600   # called fixpath.
52601   FIXPATH=
52602   if test "x$OPENJDK_BUILD_OS" = xwindows; then
52603     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52604 $as_echo_n "checking if fixpath can be created... " >&6; }
52605     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52606     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52607     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52608     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52609       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52610       FIXPATH="$FIXPATH_BIN -c"
52611     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52612       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52613       # @ was chosen as separator to minimize risk of other tools messing around with it
52614       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52615           | tr ' ' '\n' | grep '^/./' | sort | uniq`
52616       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52617       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52618     fi
52619     FIXPATH_SRC_W="$FIXPATH_SRC"
52620     FIXPATH_BIN_W="$FIXPATH_BIN"
52621 
52622   unix_path="$FIXPATH_SRC_W"
52623   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52624     windows_path=`$CYGPATH -m "$unix_path"`
52625     FIXPATH_SRC_W="$windows_path"
52626   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52627     windows_path=`cmd //c echo $unix_path`
52628     FIXPATH_SRC_W="$windows_path"
52629   fi
52630 
52631 
52632   unix_path="$FIXPATH_BIN_W"
52633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52634     windows_path=`$CYGPATH -m "$unix_path"`
52635     FIXPATH_BIN_W="$windows_path"
52636   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52637     windows_path=`cmd //c echo $unix_path`
52638     FIXPATH_BIN_W="$windows_path"
52639   fi
52640 
52641     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52642     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52643     cd $FIXPATH_DIR
52644     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52645     cd $CURDIR
52646 
52647     if test ! -x $FIXPATH_BIN; then
52648       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52649 $as_echo "no" >&6; }
52650       cat $FIXPATH_DIR/fixpath1.log
52651       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52652     fi
52653     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52654 $as_echo "yes" >&6; }
52655     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52656 $as_echo_n "checking if fixpath.exe works... " >&6; }
52657     cd $FIXPATH_DIR
52658     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52659         > $FIXPATH_DIR/fixpath2.log 2>&1
52660     cd $CURDIR
52661     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52662       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52663 $as_echo "no" >&6; }
52664       cat $FIXPATH_DIR/fixpath2.log
52665       as_fn_error $? "fixpath did not work!" "$LINENO" 5
52666     fi
52667     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52668 $as_echo "yes" >&6; }
52669 
52670     FIXPATH_DETACH_FLAG="--detach"
52671   fi
52672 
52673 
52674 
52675 
52676 
52677 
52678   # Check if X11 is needed
52679   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
52680     # No X11 support on windows or macosx
52681     NEEDS_LIB_X11=false
52682   else
52683     if test "x$SUPPORT_HEADFUL" = xno; then
52684       # No X11 support if building headless-only
52685       NEEDS_LIB_X11=false
52686     else
52687       # All other instances need X11
52688       NEEDS_LIB_X11=true
52689     fi
52690   fi
52691 
52692   # Check if cups is needed
52693   if test "x$OPENJDK_TARGET_OS" = xwindows; then
52694     # Windows have a separate print system
52695     NEEDS_LIB_CUPS=false
52696   else
52697     NEEDS_LIB_CUPS=true
52698   fi
52699 
52700   # Check if freetype is needed
52701   if test "x$OPENJDK" = "xtrue"; then
52702     NEEDS_LIB_FREETYPE=true
52703   else
52704     NEEDS_LIB_FREETYPE=false
52705   fi
52706 
52707   # Check if alsa is needed
52708   if test "x$OPENJDK_TARGET_OS" = xlinux; then
52709     NEEDS_LIB_ALSA=true
52710   else
52711     NEEDS_LIB_ALSA=false
52712   fi
52713 
52714   # Check if ffi is needed
52715   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52716     NEEDS_LIB_FFI=true
52717   else
52718     NEEDS_LIB_FFI=false
52719   fi
52720 
52721 
52722   # statically link libstdc++ before C++ ABI is stablized on Linux unless
52723   # dynamic build is configured on command line.
52724 
52725 # Check whether --with-stdc++lib was given.
52726 if test "${with_stdc__lib+set}" = set; then :
52727   withval=$with_stdc__lib;
52728         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
52729                 && test "x$with_stdc__lib" != xdefault; then
52730           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
52731         fi
52732 
52733 else
52734   with_stdc__lib=default
52735 
52736 fi
52737 
52738 
52739   if test "x$OPENJDK_TARGET_OS" = xlinux; then
52740     # Test if -lstdc++ works.
52741     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
52742 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
52743     ac_ext=cpp
52744 ac_cpp='$CXXCPP $CPPFLAGS'
52745 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52746 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52747 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52748 
52749     OLD_CXXFLAGS="$CXXFLAGS"
52750     CXXFLAGS="$CXXFLAGS -lstdc++"
52751     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52752 /* end confdefs.h.  */
52753 
52754 int
52755 main ()
52756 {
52757 return 0;
52758   ;
52759   return 0;
52760 }
52761 _ACEOF
52762 if ac_fn_cxx_try_link "$LINENO"; then :
52763   has_dynamic_libstdcxx=yes
52764 else
52765   has_dynamic_libstdcxx=no
52766 fi
52767 rm -f core conftest.err conftest.$ac_objext \
52768     conftest$ac_exeext conftest.$ac_ext
52769     CXXFLAGS="$OLD_CXXFLAGS"
52770     ac_ext=cpp
52771 ac_cpp='$CXXCPP $CPPFLAGS'
52772 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52773 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52774 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52775 
52776     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
52777 $as_echo "$has_dynamic_libstdcxx" >&6; }
52778 
52779     # Test if stdc++ can be linked statically.
52780     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
52781 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
52782     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
52783     ac_ext=cpp
52784 ac_cpp='$CXXCPP $CPPFLAGS'
52785 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52786 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52787 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52788 
52789     OLD_LIBS="$LIBS"
52790     OLD_CXX="$CXX"
52791     LIBS="$STATIC_STDCXX_FLAGS"
52792     CXX="$CC"
52793     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52794 /* end confdefs.h.  */
52795 
52796 int
52797 main ()
52798 {
52799 return 0;
52800   ;
52801   return 0;
52802 }
52803 _ACEOF
52804 if ac_fn_cxx_try_link "$LINENO"; then :
52805   has_static_libstdcxx=yes
52806 else
52807   has_static_libstdcxx=no
52808 fi
52809 rm -f core conftest.err conftest.$ac_objext \
52810     conftest$ac_exeext conftest.$ac_ext
52811     LIBS="$OLD_LIBS"
52812     CXX="$OLD_CXX"
52813     ac_ext=cpp
52814 ac_cpp='$CXXCPP $CPPFLAGS'
52815 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52816 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52817 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52818 
52819     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
52820 $as_echo "$has_static_libstdcxx" >&6; }
52821 
52822     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
52823       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
52824     fi
52825 
52826     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
52827       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
52828     fi
52829 
52830     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
52831       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
52832     fi
52833 
52834     # If dynamic was requested, it's available since it would fail above otherwise.
52835     # If dynamic wasn't requested, go with static unless it isn't available.
52836     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
52837 $as_echo_n "checking how to link with libstdc++... " >&6; }
52838     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52839       LIBCXX="$LIBCXX -lstdc++"
52840       # To help comparisons with old build, put stdc++ first in JVM_LIBS
52841       JVM_LIBS="-lstdc++ $JVM_LIBS"
52842       # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52843       # just use the same setting as for the TARGET toolchain.
52844       OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
52845       LDCXX="$CXX"
52846       STATIC_CXX_SETTING="STATIC_CXX=false"
52847       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
52848 $as_echo "dynamic" >&6; }
52849     else
52850       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
52851       JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
52852       # To help comparisons with old build, put stdc++ first in JVM_LIBS
52853       JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
52854       # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52855       # just use the same setting as for the TARGET toolchain.
52856       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
52857       OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
52858       LDCXX="$CC"
52859       STATIC_CXX_SETTING="STATIC_CXX=true"
52860       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
52861 $as_echo "static" >&6; }
52862     fi
52863   fi
52864 
52865 
52866   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
52867   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
52868     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
52869   fi
52870 
52871   # TODO better (platform agnostic) test
52872   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
52873     LIBCXX="-lstdc++"
52874   fi
52875 
52876 
52877   # Setup Windows runtime dlls
52878   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52879 
52880 
52881 # Check whether --with-msvcr-dll was given.
52882 if test "${with_msvcr_dll+set}" = set; then :
52883   withval=$with_msvcr_dll;
52884 fi
52885 
52886 
52887   if test "x$with_msvcr_dll" != x; then
52888     # If given explicitely by user, do not probe. If not present, fail directly.
52889 
52890   DLL_NAME="$MSVCR_NAME"
52891   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
52892   METHOD="--with-msvcr-dll"
52893   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52894     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52895 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52896 
52897     # Need to check if the found msvcr is correct architecture
52898     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52899 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52900     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52901     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52902       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52903       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52904       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52905         CORRECT_MSVCR_ARCH="PE32 executable"
52906       else
52907         CORRECT_MSVCR_ARCH="PE32+ executable"
52908       fi
52909     else
52910       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52911         CORRECT_MSVCR_ARCH=386
52912       else
52913         CORRECT_MSVCR_ARCH=x86-64
52914       fi
52915     fi
52916     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52917       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52918 $as_echo "ok" >&6; }
52919       MSVC_DLL="$POSSIBLE_MSVC_DLL"
52920 
52921   # Only process if variable expands to non-empty
52922 
52923   if test "x$MSVC_DLL" != x; then
52924     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52925 
52926   # Input might be given as Windows format, start by converting to
52927   # unix format.
52928   path="$MSVC_DLL"
52929   new_path=`$CYGPATH -u "$path"`
52930 
52931   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52932   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52933   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52934   # "foo.exe" is OK but "foo" is an error.
52935   #
52936   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52937   # It is also a way to make sure we got the proper file name for the real test later on.
52938   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52939   if test "x$test_shortpath" = x; then
52940     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52941 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52942     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52943   fi
52944 
52945   # Call helper function which possibly converts this using DOS-style short mode.
52946   # If so, the updated path is stored in $new_path.
52947 
52948   input_path="$new_path"
52949   # Check if we need to convert this using DOS-style short mode. If the path
52950   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52951   # take no chances and rewrite it.
52952   # Note: m4 eats our [], so we need to use [ and ] instead.
52953   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52954   if test "x$has_forbidden_chars" != x; then
52955     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52956     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52957     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52958     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52959       # Going to short mode and back again did indeed matter. Since short mode is
52960       # case insensitive, let's make it lowercase to improve readability.
52961       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52962       # Now convert it back to Unix-style (cygpath)
52963       input_path=`$CYGPATH -u "$shortmode_path"`
52964       new_path="$input_path"
52965     fi
52966   fi
52967 
52968   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52969   if test "x$test_cygdrive_prefix" = x; then
52970     # As a simple fix, exclude /usr/bin since it's not a real path.
52971     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52972       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52973       # a path prefixed by /cygdrive for fixpath to work.
52974       new_path="$CYGWIN_ROOT_PATH$input_path"
52975     fi
52976   fi
52977 
52978 
52979   if test "x$path" != "x$new_path"; then
52980     MSVC_DLL="$new_path"
52981     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52982 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52983   fi
52984 
52985     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52986 
52987   path="$MSVC_DLL"
52988   has_colon=`$ECHO $path | $GREP ^.:`
52989   new_path="$path"
52990   if test "x$has_colon" = x; then
52991     # Not in mixed or Windows style, start by that.
52992     new_path=`cmd //c echo $path`
52993   fi
52994 
52995 
52996   input_path="$new_path"
52997   # Check if we need to convert this using DOS-style short mode. If the path
52998   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52999   # take no chances and rewrite it.
53000   # Note: m4 eats our [], so we need to use [ and ] instead.
53001   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53002   if test "x$has_forbidden_chars" != x; then
53003     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53004     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53005   fi
53006 
53007 
53008   windows_path="$new_path"
53009   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53010     unix_path=`$CYGPATH -u "$windows_path"`
53011     new_path="$unix_path"
53012   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53013     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53014     new_path="$unix_path"
53015   fi
53016 
53017   if test "x$path" != "x$new_path"; then
53018     MSVC_DLL="$new_path"
53019     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53020 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53021   fi
53022 
53023   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53024   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53025 
53026     else
53027       # We're on a unix platform. Hooray! :)
53028       path="$MSVC_DLL"
53029       has_space=`$ECHO "$path" | $GREP " "`
53030       if test "x$has_space" != x; then
53031         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53032 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53033         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53034       fi
53035 
53036       # Use eval to expand a potential ~
53037       eval path="$path"
53038       if test ! -f "$path" && test ! -d "$path"; then
53039         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53040       fi
53041 
53042       if test -d "$path"; then
53043         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53044       else
53045         dir="`$DIRNAME "$path"`"
53046         base="`$BASENAME "$path"`"
53047         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53048       fi
53049     fi
53050   fi
53051 
53052       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53053 $as_echo_n "checking for $DLL_NAME... " >&6; }
53054       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53055 $as_echo "$MSVC_DLL" >&6; }
53056     else
53057       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53058 $as_echo "incorrect, ignoring" >&6; }
53059       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53060 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53061     fi
53062   fi
53063 
53064     if test "x$MSVC_DLL" = x; then
53065       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53066     fi
53067     MSVCR_DLL="$MSVC_DLL"
53068   elif test "x$DEVKIT_MSVCR_DLL" != x; then
53069 
53070   DLL_NAME="$MSVCR_NAME"
53071   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53072   METHOD="devkit"
53073   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53074     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53075 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53076 
53077     # Need to check if the found msvcr is correct architecture
53078     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53079 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53080     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53081     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53082       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53083       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53084       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53085         CORRECT_MSVCR_ARCH="PE32 executable"
53086       else
53087         CORRECT_MSVCR_ARCH="PE32+ executable"
53088       fi
53089     else
53090       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53091         CORRECT_MSVCR_ARCH=386
53092       else
53093         CORRECT_MSVCR_ARCH=x86-64
53094       fi
53095     fi
53096     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53097       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53098 $as_echo "ok" >&6; }
53099       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53100 
53101   # Only process if variable expands to non-empty
53102 
53103   if test "x$MSVC_DLL" != x; then
53104     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53105 
53106   # Input might be given as Windows format, start by converting to
53107   # unix format.
53108   path="$MSVC_DLL"
53109   new_path=`$CYGPATH -u "$path"`
53110 
53111   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53112   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53113   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53114   # "foo.exe" is OK but "foo" is an error.
53115   #
53116   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53117   # It is also a way to make sure we got the proper file name for the real test later on.
53118   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53119   if test "x$test_shortpath" = x; then
53120     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53121 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53122     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53123   fi
53124 
53125   # Call helper function which possibly converts this using DOS-style short mode.
53126   # If so, the updated path is stored in $new_path.
53127 
53128   input_path="$new_path"
53129   # Check if we need to convert this using DOS-style short mode. If the path
53130   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53131   # take no chances and rewrite it.
53132   # Note: m4 eats our [], so we need to use [ and ] instead.
53133   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53134   if test "x$has_forbidden_chars" != x; then
53135     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53136     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53137     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53138     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53139       # Going to short mode and back again did indeed matter. Since short mode is
53140       # case insensitive, let's make it lowercase to improve readability.
53141       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53142       # Now convert it back to Unix-style (cygpath)
53143       input_path=`$CYGPATH -u "$shortmode_path"`
53144       new_path="$input_path"
53145     fi
53146   fi
53147 
53148   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53149   if test "x$test_cygdrive_prefix" = x; then
53150     # As a simple fix, exclude /usr/bin since it's not a real path.
53151     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53152       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53153       # a path prefixed by /cygdrive for fixpath to work.
53154       new_path="$CYGWIN_ROOT_PATH$input_path"
53155     fi
53156   fi
53157 
53158 
53159   if test "x$path" != "x$new_path"; then
53160     MSVC_DLL="$new_path"
53161     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53162 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53163   fi
53164 
53165     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53166 
53167   path="$MSVC_DLL"
53168   has_colon=`$ECHO $path | $GREP ^.:`
53169   new_path="$path"
53170   if test "x$has_colon" = x; then
53171     # Not in mixed or Windows style, start by that.
53172     new_path=`cmd //c echo $path`
53173   fi
53174 
53175 
53176   input_path="$new_path"
53177   # Check if we need to convert this using DOS-style short mode. If the path
53178   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53179   # take no chances and rewrite it.
53180   # Note: m4 eats our [], so we need to use [ and ] instead.
53181   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53182   if test "x$has_forbidden_chars" != x; then
53183     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53184     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53185   fi
53186 
53187 
53188   windows_path="$new_path"
53189   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53190     unix_path=`$CYGPATH -u "$windows_path"`
53191     new_path="$unix_path"
53192   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53193     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53194     new_path="$unix_path"
53195   fi
53196 
53197   if test "x$path" != "x$new_path"; then
53198     MSVC_DLL="$new_path"
53199     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53200 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53201   fi
53202 
53203   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53204   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53205 
53206     else
53207       # We're on a unix platform. Hooray! :)
53208       path="$MSVC_DLL"
53209       has_space=`$ECHO "$path" | $GREP " "`
53210       if test "x$has_space" != x; then
53211         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53212 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53213         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53214       fi
53215 
53216       # Use eval to expand a potential ~
53217       eval path="$path"
53218       if test ! -f "$path" && test ! -d "$path"; then
53219         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53220       fi
53221 
53222       if test -d "$path"; then
53223         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53224       else
53225         dir="`$DIRNAME "$path"`"
53226         base="`$BASENAME "$path"`"
53227         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53228       fi
53229     fi
53230   fi
53231 
53232       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53233 $as_echo_n "checking for $DLL_NAME... " >&6; }
53234       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53235 $as_echo "$MSVC_DLL" >&6; }
53236     else
53237       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53238 $as_echo "incorrect, ignoring" >&6; }
53239       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53240 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53241     fi
53242   fi
53243 
53244     if test "x$MSVC_DLL" = x; then
53245       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53246     fi
53247     MSVCR_DLL="$MSVC_DLL"
53248   else
53249 
53250   DLL_NAME="${MSVCR_NAME}"
53251   MSVC_DLL=
53252 
53253   if test "x$MSVC_DLL" = x; then
53254     # Probe: Using well-known location from Visual Studio 10.0
53255     if test "x$VCINSTALLDIR" != x; then
53256       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53257 
53258   windows_path="$CYGWIN_VC_INSTALL_DIR"
53259   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53260     unix_path=`$CYGPATH -u "$windows_path"`
53261     CYGWIN_VC_INSTALL_DIR="$unix_path"
53262   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53263     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53264     CYGWIN_VC_INSTALL_DIR="$unix_path"
53265   fi
53266 
53267       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53268         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53269       else
53270         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53271       fi
53272       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53273 
53274   DLL_NAME="$DLL_NAME"
53275   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53276   METHOD="well-known location in VCINSTALLDIR"
53277   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53278     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53279 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53280 
53281     # Need to check if the found msvcr is correct architecture
53282     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53283 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53284     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53285     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53286       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53287       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53288       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53289         CORRECT_MSVCR_ARCH="PE32 executable"
53290       else
53291         CORRECT_MSVCR_ARCH="PE32+ executable"
53292       fi
53293     else
53294       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53295         CORRECT_MSVCR_ARCH=386
53296       else
53297         CORRECT_MSVCR_ARCH=x86-64
53298       fi
53299     fi
53300     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53301       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53302 $as_echo "ok" >&6; }
53303       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53304 
53305   # Only process if variable expands to non-empty
53306 
53307   if test "x$MSVC_DLL" != x; then
53308     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53309 
53310   # Input might be given as Windows format, start by converting to
53311   # unix format.
53312   path="$MSVC_DLL"
53313   new_path=`$CYGPATH -u "$path"`
53314 
53315   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53316   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53317   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53318   # "foo.exe" is OK but "foo" is an error.
53319   #
53320   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53321   # It is also a way to make sure we got the proper file name for the real test later on.
53322   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53323   if test "x$test_shortpath" = x; then
53324     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53325 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53326     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53327   fi
53328 
53329   # Call helper function which possibly converts this using DOS-style short mode.
53330   # If so, the updated path is stored in $new_path.
53331 
53332   input_path="$new_path"
53333   # Check if we need to convert this using DOS-style short mode. If the path
53334   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53335   # take no chances and rewrite it.
53336   # Note: m4 eats our [], so we need to use [ and ] instead.
53337   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53338   if test "x$has_forbidden_chars" != x; then
53339     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53340     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53341     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53342     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53343       # Going to short mode and back again did indeed matter. Since short mode is
53344       # case insensitive, let's make it lowercase to improve readability.
53345       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53346       # Now convert it back to Unix-style (cygpath)
53347       input_path=`$CYGPATH -u "$shortmode_path"`
53348       new_path="$input_path"
53349     fi
53350   fi
53351 
53352   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53353   if test "x$test_cygdrive_prefix" = x; then
53354     # As a simple fix, exclude /usr/bin since it's not a real path.
53355     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53356       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53357       # a path prefixed by /cygdrive for fixpath to work.
53358       new_path="$CYGWIN_ROOT_PATH$input_path"
53359     fi
53360   fi
53361 
53362 
53363   if test "x$path" != "x$new_path"; then
53364     MSVC_DLL="$new_path"
53365     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53366 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53367   fi
53368 
53369     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53370 
53371   path="$MSVC_DLL"
53372   has_colon=`$ECHO $path | $GREP ^.:`
53373   new_path="$path"
53374   if test "x$has_colon" = x; then
53375     # Not in mixed or Windows style, start by that.
53376     new_path=`cmd //c echo $path`
53377   fi
53378 
53379 
53380   input_path="$new_path"
53381   # Check if we need to convert this using DOS-style short mode. If the path
53382   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53383   # take no chances and rewrite it.
53384   # Note: m4 eats our [], so we need to use [ and ] instead.
53385   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53386   if test "x$has_forbidden_chars" != x; then
53387     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53388     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53389   fi
53390 
53391 
53392   windows_path="$new_path"
53393   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53394     unix_path=`$CYGPATH -u "$windows_path"`
53395     new_path="$unix_path"
53396   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53397     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53398     new_path="$unix_path"
53399   fi
53400 
53401   if test "x$path" != "x$new_path"; then
53402     MSVC_DLL="$new_path"
53403     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53404 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53405   fi
53406 
53407   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53408   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53409 
53410     else
53411       # We're on a unix platform. Hooray! :)
53412       path="$MSVC_DLL"
53413       has_space=`$ECHO "$path" | $GREP " "`
53414       if test "x$has_space" != x; then
53415         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53416 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53417         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53418       fi
53419 
53420       # Use eval to expand a potential ~
53421       eval path="$path"
53422       if test ! -f "$path" && test ! -d "$path"; then
53423         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53424       fi
53425 
53426       if test -d "$path"; then
53427         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53428       else
53429         dir="`$DIRNAME "$path"`"
53430         base="`$BASENAME "$path"`"
53431         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53432       fi
53433     fi
53434   fi
53435 
53436       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53437 $as_echo_n "checking for $DLL_NAME... " >&6; }
53438       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53439 $as_echo "$MSVC_DLL" >&6; }
53440     else
53441       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53442 $as_echo "incorrect, ignoring" >&6; }
53443       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53444 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53445     fi
53446   fi
53447 
53448     fi
53449   fi
53450 
53451   if test "x$MSVC_DLL" = x; then
53452     # Probe: Check in the Boot JDK directory.
53453     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53454 
53455   DLL_NAME="$DLL_NAME"
53456   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53457   METHOD="well-known location in Boot JDK"
53458   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53459     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53460 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53461 
53462     # Need to check if the found msvcr is correct architecture
53463     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53464 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53465     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53466     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53467       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53468       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53469       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53470         CORRECT_MSVCR_ARCH="PE32 executable"
53471       else
53472         CORRECT_MSVCR_ARCH="PE32+ executable"
53473       fi
53474     else
53475       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53476         CORRECT_MSVCR_ARCH=386
53477       else
53478         CORRECT_MSVCR_ARCH=x86-64
53479       fi
53480     fi
53481     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53482       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53483 $as_echo "ok" >&6; }
53484       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53485 
53486   # Only process if variable expands to non-empty
53487 
53488   if test "x$MSVC_DLL" != x; then
53489     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53490 
53491   # Input might be given as Windows format, start by converting to
53492   # unix format.
53493   path="$MSVC_DLL"
53494   new_path=`$CYGPATH -u "$path"`
53495 
53496   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53497   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53498   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53499   # "foo.exe" is OK but "foo" is an error.
53500   #
53501   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53502   # It is also a way to make sure we got the proper file name for the real test later on.
53503   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53504   if test "x$test_shortpath" = x; then
53505     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53506 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53507     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53508   fi
53509 
53510   # Call helper function which possibly converts this using DOS-style short mode.
53511   # If so, the updated path is stored in $new_path.
53512 
53513   input_path="$new_path"
53514   # Check if we need to convert this using DOS-style short mode. If the path
53515   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53516   # take no chances and rewrite it.
53517   # Note: m4 eats our [], so we need to use [ and ] instead.
53518   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53519   if test "x$has_forbidden_chars" != x; then
53520     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53521     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53522     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53523     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53524       # Going to short mode and back again did indeed matter. Since short mode is
53525       # case insensitive, let's make it lowercase to improve readability.
53526       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53527       # Now convert it back to Unix-style (cygpath)
53528       input_path=`$CYGPATH -u "$shortmode_path"`
53529       new_path="$input_path"
53530     fi
53531   fi
53532 
53533   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53534   if test "x$test_cygdrive_prefix" = x; then
53535     # As a simple fix, exclude /usr/bin since it's not a real path.
53536     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53537       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53538       # a path prefixed by /cygdrive for fixpath to work.
53539       new_path="$CYGWIN_ROOT_PATH$input_path"
53540     fi
53541   fi
53542 
53543 
53544   if test "x$path" != "x$new_path"; then
53545     MSVC_DLL="$new_path"
53546     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53547 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53548   fi
53549 
53550     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53551 
53552   path="$MSVC_DLL"
53553   has_colon=`$ECHO $path | $GREP ^.:`
53554   new_path="$path"
53555   if test "x$has_colon" = x; then
53556     # Not in mixed or Windows style, start by that.
53557     new_path=`cmd //c echo $path`
53558   fi
53559 
53560 
53561   input_path="$new_path"
53562   # Check if we need to convert this using DOS-style short mode. If the path
53563   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53564   # take no chances and rewrite it.
53565   # Note: m4 eats our [], so we need to use [ and ] instead.
53566   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53567   if test "x$has_forbidden_chars" != x; then
53568     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53569     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53570   fi
53571 
53572 
53573   windows_path="$new_path"
53574   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53575     unix_path=`$CYGPATH -u "$windows_path"`
53576     new_path="$unix_path"
53577   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53578     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53579     new_path="$unix_path"
53580   fi
53581 
53582   if test "x$path" != "x$new_path"; then
53583     MSVC_DLL="$new_path"
53584     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53585 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53586   fi
53587 
53588   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53589   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53590 
53591     else
53592       # We're on a unix platform. Hooray! :)
53593       path="$MSVC_DLL"
53594       has_space=`$ECHO "$path" | $GREP " "`
53595       if test "x$has_space" != x; then
53596         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53597 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53598         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53599       fi
53600 
53601       # Use eval to expand a potential ~
53602       eval path="$path"
53603       if test ! -f "$path" && test ! -d "$path"; then
53604         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53605       fi
53606 
53607       if test -d "$path"; then
53608         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53609       else
53610         dir="`$DIRNAME "$path"`"
53611         base="`$BASENAME "$path"`"
53612         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53613       fi
53614     fi
53615   fi
53616 
53617       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53618 $as_echo_n "checking for $DLL_NAME... " >&6; }
53619       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53620 $as_echo "$MSVC_DLL" >&6; }
53621     else
53622       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53623 $as_echo "incorrect, ignoring" >&6; }
53624       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53625 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53626     fi
53627   fi
53628 
53629   fi
53630 
53631   if test "x$MSVC_DLL" = x; then
53632     # Probe: Look in the Windows system32 directory
53633     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53634 
53635   windows_path="$CYGWIN_SYSTEMROOT"
53636   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53637     unix_path=`$CYGPATH -u "$windows_path"`
53638     CYGWIN_SYSTEMROOT="$unix_path"
53639   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53640     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53641     CYGWIN_SYSTEMROOT="$unix_path"
53642   fi
53643 
53644     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53645 
53646   DLL_NAME="$DLL_NAME"
53647   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53648   METHOD="well-known location in SYSTEMROOT"
53649   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53650     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53651 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53652 
53653     # Need to check if the found msvcr is correct architecture
53654     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53655 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53656     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53657     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53658       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53659       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53660       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53661         CORRECT_MSVCR_ARCH="PE32 executable"
53662       else
53663         CORRECT_MSVCR_ARCH="PE32+ executable"
53664       fi
53665     else
53666       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53667         CORRECT_MSVCR_ARCH=386
53668       else
53669         CORRECT_MSVCR_ARCH=x86-64
53670       fi
53671     fi
53672     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53673       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53674 $as_echo "ok" >&6; }
53675       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53676 
53677   # Only process if variable expands to non-empty
53678 
53679   if test "x$MSVC_DLL" != x; then
53680     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53681 
53682   # Input might be given as Windows format, start by converting to
53683   # unix format.
53684   path="$MSVC_DLL"
53685   new_path=`$CYGPATH -u "$path"`
53686 
53687   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53688   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53689   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53690   # "foo.exe" is OK but "foo" is an error.
53691   #
53692   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53693   # It is also a way to make sure we got the proper file name for the real test later on.
53694   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53695   if test "x$test_shortpath" = x; then
53696     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53697 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53698     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53699   fi
53700 
53701   # Call helper function which possibly converts this using DOS-style short mode.
53702   # If so, the updated path is stored in $new_path.
53703 
53704   input_path="$new_path"
53705   # Check if we need to convert this using DOS-style short mode. If the path
53706   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53707   # take no chances and rewrite it.
53708   # Note: m4 eats our [], so we need to use [ and ] instead.
53709   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53710   if test "x$has_forbidden_chars" != x; then
53711     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53712     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53713     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53714     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53715       # Going to short mode and back again did indeed matter. Since short mode is
53716       # case insensitive, let's make it lowercase to improve readability.
53717       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53718       # Now convert it back to Unix-style (cygpath)
53719       input_path=`$CYGPATH -u "$shortmode_path"`
53720       new_path="$input_path"
53721     fi
53722   fi
53723 
53724   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53725   if test "x$test_cygdrive_prefix" = x; then
53726     # As a simple fix, exclude /usr/bin since it's not a real path.
53727     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53728       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53729       # a path prefixed by /cygdrive for fixpath to work.
53730       new_path="$CYGWIN_ROOT_PATH$input_path"
53731     fi
53732   fi
53733 
53734 
53735   if test "x$path" != "x$new_path"; then
53736     MSVC_DLL="$new_path"
53737     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53738 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53739   fi
53740 
53741     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53742 
53743   path="$MSVC_DLL"
53744   has_colon=`$ECHO $path | $GREP ^.:`
53745   new_path="$path"
53746   if test "x$has_colon" = x; then
53747     # Not in mixed or Windows style, start by that.
53748     new_path=`cmd //c echo $path`
53749   fi
53750 
53751 
53752   input_path="$new_path"
53753   # Check if we need to convert this using DOS-style short mode. If the path
53754   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53755   # take no chances and rewrite it.
53756   # Note: m4 eats our [], so we need to use [ and ] instead.
53757   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53758   if test "x$has_forbidden_chars" != x; then
53759     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53760     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53761   fi
53762 
53763 
53764   windows_path="$new_path"
53765   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53766     unix_path=`$CYGPATH -u "$windows_path"`
53767     new_path="$unix_path"
53768   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53769     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53770     new_path="$unix_path"
53771   fi
53772 
53773   if test "x$path" != "x$new_path"; then
53774     MSVC_DLL="$new_path"
53775     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53776 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53777   fi
53778 
53779   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53780   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53781 
53782     else
53783       # We're on a unix platform. Hooray! :)
53784       path="$MSVC_DLL"
53785       has_space=`$ECHO "$path" | $GREP " "`
53786       if test "x$has_space" != x; then
53787         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53788 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53789         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53790       fi
53791 
53792       # Use eval to expand a potential ~
53793       eval path="$path"
53794       if test ! -f "$path" && test ! -d "$path"; then
53795         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53796       fi
53797 
53798       if test -d "$path"; then
53799         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53800       else
53801         dir="`$DIRNAME "$path"`"
53802         base="`$BASENAME "$path"`"
53803         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53804       fi
53805     fi
53806   fi
53807 
53808       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53809 $as_echo_n "checking for $DLL_NAME... " >&6; }
53810       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53811 $as_echo "$MSVC_DLL" >&6; }
53812     else
53813       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53814 $as_echo "incorrect, ignoring" >&6; }
53815       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53816 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53817     fi
53818   fi
53819 
53820   fi
53821 
53822   if test "x$MSVC_DLL" = x; then
53823     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
53824     if test "x$VS100COMNTOOLS" != x; then
53825       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
53826 
53827   windows_path="$CYGWIN_VS_TOOLS_DIR"
53828   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53829     unix_path=`$CYGPATH -u "$windows_path"`
53830     CYGWIN_VS_TOOLS_DIR="$unix_path"
53831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53832     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53833     CYGWIN_VS_TOOLS_DIR="$unix_path"
53834   fi
53835 
53836       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53837         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53838             | $GREP -i /x64/ | $HEAD --lines 1`
53839       else
53840         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53841             | $GREP -i /x86/ | $HEAD --lines 1`
53842       fi
53843 
53844   DLL_NAME="$DLL_NAME"
53845   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53846   METHOD="search of VS100COMNTOOLS"
53847   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53848     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53849 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53850 
53851     # Need to check if the found msvcr is correct architecture
53852     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53853 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53854     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53855     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53856       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53857       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53858       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53859         CORRECT_MSVCR_ARCH="PE32 executable"
53860       else
53861         CORRECT_MSVCR_ARCH="PE32+ executable"
53862       fi
53863     else
53864       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53865         CORRECT_MSVCR_ARCH=386
53866       else
53867         CORRECT_MSVCR_ARCH=x86-64
53868       fi
53869     fi
53870     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53871       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53872 $as_echo "ok" >&6; }
53873       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53874 
53875   # Only process if variable expands to non-empty
53876 
53877   if test "x$MSVC_DLL" != x; then
53878     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53879 
53880   # Input might be given as Windows format, start by converting to
53881   # unix format.
53882   path="$MSVC_DLL"
53883   new_path=`$CYGPATH -u "$path"`
53884 
53885   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53886   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53887   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53888   # "foo.exe" is OK but "foo" is an error.
53889   #
53890   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53891   # It is also a way to make sure we got the proper file name for the real test later on.
53892   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53893   if test "x$test_shortpath" = x; then
53894     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53895 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53896     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53897   fi
53898 
53899   # Call helper function which possibly converts this using DOS-style short mode.
53900   # If so, the updated path is stored in $new_path.
53901 
53902   input_path="$new_path"
53903   # Check if we need to convert this using DOS-style short mode. If the path
53904   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53905   # take no chances and rewrite it.
53906   # Note: m4 eats our [], so we need to use [ and ] instead.
53907   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53908   if test "x$has_forbidden_chars" != x; then
53909     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53910     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53911     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53912     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53913       # Going to short mode and back again did indeed matter. Since short mode is
53914       # case insensitive, let's make it lowercase to improve readability.
53915       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53916       # Now convert it back to Unix-style (cygpath)
53917       input_path=`$CYGPATH -u "$shortmode_path"`
53918       new_path="$input_path"
53919     fi
53920   fi
53921 
53922   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53923   if test "x$test_cygdrive_prefix" = x; then
53924     # As a simple fix, exclude /usr/bin since it's not a real path.
53925     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53926       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53927       # a path prefixed by /cygdrive for fixpath to work.
53928       new_path="$CYGWIN_ROOT_PATH$input_path"
53929     fi
53930   fi
53931 
53932 
53933   if test "x$path" != "x$new_path"; then
53934     MSVC_DLL="$new_path"
53935     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53936 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53937   fi
53938 
53939     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53940 
53941   path="$MSVC_DLL"
53942   has_colon=`$ECHO $path | $GREP ^.:`
53943   new_path="$path"
53944   if test "x$has_colon" = x; then
53945     # Not in mixed or Windows style, start by that.
53946     new_path=`cmd //c echo $path`
53947   fi
53948 
53949 
53950   input_path="$new_path"
53951   # Check if we need to convert this using DOS-style short mode. If the path
53952   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53953   # take no chances and rewrite it.
53954   # Note: m4 eats our [], so we need to use [ and ] instead.
53955   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53956   if test "x$has_forbidden_chars" != x; then
53957     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53958     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53959   fi
53960 
53961 
53962   windows_path="$new_path"
53963   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53964     unix_path=`$CYGPATH -u "$windows_path"`
53965     new_path="$unix_path"
53966   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53967     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53968     new_path="$unix_path"
53969   fi
53970 
53971   if test "x$path" != "x$new_path"; then
53972     MSVC_DLL="$new_path"
53973     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53974 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53975   fi
53976 
53977   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53978   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53979 
53980     else
53981       # We're on a unix platform. Hooray! :)
53982       path="$MSVC_DLL"
53983       has_space=`$ECHO "$path" | $GREP " "`
53984       if test "x$has_space" != x; then
53985         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53986 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53987         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53988       fi
53989 
53990       # Use eval to expand a potential ~
53991       eval path="$path"
53992       if test ! -f "$path" && test ! -d "$path"; then
53993         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53994       fi
53995 
53996       if test -d "$path"; then
53997         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53998       else
53999         dir="`$DIRNAME "$path"`"
54000         base="`$BASENAME "$path"`"
54001         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54002       fi
54003     fi
54004   fi
54005 
54006       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54007 $as_echo_n "checking for $DLL_NAME... " >&6; }
54008       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54009 $as_echo "$MSVC_DLL" >&6; }
54010     else
54011       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54012 $as_echo "incorrect, ignoring" >&6; }
54013       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54014 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54015     fi
54016   fi
54017 
54018     fi
54019   fi
54020 
54021   if test "x$MSVC_DLL" = x; then
54022     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54023     # (This was the original behaviour; kept since it might turn something up)
54024     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54025       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54026         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54027             | $GREP x64 | $HEAD --lines 1`
54028       else
54029         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54030             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54031         if test "x$POSSIBLE_MSVC_DLL" = x; then
54032           # We're grasping at straws now...
54033           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54034               | $HEAD --lines 1`
54035         fi
54036       fi
54037 
54038 
54039   DLL_NAME="$DLL_NAME"
54040   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54041   METHOD="search of VCINSTALLDIR"
54042   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54043     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54044 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54045 
54046     # Need to check if the found msvcr is correct architecture
54047     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54048 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54049     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54050     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54051       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54052       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54053       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54054         CORRECT_MSVCR_ARCH="PE32 executable"
54055       else
54056         CORRECT_MSVCR_ARCH="PE32+ executable"
54057       fi
54058     else
54059       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54060         CORRECT_MSVCR_ARCH=386
54061       else
54062         CORRECT_MSVCR_ARCH=x86-64
54063       fi
54064     fi
54065     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54066       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54067 $as_echo "ok" >&6; }
54068       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54069 
54070   # Only process if variable expands to non-empty
54071 
54072   if test "x$MSVC_DLL" != x; then
54073     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54074 
54075   # Input might be given as Windows format, start by converting to
54076   # unix format.
54077   path="$MSVC_DLL"
54078   new_path=`$CYGPATH -u "$path"`
54079 
54080   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54081   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54082   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54083   # "foo.exe" is OK but "foo" is an error.
54084   #
54085   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54086   # It is also a way to make sure we got the proper file name for the real test later on.
54087   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54088   if test "x$test_shortpath" = x; then
54089     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54090 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54091     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54092   fi
54093 
54094   # Call helper function which possibly converts this using DOS-style short mode.
54095   # If so, the updated path is stored in $new_path.
54096 
54097   input_path="$new_path"
54098   # Check if we need to convert this using DOS-style short mode. If the path
54099   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54100   # take no chances and rewrite it.
54101   # Note: m4 eats our [], so we need to use [ and ] instead.
54102   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54103   if test "x$has_forbidden_chars" != x; then
54104     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54105     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54106     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54107     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54108       # Going to short mode and back again did indeed matter. Since short mode is
54109       # case insensitive, let's make it lowercase to improve readability.
54110       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54111       # Now convert it back to Unix-style (cygpath)
54112       input_path=`$CYGPATH -u "$shortmode_path"`
54113       new_path="$input_path"
54114     fi
54115   fi
54116 
54117   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54118   if test "x$test_cygdrive_prefix" = x; then
54119     # As a simple fix, exclude /usr/bin since it's not a real path.
54120     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54121       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54122       # a path prefixed by /cygdrive for fixpath to work.
54123       new_path="$CYGWIN_ROOT_PATH$input_path"
54124     fi
54125   fi
54126 
54127 
54128   if test "x$path" != "x$new_path"; then
54129     MSVC_DLL="$new_path"
54130     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54131 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54132   fi
54133 
54134     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54135 
54136   path="$MSVC_DLL"
54137   has_colon=`$ECHO $path | $GREP ^.:`
54138   new_path="$path"
54139   if test "x$has_colon" = x; then
54140     # Not in mixed or Windows style, start by that.
54141     new_path=`cmd //c echo $path`
54142   fi
54143 
54144 
54145   input_path="$new_path"
54146   # Check if we need to convert this using DOS-style short mode. If the path
54147   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54148   # take no chances and rewrite it.
54149   # Note: m4 eats our [], so we need to use [ and ] instead.
54150   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54151   if test "x$has_forbidden_chars" != x; then
54152     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54153     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54154   fi
54155 
54156 
54157   windows_path="$new_path"
54158   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54159     unix_path=`$CYGPATH -u "$windows_path"`
54160     new_path="$unix_path"
54161   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54162     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54163     new_path="$unix_path"
54164   fi
54165 
54166   if test "x$path" != "x$new_path"; then
54167     MSVC_DLL="$new_path"
54168     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54169 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54170   fi
54171 
54172   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54173   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54174 
54175     else
54176       # We're on a unix platform. Hooray! :)
54177       path="$MSVC_DLL"
54178       has_space=`$ECHO "$path" | $GREP " "`
54179       if test "x$has_space" != x; then
54180         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54181 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54182         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54183       fi
54184 
54185       # Use eval to expand a potential ~
54186       eval path="$path"
54187       if test ! -f "$path" && test ! -d "$path"; then
54188         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54189       fi
54190 
54191       if test -d "$path"; then
54192         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54193       else
54194         dir="`$DIRNAME "$path"`"
54195         base="`$BASENAME "$path"`"
54196         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54197       fi
54198     fi
54199   fi
54200 
54201       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54202 $as_echo_n "checking for $DLL_NAME... " >&6; }
54203       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54204 $as_echo "$MSVC_DLL" >&6; }
54205     else
54206       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54207 $as_echo "incorrect, ignoring" >&6; }
54208       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54209 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54210     fi
54211   fi
54212 
54213     fi
54214   fi
54215 
54216   if test "x$MSVC_DLL" = x; then
54217     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54218 $as_echo_n "checking for $DLL_NAME... " >&6; }
54219     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54220 $as_echo "no" >&6; }
54221     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54222   fi
54223 
54224     MSVCR_DLL="$MSVC_DLL"
54225   fi
54226 
54227 
54228 
54229 # Check whether --with-msvcp-dll was given.
54230 if test "${with_msvcp_dll+set}" = set; then :
54231   withval=$with_msvcp_dll;
54232 fi
54233 
54234 
54235   if test "x$MSVCP_NAME" != "x"; then
54236     if test "x$with_msvcp_dll" != x; then
54237       # If given explicitely by user, do not probe. If not present, fail directly.
54238 
54239   DLL_NAME="$MSVCP_NAME"
54240   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54241   METHOD="--with-msvcp-dll"
54242   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54243     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54244 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54245 
54246     # Need to check if the found msvcr is correct architecture
54247     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54248 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54249     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54250     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54251       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54252       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54253       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54254         CORRECT_MSVCR_ARCH="PE32 executable"
54255       else
54256         CORRECT_MSVCR_ARCH="PE32+ executable"
54257       fi
54258     else
54259       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54260         CORRECT_MSVCR_ARCH=386
54261       else
54262         CORRECT_MSVCR_ARCH=x86-64
54263       fi
54264     fi
54265     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54266       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54267 $as_echo "ok" >&6; }
54268       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54269 
54270   # Only process if variable expands to non-empty
54271 
54272   if test "x$MSVC_DLL" != x; then
54273     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54274 
54275   # Input might be given as Windows format, start by converting to
54276   # unix format.
54277   path="$MSVC_DLL"
54278   new_path=`$CYGPATH -u "$path"`
54279 
54280   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54281   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54282   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54283   # "foo.exe" is OK but "foo" is an error.
54284   #
54285   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54286   # It is also a way to make sure we got the proper file name for the real test later on.
54287   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54288   if test "x$test_shortpath" = 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 $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54292   fi
54293 
54294   # Call helper function which possibly converts this using DOS-style short mode.
54295   # If so, the updated path is stored in $new_path.
54296 
54297   input_path="$new_path"
54298   # Check if we need to convert this using DOS-style short mode. If the path
54299   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54300   # take no chances and rewrite it.
54301   # Note: m4 eats our [], so we need to use [ and ] instead.
54302   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54303   if test "x$has_forbidden_chars" != x; then
54304     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54305     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54306     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54307     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54308       # Going to short mode and back again did indeed matter. Since short mode is
54309       # case insensitive, let's make it lowercase to improve readability.
54310       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54311       # Now convert it back to Unix-style (cygpath)
54312       input_path=`$CYGPATH -u "$shortmode_path"`
54313       new_path="$input_path"
54314     fi
54315   fi
54316 
54317   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54318   if test "x$test_cygdrive_prefix" = x; then
54319     # As a simple fix, exclude /usr/bin since it's not a real path.
54320     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54321       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54322       # a path prefixed by /cygdrive for fixpath to work.
54323       new_path="$CYGWIN_ROOT_PATH$input_path"
54324     fi
54325   fi
54326 
54327 
54328   if test "x$path" != "x$new_path"; then
54329     MSVC_DLL="$new_path"
54330     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54331 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54332   fi
54333 
54334     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54335 
54336   path="$MSVC_DLL"
54337   has_colon=`$ECHO $path | $GREP ^.:`
54338   new_path="$path"
54339   if test "x$has_colon" = x; then
54340     # Not in mixed or Windows style, start by that.
54341     new_path=`cmd //c echo $path`
54342   fi
54343 
54344 
54345   input_path="$new_path"
54346   # Check if we need to convert this using DOS-style short mode. If the path
54347   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54348   # take no chances and rewrite it.
54349   # Note: m4 eats our [], so we need to use [ and ] instead.
54350   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54351   if test "x$has_forbidden_chars" != x; then
54352     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54353     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54354   fi
54355 
54356 
54357   windows_path="$new_path"
54358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54359     unix_path=`$CYGPATH -u "$windows_path"`
54360     new_path="$unix_path"
54361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54363     new_path="$unix_path"
54364   fi
54365 
54366   if test "x$path" != "x$new_path"; then
54367     MSVC_DLL="$new_path"
54368     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54369 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54370   fi
54371 
54372   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54373   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54374 
54375     else
54376       # We're on a unix platform. Hooray! :)
54377       path="$MSVC_DLL"
54378       has_space=`$ECHO "$path" | $GREP " "`
54379       if test "x$has_space" != x; then
54380         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54381 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54382         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54383       fi
54384 
54385       # Use eval to expand a potential ~
54386       eval path="$path"
54387       if test ! -f "$path" && test ! -d "$path"; then
54388         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54389       fi
54390 
54391       if test -d "$path"; then
54392         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54393       else
54394         dir="`$DIRNAME "$path"`"
54395         base="`$BASENAME "$path"`"
54396         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54397       fi
54398     fi
54399   fi
54400 
54401       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54402 $as_echo_n "checking for $DLL_NAME... " >&6; }
54403       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54404 $as_echo "$MSVC_DLL" >&6; }
54405     else
54406       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54407 $as_echo "incorrect, ignoring" >&6; }
54408       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54409 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54410     fi
54411   fi
54412 
54413       if test "x$MSVC_DLL" = x; then
54414         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54415       fi
54416       MSVCP_DLL="$MSVC_DLL"
54417     elif test "x$DEVKIT_MSVCP_DLL" != x; then
54418 
54419   DLL_NAME="$MSVCP_NAME"
54420   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54421   METHOD="devkit"
54422   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54423     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54424 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54425 
54426     # Need to check if the found msvcr is correct architecture
54427     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54428 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54429     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54430     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54431       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54432       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54433       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54434         CORRECT_MSVCR_ARCH="PE32 executable"
54435       else
54436         CORRECT_MSVCR_ARCH="PE32+ executable"
54437       fi
54438     else
54439       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54440         CORRECT_MSVCR_ARCH=386
54441       else
54442         CORRECT_MSVCR_ARCH=x86-64
54443       fi
54444     fi
54445     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54446       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54447 $as_echo "ok" >&6; }
54448       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54449 
54450   # Only process if variable expands to non-empty
54451 
54452   if test "x$MSVC_DLL" != x; then
54453     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54454 
54455   # Input might be given as Windows format, start by converting to
54456   # unix format.
54457   path="$MSVC_DLL"
54458   new_path=`$CYGPATH -u "$path"`
54459 
54460   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54461   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54462   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54463   # "foo.exe" is OK but "foo" is an error.
54464   #
54465   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54466   # It is also a way to make sure we got the proper file name for the real test later on.
54467   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54468   if test "x$test_shortpath" = x; then
54469     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54470 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54471     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54472   fi
54473 
54474   # Call helper function which possibly converts this using DOS-style short mode.
54475   # If so, the updated path is stored in $new_path.
54476 
54477   input_path="$new_path"
54478   # Check if we need to convert this using DOS-style short mode. If the path
54479   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54480   # take no chances and rewrite it.
54481   # Note: m4 eats our [], so we need to use [ and ] instead.
54482   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54483   if test "x$has_forbidden_chars" != x; then
54484     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54485     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54486     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54487     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54488       # Going to short mode and back again did indeed matter. Since short mode is
54489       # case insensitive, let's make it lowercase to improve readability.
54490       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54491       # Now convert it back to Unix-style (cygpath)
54492       input_path=`$CYGPATH -u "$shortmode_path"`
54493       new_path="$input_path"
54494     fi
54495   fi
54496 
54497   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54498   if test "x$test_cygdrive_prefix" = x; then
54499     # As a simple fix, exclude /usr/bin since it's not a real path.
54500     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54501       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54502       # a path prefixed by /cygdrive for fixpath to work.
54503       new_path="$CYGWIN_ROOT_PATH$input_path"
54504     fi
54505   fi
54506 
54507 
54508   if test "x$path" != "x$new_path"; then
54509     MSVC_DLL="$new_path"
54510     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54511 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54512   fi
54513 
54514     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54515 
54516   path="$MSVC_DLL"
54517   has_colon=`$ECHO $path | $GREP ^.:`
54518   new_path="$path"
54519   if test "x$has_colon" = x; then
54520     # Not in mixed or Windows style, start by that.
54521     new_path=`cmd //c echo $path`
54522   fi
54523 
54524 
54525   input_path="$new_path"
54526   # Check if we need to convert this using DOS-style short mode. If the path
54527   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54528   # take no chances and rewrite it.
54529   # Note: m4 eats our [], so we need to use [ and ] instead.
54530   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54531   if test "x$has_forbidden_chars" != x; then
54532     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54533     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54534   fi
54535 
54536 
54537   windows_path="$new_path"
54538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54539     unix_path=`$CYGPATH -u "$windows_path"`
54540     new_path="$unix_path"
54541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54543     new_path="$unix_path"
54544   fi
54545 
54546   if test "x$path" != "x$new_path"; then
54547     MSVC_DLL="$new_path"
54548     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54549 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54550   fi
54551 
54552   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54553   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54554 
54555     else
54556       # We're on a unix platform. Hooray! :)
54557       path="$MSVC_DLL"
54558       has_space=`$ECHO "$path" | $GREP " "`
54559       if test "x$has_space" != x; then
54560         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54561 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54562         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54563       fi
54564 
54565       # Use eval to expand a potential ~
54566       eval path="$path"
54567       if test ! -f "$path" && test ! -d "$path"; then
54568         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54569       fi
54570 
54571       if test -d "$path"; then
54572         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54573       else
54574         dir="`$DIRNAME "$path"`"
54575         base="`$BASENAME "$path"`"
54576         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54577       fi
54578     fi
54579   fi
54580 
54581       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54582 $as_echo_n "checking for $DLL_NAME... " >&6; }
54583       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54584 $as_echo "$MSVC_DLL" >&6; }
54585     else
54586       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54587 $as_echo "incorrect, ignoring" >&6; }
54588       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54589 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54590     fi
54591   fi
54592 
54593       if test "x$MSVC_DLL" = x; then
54594         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54595       fi
54596       MSVCP_DLL="$MSVC_DLL"
54597     else
54598 
54599   DLL_NAME="${MSVCP_NAME}"
54600   MSVC_DLL=
54601 
54602   if test "x$MSVC_DLL" = x; then
54603     # Probe: Using well-known location from Visual Studio 10.0
54604     if test "x$VCINSTALLDIR" != x; then
54605       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54606 
54607   windows_path="$CYGWIN_VC_INSTALL_DIR"
54608   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54609     unix_path=`$CYGPATH -u "$windows_path"`
54610     CYGWIN_VC_INSTALL_DIR="$unix_path"
54611   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54612     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54613     CYGWIN_VC_INSTALL_DIR="$unix_path"
54614   fi
54615 
54616       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54617         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54618       else
54619         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54620       fi
54621       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54622 
54623   DLL_NAME="$DLL_NAME"
54624   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54625   METHOD="well-known location in VCINSTALLDIR"
54626   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54627     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54628 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54629 
54630     # Need to check if the found msvcr is correct architecture
54631     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54632 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54633     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54634     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54635       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54636       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54637       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54638         CORRECT_MSVCR_ARCH="PE32 executable"
54639       else
54640         CORRECT_MSVCR_ARCH="PE32+ executable"
54641       fi
54642     else
54643       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54644         CORRECT_MSVCR_ARCH=386
54645       else
54646         CORRECT_MSVCR_ARCH=x86-64
54647       fi
54648     fi
54649     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54650       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54651 $as_echo "ok" >&6; }
54652       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54653 
54654   # Only process if variable expands to non-empty
54655 
54656   if test "x$MSVC_DLL" != x; then
54657     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54658 
54659   # Input might be given as Windows format, start by converting to
54660   # unix format.
54661   path="$MSVC_DLL"
54662   new_path=`$CYGPATH -u "$path"`
54663 
54664   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54665   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54666   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54667   # "foo.exe" is OK but "foo" is an error.
54668   #
54669   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54670   # It is also a way to make sure we got the proper file name for the real test later on.
54671   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54672   if test "x$test_shortpath" = x; then
54673     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54674 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54675     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54676   fi
54677 
54678   # Call helper function which possibly converts this using DOS-style short mode.
54679   # If so, the updated path is stored in $new_path.
54680 
54681   input_path="$new_path"
54682   # Check if we need to convert this using DOS-style short mode. If the path
54683   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54684   # take no chances and rewrite it.
54685   # Note: m4 eats our [], so we need to use [ and ] instead.
54686   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54687   if test "x$has_forbidden_chars" != x; then
54688     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54689     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54690     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54691     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54692       # Going to short mode and back again did indeed matter. Since short mode is
54693       # case insensitive, let's make it lowercase to improve readability.
54694       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54695       # Now convert it back to Unix-style (cygpath)
54696       input_path=`$CYGPATH -u "$shortmode_path"`
54697       new_path="$input_path"
54698     fi
54699   fi
54700 
54701   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54702   if test "x$test_cygdrive_prefix" = x; then
54703     # As a simple fix, exclude /usr/bin since it's not a real path.
54704     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54705       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54706       # a path prefixed by /cygdrive for fixpath to work.
54707       new_path="$CYGWIN_ROOT_PATH$input_path"
54708     fi
54709   fi
54710 
54711 
54712   if test "x$path" != "x$new_path"; then
54713     MSVC_DLL="$new_path"
54714     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54715 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54716   fi
54717 
54718     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54719 
54720   path="$MSVC_DLL"
54721   has_colon=`$ECHO $path | $GREP ^.:`
54722   new_path="$path"
54723   if test "x$has_colon" = x; then
54724     # Not in mixed or Windows style, start by that.
54725     new_path=`cmd //c echo $path`
54726   fi
54727 
54728 
54729   input_path="$new_path"
54730   # Check if we need to convert this using DOS-style short mode. If the path
54731   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54732   # take no chances and rewrite it.
54733   # Note: m4 eats our [], so we need to use [ and ] instead.
54734   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54735   if test "x$has_forbidden_chars" != x; then
54736     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54737     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54738   fi
54739 
54740 
54741   windows_path="$new_path"
54742   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54743     unix_path=`$CYGPATH -u "$windows_path"`
54744     new_path="$unix_path"
54745   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54746     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54747     new_path="$unix_path"
54748   fi
54749 
54750   if test "x$path" != "x$new_path"; then
54751     MSVC_DLL="$new_path"
54752     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54753 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54754   fi
54755 
54756   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54757   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54758 
54759     else
54760       # We're on a unix platform. Hooray! :)
54761       path="$MSVC_DLL"
54762       has_space=`$ECHO "$path" | $GREP " "`
54763       if test "x$has_space" != x; then
54764         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54765 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54766         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54767       fi
54768 
54769       # Use eval to expand a potential ~
54770       eval path="$path"
54771       if test ! -f "$path" && test ! -d "$path"; then
54772         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54773       fi
54774 
54775       if test -d "$path"; then
54776         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54777       else
54778         dir="`$DIRNAME "$path"`"
54779         base="`$BASENAME "$path"`"
54780         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54781       fi
54782     fi
54783   fi
54784 
54785       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54786 $as_echo_n "checking for $DLL_NAME... " >&6; }
54787       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54788 $as_echo "$MSVC_DLL" >&6; }
54789     else
54790       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54791 $as_echo "incorrect, ignoring" >&6; }
54792       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54793 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54794     fi
54795   fi
54796 
54797     fi
54798   fi
54799 
54800   if test "x$MSVC_DLL" = x; then
54801     # Probe: Check in the Boot JDK directory.
54802     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54803 
54804   DLL_NAME="$DLL_NAME"
54805   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54806   METHOD="well-known location in Boot JDK"
54807   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54808     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54809 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54810 
54811     # Need to check if the found msvcr is correct architecture
54812     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54813 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54814     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54815     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54816       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54817       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54818       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54819         CORRECT_MSVCR_ARCH="PE32 executable"
54820       else
54821         CORRECT_MSVCR_ARCH="PE32+ executable"
54822       fi
54823     else
54824       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54825         CORRECT_MSVCR_ARCH=386
54826       else
54827         CORRECT_MSVCR_ARCH=x86-64
54828       fi
54829     fi
54830     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54831       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54832 $as_echo "ok" >&6; }
54833       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54834 
54835   # Only process if variable expands to non-empty
54836 
54837   if test "x$MSVC_DLL" != x; then
54838     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54839 
54840   # Input might be given as Windows format, start by converting to
54841   # unix format.
54842   path="$MSVC_DLL"
54843   new_path=`$CYGPATH -u "$path"`
54844 
54845   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54846   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54847   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54848   # "foo.exe" is OK but "foo" is an error.
54849   #
54850   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54851   # It is also a way to make sure we got the proper file name for the real test later on.
54852   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54853   if test "x$test_shortpath" = x; then
54854     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54855 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54856     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54857   fi
54858 
54859   # Call helper function which possibly converts this using DOS-style short mode.
54860   # If so, the updated path is stored in $new_path.
54861 
54862   input_path="$new_path"
54863   # Check if we need to convert this using DOS-style short mode. If the path
54864   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54865   # take no chances and rewrite it.
54866   # Note: m4 eats our [], so we need to use [ and ] instead.
54867   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54868   if test "x$has_forbidden_chars" != x; then
54869     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54870     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54871     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54872     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54873       # Going to short mode and back again did indeed matter. Since short mode is
54874       # case insensitive, let's make it lowercase to improve readability.
54875       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54876       # Now convert it back to Unix-style (cygpath)
54877       input_path=`$CYGPATH -u "$shortmode_path"`
54878       new_path="$input_path"
54879     fi
54880   fi
54881 
54882   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54883   if test "x$test_cygdrive_prefix" = x; then
54884     # As a simple fix, exclude /usr/bin since it's not a real path.
54885     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54886       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54887       # a path prefixed by /cygdrive for fixpath to work.
54888       new_path="$CYGWIN_ROOT_PATH$input_path"
54889     fi
54890   fi
54891 
54892 
54893   if test "x$path" != "x$new_path"; then
54894     MSVC_DLL="$new_path"
54895     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54896 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54897   fi
54898 
54899     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54900 
54901   path="$MSVC_DLL"
54902   has_colon=`$ECHO $path | $GREP ^.:`
54903   new_path="$path"
54904   if test "x$has_colon" = x; then
54905     # Not in mixed or Windows style, start by that.
54906     new_path=`cmd //c echo $path`
54907   fi
54908 
54909 
54910   input_path="$new_path"
54911   # Check if we need to convert this using DOS-style short mode. If the path
54912   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54913   # take no chances and rewrite it.
54914   # Note: m4 eats our [], so we need to use [ and ] instead.
54915   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54916   if test "x$has_forbidden_chars" != x; then
54917     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54918     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54919   fi
54920 
54921 
54922   windows_path="$new_path"
54923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54924     unix_path=`$CYGPATH -u "$windows_path"`
54925     new_path="$unix_path"
54926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54927     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54928     new_path="$unix_path"
54929   fi
54930 
54931   if test "x$path" != "x$new_path"; then
54932     MSVC_DLL="$new_path"
54933     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54934 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54935   fi
54936 
54937   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54938   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54939 
54940     else
54941       # We're on a unix platform. Hooray! :)
54942       path="$MSVC_DLL"
54943       has_space=`$ECHO "$path" | $GREP " "`
54944       if test "x$has_space" != x; then
54945         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54946 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54947         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54948       fi
54949 
54950       # Use eval to expand a potential ~
54951       eval path="$path"
54952       if test ! -f "$path" && test ! -d "$path"; then
54953         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54954       fi
54955 
54956       if test -d "$path"; then
54957         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54958       else
54959         dir="`$DIRNAME "$path"`"
54960         base="`$BASENAME "$path"`"
54961         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54962       fi
54963     fi
54964   fi
54965 
54966       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54967 $as_echo_n "checking for $DLL_NAME... " >&6; }
54968       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54969 $as_echo "$MSVC_DLL" >&6; }
54970     else
54971       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54972 $as_echo "incorrect, ignoring" >&6; }
54973       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54974 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54975     fi
54976   fi
54977 
54978   fi
54979 
54980   if test "x$MSVC_DLL" = x; then
54981     # Probe: Look in the Windows system32 directory
54982     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54983 
54984   windows_path="$CYGWIN_SYSTEMROOT"
54985   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54986     unix_path=`$CYGPATH -u "$windows_path"`
54987     CYGWIN_SYSTEMROOT="$unix_path"
54988   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54989     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54990     CYGWIN_SYSTEMROOT="$unix_path"
54991   fi
54992 
54993     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54994 
54995   DLL_NAME="$DLL_NAME"
54996   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54997   METHOD="well-known location in SYSTEMROOT"
54998   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54999     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55000 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55001 
55002     # Need to check if the found msvcr is correct architecture
55003     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55004 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55005     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55006     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55007       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55008       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55009       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55010         CORRECT_MSVCR_ARCH="PE32 executable"
55011       else
55012         CORRECT_MSVCR_ARCH="PE32+ executable"
55013       fi
55014     else
55015       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55016         CORRECT_MSVCR_ARCH=386
55017       else
55018         CORRECT_MSVCR_ARCH=x86-64
55019       fi
55020     fi
55021     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55022       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55023 $as_echo "ok" >&6; }
55024       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55025 
55026   # Only process if variable expands to non-empty
55027 
55028   if test "x$MSVC_DLL" != x; then
55029     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55030 
55031   # Input might be given as Windows format, start by converting to
55032   # unix format.
55033   path="$MSVC_DLL"
55034   new_path=`$CYGPATH -u "$path"`
55035 
55036   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55037   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55038   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55039   # "foo.exe" is OK but "foo" is an error.
55040   #
55041   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55042   # It is also a way to make sure we got the proper file name for the real test later on.
55043   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55044   if test "x$test_shortpath" = x; then
55045     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55046 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55047     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55048   fi
55049 
55050   # Call helper function which possibly converts this using DOS-style short mode.
55051   # If so, the updated path is stored in $new_path.
55052 
55053   input_path="$new_path"
55054   # Check if we need to convert this using DOS-style short mode. If the path
55055   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55056   # take no chances and rewrite it.
55057   # Note: m4 eats our [], so we need to use [ and ] instead.
55058   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55059   if test "x$has_forbidden_chars" != x; then
55060     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55061     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55062     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55063     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55064       # Going to short mode and back again did indeed matter. Since short mode is
55065       # case insensitive, let's make it lowercase to improve readability.
55066       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55067       # Now convert it back to Unix-style (cygpath)
55068       input_path=`$CYGPATH -u "$shortmode_path"`
55069       new_path="$input_path"
55070     fi
55071   fi
55072 
55073   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55074   if test "x$test_cygdrive_prefix" = x; then
55075     # As a simple fix, exclude /usr/bin since it's not a real path.
55076     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55077       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55078       # a path prefixed by /cygdrive for fixpath to work.
55079       new_path="$CYGWIN_ROOT_PATH$input_path"
55080     fi
55081   fi
55082 
55083 
55084   if test "x$path" != "x$new_path"; then
55085     MSVC_DLL="$new_path"
55086     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55087 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55088   fi
55089 
55090     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55091 
55092   path="$MSVC_DLL"
55093   has_colon=`$ECHO $path | $GREP ^.:`
55094   new_path="$path"
55095   if test "x$has_colon" = x; then
55096     # Not in mixed or Windows style, start by that.
55097     new_path=`cmd //c echo $path`
55098   fi
55099 
55100 
55101   input_path="$new_path"
55102   # Check if we need to convert this using DOS-style short mode. If the path
55103   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55104   # take no chances and rewrite it.
55105   # Note: m4 eats our [], so we need to use [ and ] instead.
55106   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55107   if test "x$has_forbidden_chars" != x; then
55108     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55109     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55110   fi
55111 
55112 
55113   windows_path="$new_path"
55114   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55115     unix_path=`$CYGPATH -u "$windows_path"`
55116     new_path="$unix_path"
55117   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55118     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55119     new_path="$unix_path"
55120   fi
55121 
55122   if test "x$path" != "x$new_path"; then
55123     MSVC_DLL="$new_path"
55124     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55125 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55126   fi
55127 
55128   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55129   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55130 
55131     else
55132       # We're on a unix platform. Hooray! :)
55133       path="$MSVC_DLL"
55134       has_space=`$ECHO "$path" | $GREP " "`
55135       if test "x$has_space" != x; then
55136         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55137 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55138         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55139       fi
55140 
55141       # Use eval to expand a potential ~
55142       eval path="$path"
55143       if test ! -f "$path" && test ! -d "$path"; then
55144         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55145       fi
55146 
55147       if test -d "$path"; then
55148         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55149       else
55150         dir="`$DIRNAME "$path"`"
55151         base="`$BASENAME "$path"`"
55152         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55153       fi
55154     fi
55155   fi
55156 
55157       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55158 $as_echo_n "checking for $DLL_NAME... " >&6; }
55159       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55160 $as_echo "$MSVC_DLL" >&6; }
55161     else
55162       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55163 $as_echo "incorrect, ignoring" >&6; }
55164       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55165 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55166     fi
55167   fi
55168 
55169   fi
55170 
55171   if test "x$MSVC_DLL" = x; then
55172     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55173     if test "x$VS100COMNTOOLS" != x; then
55174       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55175 
55176   windows_path="$CYGWIN_VS_TOOLS_DIR"
55177   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55178     unix_path=`$CYGPATH -u "$windows_path"`
55179     CYGWIN_VS_TOOLS_DIR="$unix_path"
55180   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55181     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55182     CYGWIN_VS_TOOLS_DIR="$unix_path"
55183   fi
55184 
55185       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55186         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55187             | $GREP -i /x64/ | $HEAD --lines 1`
55188       else
55189         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55190             | $GREP -i /x86/ | $HEAD --lines 1`
55191       fi
55192 
55193   DLL_NAME="$DLL_NAME"
55194   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55195   METHOD="search of VS100COMNTOOLS"
55196   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55197     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55198 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55199 
55200     # Need to check if the found msvcr is correct architecture
55201     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55202 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55203     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55204     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55205       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55206       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55207       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55208         CORRECT_MSVCR_ARCH="PE32 executable"
55209       else
55210         CORRECT_MSVCR_ARCH="PE32+ executable"
55211       fi
55212     else
55213       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55214         CORRECT_MSVCR_ARCH=386
55215       else
55216         CORRECT_MSVCR_ARCH=x86-64
55217       fi
55218     fi
55219     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55220       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55221 $as_echo "ok" >&6; }
55222       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55223 
55224   # Only process if variable expands to non-empty
55225 
55226   if test "x$MSVC_DLL" != x; then
55227     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55228 
55229   # Input might be given as Windows format, start by converting to
55230   # unix format.
55231   path="$MSVC_DLL"
55232   new_path=`$CYGPATH -u "$path"`
55233 
55234   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55235   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55236   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55237   # "foo.exe" is OK but "foo" is an error.
55238   #
55239   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55240   # It is also a way to make sure we got the proper file name for the real test later on.
55241   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55242   if test "x$test_shortpath" = x; then
55243     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55244 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55245     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55246   fi
55247 
55248   # Call helper function which possibly converts this using DOS-style short mode.
55249   # If so, the updated path is stored in $new_path.
55250 
55251   input_path="$new_path"
55252   # Check if we need to convert this using DOS-style short mode. If the path
55253   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55254   # take no chances and rewrite it.
55255   # Note: m4 eats our [], so we need to use [ and ] instead.
55256   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55257   if test "x$has_forbidden_chars" != x; then
55258     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55259     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55260     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55261     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55262       # Going to short mode and back again did indeed matter. Since short mode is
55263       # case insensitive, let's make it lowercase to improve readability.
55264       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55265       # Now convert it back to Unix-style (cygpath)
55266       input_path=`$CYGPATH -u "$shortmode_path"`
55267       new_path="$input_path"
55268     fi
55269   fi
55270 
55271   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55272   if test "x$test_cygdrive_prefix" = x; then
55273     # As a simple fix, exclude /usr/bin since it's not a real path.
55274     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55275       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55276       # a path prefixed by /cygdrive for fixpath to work.
55277       new_path="$CYGWIN_ROOT_PATH$input_path"
55278     fi
55279   fi
55280 
55281 
55282   if test "x$path" != "x$new_path"; then
55283     MSVC_DLL="$new_path"
55284     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55285 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55286   fi
55287 
55288     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55289 
55290   path="$MSVC_DLL"
55291   has_colon=`$ECHO $path | $GREP ^.:`
55292   new_path="$path"
55293   if test "x$has_colon" = x; then
55294     # Not in mixed or Windows style, start by that.
55295     new_path=`cmd //c echo $path`
55296   fi
55297 
55298 
55299   input_path="$new_path"
55300   # Check if we need to convert this using DOS-style short mode. If the path
55301   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55302   # take no chances and rewrite it.
55303   # Note: m4 eats our [], so we need to use [ and ] instead.
55304   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55305   if test "x$has_forbidden_chars" != x; then
55306     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55307     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55308   fi
55309 
55310 
55311   windows_path="$new_path"
55312   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55313     unix_path=`$CYGPATH -u "$windows_path"`
55314     new_path="$unix_path"
55315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55316     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55317     new_path="$unix_path"
55318   fi
55319 
55320   if test "x$path" != "x$new_path"; then
55321     MSVC_DLL="$new_path"
55322     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55323 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55324   fi
55325 
55326   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55327   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55328 
55329     else
55330       # We're on a unix platform. Hooray! :)
55331       path="$MSVC_DLL"
55332       has_space=`$ECHO "$path" | $GREP " "`
55333       if test "x$has_space" != x; then
55334         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55335 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55336         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55337       fi
55338 
55339       # Use eval to expand a potential ~
55340       eval path="$path"
55341       if test ! -f "$path" && test ! -d "$path"; then
55342         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55343       fi
55344 
55345       if test -d "$path"; then
55346         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55347       else
55348         dir="`$DIRNAME "$path"`"
55349         base="`$BASENAME "$path"`"
55350         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55351       fi
55352     fi
55353   fi
55354 
55355       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55356 $as_echo_n "checking for $DLL_NAME... " >&6; }
55357       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55358 $as_echo "$MSVC_DLL" >&6; }
55359     else
55360       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55361 $as_echo "incorrect, ignoring" >&6; }
55362       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55363 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55364     fi
55365   fi
55366 
55367     fi
55368   fi
55369 
55370   if test "x$MSVC_DLL" = x; then
55371     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55372     # (This was the original behaviour; kept since it might turn something up)
55373     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55374       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55375         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55376             | $GREP x64 | $HEAD --lines 1`
55377       else
55378         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55379             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55380         if test "x$POSSIBLE_MSVC_DLL" = x; then
55381           # We're grasping at straws now...
55382           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55383               | $HEAD --lines 1`
55384         fi
55385       fi
55386 
55387 
55388   DLL_NAME="$DLL_NAME"
55389   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55390   METHOD="search of VCINSTALLDIR"
55391   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55392     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55393 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55394 
55395     # Need to check if the found msvcr is correct architecture
55396     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55397 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55398     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55399     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55400       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55401       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55402       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55403         CORRECT_MSVCR_ARCH="PE32 executable"
55404       else
55405         CORRECT_MSVCR_ARCH="PE32+ executable"
55406       fi
55407     else
55408       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55409         CORRECT_MSVCR_ARCH=386
55410       else
55411         CORRECT_MSVCR_ARCH=x86-64
55412       fi
55413     fi
55414     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55415       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55416 $as_echo "ok" >&6; }
55417       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55418 
55419   # Only process if variable expands to non-empty
55420 
55421   if test "x$MSVC_DLL" != x; then
55422     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55423 
55424   # Input might be given as Windows format, start by converting to
55425   # unix format.
55426   path="$MSVC_DLL"
55427   new_path=`$CYGPATH -u "$path"`
55428 
55429   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55430   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55431   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55432   # "foo.exe" is OK but "foo" is an error.
55433   #
55434   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55435   # It is also a way to make sure we got the proper file name for the real test later on.
55436   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55437   if test "x$test_shortpath" = x; then
55438     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55439 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55440     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55441   fi
55442 
55443   # Call helper function which possibly converts this using DOS-style short mode.
55444   # If so, the updated path is stored in $new_path.
55445 
55446   input_path="$new_path"
55447   # Check if we need to convert this using DOS-style short mode. If the path
55448   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55449   # take no chances and rewrite it.
55450   # Note: m4 eats our [], so we need to use [ and ] instead.
55451   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55452   if test "x$has_forbidden_chars" != x; then
55453     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55454     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55455     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55456     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55457       # Going to short mode and back again did indeed matter. Since short mode is
55458       # case insensitive, let's make it lowercase to improve readability.
55459       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55460       # Now convert it back to Unix-style (cygpath)
55461       input_path=`$CYGPATH -u "$shortmode_path"`
55462       new_path="$input_path"
55463     fi
55464   fi
55465 
55466   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55467   if test "x$test_cygdrive_prefix" = x; then
55468     # As a simple fix, exclude /usr/bin since it's not a real path.
55469     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55470       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55471       # a path prefixed by /cygdrive for fixpath to work.
55472       new_path="$CYGWIN_ROOT_PATH$input_path"
55473     fi
55474   fi
55475 
55476 
55477   if test "x$path" != "x$new_path"; then
55478     MSVC_DLL="$new_path"
55479     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55480 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55481   fi
55482 
55483     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55484 
55485   path="$MSVC_DLL"
55486   has_colon=`$ECHO $path | $GREP ^.:`
55487   new_path="$path"
55488   if test "x$has_colon" = x; then
55489     # Not in mixed or Windows style, start by that.
55490     new_path=`cmd //c echo $path`
55491   fi
55492 
55493 
55494   input_path="$new_path"
55495   # Check if we need to convert this using DOS-style short mode. If the path
55496   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55497   # take no chances and rewrite it.
55498   # Note: m4 eats our [], so we need to use [ and ] instead.
55499   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55500   if test "x$has_forbidden_chars" != x; then
55501     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55502     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55503   fi
55504 
55505 
55506   windows_path="$new_path"
55507   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55508     unix_path=`$CYGPATH -u "$windows_path"`
55509     new_path="$unix_path"
55510   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55511     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55512     new_path="$unix_path"
55513   fi
55514 
55515   if test "x$path" != "x$new_path"; then
55516     MSVC_DLL="$new_path"
55517     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55518 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55519   fi
55520 
55521   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55522   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55523 
55524     else
55525       # We're on a unix platform. Hooray! :)
55526       path="$MSVC_DLL"
55527       has_space=`$ECHO "$path" | $GREP " "`
55528       if test "x$has_space" != x; then
55529         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55530 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55531         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55532       fi
55533 
55534       # Use eval to expand a potential ~
55535       eval path="$path"
55536       if test ! -f "$path" && test ! -d "$path"; then
55537         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55538       fi
55539 
55540       if test -d "$path"; then
55541         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55542       else
55543         dir="`$DIRNAME "$path"`"
55544         base="`$BASENAME "$path"`"
55545         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55546       fi
55547     fi
55548   fi
55549 
55550       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55551 $as_echo_n "checking for $DLL_NAME... " >&6; }
55552       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55553 $as_echo "$MSVC_DLL" >&6; }
55554     else
55555       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55556 $as_echo "incorrect, ignoring" >&6; }
55557       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55558 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55559     fi
55560   fi
55561 
55562     fi
55563   fi
55564 
55565   if test "x$MSVC_DLL" = x; then
55566     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55567 $as_echo_n "checking for $DLL_NAME... " >&6; }
55568     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55569 $as_echo "no" >&6; }
55570     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55571   fi
55572 
55573       MSVCP_DLL="$MSVC_DLL"
55574     fi
55575 
55576   fi
55577 
55578   fi
55579 
55580 
55581   if test "x$NEEDS_LIB_X11" = xfalse; then
55582     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55583       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55584 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55585     fi
55586     X_CFLAGS=
55587     X_LIBS=
55588   else
55589 
55590     if test "x${with_x}" = xno; then
55591       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55592     fi
55593 
55594     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55595       # The user has specified a X11 base directory. Use it for includes and
55596       # libraries, unless explicitely overridden.
55597       if test "x$x_includes" = xNONE; then
55598         x_includes="${with_x}/include"
55599       fi
55600       if test "x$x_libraries" = xNONE; then
55601         x_libraries="${with_x}/lib"
55602       fi
55603     else
55604       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55605       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55606       # --x-libraries for the sysroot, if that seems to be correct.
55607       if test "x$SYSROOT" != "x"; then
55608         if test "x$x_includes" = xNONE; then
55609           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55610             x_includes="$SYSROOT/usr/X11R6/include"
55611           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55612             x_includes="$SYSROOT/usr/include"
55613           fi
55614         fi
55615         if test "x$x_libraries" = xNONE; then
55616           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55617             x_libraries="$SYSROOT/usr/X11R6/lib"
55618           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55619             x_libraries="$SYSROOT/usr/lib64"
55620           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55621             x_libraries="$SYSROOT/usr/lib"
55622           fi
55623         fi
55624       fi
55625     fi
55626 
55627     # Now let autoconf do it's magic
55628     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55629 $as_echo_n "checking for X... " >&6; }
55630 
55631 
55632 # Check whether --with-x was given.
55633 if test "${with_x+set}" = set; then :
55634   withval=$with_x;
55635 fi
55636 
55637 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55638 if test "x$with_x" = xno; then
55639   # The user explicitly disabled X.
55640   have_x=disabled
55641 else
55642   case $x_includes,$x_libraries in #(
55643     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55644     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55645   $as_echo_n "(cached) " >&6
55646 else
55647   # One or both of the vars are not set, and there is no cached value.
55648 ac_x_includes=no ac_x_libraries=no
55649 rm -f -r conftest.dir
55650 if mkdir conftest.dir; then
55651   cd conftest.dir
55652   cat >Imakefile <<'_ACEOF'
55653 incroot:
55654         @echo incroot='${INCROOT}'
55655 usrlibdir:
55656         @echo usrlibdir='${USRLIBDIR}'
55657 libdir:
55658         @echo libdir='${LIBDIR}'
55659 _ACEOF
55660   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55661     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55662     for ac_var in incroot usrlibdir libdir; do
55663       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55664     done
55665     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55666     for ac_extension in a so sl dylib la dll; do
55667       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55668          test -f "$ac_im_libdir/libX11.$ac_extension"; then
55669         ac_im_usrlibdir=$ac_im_libdir; break
55670       fi
55671     done
55672     # Screen out bogus values from the imake configuration.  They are
55673     # bogus both because they are the default anyway, and because
55674     # using them would break gcc on systems where it needs fixed includes.
55675     case $ac_im_incroot in
55676         /usr/include) ac_x_includes= ;;
55677         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55678     esac
55679     case $ac_im_usrlibdir in
55680         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
55681         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55682     esac
55683   fi
55684   cd ..
55685   rm -f -r conftest.dir
55686 fi
55687 
55688 # Standard set of common directories for X headers.
55689 # Check X11 before X11Rn because it is often a symlink to the current release.
55690 ac_x_header_dirs='
55691 /usr/X11/include
55692 /usr/X11R7/include
55693 /usr/X11R6/include
55694 /usr/X11R5/include
55695 /usr/X11R4/include
55696 
55697 /usr/include/X11
55698 /usr/include/X11R7
55699 /usr/include/X11R6
55700 /usr/include/X11R5
55701 /usr/include/X11R4
55702 
55703 /usr/local/X11/include
55704 /usr/local/X11R7/include
55705 /usr/local/X11R6/include
55706 /usr/local/X11R5/include
55707 /usr/local/X11R4/include
55708 
55709 /usr/local/include/X11
55710 /usr/local/include/X11R7
55711 /usr/local/include/X11R6
55712 /usr/local/include/X11R5
55713 /usr/local/include/X11R4
55714 
55715 /usr/X386/include
55716 /usr/x386/include
55717 /usr/XFree86/include/X11
55718 
55719 /usr/include
55720 /usr/local/include
55721 /usr/unsupported/include
55722 /usr/athena/include
55723 /usr/local/x11r5/include
55724 /usr/lpp/Xamples/include
55725 
55726 /usr/openwin/include
55727 /usr/openwin/share/include'
55728 
55729 if test "$ac_x_includes" = no; then
55730   # Guess where to find include files, by looking for Xlib.h.
55731   # First, try using that file with no special directory specified.
55732   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55733 /* end confdefs.h.  */
55734 #include <X11/Xlib.h>
55735 _ACEOF
55736 if ac_fn_cxx_try_cpp "$LINENO"; then :
55737   # We can compile using X headers with no special include directory.
55738 ac_x_includes=
55739 else
55740   for ac_dir in $ac_x_header_dirs; do
55741   if test -r "$ac_dir/X11/Xlib.h"; then
55742     ac_x_includes=$ac_dir
55743     break
55744   fi
55745 done
55746 fi
55747 rm -f conftest.err conftest.i conftest.$ac_ext
55748 fi # $ac_x_includes = no
55749 
55750 if test "$ac_x_libraries" = no; then
55751   # Check for the libraries.
55752   # See if we find them without any special options.
55753   # Don't add to $LIBS permanently.
55754   ac_save_LIBS=$LIBS
55755   LIBS="-lX11 $LIBS"
55756   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55757 /* end confdefs.h.  */
55758 #include <X11/Xlib.h>
55759 int
55760 main ()
55761 {
55762 XrmInitialize ()
55763   ;
55764   return 0;
55765 }
55766 _ACEOF
55767 if ac_fn_cxx_try_link "$LINENO"; then :
55768   LIBS=$ac_save_LIBS
55769 # We can link X programs with no special library path.
55770 ac_x_libraries=
55771 else
55772   LIBS=$ac_save_LIBS
55773 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
55774 do
55775   # Don't even attempt the hair of trying to link an X program!
55776   for ac_extension in a so sl dylib la dll; do
55777     if test -r "$ac_dir/libX11.$ac_extension"; then
55778       ac_x_libraries=$ac_dir
55779       break 2
55780     fi
55781   done
55782 done
55783 fi
55784 rm -f core conftest.err conftest.$ac_objext \
55785     conftest$ac_exeext conftest.$ac_ext
55786 fi # $ac_x_libraries = no
55787 
55788 case $ac_x_includes,$ac_x_libraries in #(
55789   no,* | *,no | *\'*)
55790     # Didn't find X, or a directory has "'" in its name.
55791     ac_cv_have_x="have_x=no";; #(
55792   *)
55793     # Record where we found X for the cache.
55794     ac_cv_have_x="have_x=yes\
55795         ac_x_includes='$ac_x_includes'\
55796         ac_x_libraries='$ac_x_libraries'"
55797 esac
55798 fi
55799 ;; #(
55800     *) have_x=yes;;
55801   esac
55802   eval "$ac_cv_have_x"
55803 fi # $with_x != no
55804 
55805 if test "$have_x" != yes; then
55806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
55807 $as_echo "$have_x" >&6; }
55808   no_x=yes
55809 else
55810   # If each of the values was on the command line, it overrides each guess.
55811   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
55812   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
55813   # Update the cache value to reflect the command line values.
55814   ac_cv_have_x="have_x=yes\
55815         ac_x_includes='$x_includes'\
55816         ac_x_libraries='$x_libraries'"
55817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
55818 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
55819 fi
55820 
55821     if test "$no_x" = yes; then
55822   # Not all programs may use this symbol, but it does not hurt to define it.
55823 
55824 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
55825 
55826   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
55827 else
55828   if test -n "$x_includes"; then
55829     X_CFLAGS="$X_CFLAGS -I$x_includes"
55830   fi
55831 
55832   # It would also be nice to do this for all -L options, not just this one.
55833   if test -n "$x_libraries"; then
55834     X_LIBS="$X_LIBS -L$x_libraries"
55835     # For Solaris; some versions of Sun CC require a space after -R and
55836     # others require no space.  Words are not sufficient . . . .
55837     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
55838 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
55839     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
55840     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
55841     ac_cxx_werror_flag=yes
55842     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55843 /* end confdefs.h.  */
55844 
55845 int
55846 main ()
55847 {
55848 
55849   ;
55850   return 0;
55851 }
55852 _ACEOF
55853 if ac_fn_cxx_try_link "$LINENO"; then :
55854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55855 $as_echo "no" >&6; }
55856        X_LIBS="$X_LIBS -R$x_libraries"
55857 else
55858   LIBS="$ac_xsave_LIBS -R $x_libraries"
55859        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55860 /* end confdefs.h.  */
55861 
55862 int
55863 main ()
55864 {
55865 
55866   ;
55867   return 0;
55868 }
55869 _ACEOF
55870 if ac_fn_cxx_try_link "$LINENO"; then :
55871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55872 $as_echo "yes" >&6; }
55873           X_LIBS="$X_LIBS -R $x_libraries"
55874 else
55875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
55876 $as_echo "neither works" >&6; }
55877 fi
55878 rm -f core conftest.err conftest.$ac_objext \
55879     conftest$ac_exeext conftest.$ac_ext
55880 fi
55881 rm -f core conftest.err conftest.$ac_objext \
55882     conftest$ac_exeext conftest.$ac_ext
55883     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
55884     LIBS=$ac_xsave_LIBS
55885   fi
55886 
55887   # Check for system-dependent libraries X programs must link with.
55888   # Do this before checking for the system-independent R6 libraries
55889   # (-lICE), since we may need -lsocket or whatever for X linking.
55890 
55891   if test "$ISC" = yes; then
55892     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
55893   else
55894     # Martyn Johnson says this is needed for Ultrix, if the X
55895     # libraries were built with DECnet support.  And Karl Berry says
55896     # the Alpha needs dnet_stub (dnet does not exist).
55897     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
55898     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55899 /* end confdefs.h.  */
55900 
55901 /* Override any GCC internal prototype to avoid an error.
55902    Use char because int might match the return type of a GCC
55903    builtin and then its argument prototype would still apply.  */
55904 #ifdef __cplusplus
55905 extern "C"
55906 #endif
55907 char XOpenDisplay ();
55908 int
55909 main ()
55910 {
55911 return XOpenDisplay ();
55912   ;
55913   return 0;
55914 }
55915 _ACEOF
55916 if ac_fn_cxx_try_link "$LINENO"; then :
55917 
55918 else
55919   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
55920 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
55921 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
55922   $as_echo_n "(cached) " >&6
55923 else
55924   ac_check_lib_save_LIBS=$LIBS
55925 LIBS="-ldnet  $LIBS"
55926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55927 /* end confdefs.h.  */
55928 
55929 /* Override any GCC internal prototype to avoid an error.
55930    Use char because int might match the return type of a GCC
55931    builtin and then its argument prototype would still apply.  */
55932 #ifdef __cplusplus
55933 extern "C"
55934 #endif
55935 char dnet_ntoa ();
55936 int
55937 main ()
55938 {
55939 return dnet_ntoa ();
55940   ;
55941   return 0;
55942 }
55943 _ACEOF
55944 if ac_fn_cxx_try_link "$LINENO"; then :
55945   ac_cv_lib_dnet_dnet_ntoa=yes
55946 else
55947   ac_cv_lib_dnet_dnet_ntoa=no
55948 fi
55949 rm -f core conftest.err conftest.$ac_objext \
55950     conftest$ac_exeext conftest.$ac_ext
55951 LIBS=$ac_check_lib_save_LIBS
55952 fi
55953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
55954 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
55955 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
55956   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
55957 fi
55958 
55959     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
55960       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
55961 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
55962 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
55963   $as_echo_n "(cached) " >&6
55964 else
55965   ac_check_lib_save_LIBS=$LIBS
55966 LIBS="-ldnet_stub  $LIBS"
55967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55968 /* end confdefs.h.  */
55969 
55970 /* Override any GCC internal prototype to avoid an error.
55971    Use char because int might match the return type of a GCC
55972    builtin and then its argument prototype would still apply.  */
55973 #ifdef __cplusplus
55974 extern "C"
55975 #endif
55976 char dnet_ntoa ();
55977 int
55978 main ()
55979 {
55980 return dnet_ntoa ();
55981   ;
55982   return 0;
55983 }
55984 _ACEOF
55985 if ac_fn_cxx_try_link "$LINENO"; then :
55986   ac_cv_lib_dnet_stub_dnet_ntoa=yes
55987 else
55988   ac_cv_lib_dnet_stub_dnet_ntoa=no
55989 fi
55990 rm -f core conftest.err conftest.$ac_objext \
55991     conftest$ac_exeext conftest.$ac_ext
55992 LIBS=$ac_check_lib_save_LIBS
55993 fi
55994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
55995 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
55996 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
55997   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
55998 fi
55999 
56000     fi
56001 fi
56002 rm -f core conftest.err conftest.$ac_objext \
56003     conftest$ac_exeext conftest.$ac_ext
56004     LIBS="$ac_xsave_LIBS"
56005 
56006     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56007     # to get the SysV transport functions.
56008     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56009     # needs -lnsl.
56010     # The nsl library prevents programs from opening the X display
56011     # on Irix 5.2, according to T.E. Dickey.
56012     # The functions gethostbyname, getservbyname, and inet_addr are
56013     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56014     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56015 if test "x$ac_cv_func_gethostbyname" = xyes; then :
56016 
56017 fi
56018 
56019     if test $ac_cv_func_gethostbyname = no; then
56020       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56021 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56022 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56023   $as_echo_n "(cached) " >&6
56024 else
56025   ac_check_lib_save_LIBS=$LIBS
56026 LIBS="-lnsl  $LIBS"
56027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56028 /* end confdefs.h.  */
56029 
56030 /* Override any GCC internal prototype to avoid an error.
56031    Use char because int might match the return type of a GCC
56032    builtin and then its argument prototype would still apply.  */
56033 #ifdef __cplusplus
56034 extern "C"
56035 #endif
56036 char gethostbyname ();
56037 int
56038 main ()
56039 {
56040 return gethostbyname ();
56041   ;
56042   return 0;
56043 }
56044 _ACEOF
56045 if ac_fn_cxx_try_link "$LINENO"; then :
56046   ac_cv_lib_nsl_gethostbyname=yes
56047 else
56048   ac_cv_lib_nsl_gethostbyname=no
56049 fi
56050 rm -f core conftest.err conftest.$ac_objext \
56051     conftest$ac_exeext conftest.$ac_ext
56052 LIBS=$ac_check_lib_save_LIBS
56053 fi
56054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56055 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56056 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56057   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56058 fi
56059 
56060       if test $ac_cv_lib_nsl_gethostbyname = no; then
56061         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56062 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56063 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56064   $as_echo_n "(cached) " >&6
56065 else
56066   ac_check_lib_save_LIBS=$LIBS
56067 LIBS="-lbsd  $LIBS"
56068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56069 /* end confdefs.h.  */
56070 
56071 /* Override any GCC internal prototype to avoid an error.
56072    Use char because int might match the return type of a GCC
56073    builtin and then its argument prototype would still apply.  */
56074 #ifdef __cplusplus
56075 extern "C"
56076 #endif
56077 char gethostbyname ();
56078 int
56079 main ()
56080 {
56081 return gethostbyname ();
56082   ;
56083   return 0;
56084 }
56085 _ACEOF
56086 if ac_fn_cxx_try_link "$LINENO"; then :
56087   ac_cv_lib_bsd_gethostbyname=yes
56088 else
56089   ac_cv_lib_bsd_gethostbyname=no
56090 fi
56091 rm -f core conftest.err conftest.$ac_objext \
56092     conftest$ac_exeext conftest.$ac_ext
56093 LIBS=$ac_check_lib_save_LIBS
56094 fi
56095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56096 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56097 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56098   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56099 fi
56100 
56101       fi
56102     fi
56103 
56104     # lieder@skyler.mavd.honeywell.com says without -lsocket,
56105     # socket/setsockopt and other routines are undefined under SCO ODT
56106     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56107     # on later versions), says Simon Leinen: it contains gethostby*
56108     # variants that don't use the name server (or something).  -lsocket
56109     # must be given before -lnsl if both are needed.  We assume that
56110     # if connect needs -lnsl, so does gethostbyname.
56111     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56112 if test "x$ac_cv_func_connect" = xyes; then :
56113 
56114 fi
56115 
56116     if test $ac_cv_func_connect = no; then
56117       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56118 $as_echo_n "checking for connect in -lsocket... " >&6; }
56119 if ${ac_cv_lib_socket_connect+:} false; then :
56120   $as_echo_n "(cached) " >&6
56121 else
56122   ac_check_lib_save_LIBS=$LIBS
56123 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56125 /* end confdefs.h.  */
56126 
56127 /* Override any GCC internal prototype to avoid an error.
56128    Use char because int might match the return type of a GCC
56129    builtin and then its argument prototype would still apply.  */
56130 #ifdef __cplusplus
56131 extern "C"
56132 #endif
56133 char connect ();
56134 int
56135 main ()
56136 {
56137 return connect ();
56138   ;
56139   return 0;
56140 }
56141 _ACEOF
56142 if ac_fn_cxx_try_link "$LINENO"; then :
56143   ac_cv_lib_socket_connect=yes
56144 else
56145   ac_cv_lib_socket_connect=no
56146 fi
56147 rm -f core conftest.err conftest.$ac_objext \
56148     conftest$ac_exeext conftest.$ac_ext
56149 LIBS=$ac_check_lib_save_LIBS
56150 fi
56151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56152 $as_echo "$ac_cv_lib_socket_connect" >&6; }
56153 if test "x$ac_cv_lib_socket_connect" = xyes; then :
56154   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56155 fi
56156 
56157     fi
56158 
56159     # Guillermo Gomez says -lposix is necessary on A/UX.
56160     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56161 if test "x$ac_cv_func_remove" = xyes; then :
56162 
56163 fi
56164 
56165     if test $ac_cv_func_remove = no; then
56166       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56167 $as_echo_n "checking for remove in -lposix... " >&6; }
56168 if ${ac_cv_lib_posix_remove+:} false; then :
56169   $as_echo_n "(cached) " >&6
56170 else
56171   ac_check_lib_save_LIBS=$LIBS
56172 LIBS="-lposix  $LIBS"
56173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56174 /* end confdefs.h.  */
56175 
56176 /* Override any GCC internal prototype to avoid an error.
56177    Use char because int might match the return type of a GCC
56178    builtin and then its argument prototype would still apply.  */
56179 #ifdef __cplusplus
56180 extern "C"
56181 #endif
56182 char remove ();
56183 int
56184 main ()
56185 {
56186 return remove ();
56187   ;
56188   return 0;
56189 }
56190 _ACEOF
56191 if ac_fn_cxx_try_link "$LINENO"; then :
56192   ac_cv_lib_posix_remove=yes
56193 else
56194   ac_cv_lib_posix_remove=no
56195 fi
56196 rm -f core conftest.err conftest.$ac_objext \
56197     conftest$ac_exeext conftest.$ac_ext
56198 LIBS=$ac_check_lib_save_LIBS
56199 fi
56200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56201 $as_echo "$ac_cv_lib_posix_remove" >&6; }
56202 if test "x$ac_cv_lib_posix_remove" = xyes; then :
56203   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56204 fi
56205 
56206     fi
56207 
56208     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56209     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56210 if test "x$ac_cv_func_shmat" = xyes; then :
56211 
56212 fi
56213 
56214     if test $ac_cv_func_shmat = no; then
56215       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56216 $as_echo_n "checking for shmat in -lipc... " >&6; }
56217 if ${ac_cv_lib_ipc_shmat+:} false; then :
56218   $as_echo_n "(cached) " >&6
56219 else
56220   ac_check_lib_save_LIBS=$LIBS
56221 LIBS="-lipc  $LIBS"
56222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56223 /* end confdefs.h.  */
56224 
56225 /* Override any GCC internal prototype to avoid an error.
56226    Use char because int might match the return type of a GCC
56227    builtin and then its argument prototype would still apply.  */
56228 #ifdef __cplusplus
56229 extern "C"
56230 #endif
56231 char shmat ();
56232 int
56233 main ()
56234 {
56235 return shmat ();
56236   ;
56237   return 0;
56238 }
56239 _ACEOF
56240 if ac_fn_cxx_try_link "$LINENO"; then :
56241   ac_cv_lib_ipc_shmat=yes
56242 else
56243   ac_cv_lib_ipc_shmat=no
56244 fi
56245 rm -f core conftest.err conftest.$ac_objext \
56246     conftest$ac_exeext conftest.$ac_ext
56247 LIBS=$ac_check_lib_save_LIBS
56248 fi
56249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56250 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56251 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56252   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56253 fi
56254 
56255     fi
56256   fi
56257 
56258   # Check for libraries that X11R6 Xt/Xaw programs need.
56259   ac_save_LDFLAGS=$LDFLAGS
56260   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56261   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56262   # check for ICE first), but we must link in the order -lSM -lICE or
56263   # we get undefined symbols.  So assume we have SM if we have ICE.
56264   # These have to be linked with before -lX11, unlike the other
56265   # libraries we check for below, so use a different variable.
56266   # John Interrante, Karl Berry
56267   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56268 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56269 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56270   $as_echo_n "(cached) " >&6
56271 else
56272   ac_check_lib_save_LIBS=$LIBS
56273 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56275 /* end confdefs.h.  */
56276 
56277 /* Override any GCC internal prototype to avoid an error.
56278    Use char because int might match the return type of a GCC
56279    builtin and then its argument prototype would still apply.  */
56280 #ifdef __cplusplus
56281 extern "C"
56282 #endif
56283 char IceConnectionNumber ();
56284 int
56285 main ()
56286 {
56287 return IceConnectionNumber ();
56288   ;
56289   return 0;
56290 }
56291 _ACEOF
56292 if ac_fn_cxx_try_link "$LINENO"; then :
56293   ac_cv_lib_ICE_IceConnectionNumber=yes
56294 else
56295   ac_cv_lib_ICE_IceConnectionNumber=no
56296 fi
56297 rm -f core conftest.err conftest.$ac_objext \
56298     conftest$ac_exeext conftest.$ac_ext
56299 LIBS=$ac_check_lib_save_LIBS
56300 fi
56301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56302 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56303 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56304   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56305 fi
56306 
56307   LDFLAGS=$ac_save_LDFLAGS
56308 
56309 fi
56310 
56311 
56312     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56313     # this doesn't make sense so we remove it.
56314     if test "x$COMPILE_TYPE" = xcross; then
56315       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56316     fi
56317 
56318     if test "x$no_x" = xyes; then
56319 
56320   # Print a helpful message on how to acquire the necessary build dependency.
56321   # x11 is the help tag: freetype, cups, alsa etc
56322   MISSING_DEPENDENCY=x11
56323 
56324   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56325     cygwin_help $MISSING_DEPENDENCY
56326   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56327     msys_help $MISSING_DEPENDENCY
56328   else
56329     PKGHANDLER_COMMAND=
56330 
56331     case $PKGHANDLER in
56332       apt-get)
56333         apt_help     $MISSING_DEPENDENCY ;;
56334       yum)
56335         yum_help     $MISSING_DEPENDENCY ;;
56336       port)
56337         port_help    $MISSING_DEPENDENCY ;;
56338       pkgutil)
56339         pkgutil_help $MISSING_DEPENDENCY ;;
56340       pkgadd)
56341         pkgadd_help  $MISSING_DEPENDENCY ;;
56342     esac
56343 
56344     if test "x$PKGHANDLER_COMMAND" != x; then
56345       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56346     fi
56347   fi
56348 
56349       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56350     fi
56351 
56352     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56353       OPENWIN_HOME="/usr/openwin"
56354       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56355       X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56356           -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56357           -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56358           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56359     fi
56360 
56361     ac_ext=c
56362 ac_cpp='$CPP $CPPFLAGS'
56363 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56364 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56365 ac_compiler_gnu=$ac_cv_c_compiler_gnu
56366 
56367     OLD_CFLAGS="$CFLAGS"
56368     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56369 
56370     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56371     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56372 do :
56373   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56374 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56375           # include <X11/Xlib.h>
56376           # include <X11/Xutil.h>
56377 
56378 
56379 "
56380 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56381   cat >>confdefs.h <<_ACEOF
56382 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56383 _ACEOF
56384  X11_HEADERS_OK=yes
56385 else
56386   X11_HEADERS_OK=no; break
56387 fi
56388 
56389 done
56390 
56391 
56392     if test "x$X11_HEADERS_OK" = xno; then
56393 
56394   # Print a helpful message on how to acquire the necessary build dependency.
56395   # x11 is the help tag: freetype, cups, alsa etc
56396   MISSING_DEPENDENCY=x11
56397 
56398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56399     cygwin_help $MISSING_DEPENDENCY
56400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56401     msys_help $MISSING_DEPENDENCY
56402   else
56403     PKGHANDLER_COMMAND=
56404 
56405     case $PKGHANDLER in
56406       apt-get)
56407         apt_help     $MISSING_DEPENDENCY ;;
56408       yum)
56409         yum_help     $MISSING_DEPENDENCY ;;
56410       port)
56411         port_help    $MISSING_DEPENDENCY ;;
56412       pkgutil)
56413         pkgutil_help $MISSING_DEPENDENCY ;;
56414       pkgadd)
56415         pkgadd_help  $MISSING_DEPENDENCY ;;
56416     esac
56417 
56418     if test "x$PKGHANDLER_COMMAND" != x; then
56419       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56420     fi
56421   fi
56422 
56423       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56424     fi
56425 
56426     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56427     # defined in libawt_xawt.
56428     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56429 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56430     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56431 /* end confdefs.h.  */
56432 #include <X11/extensions/Xrender.h>
56433 int
56434 main ()
56435 {
56436 XLinearGradient x;
56437   ;
56438   return 0;
56439 }
56440 _ACEOF
56441 if ac_fn_c_try_compile "$LINENO"; then :
56442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56443 $as_echo "yes" >&6; }
56444 else
56445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56446 $as_echo "no" >&6; }
56447          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56448 fi
56449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56450 
56451     CFLAGS="$OLD_CFLAGS"
56452     ac_ext=cpp
56453 ac_cpp='$CXXCPP $CPPFLAGS'
56454 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56455 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56456 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56457 
56458   fi # NEEDS_LIB_X11
56459 
56460 
56461 
56462 
56463 
56464 
56465 # Check whether --with-cups was given.
56466 if test "${with_cups+set}" = set; then :
56467   withval=$with_cups;
56468 fi
56469 
56470 
56471 # Check whether --with-cups-include was given.
56472 if test "${with_cups_include+set}" = set; then :
56473   withval=$with_cups_include;
56474 fi
56475 
56476 
56477   if test "x$NEEDS_LIB_CUPS" = xfalse; then
56478     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56479         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56480       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56481 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56482     fi
56483     CUPS_CFLAGS=
56484   else
56485     CUPS_FOUND=no
56486 
56487     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56488       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56489     fi
56490 
56491     if test "x${with_cups}" != x; then
56492       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56493 $as_echo_n "checking for cups headers... " >&6; }
56494       if test -s "${with_cups}/include/cups/cups.h"; then
56495         CUPS_CFLAGS="-I${with_cups}/include"
56496         CUPS_FOUND=yes
56497         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56498 $as_echo "$CUPS_FOUND" >&6; }
56499       else
56500         as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56501       fi
56502     fi
56503     if test "x${with_cups_include}" != x; then
56504       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56505 $as_echo_n "checking for cups headers... " >&6; }
56506       if test -s "${with_cups_include}/cups/cups.h"; then
56507         CUPS_CFLAGS="-I${with_cups_include}"
56508         CUPS_FOUND=yes
56509         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56510 $as_echo "$CUPS_FOUND" >&6; }
56511       else
56512         as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56513       fi
56514     fi
56515     if test "x$CUPS_FOUND" = xno; then
56516       # Are the cups headers installed in the default /usr/include location?
56517       for ac_header in cups/cups.h cups/ppd.h
56518 do :
56519   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56520 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56521 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56522   cat >>confdefs.h <<_ACEOF
56523 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56524 _ACEOF
56525 
56526           CUPS_FOUND=yes
56527           CUPS_CFLAGS=
56528           DEFAULT_CUPS=yes
56529 
56530 fi
56531 
56532 done
56533 
56534     fi
56535     if test "x$CUPS_FOUND" = xno; then
56536       # Getting nervous now? Lets poke around for standard Solaris third-party
56537       # package installation locations.
56538       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56539 $as_echo_n "checking for cups headers... " >&6; }
56540       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
56541         # An SFW package seems to be installed!
56542         CUPS_FOUND=yes
56543         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
56544       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
56545         # A CSW package seems to be installed!
56546         CUPS_FOUND=yes
56547         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
56548       fi
56549       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56550 $as_echo "$CUPS_FOUND" >&6; }
56551     fi
56552     if test "x$CUPS_FOUND" = xno; then
56553 
56554   # Print a helpful message on how to acquire the necessary build dependency.
56555   # cups is the help tag: freetype, cups, alsa etc
56556   MISSING_DEPENDENCY=cups
56557 
56558   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56559     cygwin_help $MISSING_DEPENDENCY
56560   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56561     msys_help $MISSING_DEPENDENCY
56562   else
56563     PKGHANDLER_COMMAND=
56564 
56565     case $PKGHANDLER in
56566       apt-get)
56567         apt_help     $MISSING_DEPENDENCY ;;
56568       yum)
56569         yum_help     $MISSING_DEPENDENCY ;;
56570       port)
56571         port_help    $MISSING_DEPENDENCY ;;
56572       pkgutil)
56573         pkgutil_help $MISSING_DEPENDENCY ;;
56574       pkgadd)
56575         pkgadd_help  $MISSING_DEPENDENCY ;;
56576     esac
56577 
56578     if test "x$PKGHANDLER_COMMAND" != x; then
56579       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56580     fi
56581   fi
56582 
56583       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56584     fi
56585   fi
56586 
56587 
56588 
56589 
56590 
56591 # Check whether --with-freetype was given.
56592 if test "${with_freetype+set}" = set; then :
56593   withval=$with_freetype;
56594 fi
56595 
56596 
56597 # Check whether --with-freetype-include was given.
56598 if test "${with_freetype_include+set}" = set; then :
56599   withval=$with_freetype_include;
56600 fi
56601 
56602 
56603 # Check whether --with-freetype-lib was given.
56604 if test "${with_freetype_lib+set}" = set; then :
56605   withval=$with_freetype_lib;
56606 fi
56607 
56608 
56609 # Check whether --with-freetype-src was given.
56610 if test "${with_freetype_src+set}" = set; then :
56611   withval=$with_freetype_src;
56612 fi
56613 
56614   # Check whether --enable-freetype-bundling was given.
56615 if test "${enable_freetype_bundling+set}" = set; then :
56616   enableval=$enable_freetype_bundling;
56617 fi
56618 
56619 
56620   # Need to specify explicitly since it needs to be overridden on some versions of macosx
56621   FREETYPE_BASE_NAME=freetype
56622   FREETYPE_CFLAGS=
56623   FREETYPE_LIBS=
56624   FREETYPE_BUNDLE_LIB_PATH=
56625 
56626   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56627     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56628         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56629         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56630         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56631       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56632 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56633     fi
56634     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56635       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56636 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56637     fi
56638   else
56639     # freetype is needed to build; go get it!
56640 
56641     BUNDLE_FREETYPE="$enable_freetype_bundling"
56642 
56643     if  test "x$with_freetype_src" != x; then
56644       if test "x$OPENJDK_TARGET_OS" = xwindows; then
56645         # Try to build freetype if --with-freetype-src was given on Windows
56646 
56647   FREETYPE_SRC_PATH="$with_freetype_src"
56648   BUILD_FREETYPE=yes
56649 
56650   # Check if the freetype sources are acessible..
56651   if ! test -d $FREETYPE_SRC_PATH; then
56652     { $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
56653 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56654     BUILD_FREETYPE=no
56655   fi
56656   # ..and contain a vc2010 project file
56657   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56658   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56659     { $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
56660 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56661     BUILD_FREETYPE=no
56662   fi
56663   # Now check if configure found a version of 'msbuild.exe'
56664   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56665     { $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
56666 $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;}
56667     BUILD_FREETYPE=no
56668   fi
56669 
56670   # Ready to go..
56671   if test "x$BUILD_FREETYPE" = xyes; then
56672     # msbuild requires trailing slashes for output directories
56673     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56674     freetype_lib_path_unix="$freetype_lib_path"
56675     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56676 
56677   unix_path="$vcxproj_path"
56678   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56679     windows_path=`$CYGPATH -m "$unix_path"`
56680     vcxproj_path="$windows_path"
56681   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56682     windows_path=`cmd //c echo $unix_path`
56683     vcxproj_path="$windows_path"
56684   fi
56685 
56686 
56687   unix_path="$freetype_lib_path"
56688   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56689     windows_path=`$CYGPATH -m "$unix_path"`
56690     freetype_lib_path="$windows_path"
56691   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56692     windows_path=`cmd //c echo $unix_path`
56693     freetype_lib_path="$windows_path"
56694   fi
56695 
56696 
56697   unix_path="$freetype_obj_path"
56698   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56699     windows_path=`$CYGPATH -m "$unix_path"`
56700     freetype_obj_path="$windows_path"
56701   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56702     windows_path=`cmd //c echo $unix_path`
56703     freetype_obj_path="$windows_path"
56704   fi
56705 
56706     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56707       freetype_platform=x64
56708     else
56709       freetype_platform=win32
56710     fi
56711 
56712     # The original freetype project file is for VS 2010 (i.e. 'v100'),
56713     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56714     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56715     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56716     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56717 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56718 
56719     # First we try to build the freetype.dll
56720     $ECHO -e "@echo off\n"\
56721         "$MSBUILD $vcxproj_path "\
56722         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56723         "/p:Configuration=\"Release Multithreaded\" "\
56724         "/p:Platform=$freetype_platform "\
56725         "/p:ConfigurationType=DynamicLibrary "\
56726         "/p:TargetName=freetype "\
56727         "/p:OutDir=\"$freetype_lib_path\" "\
56728         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56729     cmd /c freetype.bat
56730 
56731     if test -s "$freetype_lib_path_unix/freetype.dll"; then
56732       # If that succeeds we also build freetype.lib
56733       $ECHO -e "@echo off\n"\
56734           "$MSBUILD $vcxproj_path "\
56735           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56736           "/p:Configuration=\"Release Multithreaded\" "\
56737           "/p:Platform=$freetype_platform "\
56738           "/p:ConfigurationType=StaticLibrary "\
56739           "/p:TargetName=freetype "\
56740           "/p:OutDir=\"$freetype_lib_path\" "\
56741           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56742       cmd /c freetype.bat
56743 
56744       if test -s "$freetype_lib_path_unix/freetype.lib"; then
56745         # Once we build both, lib and dll, set freetype lib and include path appropriately
56746         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56747         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56748         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56749 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56750       else
56751         BUILD_FREETYPE=no
56752       fi
56753     else
56754       BUILD_FREETYPE=no
56755     fi
56756   fi
56757 
56758         if test "x$BUILD_FREETYPE" = xyes; then
56759           # Okay, we built it. Check that it works.
56760 
56761   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56762   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56763   METHOD="--with-freetype-src"
56764 
56765   # Let's start with an optimistic view of the world :-)
56766   FOUND_FREETYPE=yes
56767 
56768   # First look for the canonical freetype main include file ft2build.h.
56769   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56770     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56771     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56772     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56773       # Fail.
56774       FOUND_FREETYPE=no
56775     fi
56776   fi
56777 
56778   if test "x$FOUND_FREETYPE" = xyes; then
56779     # Include file found, let's continue the sanity check.
56780     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56781 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56782 
56783     # Reset to default value
56784     FREETYPE_BASE_NAME=freetype
56785     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56786     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56787       if test "x$OPENJDK_TARGET_OS" = xmacosx \
56788           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56789         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56790         # for the .6 version explicitly.
56791         FREETYPE_BASE_NAME=freetype.6
56792         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56793         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56794 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56795       else
56796         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56797 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56798         FOUND_FREETYPE=no
56799       fi
56800     else
56801       if test "x$OPENJDK_TARGET_OS" = xwindows; then
56802         # On Windows, we will need both .lib and .dll file.
56803         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56804           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56805 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56806           FOUND_FREETYPE=no
56807         fi
56808       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56809           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56810         # Found lib in isa dir, use that instead.
56811         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56812         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56813 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56814       fi
56815     fi
56816   fi
56817 
56818   if test "x$FOUND_FREETYPE" = xyes; then
56819 
56820   # Only process if variable expands to non-empty
56821 
56822   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56823     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56824 
56825   # Input might be given as Windows format, start by converting to
56826   # unix format.
56827   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56828   new_path=`$CYGPATH -u "$path"`
56829 
56830   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56831   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56832   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56833   # "foo.exe" is OK but "foo" is an error.
56834   #
56835   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56836   # It is also a way to make sure we got the proper file name for the real test later on.
56837   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56838   if test "x$test_shortpath" = x; then
56839     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56840 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56841     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56842   fi
56843 
56844   # Call helper function which possibly converts this using DOS-style short mode.
56845   # If so, the updated path is stored in $new_path.
56846 
56847   input_path="$new_path"
56848   # Check if we need to convert this using DOS-style short mode. If the path
56849   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56850   # take no chances and rewrite it.
56851   # Note: m4 eats our [], so we need to use [ and ] instead.
56852   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56853   if test "x$has_forbidden_chars" != x; then
56854     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56855     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56856     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56857     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56858       # Going to short mode and back again did indeed matter. Since short mode is
56859       # case insensitive, let's make it lowercase to improve readability.
56860       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56861       # Now convert it back to Unix-style (cygpath)
56862       input_path=`$CYGPATH -u "$shortmode_path"`
56863       new_path="$input_path"
56864     fi
56865   fi
56866 
56867   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56868   if test "x$test_cygdrive_prefix" = x; then
56869     # As a simple fix, exclude /usr/bin since it's not a real path.
56870     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56871       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56872       # a path prefixed by /cygdrive for fixpath to work.
56873       new_path="$CYGWIN_ROOT_PATH$input_path"
56874     fi
56875   fi
56876 
56877 
56878   if test "x$path" != "x$new_path"; then
56879     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56880     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56881 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56882   fi
56883 
56884     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56885 
56886   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56887   has_colon=`$ECHO $path | $GREP ^.:`
56888   new_path="$path"
56889   if test "x$has_colon" = x; then
56890     # Not in mixed or Windows style, start by that.
56891     new_path=`cmd //c echo $path`
56892   fi
56893 
56894 
56895   input_path="$new_path"
56896   # Check if we need to convert this using DOS-style short mode. If the path
56897   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56898   # take no chances and rewrite it.
56899   # Note: m4 eats our [], so we need to use [ and ] instead.
56900   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56901   if test "x$has_forbidden_chars" != x; then
56902     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56903     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56904   fi
56905 
56906 
56907   windows_path="$new_path"
56908   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56909     unix_path=`$CYGPATH -u "$windows_path"`
56910     new_path="$unix_path"
56911   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56912     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56913     new_path="$unix_path"
56914   fi
56915 
56916   if test "x$path" != "x$new_path"; then
56917     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56918     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56919 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56920   fi
56921 
56922   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56923   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56924 
56925     else
56926       # We're on a unix platform. Hooray! :)
56927       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56928       has_space=`$ECHO "$path" | $GREP " "`
56929       if test "x$has_space" != x; then
56930         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56931 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56932         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56933       fi
56934 
56935       # Use eval to expand a potential ~
56936       eval path="$path"
56937       if test ! -f "$path" && test ! -d "$path"; then
56938         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56939       fi
56940 
56941       if test -d "$path"; then
56942         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56943       else
56944         dir="`$DIRNAME "$path"`"
56945         base="`$BASENAME "$path"`"
56946         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56947       fi
56948     fi
56949   fi
56950 
56951 
56952   # Only process if variable expands to non-empty
56953 
56954   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56955     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56956 
56957   # Input might be given as Windows format, start by converting to
56958   # unix format.
56959   path="$POTENTIAL_FREETYPE_LIB_PATH"
56960   new_path=`$CYGPATH -u "$path"`
56961 
56962   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56963   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56964   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56965   # "foo.exe" is OK but "foo" is an error.
56966   #
56967   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56968   # It is also a way to make sure we got the proper file name for the real test later on.
56969   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56970   if test "x$test_shortpath" = x; then
56971     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56972 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56973     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56974   fi
56975 
56976   # Call helper function which possibly converts this using DOS-style short mode.
56977   # If so, the updated path is stored in $new_path.
56978 
56979   input_path="$new_path"
56980   # Check if we need to convert this using DOS-style short mode. If the path
56981   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56982   # take no chances and rewrite it.
56983   # Note: m4 eats our [], so we need to use [ and ] instead.
56984   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56985   if test "x$has_forbidden_chars" != x; then
56986     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56987     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56988     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56989     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56990       # Going to short mode and back again did indeed matter. Since short mode is
56991       # case insensitive, let's make it lowercase to improve readability.
56992       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56993       # Now convert it back to Unix-style (cygpath)
56994       input_path=`$CYGPATH -u "$shortmode_path"`
56995       new_path="$input_path"
56996     fi
56997   fi
56998 
56999   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57000   if test "x$test_cygdrive_prefix" = x; then
57001     # As a simple fix, exclude /usr/bin since it's not a real path.
57002     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57003       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57004       # a path prefixed by /cygdrive for fixpath to work.
57005       new_path="$CYGWIN_ROOT_PATH$input_path"
57006     fi
57007   fi
57008 
57009 
57010   if test "x$path" != "x$new_path"; then
57011     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57012     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57013 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57014   fi
57015 
57016     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57017 
57018   path="$POTENTIAL_FREETYPE_LIB_PATH"
57019   has_colon=`$ECHO $path | $GREP ^.:`
57020   new_path="$path"
57021   if test "x$has_colon" = x; then
57022     # Not in mixed or Windows style, start by that.
57023     new_path=`cmd //c echo $path`
57024   fi
57025 
57026 
57027   input_path="$new_path"
57028   # Check if we need to convert this using DOS-style short mode. If the path
57029   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57030   # take no chances and rewrite it.
57031   # Note: m4 eats our [], so we need to use [ and ] instead.
57032   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57033   if test "x$has_forbidden_chars" != x; then
57034     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57035     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57036   fi
57037 
57038 
57039   windows_path="$new_path"
57040   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57041     unix_path=`$CYGPATH -u "$windows_path"`
57042     new_path="$unix_path"
57043   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57044     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57045     new_path="$unix_path"
57046   fi
57047 
57048   if test "x$path" != "x$new_path"; then
57049     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57050     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57051 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57052   fi
57053 
57054   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57055   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57056 
57057     else
57058       # We're on a unix platform. Hooray! :)
57059       path="$POTENTIAL_FREETYPE_LIB_PATH"
57060       has_space=`$ECHO "$path" | $GREP " "`
57061       if test "x$has_space" != x; then
57062         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57063 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57064         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57065       fi
57066 
57067       # Use eval to expand a potential ~
57068       eval path="$path"
57069       if test ! -f "$path" && test ! -d "$path"; then
57070         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57071       fi
57072 
57073       if test -d "$path"; then
57074         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57075       else
57076         dir="`$DIRNAME "$path"`"
57077         base="`$BASENAME "$path"`"
57078         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57079       fi
57080     fi
57081   fi
57082 
57083 
57084     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57085     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57086 $as_echo_n "checking for freetype includes... " >&6; }
57087     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57088 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57089     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57090     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57091 $as_echo_n "checking for freetype libraries... " >&6; }
57092     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57093 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57094   fi
57095 
57096           if test "x$FOUND_FREETYPE" != xyes; then
57097             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57098           fi
57099         else
57100           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57101 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57102           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57103         fi
57104       else
57105         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57106 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57107       fi
57108     fi
57109 
57110     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57111       # User has specified settings
57112 
57113       if test "x$BUNDLE_FREETYPE" = x; then
57114         # If not specified, default is to bundle freetype
57115         BUNDLE_FREETYPE=yes
57116       fi
57117 
57118       if test "x$with_freetype" != x; then
57119         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57120         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57121       fi
57122 
57123       # Allow --with-freetype-lib and --with-freetype-include to override
57124       if test "x$with_freetype_include" != x; then
57125         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57126       fi
57127       if test "x$with_freetype_lib" != x; then
57128         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57129       fi
57130 
57131       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57132         # Okay, we got it. Check that it works.
57133 
57134   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57135   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57136   METHOD="--with-freetype"
57137 
57138   # Let's start with an optimistic view of the world :-)
57139   FOUND_FREETYPE=yes
57140 
57141   # First look for the canonical freetype main include file ft2build.h.
57142   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57143     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57144     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57145     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57146       # Fail.
57147       FOUND_FREETYPE=no
57148     fi
57149   fi
57150 
57151   if test "x$FOUND_FREETYPE" = xyes; then
57152     # Include file found, let's continue the sanity check.
57153     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57154 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57155 
57156     # Reset to default value
57157     FREETYPE_BASE_NAME=freetype
57158     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57159     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57160       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57161           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57162         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57163         # for the .6 version explicitly.
57164         FREETYPE_BASE_NAME=freetype.6
57165         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57166         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57167 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57168       else
57169         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57170 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57171         FOUND_FREETYPE=no
57172       fi
57173     else
57174       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57175         # On Windows, we will need both .lib and .dll file.
57176         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57177           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57178 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57179           FOUND_FREETYPE=no
57180         fi
57181       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57182           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57183         # Found lib in isa dir, use that instead.
57184         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57185         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57186 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57187       fi
57188     fi
57189   fi
57190 
57191   if test "x$FOUND_FREETYPE" = xyes; then
57192 
57193   # Only process if variable expands to non-empty
57194 
57195   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57196     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57197 
57198   # Input might be given as Windows format, start by converting to
57199   # unix format.
57200   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57201   new_path=`$CYGPATH -u "$path"`
57202 
57203   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57204   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57205   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57206   # "foo.exe" is OK but "foo" is an error.
57207   #
57208   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57209   # It is also a way to make sure we got the proper file name for the real test later on.
57210   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57211   if test "x$test_shortpath" = x; then
57212     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57213 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57214     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57215   fi
57216 
57217   # Call helper function which possibly converts this using DOS-style short mode.
57218   # If so, the updated path is stored in $new_path.
57219 
57220   input_path="$new_path"
57221   # Check if we need to convert this using DOS-style short mode. If the path
57222   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57223   # take no chances and rewrite it.
57224   # Note: m4 eats our [], so we need to use [ and ] instead.
57225   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57226   if test "x$has_forbidden_chars" != x; then
57227     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57228     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57229     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57230     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57231       # Going to short mode and back again did indeed matter. Since short mode is
57232       # case insensitive, let's make it lowercase to improve readability.
57233       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57234       # Now convert it back to Unix-style (cygpath)
57235       input_path=`$CYGPATH -u "$shortmode_path"`
57236       new_path="$input_path"
57237     fi
57238   fi
57239 
57240   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57241   if test "x$test_cygdrive_prefix" = x; then
57242     # As a simple fix, exclude /usr/bin since it's not a real path.
57243     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57244       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57245       # a path prefixed by /cygdrive for fixpath to work.
57246       new_path="$CYGWIN_ROOT_PATH$input_path"
57247     fi
57248   fi
57249 
57250 
57251   if test "x$path" != "x$new_path"; then
57252     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57253     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57254 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57255   fi
57256 
57257     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57258 
57259   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57260   has_colon=`$ECHO $path | $GREP ^.:`
57261   new_path="$path"
57262   if test "x$has_colon" = x; then
57263     # Not in mixed or Windows style, start by that.
57264     new_path=`cmd //c echo $path`
57265   fi
57266 
57267 
57268   input_path="$new_path"
57269   # Check if we need to convert this using DOS-style short mode. If the path
57270   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57271   # take no chances and rewrite it.
57272   # Note: m4 eats our [], so we need to use [ and ] instead.
57273   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57274   if test "x$has_forbidden_chars" != x; then
57275     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57276     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57277   fi
57278 
57279 
57280   windows_path="$new_path"
57281   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57282     unix_path=`$CYGPATH -u "$windows_path"`
57283     new_path="$unix_path"
57284   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57285     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57286     new_path="$unix_path"
57287   fi
57288 
57289   if test "x$path" != "x$new_path"; then
57290     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57291     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57292 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57293   fi
57294 
57295   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57296   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57297 
57298     else
57299       # We're on a unix platform. Hooray! :)
57300       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57301       has_space=`$ECHO "$path" | $GREP " "`
57302       if test "x$has_space" != x; then
57303         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57304 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57305         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57306       fi
57307 
57308       # Use eval to expand a potential ~
57309       eval path="$path"
57310       if test ! -f "$path" && test ! -d "$path"; then
57311         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57312       fi
57313 
57314       if test -d "$path"; then
57315         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57316       else
57317         dir="`$DIRNAME "$path"`"
57318         base="`$BASENAME "$path"`"
57319         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57320       fi
57321     fi
57322   fi
57323 
57324 
57325   # Only process if variable expands to non-empty
57326 
57327   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57328     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57329 
57330   # Input might be given as Windows format, start by converting to
57331   # unix format.
57332   path="$POTENTIAL_FREETYPE_LIB_PATH"
57333   new_path=`$CYGPATH -u "$path"`
57334 
57335   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57336   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57337   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57338   # "foo.exe" is OK but "foo" is an error.
57339   #
57340   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57341   # It is also a way to make sure we got the proper file name for the real test later on.
57342   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57343   if test "x$test_shortpath" = x; then
57344     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57345 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57346     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57347   fi
57348 
57349   # Call helper function which possibly converts this using DOS-style short mode.
57350   # If so, the updated path is stored in $new_path.
57351 
57352   input_path="$new_path"
57353   # Check if we need to convert this using DOS-style short mode. If the path
57354   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57355   # take no chances and rewrite it.
57356   # Note: m4 eats our [], so we need to use [ and ] instead.
57357   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57358   if test "x$has_forbidden_chars" != x; then
57359     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57360     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57361     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57362     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57363       # Going to short mode and back again did indeed matter. Since short mode is
57364       # case insensitive, let's make it lowercase to improve readability.
57365       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57366       # Now convert it back to Unix-style (cygpath)
57367       input_path=`$CYGPATH -u "$shortmode_path"`
57368       new_path="$input_path"
57369     fi
57370   fi
57371 
57372   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57373   if test "x$test_cygdrive_prefix" = x; then
57374     # As a simple fix, exclude /usr/bin since it's not a real path.
57375     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57376       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57377       # a path prefixed by /cygdrive for fixpath to work.
57378       new_path="$CYGWIN_ROOT_PATH$input_path"
57379     fi
57380   fi
57381 
57382 
57383   if test "x$path" != "x$new_path"; then
57384     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57385     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57386 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57387   fi
57388 
57389     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57390 
57391   path="$POTENTIAL_FREETYPE_LIB_PATH"
57392   has_colon=`$ECHO $path | $GREP ^.:`
57393   new_path="$path"
57394   if test "x$has_colon" = x; then
57395     # Not in mixed or Windows style, start by that.
57396     new_path=`cmd //c echo $path`
57397   fi
57398 
57399 
57400   input_path="$new_path"
57401   # Check if we need to convert this using DOS-style short mode. If the path
57402   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57403   # take no chances and rewrite it.
57404   # Note: m4 eats our [], so we need to use [ and ] instead.
57405   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57406   if test "x$has_forbidden_chars" != x; then
57407     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57408     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57409   fi
57410 
57411 
57412   windows_path="$new_path"
57413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57414     unix_path=`$CYGPATH -u "$windows_path"`
57415     new_path="$unix_path"
57416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57417     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57418     new_path="$unix_path"
57419   fi
57420 
57421   if test "x$path" != "x$new_path"; then
57422     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57423     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57424 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57425   fi
57426 
57427   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57428   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57429 
57430     else
57431       # We're on a unix platform. Hooray! :)
57432       path="$POTENTIAL_FREETYPE_LIB_PATH"
57433       has_space=`$ECHO "$path" | $GREP " "`
57434       if test "x$has_space" != x; then
57435         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57436 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57437         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57438       fi
57439 
57440       # Use eval to expand a potential ~
57441       eval path="$path"
57442       if test ! -f "$path" && test ! -d "$path"; then
57443         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57444       fi
57445 
57446       if test -d "$path"; then
57447         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57448       else
57449         dir="`$DIRNAME "$path"`"
57450         base="`$BASENAME "$path"`"
57451         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57452       fi
57453     fi
57454   fi
57455 
57456 
57457     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57458     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57459 $as_echo_n "checking for freetype includes... " >&6; }
57460     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57461 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57462     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57463     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57464 $as_echo_n "checking for freetype libraries... " >&6; }
57465     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57466 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57467   fi
57468 
57469         if test "x$FOUND_FREETYPE" != xyes; then
57470           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57471         fi
57472       else
57473         # User specified only one of lib or include. This is an error.
57474         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57475           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57476 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57477           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57478         else
57479           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57480 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57481           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57482         fi
57483       fi
57484     else
57485       # User did not specify settings, but we need freetype. Try to locate it.
57486 
57487       if test "x$BUNDLE_FREETYPE" = x; then
57488         # If not specified, default is to bundle freetype only on windows
57489         if test "x$OPENJDK_TARGET_OS" = xwindows; then
57490           BUNDLE_FREETYPE=yes
57491         else
57492           BUNDLE_FREETYPE=no
57493         fi
57494       fi
57495 
57496       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57497       if test "x$SYSROOT" = x; then
57498         if test "x$FOUND_FREETYPE" != xyes; then
57499           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57500           if test "x$PKG_CONFIG" != x; then
57501 
57502 pkg_failed=no
57503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57504 $as_echo_n "checking for FREETYPE... " >&6; }
57505 
57506 if test -n "$FREETYPE_CFLAGS"; then
57507     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57508  elif test -n "$PKG_CONFIG"; then
57509     if test -n "$PKG_CONFIG" && \
57510     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57511   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57512   ac_status=$?
57513   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57514   test $ac_status = 0; }; then
57515   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57516 else
57517   pkg_failed=yes
57518 fi
57519  else
57520     pkg_failed=untried
57521 fi
57522 if test -n "$FREETYPE_LIBS"; then
57523     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57524  elif test -n "$PKG_CONFIG"; then
57525     if test -n "$PKG_CONFIG" && \
57526     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57527   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57528   ac_status=$?
57529   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57530   test $ac_status = 0; }; then
57531   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57532 else
57533   pkg_failed=yes
57534 fi
57535  else
57536     pkg_failed=untried
57537 fi
57538 
57539 
57540 
57541 if test $pkg_failed = yes; then
57542 
57543 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57544         _pkg_short_errors_supported=yes
57545 else
57546         _pkg_short_errors_supported=no
57547 fi
57548         if test $_pkg_short_errors_supported = yes; then
57549                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57550         else
57551                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57552         fi
57553         # Put the nasty error message in config.log where it belongs
57554         echo "$FREETYPE_PKG_ERRORS" >&5
57555 
57556         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57557 $as_echo "no" >&6; }
57558                 FOUND_FREETYPE=no
57559 elif test $pkg_failed = untried; then
57560         FOUND_FREETYPE=no
57561 else
57562         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57563         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57564         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57565 $as_echo "yes" >&6; }
57566         FOUND_FREETYPE=yes
57567 fi
57568             if test "x$FOUND_FREETYPE" = xyes; then
57569               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57570               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57571               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57572               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57573                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57574               fi
57575               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57576               if test "x$BUNDLE_FREETYPE" = xyes; then
57577                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57578 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57579                 FOUND_FREETYPE=no
57580               else
57581                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57582 $as_echo_n "checking for freetype... " >&6; }
57583                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57584 $as_echo "yes (using pkg-config)" >&6; }
57585               fi
57586             fi
57587           fi
57588         fi
57589       fi
57590 
57591       if test "x$FOUND_FREETYPE" != xyes; then
57592         # Check in well-known locations
57593         if test "x$OPENJDK_TARGET_OS" = xwindows; then
57594           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57595 
57596   windows_path="$FREETYPE_BASE_DIR"
57597   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57598     unix_path=`$CYGPATH -u "$windows_path"`
57599     FREETYPE_BASE_DIR="$unix_path"
57600   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57601     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57602     FREETYPE_BASE_DIR="$unix_path"
57603   fi
57604 
57605 
57606   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57607   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57608   METHOD="well-known location"
57609 
57610   # Let's start with an optimistic view of the world :-)
57611   FOUND_FREETYPE=yes
57612 
57613   # First look for the canonical freetype main include file ft2build.h.
57614   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57615     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57616     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57617     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57618       # Fail.
57619       FOUND_FREETYPE=no
57620     fi
57621   fi
57622 
57623   if test "x$FOUND_FREETYPE" = xyes; then
57624     # Include file found, let's continue the sanity check.
57625     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57626 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57627 
57628     # Reset to default value
57629     FREETYPE_BASE_NAME=freetype
57630     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57631     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57632       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57633           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57634         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57635         # for the .6 version explicitly.
57636         FREETYPE_BASE_NAME=freetype.6
57637         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57638         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57639 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57640       else
57641         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57642 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57643         FOUND_FREETYPE=no
57644       fi
57645     else
57646       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57647         # On Windows, we will need both .lib and .dll file.
57648         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57649           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57650 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57651           FOUND_FREETYPE=no
57652         fi
57653       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57654           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57655         # Found lib in isa dir, use that instead.
57656         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57657         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57658 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57659       fi
57660     fi
57661   fi
57662 
57663   if test "x$FOUND_FREETYPE" = xyes; then
57664 
57665   # Only process if variable expands to non-empty
57666 
57667   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57668     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57669 
57670   # Input might be given as Windows format, start by converting to
57671   # unix format.
57672   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57673   new_path=`$CYGPATH -u "$path"`
57674 
57675   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57676   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57677   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57678   # "foo.exe" is OK but "foo" is an error.
57679   #
57680   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57681   # It is also a way to make sure we got the proper file name for the real test later on.
57682   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57683   if test "x$test_shortpath" = x; then
57684     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57685 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57686     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57687   fi
57688 
57689   # Call helper function which possibly converts this using DOS-style short mode.
57690   # If so, the updated path is stored in $new_path.
57691 
57692   input_path="$new_path"
57693   # Check if we need to convert this using DOS-style short mode. If the path
57694   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57695   # take no chances and rewrite it.
57696   # Note: m4 eats our [], so we need to use [ and ] instead.
57697   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57698   if test "x$has_forbidden_chars" != x; then
57699     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57700     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57701     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57702     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57703       # Going to short mode and back again did indeed matter. Since short mode is
57704       # case insensitive, let's make it lowercase to improve readability.
57705       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57706       # Now convert it back to Unix-style (cygpath)
57707       input_path=`$CYGPATH -u "$shortmode_path"`
57708       new_path="$input_path"
57709     fi
57710   fi
57711 
57712   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57713   if test "x$test_cygdrive_prefix" = x; then
57714     # As a simple fix, exclude /usr/bin since it's not a real path.
57715     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57716       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57717       # a path prefixed by /cygdrive for fixpath to work.
57718       new_path="$CYGWIN_ROOT_PATH$input_path"
57719     fi
57720   fi
57721 
57722 
57723   if test "x$path" != "x$new_path"; then
57724     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57725     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57726 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57727   fi
57728 
57729     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57730 
57731   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57732   has_colon=`$ECHO $path | $GREP ^.:`
57733   new_path="$path"
57734   if test "x$has_colon" = x; then
57735     # Not in mixed or Windows style, start by that.
57736     new_path=`cmd //c echo $path`
57737   fi
57738 
57739 
57740   input_path="$new_path"
57741   # Check if we need to convert this using DOS-style short mode. If the path
57742   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57743   # take no chances and rewrite it.
57744   # Note: m4 eats our [], so we need to use [ and ] instead.
57745   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57746   if test "x$has_forbidden_chars" != x; then
57747     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57748     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57749   fi
57750 
57751 
57752   windows_path="$new_path"
57753   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57754     unix_path=`$CYGPATH -u "$windows_path"`
57755     new_path="$unix_path"
57756   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57757     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57758     new_path="$unix_path"
57759   fi
57760 
57761   if test "x$path" != "x$new_path"; then
57762     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57763     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57764 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57765   fi
57766 
57767   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57768   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57769 
57770     else
57771       # We're on a unix platform. Hooray! :)
57772       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57773       has_space=`$ECHO "$path" | $GREP " "`
57774       if test "x$has_space" != x; then
57775         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57776 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57777         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57778       fi
57779 
57780       # Use eval to expand a potential ~
57781       eval path="$path"
57782       if test ! -f "$path" && test ! -d "$path"; then
57783         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57784       fi
57785 
57786       if test -d "$path"; then
57787         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57788       else
57789         dir="`$DIRNAME "$path"`"
57790         base="`$BASENAME "$path"`"
57791         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57792       fi
57793     fi
57794   fi
57795 
57796 
57797   # Only process if variable expands to non-empty
57798 
57799   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57800     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57801 
57802   # Input might be given as Windows format, start by converting to
57803   # unix format.
57804   path="$POTENTIAL_FREETYPE_LIB_PATH"
57805   new_path=`$CYGPATH -u "$path"`
57806 
57807   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57808   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57809   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57810   # "foo.exe" is OK but "foo" is an error.
57811   #
57812   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57813   # It is also a way to make sure we got the proper file name for the real test later on.
57814   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57815   if test "x$test_shortpath" = x; then
57816     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57817 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57818     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57819   fi
57820 
57821   # Call helper function which possibly converts this using DOS-style short mode.
57822   # If so, the updated path is stored in $new_path.
57823 
57824   input_path="$new_path"
57825   # Check if we need to convert this using DOS-style short mode. If the path
57826   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57827   # take no chances and rewrite it.
57828   # Note: m4 eats our [], so we need to use [ and ] instead.
57829   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57830   if test "x$has_forbidden_chars" != x; then
57831     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57832     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57833     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57834     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57835       # Going to short mode and back again did indeed matter. Since short mode is
57836       # case insensitive, let's make it lowercase to improve readability.
57837       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57838       # Now convert it back to Unix-style (cygpath)
57839       input_path=`$CYGPATH -u "$shortmode_path"`
57840       new_path="$input_path"
57841     fi
57842   fi
57843 
57844   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57845   if test "x$test_cygdrive_prefix" = x; then
57846     # As a simple fix, exclude /usr/bin since it's not a real path.
57847     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57848       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57849       # a path prefixed by /cygdrive for fixpath to work.
57850       new_path="$CYGWIN_ROOT_PATH$input_path"
57851     fi
57852   fi
57853 
57854 
57855   if test "x$path" != "x$new_path"; then
57856     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57857     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57858 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57859   fi
57860 
57861     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57862 
57863   path="$POTENTIAL_FREETYPE_LIB_PATH"
57864   has_colon=`$ECHO $path | $GREP ^.:`
57865   new_path="$path"
57866   if test "x$has_colon" = x; then
57867     # Not in mixed or Windows style, start by that.
57868     new_path=`cmd //c echo $path`
57869   fi
57870 
57871 
57872   input_path="$new_path"
57873   # Check if we need to convert this using DOS-style short mode. If the path
57874   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57875   # take no chances and rewrite it.
57876   # Note: m4 eats our [], so we need to use [ and ] instead.
57877   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57878   if test "x$has_forbidden_chars" != x; then
57879     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57880     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57881   fi
57882 
57883 
57884   windows_path="$new_path"
57885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57886     unix_path=`$CYGPATH -u "$windows_path"`
57887     new_path="$unix_path"
57888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57889     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57890     new_path="$unix_path"
57891   fi
57892 
57893   if test "x$path" != "x$new_path"; then
57894     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57895     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57896 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57897   fi
57898 
57899   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57900   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57901 
57902     else
57903       # We're on a unix platform. Hooray! :)
57904       path="$POTENTIAL_FREETYPE_LIB_PATH"
57905       has_space=`$ECHO "$path" | $GREP " "`
57906       if test "x$has_space" != x; then
57907         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57908 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57909         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57910       fi
57911 
57912       # Use eval to expand a potential ~
57913       eval path="$path"
57914       if test ! -f "$path" && test ! -d "$path"; then
57915         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57916       fi
57917 
57918       if test -d "$path"; then
57919         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57920       else
57921         dir="`$DIRNAME "$path"`"
57922         base="`$BASENAME "$path"`"
57923         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57924       fi
57925     fi
57926   fi
57927 
57928 
57929     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57930     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57931 $as_echo_n "checking for freetype includes... " >&6; }
57932     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57933 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57934     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57935     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57936 $as_echo_n "checking for freetype libraries... " >&6; }
57937     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57938 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57939   fi
57940 
57941           if test "x$FOUND_FREETYPE" != xyes; then
57942             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
57943 
57944   windows_path="$FREETYPE_BASE_DIR"
57945   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57946     unix_path=`$CYGPATH -u "$windows_path"`
57947     FREETYPE_BASE_DIR="$unix_path"
57948   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57949     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57950     FREETYPE_BASE_DIR="$unix_path"
57951   fi
57952 
57953 
57954   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57955   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57956   METHOD="well-known location"
57957 
57958   # Let's start with an optimistic view of the world :-)
57959   FOUND_FREETYPE=yes
57960 
57961   # First look for the canonical freetype main include file ft2build.h.
57962   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57963     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57964     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57965     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57966       # Fail.
57967       FOUND_FREETYPE=no
57968     fi
57969   fi
57970 
57971   if test "x$FOUND_FREETYPE" = xyes; then
57972     # Include file found, let's continue the sanity check.
57973     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57974 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57975 
57976     # Reset to default value
57977     FREETYPE_BASE_NAME=freetype
57978     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57979     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57980       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57981           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57982         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57983         # for the .6 version explicitly.
57984         FREETYPE_BASE_NAME=freetype.6
57985         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57986         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57987 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57988       else
57989         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57990 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57991         FOUND_FREETYPE=no
57992       fi
57993     else
57994       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57995         # On Windows, we will need both .lib and .dll file.
57996         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57997           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57998 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57999           FOUND_FREETYPE=no
58000         fi
58001       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58002           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58003         # Found lib in isa dir, use that instead.
58004         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58005         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58006 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58007       fi
58008     fi
58009   fi
58010 
58011   if test "x$FOUND_FREETYPE" = xyes; then
58012 
58013   # Only process if variable expands to non-empty
58014 
58015   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58016     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58017 
58018   # Input might be given as Windows format, start by converting to
58019   # unix format.
58020   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58021   new_path=`$CYGPATH -u "$path"`
58022 
58023   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58024   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58025   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58026   # "foo.exe" is OK but "foo" is an error.
58027   #
58028   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58029   # It is also a way to make sure we got the proper file name for the real test later on.
58030   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58031   if test "x$test_shortpath" = x; then
58032     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58033 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58034     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58035   fi
58036 
58037   # Call helper function which possibly converts this using DOS-style short mode.
58038   # If so, the updated path is stored in $new_path.
58039 
58040   input_path="$new_path"
58041   # Check if we need to convert this using DOS-style short mode. If the path
58042   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58043   # take no chances and rewrite it.
58044   # Note: m4 eats our [], so we need to use [ and ] instead.
58045   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58046   if test "x$has_forbidden_chars" != x; then
58047     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58048     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58049     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58050     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58051       # Going to short mode and back again did indeed matter. Since short mode is
58052       # case insensitive, let's make it lowercase to improve readability.
58053       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58054       # Now convert it back to Unix-style (cygpath)
58055       input_path=`$CYGPATH -u "$shortmode_path"`
58056       new_path="$input_path"
58057     fi
58058   fi
58059 
58060   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58061   if test "x$test_cygdrive_prefix" = x; then
58062     # As a simple fix, exclude /usr/bin since it's not a real path.
58063     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58064       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58065       # a path prefixed by /cygdrive for fixpath to work.
58066       new_path="$CYGWIN_ROOT_PATH$input_path"
58067     fi
58068   fi
58069 
58070 
58071   if test "x$path" != "x$new_path"; then
58072     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58073     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58074 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58075   fi
58076 
58077     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58078 
58079   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58080   has_colon=`$ECHO $path | $GREP ^.:`
58081   new_path="$path"
58082   if test "x$has_colon" = x; then
58083     # Not in mixed or Windows style, start by that.
58084     new_path=`cmd //c echo $path`
58085   fi
58086 
58087 
58088   input_path="$new_path"
58089   # Check if we need to convert this using DOS-style short mode. If the path
58090   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58091   # take no chances and rewrite it.
58092   # Note: m4 eats our [], so we need to use [ and ] instead.
58093   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58094   if test "x$has_forbidden_chars" != x; then
58095     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58096     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58097   fi
58098 
58099 
58100   windows_path="$new_path"
58101   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58102     unix_path=`$CYGPATH -u "$windows_path"`
58103     new_path="$unix_path"
58104   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58105     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58106     new_path="$unix_path"
58107   fi
58108 
58109   if test "x$path" != "x$new_path"; then
58110     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58111     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58112 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58113   fi
58114 
58115   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58116   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58117 
58118     else
58119       # We're on a unix platform. Hooray! :)
58120       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58121       has_space=`$ECHO "$path" | $GREP " "`
58122       if test "x$has_space" != x; then
58123         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58124 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58125         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58126       fi
58127 
58128       # Use eval to expand a potential ~
58129       eval path="$path"
58130       if test ! -f "$path" && test ! -d "$path"; then
58131         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58132       fi
58133 
58134       if test -d "$path"; then
58135         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58136       else
58137         dir="`$DIRNAME "$path"`"
58138         base="`$BASENAME "$path"`"
58139         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58140       fi
58141     fi
58142   fi
58143 
58144 
58145   # Only process if variable expands to non-empty
58146 
58147   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58148     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58149 
58150   # Input might be given as Windows format, start by converting to
58151   # unix format.
58152   path="$POTENTIAL_FREETYPE_LIB_PATH"
58153   new_path=`$CYGPATH -u "$path"`
58154 
58155   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58156   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58157   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58158   # "foo.exe" is OK but "foo" is an error.
58159   #
58160   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58161   # It is also a way to make sure we got the proper file name for the real test later on.
58162   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58163   if test "x$test_shortpath" = x; then
58164     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58165 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58166     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58167   fi
58168 
58169   # Call helper function which possibly converts this using DOS-style short mode.
58170   # If so, the updated path is stored in $new_path.
58171 
58172   input_path="$new_path"
58173   # Check if we need to convert this using DOS-style short mode. If the path
58174   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58175   # take no chances and rewrite it.
58176   # Note: m4 eats our [], so we need to use [ and ] instead.
58177   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58178   if test "x$has_forbidden_chars" != x; then
58179     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58180     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58181     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58182     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58183       # Going to short mode and back again did indeed matter. Since short mode is
58184       # case insensitive, let's make it lowercase to improve readability.
58185       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58186       # Now convert it back to Unix-style (cygpath)
58187       input_path=`$CYGPATH -u "$shortmode_path"`
58188       new_path="$input_path"
58189     fi
58190   fi
58191 
58192   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58193   if test "x$test_cygdrive_prefix" = x; then
58194     # As a simple fix, exclude /usr/bin since it's not a real path.
58195     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58196       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58197       # a path prefixed by /cygdrive for fixpath to work.
58198       new_path="$CYGWIN_ROOT_PATH$input_path"
58199     fi
58200   fi
58201 
58202 
58203   if test "x$path" != "x$new_path"; then
58204     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58205     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58206 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58207   fi
58208 
58209     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58210 
58211   path="$POTENTIAL_FREETYPE_LIB_PATH"
58212   has_colon=`$ECHO $path | $GREP ^.:`
58213   new_path="$path"
58214   if test "x$has_colon" = x; then
58215     # Not in mixed or Windows style, start by that.
58216     new_path=`cmd //c echo $path`
58217   fi
58218 
58219 
58220   input_path="$new_path"
58221   # Check if we need to convert this using DOS-style short mode. If the path
58222   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58223   # take no chances and rewrite it.
58224   # Note: m4 eats our [], so we need to use [ and ] instead.
58225   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58226   if test "x$has_forbidden_chars" != x; then
58227     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58228     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58229   fi
58230 
58231 
58232   windows_path="$new_path"
58233   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58234     unix_path=`$CYGPATH -u "$windows_path"`
58235     new_path="$unix_path"
58236   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58237     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58238     new_path="$unix_path"
58239   fi
58240 
58241   if test "x$path" != "x$new_path"; then
58242     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58243     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58244 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58245   fi
58246 
58247   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58248   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58249 
58250     else
58251       # We're on a unix platform. Hooray! :)
58252       path="$POTENTIAL_FREETYPE_LIB_PATH"
58253       has_space=`$ECHO "$path" | $GREP " "`
58254       if test "x$has_space" != x; then
58255         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58256 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58257         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58258       fi
58259 
58260       # Use eval to expand a potential ~
58261       eval path="$path"
58262       if test ! -f "$path" && test ! -d "$path"; then
58263         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58264       fi
58265 
58266       if test -d "$path"; then
58267         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58268       else
58269         dir="`$DIRNAME "$path"`"
58270         base="`$BASENAME "$path"`"
58271         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58272       fi
58273     fi
58274   fi
58275 
58276 
58277     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58278     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58279 $as_echo_n "checking for freetype includes... " >&6; }
58280     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58281 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58282     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58283     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58284 $as_echo_n "checking for freetype libraries... " >&6; }
58285     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58286 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58287   fi
58288 
58289           fi
58290           if test "x$FOUND_FREETYPE" != xyes; then
58291             FREETYPE_BASE_DIR="$HOME/freetype"
58292 
58293   windows_path="$FREETYPE_BASE_DIR"
58294   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58295     unix_path=`$CYGPATH -u "$windows_path"`
58296     FREETYPE_BASE_DIR="$unix_path"
58297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58298     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58299     FREETYPE_BASE_DIR="$unix_path"
58300   fi
58301 
58302             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58303 
58304   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58305   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58306   METHOD="well-known location"
58307 
58308   # Let's start with an optimistic view of the world :-)
58309   FOUND_FREETYPE=yes
58310 
58311   # First look for the canonical freetype main include file ft2build.h.
58312   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58313     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58314     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58315     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58316       # Fail.
58317       FOUND_FREETYPE=no
58318     fi
58319   fi
58320 
58321   if test "x$FOUND_FREETYPE" = xyes; then
58322     # Include file found, let's continue the sanity check.
58323     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58324 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58325 
58326     # Reset to default value
58327     FREETYPE_BASE_NAME=freetype
58328     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58329     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58330       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58331           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58332         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58333         # for the .6 version explicitly.
58334         FREETYPE_BASE_NAME=freetype.6
58335         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58336         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58337 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58338       else
58339         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58340 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58341         FOUND_FREETYPE=no
58342       fi
58343     else
58344       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58345         # On Windows, we will need both .lib and .dll file.
58346         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58347           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58348 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58349           FOUND_FREETYPE=no
58350         fi
58351       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58352           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58353         # Found lib in isa dir, use that instead.
58354         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58355         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58356 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58357       fi
58358     fi
58359   fi
58360 
58361   if test "x$FOUND_FREETYPE" = xyes; then
58362 
58363   # Only process if variable expands to non-empty
58364 
58365   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58366     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58367 
58368   # Input might be given as Windows format, start by converting to
58369   # unix format.
58370   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58371   new_path=`$CYGPATH -u "$path"`
58372 
58373   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58374   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58375   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58376   # "foo.exe" is OK but "foo" is an error.
58377   #
58378   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58379   # It is also a way to make sure we got the proper file name for the real test later on.
58380   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58381   if test "x$test_shortpath" = x; then
58382     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58383 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58384     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58385   fi
58386 
58387   # Call helper function which possibly converts this using DOS-style short mode.
58388   # If so, the updated path is stored in $new_path.
58389 
58390   input_path="$new_path"
58391   # Check if we need to convert this using DOS-style short mode. If the path
58392   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58393   # take no chances and rewrite it.
58394   # Note: m4 eats our [], so we need to use [ and ] instead.
58395   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58396   if test "x$has_forbidden_chars" != x; then
58397     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58398     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58399     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58400     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58401       # Going to short mode and back again did indeed matter. Since short mode is
58402       # case insensitive, let's make it lowercase to improve readability.
58403       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58404       # Now convert it back to Unix-style (cygpath)
58405       input_path=`$CYGPATH -u "$shortmode_path"`
58406       new_path="$input_path"
58407     fi
58408   fi
58409 
58410   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58411   if test "x$test_cygdrive_prefix" = x; then
58412     # As a simple fix, exclude /usr/bin since it's not a real path.
58413     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58414       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58415       # a path prefixed by /cygdrive for fixpath to work.
58416       new_path="$CYGWIN_ROOT_PATH$input_path"
58417     fi
58418   fi
58419 
58420 
58421   if test "x$path" != "x$new_path"; then
58422     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58423     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58424 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58425   fi
58426 
58427     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58428 
58429   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58430   has_colon=`$ECHO $path | $GREP ^.:`
58431   new_path="$path"
58432   if test "x$has_colon" = x; then
58433     # Not in mixed or Windows style, start by that.
58434     new_path=`cmd //c echo $path`
58435   fi
58436 
58437 
58438   input_path="$new_path"
58439   # Check if we need to convert this using DOS-style short mode. If the path
58440   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58441   # take no chances and rewrite it.
58442   # Note: m4 eats our [], so we need to use [ and ] instead.
58443   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58444   if test "x$has_forbidden_chars" != x; then
58445     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58446     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58447   fi
58448 
58449 
58450   windows_path="$new_path"
58451   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58452     unix_path=`$CYGPATH -u "$windows_path"`
58453     new_path="$unix_path"
58454   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58455     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58456     new_path="$unix_path"
58457   fi
58458 
58459   if test "x$path" != "x$new_path"; then
58460     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58461     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58462 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58463   fi
58464 
58465   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58466   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58467 
58468     else
58469       # We're on a unix platform. Hooray! :)
58470       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58471       has_space=`$ECHO "$path" | $GREP " "`
58472       if test "x$has_space" != x; then
58473         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58474 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58475         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58476       fi
58477 
58478       # Use eval to expand a potential ~
58479       eval path="$path"
58480       if test ! -f "$path" && test ! -d "$path"; then
58481         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58482       fi
58483 
58484       if test -d "$path"; then
58485         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58486       else
58487         dir="`$DIRNAME "$path"`"
58488         base="`$BASENAME "$path"`"
58489         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58490       fi
58491     fi
58492   fi
58493 
58494 
58495   # Only process if variable expands to non-empty
58496 
58497   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58498     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58499 
58500   # Input might be given as Windows format, start by converting to
58501   # unix format.
58502   path="$POTENTIAL_FREETYPE_LIB_PATH"
58503   new_path=`$CYGPATH -u "$path"`
58504 
58505   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58506   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58507   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58508   # "foo.exe" is OK but "foo" is an error.
58509   #
58510   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58511   # It is also a way to make sure we got the proper file name for the real test later on.
58512   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58513   if test "x$test_shortpath" = x; then
58514     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58515 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58516     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58517   fi
58518 
58519   # Call helper function which possibly converts this using DOS-style short mode.
58520   # If so, the updated path is stored in $new_path.
58521 
58522   input_path="$new_path"
58523   # Check if we need to convert this using DOS-style short mode. If the path
58524   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58525   # take no chances and rewrite it.
58526   # Note: m4 eats our [], so we need to use [ and ] instead.
58527   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58528   if test "x$has_forbidden_chars" != x; then
58529     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58530     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58531     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58532     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58533       # Going to short mode and back again did indeed matter. Since short mode is
58534       # case insensitive, let's make it lowercase to improve readability.
58535       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58536       # Now convert it back to Unix-style (cygpath)
58537       input_path=`$CYGPATH -u "$shortmode_path"`
58538       new_path="$input_path"
58539     fi
58540   fi
58541 
58542   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58543   if test "x$test_cygdrive_prefix" = x; then
58544     # As a simple fix, exclude /usr/bin since it's not a real path.
58545     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58546       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58547       # a path prefixed by /cygdrive for fixpath to work.
58548       new_path="$CYGWIN_ROOT_PATH$input_path"
58549     fi
58550   fi
58551 
58552 
58553   if test "x$path" != "x$new_path"; then
58554     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58555     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58556 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58557   fi
58558 
58559     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58560 
58561   path="$POTENTIAL_FREETYPE_LIB_PATH"
58562   has_colon=`$ECHO $path | $GREP ^.:`
58563   new_path="$path"
58564   if test "x$has_colon" = x; then
58565     # Not in mixed or Windows style, start by that.
58566     new_path=`cmd //c echo $path`
58567   fi
58568 
58569 
58570   input_path="$new_path"
58571   # Check if we need to convert this using DOS-style short mode. If the path
58572   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58573   # take no chances and rewrite it.
58574   # Note: m4 eats our [], so we need to use [ and ] instead.
58575   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58576   if test "x$has_forbidden_chars" != x; then
58577     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58578     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58579   fi
58580 
58581 
58582   windows_path="$new_path"
58583   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58584     unix_path=`$CYGPATH -u "$windows_path"`
58585     new_path="$unix_path"
58586   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58587     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58588     new_path="$unix_path"
58589   fi
58590 
58591   if test "x$path" != "x$new_path"; then
58592     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58593     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58594 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58595   fi
58596 
58597   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58598   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58599 
58600     else
58601       # We're on a unix platform. Hooray! :)
58602       path="$POTENTIAL_FREETYPE_LIB_PATH"
58603       has_space=`$ECHO "$path" | $GREP " "`
58604       if test "x$has_space" != x; then
58605         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58606 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58607         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58608       fi
58609 
58610       # Use eval to expand a potential ~
58611       eval path="$path"
58612       if test ! -f "$path" && test ! -d "$path"; then
58613         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58614       fi
58615 
58616       if test -d "$path"; then
58617         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58618       else
58619         dir="`$DIRNAME "$path"`"
58620         base="`$BASENAME "$path"`"
58621         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58622       fi
58623     fi
58624   fi
58625 
58626 
58627     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58628     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58629 $as_echo_n "checking for freetype includes... " >&6; }
58630     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58631 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58632     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58633     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58634 $as_echo_n "checking for freetype libraries... " >&6; }
58635     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58636 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58637   fi
58638 
58639             else
58640 
58641   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58642   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58643   METHOD="well-known location"
58644 
58645   # Let's start with an optimistic view of the world :-)
58646   FOUND_FREETYPE=yes
58647 
58648   # First look for the canonical freetype main include file ft2build.h.
58649   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58650     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58651     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58652     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58653       # Fail.
58654       FOUND_FREETYPE=no
58655     fi
58656   fi
58657 
58658   if test "x$FOUND_FREETYPE" = xyes; then
58659     # Include file found, let's continue the sanity check.
58660     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58661 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58662 
58663     # Reset to default value
58664     FREETYPE_BASE_NAME=freetype
58665     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58666     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58667       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58668           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58669         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58670         # for the .6 version explicitly.
58671         FREETYPE_BASE_NAME=freetype.6
58672         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58673         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58674 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58675       else
58676         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58677 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58678         FOUND_FREETYPE=no
58679       fi
58680     else
58681       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58682         # On Windows, we will need both .lib and .dll file.
58683         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58684           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58685 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58686           FOUND_FREETYPE=no
58687         fi
58688       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58689           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58690         # Found lib in isa dir, use that instead.
58691         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58692         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58693 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58694       fi
58695     fi
58696   fi
58697 
58698   if test "x$FOUND_FREETYPE" = xyes; then
58699 
58700   # Only process if variable expands to non-empty
58701 
58702   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58703     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58704 
58705   # Input might be given as Windows format, start by converting to
58706   # unix format.
58707   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58708   new_path=`$CYGPATH -u "$path"`
58709 
58710   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58711   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58712   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58713   # "foo.exe" is OK but "foo" is an error.
58714   #
58715   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58716   # It is also a way to make sure we got the proper file name for the real test later on.
58717   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58718   if test "x$test_shortpath" = x; then
58719     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58720 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58721     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58722   fi
58723 
58724   # Call helper function which possibly converts this using DOS-style short mode.
58725   # If so, the updated path is stored in $new_path.
58726 
58727   input_path="$new_path"
58728   # Check if we need to convert this using DOS-style short mode. If the path
58729   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58730   # take no chances and rewrite it.
58731   # Note: m4 eats our [], so we need to use [ and ] instead.
58732   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58733   if test "x$has_forbidden_chars" != x; then
58734     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58735     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58736     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58737     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58738       # Going to short mode and back again did indeed matter. Since short mode is
58739       # case insensitive, let's make it lowercase to improve readability.
58740       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58741       # Now convert it back to Unix-style (cygpath)
58742       input_path=`$CYGPATH -u "$shortmode_path"`
58743       new_path="$input_path"
58744     fi
58745   fi
58746 
58747   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58748   if test "x$test_cygdrive_prefix" = x; then
58749     # As a simple fix, exclude /usr/bin since it's not a real path.
58750     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58751       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58752       # a path prefixed by /cygdrive for fixpath to work.
58753       new_path="$CYGWIN_ROOT_PATH$input_path"
58754     fi
58755   fi
58756 
58757 
58758   if test "x$path" != "x$new_path"; then
58759     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58760     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58761 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58762   fi
58763 
58764     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58765 
58766   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58767   has_colon=`$ECHO $path | $GREP ^.:`
58768   new_path="$path"
58769   if test "x$has_colon" = x; then
58770     # Not in mixed or Windows style, start by that.
58771     new_path=`cmd //c echo $path`
58772   fi
58773 
58774 
58775   input_path="$new_path"
58776   # Check if we need to convert this using DOS-style short mode. If the path
58777   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58778   # take no chances and rewrite it.
58779   # Note: m4 eats our [], so we need to use [ and ] instead.
58780   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58781   if test "x$has_forbidden_chars" != x; then
58782     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58783     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58784   fi
58785 
58786 
58787   windows_path="$new_path"
58788   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58789     unix_path=`$CYGPATH -u "$windows_path"`
58790     new_path="$unix_path"
58791   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58792     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58793     new_path="$unix_path"
58794   fi
58795 
58796   if test "x$path" != "x$new_path"; then
58797     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58798     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58799 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58800   fi
58801 
58802   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58803   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58804 
58805     else
58806       # We're on a unix platform. Hooray! :)
58807       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58808       has_space=`$ECHO "$path" | $GREP " "`
58809       if test "x$has_space" != x; then
58810         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58811 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58812         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58813       fi
58814 
58815       # Use eval to expand a potential ~
58816       eval path="$path"
58817       if test ! -f "$path" && test ! -d "$path"; then
58818         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58819       fi
58820 
58821       if test -d "$path"; then
58822         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58823       else
58824         dir="`$DIRNAME "$path"`"
58825         base="`$BASENAME "$path"`"
58826         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58827       fi
58828     fi
58829   fi
58830 
58831 
58832   # Only process if variable expands to non-empty
58833 
58834   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58835     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58836 
58837   # Input might be given as Windows format, start by converting to
58838   # unix format.
58839   path="$POTENTIAL_FREETYPE_LIB_PATH"
58840   new_path=`$CYGPATH -u "$path"`
58841 
58842   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58843   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58844   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58845   # "foo.exe" is OK but "foo" is an error.
58846   #
58847   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58848   # It is also a way to make sure we got the proper file name for the real test later on.
58849   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58850   if test "x$test_shortpath" = x; then
58851     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58852 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58853     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58854   fi
58855 
58856   # Call helper function which possibly converts this using DOS-style short mode.
58857   # If so, the updated path is stored in $new_path.
58858 
58859   input_path="$new_path"
58860   # Check if we need to convert this using DOS-style short mode. If the path
58861   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58862   # take no chances and rewrite it.
58863   # Note: m4 eats our [], so we need to use [ and ] instead.
58864   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58865   if test "x$has_forbidden_chars" != x; then
58866     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58867     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58868     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58869     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58870       # Going to short mode and back again did indeed matter. Since short mode is
58871       # case insensitive, let's make it lowercase to improve readability.
58872       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58873       # Now convert it back to Unix-style (cygpath)
58874       input_path=`$CYGPATH -u "$shortmode_path"`
58875       new_path="$input_path"
58876     fi
58877   fi
58878 
58879   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58880   if test "x$test_cygdrive_prefix" = x; then
58881     # As a simple fix, exclude /usr/bin since it's not a real path.
58882     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58883       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58884       # a path prefixed by /cygdrive for fixpath to work.
58885       new_path="$CYGWIN_ROOT_PATH$input_path"
58886     fi
58887   fi
58888 
58889 
58890   if test "x$path" != "x$new_path"; then
58891     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58892     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58893 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58894   fi
58895 
58896     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58897 
58898   path="$POTENTIAL_FREETYPE_LIB_PATH"
58899   has_colon=`$ECHO $path | $GREP ^.:`
58900   new_path="$path"
58901   if test "x$has_colon" = x; then
58902     # Not in mixed or Windows style, start by that.
58903     new_path=`cmd //c echo $path`
58904   fi
58905 
58906 
58907   input_path="$new_path"
58908   # Check if we need to convert this using DOS-style short mode. If the path
58909   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58910   # take no chances and rewrite it.
58911   # Note: m4 eats our [], so we need to use [ and ] instead.
58912   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58913   if test "x$has_forbidden_chars" != x; then
58914     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58915     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58916   fi
58917 
58918 
58919   windows_path="$new_path"
58920   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58921     unix_path=`$CYGPATH -u "$windows_path"`
58922     new_path="$unix_path"
58923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58924     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58925     new_path="$unix_path"
58926   fi
58927 
58928   if test "x$path" != "x$new_path"; then
58929     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58930     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58931 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58932   fi
58933 
58934   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58935   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58936 
58937     else
58938       # We're on a unix platform. Hooray! :)
58939       path="$POTENTIAL_FREETYPE_LIB_PATH"
58940       has_space=`$ECHO "$path" | $GREP " "`
58941       if test "x$has_space" != x; then
58942         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58943 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58944         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58945       fi
58946 
58947       # Use eval to expand a potential ~
58948       eval path="$path"
58949       if test ! -f "$path" && test ! -d "$path"; then
58950         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58951       fi
58952 
58953       if test -d "$path"; then
58954         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58955       else
58956         dir="`$DIRNAME "$path"`"
58957         base="`$BASENAME "$path"`"
58958         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58959       fi
58960     fi
58961   fi
58962 
58963 
58964     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58965     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58966 $as_echo_n "checking for freetype includes... " >&6; }
58967     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58968 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58969     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58970     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58971 $as_echo_n "checking for freetype libraries... " >&6; }
58972     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58973 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58974   fi
58975 
58976             fi
58977             if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
58978                 && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
58979               # Source is available, as a last resort try to build freetype in default location
58980 
58981   FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
58982   BUILD_FREETYPE=yes
58983 
58984   # Check if the freetype sources are acessible..
58985   if ! test -d $FREETYPE_SRC_PATH; then
58986     { $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
58987 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
58988     BUILD_FREETYPE=no
58989   fi
58990   # ..and contain a vc2010 project file
58991   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
58992   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
58993     { $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
58994 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
58995     BUILD_FREETYPE=no
58996   fi
58997   # Now check if configure found a version of 'msbuild.exe'
58998   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
58999     { $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
59000 $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;}
59001     BUILD_FREETYPE=no
59002   fi
59003 
59004   # Ready to go..
59005   if test "x$BUILD_FREETYPE" = xyes; then
59006     # msbuild requires trailing slashes for output directories
59007     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59008     freetype_lib_path_unix="$freetype_lib_path"
59009     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59010 
59011   unix_path="$vcxproj_path"
59012   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59013     windows_path=`$CYGPATH -m "$unix_path"`
59014     vcxproj_path="$windows_path"
59015   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59016     windows_path=`cmd //c echo $unix_path`
59017     vcxproj_path="$windows_path"
59018   fi
59019 
59020 
59021   unix_path="$freetype_lib_path"
59022   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59023     windows_path=`$CYGPATH -m "$unix_path"`
59024     freetype_lib_path="$windows_path"
59025   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59026     windows_path=`cmd //c echo $unix_path`
59027     freetype_lib_path="$windows_path"
59028   fi
59029 
59030 
59031   unix_path="$freetype_obj_path"
59032   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59033     windows_path=`$CYGPATH -m "$unix_path"`
59034     freetype_obj_path="$windows_path"
59035   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59036     windows_path=`cmd //c echo $unix_path`
59037     freetype_obj_path="$windows_path"
59038   fi
59039 
59040     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59041       freetype_platform=x64
59042     else
59043       freetype_platform=win32
59044     fi
59045 
59046     # The original freetype project file is for VS 2010 (i.e. 'v100'),
59047     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59048     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59049     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59050     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59051 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59052 
59053     # First we try to build the freetype.dll
59054     $ECHO -e "@echo off\n"\
59055         "$MSBUILD $vcxproj_path "\
59056         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59057         "/p:Configuration=\"Release Multithreaded\" "\
59058         "/p:Platform=$freetype_platform "\
59059         "/p:ConfigurationType=DynamicLibrary "\
59060         "/p:TargetName=freetype "\
59061         "/p:OutDir=\"$freetype_lib_path\" "\
59062         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59063     cmd /c freetype.bat
59064 
59065     if test -s "$freetype_lib_path_unix/freetype.dll"; then
59066       # If that succeeds we also build freetype.lib
59067       $ECHO -e "@echo off\n"\
59068           "$MSBUILD $vcxproj_path "\
59069           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59070           "/p:Configuration=\"Release Multithreaded\" "\
59071           "/p:Platform=$freetype_platform "\
59072           "/p:ConfigurationType=StaticLibrary "\
59073           "/p:TargetName=freetype "\
59074           "/p:OutDir=\"$freetype_lib_path\" "\
59075           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59076       cmd /c freetype.bat
59077 
59078       if test -s "$freetype_lib_path_unix/freetype.lib"; then
59079         # Once we build both, lib and dll, set freetype lib and include path appropriately
59080         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59081         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59082         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59083 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59084       else
59085         BUILD_FREETYPE=no
59086       fi
59087     else
59088       BUILD_FREETYPE=no
59089     fi
59090   fi
59091 
59092               if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59093 
59094   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59095   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59096   METHOD="well-known location"
59097 
59098   # Let's start with an optimistic view of the world :-)
59099   FOUND_FREETYPE=yes
59100 
59101   # First look for the canonical freetype main include file ft2build.h.
59102   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59103     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59104     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59105     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59106       # Fail.
59107       FOUND_FREETYPE=no
59108     fi
59109   fi
59110 
59111   if test "x$FOUND_FREETYPE" = xyes; then
59112     # Include file found, let's continue the sanity check.
59113     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59114 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59115 
59116     # Reset to default value
59117     FREETYPE_BASE_NAME=freetype
59118     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59119     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59120       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59121           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59122         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59123         # for the .6 version explicitly.
59124         FREETYPE_BASE_NAME=freetype.6
59125         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59126         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59127 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59128       else
59129         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59130 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59131         FOUND_FREETYPE=no
59132       fi
59133     else
59134       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59135         # On Windows, we will need both .lib and .dll file.
59136         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59137           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59138 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59139           FOUND_FREETYPE=no
59140         fi
59141       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59142           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59143         # Found lib in isa dir, use that instead.
59144         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59145         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59146 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59147       fi
59148     fi
59149   fi
59150 
59151   if test "x$FOUND_FREETYPE" = xyes; then
59152 
59153   # Only process if variable expands to non-empty
59154 
59155   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59156     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59157 
59158   # Input might be given as Windows format, start by converting to
59159   # unix format.
59160   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59161   new_path=`$CYGPATH -u "$path"`
59162 
59163   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59164   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59165   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59166   # "foo.exe" is OK but "foo" is an error.
59167   #
59168   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59169   # It is also a way to make sure we got the proper file name for the real test later on.
59170   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59171   if test "x$test_shortpath" = x; then
59172     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59173 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59174     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59175   fi
59176 
59177   # Call helper function which possibly converts this using DOS-style short mode.
59178   # If so, the updated path is stored in $new_path.
59179 
59180   input_path="$new_path"
59181   # Check if we need to convert this using DOS-style short mode. If the path
59182   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59183   # take no chances and rewrite it.
59184   # Note: m4 eats our [], so we need to use [ and ] instead.
59185   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59186   if test "x$has_forbidden_chars" != x; then
59187     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59188     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59189     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59190     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59191       # Going to short mode and back again did indeed matter. Since short mode is
59192       # case insensitive, let's make it lowercase to improve readability.
59193       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59194       # Now convert it back to Unix-style (cygpath)
59195       input_path=`$CYGPATH -u "$shortmode_path"`
59196       new_path="$input_path"
59197     fi
59198   fi
59199 
59200   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59201   if test "x$test_cygdrive_prefix" = x; then
59202     # As a simple fix, exclude /usr/bin since it's not a real path.
59203     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59204       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59205       # a path prefixed by /cygdrive for fixpath to work.
59206       new_path="$CYGWIN_ROOT_PATH$input_path"
59207     fi
59208   fi
59209 
59210 
59211   if test "x$path" != "x$new_path"; then
59212     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59213     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59214 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59215   fi
59216 
59217     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59218 
59219   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59220   has_colon=`$ECHO $path | $GREP ^.:`
59221   new_path="$path"
59222   if test "x$has_colon" = x; then
59223     # Not in mixed or Windows style, start by that.
59224     new_path=`cmd //c echo $path`
59225   fi
59226 
59227 
59228   input_path="$new_path"
59229   # Check if we need to convert this using DOS-style short mode. If the path
59230   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59231   # take no chances and rewrite it.
59232   # Note: m4 eats our [], so we need to use [ and ] instead.
59233   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59234   if test "x$has_forbidden_chars" != x; then
59235     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59236     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59237   fi
59238 
59239 
59240   windows_path="$new_path"
59241   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59242     unix_path=`$CYGPATH -u "$windows_path"`
59243     new_path="$unix_path"
59244   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59245     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59246     new_path="$unix_path"
59247   fi
59248 
59249   if test "x$path" != "x$new_path"; then
59250     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59251     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59252 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59253   fi
59254 
59255   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59256   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59257 
59258     else
59259       # We're on a unix platform. Hooray! :)
59260       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59261       has_space=`$ECHO "$path" | $GREP " "`
59262       if test "x$has_space" != x; then
59263         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59264 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59265         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59266       fi
59267 
59268       # Use eval to expand a potential ~
59269       eval path="$path"
59270       if test ! -f "$path" && test ! -d "$path"; then
59271         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59272       fi
59273 
59274       if test -d "$path"; then
59275         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59276       else
59277         dir="`$DIRNAME "$path"`"
59278         base="`$BASENAME "$path"`"
59279         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59280       fi
59281     fi
59282   fi
59283 
59284 
59285   # Only process if variable expands to non-empty
59286 
59287   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59288     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59289 
59290   # Input might be given as Windows format, start by converting to
59291   # unix format.
59292   path="$POTENTIAL_FREETYPE_LIB_PATH"
59293   new_path=`$CYGPATH -u "$path"`
59294 
59295   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59296   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59297   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59298   # "foo.exe" is OK but "foo" is an error.
59299   #
59300   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59301   # It is also a way to make sure we got the proper file name for the real test later on.
59302   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59303   if test "x$test_shortpath" = x; then
59304     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59305 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59306     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59307   fi
59308 
59309   # Call helper function which possibly converts this using DOS-style short mode.
59310   # If so, the updated path is stored in $new_path.
59311 
59312   input_path="$new_path"
59313   # Check if we need to convert this using DOS-style short mode. If the path
59314   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59315   # take no chances and rewrite it.
59316   # Note: m4 eats our [], so we need to use [ and ] instead.
59317   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59318   if test "x$has_forbidden_chars" != x; then
59319     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59320     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59321     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59322     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59323       # Going to short mode and back again did indeed matter. Since short mode is
59324       # case insensitive, let's make it lowercase to improve readability.
59325       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59326       # Now convert it back to Unix-style (cygpath)
59327       input_path=`$CYGPATH -u "$shortmode_path"`
59328       new_path="$input_path"
59329     fi
59330   fi
59331 
59332   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59333   if test "x$test_cygdrive_prefix" = x; then
59334     # As a simple fix, exclude /usr/bin since it's not a real path.
59335     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59336       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59337       # a path prefixed by /cygdrive for fixpath to work.
59338       new_path="$CYGWIN_ROOT_PATH$input_path"
59339     fi
59340   fi
59341 
59342 
59343   if test "x$path" != "x$new_path"; then
59344     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59345     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59346 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59347   fi
59348 
59349     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59350 
59351   path="$POTENTIAL_FREETYPE_LIB_PATH"
59352   has_colon=`$ECHO $path | $GREP ^.:`
59353   new_path="$path"
59354   if test "x$has_colon" = x; then
59355     # Not in mixed or Windows style, start by that.
59356     new_path=`cmd //c echo $path`
59357   fi
59358 
59359 
59360   input_path="$new_path"
59361   # Check if we need to convert this using DOS-style short mode. If the path
59362   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59363   # take no chances and rewrite it.
59364   # Note: m4 eats our [], so we need to use [ and ] instead.
59365   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59366   if test "x$has_forbidden_chars" != x; then
59367     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59368     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59369   fi
59370 
59371 
59372   windows_path="$new_path"
59373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59374     unix_path=`$CYGPATH -u "$windows_path"`
59375     new_path="$unix_path"
59376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59377     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59378     new_path="$unix_path"
59379   fi
59380 
59381   if test "x$path" != "x$new_path"; then
59382     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59383     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59384 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59385   fi
59386 
59387   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59388   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59389 
59390     else
59391       # We're on a unix platform. Hooray! :)
59392       path="$POTENTIAL_FREETYPE_LIB_PATH"
59393       has_space=`$ECHO "$path" | $GREP " "`
59394       if test "x$has_space" != x; then
59395         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59396 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59397         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59398       fi
59399 
59400       # Use eval to expand a potential ~
59401       eval path="$path"
59402       if test ! -f "$path" && test ! -d "$path"; then
59403         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59404       fi
59405 
59406       if test -d "$path"; then
59407         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59408       else
59409         dir="`$DIRNAME "$path"`"
59410         base="`$BASENAME "$path"`"
59411         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59412       fi
59413     fi
59414   fi
59415 
59416 
59417     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59418     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59419 $as_echo_n "checking for freetype includes... " >&6; }
59420     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59421 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59422     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59423     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59424 $as_echo_n "checking for freetype libraries... " >&6; }
59425     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59426 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59427   fi
59428 
59429               else
59430 
59431   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59432   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59433   METHOD="well-known location"
59434 
59435   # Let's start with an optimistic view of the world :-)
59436   FOUND_FREETYPE=yes
59437 
59438   # First look for the canonical freetype main include file ft2build.h.
59439   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59440     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59441     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59442     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59443       # Fail.
59444       FOUND_FREETYPE=no
59445     fi
59446   fi
59447 
59448   if test "x$FOUND_FREETYPE" = xyes; then
59449     # Include file found, let's continue the sanity check.
59450     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59451 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59452 
59453     # Reset to default value
59454     FREETYPE_BASE_NAME=freetype
59455     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59456     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59457       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59458           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59459         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59460         # for the .6 version explicitly.
59461         FREETYPE_BASE_NAME=freetype.6
59462         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59463         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59464 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59465       else
59466         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59467 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59468         FOUND_FREETYPE=no
59469       fi
59470     else
59471       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59472         # On Windows, we will need both .lib and .dll file.
59473         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59474           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59475 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59476           FOUND_FREETYPE=no
59477         fi
59478       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59479           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59480         # Found lib in isa dir, use that instead.
59481         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59482         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59483 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59484       fi
59485     fi
59486   fi
59487 
59488   if test "x$FOUND_FREETYPE" = xyes; then
59489 
59490   # Only process if variable expands to non-empty
59491 
59492   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59493     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59494 
59495   # Input might be given as Windows format, start by converting to
59496   # unix format.
59497   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59498   new_path=`$CYGPATH -u "$path"`
59499 
59500   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59501   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59502   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59503   # "foo.exe" is OK but "foo" is an error.
59504   #
59505   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59506   # It is also a way to make sure we got the proper file name for the real test later on.
59507   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59508   if test "x$test_shortpath" = x; then
59509     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59510 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59511     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59512   fi
59513 
59514   # Call helper function which possibly converts this using DOS-style short mode.
59515   # If so, the updated path is stored in $new_path.
59516 
59517   input_path="$new_path"
59518   # Check if we need to convert this using DOS-style short mode. If the path
59519   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59520   # take no chances and rewrite it.
59521   # Note: m4 eats our [], so we need to use [ and ] instead.
59522   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59523   if test "x$has_forbidden_chars" != x; then
59524     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59525     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59526     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59527     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59528       # Going to short mode and back again did indeed matter. Since short mode is
59529       # case insensitive, let's make it lowercase to improve readability.
59530       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59531       # Now convert it back to Unix-style (cygpath)
59532       input_path=`$CYGPATH -u "$shortmode_path"`
59533       new_path="$input_path"
59534     fi
59535   fi
59536 
59537   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59538   if test "x$test_cygdrive_prefix" = x; then
59539     # As a simple fix, exclude /usr/bin since it's not a real path.
59540     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59541       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59542       # a path prefixed by /cygdrive for fixpath to work.
59543       new_path="$CYGWIN_ROOT_PATH$input_path"
59544     fi
59545   fi
59546 
59547 
59548   if test "x$path" != "x$new_path"; then
59549     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59550     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59551 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59552   fi
59553 
59554     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59555 
59556   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59557   has_colon=`$ECHO $path | $GREP ^.:`
59558   new_path="$path"
59559   if test "x$has_colon" = x; then
59560     # Not in mixed or Windows style, start by that.
59561     new_path=`cmd //c echo $path`
59562   fi
59563 
59564 
59565   input_path="$new_path"
59566   # Check if we need to convert this using DOS-style short mode. If the path
59567   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59568   # take no chances and rewrite it.
59569   # Note: m4 eats our [], so we need to use [ and ] instead.
59570   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59571   if test "x$has_forbidden_chars" != x; then
59572     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59573     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59574   fi
59575 
59576 
59577   windows_path="$new_path"
59578   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59579     unix_path=`$CYGPATH -u "$windows_path"`
59580     new_path="$unix_path"
59581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59582     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59583     new_path="$unix_path"
59584   fi
59585 
59586   if test "x$path" != "x$new_path"; then
59587     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59588     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59589 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59590   fi
59591 
59592   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59593   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59594 
59595     else
59596       # We're on a unix platform. Hooray! :)
59597       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59598       has_space=`$ECHO "$path" | $GREP " "`
59599       if test "x$has_space" != x; then
59600         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59601 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59602         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59603       fi
59604 
59605       # Use eval to expand a potential ~
59606       eval path="$path"
59607       if test ! -f "$path" && test ! -d "$path"; then
59608         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59609       fi
59610 
59611       if test -d "$path"; then
59612         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59613       else
59614         dir="`$DIRNAME "$path"`"
59615         base="`$BASENAME "$path"`"
59616         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59617       fi
59618     fi
59619   fi
59620 
59621 
59622   # Only process if variable expands to non-empty
59623 
59624   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59625     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59626 
59627   # Input might be given as Windows format, start by converting to
59628   # unix format.
59629   path="$POTENTIAL_FREETYPE_LIB_PATH"
59630   new_path=`$CYGPATH -u "$path"`
59631 
59632   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59633   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59634   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59635   # "foo.exe" is OK but "foo" is an error.
59636   #
59637   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59638   # It is also a way to make sure we got the proper file name for the real test later on.
59639   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59640   if test "x$test_shortpath" = x; then
59641     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59642 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59643     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59644   fi
59645 
59646   # Call helper function which possibly converts this using DOS-style short mode.
59647   # If so, the updated path is stored in $new_path.
59648 
59649   input_path="$new_path"
59650   # Check if we need to convert this using DOS-style short mode. If the path
59651   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59652   # take no chances and rewrite it.
59653   # Note: m4 eats our [], so we need to use [ and ] instead.
59654   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59655   if test "x$has_forbidden_chars" != x; then
59656     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59657     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59658     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59659     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59660       # Going to short mode and back again did indeed matter. Since short mode is
59661       # case insensitive, let's make it lowercase to improve readability.
59662       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59663       # Now convert it back to Unix-style (cygpath)
59664       input_path=`$CYGPATH -u "$shortmode_path"`
59665       new_path="$input_path"
59666     fi
59667   fi
59668 
59669   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59670   if test "x$test_cygdrive_prefix" = x; then
59671     # As a simple fix, exclude /usr/bin since it's not a real path.
59672     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59673       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59674       # a path prefixed by /cygdrive for fixpath to work.
59675       new_path="$CYGWIN_ROOT_PATH$input_path"
59676     fi
59677   fi
59678 
59679 
59680   if test "x$path" != "x$new_path"; then
59681     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59682     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59683 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59684   fi
59685 
59686     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59687 
59688   path="$POTENTIAL_FREETYPE_LIB_PATH"
59689   has_colon=`$ECHO $path | $GREP ^.:`
59690   new_path="$path"
59691   if test "x$has_colon" = x; then
59692     # Not in mixed or Windows style, start by that.
59693     new_path=`cmd //c echo $path`
59694   fi
59695 
59696 
59697   input_path="$new_path"
59698   # Check if we need to convert this using DOS-style short mode. If the path
59699   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59700   # take no chances and rewrite it.
59701   # Note: m4 eats our [], so we need to use [ and ] instead.
59702   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59703   if test "x$has_forbidden_chars" != x; then
59704     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59705     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59706   fi
59707 
59708 
59709   windows_path="$new_path"
59710   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59711     unix_path=`$CYGPATH -u "$windows_path"`
59712     new_path="$unix_path"
59713   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59714     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59715     new_path="$unix_path"
59716   fi
59717 
59718   if test "x$path" != "x$new_path"; then
59719     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59720     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59721 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59722   fi
59723 
59724   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59725   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59726 
59727     else
59728       # We're on a unix platform. Hooray! :)
59729       path="$POTENTIAL_FREETYPE_LIB_PATH"
59730       has_space=`$ECHO "$path" | $GREP " "`
59731       if test "x$has_space" != x; then
59732         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59733 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59734         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59735       fi
59736 
59737       # Use eval to expand a potential ~
59738       eval path="$path"
59739       if test ! -f "$path" && test ! -d "$path"; then
59740         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59741       fi
59742 
59743       if test -d "$path"; then
59744         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59745       else
59746         dir="`$DIRNAME "$path"`"
59747         base="`$BASENAME "$path"`"
59748         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59749       fi
59750     fi
59751   fi
59752 
59753 
59754     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59755     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59756 $as_echo_n "checking for freetype includes... " >&6; }
59757     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59758 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59759     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59760     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59761 $as_echo_n "checking for freetype libraries... " >&6; }
59762     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59763 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59764   fi
59765 
59766               fi
59767             fi
59768           fi
59769         else
59770           FREETYPE_BASE_DIR="$SYSROOT/usr"
59771 
59772   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59773   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59774   METHOD="well-known location"
59775 
59776   # Let's start with an optimistic view of the world :-)
59777   FOUND_FREETYPE=yes
59778 
59779   # First look for the canonical freetype main include file ft2build.h.
59780   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59781     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59782     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59783     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59784       # Fail.
59785       FOUND_FREETYPE=no
59786     fi
59787   fi
59788 
59789   if test "x$FOUND_FREETYPE" = xyes; then
59790     # Include file found, let's continue the sanity check.
59791     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59792 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59793 
59794     # Reset to default value
59795     FREETYPE_BASE_NAME=freetype
59796     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59797     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59798       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59799           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59800         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59801         # for the .6 version explicitly.
59802         FREETYPE_BASE_NAME=freetype.6
59803         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59804         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59805 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59806       else
59807         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59808 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59809         FOUND_FREETYPE=no
59810       fi
59811     else
59812       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59813         # On Windows, we will need both .lib and .dll file.
59814         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59815           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59816 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59817           FOUND_FREETYPE=no
59818         fi
59819       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59820           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59821         # Found lib in isa dir, use that instead.
59822         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59823         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59824 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59825       fi
59826     fi
59827   fi
59828 
59829   if test "x$FOUND_FREETYPE" = xyes; then
59830 
59831   # Only process if variable expands to non-empty
59832 
59833   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59834     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59835 
59836   # Input might be given as Windows format, start by converting to
59837   # unix format.
59838   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59839   new_path=`$CYGPATH -u "$path"`
59840 
59841   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59842   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59843   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59844   # "foo.exe" is OK but "foo" is an error.
59845   #
59846   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59847   # It is also a way to make sure we got the proper file name for the real test later on.
59848   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59849   if test "x$test_shortpath" = x; then
59850     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59851 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59852     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59853   fi
59854 
59855   # Call helper function which possibly converts this using DOS-style short mode.
59856   # If so, the updated path is stored in $new_path.
59857 
59858   input_path="$new_path"
59859   # Check if we need to convert this using DOS-style short mode. If the path
59860   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59861   # take no chances and rewrite it.
59862   # Note: m4 eats our [], so we need to use [ and ] instead.
59863   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59864   if test "x$has_forbidden_chars" != x; then
59865     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59866     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59867     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59868     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59869       # Going to short mode and back again did indeed matter. Since short mode is
59870       # case insensitive, let's make it lowercase to improve readability.
59871       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59872       # Now convert it back to Unix-style (cygpath)
59873       input_path=`$CYGPATH -u "$shortmode_path"`
59874       new_path="$input_path"
59875     fi
59876   fi
59877 
59878   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59879   if test "x$test_cygdrive_prefix" = x; then
59880     # As a simple fix, exclude /usr/bin since it's not a real path.
59881     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59882       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59883       # a path prefixed by /cygdrive for fixpath to work.
59884       new_path="$CYGWIN_ROOT_PATH$input_path"
59885     fi
59886   fi
59887 
59888 
59889   if test "x$path" != "x$new_path"; then
59890     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59891     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59892 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59893   fi
59894 
59895     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59896 
59897   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59898   has_colon=`$ECHO $path | $GREP ^.:`
59899   new_path="$path"
59900   if test "x$has_colon" = x; then
59901     # Not in mixed or Windows style, start by that.
59902     new_path=`cmd //c echo $path`
59903   fi
59904 
59905 
59906   input_path="$new_path"
59907   # Check if we need to convert this using DOS-style short mode. If the path
59908   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59909   # take no chances and rewrite it.
59910   # Note: m4 eats our [], so we need to use [ and ] instead.
59911   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59912   if test "x$has_forbidden_chars" != x; then
59913     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59914     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59915   fi
59916 
59917 
59918   windows_path="$new_path"
59919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59920     unix_path=`$CYGPATH -u "$windows_path"`
59921     new_path="$unix_path"
59922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59923     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59924     new_path="$unix_path"
59925   fi
59926 
59927   if test "x$path" != "x$new_path"; then
59928     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59929     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59930 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59931   fi
59932 
59933   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59934   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59935 
59936     else
59937       # We're on a unix platform. Hooray! :)
59938       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59939       has_space=`$ECHO "$path" | $GREP " "`
59940       if test "x$has_space" != x; then
59941         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59942 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59943         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59944       fi
59945 
59946       # Use eval to expand a potential ~
59947       eval path="$path"
59948       if test ! -f "$path" && test ! -d "$path"; then
59949         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59950       fi
59951 
59952       if test -d "$path"; then
59953         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59954       else
59955         dir="`$DIRNAME "$path"`"
59956         base="`$BASENAME "$path"`"
59957         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59958       fi
59959     fi
59960   fi
59961 
59962 
59963   # Only process if variable expands to non-empty
59964 
59965   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59966     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59967 
59968   # Input might be given as Windows format, start by converting to
59969   # unix format.
59970   path="$POTENTIAL_FREETYPE_LIB_PATH"
59971   new_path=`$CYGPATH -u "$path"`
59972 
59973   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59974   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59975   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59976   # "foo.exe" is OK but "foo" is an error.
59977   #
59978   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59979   # It is also a way to make sure we got the proper file name for the real test later on.
59980   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59981   if test "x$test_shortpath" = x; then
59982     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59983 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59984     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59985   fi
59986 
59987   # Call helper function which possibly converts this using DOS-style short mode.
59988   # If so, the updated path is stored in $new_path.
59989 
59990   input_path="$new_path"
59991   # Check if we need to convert this using DOS-style short mode. If the path
59992   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59993   # take no chances and rewrite it.
59994   # Note: m4 eats our [], so we need to use [ and ] instead.
59995   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59996   if test "x$has_forbidden_chars" != x; then
59997     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59998     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59999     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60000     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60001       # Going to short mode and back again did indeed matter. Since short mode is
60002       # case insensitive, let's make it lowercase to improve readability.
60003       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60004       # Now convert it back to Unix-style (cygpath)
60005       input_path=`$CYGPATH -u "$shortmode_path"`
60006       new_path="$input_path"
60007     fi
60008   fi
60009 
60010   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60011   if test "x$test_cygdrive_prefix" = x; then
60012     # As a simple fix, exclude /usr/bin since it's not a real path.
60013     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60014       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60015       # a path prefixed by /cygdrive for fixpath to work.
60016       new_path="$CYGWIN_ROOT_PATH$input_path"
60017     fi
60018   fi
60019 
60020 
60021   if test "x$path" != "x$new_path"; then
60022     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60023     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60024 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60025   fi
60026 
60027     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60028 
60029   path="$POTENTIAL_FREETYPE_LIB_PATH"
60030   has_colon=`$ECHO $path | $GREP ^.:`
60031   new_path="$path"
60032   if test "x$has_colon" = x; then
60033     # Not in mixed or Windows style, start by that.
60034     new_path=`cmd //c echo $path`
60035   fi
60036 
60037 
60038   input_path="$new_path"
60039   # Check if we need to convert this using DOS-style short mode. If the path
60040   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60041   # take no chances and rewrite it.
60042   # Note: m4 eats our [], so we need to use [ and ] instead.
60043   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60044   if test "x$has_forbidden_chars" != x; then
60045     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60046     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60047   fi
60048 
60049 
60050   windows_path="$new_path"
60051   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60052     unix_path=`$CYGPATH -u "$windows_path"`
60053     new_path="$unix_path"
60054   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60055     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60056     new_path="$unix_path"
60057   fi
60058 
60059   if test "x$path" != "x$new_path"; then
60060     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60061     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60062 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60063   fi
60064 
60065   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60066   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60067 
60068     else
60069       # We're on a unix platform. Hooray! :)
60070       path="$POTENTIAL_FREETYPE_LIB_PATH"
60071       has_space=`$ECHO "$path" | $GREP " "`
60072       if test "x$has_space" != x; then
60073         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60074 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60075         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60076       fi
60077 
60078       # Use eval to expand a potential ~
60079       eval path="$path"
60080       if test ! -f "$path" && test ! -d "$path"; then
60081         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60082       fi
60083 
60084       if test -d "$path"; then
60085         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60086       else
60087         dir="`$DIRNAME "$path"`"
60088         base="`$BASENAME "$path"`"
60089         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60090       fi
60091     fi
60092   fi
60093 
60094 
60095     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60096     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60097 $as_echo_n "checking for freetype includes... " >&6; }
60098     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60099 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60100     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60101     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60102 $as_echo_n "checking for freetype libraries... " >&6; }
60103     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60104 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60105   fi
60106 
60107 
60108           if test "x$FOUND_FREETYPE" != xyes; then
60109             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60110 
60111   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60112   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60113   METHOD="well-known location"
60114 
60115   # Let's start with an optimistic view of the world :-)
60116   FOUND_FREETYPE=yes
60117 
60118   # First look for the canonical freetype main include file ft2build.h.
60119   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60120     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60121     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60122     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60123       # Fail.
60124       FOUND_FREETYPE=no
60125     fi
60126   fi
60127 
60128   if test "x$FOUND_FREETYPE" = xyes; then
60129     # Include file found, let's continue the sanity check.
60130     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60131 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60132 
60133     # Reset to default value
60134     FREETYPE_BASE_NAME=freetype
60135     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60136     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60137       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60138           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60139         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60140         # for the .6 version explicitly.
60141         FREETYPE_BASE_NAME=freetype.6
60142         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60143         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60144 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60145       else
60146         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60147 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60148         FOUND_FREETYPE=no
60149       fi
60150     else
60151       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60152         # On Windows, we will need both .lib and .dll file.
60153         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60154           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60155 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60156           FOUND_FREETYPE=no
60157         fi
60158       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60159           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60160         # Found lib in isa dir, use that instead.
60161         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60162         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60163 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60164       fi
60165     fi
60166   fi
60167 
60168   if test "x$FOUND_FREETYPE" = xyes; then
60169 
60170   # Only process if variable expands to non-empty
60171 
60172   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60173     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60174 
60175   # Input might be given as Windows format, start by converting to
60176   # unix format.
60177   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60178   new_path=`$CYGPATH -u "$path"`
60179 
60180   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60181   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60182   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60183   # "foo.exe" is OK but "foo" is an error.
60184   #
60185   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60186   # It is also a way to make sure we got the proper file name for the real test later on.
60187   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60188   if test "x$test_shortpath" = x; then
60189     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60190 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60191     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60192   fi
60193 
60194   # Call helper function which possibly converts this using DOS-style short mode.
60195   # If so, the updated path is stored in $new_path.
60196 
60197   input_path="$new_path"
60198   # Check if we need to convert this using DOS-style short mode. If the path
60199   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60200   # take no chances and rewrite it.
60201   # Note: m4 eats our [], so we need to use [ and ] instead.
60202   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60203   if test "x$has_forbidden_chars" != x; then
60204     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60205     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60206     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60207     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60208       # Going to short mode and back again did indeed matter. Since short mode is
60209       # case insensitive, let's make it lowercase to improve readability.
60210       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60211       # Now convert it back to Unix-style (cygpath)
60212       input_path=`$CYGPATH -u "$shortmode_path"`
60213       new_path="$input_path"
60214     fi
60215   fi
60216 
60217   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60218   if test "x$test_cygdrive_prefix" = x; then
60219     # As a simple fix, exclude /usr/bin since it's not a real path.
60220     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60221       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60222       # a path prefixed by /cygdrive for fixpath to work.
60223       new_path="$CYGWIN_ROOT_PATH$input_path"
60224     fi
60225   fi
60226 
60227 
60228   if test "x$path" != "x$new_path"; then
60229     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60230     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60231 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60232   fi
60233 
60234     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60235 
60236   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60237   has_colon=`$ECHO $path | $GREP ^.:`
60238   new_path="$path"
60239   if test "x$has_colon" = x; then
60240     # Not in mixed or Windows style, start by that.
60241     new_path=`cmd //c echo $path`
60242   fi
60243 
60244 
60245   input_path="$new_path"
60246   # Check if we need to convert this using DOS-style short mode. If the path
60247   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60248   # take no chances and rewrite it.
60249   # Note: m4 eats our [], so we need to use [ and ] instead.
60250   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60251   if test "x$has_forbidden_chars" != x; then
60252     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60253     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60254   fi
60255 
60256 
60257   windows_path="$new_path"
60258   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60259     unix_path=`$CYGPATH -u "$windows_path"`
60260     new_path="$unix_path"
60261   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60262     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60263     new_path="$unix_path"
60264   fi
60265 
60266   if test "x$path" != "x$new_path"; then
60267     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60268     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60269 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60270   fi
60271 
60272   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60273   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60274 
60275     else
60276       # We're on a unix platform. Hooray! :)
60277       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60278       has_space=`$ECHO "$path" | $GREP " "`
60279       if test "x$has_space" != x; then
60280         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60281 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60282         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60283       fi
60284 
60285       # Use eval to expand a potential ~
60286       eval path="$path"
60287       if test ! -f "$path" && test ! -d "$path"; then
60288         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60289       fi
60290 
60291       if test -d "$path"; then
60292         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60293       else
60294         dir="`$DIRNAME "$path"`"
60295         base="`$BASENAME "$path"`"
60296         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60297       fi
60298     fi
60299   fi
60300 
60301 
60302   # Only process if variable expands to non-empty
60303 
60304   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60305     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60306 
60307   # Input might be given as Windows format, start by converting to
60308   # unix format.
60309   path="$POTENTIAL_FREETYPE_LIB_PATH"
60310   new_path=`$CYGPATH -u "$path"`
60311 
60312   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60313   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60314   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60315   # "foo.exe" is OK but "foo" is an error.
60316   #
60317   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60318   # It is also a way to make sure we got the proper file name for the real test later on.
60319   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60320   if test "x$test_shortpath" = x; then
60321     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60322 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60323     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60324   fi
60325 
60326   # Call helper function which possibly converts this using DOS-style short mode.
60327   # If so, the updated path is stored in $new_path.
60328 
60329   input_path="$new_path"
60330   # Check if we need to convert this using DOS-style short mode. If the path
60331   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60332   # take no chances and rewrite it.
60333   # Note: m4 eats our [], so we need to use [ and ] instead.
60334   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60335   if test "x$has_forbidden_chars" != x; then
60336     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60337     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60338     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60339     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60340       # Going to short mode and back again did indeed matter. Since short mode is
60341       # case insensitive, let's make it lowercase to improve readability.
60342       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60343       # Now convert it back to Unix-style (cygpath)
60344       input_path=`$CYGPATH -u "$shortmode_path"`
60345       new_path="$input_path"
60346     fi
60347   fi
60348 
60349   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60350   if test "x$test_cygdrive_prefix" = x; then
60351     # As a simple fix, exclude /usr/bin since it's not a real path.
60352     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60353       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60354       # a path prefixed by /cygdrive for fixpath to work.
60355       new_path="$CYGWIN_ROOT_PATH$input_path"
60356     fi
60357   fi
60358 
60359 
60360   if test "x$path" != "x$new_path"; then
60361     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60362     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60363 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60364   fi
60365 
60366     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60367 
60368   path="$POTENTIAL_FREETYPE_LIB_PATH"
60369   has_colon=`$ECHO $path | $GREP ^.:`
60370   new_path="$path"
60371   if test "x$has_colon" = x; then
60372     # Not in mixed or Windows style, start by that.
60373     new_path=`cmd //c echo $path`
60374   fi
60375 
60376 
60377   input_path="$new_path"
60378   # Check if we need to convert this using DOS-style short mode. If the path
60379   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60380   # take no chances and rewrite it.
60381   # Note: m4 eats our [], so we need to use [ and ] instead.
60382   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60383   if test "x$has_forbidden_chars" != x; then
60384     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60385     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60386   fi
60387 
60388 
60389   windows_path="$new_path"
60390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60391     unix_path=`$CYGPATH -u "$windows_path"`
60392     new_path="$unix_path"
60393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60394     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60395     new_path="$unix_path"
60396   fi
60397 
60398   if test "x$path" != "x$new_path"; then
60399     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60400     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60401 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60402   fi
60403 
60404   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60405   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60406 
60407     else
60408       # We're on a unix platform. Hooray! :)
60409       path="$POTENTIAL_FREETYPE_LIB_PATH"
60410       has_space=`$ECHO "$path" | $GREP " "`
60411       if test "x$has_space" != x; then
60412         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60413 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60414         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60415       fi
60416 
60417       # Use eval to expand a potential ~
60418       eval path="$path"
60419       if test ! -f "$path" && test ! -d "$path"; then
60420         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60421       fi
60422 
60423       if test -d "$path"; then
60424         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60425       else
60426         dir="`$DIRNAME "$path"`"
60427         base="`$BASENAME "$path"`"
60428         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60429       fi
60430     fi
60431   fi
60432 
60433 
60434     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60435     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60436 $as_echo_n "checking for freetype includes... " >&6; }
60437     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60438 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60439     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60440     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60441 $as_echo_n "checking for freetype libraries... " >&6; }
60442     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60443 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60444   fi
60445 
60446           fi
60447 
60448           if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60449             if test "x$FOUND_FREETYPE" != xyes; then
60450               # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60451               FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60452 
60453   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60454   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60455   METHOD="well-known location"
60456 
60457   # Let's start with an optimistic view of the world :-)
60458   FOUND_FREETYPE=yes
60459 
60460   # First look for the canonical freetype main include file ft2build.h.
60461   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60462     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60463     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60464     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60465       # Fail.
60466       FOUND_FREETYPE=no
60467     fi
60468   fi
60469 
60470   if test "x$FOUND_FREETYPE" = xyes; then
60471     # Include file found, let's continue the sanity check.
60472     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60473 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60474 
60475     # Reset to default value
60476     FREETYPE_BASE_NAME=freetype
60477     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60478     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60479       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60480           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60481         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60482         # for the .6 version explicitly.
60483         FREETYPE_BASE_NAME=freetype.6
60484         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60485         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60486 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60487       else
60488         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60489 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60490         FOUND_FREETYPE=no
60491       fi
60492     else
60493       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60494         # On Windows, we will need both .lib and .dll file.
60495         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60496           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60497 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60498           FOUND_FREETYPE=no
60499         fi
60500       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60501           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60502         # Found lib in isa dir, use that instead.
60503         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60504         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60505 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60506       fi
60507     fi
60508   fi
60509 
60510   if test "x$FOUND_FREETYPE" = xyes; then
60511 
60512   # Only process if variable expands to non-empty
60513 
60514   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60515     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60516 
60517   # Input might be given as Windows format, start by converting to
60518   # unix format.
60519   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60520   new_path=`$CYGPATH -u "$path"`
60521 
60522   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60523   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60524   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60525   # "foo.exe" is OK but "foo" is an error.
60526   #
60527   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60528   # It is also a way to make sure we got the proper file name for the real test later on.
60529   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60530   if test "x$test_shortpath" = x; then
60531     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60532 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60533     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60534   fi
60535 
60536   # Call helper function which possibly converts this using DOS-style short mode.
60537   # If so, the updated path is stored in $new_path.
60538 
60539   input_path="$new_path"
60540   # Check if we need to convert this using DOS-style short mode. If the path
60541   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60542   # take no chances and rewrite it.
60543   # Note: m4 eats our [], so we need to use [ and ] instead.
60544   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60545   if test "x$has_forbidden_chars" != x; then
60546     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60547     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60548     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60549     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60550       # Going to short mode and back again did indeed matter. Since short mode is
60551       # case insensitive, let's make it lowercase to improve readability.
60552       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60553       # Now convert it back to Unix-style (cygpath)
60554       input_path=`$CYGPATH -u "$shortmode_path"`
60555       new_path="$input_path"
60556     fi
60557   fi
60558 
60559   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60560   if test "x$test_cygdrive_prefix" = x; then
60561     # As a simple fix, exclude /usr/bin since it's not a real path.
60562     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60563       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60564       # a path prefixed by /cygdrive for fixpath to work.
60565       new_path="$CYGWIN_ROOT_PATH$input_path"
60566     fi
60567   fi
60568 
60569 
60570   if test "x$path" != "x$new_path"; then
60571     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60572     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60573 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60574   fi
60575 
60576     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60577 
60578   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60579   has_colon=`$ECHO $path | $GREP ^.:`
60580   new_path="$path"
60581   if test "x$has_colon" = x; then
60582     # Not in mixed or Windows style, start by that.
60583     new_path=`cmd //c echo $path`
60584   fi
60585 
60586 
60587   input_path="$new_path"
60588   # Check if we need to convert this using DOS-style short mode. If the path
60589   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60590   # take no chances and rewrite it.
60591   # Note: m4 eats our [], so we need to use [ and ] instead.
60592   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60593   if test "x$has_forbidden_chars" != x; then
60594     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60595     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60596   fi
60597 
60598 
60599   windows_path="$new_path"
60600   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60601     unix_path=`$CYGPATH -u "$windows_path"`
60602     new_path="$unix_path"
60603   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60604     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60605     new_path="$unix_path"
60606   fi
60607 
60608   if test "x$path" != "x$new_path"; then
60609     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60610     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60611 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60612   fi
60613 
60614   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60615   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60616 
60617     else
60618       # We're on a unix platform. Hooray! :)
60619       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60620       has_space=`$ECHO "$path" | $GREP " "`
60621       if test "x$has_space" != x; then
60622         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60623 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60624         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60625       fi
60626 
60627       # Use eval to expand a potential ~
60628       eval path="$path"
60629       if test ! -f "$path" && test ! -d "$path"; then
60630         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60631       fi
60632 
60633       if test -d "$path"; then
60634         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60635       else
60636         dir="`$DIRNAME "$path"`"
60637         base="`$BASENAME "$path"`"
60638         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60639       fi
60640     fi
60641   fi
60642 
60643 
60644   # Only process if variable expands to non-empty
60645 
60646   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60647     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60648 
60649   # Input might be given as Windows format, start by converting to
60650   # unix format.
60651   path="$POTENTIAL_FREETYPE_LIB_PATH"
60652   new_path=`$CYGPATH -u "$path"`
60653 
60654   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60655   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60656   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60657   # "foo.exe" is OK but "foo" is an error.
60658   #
60659   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60660   # It is also a way to make sure we got the proper file name for the real test later on.
60661   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60662   if test "x$test_shortpath" = x; then
60663     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60664 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60665     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60666   fi
60667 
60668   # Call helper function which possibly converts this using DOS-style short mode.
60669   # If so, the updated path is stored in $new_path.
60670 
60671   input_path="$new_path"
60672   # Check if we need to convert this using DOS-style short mode. If the path
60673   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60674   # take no chances and rewrite it.
60675   # Note: m4 eats our [], so we need to use [ and ] instead.
60676   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60677   if test "x$has_forbidden_chars" != x; then
60678     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60679     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60680     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60681     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60682       # Going to short mode and back again did indeed matter. Since short mode is
60683       # case insensitive, let's make it lowercase to improve readability.
60684       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60685       # Now convert it back to Unix-style (cygpath)
60686       input_path=`$CYGPATH -u "$shortmode_path"`
60687       new_path="$input_path"
60688     fi
60689   fi
60690 
60691   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60692   if test "x$test_cygdrive_prefix" = x; then
60693     # As a simple fix, exclude /usr/bin since it's not a real path.
60694     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60695       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60696       # a path prefixed by /cygdrive for fixpath to work.
60697       new_path="$CYGWIN_ROOT_PATH$input_path"
60698     fi
60699   fi
60700 
60701 
60702   if test "x$path" != "x$new_path"; then
60703     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60704     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60705 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60706   fi
60707 
60708     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60709 
60710   path="$POTENTIAL_FREETYPE_LIB_PATH"
60711   has_colon=`$ECHO $path | $GREP ^.:`
60712   new_path="$path"
60713   if test "x$has_colon" = x; then
60714     # Not in mixed or Windows style, start by that.
60715     new_path=`cmd //c echo $path`
60716   fi
60717 
60718 
60719   input_path="$new_path"
60720   # Check if we need to convert this using DOS-style short mode. If the path
60721   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60722   # take no chances and rewrite it.
60723   # Note: m4 eats our [], so we need to use [ and ] instead.
60724   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60725   if test "x$has_forbidden_chars" != x; then
60726     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60727     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60728   fi
60729 
60730 
60731   windows_path="$new_path"
60732   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60733     unix_path=`$CYGPATH -u "$windows_path"`
60734     new_path="$unix_path"
60735   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60736     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60737     new_path="$unix_path"
60738   fi
60739 
60740   if test "x$path" != "x$new_path"; then
60741     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60742     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60743 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60744   fi
60745 
60746   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60747   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60748 
60749     else
60750       # We're on a unix platform. Hooray! :)
60751       path="$POTENTIAL_FREETYPE_LIB_PATH"
60752       has_space=`$ECHO "$path" | $GREP " "`
60753       if test "x$has_space" != x; then
60754         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60755 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60756         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60757       fi
60758 
60759       # Use eval to expand a potential ~
60760       eval path="$path"
60761       if test ! -f "$path" && test ! -d "$path"; then
60762         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60763       fi
60764 
60765       if test -d "$path"; then
60766         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60767       else
60768         dir="`$DIRNAME "$path"`"
60769         base="`$BASENAME "$path"`"
60770         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60771       fi
60772     fi
60773   fi
60774 
60775 
60776     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60777     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60778 $as_echo_n "checking for freetype includes... " >&6; }
60779     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60780 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60781     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60782     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60783 $as_echo_n "checking for freetype libraries... " >&6; }
60784     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60785 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60786   fi
60787 
60788             fi
60789           fi
60790 
60791           if test "x$FOUND_FREETYPE" != xyes; then
60792             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
60793 
60794   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60795   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60796   METHOD="well-known location"
60797 
60798   # Let's start with an optimistic view of the world :-)
60799   FOUND_FREETYPE=yes
60800 
60801   # First look for the canonical freetype main include file ft2build.h.
60802   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60803     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60804     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60805     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60806       # Fail.
60807       FOUND_FREETYPE=no
60808     fi
60809   fi
60810 
60811   if test "x$FOUND_FREETYPE" = xyes; then
60812     # Include file found, let's continue the sanity check.
60813     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60814 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60815 
60816     # Reset to default value
60817     FREETYPE_BASE_NAME=freetype
60818     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60819     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60820       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60821           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60822         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60823         # for the .6 version explicitly.
60824         FREETYPE_BASE_NAME=freetype.6
60825         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60826         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60827 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60828       else
60829         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60830 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60831         FOUND_FREETYPE=no
60832       fi
60833     else
60834       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60835         # On Windows, we will need both .lib and .dll file.
60836         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60837           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60838 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60839           FOUND_FREETYPE=no
60840         fi
60841       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60842           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60843         # Found lib in isa dir, use that instead.
60844         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60845         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60846 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60847       fi
60848     fi
60849   fi
60850 
60851   if test "x$FOUND_FREETYPE" = xyes; then
60852 
60853   # Only process if variable expands to non-empty
60854 
60855   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60856     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60857 
60858   # Input might be given as Windows format, start by converting to
60859   # unix format.
60860   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60861   new_path=`$CYGPATH -u "$path"`
60862 
60863   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60864   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60865   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60866   # "foo.exe" is OK but "foo" is an error.
60867   #
60868   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60869   # It is also a way to make sure we got the proper file name for the real test later on.
60870   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60871   if test "x$test_shortpath" = x; then
60872     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60873 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60874     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60875   fi
60876 
60877   # Call helper function which possibly converts this using DOS-style short mode.
60878   # If so, the updated path is stored in $new_path.
60879 
60880   input_path="$new_path"
60881   # Check if we need to convert this using DOS-style short mode. If the path
60882   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60883   # take no chances and rewrite it.
60884   # Note: m4 eats our [], so we need to use [ and ] instead.
60885   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60886   if test "x$has_forbidden_chars" != x; then
60887     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60888     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60889     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60890     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60891       # Going to short mode and back again did indeed matter. Since short mode is
60892       # case insensitive, let's make it lowercase to improve readability.
60893       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60894       # Now convert it back to Unix-style (cygpath)
60895       input_path=`$CYGPATH -u "$shortmode_path"`
60896       new_path="$input_path"
60897     fi
60898   fi
60899 
60900   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60901   if test "x$test_cygdrive_prefix" = x; then
60902     # As a simple fix, exclude /usr/bin since it's not a real path.
60903     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60904       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60905       # a path prefixed by /cygdrive for fixpath to work.
60906       new_path="$CYGWIN_ROOT_PATH$input_path"
60907     fi
60908   fi
60909 
60910 
60911   if test "x$path" != "x$new_path"; then
60912     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60913     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60914 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60915   fi
60916 
60917     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60918 
60919   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60920   has_colon=`$ECHO $path | $GREP ^.:`
60921   new_path="$path"
60922   if test "x$has_colon" = x; then
60923     # Not in mixed or Windows style, start by that.
60924     new_path=`cmd //c echo $path`
60925   fi
60926 
60927 
60928   input_path="$new_path"
60929   # Check if we need to convert this using DOS-style short mode. If the path
60930   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60931   # take no chances and rewrite it.
60932   # Note: m4 eats our [], so we need to use [ and ] instead.
60933   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60934   if test "x$has_forbidden_chars" != x; then
60935     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60936     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60937   fi
60938 
60939 
60940   windows_path="$new_path"
60941   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60942     unix_path=`$CYGPATH -u "$windows_path"`
60943     new_path="$unix_path"
60944   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60945     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60946     new_path="$unix_path"
60947   fi
60948 
60949   if test "x$path" != "x$new_path"; then
60950     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60951     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60952 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60953   fi
60954 
60955   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60956   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60957 
60958     else
60959       # We're on a unix platform. Hooray! :)
60960       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60961       has_space=`$ECHO "$path" | $GREP " "`
60962       if test "x$has_space" != x; then
60963         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60964 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60965         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60966       fi
60967 
60968       # Use eval to expand a potential ~
60969       eval path="$path"
60970       if test ! -f "$path" && test ! -d "$path"; then
60971         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60972       fi
60973 
60974       if test -d "$path"; then
60975         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60976       else
60977         dir="`$DIRNAME "$path"`"
60978         base="`$BASENAME "$path"`"
60979         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60980       fi
60981     fi
60982   fi
60983 
60984 
60985   # Only process if variable expands to non-empty
60986 
60987   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60988     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60989 
60990   # Input might be given as Windows format, start by converting to
60991   # unix format.
60992   path="$POTENTIAL_FREETYPE_LIB_PATH"
60993   new_path=`$CYGPATH -u "$path"`
60994 
60995   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60996   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60997   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60998   # "foo.exe" is OK but "foo" is an error.
60999   #
61000   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61001   # It is also a way to make sure we got the proper file name for the real test later on.
61002   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61003   if test "x$test_shortpath" = x; then
61004     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61005 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61006     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61007   fi
61008 
61009   # Call helper function which possibly converts this using DOS-style short mode.
61010   # If so, the updated path is stored in $new_path.
61011 
61012   input_path="$new_path"
61013   # Check if we need to convert this using DOS-style short mode. If the path
61014   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61015   # take no chances and rewrite it.
61016   # Note: m4 eats our [], so we need to use [ and ] instead.
61017   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61018   if test "x$has_forbidden_chars" != x; then
61019     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61020     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61021     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61022     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61023       # Going to short mode and back again did indeed matter. Since short mode is
61024       # case insensitive, let's make it lowercase to improve readability.
61025       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61026       # Now convert it back to Unix-style (cygpath)
61027       input_path=`$CYGPATH -u "$shortmode_path"`
61028       new_path="$input_path"
61029     fi
61030   fi
61031 
61032   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61033   if test "x$test_cygdrive_prefix" = x; then
61034     # As a simple fix, exclude /usr/bin since it's not a real path.
61035     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61036       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61037       # a path prefixed by /cygdrive for fixpath to work.
61038       new_path="$CYGWIN_ROOT_PATH$input_path"
61039     fi
61040   fi
61041 
61042 
61043   if test "x$path" != "x$new_path"; then
61044     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61045     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61046 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61047   fi
61048 
61049     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61050 
61051   path="$POTENTIAL_FREETYPE_LIB_PATH"
61052   has_colon=`$ECHO $path | $GREP ^.:`
61053   new_path="$path"
61054   if test "x$has_colon" = x; then
61055     # Not in mixed or Windows style, start by that.
61056     new_path=`cmd //c echo $path`
61057   fi
61058 
61059 
61060   input_path="$new_path"
61061   # Check if we need to convert this using DOS-style short mode. If the path
61062   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61063   # take no chances and rewrite it.
61064   # Note: m4 eats our [], so we need to use [ and ] instead.
61065   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61066   if test "x$has_forbidden_chars" != x; then
61067     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61068     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61069   fi
61070 
61071 
61072   windows_path="$new_path"
61073   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61074     unix_path=`$CYGPATH -u "$windows_path"`
61075     new_path="$unix_path"
61076   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61077     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61078     new_path="$unix_path"
61079   fi
61080 
61081   if test "x$path" != "x$new_path"; then
61082     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61083     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61084 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61085   fi
61086 
61087   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61088   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61089 
61090     else
61091       # We're on a unix platform. Hooray! :)
61092       path="$POTENTIAL_FREETYPE_LIB_PATH"
61093       has_space=`$ECHO "$path" | $GREP " "`
61094       if test "x$has_space" != x; then
61095         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61096 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61097         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61098       fi
61099 
61100       # Use eval to expand a potential ~
61101       eval path="$path"
61102       if test ! -f "$path" && test ! -d "$path"; then
61103         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61104       fi
61105 
61106       if test -d "$path"; then
61107         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61108       else
61109         dir="`$DIRNAME "$path"`"
61110         base="`$BASENAME "$path"`"
61111         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61112       fi
61113     fi
61114   fi
61115 
61116 
61117     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61118     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61119 $as_echo_n "checking for freetype includes... " >&6; }
61120     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61121 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61122     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61123     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61124 $as_echo_n "checking for freetype libraries... " >&6; }
61125     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61126 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61127   fi
61128 
61129           fi
61130 
61131           if test "x$FOUND_FREETYPE" != xyes; then
61132             FREETYPE_BASE_DIR="$SYSROOT/usr"
61133             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61134 
61135   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61136   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61137   METHOD="well-known location"
61138 
61139   # Let's start with an optimistic view of the world :-)
61140   FOUND_FREETYPE=yes
61141 
61142   # First look for the canonical freetype main include file ft2build.h.
61143   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61144     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61145     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61146     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61147       # Fail.
61148       FOUND_FREETYPE=no
61149     fi
61150   fi
61151 
61152   if test "x$FOUND_FREETYPE" = xyes; then
61153     # Include file found, let's continue the sanity check.
61154     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61155 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61156 
61157     # Reset to default value
61158     FREETYPE_BASE_NAME=freetype
61159     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61160     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61161       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61162           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61163         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61164         # for the .6 version explicitly.
61165         FREETYPE_BASE_NAME=freetype.6
61166         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61167         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61168 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61169       else
61170         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61171 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61172         FOUND_FREETYPE=no
61173       fi
61174     else
61175       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61176         # On Windows, we will need both .lib and .dll file.
61177         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61178           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61179 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61180           FOUND_FREETYPE=no
61181         fi
61182       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61183           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61184         # Found lib in isa dir, use that instead.
61185         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61186         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61187 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61188       fi
61189     fi
61190   fi
61191 
61192   if test "x$FOUND_FREETYPE" = xyes; then
61193 
61194   # Only process if variable expands to non-empty
61195 
61196   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61197     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61198 
61199   # Input might be given as Windows format, start by converting to
61200   # unix format.
61201   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61202   new_path=`$CYGPATH -u "$path"`
61203 
61204   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61205   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61206   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61207   # "foo.exe" is OK but "foo" is an error.
61208   #
61209   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61210   # It is also a way to make sure we got the proper file name for the real test later on.
61211   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61212   if test "x$test_shortpath" = x; then
61213     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61214 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61215     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61216   fi
61217 
61218   # Call helper function which possibly converts this using DOS-style short mode.
61219   # If so, the updated path is stored in $new_path.
61220 
61221   input_path="$new_path"
61222   # Check if we need to convert this using DOS-style short mode. If the path
61223   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61224   # take no chances and rewrite it.
61225   # Note: m4 eats our [], so we need to use [ and ] instead.
61226   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61227   if test "x$has_forbidden_chars" != x; then
61228     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61229     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61230     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61231     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61232       # Going to short mode and back again did indeed matter. Since short mode is
61233       # case insensitive, let's make it lowercase to improve readability.
61234       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61235       # Now convert it back to Unix-style (cygpath)
61236       input_path=`$CYGPATH -u "$shortmode_path"`
61237       new_path="$input_path"
61238     fi
61239   fi
61240 
61241   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61242   if test "x$test_cygdrive_prefix" = x; then
61243     # As a simple fix, exclude /usr/bin since it's not a real path.
61244     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61245       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61246       # a path prefixed by /cygdrive for fixpath to work.
61247       new_path="$CYGWIN_ROOT_PATH$input_path"
61248     fi
61249   fi
61250 
61251 
61252   if test "x$path" != "x$new_path"; then
61253     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61254     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61255 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61256   fi
61257 
61258     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61259 
61260   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61261   has_colon=`$ECHO $path | $GREP ^.:`
61262   new_path="$path"
61263   if test "x$has_colon" = x; then
61264     # Not in mixed or Windows style, start by that.
61265     new_path=`cmd //c echo $path`
61266   fi
61267 
61268 
61269   input_path="$new_path"
61270   # Check if we need to convert this using DOS-style short mode. If the path
61271   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61272   # take no chances and rewrite it.
61273   # Note: m4 eats our [], so we need to use [ and ] instead.
61274   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61275   if test "x$has_forbidden_chars" != x; then
61276     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61277     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61278   fi
61279 
61280 
61281   windows_path="$new_path"
61282   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61283     unix_path=`$CYGPATH -u "$windows_path"`
61284     new_path="$unix_path"
61285   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61286     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61287     new_path="$unix_path"
61288   fi
61289 
61290   if test "x$path" != "x$new_path"; then
61291     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61292     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61293 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61294   fi
61295 
61296   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61297   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61298 
61299     else
61300       # We're on a unix platform. Hooray! :)
61301       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61302       has_space=`$ECHO "$path" | $GREP " "`
61303       if test "x$has_space" != x; then
61304         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61305 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61306         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61307       fi
61308 
61309       # Use eval to expand a potential ~
61310       eval path="$path"
61311       if test ! -f "$path" && test ! -d "$path"; then
61312         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61313       fi
61314 
61315       if test -d "$path"; then
61316         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61317       else
61318         dir="`$DIRNAME "$path"`"
61319         base="`$BASENAME "$path"`"
61320         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61321       fi
61322     fi
61323   fi
61324 
61325 
61326   # Only process if variable expands to non-empty
61327 
61328   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61329     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61330 
61331   # Input might be given as Windows format, start by converting to
61332   # unix format.
61333   path="$POTENTIAL_FREETYPE_LIB_PATH"
61334   new_path=`$CYGPATH -u "$path"`
61335 
61336   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61337   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61338   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61339   # "foo.exe" is OK but "foo" is an error.
61340   #
61341   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61342   # It is also a way to make sure we got the proper file name for the real test later on.
61343   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61344   if test "x$test_shortpath" = x; then
61345     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61346 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61347     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61348   fi
61349 
61350   # Call helper function which possibly converts this using DOS-style short mode.
61351   # If so, the updated path is stored in $new_path.
61352 
61353   input_path="$new_path"
61354   # Check if we need to convert this using DOS-style short mode. If the path
61355   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61356   # take no chances and rewrite it.
61357   # Note: m4 eats our [], so we need to use [ and ] instead.
61358   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61359   if test "x$has_forbidden_chars" != x; then
61360     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61361     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61362     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61363     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61364       # Going to short mode and back again did indeed matter. Since short mode is
61365       # case insensitive, let's make it lowercase to improve readability.
61366       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61367       # Now convert it back to Unix-style (cygpath)
61368       input_path=`$CYGPATH -u "$shortmode_path"`
61369       new_path="$input_path"
61370     fi
61371   fi
61372 
61373   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61374   if test "x$test_cygdrive_prefix" = x; then
61375     # As a simple fix, exclude /usr/bin since it's not a real path.
61376     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61377       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61378       # a path prefixed by /cygdrive for fixpath to work.
61379       new_path="$CYGWIN_ROOT_PATH$input_path"
61380     fi
61381   fi
61382 
61383 
61384   if test "x$path" != "x$new_path"; then
61385     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61386     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61387 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61388   fi
61389 
61390     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61391 
61392   path="$POTENTIAL_FREETYPE_LIB_PATH"
61393   has_colon=`$ECHO $path | $GREP ^.:`
61394   new_path="$path"
61395   if test "x$has_colon" = x; then
61396     # Not in mixed or Windows style, start by that.
61397     new_path=`cmd //c echo $path`
61398   fi
61399 
61400 
61401   input_path="$new_path"
61402   # Check if we need to convert this using DOS-style short mode. If the path
61403   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61404   # take no chances and rewrite it.
61405   # Note: m4 eats our [], so we need to use [ and ] instead.
61406   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61407   if test "x$has_forbidden_chars" != x; then
61408     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61409     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61410   fi
61411 
61412 
61413   windows_path="$new_path"
61414   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61415     unix_path=`$CYGPATH -u "$windows_path"`
61416     new_path="$unix_path"
61417   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61418     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61419     new_path="$unix_path"
61420   fi
61421 
61422   if test "x$path" != "x$new_path"; then
61423     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61424     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61425 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61426   fi
61427 
61428   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61429   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61430 
61431     else
61432       # We're on a unix platform. Hooray! :)
61433       path="$POTENTIAL_FREETYPE_LIB_PATH"
61434       has_space=`$ECHO "$path" | $GREP " "`
61435       if test "x$has_space" != x; then
61436         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61437 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61438         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61439       fi
61440 
61441       # Use eval to expand a potential ~
61442       eval path="$path"
61443       if test ! -f "$path" && test ! -d "$path"; then
61444         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61445       fi
61446 
61447       if test -d "$path"; then
61448         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61449       else
61450         dir="`$DIRNAME "$path"`"
61451         base="`$BASENAME "$path"`"
61452         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61453       fi
61454     fi
61455   fi
61456 
61457 
61458     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61459     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61460 $as_echo_n "checking for freetype includes... " >&6; }
61461     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61462 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61463     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61464     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61465 $as_echo_n "checking for freetype libraries... " >&6; }
61466     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61467 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61468   fi
61469 
61470             else
61471 
61472   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61473   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61474   METHOD="well-known location"
61475 
61476   # Let's start with an optimistic view of the world :-)
61477   FOUND_FREETYPE=yes
61478 
61479   # First look for the canonical freetype main include file ft2build.h.
61480   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61481     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61482     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61483     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61484       # Fail.
61485       FOUND_FREETYPE=no
61486     fi
61487   fi
61488 
61489   if test "x$FOUND_FREETYPE" = xyes; then
61490     # Include file found, let's continue the sanity check.
61491     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61492 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61493 
61494     # Reset to default value
61495     FREETYPE_BASE_NAME=freetype
61496     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61497     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61498       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61499           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61500         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61501         # for the .6 version explicitly.
61502         FREETYPE_BASE_NAME=freetype.6
61503         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61504         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61505 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61506       else
61507         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61508 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61509         FOUND_FREETYPE=no
61510       fi
61511     else
61512       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61513         # On Windows, we will need both .lib and .dll file.
61514         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61515           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61516 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61517           FOUND_FREETYPE=no
61518         fi
61519       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61520           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61521         # Found lib in isa dir, use that instead.
61522         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61523         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61524 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61525       fi
61526     fi
61527   fi
61528 
61529   if test "x$FOUND_FREETYPE" = xyes; then
61530 
61531   # Only process if variable expands to non-empty
61532 
61533   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61534     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61535 
61536   # Input might be given as Windows format, start by converting to
61537   # unix format.
61538   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61539   new_path=`$CYGPATH -u "$path"`
61540 
61541   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61542   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61543   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61544   # "foo.exe" is OK but "foo" is an error.
61545   #
61546   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61547   # It is also a way to make sure we got the proper file name for the real test later on.
61548   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61549   if test "x$test_shortpath" = x; then
61550     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61551 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61552     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61553   fi
61554 
61555   # Call helper function which possibly converts this using DOS-style short mode.
61556   # If so, the updated path is stored in $new_path.
61557 
61558   input_path="$new_path"
61559   # Check if we need to convert this using DOS-style short mode. If the path
61560   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61561   # take no chances and rewrite it.
61562   # Note: m4 eats our [], so we need to use [ and ] instead.
61563   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61564   if test "x$has_forbidden_chars" != x; then
61565     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61566     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61567     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61568     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61569       # Going to short mode and back again did indeed matter. Since short mode is
61570       # case insensitive, let's make it lowercase to improve readability.
61571       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61572       # Now convert it back to Unix-style (cygpath)
61573       input_path=`$CYGPATH -u "$shortmode_path"`
61574       new_path="$input_path"
61575     fi
61576   fi
61577 
61578   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61579   if test "x$test_cygdrive_prefix" = x; then
61580     # As a simple fix, exclude /usr/bin since it's not a real path.
61581     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61582       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61583       # a path prefixed by /cygdrive for fixpath to work.
61584       new_path="$CYGWIN_ROOT_PATH$input_path"
61585     fi
61586   fi
61587 
61588 
61589   if test "x$path" != "x$new_path"; then
61590     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61591     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61592 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61593   fi
61594 
61595     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61596 
61597   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61598   has_colon=`$ECHO $path | $GREP ^.:`
61599   new_path="$path"
61600   if test "x$has_colon" = x; then
61601     # Not in mixed or Windows style, start by that.
61602     new_path=`cmd //c echo $path`
61603   fi
61604 
61605 
61606   input_path="$new_path"
61607   # Check if we need to convert this using DOS-style short mode. If the path
61608   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61609   # take no chances and rewrite it.
61610   # Note: m4 eats our [], so we need to use [ and ] instead.
61611   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61612   if test "x$has_forbidden_chars" != x; then
61613     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61614     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61615   fi
61616 
61617 
61618   windows_path="$new_path"
61619   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61620     unix_path=`$CYGPATH -u "$windows_path"`
61621     new_path="$unix_path"
61622   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61623     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61624     new_path="$unix_path"
61625   fi
61626 
61627   if test "x$path" != "x$new_path"; then
61628     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61629     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61630 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61631   fi
61632 
61633   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61634   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61635 
61636     else
61637       # We're on a unix platform. Hooray! :)
61638       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61639       has_space=`$ECHO "$path" | $GREP " "`
61640       if test "x$has_space" != x; then
61641         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61642 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61643         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61644       fi
61645 
61646       # Use eval to expand a potential ~
61647       eval path="$path"
61648       if test ! -f "$path" && test ! -d "$path"; then
61649         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61650       fi
61651 
61652       if test -d "$path"; then
61653         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61654       else
61655         dir="`$DIRNAME "$path"`"
61656         base="`$BASENAME "$path"`"
61657         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61658       fi
61659     fi
61660   fi
61661 
61662 
61663   # Only process if variable expands to non-empty
61664 
61665   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61666     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61667 
61668   # Input might be given as Windows format, start by converting to
61669   # unix format.
61670   path="$POTENTIAL_FREETYPE_LIB_PATH"
61671   new_path=`$CYGPATH -u "$path"`
61672 
61673   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61674   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61675   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61676   # "foo.exe" is OK but "foo" is an error.
61677   #
61678   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61679   # It is also a way to make sure we got the proper file name for the real test later on.
61680   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61681   if test "x$test_shortpath" = x; then
61682     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61683 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61684     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61685   fi
61686 
61687   # Call helper function which possibly converts this using DOS-style short mode.
61688   # If so, the updated path is stored in $new_path.
61689 
61690   input_path="$new_path"
61691   # Check if we need to convert this using DOS-style short mode. If the path
61692   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61693   # take no chances and rewrite it.
61694   # Note: m4 eats our [], so we need to use [ and ] instead.
61695   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61696   if test "x$has_forbidden_chars" != x; then
61697     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61698     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61699     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61700     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61701       # Going to short mode and back again did indeed matter. Since short mode is
61702       # case insensitive, let's make it lowercase to improve readability.
61703       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61704       # Now convert it back to Unix-style (cygpath)
61705       input_path=`$CYGPATH -u "$shortmode_path"`
61706       new_path="$input_path"
61707     fi
61708   fi
61709 
61710   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61711   if test "x$test_cygdrive_prefix" = x; then
61712     # As a simple fix, exclude /usr/bin since it's not a real path.
61713     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61714       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61715       # a path prefixed by /cygdrive for fixpath to work.
61716       new_path="$CYGWIN_ROOT_PATH$input_path"
61717     fi
61718   fi
61719 
61720 
61721   if test "x$path" != "x$new_path"; then
61722     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61723     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61724 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61725   fi
61726 
61727     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61728 
61729   path="$POTENTIAL_FREETYPE_LIB_PATH"
61730   has_colon=`$ECHO $path | $GREP ^.:`
61731   new_path="$path"
61732   if test "x$has_colon" = x; then
61733     # Not in mixed or Windows style, start by that.
61734     new_path=`cmd //c echo $path`
61735   fi
61736 
61737 
61738   input_path="$new_path"
61739   # Check if we need to convert this using DOS-style short mode. If the path
61740   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61741   # take no chances and rewrite it.
61742   # Note: m4 eats our [], so we need to use [ and ] instead.
61743   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61744   if test "x$has_forbidden_chars" != x; then
61745     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61746     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61747   fi
61748 
61749 
61750   windows_path="$new_path"
61751   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61752     unix_path=`$CYGPATH -u "$windows_path"`
61753     new_path="$unix_path"
61754   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61755     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61756     new_path="$unix_path"
61757   fi
61758 
61759   if test "x$path" != "x$new_path"; then
61760     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61761     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61762 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61763   fi
61764 
61765   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61766   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61767 
61768     else
61769       # We're on a unix platform. Hooray! :)
61770       path="$POTENTIAL_FREETYPE_LIB_PATH"
61771       has_space=`$ECHO "$path" | $GREP " "`
61772       if test "x$has_space" != x; then
61773         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61774 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61775         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61776       fi
61777 
61778       # Use eval to expand a potential ~
61779       eval path="$path"
61780       if test ! -f "$path" && test ! -d "$path"; then
61781         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61782       fi
61783 
61784       if test -d "$path"; then
61785         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61786       else
61787         dir="`$DIRNAME "$path"`"
61788         base="`$BASENAME "$path"`"
61789         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61790       fi
61791     fi
61792   fi
61793 
61794 
61795     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61796     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61797 $as_echo_n "checking for freetype includes... " >&6; }
61798     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61799 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61800     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61801     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61802 $as_echo_n "checking for freetype libraries... " >&6; }
61803     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61804 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61805   fi
61806 
61807               if test "x$FOUND_FREETYPE" != xyes; then
61808 
61809   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61810   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61811   METHOD="well-known location"
61812 
61813   # Let's start with an optimistic view of the world :-)
61814   FOUND_FREETYPE=yes
61815 
61816   # First look for the canonical freetype main include file ft2build.h.
61817   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61818     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61819     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61820     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61821       # Fail.
61822       FOUND_FREETYPE=no
61823     fi
61824   fi
61825 
61826   if test "x$FOUND_FREETYPE" = xyes; then
61827     # Include file found, let's continue the sanity check.
61828     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61829 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61830 
61831     # Reset to default value
61832     FREETYPE_BASE_NAME=freetype
61833     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61834     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61835       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61836           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61837         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61838         # for the .6 version explicitly.
61839         FREETYPE_BASE_NAME=freetype.6
61840         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61841         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61842 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61843       else
61844         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61845 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61846         FOUND_FREETYPE=no
61847       fi
61848     else
61849       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61850         # On Windows, we will need both .lib and .dll file.
61851         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61852           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61853 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61854           FOUND_FREETYPE=no
61855         fi
61856       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61857           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61858         # Found lib in isa dir, use that instead.
61859         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61860         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61861 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61862       fi
61863     fi
61864   fi
61865 
61866   if test "x$FOUND_FREETYPE" = xyes; then
61867 
61868   # Only process if variable expands to non-empty
61869 
61870   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61871     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61872 
61873   # Input might be given as Windows format, start by converting to
61874   # unix format.
61875   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61876   new_path=`$CYGPATH -u "$path"`
61877 
61878   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61879   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61880   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61881   # "foo.exe" is OK but "foo" is an error.
61882   #
61883   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61884   # It is also a way to make sure we got the proper file name for the real test later on.
61885   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61886   if test "x$test_shortpath" = x; then
61887     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61888 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61889     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61890   fi
61891 
61892   # Call helper function which possibly converts this using DOS-style short mode.
61893   # If so, the updated path is stored in $new_path.
61894 
61895   input_path="$new_path"
61896   # Check if we need to convert this using DOS-style short mode. If the path
61897   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61898   # take no chances and rewrite it.
61899   # Note: m4 eats our [], so we need to use [ and ] instead.
61900   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61901   if test "x$has_forbidden_chars" != x; then
61902     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61903     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61904     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61905     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61906       # Going to short mode and back again did indeed matter. Since short mode is
61907       # case insensitive, let's make it lowercase to improve readability.
61908       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61909       # Now convert it back to Unix-style (cygpath)
61910       input_path=`$CYGPATH -u "$shortmode_path"`
61911       new_path="$input_path"
61912     fi
61913   fi
61914 
61915   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61916   if test "x$test_cygdrive_prefix" = x; then
61917     # As a simple fix, exclude /usr/bin since it's not a real path.
61918     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61919       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61920       # a path prefixed by /cygdrive for fixpath to work.
61921       new_path="$CYGWIN_ROOT_PATH$input_path"
61922     fi
61923   fi
61924 
61925 
61926   if test "x$path" != "x$new_path"; then
61927     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61928     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61929 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61930   fi
61931 
61932     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61933 
61934   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61935   has_colon=`$ECHO $path | $GREP ^.:`
61936   new_path="$path"
61937   if test "x$has_colon" = x; then
61938     # Not in mixed or Windows style, start by that.
61939     new_path=`cmd //c echo $path`
61940   fi
61941 
61942 
61943   input_path="$new_path"
61944   # Check if we need to convert this using DOS-style short mode. If the path
61945   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61946   # take no chances and rewrite it.
61947   # Note: m4 eats our [], so we need to use [ and ] instead.
61948   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61949   if test "x$has_forbidden_chars" != x; then
61950     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61951     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61952   fi
61953 
61954 
61955   windows_path="$new_path"
61956   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61957     unix_path=`$CYGPATH -u "$windows_path"`
61958     new_path="$unix_path"
61959   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61960     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61961     new_path="$unix_path"
61962   fi
61963 
61964   if test "x$path" != "x$new_path"; then
61965     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61966     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61967 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61968   fi
61969 
61970   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61971   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61972 
61973     else
61974       # We're on a unix platform. Hooray! :)
61975       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61976       has_space=`$ECHO "$path" | $GREP " "`
61977       if test "x$has_space" != x; then
61978         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61979 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61980         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61981       fi
61982 
61983       # Use eval to expand a potential ~
61984       eval path="$path"
61985       if test ! -f "$path" && test ! -d "$path"; then
61986         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61987       fi
61988 
61989       if test -d "$path"; then
61990         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61991       else
61992         dir="`$DIRNAME "$path"`"
61993         base="`$BASENAME "$path"`"
61994         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61995       fi
61996     fi
61997   fi
61998 
61999 
62000   # Only process if variable expands to non-empty
62001 
62002   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62003     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62004 
62005   # Input might be given as Windows format, start by converting to
62006   # unix format.
62007   path="$POTENTIAL_FREETYPE_LIB_PATH"
62008   new_path=`$CYGPATH -u "$path"`
62009 
62010   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62011   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62012   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62013   # "foo.exe" is OK but "foo" is an error.
62014   #
62015   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62016   # It is also a way to make sure we got the proper file name for the real test later on.
62017   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62018   if test "x$test_shortpath" = x; then
62019     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62020 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62021     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62022   fi
62023 
62024   # Call helper function which possibly converts this using DOS-style short mode.
62025   # If so, the updated path is stored in $new_path.
62026 
62027   input_path="$new_path"
62028   # Check if we need to convert this using DOS-style short mode. If the path
62029   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62030   # take no chances and rewrite it.
62031   # Note: m4 eats our [], so we need to use [ and ] instead.
62032   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62033   if test "x$has_forbidden_chars" != x; then
62034     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62035     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62036     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62037     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62038       # Going to short mode and back again did indeed matter. Since short mode is
62039       # case insensitive, let's make it lowercase to improve readability.
62040       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62041       # Now convert it back to Unix-style (cygpath)
62042       input_path=`$CYGPATH -u "$shortmode_path"`
62043       new_path="$input_path"
62044     fi
62045   fi
62046 
62047   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62048   if test "x$test_cygdrive_prefix" = x; then
62049     # As a simple fix, exclude /usr/bin since it's not a real path.
62050     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62051       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62052       # a path prefixed by /cygdrive for fixpath to work.
62053       new_path="$CYGWIN_ROOT_PATH$input_path"
62054     fi
62055   fi
62056 
62057 
62058   if test "x$path" != "x$new_path"; then
62059     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62060     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62061 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62062   fi
62063 
62064     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62065 
62066   path="$POTENTIAL_FREETYPE_LIB_PATH"
62067   has_colon=`$ECHO $path | $GREP ^.:`
62068   new_path="$path"
62069   if test "x$has_colon" = x; then
62070     # Not in mixed or Windows style, start by that.
62071     new_path=`cmd //c echo $path`
62072   fi
62073 
62074 
62075   input_path="$new_path"
62076   # Check if we need to convert this using DOS-style short mode. If the path
62077   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62078   # take no chances and rewrite it.
62079   # Note: m4 eats our [], so we need to use [ and ] instead.
62080   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62081   if test "x$has_forbidden_chars" != x; then
62082     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62083     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62084   fi
62085 
62086 
62087   windows_path="$new_path"
62088   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62089     unix_path=`$CYGPATH -u "$windows_path"`
62090     new_path="$unix_path"
62091   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62092     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62093     new_path="$unix_path"
62094   fi
62095 
62096   if test "x$path" != "x$new_path"; then
62097     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62098     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62099 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62100   fi
62101 
62102   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62103   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62104 
62105     else
62106       # We're on a unix platform. Hooray! :)
62107       path="$POTENTIAL_FREETYPE_LIB_PATH"
62108       has_space=`$ECHO "$path" | $GREP " "`
62109       if test "x$has_space" != x; then
62110         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62111 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62112         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62113       fi
62114 
62115       # Use eval to expand a potential ~
62116       eval path="$path"
62117       if test ! -f "$path" && test ! -d "$path"; then
62118         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62119       fi
62120 
62121       if test -d "$path"; then
62122         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62123       else
62124         dir="`$DIRNAME "$path"`"
62125         base="`$BASENAME "$path"`"
62126         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62127       fi
62128     fi
62129   fi
62130 
62131 
62132     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62133     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62134 $as_echo_n "checking for freetype includes... " >&6; }
62135     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62136 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62137     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62138     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62139 $as_echo_n "checking for freetype libraries... " >&6; }
62140     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62141 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62142   fi
62143 
62144               fi
62145             fi
62146           fi
62147         fi
62148       fi # end check in well-known locations
62149 
62150       if test "x$FOUND_FREETYPE" != xyes; then
62151 
62152   # Print a helpful message on how to acquire the necessary build dependency.
62153   # freetype is the help tag: freetype, cups, alsa etc
62154   MISSING_DEPENDENCY=freetype
62155 
62156   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62157     cygwin_help $MISSING_DEPENDENCY
62158   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62159     msys_help $MISSING_DEPENDENCY
62160   else
62161     PKGHANDLER_COMMAND=
62162 
62163     case $PKGHANDLER in
62164       apt-get)
62165         apt_help     $MISSING_DEPENDENCY ;;
62166       yum)
62167         yum_help     $MISSING_DEPENDENCY ;;
62168       port)
62169         port_help    $MISSING_DEPENDENCY ;;
62170       pkgutil)
62171         pkgutil_help $MISSING_DEPENDENCY ;;
62172       pkgadd)
62173         pkgadd_help  $MISSING_DEPENDENCY ;;
62174     esac
62175 
62176     if test "x$PKGHANDLER_COMMAND" != x; then
62177       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62178     fi
62179   fi
62180 
62181         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62182       fi
62183     fi # end user specified settings
62184 
62185     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62186     if test "x$FREETYPE_CFLAGS" = x; then
62187 
62188   # Only process if variable expands to non-empty
62189 
62190   if test "x$FREETYPE_INCLUDE_PATH" != x; then
62191     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62192 
62193   # Input might be given as Windows format, start by converting to
62194   # unix format.
62195   path="$FREETYPE_INCLUDE_PATH"
62196   new_path=`$CYGPATH -u "$path"`
62197 
62198   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62199   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62200   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62201   # "foo.exe" is OK but "foo" is an error.
62202   #
62203   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62204   # It is also a way to make sure we got the proper file name for the real test later on.
62205   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62206   if test "x$test_shortpath" = x; then
62207     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62208 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62209     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62210   fi
62211 
62212   # Call helper function which possibly converts this using DOS-style short mode.
62213   # If so, the updated path is stored in $new_path.
62214 
62215   input_path="$new_path"
62216   # Check if we need to convert this using DOS-style short mode. If the path
62217   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62218   # take no chances and rewrite it.
62219   # Note: m4 eats our [], so we need to use [ and ] instead.
62220   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62221   if test "x$has_forbidden_chars" != x; then
62222     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62223     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62224     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62225     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62226       # Going to short mode and back again did indeed matter. Since short mode is
62227       # case insensitive, let's make it lowercase to improve readability.
62228       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62229       # Now convert it back to Unix-style (cygpath)
62230       input_path=`$CYGPATH -u "$shortmode_path"`
62231       new_path="$input_path"
62232     fi
62233   fi
62234 
62235   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62236   if test "x$test_cygdrive_prefix" = x; then
62237     # As a simple fix, exclude /usr/bin since it's not a real path.
62238     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62239       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62240       # a path prefixed by /cygdrive for fixpath to work.
62241       new_path="$CYGWIN_ROOT_PATH$input_path"
62242     fi
62243   fi
62244 
62245 
62246   if test "x$path" != "x$new_path"; then
62247     FREETYPE_INCLUDE_PATH="$new_path"
62248     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62249 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62250   fi
62251 
62252     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62253 
62254   path="$FREETYPE_INCLUDE_PATH"
62255   has_colon=`$ECHO $path | $GREP ^.:`
62256   new_path="$path"
62257   if test "x$has_colon" = x; then
62258     # Not in mixed or Windows style, start by that.
62259     new_path=`cmd //c echo $path`
62260   fi
62261 
62262 
62263   input_path="$new_path"
62264   # Check if we need to convert this using DOS-style short mode. If the path
62265   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62266   # take no chances and rewrite it.
62267   # Note: m4 eats our [], so we need to use [ and ] instead.
62268   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62269   if test "x$has_forbidden_chars" != x; then
62270     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62271     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62272   fi
62273 
62274 
62275   windows_path="$new_path"
62276   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62277     unix_path=`$CYGPATH -u "$windows_path"`
62278     new_path="$unix_path"
62279   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62280     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62281     new_path="$unix_path"
62282   fi
62283 
62284   if test "x$path" != "x$new_path"; then
62285     FREETYPE_INCLUDE_PATH="$new_path"
62286     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62287 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62288   fi
62289 
62290   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62291   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62292 
62293     else
62294       # We're on a unix platform. Hooray! :)
62295       path="$FREETYPE_INCLUDE_PATH"
62296       has_space=`$ECHO "$path" | $GREP " "`
62297       if test "x$has_space" != x; then
62298         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62299 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62300         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62301       fi
62302 
62303       # Use eval to expand a potential ~
62304       eval path="$path"
62305       if test ! -f "$path" && test ! -d "$path"; then
62306         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62307       fi
62308 
62309       if test -d "$path"; then
62310         FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62311       else
62312         dir="`$DIRNAME "$path"`"
62313         base="`$BASENAME "$path"`"
62314         FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62315       fi
62316     fi
62317   fi
62318 
62319       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62320         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62321       else
62322         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62323       fi
62324     fi
62325 
62326     if test "x$FREETYPE_LIBS" = x; then
62327 
62328   # Only process if variable expands to non-empty
62329 
62330   if test "x$FREETYPE_LIB_PATH" != x; then
62331     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62332 
62333   # Input might be given as Windows format, start by converting to
62334   # unix format.
62335   path="$FREETYPE_LIB_PATH"
62336   new_path=`$CYGPATH -u "$path"`
62337 
62338   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62339   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62340   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62341   # "foo.exe" is OK but "foo" is an error.
62342   #
62343   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62344   # It is also a way to make sure we got the proper file name for the real test later on.
62345   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62346   if test "x$test_shortpath" = x; then
62347     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62348 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62349     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62350   fi
62351 
62352   # Call helper function which possibly converts this using DOS-style short mode.
62353   # If so, the updated path is stored in $new_path.
62354 
62355   input_path="$new_path"
62356   # Check if we need to convert this using DOS-style short mode. If the path
62357   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62358   # take no chances and rewrite it.
62359   # Note: m4 eats our [], so we need to use [ and ] instead.
62360   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62361   if test "x$has_forbidden_chars" != x; then
62362     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62363     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62364     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62365     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62366       # Going to short mode and back again did indeed matter. Since short mode is
62367       # case insensitive, let's make it lowercase to improve readability.
62368       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62369       # Now convert it back to Unix-style (cygpath)
62370       input_path=`$CYGPATH -u "$shortmode_path"`
62371       new_path="$input_path"
62372     fi
62373   fi
62374 
62375   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62376   if test "x$test_cygdrive_prefix" = x; then
62377     # As a simple fix, exclude /usr/bin since it's not a real path.
62378     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62379       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62380       # a path prefixed by /cygdrive for fixpath to work.
62381       new_path="$CYGWIN_ROOT_PATH$input_path"
62382     fi
62383   fi
62384 
62385 
62386   if test "x$path" != "x$new_path"; then
62387     FREETYPE_LIB_PATH="$new_path"
62388     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62389 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62390   fi
62391 
62392     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62393 
62394   path="$FREETYPE_LIB_PATH"
62395   has_colon=`$ECHO $path | $GREP ^.:`
62396   new_path="$path"
62397   if test "x$has_colon" = x; then
62398     # Not in mixed or Windows style, start by that.
62399     new_path=`cmd //c echo $path`
62400   fi
62401 
62402 
62403   input_path="$new_path"
62404   # Check if we need to convert this using DOS-style short mode. If the path
62405   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62406   # take no chances and rewrite it.
62407   # Note: m4 eats our [], so we need to use [ and ] instead.
62408   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62409   if test "x$has_forbidden_chars" != x; then
62410     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62411     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62412   fi
62413 
62414 
62415   windows_path="$new_path"
62416   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62417     unix_path=`$CYGPATH -u "$windows_path"`
62418     new_path="$unix_path"
62419   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62420     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62421     new_path="$unix_path"
62422   fi
62423 
62424   if test "x$path" != "x$new_path"; then
62425     FREETYPE_LIB_PATH="$new_path"
62426     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62427 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62428   fi
62429 
62430   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62431   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62432 
62433     else
62434       # We're on a unix platform. Hooray! :)
62435       path="$FREETYPE_LIB_PATH"
62436       has_space=`$ECHO "$path" | $GREP " "`
62437       if test "x$has_space" != x; then
62438         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62439 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62440         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62441       fi
62442 
62443       # Use eval to expand a potential ~
62444       eval path="$path"
62445       if test ! -f "$path" && test ! -d "$path"; then
62446         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62447       fi
62448 
62449       if test -d "$path"; then
62450         FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62451       else
62452         dir="`$DIRNAME "$path"`"
62453         base="`$BASENAME "$path"`"
62454         FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62455       fi
62456     fi
62457   fi
62458 
62459       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62460         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62461       else
62462         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62463       fi
62464     fi
62465 
62466     # Try to compile it
62467     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62468 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
62469     ac_ext=cpp
62470 ac_cpp='$CXXCPP $CPPFLAGS'
62471 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62472 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62473 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62474 
62475     PREV_CXXCFLAGS="$CXXFLAGS"
62476     PREV_LIBS="$LIBS"
62477     PREV_CXX="$CXX"
62478     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62479     LIBS="$LIBS $FREETYPE_LIBS"
62480     CXX="$FIXPATH $CXX"
62481     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62482 /* end confdefs.h.  */
62483 
62484           #include<ft2build.h>
62485           #include FT_FREETYPE_H
62486           int main () {
62487             FT_Init_FreeType(NULL);
62488             return 0;
62489           }
62490 
62491 _ACEOF
62492 if ac_fn_cxx_try_link "$LINENO"; then :
62493 
62494           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62495 $as_echo "yes" >&6; }
62496 
62497 else
62498 
62499           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62500 $as_echo "no" >&6; }
62501           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62502 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62503           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62504 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62505 
62506 
62507   # Print a helpful message on how to acquire the necessary build dependency.
62508   # freetype is the help tag: freetype, cups, alsa etc
62509   MISSING_DEPENDENCY=freetype
62510 
62511   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62512     cygwin_help $MISSING_DEPENDENCY
62513   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62514     msys_help $MISSING_DEPENDENCY
62515   else
62516     PKGHANDLER_COMMAND=
62517 
62518     case $PKGHANDLER in
62519       apt-get)
62520         apt_help     $MISSING_DEPENDENCY ;;
62521       yum)
62522         yum_help     $MISSING_DEPENDENCY ;;
62523       port)
62524         port_help    $MISSING_DEPENDENCY ;;
62525       pkgutil)
62526         pkgutil_help $MISSING_DEPENDENCY ;;
62527       pkgadd)
62528         pkgadd_help  $MISSING_DEPENDENCY ;;
62529     esac
62530 
62531     if test "x$PKGHANDLER_COMMAND" != x; then
62532       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62533     fi
62534   fi
62535 
62536 
62537           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62538 
62539 
62540 fi
62541 rm -f core conftest.err conftest.$ac_objext \
62542     conftest$ac_exeext conftest.$ac_ext
62543     CXXCFLAGS="$PREV_CXXFLAGS"
62544     LIBS="$PREV_LIBS"
62545     CXX="$PREV_CXX"
62546     ac_ext=cpp
62547 ac_cpp='$CXXCPP $CPPFLAGS'
62548 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62549 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62550 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62551 
62552 
62553     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62554 $as_echo_n "checking if we should bundle freetype... " >&6; }
62555     if test "x$BUNDLE_FREETYPE" = xyes; then
62556       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62557     fi
62558     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62559 $as_echo "$BUNDLE_FREETYPE" >&6; }
62560 
62561   fi # end freetype needed
62562 
62563 
62564 
62565 
62566 
62567 
62568 
62569 # Check whether --with-alsa was given.
62570 if test "${with_alsa+set}" = set; then :
62571   withval=$with_alsa;
62572 fi
62573 
62574 
62575 # Check whether --with-alsa-include was given.
62576 if test "${with_alsa_include+set}" = set; then :
62577   withval=$with_alsa_include;
62578 fi
62579 
62580 
62581 # Check whether --with-alsa-lib was given.
62582 if test "${with_alsa_lib+set}" = set; then :
62583   withval=$with_alsa_lib;
62584 fi
62585 
62586 
62587   if test "x$NEEDS_LIB_ALSA" = xfalse; then
62588     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62589         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62590         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62591       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62592 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62593     fi
62594     ALSA_CFLAGS=
62595     ALSA_LIBS=
62596   else
62597     ALSA_FOUND=no
62598 
62599     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62600       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62601     fi
62602 
62603     if test "x${with_alsa}" != x; then
62604       ALSA_LIBS="-L${with_alsa}/lib -lasound"
62605       ALSA_CFLAGS="-I${with_alsa}/include"
62606       ALSA_FOUND=yes
62607     fi
62608     if test "x${with_alsa_include}" != x; then
62609       ALSA_CFLAGS="-I${with_alsa_include}"
62610       ALSA_FOUND=yes
62611     fi
62612     if test "x${with_alsa_lib}" != x; then
62613       ALSA_LIBS="-L${with_alsa_lib} -lasound"
62614       ALSA_FOUND=yes
62615     fi
62616     # Do not try pkg-config if we have a sysroot set.
62617     if test "x$SYSROOT" = x; then
62618       if test "x$ALSA_FOUND" = xno; then
62619 
62620 pkg_failed=no
62621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62622 $as_echo_n "checking for ALSA... " >&6; }
62623 
62624 if test -n "$ALSA_CFLAGS"; then
62625     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62626  elif test -n "$PKG_CONFIG"; then
62627     if test -n "$PKG_CONFIG" && \
62628     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62629   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62630   ac_status=$?
62631   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62632   test $ac_status = 0; }; then
62633   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62634 else
62635   pkg_failed=yes
62636 fi
62637  else
62638     pkg_failed=untried
62639 fi
62640 if test -n "$ALSA_LIBS"; then
62641     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62642  elif test -n "$PKG_CONFIG"; then
62643     if test -n "$PKG_CONFIG" && \
62644     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62645   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62646   ac_status=$?
62647   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62648   test $ac_status = 0; }; then
62649   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62650 else
62651   pkg_failed=yes
62652 fi
62653  else
62654     pkg_failed=untried
62655 fi
62656 
62657 
62658 
62659 if test $pkg_failed = yes; then
62660 
62661 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62662         _pkg_short_errors_supported=yes
62663 else
62664         _pkg_short_errors_supported=no
62665 fi
62666         if test $_pkg_short_errors_supported = yes; then
62667                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62668         else
62669                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62670         fi
62671         # Put the nasty error message in config.log where it belongs
62672         echo "$ALSA_PKG_ERRORS" >&5
62673 
62674         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62675 $as_echo "no" >&6; }
62676                 ALSA_FOUND=no
62677 elif test $pkg_failed = untried; then
62678         ALSA_FOUND=no
62679 else
62680         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62681         ALSA_LIBS=$pkg_cv_ALSA_LIBS
62682         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62683 $as_echo "yes" >&6; }
62684         ALSA_FOUND=yes
62685 fi
62686       fi
62687     fi
62688     if test "x$ALSA_FOUND" = xno; then
62689       for ac_header in alsa/asoundlib.h
62690 do :
62691   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62692 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62693   cat >>confdefs.h <<_ACEOF
62694 #define HAVE_ALSA_ASOUNDLIB_H 1
62695 _ACEOF
62696 
62697             ALSA_FOUND=yes
62698             ALSA_CFLAGS=-Iignoreme
62699             ALSA_LIBS=-lasound
62700             DEFAULT_ALSA=yes
62701 
62702 else
62703   ALSA_FOUND=no
62704 
62705 fi
62706 
62707 done
62708 
62709     fi
62710     if test "x$ALSA_FOUND" = xno; then
62711 
62712   # Print a helpful message on how to acquire the necessary build dependency.
62713   # alsa is the help tag: freetype, cups, alsa etc
62714   MISSING_DEPENDENCY=alsa
62715 
62716   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62717     cygwin_help $MISSING_DEPENDENCY
62718   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62719     msys_help $MISSING_DEPENDENCY
62720   else
62721     PKGHANDLER_COMMAND=
62722 
62723     case $PKGHANDLER in
62724       apt-get)
62725         apt_help     $MISSING_DEPENDENCY ;;
62726       yum)
62727         yum_help     $MISSING_DEPENDENCY ;;
62728       port)
62729         port_help    $MISSING_DEPENDENCY ;;
62730       pkgutil)
62731         pkgutil_help $MISSING_DEPENDENCY ;;
62732       pkgadd)
62733         pkgadd_help  $MISSING_DEPENDENCY ;;
62734     esac
62735 
62736     if test "x$PKGHANDLER_COMMAND" != x; then
62737       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62738     fi
62739   fi
62740 
62741       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62742     fi
62743   fi
62744 
62745 
62746 
62747 
62748 
62749 
62750 # Check whether --with-libffi was given.
62751 if test "${with_libffi+set}" = set; then :
62752   withval=$with_libffi;
62753 fi
62754 
62755 
62756 # Check whether --with-libffi-include was given.
62757 if test "${with_libffi_include+set}" = set; then :
62758   withval=$with_libffi_include;
62759 fi
62760 
62761 
62762 # Check whether --with-libffi-lib was given.
62763 if test "${with_libffi_lib+set}" = set; then :
62764   withval=$with_libffi_lib;
62765 fi
62766 
62767 
62768   if test "x$NEEDS_LIB_FFI" = xfalse; then
62769     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62770         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62771         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62772       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62773 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62774     fi
62775     LIBFFI_CFLAGS=
62776     LIBFFI_LIBS=
62777   else
62778     LIBFFI_FOUND=no
62779 
62780     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62781       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62782     fi
62783 
62784     if test "x${with_libffi}" != x; then
62785       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62786       LIBFFI_CFLAGS="-I${with_libffi}/include"
62787       LIBFFI_FOUND=yes
62788     fi
62789     if test "x${with_libffi_include}" != x; then
62790       LIBFFI_CFLAGS="-I${with_libffi_include}"
62791       LIBFFI_FOUND=yes
62792     fi
62793     if test "x${with_libffi_lib}" != x; then
62794       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62795       LIBFFI_FOUND=yes
62796     fi
62797     # Do not try pkg-config if we have a sysroot set.
62798     if test "x$SYSROOT" = x; then
62799       if test "x$LIBFFI_FOUND" = xno; then
62800         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62801 
62802 pkg_failed=no
62803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62804 $as_echo_n "checking for LIBFFI... " >&6; }
62805 
62806 if test -n "$LIBFFI_CFLAGS"; then
62807     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62808  elif test -n "$PKG_CONFIG"; then
62809     if test -n "$PKG_CONFIG" && \
62810     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62811   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62812   ac_status=$?
62813   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62814   test $ac_status = 0; }; then
62815   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62816 else
62817   pkg_failed=yes
62818 fi
62819  else
62820     pkg_failed=untried
62821 fi
62822 if test -n "$LIBFFI_LIBS"; then
62823     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62824  elif test -n "$PKG_CONFIG"; then
62825     if test -n "$PKG_CONFIG" && \
62826     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62827   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62828   ac_status=$?
62829   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62830   test $ac_status = 0; }; then
62831   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62832 else
62833   pkg_failed=yes
62834 fi
62835  else
62836     pkg_failed=untried
62837 fi
62838 
62839 
62840 
62841 if test $pkg_failed = yes; then
62842 
62843 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62844         _pkg_short_errors_supported=yes
62845 else
62846         _pkg_short_errors_supported=no
62847 fi
62848         if test $_pkg_short_errors_supported = yes; then
62849                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62850         else
62851                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62852         fi
62853         # Put the nasty error message in config.log where it belongs
62854         echo "$LIBFFI_PKG_ERRORS" >&5
62855 
62856         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62857 $as_echo "no" >&6; }
62858                 LIBFFI_FOUND=no
62859 elif test $pkg_failed = untried; then
62860         LIBFFI_FOUND=no
62861 else
62862         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62863         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62864         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62865 $as_echo "yes" >&6; }
62866         LIBFFI_FOUND=yes
62867 fi
62868       fi
62869     fi
62870     if test "x$LIBFFI_FOUND" = xno; then
62871       for ac_header in ffi.h
62872 do :
62873   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62874 if test "x$ac_cv_header_ffi_h" = xyes; then :
62875   cat >>confdefs.h <<_ACEOF
62876 #define HAVE_FFI_H 1
62877 _ACEOF
62878 
62879             LIBFFI_FOUND=yes
62880             LIBFFI_CFLAGS=
62881             LIBFFI_LIBS=-lffi
62882 
62883 else
62884   LIBFFI_FOUND=no
62885 
62886 fi
62887 
62888 done
62889 
62890     fi
62891     if test "x$LIBFFI_FOUND" = xno; then
62892 
62893   # Print a helpful message on how to acquire the necessary build dependency.
62894   # ffi is the help tag: freetype, cups, alsa etc
62895   MISSING_DEPENDENCY=ffi
62896 
62897   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62898     cygwin_help $MISSING_DEPENDENCY
62899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62900     msys_help $MISSING_DEPENDENCY
62901   else
62902     PKGHANDLER_COMMAND=
62903 
62904     case $PKGHANDLER in
62905       apt-get)
62906         apt_help     $MISSING_DEPENDENCY ;;
62907       yum)
62908         yum_help     $MISSING_DEPENDENCY ;;
62909       port)
62910         port_help    $MISSING_DEPENDENCY ;;
62911       pkgutil)
62912         pkgutil_help $MISSING_DEPENDENCY ;;
62913       pkgadd)
62914         pkgadd_help  $MISSING_DEPENDENCY ;;
62915     esac
62916 
62917     if test "x$PKGHANDLER_COMMAND" != x; then
62918       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62919     fi
62920   fi
62921 
62922       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62923     fi
62924 
62925     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62926 $as_echo_n "checking if libffi works... " >&6; }
62927     ac_ext=c
62928 ac_cpp='$CPP $CPPFLAGS'
62929 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62930 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62931 ac_compiler_gnu=$ac_cv_c_compiler_gnu
62932 
62933     OLD_CFLAGS="$CFLAGS"
62934     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62935     OLD_LIBS="$LIBS"
62936     LIBS="$LIBS $LIBFFI_LIBS"
62937     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62938 /* end confdefs.h.  */
62939 #include <ffi.h>
62940 int
62941 main ()
62942 {
62943 
62944           ffi_call(NULL, NULL, NULL, NULL);
62945           return 0;
62946 
62947   ;
62948   return 0;
62949 }
62950 _ACEOF
62951 if ac_fn_c_try_link "$LINENO"; then :
62952   LIBFFI_WORKS=yes
62953 else
62954   LIBFFI_WORKS=no
62955 
62956 fi
62957 rm -f core conftest.err conftest.$ac_objext \
62958     conftest$ac_exeext conftest.$ac_ext
62959     CFLAGS="$OLD_CFLAGS"
62960     LIBS="$OLD_LIBS"
62961     ac_ext=cpp
62962 ac_cpp='$CXXCPP $CPPFLAGS'
62963 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62964 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62965 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62966 
62967     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62968 $as_echo "$LIBFFI_WORKS" >&6; }
62969 
62970     if test "x$LIBFFI_WORKS" = xno; then
62971 
62972   # Print a helpful message on how to acquire the necessary build dependency.
62973   # ffi is the help tag: freetype, cups, alsa etc
62974   MISSING_DEPENDENCY=ffi
62975 
62976   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62977     cygwin_help $MISSING_DEPENDENCY
62978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62979     msys_help $MISSING_DEPENDENCY
62980   else
62981     PKGHANDLER_COMMAND=
62982 
62983     case $PKGHANDLER in
62984       apt-get)
62985         apt_help     $MISSING_DEPENDENCY ;;
62986       yum)
62987         yum_help     $MISSING_DEPENDENCY ;;
62988       port)
62989         port_help    $MISSING_DEPENDENCY ;;
62990       pkgutil)
62991         pkgutil_help $MISSING_DEPENDENCY ;;
62992       pkgadd)
62993         pkgadd_help  $MISSING_DEPENDENCY ;;
62994     esac
62995 
62996     if test "x$PKGHANDLER_COMMAND" != x; then
62997       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62998     fi
62999   fi
63000 
63001       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63002     fi
63003   fi
63004 
63005 
63006 
63007 
63008 
63009   if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63010     # Extract the first word of "llvm-config", so it can be a program name with args.
63011 set dummy llvm-config; ac_word=$2
63012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63013 $as_echo_n "checking for $ac_word... " >&6; }
63014 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63015   $as_echo_n "(cached) " >&6
63016 else
63017   if test -n "$LLVM_CONFIG"; then
63018   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63019 else
63020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63021 for as_dir in $PATH
63022 do
63023   IFS=$as_save_IFS
63024   test -z "$as_dir" && as_dir=.
63025     for ac_exec_ext in '' $ac_executable_extensions; do
63026   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63027     ac_cv_prog_LLVM_CONFIG="llvm-config"
63028     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63029     break 2
63030   fi
63031 done
63032   done
63033 IFS=$as_save_IFS
63034 
63035 fi
63036 fi
63037 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63038 if test -n "$LLVM_CONFIG"; then
63039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63040 $as_echo "$LLVM_CONFIG" >&6; }
63041 else
63042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63043 $as_echo "no" >&6; }
63044 fi
63045 
63046 
63047 
63048     if test "x$LLVM_CONFIG" != xllvm-config; then
63049       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63050     fi
63051 
63052     llvm_components="jit mcjit engine nativecodegen native"
63053     unset LLVM_CFLAGS
63054     for flag in $("$LLVM_CONFIG" --cxxflags); do
63055       if echo "${flag}" | grep -q '^-[ID]'; then
63056         if test "${flag}" != "-D_DEBUG" ; then
63057           if test "${LLVM_CFLAGS}" != "" ; then
63058             LLVM_CFLAGS="${LLVM_CFLAGS} "
63059           fi
63060           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63061         fi
63062       fi
63063     done
63064     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
63065     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63066 
63067     unset LLVM_LDFLAGS
63068     for flag in $("${LLVM_CONFIG}" --ldflags); do
63069       if echo "${flag}" | grep -q '^-L'; then
63070         if test "${LLVM_LDFLAGS}" != ""; then
63071           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63072         fi
63073         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63074       fi
63075     done
63076 
63077     unset LLVM_LIBS
63078     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63079       if echo "${flag}" | grep -q '^-l'; then
63080         if test "${LLVM_LIBS}" != ""; then
63081           LLVM_LIBS="${LLVM_LIBS} "
63082         fi
63083         LLVM_LIBS="${LLVM_LIBS}${flag}"
63084       fi
63085     done
63086 
63087     # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63088     # always properly detect -ltinfo
63089     LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63090 
63091 
63092 
63093 
63094   fi
63095 
63096 
63097 
63098 # Check whether --with-libjpeg was given.
63099 if test "${with_libjpeg+set}" = set; then :
63100   withval=$with_libjpeg;
63101 fi
63102 
63103 
63104   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63105 $as_echo_n "checking for which libjpeg to use... " >&6; }
63106   # default is bundled
63107   DEFAULT_LIBJPEG=bundled
63108   # if user didn't specify, use DEFAULT_LIBJPEG
63109   if test "x${with_libjpeg}" = "x"; then
63110     with_libjpeg=${DEFAULT_LIBJPEG}
63111   fi
63112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63113 $as_echo "${with_libjpeg}" >&6; }
63114 
63115   if test "x${with_libjpeg}" = "xbundled"; then
63116     USE_EXTERNAL_LIBJPEG=false
63117   elif test "x${with_libjpeg}" = "xsystem"; then
63118     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63119 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63120 
63121 else
63122    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63123 fi
63124 
63125 
63126     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63127 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63128 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63129   $as_echo_n "(cached) " >&6
63130 else
63131   ac_check_lib_save_LIBS=$LIBS
63132 LIBS="-ljpeg  $LIBS"
63133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63134 /* end confdefs.h.  */
63135 
63136 /* Override any GCC internal prototype to avoid an error.
63137    Use char because int might match the return type of a GCC
63138    builtin and then its argument prototype would still apply.  */
63139 #ifdef __cplusplus
63140 extern "C"
63141 #endif
63142 char jpeg_CreateDecompress ();
63143 int
63144 main ()
63145 {
63146 return jpeg_CreateDecompress ();
63147   ;
63148   return 0;
63149 }
63150 _ACEOF
63151 if ac_fn_cxx_try_link "$LINENO"; then :
63152   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63153 else
63154   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63155 fi
63156 rm -f core conftest.err conftest.$ac_objext \
63157     conftest$ac_exeext conftest.$ac_ext
63158 LIBS=$ac_check_lib_save_LIBS
63159 fi
63160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63161 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63162 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63163   cat >>confdefs.h <<_ACEOF
63164 #define HAVE_LIBJPEG 1
63165 _ACEOF
63166 
63167   LIBS="-ljpeg $LIBS"
63168 
63169 else
63170    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63171 fi
63172 
63173 
63174     USE_EXTERNAL_LIBJPEG=true
63175   else
63176     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63177   fi
63178 
63179 
63180 
63181 
63182 
63183 # Check whether --with-giflib was given.
63184 if test "${with_giflib+set}" = set; then :
63185   withval=$with_giflib;
63186 fi
63187 
63188 
63189   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63190 $as_echo_n "checking for which giflib to use... " >&6; }
63191   # default is bundled
63192   DEFAULT_GIFLIB=bundled
63193   # if user didn't specify, use DEFAULT_GIFLIB
63194   if test "x${with_giflib}" = "x"; then
63195     with_giflib=${DEFAULT_GIFLIB}
63196   fi
63197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63198 $as_echo "${with_giflib}" >&6; }
63199 
63200   if test "x${with_giflib}" = "xbundled"; then
63201     USE_EXTERNAL_LIBGIF=false
63202   elif test "x${with_giflib}" = "xsystem"; then
63203     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63204 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63205 
63206 else
63207    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63208 fi
63209 
63210 
63211     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63212 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63213 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63214   $as_echo_n "(cached) " >&6
63215 else
63216   ac_check_lib_save_LIBS=$LIBS
63217 LIBS="-lgif  $LIBS"
63218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63219 /* end confdefs.h.  */
63220 
63221 /* Override any GCC internal prototype to avoid an error.
63222    Use char because int might match the return type of a GCC
63223    builtin and then its argument prototype would still apply.  */
63224 #ifdef __cplusplus
63225 extern "C"
63226 #endif
63227 char DGifGetCode ();
63228 int
63229 main ()
63230 {
63231 return DGifGetCode ();
63232   ;
63233   return 0;
63234 }
63235 _ACEOF
63236 if ac_fn_cxx_try_link "$LINENO"; then :
63237   ac_cv_lib_gif_DGifGetCode=yes
63238 else
63239   ac_cv_lib_gif_DGifGetCode=no
63240 fi
63241 rm -f core conftest.err conftest.$ac_objext \
63242     conftest$ac_exeext conftest.$ac_ext
63243 LIBS=$ac_check_lib_save_LIBS
63244 fi
63245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63246 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63247 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63248   cat >>confdefs.h <<_ACEOF
63249 #define HAVE_LIBGIF 1
63250 _ACEOF
63251 
63252   LIBS="-lgif $LIBS"
63253 
63254 else
63255    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63256 fi
63257 
63258 
63259     USE_EXTERNAL_LIBGIF=true
63260   else
63261     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63262   fi
63263 
63264 
63265 
63266 
63267 
63268 # Check whether --with-libpng was given.
63269 if test "${with_libpng+set}" = set; then :
63270   withval=$with_libpng;
63271 fi
63272 
63273 
63274   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63275 $as_echo_n "checking for which libpng to use... " >&6; }
63276 
63277   # default is bundled
63278   DEFAULT_LIBPNG=bundled
63279   # if user didn't specify, use DEFAULT_LIBPNG
63280   if test "x${with_libpng}" = "x"; then
63281       with_libpng=${DEFAULT_LIBPNG}
63282   fi
63283 
63284   if test "x${with_libpng}" = "xbundled"; then
63285       USE_EXTERNAL_LIBPNG=false
63286       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63287 $as_echo "bundled" >&6; }
63288   elif test "x${with_libpng}" = "xsystem"; then
63289 
63290 pkg_failed=no
63291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63292 $as_echo_n "checking for PNG... " >&6; }
63293 
63294 if test -n "$PNG_CFLAGS"; then
63295     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63296  elif test -n "$PKG_CONFIG"; then
63297     if test -n "$PKG_CONFIG" && \
63298     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63299   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63300   ac_status=$?
63301   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63302   test $ac_status = 0; }; then
63303   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63304 else
63305   pkg_failed=yes
63306 fi
63307  else
63308     pkg_failed=untried
63309 fi
63310 if test -n "$PNG_LIBS"; then
63311     pkg_cv_PNG_LIBS="$PNG_LIBS"
63312  elif test -n "$PKG_CONFIG"; then
63313     if test -n "$PKG_CONFIG" && \
63314     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63315   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63316   ac_status=$?
63317   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63318   test $ac_status = 0; }; then
63319   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63320 else
63321   pkg_failed=yes
63322 fi
63323  else
63324     pkg_failed=untried
63325 fi
63326 
63327 
63328 
63329 if test $pkg_failed = yes; then
63330 
63331 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63332         _pkg_short_errors_supported=yes
63333 else
63334         _pkg_short_errors_supported=no
63335 fi
63336         if test $_pkg_short_errors_supported = yes; then
63337                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63338         else
63339                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63340         fi
63341         # Put the nasty error message in config.log where it belongs
63342         echo "$PNG_PKG_ERRORS" >&5
63343 
63344         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63345 $as_echo "no" >&6; }
63346                  LIBPNG_FOUND=no
63347 elif test $pkg_failed = untried; then
63348          LIBPNG_FOUND=no
63349 else
63350         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63351         PNG_LIBS=$pkg_cv_PNG_LIBS
63352         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63353 $as_echo "yes" >&6; }
63354          LIBPNG_FOUND=yes
63355 fi
63356       if test "x${LIBPNG_FOUND}" = "xyes"; then
63357           USE_EXTERNAL_LIBPNG=true
63358           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63359 $as_echo "system" >&6; }
63360       else
63361           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63362 $as_echo "system not found" >&6; }
63363           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63364       fi
63365   else
63366       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63367   fi
63368 
63369 
63370 
63371 
63372 
63373 # Check whether --with-zlib was given.
63374 if test "${with_zlib+set}" = set; then :
63375   withval=$with_zlib;
63376 fi
63377 
63378 
63379   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63380 $as_echo_n "checking for compress in -lz... " >&6; }
63381 if ${ac_cv_lib_z_compress+:} false; then :
63382   $as_echo_n "(cached) " >&6
63383 else
63384   ac_check_lib_save_LIBS=$LIBS
63385 LIBS="-lz  $LIBS"
63386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63387 /* end confdefs.h.  */
63388 
63389 /* Override any GCC internal prototype to avoid an error.
63390    Use char because int might match the return type of a GCC
63391    builtin and then its argument prototype would still apply.  */
63392 #ifdef __cplusplus
63393 extern "C"
63394 #endif
63395 char compress ();
63396 int
63397 main ()
63398 {
63399 return compress ();
63400   ;
63401   return 0;
63402 }
63403 _ACEOF
63404 if ac_fn_cxx_try_link "$LINENO"; then :
63405   ac_cv_lib_z_compress=yes
63406 else
63407   ac_cv_lib_z_compress=no
63408 fi
63409 rm -f core conftest.err conftest.$ac_objext \
63410     conftest$ac_exeext conftest.$ac_ext
63411 LIBS=$ac_check_lib_save_LIBS
63412 fi
63413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63414 $as_echo "$ac_cv_lib_z_compress" >&6; }
63415 if test "x$ac_cv_lib_z_compress" = xyes; then :
63416    ZLIB_FOUND=yes
63417 else
63418    ZLIB_FOUND=no
63419 fi
63420 
63421 
63422   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63423 $as_echo_n "checking for which zlib to use... " >&6; }
63424 
63425   DEFAULT_ZLIB=system
63426   if test "x$OPENJDK_TARGET_OS" = xwindows; then
63427     # On windows default is bundled...on others default is system
63428     DEFAULT_ZLIB=bundled
63429   fi
63430 
63431   if test "x${ZLIB_FOUND}" != "xyes"; then
63432     # If we don't find any system...set default to bundled
63433     DEFAULT_ZLIB=bundled
63434   fi
63435 
63436   # If user didn't specify, use DEFAULT_ZLIB
63437   if test "x${with_zlib}" = "x"; then
63438     with_zlib=${DEFAULT_ZLIB}
63439   fi
63440 
63441   if test "x${with_zlib}" = "xbundled"; then
63442     USE_EXTERNAL_LIBZ=false
63443     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63444 $as_echo "bundled" >&6; }
63445   elif test "x${with_zlib}" = "xsystem"; then
63446     if test "x${ZLIB_FOUND}" = "xyes"; then
63447       USE_EXTERNAL_LIBZ=true
63448       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63449 $as_echo "system" >&6; }
63450     else
63451       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63452 $as_echo "system not found" >&6; }
63453       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63454     fi
63455   else
63456     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63457   fi
63458 
63459 
63460 
63461 
63462 
63463 # Check whether --with-lcms was given.
63464 if test "${with_lcms+set}" = set; then :
63465   withval=$with_lcms;
63466 fi
63467 
63468 
63469   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63470 $as_echo_n "checking for which lcms to use... " >&6; }
63471 
63472   DEFAULT_LCMS=bundled
63473   # If user didn't specify, use DEFAULT_LCMS
63474   if test "x${with_lcms}" = "x"; then
63475       with_lcms=${DEFAULT_LCMS}
63476   fi
63477 
63478   if test "x${with_lcms}" = "xbundled"; then
63479     USE_EXTERNAL_LCMS=false
63480     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63481 $as_echo "bundled" >&6; }
63482   elif test "x${with_lcms}" = "xsystem"; then
63483     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63484 $as_echo "system" >&6; }
63485 
63486 pkg_failed=no
63487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63488 $as_echo_n "checking for LCMS... " >&6; }
63489 
63490 if test -n "$LCMS_CFLAGS"; then
63491     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63492  elif test -n "$PKG_CONFIG"; then
63493     if test -n "$PKG_CONFIG" && \
63494     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63495   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63496   ac_status=$?
63497   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63498   test $ac_status = 0; }; then
63499   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63500 else
63501   pkg_failed=yes
63502 fi
63503  else
63504     pkg_failed=untried
63505 fi
63506 if test -n "$LCMS_LIBS"; then
63507     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63508  elif test -n "$PKG_CONFIG"; then
63509     if test -n "$PKG_CONFIG" && \
63510     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63511   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63512   ac_status=$?
63513   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63514   test $ac_status = 0; }; then
63515   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63516 else
63517   pkg_failed=yes
63518 fi
63519  else
63520     pkg_failed=untried
63521 fi
63522 
63523 
63524 
63525 if test $pkg_failed = yes; then
63526 
63527 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63528         _pkg_short_errors_supported=yes
63529 else
63530         _pkg_short_errors_supported=no
63531 fi
63532         if test $_pkg_short_errors_supported = yes; then
63533                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63534         else
63535                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63536         fi
63537         # Put the nasty error message in config.log where it belongs
63538         echo "$LCMS_PKG_ERRORS" >&5
63539 
63540         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63541 $as_echo "no" >&6; }
63542                 LCMS_FOUND=no
63543 elif test $pkg_failed = untried; then
63544         LCMS_FOUND=no
63545 else
63546         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63547         LCMS_LIBS=$pkg_cv_LCMS_LIBS
63548         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63549 $as_echo "yes" >&6; }
63550         LCMS_FOUND=yes
63551 fi
63552     if test "x${LCMS_FOUND}" = "xyes"; then
63553       USE_EXTERNAL_LCMS=true
63554     else
63555       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63556     fi
63557   else
63558     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63559   fi
63560 
63561 
63562 
63563 
63564 
63565 
63566 
63567 
63568 
63569 
63570 
63571   # Setup libm (the maths library)
63572   if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63573     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63574 $as_echo_n "checking for cos in -lm... " >&6; }
63575 if ${ac_cv_lib_m_cos+:} false; then :
63576   $as_echo_n "(cached) " >&6
63577 else
63578   ac_check_lib_save_LIBS=$LIBS
63579 LIBS="-lm  $LIBS"
63580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63581 /* end confdefs.h.  */
63582 
63583 /* Override any GCC internal prototype to avoid an error.
63584    Use char because int might match the return type of a GCC
63585    builtin and then its argument prototype would still apply.  */
63586 #ifdef __cplusplus
63587 extern "C"
63588 #endif
63589 char cos ();
63590 int
63591 main ()
63592 {
63593 return cos ();
63594   ;
63595   return 0;
63596 }
63597 _ACEOF
63598 if ac_fn_cxx_try_link "$LINENO"; then :
63599   ac_cv_lib_m_cos=yes
63600 else
63601   ac_cv_lib_m_cos=no
63602 fi
63603 rm -f core conftest.err conftest.$ac_objext \
63604     conftest$ac_exeext conftest.$ac_ext
63605 LIBS=$ac_check_lib_save_LIBS
63606 fi
63607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63608 $as_echo "$ac_cv_lib_m_cos" >&6; }
63609 if test "x$ac_cv_lib_m_cos" = xyes; then :
63610   cat >>confdefs.h <<_ACEOF
63611 #define HAVE_LIBM 1
63612 _ACEOF
63613 
63614   LIBS="-lm $LIBS"
63615 
63616 else
63617 
63618         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63619 $as_echo "$as_me: Maths library was not found" >&6;}
63620 
63621 fi
63622 
63623     LIBM="-lm"
63624   else
63625     LIBM=""
63626   fi
63627 
63628 
63629   # Setup libdl (for dynamic library loading)
63630   save_LIBS="$LIBS"
63631   LIBS=""
63632   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63633 $as_echo_n "checking for dlopen in -ldl... " >&6; }
63634 if ${ac_cv_lib_dl_dlopen+:} false; then :
63635   $as_echo_n "(cached) " >&6
63636 else
63637   ac_check_lib_save_LIBS=$LIBS
63638 LIBS="-ldl  $LIBS"
63639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63640 /* end confdefs.h.  */
63641 
63642 /* Override any GCC internal prototype to avoid an error.
63643    Use char because int might match the return type of a GCC
63644    builtin and then its argument prototype would still apply.  */
63645 #ifdef __cplusplus
63646 extern "C"
63647 #endif
63648 char dlopen ();
63649 int
63650 main ()
63651 {
63652 return dlopen ();
63653   ;
63654   return 0;
63655 }
63656 _ACEOF
63657 if ac_fn_cxx_try_link "$LINENO"; then :
63658   ac_cv_lib_dl_dlopen=yes
63659 else
63660   ac_cv_lib_dl_dlopen=no
63661 fi
63662 rm -f core conftest.err conftest.$ac_objext \
63663     conftest$ac_exeext conftest.$ac_ext
63664 LIBS=$ac_check_lib_save_LIBS
63665 fi
63666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63667 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63668 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63669   cat >>confdefs.h <<_ACEOF
63670 #define HAVE_LIBDL 1
63671 _ACEOF
63672 
63673   LIBS="-ldl $LIBS"
63674 
63675 fi
63676 
63677   LIBDL="$LIBS"
63678 
63679   LIBS="$save_LIBS"
63680 
63681   # Deprecated libraries, keep the flags for backwards compatibility
63682   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63683 
63684 
63685 # Check whether --with-dxsdk was given.
63686 if test "${with_dxsdk+set}" = set; then :
63687   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63688 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63689 fi
63690 
63691 
63692 
63693 
63694 # Check whether --with-dxsdk-lib was given.
63695 if test "${with_dxsdk_lib+set}" = set; then :
63696   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63697 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63698 fi
63699 
63700 
63701 
63702 
63703 # Check whether --with-dxsdk-include was given.
63704 if test "${with_dxsdk_include+set}" = set; then :
63705   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63706 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63707 fi
63708 
63709 
63710   fi
63711 
63712   # Control if libzip can use mmap. Available for purposes of overriding.
63713   LIBZIP_CAN_USE_MMAP=true
63714 
63715 
63716 
63717 
63718 
63719 
63720 
63721 
63722 
63723 
63724 
63725 
63726 
63727 
63728 ###############################################################################
63729 #
63730 # We need to do some final tweaking, when everything else is done.
63731 #
63732 ###############################################################################
63733 
63734 
63735   # Check whether --enable-new-hotspot-build was given.
63736 if test "${enable_new_hotspot_build+set}" = set; then :
63737   enableval=$enable_new_hotspot_build;
63738 fi
63739 
63740 
63741    if test "x$enable_new_hotspot_build" = "x" || test "x$enable_new_hotspot_build" = "xyes"; then
63742      USE_NEW_HOTSPOT_BUILD=true
63743    else
63744      USE_NEW_HOTSPOT_BUILD=false
63745    fi
63746 
63747 
63748   case $HOTSPOT_DEBUG_LEVEL in
63749     product )
63750       VARIANT="OPT"
63751       FASTDEBUG="false"
63752       DEBUG_CLASSFILES="false"
63753       ;;
63754     fastdebug )
63755       VARIANT="DBG"
63756       FASTDEBUG="true"
63757       DEBUG_CLASSFILES="true"
63758       ;;
63759     debug )
63760       VARIANT="DBG"
63761       FASTDEBUG="false"
63762       DEBUG_CLASSFILES="true"
63763       ;;
63764     optimized )
63765       VARIANT="OPT"
63766       FASTDEBUG="false"
63767       DEBUG_CLASSFILES="false"
63768       ;;
63769   esac
63770 
63771 
63772 
63773 
63774   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
63775     MACOSX_UNIVERSAL="true"
63776   fi
63777 
63778 
63779 
63780   # Make sure JVM_VARIANTS_COMMA use minimal1 for backwards compatibility
63781   JVM_VARIANTS_COMMA=`$ECHO ,$JVM_VARIANTS_OPT, | $SED -e 's/,minimal,/,minimal1,/'`
63782 
63783   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
63784   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
63785   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,minimal1\?,/!s/.*/false/g' -e '/,minimal1\?,/s/.*/true/g'`
63786   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
63787   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
63788   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
63789   JVM_VARIANT_CUSTOM=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,custom,/!s/.*/false/g' -e '/,custom,/s/.*/true/g'`
63790 
63791   #####
63792   # Generate the legacy makefile targets for hotspot.
63793   HOTSPOT_TARGET=""
63794 
63795   if test "x$JVM_VARIANT_SERVER" = xtrue; then
63796     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
63797   fi
63798 
63799   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
63800     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
63801   fi
63802 
63803   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
63804     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
63805   fi
63806 
63807   if test "x$JVM_VARIANT_ZERO" = xtrue; then
63808     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
63809   fi
63810 
63811   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
63812     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
63813   fi
63814 
63815   if test "x$JVM_VARIANT_CORE" = xtrue; then
63816     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
63817   fi
63818 
63819   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_DEBUG_LEVEL"
63820 
63821   # On Macosx universal binaries are produced, but they only contain
63822   # 64 bit intel. This invalidates control of which jvms are built
63823   # from configure, but only server is valid anyway. Fix this
63824   # when hotspot makefiles are rewritten.
63825   if test "x$MACOSX_UNIVERSAL" = xtrue; then
63826     HOTSPOT_TARGET=universal_${HOTSPOT_DEBUG_LEVEL}
63827   fi
63828 
63829   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
63830 
63831 
63832   # Control wether Hotspot runs Queens test after build.
63833   # Check whether --enable-hotspot-test-in-build was given.
63834 if test "${enable_hotspot_test_in_build+set}" = set; then :
63835   enableval=$enable_hotspot_test_in_build;
63836 else
63837   enable_hotspot_test_in_build=no
63838 fi
63839 
63840   if test "x$enable_hotspot_test_in_build" = "xyes"; then
63841     TEST_IN_BUILD=true
63842   else
63843     TEST_IN_BUILD=false
63844   fi
63845 
63846 
63847   if test "x$USE_NEW_HOTSPOT_BUILD" = xfalse; then
63848     if test "x$JVM_VARIANT_CLIENT" = xtrue; then
63849       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
63850         as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
63851       fi
63852     fi
63853     if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
63854       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
63855         as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
63856       fi
63857     fi
63858     if test "x$JVM_VARIANT_CUSTOM" = xtrue; then
63859         as_fn_error $? "You cannot build a custom JVM using the old hotspot build system." "$LINENO" 5
63860     fi
63861   fi
63862 
63863 
63864 
63865 
63866 
63867 
63868 
63869 
63870 
63871 
63872 
63873   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63874 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63875 
63876   if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63877     ENABLE_INTREE_EC=yes
63878     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63879 $as_echo "yes" >&6; }
63880   else
63881     ENABLE_INTREE_EC=no
63882     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63883 $as_echo "no" >&6; }
63884   fi
63885 
63886 
63887 
63888 
63889 ###############################################################################
63890 #
63891 # Configure parts of the build that only affect the build performance,
63892 # not the result.
63893 #
63894 ###############################################################################
63895 
63896 
63897   # How many cores do we have on this build system?
63898 
63899 # Check whether --with-num-cores was given.
63900 if test "${with_num_cores+set}" = set; then :
63901   withval=$with_num_cores;
63902 fi
63903 
63904   if test "x$with_num_cores" = x; then
63905     # The number of cores were not specified, try to probe them.
63906 
63907   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63908 $as_echo_n "checking for number of cores... " >&6; }
63909   NUM_CORES=1
63910   FOUND_CORES=no
63911 
63912   if test -f /proc/cpuinfo; then
63913     # Looks like a Linux (or cygwin) system
63914     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63915     FOUND_CORES=yes
63916   elif test -x /usr/sbin/psrinfo; then
63917     # Looks like a Solaris system
63918     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63919     FOUND_CORES=yes
63920   elif test -x /usr/sbin/sysctl; then
63921     # Looks like a MacOSX system
63922     NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63923     FOUND_CORES=yes
63924   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63925     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63926     FOUND_CORES=yes
63927   elif test -n "$NUMBER_OF_PROCESSORS"; then
63928     # On windows, look in the env
63929     NUM_CORES=$NUMBER_OF_PROCESSORS
63930     FOUND_CORES=yes
63931   fi
63932 
63933   if test "x$FOUND_CORES" = xyes; then
63934     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63935 $as_echo "$NUM_CORES" >&6; }
63936   else
63937     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63938 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
63939     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63940 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63941   fi
63942 
63943   else
63944     NUM_CORES=$with_num_cores
63945   fi
63946 
63947 
63948 
63949   # How much memory do we have on this build system?
63950 
63951 # Check whether --with-memory-size was given.
63952 if test "${with_memory_size+set}" = set; then :
63953   withval=$with_memory_size;
63954 fi
63955 
63956   if test "x$with_memory_size" = x; then
63957     # The memory size was not specified, try to probe it.
63958 
63959   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
63960 $as_echo_n "checking for memory size... " >&6; }
63961   # Default to 1024 MB
63962   MEMORY_SIZE=1024
63963   FOUND_MEM=no
63964 
63965   if test -f /proc/meminfo; then
63966     # Looks like a Linux (or cygwin) system
63967     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
63968     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
63969     FOUND_MEM=yes
63970   elif test -x /usr/sbin/prtconf; then
63971     # Looks like a Solaris or AIX system
63972     MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
63973     FOUND_MEM=yes
63974   elif test -x /usr/sbin/sysctl; then
63975     # Looks like a MacOSX system
63976     MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
63977     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
63978     FOUND_MEM=yes
63979   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
63980     # Windows, but without cygwin
63981     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
63982     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
63983     FOUND_MEM=yes
63984   fi
63985 
63986   if test "x$FOUND_MEM" = xyes; then
63987     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
63988 $as_echo "$MEMORY_SIZE MB" >&6; }
63989   else
63990     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
63991 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
63992     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
63993 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
63994   fi
63995 
63996   else
63997     MEMORY_SIZE=$with_memory_size
63998   fi
63999 
64000 
64001 
64002   # Provide a decent default number of parallel jobs for make depending on
64003   # number of cores, amount of memory and machine architecture.
64004 
64005 # Check whether --with-jobs was given.
64006 if test "${with_jobs+set}" = set; then :
64007   withval=$with_jobs;
64008 fi
64009 
64010   if test "x$with_jobs" = x; then
64011     # Number of jobs was not specified, calculate.
64012     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64013 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64014     # Approximate memory in GB.
64015     memory_gb=`expr $MEMORY_SIZE / 1024`
64016     # Pick the lowest of memory in gb and number of cores.
64017     if test "$memory_gb" -lt "$NUM_CORES"; then
64018       JOBS="$memory_gb"
64019     else
64020       JOBS="$NUM_CORES"
64021     fi
64022     if test "$JOBS" -eq "0"; then
64023       JOBS=1
64024     fi
64025     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64026 $as_echo "$JOBS" >&6; }
64027   else
64028     JOBS=$with_jobs
64029   fi
64030 
64031 
64032 
64033   # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64034 
64035 # Check whether --with-test-jobs was given.
64036 if test "${with_test_jobs+set}" = set; then :
64037   withval=$with_test_jobs;
64038 fi
64039 
64040   if test "x$with_test_jobs" = x; then
64041       TEST_JOBS=0
64042   else
64043       TEST_JOBS=$with_test_jobs
64044   fi
64045 
64046 
64047 
64048 # Setup arguments for the boot jdk (after cores and memory have been setup)
64049 
64050   ##############################################################################
64051   #
64052   # Specify jvm options for anything that is run with the Boot JDK.
64053   # Not all JVM:s accept the same arguments on the command line.
64054   #
64055 
64056 # Check whether --with-boot-jdk-jvmargs was given.
64057 if test "${with_boot_jdk_jvmargs+set}" = set; then :
64058   withval=$with_boot_jdk_jvmargs;
64059 fi
64060 
64061 
64062   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64063 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
64064 
64065   # Disable special log output when a debug build is used as Boot JDK...
64066 
64067   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64068   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64069   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64070   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64071   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64072   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64073     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64074     JVM_ARG_OK=true
64075   else
64076     $ECHO "Arg failed:" >&5
64077     $ECHO "$OUTPUT" >&5
64078     JVM_ARG_OK=false
64079   fi
64080 
64081 
64082   # Apply user provided options.
64083 
64084   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64085   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64086   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64087   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64088   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64089   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64090     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64091     JVM_ARG_OK=true
64092   else
64093     $ECHO "Arg failed:" >&5
64094     $ECHO "$OUTPUT" >&5
64095     JVM_ARG_OK=false
64096   fi
64097 
64098 
64099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64100 $as_echo "$boot_jdk_jvmargs" >&6; }
64101 
64102   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64103   JAVA_FLAGS=$boot_jdk_jvmargs
64104 
64105 
64106 
64107   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64108 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64109 
64110   # Starting amount of heap memory.
64111 
64112   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64113   $ECHO "Command: $JAVA -Xms64M -version" >&5
64114   OUTPUT=`$JAVA -Xms64M -version 2>&1`
64115   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64116   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64117   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64118     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64119     JVM_ARG_OK=true
64120   else
64121     $ECHO "Arg failed:" >&5
64122     $ECHO "$OUTPUT" >&5
64123     JVM_ARG_OK=false
64124   fi
64125 
64126 
64127   # Maximum amount of heap memory.
64128   # Maximum stack size.
64129   JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
64130   if test "x$BOOT_JDK_BITS" = "x32"; then
64131     if test "$JVM_MAX_HEAP" -gt "1100"; then
64132       JVM_MAX_HEAP=1100
64133     elif test "$JVM_MAX_HEAP" -lt "512"; then
64134       JVM_MAX_HEAP=512
64135     fi
64136     STACK_SIZE=768
64137   else
64138     # Running a 64 bit JVM allows for and requires a bigger heap
64139     if test "$JVM_MAX_HEAP" -gt "1600"; then
64140       JVM_MAX_HEAP=1600
64141     elif test "$JVM_MAX_HEAP" -lt "512"; then
64142       JVM_MAX_HEAP=512
64143     fi
64144     STACK_SIZE=1536
64145   fi
64146 
64147   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64148   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64149   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -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_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
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   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64163   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64164   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64165   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64166   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64167   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64168     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64169     JVM_ARG_OK=true
64170   else
64171     $ECHO "Arg failed:" >&5
64172     $ECHO "$OUTPUT" >&5
64173     JVM_ARG_OK=false
64174   fi
64175 
64176 
64177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64178 $as_echo "$boot_jdk_jvmargs_big" >&6; }
64179 
64180   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64181 
64182 
64183   # By default, the main javac compilations use big
64184   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64185 
64186 
64187   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64188 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64189 
64190   # Use serial gc for small short lived tools if possible
64191 
64192   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64193   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64194   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64195   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64196   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64197   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64198     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64199     JVM_ARG_OK=true
64200   else
64201     $ECHO "Arg failed:" >&5
64202     $ECHO "$OUTPUT" >&5
64203     JVM_ARG_OK=false
64204   fi
64205 
64206 
64207   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64208   $ECHO "Command: $JAVA -Xms32M -version" >&5
64209   OUTPUT=`$JAVA -Xms32M -version 2>&1`
64210   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64211   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64212   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64213     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64214     JVM_ARG_OK=true
64215   else
64216     $ECHO "Arg failed:" >&5
64217     $ECHO "$OUTPUT" >&5
64218     JVM_ARG_OK=false
64219   fi
64220 
64221 
64222   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64223   $ECHO "Command: $JAVA -Xmx512M -version" >&5
64224   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64225   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64226   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64227   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64228     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64229     JVM_ARG_OK=true
64230   else
64231     $ECHO "Arg failed:" >&5
64232     $ECHO "$OUTPUT" >&5
64233     JVM_ARG_OK=false
64234   fi
64235 
64236 
64237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64238 $as_echo "$boot_jdk_jvmargs_small" >&6; }
64239 
64240   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64241 
64242 
64243   JAVA_TOOL_FLAGS_SMALL=""
64244   for f in $JAVA_FLAGS_SMALL; do
64245     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64246   done
64247 
64248 
64249 
64250 # Setup smart javac (after cores and memory have been setup)
64251 
64252 
64253 # Check whether --with-sjavac-server-java was given.
64254 if test "${with_sjavac_server_java+set}" = set; then :
64255   withval=$with_sjavac_server_java;
64256 fi
64257 
64258 
64259   if test "x$with_sjavac_server_java" != x; then
64260     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64261     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64262     if test "x$FOUND_VERSION" = x; then
64263       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64264     fi
64265   else
64266     SJAVAC_SERVER_JAVA="$JAVA"
64267   fi
64268 
64269 
64270   if test "$MEMORY_SIZE" -gt "3000"; then
64271 
64272   $ECHO "Check if jvm arg is ok: -d64" >&5
64273   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64274   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64275   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64276   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64277   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64278     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64279     JVM_ARG_OK=true
64280   else
64281     $ECHO "Arg failed:" >&5
64282     $ECHO "$OUTPUT" >&5
64283     JVM_ARG_OK=false
64284   fi
64285 
64286     if test "$JVM_ARG_OK" = true; then
64287       JVM_64BIT=true
64288       JVM_ARG_OK=false
64289     fi
64290   fi
64291 
64292   MX_VALUE=`expr $MEMORY_SIZE / 2`
64293   if test "$JVM_64BIT" = true; then
64294     # Set ms lower than mx since more than one instance of the server might
64295     # get launched at the same time before they figure out which instance won.
64296     MS_VALUE=512
64297     if test "$MX_VALUE" -gt "2048"; then
64298       MX_VALUE=2048
64299     fi
64300   else
64301     MS_VALUE=256
64302     if test "$MX_VALUE" -gt "1500"; then
64303       MX_VALUE=1500
64304     fi
64305   fi
64306   if test "$MX_VALUE" -lt "512"; then
64307     MX_VALUE=512
64308   fi
64309 
64310   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64311   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64312   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64313   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64314   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64315   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64316     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64317     JVM_ARG_OK=true
64318   else
64319     $ECHO "Arg failed:" >&5
64320     $ECHO "$OUTPUT" >&5
64321     JVM_ARG_OK=false
64322   fi
64323 
64324 
64325 
64326   # Check whether --enable-sjavac was given.
64327 if test "${enable_sjavac+set}" = set; then :
64328   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64329 else
64330   ENABLE_SJAVAC="no"
64331 fi
64332 
64333   if test "x$JVM_ARG_OK" = "xfalse"; then
64334     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64335 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64336     ENABLE_SJAVAC="no"
64337   fi
64338   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64339 $as_echo_n "checking whether to use sjavac... " >&6; }
64340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64341 $as_echo "$ENABLE_SJAVAC" >&6; }
64342 
64343 
64344   # Check whether --enable-javac-server was given.
64345 if test "${enable_javac_server+set}" = set; then :
64346   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64347 else
64348   ENABLE_JAVAC_SERVER="yes"
64349 fi
64350 
64351   if test "x$JVM_ARG_OK" = "xfalse"; then
64352     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64353 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64354     ENABLE_JAVAC_SERVER="no"
64355   fi
64356   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64357 $as_echo_n "checking whether to use javac server... " >&6; }
64358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64359 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64360 
64361 
64362   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
64363     # When using a server javac, the small client instances do not need much
64364     # resources.
64365     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64366   fi
64367 
64368 
64369 # Setup use of icecc if requested
64370 
64371   # Check whether --enable-icecc was given.
64372 if test "${enable_icecc+set}" = set; then :
64373   enableval=$enable_icecc;
64374 fi
64375 
64376 
64377   if test "x${enable_icecc}" = "xyes"; then
64378 
64379 
64380 
64381   # Publish this variable in the help.
64382 
64383 
64384   if [ -z "${ICECC_CMD+x}" ]; then
64385     # The variable is not set by user, try to locate tool using the code snippet
64386     for ac_prog in icecc
64387 do
64388   # Extract the first word of "$ac_prog", so it can be a program name with args.
64389 set dummy $ac_prog; ac_word=$2
64390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64391 $as_echo_n "checking for $ac_word... " >&6; }
64392 if ${ac_cv_path_ICECC_CMD+:} false; then :
64393   $as_echo_n "(cached) " >&6
64394 else
64395   case $ICECC_CMD in
64396   [\\/]* | ?:[\\/]*)
64397   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64398   ;;
64399   *)
64400   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64401 for as_dir in $PATH
64402 do
64403   IFS=$as_save_IFS
64404   test -z "$as_dir" && as_dir=.
64405     for ac_exec_ext in '' $ac_executable_extensions; do
64406   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64407     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64408     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64409     break 2
64410   fi
64411 done
64412   done
64413 IFS=$as_save_IFS
64414 
64415   ;;
64416 esac
64417 fi
64418 ICECC_CMD=$ac_cv_path_ICECC_CMD
64419 if test -n "$ICECC_CMD"; then
64420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64421 $as_echo "$ICECC_CMD" >&6; }
64422 else
64423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64424 $as_echo "no" >&6; }
64425 fi
64426 
64427 
64428   test -n "$ICECC_CMD" && break
64429 done
64430 
64431   else
64432     # The variable is set, but is it from the command line or the environment?
64433 
64434     # Try to remove the string !ICECC_CMD! from our list.
64435     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64436     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64437       # If it failed, the variable was not from the command line. Ignore it,
64438       # but warn the user (except for BASH, which is always set by the calling BASH).
64439       if test "xICECC_CMD" != xBASH; then
64440         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64441 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64442       fi
64443       # Try to locate tool using the code snippet
64444       for ac_prog in icecc
64445 do
64446   # Extract the first word of "$ac_prog", so it can be a program name with args.
64447 set dummy $ac_prog; ac_word=$2
64448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64449 $as_echo_n "checking for $ac_word... " >&6; }
64450 if ${ac_cv_path_ICECC_CMD+:} false; then :
64451   $as_echo_n "(cached) " >&6
64452 else
64453   case $ICECC_CMD in
64454   [\\/]* | ?:[\\/]*)
64455   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64456   ;;
64457   *)
64458   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64459 for as_dir in $PATH
64460 do
64461   IFS=$as_save_IFS
64462   test -z "$as_dir" && as_dir=.
64463     for ac_exec_ext in '' $ac_executable_extensions; do
64464   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64465     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64466     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64467     break 2
64468   fi
64469 done
64470   done
64471 IFS=$as_save_IFS
64472 
64473   ;;
64474 esac
64475 fi
64476 ICECC_CMD=$ac_cv_path_ICECC_CMD
64477 if test -n "$ICECC_CMD"; then
64478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64479 $as_echo "$ICECC_CMD" >&6; }
64480 else
64481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64482 $as_echo "no" >&6; }
64483 fi
64484 
64485 
64486   test -n "$ICECC_CMD" && break
64487 done
64488 
64489     else
64490       # If it succeeded, then it was overridden by the user. We will use it
64491       # for the tool.
64492 
64493       # First remove it from the list of overridden variables, so we can test
64494       # for unknown variables in the end.
64495       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64496 
64497       # Check if we try to supply an empty value
64498       if test "x$ICECC_CMD" = x; then
64499         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64500 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64501         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64502 $as_echo_n "checking for ICECC_CMD... " >&6; }
64503         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64504 $as_echo "disabled" >&6; }
64505       else
64506         # Check if the provided tool contains a complete path.
64507         tool_specified="$ICECC_CMD"
64508         tool_basename="${tool_specified##*/}"
64509         if test "x$tool_basename" = "x$tool_specified"; then
64510           # A command without a complete path is provided, search $PATH.
64511           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64512 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64513           # Extract the first word of "$tool_basename", so it can be a program name with args.
64514 set dummy $tool_basename; ac_word=$2
64515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64516 $as_echo_n "checking for $ac_word... " >&6; }
64517 if ${ac_cv_path_ICECC_CMD+:} false; then :
64518   $as_echo_n "(cached) " >&6
64519 else
64520   case $ICECC_CMD in
64521   [\\/]* | ?:[\\/]*)
64522   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64523   ;;
64524   *)
64525   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64526 for as_dir in $PATH
64527 do
64528   IFS=$as_save_IFS
64529   test -z "$as_dir" && as_dir=.
64530     for ac_exec_ext in '' $ac_executable_extensions; do
64531   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64532     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64533     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64534     break 2
64535   fi
64536 done
64537   done
64538 IFS=$as_save_IFS
64539 
64540   ;;
64541 esac
64542 fi
64543 ICECC_CMD=$ac_cv_path_ICECC_CMD
64544 if test -n "$ICECC_CMD"; then
64545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64546 $as_echo "$ICECC_CMD" >&6; }
64547 else
64548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64549 $as_echo "no" >&6; }
64550 fi
64551 
64552 
64553           if test "x$ICECC_CMD" = x; then
64554             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64555           fi
64556         else
64557           # Otherwise we believe it is a complete path. Use it as it is.
64558           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64559 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64560           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64561 $as_echo_n "checking for ICECC_CMD... " >&6; }
64562           if test ! -x "$tool_specified"; then
64563             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64564 $as_echo "not found" >&6; }
64565             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64566           fi
64567           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64568 $as_echo "$tool_specified" >&6; }
64569         fi
64570       fi
64571     fi
64572 
64573   fi
64574 
64575 
64576 
64577   if test "x$ICECC_CMD" = x; then
64578     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64579   fi
64580 
64581 
64582     old_path="$PATH"
64583 
64584     # Look for icecc-create-env in some known places
64585     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64586 
64587 
64588 
64589   # Publish this variable in the help.
64590 
64591 
64592   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64593     # The variable is not set by user, try to locate tool using the code snippet
64594     for ac_prog in icecc-create-env
64595 do
64596   # Extract the first word of "$ac_prog", so it can be a program name with args.
64597 set dummy $ac_prog; ac_word=$2
64598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64599 $as_echo_n "checking for $ac_word... " >&6; }
64600 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64601   $as_echo_n "(cached) " >&6
64602 else
64603   case $ICECC_CREATE_ENV in
64604   [\\/]* | ?:[\\/]*)
64605   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64606   ;;
64607   *)
64608   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64609 for as_dir in $PATH
64610 do
64611   IFS=$as_save_IFS
64612   test -z "$as_dir" && as_dir=.
64613     for ac_exec_ext in '' $ac_executable_extensions; do
64614   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64615     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64616     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64617     break 2
64618   fi
64619 done
64620   done
64621 IFS=$as_save_IFS
64622 
64623   ;;
64624 esac
64625 fi
64626 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64627 if test -n "$ICECC_CREATE_ENV"; then
64628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64629 $as_echo "$ICECC_CREATE_ENV" >&6; }
64630 else
64631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64632 $as_echo "no" >&6; }
64633 fi
64634 
64635 
64636   test -n "$ICECC_CREATE_ENV" && break
64637 done
64638 
64639   else
64640     # The variable is set, but is it from the command line or the environment?
64641 
64642     # Try to remove the string !ICECC_CREATE_ENV! from our list.
64643     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64644     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64645       # If it failed, the variable was not from the command line. Ignore it,
64646       # but warn the user (except for BASH, which is always set by the calling BASH).
64647       if test "xICECC_CREATE_ENV" != xBASH; then
64648         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64649 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64650       fi
64651       # Try to locate tool using the code snippet
64652       for ac_prog in icecc-create-env
64653 do
64654   # Extract the first word of "$ac_prog", so it can be a program name with args.
64655 set dummy $ac_prog; ac_word=$2
64656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64657 $as_echo_n "checking for $ac_word... " >&6; }
64658 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64659   $as_echo_n "(cached) " >&6
64660 else
64661   case $ICECC_CREATE_ENV in
64662   [\\/]* | ?:[\\/]*)
64663   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64664   ;;
64665   *)
64666   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64667 for as_dir in $PATH
64668 do
64669   IFS=$as_save_IFS
64670   test -z "$as_dir" && as_dir=.
64671     for ac_exec_ext in '' $ac_executable_extensions; do
64672   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64673     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64674     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64675     break 2
64676   fi
64677 done
64678   done
64679 IFS=$as_save_IFS
64680 
64681   ;;
64682 esac
64683 fi
64684 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64685 if test -n "$ICECC_CREATE_ENV"; then
64686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64687 $as_echo "$ICECC_CREATE_ENV" >&6; }
64688 else
64689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64690 $as_echo "no" >&6; }
64691 fi
64692 
64693 
64694   test -n "$ICECC_CREATE_ENV" && break
64695 done
64696 
64697     else
64698       # If it succeeded, then it was overridden by the user. We will use it
64699       # for the tool.
64700 
64701       # First remove it from the list of overridden variables, so we can test
64702       # for unknown variables in the end.
64703       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64704 
64705       # Check if we try to supply an empty value
64706       if test "x$ICECC_CREATE_ENV" = x; then
64707         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64708 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64709         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64710 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64711         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64712 $as_echo "disabled" >&6; }
64713       else
64714         # Check if the provided tool contains a complete path.
64715         tool_specified="$ICECC_CREATE_ENV"
64716         tool_basename="${tool_specified##*/}"
64717         if test "x$tool_basename" = "x$tool_specified"; then
64718           # A command without a complete path is provided, search $PATH.
64719           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64720 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64721           # Extract the first word of "$tool_basename", so it can be a program name with args.
64722 set dummy $tool_basename; ac_word=$2
64723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64724 $as_echo_n "checking for $ac_word... " >&6; }
64725 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64726   $as_echo_n "(cached) " >&6
64727 else
64728   case $ICECC_CREATE_ENV in
64729   [\\/]* | ?:[\\/]*)
64730   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64731   ;;
64732   *)
64733   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64734 for as_dir in $PATH
64735 do
64736   IFS=$as_save_IFS
64737   test -z "$as_dir" && as_dir=.
64738     for ac_exec_ext in '' $ac_executable_extensions; do
64739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64740     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64742     break 2
64743   fi
64744 done
64745   done
64746 IFS=$as_save_IFS
64747 
64748   ;;
64749 esac
64750 fi
64751 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64752 if test -n "$ICECC_CREATE_ENV"; then
64753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64754 $as_echo "$ICECC_CREATE_ENV" >&6; }
64755 else
64756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64757 $as_echo "no" >&6; }
64758 fi
64759 
64760 
64761           if test "x$ICECC_CREATE_ENV" = x; then
64762             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64763           fi
64764         else
64765           # Otherwise we believe it is a complete path. Use it as it is.
64766           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64767 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64768           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64769 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64770           if test ! -x "$tool_specified"; then
64771             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64772 $as_echo "not found" >&6; }
64773             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64774           fi
64775           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64776 $as_echo "$tool_specified" >&6; }
64777         fi
64778       fi
64779     fi
64780 
64781   fi
64782 
64783 
64784 
64785   if test "x$ICECC_CREATE_ENV" = x; then
64786     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64787   fi
64788 
64789 
64790     # Use icecc-create-env to create a minimal compilation environment that can
64791     # be sent to the other hosts in the icecream cluster.
64792     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64793     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64794     # Older versions of icecc does not have the --gcc parameter
64795     if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64796       icecc_gcc_arg="--gcc"
64797     fi
64798     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64799 
64800   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64801       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64802           ${icecc_create_env_log} 2>&1 )
64803   if test "$?" != "0"; then
64804     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64805 $as_echo "$as_me: icecc-create-env output:" >&6;}
64806     cat \
64807           ${icecc_create_env_log}
64808     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64809   fi
64810 
64811     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64812       # For clang, the icecc compilerwrapper is needed. It usually resides next
64813       # to icecc-create-env.
64814 
64815 
64816 
64817   # Publish this variable in the help.
64818 
64819 
64820   if [ -z "${ICECC_WRAPPER+x}" ]; then
64821     # The variable is not set by user, try to locate tool using the code snippet
64822     for ac_prog in compilerwrapper
64823 do
64824   # Extract the first word of "$ac_prog", so it can be a program name with args.
64825 set dummy $ac_prog; ac_word=$2
64826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64827 $as_echo_n "checking for $ac_word... " >&6; }
64828 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64829   $as_echo_n "(cached) " >&6
64830 else
64831   case $ICECC_WRAPPER in
64832   [\\/]* | ?:[\\/]*)
64833   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64834   ;;
64835   *)
64836   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64837 for as_dir in $PATH
64838 do
64839   IFS=$as_save_IFS
64840   test -z "$as_dir" && as_dir=.
64841     for ac_exec_ext in '' $ac_executable_extensions; do
64842   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64843     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64844     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64845     break 2
64846   fi
64847 done
64848   done
64849 IFS=$as_save_IFS
64850 
64851   ;;
64852 esac
64853 fi
64854 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64855 if test -n "$ICECC_WRAPPER"; then
64856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64857 $as_echo "$ICECC_WRAPPER" >&6; }
64858 else
64859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64860 $as_echo "no" >&6; }
64861 fi
64862 
64863 
64864   test -n "$ICECC_WRAPPER" && break
64865 done
64866 
64867   else
64868     # The variable is set, but is it from the command line or the environment?
64869 
64870     # Try to remove the string !ICECC_WRAPPER! from our list.
64871     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64872     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64873       # If it failed, the variable was not from the command line. Ignore it,
64874       # but warn the user (except for BASH, which is always set by the calling BASH).
64875       if test "xICECC_WRAPPER" != xBASH; then
64876         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64877 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64878       fi
64879       # Try to locate tool using the code snippet
64880       for ac_prog in compilerwrapper
64881 do
64882   # Extract the first word of "$ac_prog", so it can be a program name with args.
64883 set dummy $ac_prog; ac_word=$2
64884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64885 $as_echo_n "checking for $ac_word... " >&6; }
64886 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64887   $as_echo_n "(cached) " >&6
64888 else
64889   case $ICECC_WRAPPER in
64890   [\\/]* | ?:[\\/]*)
64891   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64892   ;;
64893   *)
64894   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64895 for as_dir in $PATH
64896 do
64897   IFS=$as_save_IFS
64898   test -z "$as_dir" && as_dir=.
64899     for ac_exec_ext in '' $ac_executable_extensions; do
64900   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64901     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64902     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64903     break 2
64904   fi
64905 done
64906   done
64907 IFS=$as_save_IFS
64908 
64909   ;;
64910 esac
64911 fi
64912 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64913 if test -n "$ICECC_WRAPPER"; then
64914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64915 $as_echo "$ICECC_WRAPPER" >&6; }
64916 else
64917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64918 $as_echo "no" >&6; }
64919 fi
64920 
64921 
64922   test -n "$ICECC_WRAPPER" && break
64923 done
64924 
64925     else
64926       # If it succeeded, then it was overridden by the user. We will use it
64927       # for the tool.
64928 
64929       # First remove it from the list of overridden variables, so we can test
64930       # for unknown variables in the end.
64931       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64932 
64933       # Check if we try to supply an empty value
64934       if test "x$ICECC_WRAPPER" = x; then
64935         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
64936 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
64937         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
64938 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
64939         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64940 $as_echo "disabled" >&6; }
64941       else
64942         # Check if the provided tool contains a complete path.
64943         tool_specified="$ICECC_WRAPPER"
64944         tool_basename="${tool_specified##*/}"
64945         if test "x$tool_basename" = "x$tool_specified"; then
64946           # A command without a complete path is provided, search $PATH.
64947           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
64948 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
64949           # Extract the first word of "$tool_basename", so it can be a program name with args.
64950 set dummy $tool_basename; ac_word=$2
64951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64952 $as_echo_n "checking for $ac_word... " >&6; }
64953 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64954   $as_echo_n "(cached) " >&6
64955 else
64956   case $ICECC_WRAPPER in
64957   [\\/]* | ?:[\\/]*)
64958   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64959   ;;
64960   *)
64961   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64962 for as_dir in $PATH
64963 do
64964   IFS=$as_save_IFS
64965   test -z "$as_dir" && as_dir=.
64966     for ac_exec_ext in '' $ac_executable_extensions; do
64967   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64968     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64969     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64970     break 2
64971   fi
64972 done
64973   done
64974 IFS=$as_save_IFS
64975 
64976   ;;
64977 esac
64978 fi
64979 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64980 if test -n "$ICECC_WRAPPER"; then
64981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64982 $as_echo "$ICECC_WRAPPER" >&6; }
64983 else
64984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64985 $as_echo "no" >&6; }
64986 fi
64987 
64988 
64989           if test "x$ICECC_WRAPPER" = x; then
64990             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64991           fi
64992         else
64993           # Otherwise we believe it is a complete path. Use it as it is.
64994           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
64995 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
64996           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
64997 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
64998           if test ! -x "$tool_specified"; then
64999             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65000 $as_echo "not found" >&6; }
65001             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65002           fi
65003           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65004 $as_echo "$tool_specified" >&6; }
65005         fi
65006       fi
65007     fi
65008 
65009   fi
65010 
65011 
65012 
65013   if test "x$ICECC_WRAPPER" = x; then
65014     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65015   fi
65016 
65017 
65018 
65019   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65020       && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65021   if test "$?" != "0"; then
65022     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65023 $as_echo "$as_me: icecc-create-env output:" >&6;}
65024     cat ${icecc_create_env_log}
65025     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65026   fi
65027 
65028     else
65029       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65030     fi
65031     PATH="$old_path"
65032     # The bundle with the compiler gets a name based on checksums. Parse log file
65033     # to find it.
65034     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65035     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65036     if test ! -f ${ICECC_ENV_BUNDLE}; then
65037       as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65038     fi
65039     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65040 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65041     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65042 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65043     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65044 
65045     if test "x${COMPILE_TYPE}" = "xcross"; then
65046       # If cross compiling, create a separate env package for the build compiler
65047       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65048       icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65049       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65050 
65051   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65052       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65053             ${icecc_create_env_log_build} 2>&1 )
65054   if test "$?" != "0"; then
65055     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65056 $as_echo "$as_me: icecc-create-env output:" >&6;}
65057     cat \
65058             ${icecc_create_env_log_build}
65059     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65060   fi
65061 
65062       elif test "x${BUILD_CC##*/}" = "xclang"; then
65063 
65064   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65065       && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65066   if test "$?" != "0"; then
65067     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65068 $as_echo "$as_me: icecc-create-env output:" >&6;}
65069     cat ${icecc_create_env_log_build}
65070     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65071   fi
65072 
65073       else
65074         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65075       fi
65076       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65077       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65078       if test ! -f ${ICECC_ENV_BUNDLE}; then
65079         as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65080       fi
65081       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65082 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65083       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65084 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65085       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65086           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65087     else
65088       BUILD_ICECC="${ICECC}"
65089     fi
65090 
65091 
65092   fi
65093 
65094 
65095 # Can the C/C++ compiler use precompiled headers?
65096 
65097 
65098   ###############################################################################
65099   #
65100   # Can the C/C++ compiler use precompiled headers?
65101   #
65102   # Check whether --enable-precompiled-headers was given.
65103 if test "${enable_precompiled_headers+set}" = set; then :
65104   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65105 else
65106   ENABLE_PRECOMPH=yes
65107 fi
65108 
65109 
65110   USE_PRECOMPILED_HEADER=1
65111   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65112 $as_echo_n "checking If precompiled header is enabled... " >&6; }
65113   if test "x$ENABLE_PRECOMPH" = xno; then
65114     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65115 $as_echo "no, forced" >&6; }
65116     USE_PRECOMPILED_HEADER=0
65117   elif test "x$ICECC" != "x"; then
65118     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65119 $as_echo "no, does not work effectively with icecc" >&6; }
65120     USE_PRECOMPILED_HEADER=0
65121   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65122     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65123 $as_echo "no, does not work with Solaris Studio" >&6; }
65124     USE_PRECOMPILED_HEADER=0
65125   else
65126     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65127 $as_echo "yes" >&6; }
65128   fi
65129 
65130   if test "x$ENABLE_PRECOMPH" = xyes; then
65131     # Check that the compiler actually supports precomp headers.
65132     if test "x$TOOLCHAIN_TYPE" = xgcc; then
65133       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65134 $as_echo_n "checking that precompiled headers work... " >&6; }
65135       echo "int alfa();" > conftest.h
65136       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65137       if test ! -f conftest.hpp.gch; then
65138         USE_PRECOMPILED_HEADER=0
65139         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65140 $as_echo "no" >&6; }
65141       else
65142         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65143 $as_echo "yes" >&6; }
65144       fi
65145       rm -f conftest.h conftest.hpp.gch
65146     fi
65147   fi
65148 
65149 
65150 
65151 
65152 # Setup use of ccache, if available
65153 
65154   # Check whether --enable-ccache was given.
65155 if test "${enable_ccache+set}" = set; then :
65156   enableval=$enable_ccache;
65157 fi
65158 
65159 
65160   CCACHE=
65161   CCACHE_STATUS=
65162   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65163 $as_echo_n "checking is ccache enabled... " >&6; }
65164   if test "x$enable_ccache" = xyes; then
65165     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65166       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65167 $as_echo "yes" >&6; }
65168       OLD_PATH="$PATH"
65169       if test "x$TOOLCHAIN_PATH" != x; then
65170         PATH=$TOOLCHAIN_PATH:$PATH
65171       fi
65172 
65173 
65174 
65175   # Publish this variable in the help.
65176 
65177 
65178   if [ -z "${CCACHE+x}" ]; then
65179     # The variable is not set by user, try to locate tool using the code snippet
65180     for ac_prog in ccache
65181 do
65182   # Extract the first word of "$ac_prog", so it can be a program name with args.
65183 set dummy $ac_prog; ac_word=$2
65184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65185 $as_echo_n "checking for $ac_word... " >&6; }
65186 if ${ac_cv_path_CCACHE+:} false; then :
65187   $as_echo_n "(cached) " >&6
65188 else
65189   case $CCACHE in
65190   [\\/]* | ?:[\\/]*)
65191   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65192   ;;
65193   *)
65194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65195 for as_dir in $PATH
65196 do
65197   IFS=$as_save_IFS
65198   test -z "$as_dir" && as_dir=.
65199     for ac_exec_ext in '' $ac_executable_extensions; do
65200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65201     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65203     break 2
65204   fi
65205 done
65206   done
65207 IFS=$as_save_IFS
65208 
65209   ;;
65210 esac
65211 fi
65212 CCACHE=$ac_cv_path_CCACHE
65213 if test -n "$CCACHE"; then
65214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65215 $as_echo "$CCACHE" >&6; }
65216 else
65217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65218 $as_echo "no" >&6; }
65219 fi
65220 
65221 
65222   test -n "$CCACHE" && break
65223 done
65224 
65225   else
65226     # The variable is set, but is it from the command line or the environment?
65227 
65228     # Try to remove the string !CCACHE! from our list.
65229     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65230     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65231       # If it failed, the variable was not from the command line. Ignore it,
65232       # but warn the user (except for BASH, which is always set by the calling BASH).
65233       if test "xCCACHE" != xBASH; then
65234         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65235 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65236       fi
65237       # Try to locate tool using the code snippet
65238       for ac_prog in ccache
65239 do
65240   # Extract the first word of "$ac_prog", so it can be a program name with args.
65241 set dummy $ac_prog; ac_word=$2
65242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65243 $as_echo_n "checking for $ac_word... " >&6; }
65244 if ${ac_cv_path_CCACHE+:} false; then :
65245   $as_echo_n "(cached) " >&6
65246 else
65247   case $CCACHE in
65248   [\\/]* | ?:[\\/]*)
65249   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65250   ;;
65251   *)
65252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65253 for as_dir in $PATH
65254 do
65255   IFS=$as_save_IFS
65256   test -z "$as_dir" && as_dir=.
65257     for ac_exec_ext in '' $ac_executable_extensions; do
65258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65259     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65261     break 2
65262   fi
65263 done
65264   done
65265 IFS=$as_save_IFS
65266 
65267   ;;
65268 esac
65269 fi
65270 CCACHE=$ac_cv_path_CCACHE
65271 if test -n "$CCACHE"; then
65272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65273 $as_echo "$CCACHE" >&6; }
65274 else
65275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65276 $as_echo "no" >&6; }
65277 fi
65278 
65279 
65280   test -n "$CCACHE" && break
65281 done
65282 
65283     else
65284       # If it succeeded, then it was overridden by the user. We will use it
65285       # for the tool.
65286 
65287       # First remove it from the list of overridden variables, so we can test
65288       # for unknown variables in the end.
65289       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65290 
65291       # Check if we try to supply an empty value
65292       if test "x$CCACHE" = x; then
65293         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65294 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65295         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65296 $as_echo_n "checking for CCACHE... " >&6; }
65297         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65298 $as_echo "disabled" >&6; }
65299       else
65300         # Check if the provided tool contains a complete path.
65301         tool_specified="$CCACHE"
65302         tool_basename="${tool_specified##*/}"
65303         if test "x$tool_basename" = "x$tool_specified"; then
65304           # A command without a complete path is provided, search $PATH.
65305           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65306 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65307           # Extract the first word of "$tool_basename", so it can be a program name with args.
65308 set dummy $tool_basename; ac_word=$2
65309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65310 $as_echo_n "checking for $ac_word... " >&6; }
65311 if ${ac_cv_path_CCACHE+:} false; then :
65312   $as_echo_n "(cached) " >&6
65313 else
65314   case $CCACHE in
65315   [\\/]* | ?:[\\/]*)
65316   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65317   ;;
65318   *)
65319   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65320 for as_dir in $PATH
65321 do
65322   IFS=$as_save_IFS
65323   test -z "$as_dir" && as_dir=.
65324     for ac_exec_ext in '' $ac_executable_extensions; do
65325   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65326     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65327     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65328     break 2
65329   fi
65330 done
65331   done
65332 IFS=$as_save_IFS
65333 
65334   ;;
65335 esac
65336 fi
65337 CCACHE=$ac_cv_path_CCACHE
65338 if test -n "$CCACHE"; then
65339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65340 $as_echo "$CCACHE" >&6; }
65341 else
65342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65343 $as_echo "no" >&6; }
65344 fi
65345 
65346 
65347           if test "x$CCACHE" = x; then
65348             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65349           fi
65350         else
65351           # Otherwise we believe it is a complete path. Use it as it is.
65352           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65353 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65354           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65355 $as_echo_n "checking for CCACHE... " >&6; }
65356           if test ! -x "$tool_specified"; then
65357             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65358 $as_echo "not found" >&6; }
65359             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65360           fi
65361           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65362 $as_echo "$tool_specified" >&6; }
65363         fi
65364       fi
65365     fi
65366 
65367   fi
65368 
65369 
65370 
65371   if test "x$CCACHE" = x; then
65372     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65373   fi
65374 
65375 
65376       PATH="$OLD_PATH"
65377       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65378       CCACHE_STATUS="Active ($CCACHE_VERSION)"
65379     else
65380       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65381 $as_echo "no" >&6; }
65382       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65383 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65384     fi
65385   elif test "x$enable_ccache" = xno; then
65386     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65387 $as_echo "no, explicitly disabled" >&6; }
65388     CCACHE_STATUS="Disabled"
65389   elif test "x$enable_ccache" = x; then
65390     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65391 $as_echo "no" >&6; }
65392   else
65393     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65394 $as_echo "unknown" >&6; }
65395     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65396   fi
65397 
65398 
65399 
65400 # Check whether --with-ccache-dir was given.
65401 if test "${with_ccache_dir+set}" = set; then :
65402   withval=$with_ccache_dir;
65403 fi
65404 
65405 
65406   if test "x$with_ccache_dir" != x; then
65407     # When using a non home ccache directory, assume the use is to share ccache files
65408     # with other users. Thus change the umask.
65409     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65410     if test "x$CCACHE" = x; then
65411       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65412 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65413     fi
65414   fi
65415 
65416   if test "x$CCACHE" != x; then
65417 
65418   if test "x$CCACHE" != x; then
65419     if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65420       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65421           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65422       if test "x$HAS_BAD_CCACHE" != "x"; then
65423         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65424       fi
65425       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65426 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65427       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65428       PUSHED_FLAGS="$CXXFLAGS"
65429       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65430       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65431 /* end confdefs.h.  */
65432 
65433 int
65434 main ()
65435 {
65436 
65437   ;
65438   return 0;
65439 }
65440 _ACEOF
65441 if ac_fn_cxx_try_compile "$LINENO"; then :
65442   CC_KNOWS_CCACHE_TRICK=yes
65443 else
65444   CC_KNOWS_CCACHE_TRICK=no
65445 fi
65446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65447       CXXFLAGS="$PUSHED_FLAGS"
65448       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65449         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65450 $as_echo "yes" >&6; }
65451         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65452 
65453         CCACHE_SLOPPINESS=pch_defines,time_macros
65454       else
65455         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65456 $as_echo "no" >&6; }
65457         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65458       fi
65459     fi
65460 
65461     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65462         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65463 
65464     if test "x$SET_CCACHE_DIR" != x; then
65465       mkdir -p $CCACHE_DIR > /dev/null 2>&1
65466       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65467     fi
65468   fi
65469 
65470   fi
65471 
65472 
65473 ###############################################################################
65474 #
65475 # And now the finish...
65476 #
65477 ###############################################################################
65478 
65479 # Check for some common pitfalls
65480 
65481   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65482     file_to_test="$SRC_ROOT/LICENSE"
65483     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65484       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
65485     fi
65486   fi
65487 
65488 
65489   # Did user specify any unknown variables?
65490 
65491   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65492     # Replace the separating ! with spaces before presenting for end user.
65493     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65494     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65495 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65496   fi
65497 
65498 
65499   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65500 $as_echo_n "checking if build directory is on local disk... " >&6; }
65501 
65502   # df -l lists only local disks; if the given directory is not found then
65503   # a non-zero exit code is given
65504   if test "x$DF" = x; then
65505     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65506       # msys does not have df; use Windows "net use" instead.
65507       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65508       if test "x$IS_NETWORK_DISK" = x; then
65509         OUTPUT_DIR_IS_LOCAL="yes"
65510       else
65511         OUTPUT_DIR_IS_LOCAL="no"
65512       fi
65513     else
65514       # No df here, say it's local
65515       OUTPUT_DIR_IS_LOCAL="yes"
65516     fi
65517   else
65518     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65519       OUTPUT_DIR_IS_LOCAL="yes"
65520     else
65521       OUTPUT_DIR_IS_LOCAL="no"
65522     fi
65523   fi
65524 
65525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65526 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65527 
65528 
65529 
65530   # Check if the user has any old-style ALT_ variables set.
65531   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65532 
65533   # Before generating output files, test if they exist. If they do, this is a reconfigure.
65534   # Since we can't properly handle the dependencies for this, warn the user about the situation
65535   if test -e $OUTPUT_ROOT/spec.gmk; then
65536     IS_RECONFIGURE=yes
65537   else
65538     IS_RECONFIGURE=no
65539   fi
65540 
65541 
65542 # At the end, call the custom hook. (Dummy macro if no custom sources available)
65543 
65544 
65545 # This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65546 
65547   # Keep feature lists sorted and free of duplicates
65548   JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65549   JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65550   JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65551   JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65552   JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65553   JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65554   JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65555 
65556   # Validate features
65557   for variant in $JVM_VARIANTS; do
65558     { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65559 $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65560     features_var_name=JVM_FEATURES_$variant
65561     JVM_FEATURES_TO_TEST=${!features_var_name}
65562     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65563 $as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65564     NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65565     STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65566     INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65567     if test "x$INVALID_FEATURES" != x; then
65568       as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65569     fi
65570   done
65571 
65572 
65573 # We're messing a bit with internal autoconf variables to put the config.status
65574 # in the output directory instead of the current directory.
65575 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65576 
65577 # Create the actual output files. Now the main work of configure is done.
65578 cat >confcache <<\_ACEOF
65579 # This file is a shell script that caches the results of configure
65580 # tests run on this system so they can be shared between configure
65581 # scripts and configure runs, see configure's option --config-cache.
65582 # It is not useful on other systems.  If it contains results you don't
65583 # want to keep, you may remove or edit it.
65584 #
65585 # config.status only pays attention to the cache file if you give it
65586 # the --recheck option to rerun configure.
65587 #
65588 # `ac_cv_env_foo' variables (set or unset) will be overridden when
65589 # loading this file, other *unset* `ac_cv_foo' will be assigned the
65590 # following values.
65591 
65592 _ACEOF
65593 
65594 # The following way of writing the cache mishandles newlines in values,
65595 # but we know of no workaround that is simple, portable, and efficient.
65596 # So, we kill variables containing newlines.
65597 # Ultrix sh set writes to stderr and can't be redirected directly,
65598 # and sets the high bit in the cache file unless we assign to the vars.
65599 (
65600   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65601     eval ac_val=\$$ac_var
65602     case $ac_val in #(
65603     *${as_nl}*)
65604       case $ac_var in #(
65605       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65606 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65607       esac
65608       case $ac_var in #(
65609       _ | IFS | as_nl) ;; #(
65610       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65611       *) { eval $ac_var=; unset $ac_var;} ;;
65612       esac ;;
65613     esac
65614   done
65615 
65616   (set) 2>&1 |
65617     case $as_nl`(ac_space=' '; set) 2>&1` in #(
65618     *${as_nl}ac_space=\ *)
65619       # `set' does not quote correctly, so add quotes: double-quote
65620       # substitution turns \\\\ into \\, and sed turns \\ into \.
65621       sed -n \
65622         "s/'/'\\\\''/g;
65623           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65624       ;; #(
65625     *)
65626       # `set' quotes correctly as required by POSIX, so do not add quotes.
65627       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65628       ;;
65629     esac |
65630     sort
65631 ) |
65632   sed '
65633      /^ac_cv_env_/b end
65634      t clear
65635      :clear
65636      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65637      t end
65638      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65639      :end' >>confcache
65640 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65641   if test -w "$cache_file"; then
65642     if test "x$cache_file" != "x/dev/null"; then
65643       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65644 $as_echo "$as_me: updating cache $cache_file" >&6;}
65645       if test ! -f "$cache_file" || test -h "$cache_file"; then
65646         cat confcache >"$cache_file"
65647       else
65648         case $cache_file in #(
65649         */* | ?:*)
65650           mv -f confcache "$cache_file"$$ &&
65651           mv -f "$cache_file"$$ "$cache_file" ;; #(
65652         *)
65653           mv -f confcache "$cache_file" ;;
65654         esac
65655       fi
65656     fi
65657   else
65658     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65659 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65660   fi
65661 fi
65662 rm -f confcache
65663 
65664 test "x$prefix" = xNONE && prefix=$ac_default_prefix
65665 # Let make expand exec_prefix.
65666 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65667 
65668 # Transform confdefs.h into DEFS.
65669 # Protect against shell expansion while executing Makefile rules.
65670 # Protect against Makefile macro expansion.
65671 #
65672 # If the first sed substitution is executed (which looks for macros that
65673 # take arguments), then branch to the quote section.  Otherwise,
65674 # look for a macro that doesn't take arguments.
65675 ac_script='
65676 :mline
65677 /\\$/{
65678  N
65679  s,\\\n,,
65680  b mline
65681 }
65682 t clear
65683 :clear
65684 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
65685 t quote
65686 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
65687 t quote
65688 b any
65689 :quote
65690 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65691 s/\[/\\&/g
65692 s/\]/\\&/g
65693 s/\$/$$/g
65694 H
65695 :any
65696 ${
65697         g
65698         s/^\n//
65699         s/\n/ /g
65700         p
65701 }
65702 '
65703 DEFS=`sed -n "$ac_script" confdefs.h`
65704 
65705 
65706 ac_libobjs=
65707 ac_ltlibobjs=
65708 U=
65709 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65710   # 1. Remove the extension, and $U if already installed.
65711   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65712   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65713   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65714   #    will be set to the directory where LIBOBJS objects are built.
65715   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65716   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65717 done
65718 LIBOBJS=$ac_libobjs
65719 
65720 LTLIBOBJS=$ac_ltlibobjs
65721 
65722 
65723 
65724 : "${CONFIG_STATUS=./config.status}"
65725 ac_write_fail=0
65726 ac_clean_files_save=$ac_clean_files
65727 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65728 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65729 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65730 as_write_fail=0
65731 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65732 #! $SHELL
65733 # Generated by $as_me.
65734 # Run this file to recreate the current configuration.
65735 # Compiler output produced by configure, useful for debugging
65736 # configure, is in config.log if it exists.
65737 
65738 debug=false
65739 ac_cs_recheck=false
65740 ac_cs_silent=false
65741 
65742 SHELL=\${CONFIG_SHELL-$SHELL}
65743 export SHELL
65744 _ASEOF
65745 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65746 ## -------------------- ##
65747 ## M4sh Initialization. ##
65748 ## -------------------- ##
65749 
65750 # Be more Bourne compatible
65751 DUALCASE=1; export DUALCASE # for MKS sh
65752 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65753   emulate sh
65754   NULLCMD=:
65755   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65756   # is contrary to our usage.  Disable this feature.
65757   alias -g '${1+"$@"}'='"$@"'
65758   setopt NO_GLOB_SUBST
65759 else
65760   case `(set -o) 2>/dev/null` in #(
65761   *posix*) :
65762     set -o posix ;; #(
65763   *) :
65764      ;;
65765 esac
65766 fi
65767 
65768 
65769 as_nl='
65770 '
65771 export as_nl
65772 # Printing a long string crashes Solaris 7 /usr/bin/printf.
65773 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65774 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65775 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65776 # Prefer a ksh shell builtin over an external printf program on Solaris,
65777 # but without wasting forks for bash or zsh.
65778 if test -z "$BASH_VERSION$ZSH_VERSION" \
65779     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65780   as_echo='print -r --'
65781   as_echo_n='print -rn --'
65782 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65783   as_echo='printf %s\n'
65784   as_echo_n='printf %s'
65785 else
65786   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65787     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65788     as_echo_n='/usr/ucb/echo -n'
65789   else
65790     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65791     as_echo_n_body='eval
65792       arg=$1;
65793       case $arg in #(
65794       *"$as_nl"*)
65795         expr "X$arg" : "X\\(.*\\)$as_nl";
65796         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65797       esac;
65798       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65799     '
65800     export as_echo_n_body
65801     as_echo_n='sh -c $as_echo_n_body as_echo'
65802   fi
65803   export as_echo_body
65804   as_echo='sh -c $as_echo_body as_echo'
65805 fi
65806 
65807 # The user is always right.
65808 if test "${PATH_SEPARATOR+set}" != set; then
65809   PATH_SEPARATOR=:
65810   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65811     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65812       PATH_SEPARATOR=';'
65813   }
65814 fi
65815 
65816 
65817 # IFS
65818 # We need space, tab and new line, in precisely that order.  Quoting is
65819 # there to prevent editors from complaining about space-tab.
65820 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
65821 # splitting by setting IFS to empty value.)
65822 IFS=" ""        $as_nl"
65823 
65824 # Find who we are.  Look in the path if we contain no directory separator.
65825 as_myself=
65826 case $0 in #((
65827   *[\\/]* ) as_myself=$0 ;;
65828   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65829 for as_dir in $PATH
65830 do
65831   IFS=$as_save_IFS
65832   test -z "$as_dir" && as_dir=.
65833     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65834   done
65835 IFS=$as_save_IFS
65836 
65837      ;;
65838 esac
65839 # We did not find ourselves, most probably we were run as `sh COMMAND'
65840 # in which case we are not to be found in the path.
65841 if test "x$as_myself" = x; then
65842   as_myself=$0
65843 fi
65844 if test ! -f "$as_myself"; then
65845   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65846   exit 1
65847 fi
65848 
65849 # Unset variables that we do not need and which cause bugs (e.g. in
65850 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65851 # suppresses any "Segmentation fault" message there.  '((' could
65852 # trigger a bug in pdksh 5.2.14.
65853 for as_var in BASH_ENV ENV MAIL MAILPATH
65854 do eval test x\${$as_var+set} = xset \
65855   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65856 done
65857 PS1='$ '
65858 PS2='> '
65859 PS4='+ '
65860 
65861 # NLS nuisances.
65862 LC_ALL=C
65863 export LC_ALL
65864 LANGUAGE=C
65865 export LANGUAGE
65866 
65867 # CDPATH.
65868 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65869 
65870 
65871 # as_fn_error STATUS ERROR [LINENO LOG_FD]
65872 # ----------------------------------------
65873 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65874 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65875 # script with STATUS, using 1 if that was 0.
65876 as_fn_error ()
65877 {
65878   as_status=$1; test $as_status -eq 0 && as_status=1
65879   if test "$4"; then
65880     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65881     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65882   fi
65883   $as_echo "$as_me: error: $2" >&2
65884   as_fn_exit $as_status
65885 } # as_fn_error
65886 
65887 
65888 # as_fn_set_status STATUS
65889 # -----------------------
65890 # Set $? to STATUS, without forking.
65891 as_fn_set_status ()
65892 {
65893   return $1
65894 } # as_fn_set_status
65895 
65896 # as_fn_exit STATUS
65897 # -----------------
65898 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65899 as_fn_exit ()
65900 {
65901   set +e
65902   as_fn_set_status $1
65903   exit $1
65904 } # as_fn_exit
65905 
65906 # as_fn_unset VAR
65907 # ---------------
65908 # Portably unset VAR.
65909 as_fn_unset ()
65910 {
65911   { eval $1=; unset $1;}
65912 }
65913 as_unset=as_fn_unset
65914 # as_fn_append VAR VALUE
65915 # ----------------------
65916 # Append the text in VALUE to the end of the definition contained in VAR. Take
65917 # advantage of any shell optimizations that allow amortized linear growth over
65918 # repeated appends, instead of the typical quadratic growth present in naive
65919 # implementations.
65920 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
65921   eval 'as_fn_append ()
65922   {
65923     eval $1+=\$2
65924   }'
65925 else
65926   as_fn_append ()
65927   {
65928     eval $1=\$$1\$2
65929   }
65930 fi # as_fn_append
65931 
65932 # as_fn_arith ARG...
65933 # ------------------
65934 # Perform arithmetic evaluation on the ARGs, and store the result in the
65935 # global $as_val. Take advantage of shells that can avoid forks. The arguments
65936 # must be portable across $(()) and expr.
65937 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
65938   eval 'as_fn_arith ()
65939   {
65940     as_val=$(( $* ))
65941   }'
65942 else
65943   as_fn_arith ()
65944   {
65945     as_val=`expr "$@" || test $? -eq 1`
65946   }
65947 fi # as_fn_arith
65948 
65949 
65950 if expr a : '\(a\)' >/dev/null 2>&1 &&
65951    test "X`expr 00001 : '.*\(...\)'`" = X001; then
65952   as_expr=expr
65953 else
65954   as_expr=false
65955 fi
65956 
65957 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
65958   as_basename=basename
65959 else
65960   as_basename=false
65961 fi
65962 
65963 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
65964   as_dirname=dirname
65965 else
65966   as_dirname=false
65967 fi
65968 
65969 as_me=`$as_basename -- "$0" ||
65970 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
65971          X"$0" : 'X\(//\)$' \| \
65972          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
65973 $as_echo X/"$0" |
65974     sed '/^.*\/\([^/][^/]*\)\/*$/{
65975             s//\1/
65976             q
65977           }
65978           /^X\/\(\/\/\)$/{
65979             s//\1/
65980             q
65981           }
65982           /^X\/\(\/\).*/{
65983             s//\1/
65984             q
65985           }
65986           s/.*/./; q'`
65987 
65988 # Avoid depending upon Character Ranges.
65989 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
65990 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
65991 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
65992 as_cr_digits='0123456789'
65993 as_cr_alnum=$as_cr_Letters$as_cr_digits
65994 
65995 ECHO_C= ECHO_N= ECHO_T=
65996 case `echo -n x` in #(((((
65997 -n*)
65998   case `echo 'xy\c'` in
65999   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
66000   xy)  ECHO_C='\c';;
66001   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66002        ECHO_T=' ';;
66003   esac;;
66004 *)
66005   ECHO_N='-n';;
66006 esac
66007 
66008 rm -f conf$$ conf$$.exe conf$$.file
66009 if test -d conf$$.dir; then
66010   rm -f conf$$.dir/conf$$.file
66011 else
66012   rm -f conf$$.dir
66013   mkdir conf$$.dir 2>/dev/null
66014 fi
66015 if (echo >conf$$.file) 2>/dev/null; then
66016   if ln -s conf$$.file conf$$ 2>/dev/null; then
66017     as_ln_s='ln -s'
66018     # ... but there are two gotchas:
66019     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66020     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66021     # In both cases, we have to default to `cp -pR'.
66022     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66023       as_ln_s='cp -pR'
66024   elif ln conf$$.file conf$$ 2>/dev/null; then
66025     as_ln_s=ln
66026   else
66027     as_ln_s='cp -pR'
66028   fi
66029 else
66030   as_ln_s='cp -pR'
66031 fi
66032 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66033 rmdir conf$$.dir 2>/dev/null
66034 
66035 
66036 # as_fn_mkdir_p
66037 # -------------
66038 # Create "$as_dir" as a directory, including parents if necessary.
66039 as_fn_mkdir_p ()
66040 {
66041 
66042   case $as_dir in #(
66043   -*) as_dir=./$as_dir;;
66044   esac
66045   test -d "$as_dir" || eval $as_mkdir_p || {
66046     as_dirs=
66047     while :; do
66048       case $as_dir in #(
66049       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66050       *) as_qdir=$as_dir;;
66051       esac
66052       as_dirs="'$as_qdir' $as_dirs"
66053       as_dir=`$as_dirname -- "$as_dir" ||
66054 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66055          X"$as_dir" : 'X\(//\)[^/]' \| \
66056          X"$as_dir" : 'X\(//\)$' \| \
66057          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66058 $as_echo X"$as_dir" |
66059     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66060             s//\1/
66061             q
66062           }
66063           /^X\(\/\/\)[^/].*/{
66064             s//\1/
66065             q
66066           }
66067           /^X\(\/\/\)$/{
66068             s//\1/
66069             q
66070           }
66071           /^X\(\/\).*/{
66072             s//\1/
66073             q
66074           }
66075           s/.*/./; q'`
66076       test -d "$as_dir" && break
66077     done
66078     test -z "$as_dirs" || eval "mkdir $as_dirs"
66079   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66080 
66081 
66082 } # as_fn_mkdir_p
66083 if mkdir -p . 2>/dev/null; then
66084   as_mkdir_p='mkdir -p "$as_dir"'
66085 else
66086   test -d ./-p && rmdir ./-p
66087   as_mkdir_p=false
66088 fi
66089 
66090 
66091 # as_fn_executable_p FILE
66092 # -----------------------
66093 # Test if FILE is an executable regular file.
66094 as_fn_executable_p ()
66095 {
66096   test -f "$1" && test -x "$1"
66097 } # as_fn_executable_p
66098 as_test_x='test -x'
66099 as_executable_p=as_fn_executable_p
66100 
66101 # Sed expression to map a string onto a valid CPP name.
66102 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66103 
66104 # Sed expression to map a string onto a valid variable name.
66105 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66106 
66107 
66108 exec 6>&1
66109 ## ----------------------------------- ##
66110 ## Main body of $CONFIG_STATUS script. ##
66111 ## ----------------------------------- ##
66112 _ASEOF
66113 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66114 
66115 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66116 # Save the log message, to keep $0 and so on meaningful, and to
66117 # report actual input values of CONFIG_FILES etc. instead of their
66118 # values after options handling.
66119 ac_log="
66120 This file was extended by OpenJDK $as_me jdk9, which was
66121 generated by GNU Autoconf 2.69.  Invocation command line was
66122 
66123   CONFIG_FILES    = $CONFIG_FILES
66124   CONFIG_HEADERS  = $CONFIG_HEADERS
66125   CONFIG_LINKS    = $CONFIG_LINKS
66126   CONFIG_COMMANDS = $CONFIG_COMMANDS
66127   $ $0 $@
66128 
66129 on `(hostname || uname -n) 2>/dev/null | sed 1q`
66130 "
66131 
66132 _ACEOF
66133 
66134 case $ac_config_files in *"
66135 "*) set x $ac_config_files; shift; ac_config_files=$*;;
66136 esac
66137 
66138 
66139 
66140 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66141 # Files that config.status was made for.
66142 config_files="$ac_config_files"
66143 
66144 _ACEOF
66145 
66146 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66147 ac_cs_usage="\
66148 \`$as_me' instantiates files and other configuration actions
66149 from templates according to the current configuration.  Unless the files
66150 and actions are specified as TAGs, all are instantiated by default.
66151 
66152 Usage: $0 [OPTION]... [TAG]...
66153 
66154   -h, --help       print this help, then exit
66155   -V, --version    print version number and configuration settings, then exit
66156       --config     print configuration, then exit
66157   -q, --quiet, --silent
66158                    do not print progress messages
66159   -d, --debug      don't remove temporary files
66160       --recheck    update $as_me by reconfiguring in the same conditions
66161       --file=FILE[:TEMPLATE]
66162                    instantiate the configuration file FILE
66163 
66164 Configuration files:
66165 $config_files
66166 
66167 Report bugs to <build-dev@openjdk.java.net>.
66168 OpenJDK home page: <http://openjdk.java.net>."
66169 
66170 _ACEOF
66171 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66172 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66173 ac_cs_version="\\
66174 OpenJDK config.status jdk9
66175 configured by $0, generated by GNU Autoconf 2.69,
66176   with options \\"\$ac_cs_config\\"
66177 
66178 Copyright (C) 2012 Free Software Foundation, Inc.
66179 This config.status script is free software; the Free Software Foundation
66180 gives unlimited permission to copy, distribute and modify it."
66181 
66182 ac_pwd='$ac_pwd'
66183 srcdir='$srcdir'
66184 AWK='$AWK'
66185 test -n "\$AWK" || AWK=awk
66186 _ACEOF
66187 
66188 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66189 # The default lists apply if the user does not specify any file.
66190 ac_need_defaults=:
66191 while test $# != 0
66192 do
66193   case $1 in
66194   --*=?*)
66195     ac_option=`expr "X$1" : 'X\([^=]*\)='`
66196     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66197     ac_shift=:
66198     ;;
66199   --*=)
66200     ac_option=`expr "X$1" : 'X\([^=]*\)='`
66201     ac_optarg=
66202     ac_shift=:
66203     ;;
66204   *)
66205     ac_option=$1
66206     ac_optarg=$2
66207     ac_shift=shift
66208     ;;
66209   esac
66210 
66211   case $ac_option in
66212   # Handling of the options.
66213   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66214     ac_cs_recheck=: ;;
66215   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66216     $as_echo "$ac_cs_version"; exit ;;
66217   --config | --confi | --conf | --con | --co | --c )
66218     $as_echo "$ac_cs_config"; exit ;;
66219   --debug | --debu | --deb | --de | --d | -d )
66220     debug=: ;;
66221   --file | --fil | --fi | --f )
66222     $ac_shift
66223     case $ac_optarg in
66224     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66225     '') as_fn_error $? "missing file argument" ;;
66226     esac
66227     as_fn_append CONFIG_FILES " '$ac_optarg'"
66228     ac_need_defaults=false;;
66229   --he | --h |  --help | --hel | -h )
66230     $as_echo "$ac_cs_usage"; exit ;;
66231   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66232   | -silent | --silent | --silen | --sile | --sil | --si | --s)
66233     ac_cs_silent=: ;;
66234 
66235   # This is an error.
66236   -*) as_fn_error $? "unrecognized option: \`$1'
66237 Try \`$0 --help' for more information." ;;
66238 
66239   *) as_fn_append ac_config_targets " $1"
66240      ac_need_defaults=false ;;
66241 
66242   esac
66243   shift
66244 done
66245 
66246 ac_configure_extra_args=
66247 
66248 if $ac_cs_silent; then
66249   exec 6>/dev/null
66250   ac_configure_extra_args="$ac_configure_extra_args --silent"
66251 fi
66252 
66253 _ACEOF
66254 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66255 if \$ac_cs_recheck; then
66256   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66257   shift
66258   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66259   CONFIG_SHELL='$SHELL'
66260   export CONFIG_SHELL
66261   exec "\$@"
66262 fi
66263 
66264 _ACEOF
66265 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66266 exec 5>>config.log
66267 {
66268   echo
66269   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66270 ## Running $as_me. ##
66271 _ASBOX
66272   $as_echo "$ac_log"
66273 } >&5
66274 
66275 _ACEOF
66276 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66277 _ACEOF
66278 
66279 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66280 
66281 # Handling of arguments.
66282 for ac_config_target in $ac_config_targets
66283 do
66284   case $ac_config_target in
66285     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66286     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
66287     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66288     "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66289     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66290     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66291 
66292   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66293   esac
66294 done
66295 
66296 
66297 # If the user did not use the arguments to specify the items to instantiate,
66298 # then the envvar interface is used.  Set only those that are not.
66299 # We use the long form for the default assignment because of an extremely
66300 # bizarre bug on SunOS 4.1.3.
66301 if $ac_need_defaults; then
66302   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66303 fi
66304 
66305 # Have a temporary directory for convenience.  Make it in the build tree
66306 # simply because there is no reason against having it here, and in addition,
66307 # creating and moving files from /tmp can sometimes cause problems.
66308 # Hook for its removal unless debugging.
66309 # Note that there is a small window in which the directory will not be cleaned:
66310 # after its creation but before its name has been assigned to `$tmp'.
66311 $debug ||
66312 {
66313   tmp= ac_tmp=
66314   trap 'exit_status=$?
66315   : "${ac_tmp:=$tmp}"
66316   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66317 ' 0
66318   trap 'as_fn_exit 1' 1 2 13 15
66319 }
66320 # Create a (secure) tmp directory for tmp files.
66321 
66322 {
66323   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66324   test -d "$tmp"
66325 }  ||
66326 {
66327   tmp=./conf$$-$RANDOM
66328   (umask 077 && mkdir "$tmp")
66329 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66330 ac_tmp=$tmp
66331 
66332 # Set up the scripts for CONFIG_FILES section.
66333 # No need to generate them if there are no CONFIG_FILES.
66334 # This happens for instance with `./config.status config.h'.
66335 if test -n "$CONFIG_FILES"; then
66336 
66337 
66338 ac_cr=`echo X | tr X '\015'`
66339 # On cygwin, bash can eat \r inside `` if the user requested igncr.
66340 # But we know of no other shell where ac_cr would be empty at this
66341 # point, so we can use a bashism as a fallback.
66342 if test "x$ac_cr" = x; then
66343   eval ac_cr=\$\'\\r\'
66344 fi
66345 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66346 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66347   ac_cs_awk_cr='\\r'
66348 else
66349   ac_cs_awk_cr=$ac_cr
66350 fi
66351 
66352 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66353 _ACEOF
66354 
66355 
66356 {
66357   echo "cat >conf$$subs.awk <<_ACEOF" &&
66358   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66359   echo "_ACEOF"
66360 } >conf$$subs.sh ||
66361   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66362 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66363 ac_delim='%!_!# '
66364 for ac_last_try in false false false false false :; do
66365   . ./conf$$subs.sh ||
66366     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66367 
66368   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66369   if test $ac_delim_n = $ac_delim_num; then
66370     break
66371   elif $ac_last_try; then
66372     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66373   else
66374     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66375   fi
66376 done
66377 rm -f conf$$subs.sh
66378 
66379 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66380 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66381 _ACEOF
66382 sed -n '
66383 h
66384 s/^/S["/; s/!.*/"]=/
66385 p
66386 g
66387 s/^[^!]*!//
66388 :repl
66389 t repl
66390 s/'"$ac_delim"'$//
66391 t delim
66392 :nl
66393 h
66394 s/\(.\{148\}\)..*/\1/
66395 t more1
66396 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66397 p
66398 n
66399 b repl
66400 :more1
66401 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66402 p
66403 g
66404 s/.\{148\}//
66405 t nl
66406 :delim
66407 h
66408 s/\(.\{148\}\)..*/\1/
66409 t more2
66410 s/["\\]/\\&/g; s/^/"/; s/$/"/
66411 p
66412 b
66413 :more2
66414 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66415 p
66416 g
66417 s/.\{148\}//
66418 t delim
66419 ' <conf$$subs.awk | sed '
66420 /^[^""]/{
66421   N
66422   s/\n//
66423 }
66424 ' >>$CONFIG_STATUS || ac_write_fail=1
66425 rm -f conf$$subs.awk
66426 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66427 _ACAWK
66428 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66429   for (key in S) S_is_set[key] = 1
66430   FS = ""
66431 
66432 }
66433 {
66434   line = $ 0
66435   nfields = split(line, field, "@")
66436   substed = 0
66437   len = length(field[1])
66438   for (i = 2; i < nfields; i++) {
66439     key = field[i]
66440     keylen = length(key)
66441     if (S_is_set[key]) {
66442       value = S[key]
66443       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66444       len += length(value) + length(field[++i])
66445       substed = 1
66446     } else
66447       len += 1 + keylen
66448   }
66449 
66450   print line
66451 }
66452 
66453 _ACAWK
66454 _ACEOF
66455 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66456 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66457   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66458 else
66459   cat
66460 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66461   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66462 _ACEOF
66463 
66464 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66465 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66466 # trailing colons and then remove the whole line if VPATH becomes empty
66467 # (actually we leave an empty line to preserve line numbers).
66468 if test "x$srcdir" = x.; then
66469   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
66470 h
66471 s///
66472 s/^/:/
66473 s/[      ]*$/:/
66474 s/:\$(srcdir):/:/g
66475 s/:\${srcdir}:/:/g
66476 s/:@srcdir@:/:/g
66477 s/^:*//
66478 s/:*$//
66479 x
66480 s/\(=[   ]*\).*/\1/
66481 G
66482 s/\n//
66483 s/^[^=]*=[       ]*$//
66484 }'
66485 fi
66486 
66487 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66488 fi # test -n "$CONFIG_FILES"
66489 
66490 
66491 eval set X "  :F $CONFIG_FILES      "
66492 shift
66493 for ac_tag
66494 do
66495   case $ac_tag in
66496   :[FHLC]) ac_mode=$ac_tag; continue;;
66497   esac
66498   case $ac_mode$ac_tag in
66499   :[FHL]*:*);;
66500   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66501   :[FH]-) ac_tag=-:-;;
66502   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66503   esac
66504   ac_save_IFS=$IFS
66505   IFS=:
66506   set x $ac_tag
66507   IFS=$ac_save_IFS
66508   shift
66509   ac_file=$1
66510   shift
66511 
66512   case $ac_mode in
66513   :L) ac_source=$1;;
66514   :[FH])
66515     ac_file_inputs=
66516     for ac_f
66517     do
66518       case $ac_f in
66519       -) ac_f="$ac_tmp/stdin";;
66520       *) # Look for the file first in the build tree, then in the source tree
66521          # (if the path is not absolute).  The absolute path cannot be DOS-style,
66522          # because $ac_f cannot contain `:'.
66523          test -f "$ac_f" ||
66524            case $ac_f in
66525            [\\/$]*) false;;
66526            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66527            esac ||
66528            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66529       esac
66530       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66531       as_fn_append ac_file_inputs " '$ac_f'"
66532     done
66533 
66534     # Let's still pretend it is `configure' which instantiates (i.e., don't
66535     # use $as_me), people would be surprised to read:
66536     #    /* config.h.  Generated by config.status.  */
66537     configure_input='Generated from '`
66538           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66539         `' by configure.'
66540     if test x"$ac_file" != x-; then
66541       configure_input="$ac_file.  $configure_input"
66542       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66543 $as_echo "$as_me: creating $ac_file" >&6;}
66544     fi
66545     # Neutralize special characters interpreted by sed in replacement strings.
66546     case $configure_input in #(
66547     *\&* | *\|* | *\\* )
66548        ac_sed_conf_input=`$as_echo "$configure_input" |
66549        sed 's/[\\\\&|]/\\\\&/g'`;; #(
66550     *) ac_sed_conf_input=$configure_input;;
66551     esac
66552 
66553     case $ac_tag in
66554     *:-:* | *:-) cat >"$ac_tmp/stdin" \
66555       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66556     esac
66557     ;;
66558   esac
66559 
66560   ac_dir=`$as_dirname -- "$ac_file" ||
66561 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66562          X"$ac_file" : 'X\(//\)[^/]' \| \
66563          X"$ac_file" : 'X\(//\)$' \| \
66564          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66565 $as_echo X"$ac_file" |
66566     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66567             s//\1/
66568             q
66569           }
66570           /^X\(\/\/\)[^/].*/{
66571             s//\1/
66572             q
66573           }
66574           /^X\(\/\/\)$/{
66575             s//\1/
66576             q
66577           }
66578           /^X\(\/\).*/{
66579             s//\1/
66580             q
66581           }
66582           s/.*/./; q'`
66583   as_dir="$ac_dir"; as_fn_mkdir_p
66584   ac_builddir=.
66585 
66586 case "$ac_dir" in
66587 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66588 *)
66589   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66590   # A ".." for each directory in $ac_dir_suffix.
66591   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66592   case $ac_top_builddir_sub in
66593   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66594   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66595   esac ;;
66596 esac
66597 ac_abs_top_builddir=$ac_pwd
66598 ac_abs_builddir=$ac_pwd$ac_dir_suffix
66599 # for backward compatibility:
66600 ac_top_builddir=$ac_top_build_prefix
66601 
66602 case $srcdir in
66603   .)  # We are building in place.
66604     ac_srcdir=.
66605     ac_top_srcdir=$ac_top_builddir_sub
66606     ac_abs_top_srcdir=$ac_pwd ;;
66607   [\\/]* | ?:[\\/]* )  # Absolute name.
66608     ac_srcdir=$srcdir$ac_dir_suffix;
66609     ac_top_srcdir=$srcdir
66610     ac_abs_top_srcdir=$srcdir ;;
66611   *) # Relative name.
66612     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66613     ac_top_srcdir=$ac_top_build_prefix$srcdir
66614     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66615 esac
66616 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66617 
66618 
66619   case $ac_mode in
66620   :F)
66621   #
66622   # CONFIG_FILE
66623   #
66624 
66625 _ACEOF
66626 
66627 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66628 # If the template does not know about datarootdir, expand it.
66629 # FIXME: This hack should be removed a few years after 2.60.
66630 ac_datarootdir_hack=; ac_datarootdir_seen=
66631 ac_sed_dataroot='
66632 /datarootdir/ {
66633   p
66634   q
66635 }
66636 /@datadir@/p
66637 /@docdir@/p
66638 /@infodir@/p
66639 /@localedir@/p
66640 /@mandir@/p'
66641 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66642 *datarootdir*) ac_datarootdir_seen=yes;;
66643 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66644   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66645 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66646 _ACEOF
66647 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66648   ac_datarootdir_hack='
66649   s&@datadir@&$datadir&g
66650   s&@docdir@&$docdir&g
66651   s&@infodir@&$infodir&g
66652   s&@localedir@&$localedir&g
66653   s&@mandir@&$mandir&g
66654   s&\\\${datarootdir}&$datarootdir&g' ;;
66655 esac
66656 _ACEOF
66657 
66658 # Neutralize VPATH when `$srcdir' = `.'.
66659 # Shell code in configure.ac might set extrasub.
66660 # FIXME: do we really want to maintain this feature?
66661 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66662 ac_sed_extra="$ac_vpsub
66663 $extrasub
66664 _ACEOF
66665 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66666 :t
66667 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66668 s|@configure_input@|$ac_sed_conf_input|;t t
66669 s&@top_builddir@&$ac_top_builddir_sub&;t t
66670 s&@top_build_prefix@&$ac_top_build_prefix&;t t
66671 s&@srcdir@&$ac_srcdir&;t t
66672 s&@abs_srcdir@&$ac_abs_srcdir&;t t
66673 s&@top_srcdir@&$ac_top_srcdir&;t t
66674 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66675 s&@builddir@&$ac_builddir&;t t
66676 s&@abs_builddir@&$ac_abs_builddir&;t t
66677 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66678 $ac_datarootdir_hack
66679 "
66680 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66681   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66682 
66683 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66684   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66685   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
66686       "$ac_tmp/out"`; test -z "$ac_out"; } &&
66687   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66688 which seems to be undefined.  Please make sure it is defined" >&5
66689 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66690 which seems to be undefined.  Please make sure it is defined" >&2;}
66691 
66692   rm -f "$ac_tmp/stdin"
66693   case $ac_file in
66694   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66695   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66696   esac \
66697   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66698  ;;
66699 
66700 
66701 
66702   esac
66703 
66704 done # for ac_tag
66705 
66706 
66707 as_fn_exit 0
66708 _ACEOF
66709 ac_clean_files=$ac_clean_files_save
66710 
66711 test $ac_write_fail = 0 ||
66712   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66713 
66714 
66715 # configure is writing to config.log, and then calls config.status.
66716 # config.status does its own redirection, appending to config.log.
66717 # Unfortunately, on DOS this fails, as config.log is still kept open
66718 # by configure, so config.status won't be able to write to it; its
66719 # output is simply discarded.  So we exec the FD to /dev/null,
66720 # effectively closing config.log, so it can be properly (re)opened and
66721 # appended to by config.status.  When coming back to configure, we
66722 # need to make the FD available again.
66723 if test "$no_create" != yes; then
66724   ac_cs_success=:
66725   ac_config_status_args=
66726   test "$silent" = yes &&
66727     ac_config_status_args="$ac_config_status_args --quiet"
66728   exec 5>/dev/null
66729   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66730   exec 5>>config.log
66731   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66732   # would make configure fail if this is the last instruction.
66733   $ac_cs_success || as_fn_exit 1
66734 fi
66735 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66736   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66737 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66738 fi
66739 
66740 
66741 # After AC_OUTPUT, we need to do final work
66742 
66743 
66744   # Try to move config.log (generated by autoconf) to the configure-support directory.
66745   if test -e ./config.log; then
66746     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66747   fi
66748 
66749   # Rotate our log file (configure.log)
66750   if test -e "$OUTPUT_ROOT/configure.log.old"; then
66751     $RM -f "$OUTPUT_ROOT/configure.log.old"
66752   fi
66753   if test -e "$OUTPUT_ROOT/configure.log"; then
66754     $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66755   fi
66756 
66757   # Move configure.log from current directory to the build output root
66758   if test -e ./configure.log; then
66759     $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66760   fi
66761 
66762   # Make the compare script executable
66763   $CHMOD +x $OUTPUT_ROOT/compare.sh
66764 
66765 
66766 # Finally output some useful information to the user
66767 
66768   # Finally output some useful information to the user
66769 
66770   printf "\n"
66771   printf "====================================================\n"
66772   if test "x$no_create" != "xyes"; then
66773     if test "x$IS_RECONFIGURE" != "xyes"; then
66774       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66775     else
66776       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66777     fi
66778   else
66779     if test "x$IS_RECONFIGURE" != "xyes"; then
66780       printf "A configuration has been successfully checked but not created\n"
66781     else
66782       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66783     fi
66784   fi
66785   if test "x$CONFIGURE_COMMAND_LINE" != x; then
66786     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66787   else
66788     printf "using default settings.\n"
66789   fi
66790 
66791   printf "\n"
66792   printf "Configuration summary:\n"
66793   printf "* Debug level:    $DEBUG_LEVEL\n"
66794   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66795   printf "* JDK variant:    $JDK_VARIANT\n"
66796   printf "* JVM variants:   $JVM_VARIANTS\n"
66797   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66798   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66799 
66800   printf "\n"
66801   printf "Tools summary:\n"
66802   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66803     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66804   fi
66805   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66806   if test "x$TOOLCHAIN_VERSION" != "x"; then
66807     print_version=" $TOOLCHAIN_VERSION"
66808   fi
66809   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66810   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66811   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66812 
66813   printf "\n"
66814   printf "Build performance summary:\n"
66815   printf "* Cores to use:   $JOBS\n"
66816   printf "* Memory limit:   $MEMORY_SIZE MB\n"
66817   if test "x$CCACHE_STATUS" != "x"; then
66818     printf "* ccache status:  $CCACHE_STATUS\n"
66819   fi
66820   printf "\n"
66821 
66822   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66823     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66824     printf "will result in longer build times.\n"
66825     printf "\n"
66826   fi
66827 
66828   if test "x$FOUND_ALT_VARIABLES" != "x"; then
66829     printf "WARNING: You have old-style ALT_ environment variables set.\n"
66830     printf "These are not respected, and will be ignored. It is recommended\n"
66831     printf "that you clean your environment. The following variables are set:\n"
66832     printf "$FOUND_ALT_VARIABLES\n"
66833     printf "\n"
66834   fi
66835 
66836   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66837     printf "WARNING: Your build output directory is not on a local disk.\n"
66838     printf "This will severely degrade build performance!\n"
66839     printf "It is recommended that you create an output directory on a local disk,\n"
66840     printf "and run the configure script again from that directory.\n"
66841     printf "\n"
66842   fi
66843 
66844   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66845     printf "WARNING: The result of this configuration has overridden an older\n"
66846     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66847     printf "proper build. Failure to do so might result in strange build problems.\n"
66848     printf "\n"
66849   fi
66850 
66851   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66852     printf "WARNING: The result of this configuration was not saved.\n"
66853     printf "You should run without '--no-create | -n' to create the configuration.\n"
66854     printf "\n"
66855   fi
66856 
66857 
66858 
66859   # Locate config.log.
66860   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66861     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66862   elif test -e "./config.log"; then
66863     CONFIG_LOG_PATH="."
66864   fi
66865 
66866   if test -e "$CONFIG_LOG_PATH/config.log"; then
66867     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66868     if test $? -eq 0; then
66869       printf "The following warnings were produced. Repeated here for convenience:\n"
66870       # We must quote sed expression (using []) to stop m4 from eating the [].
66871       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66872       printf "\n"
66873     fi
66874   fi
66875